ae02bd21 by 荆蔚杰

电子证照回调接口

1 parent 8f78e57c
1 package com.thinkgem.jeesite.modules.eci.Controller;
2
3 import com.thinkgem.jeesite.modules.eci.dao.ElecLicenseInfoDao;
4 import org.slf4j.Logger;
5 import org.slf4j.LoggerFactory;
6 import org.springframework.beans.factory.annotation.Autowired;
7 import org.springframework.stereotype.Controller;
8 import org.springframework.web.bind.annotation.*;
9
10 @Controller
11 @ResponseBody
12 @RequestMapping("signed")
13 public class ContractStatusController {
14
15 private static Logger logger = LoggerFactory.getLogger(ContractStatusController.class);
16
17 @Autowired
18 ElecLicenseInfoDao licenseInfoDao;
19
20 @RequestMapping(method = RequestMethod.POST, value = "/received")
21 public void received(@RequestParam("contractId") String contractId,
22 @RequestParam(value = "tenantId", required = false) String tenantId,
23 @RequestParam(value = "tenantName", required = false) String tenantName,
24 @RequestParam(value = "sn", required = false) String sn,
25 @RequestParam("status") String status,
26 @RequestParam(value = "type", required = false) String type,
27 @RequestParam(value = "contact", required = false) String contact,
28 @RequestParam(value = "operatorName", required = false) String operatorName,
29 @RequestParam(value = "operatorMobile", required = false) String operatorMobile,
30 @RequestParam(value = "operatorNumber", required = false) String operatorNumber,
31 @RequestParam(value = "receiverNumber", required = false) String receiverNumber) {
32
33 logger.info("contractId=" + contractId, "status=" + status);
34 licenseInfoDao.updateHtzt(contractId, status);
35 }
36 }
...@@ -70,5 +70,19 @@ public interface ElecLicenseInfoDao extends CrudDao<ElecLicenseInfo> { ...@@ -70,5 +70,19 @@ public interface ElecLicenseInfoDao extends CrudDao<ElecLicenseInfo> {
70 70
71 List<ElecLicenseInfo> selectZsbs(@Param("zsbs") String zsbs); 71 List<ElecLicenseInfo> selectZsbs(@Param("zsbs") String zsbs);
72 72
73 /**
74 * 更新转换后图片路径和状态
75 * @param jpgPath 图片路径
76 * @param bizId
77 * @return
78 */
73 Integer updateJpgWjdzAndStatus(@Param("jpgPath") String jpgPath, @Param("bizId") String bizId); 79 Integer updateJpgWjdzAndStatus(@Param("jpgPath") String jpgPath, @Param("bizId") String bizId);
80
81 /**
82 * 更新合同用印状态
83 * @param contractId
84 * @param status
85 * @return
86 */
87 Integer updateHtzt(@Param("contractId") String contractId, @Param("status") String status);
74 } 88 }
......
1 package com.thinkgem.jeesite.modules.eci.entity; 1 package com.thinkgem.jeesite.modules.eci.entity;
2 2
3 import org.apache.poi.ss.formula.functions.T; 3 import java.io.Serializable;
4
5 import java.util.List; 4 import java.util.List;
6 5
7 /** 6 /**
8 * 创建合同请求实体 7 * 创建合同请求实体
9 */ 8 */
10 public class CreateContractRequest { 9 public class CreateContractRequest implements Serializable {
11 10
12 private static final long serialVersionUID = 1L; 11 private static final long serialVersionUID = 1L;
13 /** 12 /**
......
...@@ -160,7 +160,6 @@ public class EciHttpUtil { ...@@ -160,7 +160,6 @@ public class EciHttpUtil {
160 if (length > 0) { 160 if (length > 0) {
161 SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dddd"); 161 SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dddd");
162 String dateDir = simpleDateFormat.format(new Date()); 162 String dateDir = simpleDateFormat.format(new Date());
163 // File file = new File("E:\\ECI\\OFD\\" + dateDir + "\\" + documentId + ".ofd");
164 File savePath = new File("E:\\ECI\\OFD\\" + dateDir); 163 File savePath = new File("E:\\ECI\\OFD\\" + dateDir);
165 if (!savePath.exists()) { 164 if (!savePath.exists()) {
166 savePath.mkdirs(); 165 savePath.mkdirs();
...@@ -174,8 +173,6 @@ public class EciHttpUtil { ...@@ -174,8 +173,6 @@ public class EciHttpUtil {
174 byte[] buffer = new byte[4096]; 173 byte[] buffer = new byte[4096];
175 int readLength = 0; 174 int readLength = 0;
176 while ((readLength = in.read(buffer)) != -1) { 175 while ((readLength = in.read(buffer)) != -1) {
177 // byte[] bytes = new byte[readLength];
178 // System.arraycopy(buffer, 0, bytes, 0, readLength);
179 out.write(buffer, 0, readLength); 176 out.write(buffer, 0, readLength);
180 } 177 }
181 absolutePath = filePath.getAbsolutePath(); 178 absolutePath = filePath.getAbsolutePath();
......
...@@ -71,4 +71,10 @@ ...@@ -71,4 +71,10 @@
71 SFZH = '1' 71 SFZH = '1'
72 where BIZ_ID = #{bizId,jdbcType=VARCHAR} 72 where BIZ_ID = #{bizId,jdbcType=VARCHAR}
73 </update> 73 </update>
74
75 <update id="updateHtzt">
76 update ELEC_LICENSE_INFO
77 set HTZT=#{status,jdbcType=VARCHAR}
78 where CONTRACT_ID = #{contractId,jdbcType=VARCHAR}
79 </update>
74 </mapper> 80 </mapper>
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
14 <bean name="shiroFilterChainDefinitions" class="java.lang.String"> 14 <bean name="shiroFilterChainDefinitions" class="java.lang.String">
15 <constructor-arg> 15 <constructor-arg>
16 <value> 16 <value>
17 /signed/received = anon
17 /static/** = anon 18 /static/** = anon
18 /userfiles/** = anon 19 /userfiles/** = anon
19 ${adminPath}/qrcode/QrCodeInterface/** = anon 20 ${adminPath}/qrcode/QrCodeInterface/** = anon
......