电子证照创建合同接口批量单一改造
Showing
3 changed files
with
24 additions
and
4 deletions
| ... | @@ -72,6 +72,7 @@ public interface ElecLicenseInfoDao extends CrudDao<ElecLicenseInfo> { | ... | @@ -72,6 +72,7 @@ public interface ElecLicenseInfoDao extends CrudDao<ElecLicenseInfo> { |
| 72 | 72 | ||
| 73 | /** | 73 | /** |
| 74 | * 更新转换后图片路径和状态 | 74 | * 更新转换后图片路径和状态 |
| 75 | * | ||
| 75 | * @param jpgPath 图片路径 | 76 | * @param jpgPath 图片路径 |
| 76 | * @param bizId | 77 | * @param bizId |
| 77 | * @return | 78 | * @return |
| ... | @@ -80,9 +81,17 @@ public interface ElecLicenseInfoDao extends CrudDao<ElecLicenseInfo> { | ... | @@ -80,9 +81,17 @@ public interface ElecLicenseInfoDao extends CrudDao<ElecLicenseInfo> { |
| 80 | 81 | ||
| 81 | /** | 82 | /** |
| 82 | * 更新合同用印状态 | 83 | * 更新合同用印状态 |
| 84 | * | ||
| 83 | * @param contractId | 85 | * @param contractId |
| 84 | * @param status | 86 | * @param status |
| 85 | * @return | 87 | * @return |
| 86 | */ | 88 | */ |
| 87 | Integer updateHtzt(@Param("contractId") String contractId, @Param("status") String status); | 89 | Integer updateHtzt(@Param("contractId") String contractId, @Param("status") String status); |
| 90 | |||
| 91 | /** | ||
| 92 | * 获取单个待创建合同 | ||
| 93 | * @param ywh 业务号 | ||
| 94 | * @return | ||
| 95 | */ | ||
| 96 | List<ElecLicenseInfo> getOneContractIdIsNull(@Param("ywh") String ywh); | ||
| 88 | } | 97 | } | ... | ... |
| ... | @@ -36,18 +36,23 @@ public class CreateContractRest { | ... | @@ -36,18 +36,23 @@ public class CreateContractRest { |
| 36 | 36 | ||
| 37 | /** | 37 | /** |
| 38 | * 批量创建 | 38 | * 批量创建 |
| 39 | * | 39 | * @param ywh 如果有业务号就是单一,没有批量 |
| 40 | * @return | 40 | * @return |
| 41 | */ | 41 | */ |
| 42 | @Transactional(rollbackFor = Exception.class) | 42 | @Transactional(rollbackFor = Exception.class) |
| 43 | public void accessCreateContract() { | 43 | public void accessCreateContract(String ywh) { |
| 44 | 44 | ||
| 45 | String url = Global.ECI_HOST + CREATE_BY_CATEGORY; | 45 | String url = Global.ECI_HOST + CREATE_BY_CATEGORY; |
| 46 | logger.info("http request url:" + url); | 46 | logger.info("http request url:" + url); |
| 47 | 47 | ||
| 48 | // List<CreateContractRequest> requests = new ArrayList<>(); | 48 | List<ElecLicenseInfo> waitForCreateContracts; |
| 49 | |||
| 50 | if (ywh==null) { | ||
| 51 | waitForCreateContracts = licenseInfoDao.getContractIdIsNull(); | ||
| 52 | } else { | ||
| 53 | waitForCreateContracts = licenseInfoDao.getOneContractIdIsNull(ywh); | ||
| 54 | } | ||
| 49 | 55 | ||
| 50 | List<ElecLicenseInfo> waitForCreateContracts = licenseInfoDao.getContractIdIsNull(); | ||
| 51 | for (ElecLicenseInfo waitForCreateContract : waitForCreateContracts) { | 56 | for (ElecLicenseInfo waitForCreateContract : waitForCreateContracts) { |
| 52 | String result = null; | 57 | String result = null; |
| 53 | CreateContractRequest request = new CreateContractRequest(); | 58 | CreateContractRequest request = new CreateContractRequest(); | ... | ... |
| ... | @@ -77,4 +77,10 @@ | ... | @@ -77,4 +77,10 @@ |
| 77 | set HTZT=#{status,jdbcType=VARCHAR} | 77 | set HTZT=#{status,jdbcType=VARCHAR} |
| 78 | where CONTRACT_ID = #{contractId,jdbcType=VARCHAR} | 78 | where CONTRACT_ID = #{contractId,jdbcType=VARCHAR} |
| 79 | </update> | 79 | </update> |
| 80 | |||
| 81 | <select id="getOneContractIdIsNull" resultType="com.thinkgem.jeesite.modules.eci.entity.ElecLicenseInfo"> | ||
| 82 | select * | ||
| 83 | from ELEC_LICENSE_INFO | ||
| 84 | where CONTRACT_ID is null and YWH = #{ywh,jdbcType=VARCHAR} | ||
| 85 | </select> | ||
| 80 | </mapper> | 86 | </mapper> | ... | ... |
-
Please register or sign in to post a comment