ae02bd21 by 荆蔚杰

电子证照回调接口

1 parent 8f78e57c
package com.thinkgem.jeesite.modules.eci.Controller;
import com.thinkgem.jeesite.modules.eci.dao.ElecLicenseInfoDao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
@Controller
@ResponseBody
@RequestMapping("signed")
public class ContractStatusController {
private static Logger logger = LoggerFactory.getLogger(ContractStatusController.class);
@Autowired
ElecLicenseInfoDao licenseInfoDao;
@RequestMapping(method = RequestMethod.POST, value = "/received")
public void received(@RequestParam("contractId") String contractId,
@RequestParam(value = "tenantId", required = false) String tenantId,
@RequestParam(value = "tenantName", required = false) String tenantName,
@RequestParam(value = "sn", required = false) String sn,
@RequestParam("status") String status,
@RequestParam(value = "type", required = false) String type,
@RequestParam(value = "contact", required = false) String contact,
@RequestParam(value = "operatorName", required = false) String operatorName,
@RequestParam(value = "operatorMobile", required = false) String operatorMobile,
@RequestParam(value = "operatorNumber", required = false) String operatorNumber,
@RequestParam(value = "receiverNumber", required = false) String receiverNumber) {
logger.info("contractId=" + contractId, "status=" + status);
licenseInfoDao.updateHtzt(contractId, status);
}
}
......@@ -70,5 +70,19 @@ public interface ElecLicenseInfoDao extends CrudDao<ElecLicenseInfo> {
List<ElecLicenseInfo> selectZsbs(@Param("zsbs") String zsbs);
/**
* 更新转换后图片路径和状态
* @param jpgPath 图片路径
* @param bizId
* @return
*/
Integer updateJpgWjdzAndStatus(@Param("jpgPath") String jpgPath, @Param("bizId") String bizId);
/**
* 更新合同用印状态
* @param contractId
* @param status
* @return
*/
Integer updateHtzt(@Param("contractId") String contractId, @Param("status") String status);
}
......
package com.thinkgem.jeesite.modules.eci.entity;
import org.apache.poi.ss.formula.functions.T;
import java.io.Serializable;
import java.util.List;
/**
* 创建合同请求实体
*/
public class CreateContractRequest {
public class CreateContractRequest implements Serializable {
private static final long serialVersionUID = 1L;
/**
......
......@@ -160,7 +160,6 @@ public class EciHttpUtil {
if (length > 0) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dddd");
String dateDir = simpleDateFormat.format(new Date());
// File file = new File("E:\\ECI\\OFD\\" + dateDir + "\\" + documentId + ".ofd");
File savePath = new File("E:\\ECI\\OFD\\" + dateDir);
if (!savePath.exists()) {
savePath.mkdirs();
......@@ -174,8 +173,6 @@ public class EciHttpUtil {
byte[] buffer = new byte[4096];
int readLength = 0;
while ((readLength = in.read(buffer)) != -1) {
// byte[] bytes = new byte[readLength];
// System.arraycopy(buffer, 0, bytes, 0, readLength);
out.write(buffer, 0, readLength);
}
absolutePath = filePath.getAbsolutePath();
......
......@@ -71,4 +71,10 @@
SFZH = '1'
where BIZ_ID = #{bizId,jdbcType=VARCHAR}
</update>
<update id="updateHtzt">
update ELEC_LICENSE_INFO
set HTZT=#{status,jdbcType=VARCHAR}
where CONTRACT_ID = #{contractId,jdbcType=VARCHAR}
</update>
</mapper>
......
......@@ -14,6 +14,7 @@
<bean name="shiroFilterChainDefinitions" class="java.lang.String">
<constructor-arg>
<value>
/signed/received = anon
/static/** = anon
/userfiles/** = anon
${adminPath}/qrcode/QrCodeInterface/** = anon
......