0d30a434 by 夏齐

首次提交

1 parent e2ba1ee0
...@@ -13,6 +13,8 @@ public class ZhjTask { ...@@ -13,6 +13,8 @@ public class ZhjTask {
13 13
14 @Autowired 14 @Autowired
15 private ZhjDatasSynService zhjDatasSynService; 15 private ZhjDatasSynService zhjDatasSynService;
16
17
16 //@Scheduled(cron="0 0 21 * * ? ") 18 //@Scheduled(cron="0 0 21 * * ? ")
17 public void execute() { 19 public void execute() {
18 System.out.println("===========每天晚上九点定时任务进来了========="); 20 System.out.println("===========每天晚上九点定时任务进来了=========");
...@@ -20,4 +22,11 @@ public class ZhjTask { ...@@ -20,4 +22,11 @@ public class ZhjTask {
20 System.out.println("===========每天晚上九点定时任务走了========="); 22 System.out.println("===========每天晚上九点定时任务走了=========");
21 } 23 }
22 24
25 //@Scheduled(cron="0 0 21 * * ? ")
26 public void executeQyInfo() {
27 System.out.println("===========每天晚上九点定时任务进来了=========");
28 zhjDatasSynService.synQyInfo();
29 System.out.println("===========每天晚上九点定时任务走了=========");
30 }
31
23 } 32 }
......
...@@ -6,6 +6,7 @@ import com.pashanhoo.zhj.entity.SynZhjInfoDo; ...@@ -6,6 +6,7 @@ import com.pashanhoo.zhj.entity.SynZhjInfoDo;
6 6
7 7
8 import java.util.List; 8 import java.util.List;
9 import java.util.Map;
9 10
10 public interface SynZhjInfoMapper extends BaseMapper<SynZhjInfoDo> { 11 public interface SynZhjInfoMapper extends BaseMapper<SynZhjInfoDo> {
11 12
...@@ -17,4 +18,10 @@ public interface SynZhjInfoMapper extends BaseMapper<SynZhjInfoDo> { ...@@ -17,4 +18,10 @@ public interface SynZhjInfoMapper extends BaseMapper<SynZhjInfoDo> {
17 18
18 void updateHqszt(String ywh); 19 void updateHqszt(String ywh);
19 20
21 List<Map> getQyBdcxx();
22
23 List<Map> getQymxfcdyxx();
24
25
26
20 } 27 }
......
...@@ -15,6 +15,12 @@ public interface ZhjDatasSynService extends IService<RegBusBdcqzsdjxxDo> { ...@@ -15,6 +15,12 @@ public interface ZhjDatasSynService extends IService<RegBusBdcqzsdjxxDo> {
15 15
16 public void synQSZTInfoByYwh(String ywh); 16 public void synQSZTInfoByYwh(String ywh);
17 17
18 public void synQYBDCXX(String token);
19
20 public void qymxFcDyxx(String token);
21
22 public void synQyInfo();
23
18 24
19 25
20 } 26 }
......
...@@ -229,6 +229,9 @@ public class ZhjDatasSynServiceImpl extends ServiceImpl<RegBusBdcqzsdjxxMapper, ...@@ -229,6 +229,9 @@ public class ZhjDatasSynServiceImpl extends ServiceImpl<RegBusBdcqzsdjxxMapper,
229 } 229 }
230 } 230 }
231 } 231 }
232
233
234
232 /** 235 /**
233 * 给智慧局推送权属状态基本信息 236 * 给智慧局推送权属状态基本信息
234 * @param zsdjInfoList 237 * @param zsdjInfoList
...@@ -345,7 +348,76 @@ public class ZhjDatasSynServiceImpl extends ServiceImpl<RegBusBdcqzsdjxxMapper, ...@@ -345,7 +348,76 @@ public class ZhjDatasSynServiceImpl extends ServiceImpl<RegBusBdcqzsdjxxMapper,
345 } 348 }
346 return code; 349 return code;
347 } 350 }
351 @Override
352 public void synQYBDCXX(String token) {
353 List<Map> list=synZhjInfoMapper.getQyBdcxx();
354 if(list!=null && list.size()>0){
355 for (int j = 0; j < list.size(); j++) {
356 Map map=list.get(j);
357 StringBuilder params = new StringBuilder();
358 params.append("?").append("QLRMC=").append(map.get("BDCDYH")).append("&")
359 .append("QLRZJH=").append(map.get("QLRZJH")).append("&")
360 .append("BDCQZSH=").append(map.get("BDCQZSH")).append("&")
361 .append("BDCDYH=").append(map.get("BDCDYH")).append("&")
362 .append("DJSJ=").append(map.get("DJSJ")).append("&")
363 .append("YT=").append(map.get("YT")).append("&")
364 .append("ZL=").append(map.get("ZL")).append("&")
365 .append("MJ=").append(map.get("MJ")).append("&")
366 .append("SYQX=").append(map.get("SYQX")).append("&")
367 .append("DJJG=").append(map.get("DJJG"));
368 String url1=zhjurl+"/dclp/hzapi/QYBDCXX"+params.toString();
369 doPostForNew(url1,"", token);
370 }
371 }
372 }
373
374 @Override
375 public void qymxFcDyxx(String token) {
376 List<Map> list=synZhjInfoMapper.getQymxfcdyxx();
377 if(list!=null && list.size()>0){
378 for (int j = 0; j < list.size(); j++) {
379 Map map=list.get(j);
380 StringBuilder params = new StringBuilder();
381 params.append("?").append("DYQR=").append(map.get("DYQR")).append("&")
382 .append("DYQRZJH=").append(map.get("DYQRZJH")).append("&")
383 .append("BDCDJZMH=").append(map.get("BDCDJZMH")).append("&")
384 .append("BDCDYH=").append(map.get("BDCDYH")).append("&")
385 .append("QLLX=").append(map.get("QLLX")).append("&")
386 .append("DYR=").append(map.get("DYR")).append("&")
387 .append("DYDJSJ=").append(map.get("DYDJSJ"));
388 String url1=zhjurl+"/dclp/hzapi/QYMXFCDYXX"+params.toString();
389 doPostForNew(url1,"", token);
390 }
391 }
392 }
393
394 @Override
395 public void synQyInfo() {
396 String url=zhjurl+"/dclp/hzapi/token?appKey="+appkey+"&appSecret="+appSecret;
397 Map map1=doGetForNew(url);
398 if(map1!=null && (Integer)map1.get("code")==200){
399 final Map map2= (Map) map1.get("data");
400 final String token= (String) map2.get("token");
401 //组装中小微企业基本信息
402 new Thread(new Runnable() {
403 @Override
404 public void run() {
405 System.out.println("===============当前线程是:"+Thread.currentThread().getName());
406 synQYBDCXX(token);
407 }
408 }).start();
409
410 //组装中小微企业抵押信息
411 new Thread(new Runnable() {
412 @Override
413 public void run() {
414 System.out.println("===============当前线程是:"+Thread.currentThread().getName());
415 qymxFcDyxx(token);
416 }
417 }).start();
348 418
419 }
420 }
349 421
350 422
351 } 423 }
......
1 server:
2 port: 8011
3 servlet:
4 session:
5 timeout: 43200
6
1 spring: 7 spring:
2 profiles: 8 servlet:
3 active: @profile.active@ 9 multipart:
10 maxFileSize: 10MB
11 maxRequestSize: 10MB
12 application:
13 name: hzbdcsyn
14 jackson:
15 time-zone: GMT+8
16 date-format: yyyy-MM-dd HH:mm:ss
17 default-property-inclusion: always
18 datasource:
19 dynamic:
20 primary: master
21 datasource:
22 master:
23 url: jdbc:oracle:thin:@172.16.56.21:1521:orcl
24 driver-class-name: oracle.jdbc.driver.OracleDriver
25 username: regs
26 password: root1234
27
28 mybatis-plus:
29 mapper-locations: classpath:mapper/**/*.xml
30 typeAliasesPackage: com.pashanhoo
31 global-config:
32 #主键类型 0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
33 id-type: 2
34 #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
35 field-strategy: 1
36 #驼峰下划线转换
37 db-column-underline: true
38 #刷新mapper 调试神器
39 refresh-mapper: true
40 #数据库大写下划线转换
41 #capital-mode: true
42 #序列接口实现类配置
43 #key-generator: com.baomidou.springboot.xxx
44 #逻辑删除配置
45 logic-delete-value: -1
46 logic-not-delete-0: 0
47 #自定义填充策略接口实现
48 #meta-object-handler: com.baomidou.springboot.xxx
49 #自定义SQL注入器
50 # sql-injector: com.baomidou.mybatisplus.mapper.LogicSqlInjector
51 configuration:
52 map-underscore-to-camel-case: true
53 cache-enabled: false
54 call-setters-on-nulls: true
55 log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
56 app:
57 hostUrl: http://172.16.56.41:9182
58 bdcdjzmlc: 2890537670326468622
59 bdcqzslc: 2890537800123400234
60 AppToken: OAduCx5qJD
61 AppSecret: DifsZNwDnamuRh9jS0gSOTJFvmmKtT
62
63
64 management:
65 endpoints:
66 web:
67 exposure:
68 include: "*"
69
70 logging:
71 config: "classpath:logback-spring.xml"
72
73
......
...@@ -15,4 +15,56 @@ ...@@ -15,4 +15,56 @@
15 <update id="updateHqszt"> 15 <update id="updateHqszt">
16 update syn_zhjinfo set HQS_STATE='1' where ywh=#{ywh} 16 update syn_zhjinfo set HQS_STATE='1' where ywh=#{ywh}
17 </update> 17 </update>
18 <select id="getQyBdcxx" resultType="java.util.Map">
19 select b.qlrmc,
20 b.zjh as QLRZJH,
21 a.bdcqzh as BDCQZSH,
22 a.bdcdyh,
23 a.dbsj as djsj,
24 a.yt,
25 a.zl,
26 a.mj,
27 a.syqx,
28 '汉中市不动产登记局' as djjg
29 from reg_bus_bdcqzsdjxx a, reg_bus_qlr b
30 where (a.djlx = '302' or a.djlx = '305')
31 and a.del_flag = '0'
32 and a.islogout = '0'
33 and b.del_flag = '0'
34 and b.zjzl in ('7', '10')
35 and b.qszt = '1'
36 and a.ywh = b.ywh
37 and instr(a.ywh, 'LS') = 0
38 </select>
39 <select id="getQymxfcdyxx" resultType="java.util.Map">
40 select dyqr, DYQRZJH, bdcqzh as BDCDJZMH, bdcdyh, QLLX, DYR, DYDJSJ
41 from (select b.dyqr,
42 b.DYQRZJH,
43 a.bdcqzh,
44 a.bdcdyh,
45 (select label
46 from sys_dict
47 where value = a.qllx
48 and del_flag = '0'
49 and type = 'reg_bus_qllx') as QLLX,
50 b.DYR,
51 a.dbsj as DYDJSJ
52 from reg_bus_bdcqzsdjxx a,
53 (select a.ywh,
54 a.qlrmc as dyqr,
55 a.zjh as DYQRZJH,
56 b.qlrmc as DYR
57 from reg_bus_qlr a, reg_bus_ywr b
58 where a.del_flag = '0'
59 and a.qszt = '1'
60 and b.del_flag = '0'
61 and b.zjzl in ('7', '10')
62 and b.qszt = '1'
63 and a.ywh = b.ywh) b
64 where a.djlx in ('214', '215', '804')
65 and a.del_flag = '0'
66 and a.islogout = '0'
67 and a.ywh = b.ywh)
68 group by dyqr, DYQRZJH, bdcqzh, bdcdyh, QLLX, DYR, DYDJSJ
69 </select>
18 </mapper> 70 </mapper>
......