3e917084 by 荆蔚杰

电子证照创建合同接口批量单一改造

1 parent 7cd70732
......@@ -72,6 +72,7 @@ public interface ElecLicenseInfoDao extends CrudDao<ElecLicenseInfo> {
/**
* 更新转换后图片路径和状态
*
* @param jpgPath 图片路径
* @param bizId
* @return
......@@ -80,9 +81,17 @@ public interface ElecLicenseInfoDao extends CrudDao<ElecLicenseInfo> {
/**
* 更新合同用印状态
*
* @param contractId
* @param status
* @return
*/
Integer updateHtzt(@Param("contractId") String contractId, @Param("status") String status);
/**
* 获取单个待创建合同
* @param ywh 业务号
* @return
*/
List<ElecLicenseInfo> getOneContractIdIsNull(@Param("ywh") String ywh);
}
......
......@@ -36,18 +36,23 @@ public class CreateContractRest {
/**
* 批量创建
*
* @param ywh 如果有业务号就是单一,没有批量
* @return
*/
@Transactional(rollbackFor = Exception.class)
public void accessCreateContract() {
public void accessCreateContract(String ywh) {
String url = Global.ECI_HOST + CREATE_BY_CATEGORY;
logger.info("http request url:" + url);
// List<CreateContractRequest> requests = new ArrayList<>();
List<ElecLicenseInfo> waitForCreateContracts;
if (ywh==null) {
waitForCreateContracts = licenseInfoDao.getContractIdIsNull();
} else {
waitForCreateContracts = licenseInfoDao.getOneContractIdIsNull(ywh);
}
List<ElecLicenseInfo> waitForCreateContracts = licenseInfoDao.getContractIdIsNull();
for (ElecLicenseInfo waitForCreateContract : waitForCreateContracts) {
String result = null;
CreateContractRequest request = new CreateContractRequest();
......
......@@ -77,4 +77,10 @@
set HTZT=#{status,jdbcType=VARCHAR}
where CONTRACT_ID = #{contractId,jdbcType=VARCHAR}
</update>
<select id="getOneContractIdIsNull" resultType="com.thinkgem.jeesite.modules.eci.entity.ElecLicenseInfo">
select *
from ELEC_LICENSE_INFO
where CONTRACT_ID is null and YWH = #{ywh,jdbcType=VARCHAR}
</select>
</mapper>
......