739c76ab by 李希虎

定时任务创建电子证照

1 parent 93e0d54f
1 package com.thinkgem.jeesite.modules.eci.dao; 1 package com.thinkgem.jeesite.modules.eci.dao;
2 2
3 import com.thinkgem.jeesite.common.persistence.CrudDao; 3 import com.thinkgem.jeesite.common.persistence.CrudDao;
4 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
4 import com.thinkgem.jeesite.modules.eci.entity.ElecLicenseInfo; 5 import com.thinkgem.jeesite.modules.eci.entity.ElecLicenseInfo;
5 import org.apache.ibatis.annotations.Param; 6 import org.apache.ibatis.annotations.Param;
7 import org.springframework.stereotype.Repository;
6 8
9 import java.util.Collection;
7 import java.util.List; 10 import java.util.List;
11 import java.util.Map;
8 12
13 @MyBatisDao
9 public interface ElecLicenseInfoDao extends CrudDao<ElecLicenseInfo> { 14 public interface ElecLicenseInfoDao extends CrudDao<ElecLicenseInfo> {
10 15
11 /** 16 /**
...@@ -62,4 +67,5 @@ public interface ElecLicenseInfoDao extends CrudDao<ElecLicenseInfo> { ...@@ -62,4 +67,5 @@ public interface ElecLicenseInfoDao extends CrudDao<ElecLicenseInfo> {
62 List<ElecLicenseInfo> getWaitForConvert(); 67 List<ElecLicenseInfo> getWaitForConvert();
63 68
64 69
70 List<ElecLicenseInfo> selectZsbs(@Param("zsbs") String zsbs);
65 } 71 }
......
1 package com.thinkgem.jeesite.modules.eci.task;
2
3 import com.thinkgem.jeesite.common.utils.IdGen;
4 import com.thinkgem.jeesite.common.utils.JsonUtil;
5 import com.thinkgem.jeesite.modules.eci.dao.ElecLicenseInfoDao;
6 import com.thinkgem.jeesite.modules.eci.entity.ElecLicenseInfo;
7 import com.thinkgem.jeesite.modules.reg.dao.bus.RegBusBdcqzsdjxxDao;
8 import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusBdcqzsdjxx;
9 import com.thinkgem.jeesite.modules.reg.service.bus.RegBusBdcqzsdjxxService;
10 import org.json.JSONObject;
11 import org.slf4j.Logger;
12 import org.slf4j.LoggerFactory;
13 import org.springframework.beans.factory.annotation.Autowired;
14 import org.springframework.context.annotation.Lazy;
15 import org.springframework.stereotype.Component;
16
17 import java.util.HashMap;
18 import java.util.List;
19 import java.util.Map;
20
21 @Lazy(false)
22 @Component
23 public class CreateDzzz {
24
25
26 @Autowired
27 ElecLicenseInfoDao licenseInfoDao;
28
29 @Autowired
30 private RegBusBdcqzsdjxxService regBusBdcqzsdjxxService;
31
32 @Autowired
33 private RegBusBdcqzsdjxxDao regBusBdcqzsdjxxDao;
34
35
36 protected Logger logger = LoggerFactory.getLogger(super.getClass());
37
38 public synchronized void autoCreate() {
39 logger.info("数据汇总标志:");
40 System.out.println("566666666666666");
41
42 List<RegBusBdcqzsdjxx> reg = regBusBdcqzsdjxxService.selectDzzz("1", "0");
43 //setId(IdGen.uuid());
44 for(RegBusBdcqzsdjxx bdc : reg){
45 //todo 此处调用创建电子证照接口
46
47 ElecLicenseInfo eli = new ElecLicenseInfo();
48 eli.setBizId(IdGen.uuid());
49 eli.setYwh(bdc.getYwh());
50 eli.setZsbs(bdc.getId());
51 //模板参数入库
52 if(bdc.getBdcqzh().contains("证明")){
53 Map<String, Object> map = new HashMap<String, Object>();
54 map.put("ewm","imageBase64");
55 map.put("djsj",bdc.getDbsj());
56 map.put("bdczmh",bdc.getBdcqzh());
57 map.put("zmqlhsx","");
58 map.put("qlr",bdc.getQlrmc());
59 map.put("ywr","");
60 map.put("zl",bdc.getZl());
61 map.put("bdcdyh",bdc.getBdcdyh());
62 map.put("qt",bdc.getQlqtzk());
63 map.put("fj",bdc.getFj());
64 String param = JsonUtil.toJsonString(map);
65 eli.setDocumentParam(param);
66 }else{
67 Map<String, Object> map = new HashMap<String, Object>();
68 map.put("ewm","imageBase64");
69 map.put("djsj",bdc.getDbsj());
70 map.put("bdczmh",bdc.getBdcqzh());
71 map.put("zmqlhsx","");
72 map.put("qlr",bdc.getQlrmc());
73 map.put("ywr","");
74 map.put("bdcdyh",bdc.getBdcdyh());
75 map.put("qt",bdc.getQlqtzk());
76 map.put("fj",bdc.getFj());
77 map.put("gyqk",bdc.getGyqk());
78 map.put("zl",bdc.getZl());
79 map.put("qllx",bdc.getQllx());
80 map.put("qlxz",bdc.getQlxz());
81 map.put("yt",bdc.getYt());
82 map.put("mj",bdc.getMj());
83 map.put("syqx",bdc.getSyqx());
84 String param = JsonUtil.toJsonString(map);
85 eli.setDocumentParam(param);
86 }
87 if(licenseInfoDao.selectZsbs(bdc.getId()).size() == 0 ){
88 licenseInfoDao.insert(eli);
89 }
90
91 bdc.setIscjdzzz("1");
92 regBusBdcqzsdjxxDao.update(bdc);
93
94 }
95
96 }
97 }
...@@ -209,6 +209,8 @@ public interface RegBusBdcqzsdjxxDao extends CrudDao<RegBusBdcqzsdjxx> { ...@@ -209,6 +209,8 @@ public interface RegBusBdcqzsdjxxDao extends CrudDao<RegBusBdcqzsdjxx> {
209 public List<RegBusBdcqzsdjxx> findhttpList(RegBusBdcqzsdjxx regBusBdcqzsdjxx); 209 public List<RegBusBdcqzsdjxx> findhttpList(RegBusBdcqzsdjxx regBusBdcqzsdjxx);
210 //一窗受理接口系统查询最后一笔有效的房屋所有权查封信息 210 //一窗受理接口系统查询最后一笔有效的房屋所有权查封信息
211 public List<RegBusBdcqzsdjxx> findhttpCfdjxxList(RegBusBdcqzsdjxx regBusBdcqzsdjxx); 211 public List<RegBusBdcqzsdjxx> findhttpCfdjxxList(RegBusBdcqzsdjxx regBusBdcqzsdjxx);
212 //查询电子证照
213 public List<RegBusBdcqzsdjxx> selectDzzz(String isxydzzz, String iscjdzzz);
212 //查询农房入库数据 214 //查询农房入库数据
213 public Map<String, Object> selectNF(String cxrq, String cxrq2); 215 public Map<String, Object> selectNF(String cxrq, String cxrq2);
214 public Map<String, Object> selectFMJ1(String qsrq, String cxrq); 216 public Map<String, Object> selectFMJ1(String qsrq, String cxrq);
......
...@@ -65,6 +65,8 @@ public class RegBusBdcqzsdjxx extends DataEntity<RegBusBdcqzsdjxx> { ...@@ -65,6 +65,8 @@ public class RegBusBdcqzsdjxx extends DataEntity<RegBusBdcqzsdjxx> {
65 //private String yzbm; //邮政编码 65 //private String yzbm; //邮政编码
66 //private String spbbh; //审批表编号 66 //private String spbbh; //审批表编号
67 private String cfzt; //判断无效是否为查封引起 67 private String cfzt; //判断无效是否为查封引起
68 private String isxydzzz; //是否需要电子证照 0:否 1:是
69 private String iscjdzzz; //是否创建电子证照 0:否 1:是
68 public RegBusBdcqzsdjxx() { 70 public RegBusBdcqzsdjxx() {
69 super(); 71 super();
70 } 72 }
...@@ -435,4 +437,19 @@ public class RegBusBdcqzsdjxx extends DataEntity<RegBusBdcqzsdjxx> { ...@@ -435,4 +437,19 @@ public class RegBusBdcqzsdjxx extends DataEntity<RegBusBdcqzsdjxx> {
435 this.cfzt = cfzt; 437 this.cfzt = cfzt;
436 } 438 }
437 439
440 public String getIsxydzzz() {
441 return isxydzzz;
442 }
443
444 public void setIsxydzzz(String isxydzzz) {
445 this.isxydzzz = isxydzzz;
446 }
447
448 public String getIscjdzzz() {
449 return iscjdzzz;
450 }
451
452 public void setIscjdzzz(String iscjdzzz) {
453 this.iscjdzzz = iscjdzzz;
454 }
438 } 455 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -839,7 +839,11 @@ public class RegBusBdcqzsdjxxService extends CrudService<RegBusBdcqzsdjxxDao, Re ...@@ -839,7 +839,11 @@ public class RegBusBdcqzsdjxxService extends CrudService<RegBusBdcqzsdjxxDao, Re
839 public List<RegBusBdcqzsdjxx> findhttpCfdjxxList(RegBusBdcqzsdjxx regBusBdcqzsdjxx) { 839 public List<RegBusBdcqzsdjxx> findhttpCfdjxxList(RegBusBdcqzsdjxx regBusBdcqzsdjxx) {
840 return dao.findhttpCfdjxxList(regBusBdcqzsdjxx); 840 return dao.findhttpCfdjxxList(regBusBdcqzsdjxx);
841 } 841 }
842 842 //查询电子证照
843 public List<RegBusBdcqzsdjxx> selectDzzz(String isxydzzz, String iscjdzzz) {
844 // TODO Auto-generated method stub
845 return dao.selectDzzz(isxydzzz,iscjdzzz);
846 }
843 //查询农房入库数据 847 //查询农房入库数据
844 public Map<String, Object> selectNF(String qsrq, String cxrq) { 848 public Map<String, Object> selectNF(String qsrq, String cxrq) {
845 // TODO Auto-generated method stub 849 // TODO Auto-generated method stub
......
...@@ -40,6 +40,12 @@ ...@@ -40,6 +40,12 @@
40 and SFZH = '2' 40 and SFZH = '2'
41 </select> 41 </select>
42 42
43 <select id="selectZsbs" resultType="com.thinkgem.jeesite.modules.eci.entity.ElecLicenseInfo">
44 select *
45 from ELEC_LICENSE_INFO
46 where ZSBS = #{zsbs}
47 </select>
48
43 <update id="updateContractIdAndStatus"> 49 <update id="updateContractIdAndStatus">
44 update ELEC_LICENSE_INFO 50 update ELEC_LICENSE_INFO
45 set TJCS = #{waitForCreateContract.tjcs,jdbcType=VARCHAR}, 51 set TJCS = #{waitForCreateContract.tjcs,jdbcType=VARCHAR},
...@@ -49,4 +55,16 @@ ...@@ -49,4 +55,16 @@
49 SFZH=#{waitForCreateContract.sfzh,jdbcType=VARCHAR} 55 SFZH=#{waitForCreateContract.sfzh,jdbcType=VARCHAR}
50 where BIZ_ID = #{waitForCreateContract.bizId,jdbcType=VARCHAR} 56 where BIZ_ID = #{waitForCreateContract.bizId,jdbcType=VARCHAR}
51 </update> 57 </update>
58
59 <insert id="insert">
60 INSERT INTO ELEC_LICENSE_INFO(
61 BIZ_ID,YWH,HTLX,ZSBS,DOCUMENT_PARAM
62 ) VALUES (
63 #{bizId},
64 #{ywh},
65 #{htlx},
66 #{zsbs},
67 #{documentParam}
68 )
69 </insert>
52 </mapper> 70 </mapper>
......
...@@ -4529,7 +4529,9 @@ ...@@ -4529,7 +4529,9 @@
4529 update_by = #{updateBy.id}, 4529 update_by = #{updateBy.id},
4530 update_date = #{updateDate}, 4530 update_date = #{updateDate},
4531 remarks = #{remarks}, 4531 remarks = #{remarks},
4532 del_flag = #{delFlag} 4532 del_flag = #{delFlag},
4533 iscjdzzz = #{iscjdzzz},
4534 isxydzzz = #{isxydzzz}
4533 WHERE id = #{id} 4535 WHERE id = #{id}
4534 </update> 4536 </update>
4535 4537
...@@ -4985,6 +4987,9 @@ select ywh from reg_bus_slsq where ywh in (select ywh from reg_bus_bdcqzsdjxx dj ...@@ -4985,6 +4987,9 @@ select ywh from reg_bus_slsq where ywh in (select ywh from reg_bus_bdcqzsdjxx dj
4985 exists(select 1 from reg_bus_bdcqzsdjxx xx where xx.zddm = djxx.zddm and xx.ywh like '%LZ%')) and del_flag='0' and slsj &gt;= to_date(#{0},'yyyy/MM') and slsj &lt; add_months(to_date(#{1},'yyyy/MM'),1))) 4987 exists(select 1 from reg_bus_bdcqzsdjxx xx where xx.zddm = djxx.zddm and xx.ywh like '%LZ%')) and del_flag='0' and slsj &gt;= to_date(#{0},'yyyy/MM') and slsj &lt; add_months(to_date(#{1},'yyyy/MM'),1)))
4986 </select> 4988 </select>
4987 4989
4990 <select id="selectDzzz" resultType="com.thinkgem.jeesite.modules.reg.entity.bus.RegBusBdcqzsdjxx" parameterType="java.lang.String">
4991 select * from reg_bus_bdcqzsdjxx djxx where djxx.isxydzzz = #{0} and djxx.iscjdzzz = #{1}
4992 </select>
4988 4993
4989 <select id="queryIdent" resultType="Map" parameterType="java.lang.String"> 4994 <select id="queryIdent" resultType="Map" parameterType="java.lang.String">
4990 select djxx.bdcdyh,djxx.fzsj,djxx.ywh from reg_bus_bdcqzsdjxx djxx where djxx.bdcqzh like '%'||#{2}||'%'||#{3}||'%'||#{4}||'%' and substr(djxx.djlx,0,1) not in ('5','7','9') and djxx.del_flag='0' 4995 select djxx.bdcdyh,djxx.fzsj,djxx.ywh from reg_bus_bdcqzsdjxx djxx where djxx.bdcqzh like '%'||#{2}||'%'||#{3}||'%'||#{4}||'%' and substr(djxx.djlx,0,1) not in ('5','7','9') and djxx.del_flag='0'
......
...@@ -140,6 +140,12 @@ ...@@ -140,6 +140,12 @@
140 <task:scheduled ref="mainTask" method="autoCommitLog" cron="0 40 23 * * *" /> 140 <task:scheduled ref="mainTask" method="autoCommitLog" cron="0 40 23 * * *" />
141 </task:scheduled-tasks> 141 </task:scheduled-tasks>
142 142
143 <!-- 创建电子证照 start -->
144 <bean id="mainTask2" class="com.thinkgem.jeesite.modules.eci.task.CreateDzzz"></bean>
145
146 <task:scheduled-tasks>
147 <task:scheduled ref="mainTask2" method="autoCreate" cron="*/5 * * * * ?" />
148 </task:scheduled-tasks>
143 149
144 <!-- <task:scheduled-tasks> --> 150 <!-- <task:scheduled-tasks> -->
145 <!--这里表示的是每隔五秒(*/5 * * * * ?)做测试用 执行一次 如果有需要在下面依次添加task就可以--> 151 <!--这里表示的是每隔五秒(*/5 * * * * ?)做测试用 执行一次 如果有需要在下面依次添加task就可以-->
......