0d30a434 by 夏齐

首次提交

1 parent e2ba1ee0
......@@ -13,6 +13,8 @@ public class ZhjTask {
@Autowired
private ZhjDatasSynService zhjDatasSynService;
//@Scheduled(cron="0 0 21 * * ? ")
public void execute() {
System.out.println("===========每天晚上九点定时任务进来了=========");
......@@ -20,4 +22,11 @@ public class ZhjTask {
System.out.println("===========每天晚上九点定时任务走了=========");
}
//@Scheduled(cron="0 0 21 * * ? ")
public void executeQyInfo() {
System.out.println("===========每天晚上九点定时任务进来了=========");
zhjDatasSynService.synQyInfo();
System.out.println("===========每天晚上九点定时任务走了=========");
}
}
......
......@@ -6,6 +6,7 @@ import com.pashanhoo.zhj.entity.SynZhjInfoDo;
import java.util.List;
import java.util.Map;
public interface SynZhjInfoMapper extends BaseMapper<SynZhjInfoDo> {
......@@ -17,4 +18,10 @@ public interface SynZhjInfoMapper extends BaseMapper<SynZhjInfoDo> {
void updateHqszt(String ywh);
List<Map> getQyBdcxx();
List<Map> getQymxfcdyxx();
}
......
......@@ -15,6 +15,12 @@ public interface ZhjDatasSynService extends IService<RegBusBdcqzsdjxxDo> {
public void synQSZTInfoByYwh(String ywh);
public void synQYBDCXX(String token);
public void qymxFcDyxx(String token);
public void synQyInfo();
}
......
......@@ -229,6 +229,9 @@ public class ZhjDatasSynServiceImpl extends ServiceImpl<RegBusBdcqzsdjxxMapper,
}
}
}
/**
* 给智慧局推送权属状态基本信息
* @param zsdjInfoList
......@@ -345,7 +348,76 @@ public class ZhjDatasSynServiceImpl extends ServiceImpl<RegBusBdcqzsdjxxMapper,
}
return code;
}
@Override
public void synQYBDCXX(String token) {
List<Map> list=synZhjInfoMapper.getQyBdcxx();
if(list!=null && list.size()>0){
for (int j = 0; j < list.size(); j++) {
Map map=list.get(j);
StringBuilder params = new StringBuilder();
params.append("?").append("QLRMC=").append(map.get("BDCDYH")).append("&")
.append("QLRZJH=").append(map.get("QLRZJH")).append("&")
.append("BDCQZSH=").append(map.get("BDCQZSH")).append("&")
.append("BDCDYH=").append(map.get("BDCDYH")).append("&")
.append("DJSJ=").append(map.get("DJSJ")).append("&")
.append("YT=").append(map.get("YT")).append("&")
.append("ZL=").append(map.get("ZL")).append("&")
.append("MJ=").append(map.get("MJ")).append("&")
.append("SYQX=").append(map.get("SYQX")).append("&")
.append("DJJG=").append(map.get("DJJG"));
String url1=zhjurl+"/dclp/hzapi/QYBDCXX"+params.toString();
doPostForNew(url1,"", token);
}
}
}
@Override
public void qymxFcDyxx(String token) {
List<Map> list=synZhjInfoMapper.getQymxfcdyxx();
if(list!=null && list.size()>0){
for (int j = 0; j < list.size(); j++) {
Map map=list.get(j);
StringBuilder params = new StringBuilder();
params.append("?").append("DYQR=").append(map.get("DYQR")).append("&")
.append("DYQRZJH=").append(map.get("DYQRZJH")).append("&")
.append("BDCDJZMH=").append(map.get("BDCDJZMH")).append("&")
.append("BDCDYH=").append(map.get("BDCDYH")).append("&")
.append("QLLX=").append(map.get("QLLX")).append("&")
.append("DYR=").append(map.get("DYR")).append("&")
.append("DYDJSJ=").append(map.get("DYDJSJ"));
String url1=zhjurl+"/dclp/hzapi/QYMXFCDYXX"+params.toString();
doPostForNew(url1,"", token);
}
}
}
@Override
public void synQyInfo() {
String url=zhjurl+"/dclp/hzapi/token?appKey="+appkey+"&appSecret="+appSecret;
Map map1=doGetForNew(url);
if(map1!=null && (Integer)map1.get("code")==200){
final Map map2= (Map) map1.get("data");
final String token= (String) map2.get("token");
//组装中小微企业基本信息
new Thread(new Runnable() {
@Override
public void run() {
System.out.println("===============当前线程是:"+Thread.currentThread().getName());
synQYBDCXX(token);
}
}).start();
//组装中小微企业抵押信息
new Thread(new Runnable() {
@Override
public void run() {
System.out.println("===============当前线程是:"+Thread.currentThread().getName());
qymxFcDyxx(token);
}
}).start();
}
}
}
......
server:
port: 8011
servlet:
session:
timeout: 43200
spring:
profiles:
active: @profile.active@
servlet:
multipart:
maxFileSize: 10MB
maxRequestSize: 10MB
application:
name: hzbdcsyn
jackson:
time-zone: GMT+8
date-format: yyyy-MM-dd HH:mm:ss
default-property-inclusion: always
datasource:
dynamic:
primary: master
datasource:
master:
url: jdbc:oracle:thin:@172.16.56.21:1521:orcl
driver-class-name: oracle.jdbc.driver.OracleDriver
username: regs
password: root1234
mybatis-plus:
mapper-locations: classpath:mapper/**/*.xml
typeAliasesPackage: com.pashanhoo
global-config:
#主键类型 0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
id-type: 2
#字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
field-strategy: 1
#驼峰下划线转换
db-column-underline: true
#刷新mapper 调试神器
refresh-mapper: true
#数据库大写下划线转换
#capital-mode: true
#序列接口实现类配置
#key-generator: com.baomidou.springboot.xxx
#逻辑删除配置
logic-delete-value: -1
logic-not-delete-0: 0
#自定义填充策略接口实现
#meta-object-handler: com.baomidou.springboot.xxx
#自定义SQL注入器
# sql-injector: com.baomidou.mybatisplus.mapper.LogicSqlInjector
configuration:
map-underscore-to-camel-case: true
cache-enabled: false
call-setters-on-nulls: true
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
app:
hostUrl: http://172.16.56.41:9182
bdcdjzmlc: 2890537670326468622
bdcqzslc: 2890537800123400234
AppToken: OAduCx5qJD
AppSecret: DifsZNwDnamuRh9jS0gSOTJFvmmKtT
management:
endpoints:
web:
exposure:
include: "*"
logging:
config: "classpath:logback-spring.xml"
......
......@@ -15,4 +15,56 @@
<update id="updateHqszt">
update syn_zhjinfo set HQS_STATE='1' where ywh=#{ywh}
</update>
<select id="getQyBdcxx" resultType="java.util.Map">
select b.qlrmc,
b.zjh as QLRZJH,
a.bdcqzh as BDCQZSH,
a.bdcdyh,
a.dbsj as djsj,
a.yt,
a.zl,
a.mj,
a.syqx,
'汉中市不动产登记局' as djjg
from reg_bus_bdcqzsdjxx a, reg_bus_qlr b
where (a.djlx = '302' or a.djlx = '305')
and a.del_flag = '0'
and a.islogout = '0'
and b.del_flag = '0'
and b.zjzl in ('7', '10')
and b.qszt = '1'
and a.ywh = b.ywh
and instr(a.ywh, 'LS') = 0
</select>
<select id="getQymxfcdyxx" resultType="java.util.Map">
select dyqr, DYQRZJH, bdcqzh as BDCDJZMH, bdcdyh, QLLX, DYR, DYDJSJ
from (select b.dyqr,
b.DYQRZJH,
a.bdcqzh,
a.bdcdyh,
(select label
from sys_dict
where value = a.qllx
and del_flag = '0'
and type = 'reg_bus_qllx') as QLLX,
b.DYR,
a.dbsj as DYDJSJ
from reg_bus_bdcqzsdjxx a,
(select a.ywh,
a.qlrmc as dyqr,
a.zjh as DYQRZJH,
b.qlrmc as DYR
from reg_bus_qlr a, reg_bus_ywr b
where a.del_flag = '0'
and a.qszt = '1'
and b.del_flag = '0'
and b.zjzl in ('7', '10')
and b.qszt = '1'
and a.ywh = b.ywh) b
where a.djlx in ('214', '215', '804')
and a.del_flag = '0'
and a.islogout = '0'
and a.ywh = b.ywh)
group by dyqr, DYQRZJH, bdcqzh, bdcdyh, QLLX, DYR, DYDJSJ
</select>
</mapper>
......