对接瑞信派基矛盾纠纷数据

master
luyya 2024-07-18 09:32:02 +08:00
parent 8aee7e598d
commit fc59e76c66
19 changed files with 164 additions and 15 deletions

View File

@ -259,7 +259,7 @@ public class ShiroConfig
public RedisManager redisManager(RedisProperties redisProperties) {
RedisManager redisManager = new RedisManager();
redisManager.setHost("127.0.0.1:6379");
//redisManager.setHost("53.1.252.179:6389");
// redisManager.setHost("53.1.252.179:6389");
/*redisManager.setPort(6389);
redisManager.setHost("53.1.252.179");*/
//redisManager.setPassword(redisProperties.getPassword());

View File

@ -2,6 +2,7 @@ package basepro.manager.mapper;
import basepro.manager.pojo.TbMdjfjxxxb;
import java.util.Date;
import java.util.List;
/**
@ -59,4 +60,9 @@ public interface TbMdjfjxxxbMapper
* @return
*/
public int deleteTbMdjfjxxxbByIds(String[] mdjfbhs);
public Date selectMaxJlsj();
public List<TbMdjfjxxxb> selectMdjfList(String jlgxsj);
}

View File

@ -61,4 +61,6 @@ public interface TbXjxdzhxxbMapper
public int deleteTbXjxdzhxxbByIds(String[] Ids);
public TbXjxdzhxxb selectCountBySj(TbXjxdzhxxb xjxdzhxxb);
public TbXjxdzhxxb getMdjfTj(TbXjxdzhxxb xjxdzhxxb);
}

View File

@ -56,9 +56,9 @@
</select>
<select id="getCheckStatistics" parameterType="basepro.manager.pojo.RoadCheckStatistics" resultMap="RoadResult">
SELECT SUM(all_people_count) people_count, SUM(unusual_people_count) unusual_people_count,SUM(all_car_count) car_count,
SUM(all_things_count) goods_count,SUM(unusual_car_count) unusual_car_count,SUM(commit_car_count) commit_car_count,
SUM(commit_people_count) commit_people_count,ptype
SELECT all_people_count people_count, unusual_people_count,all_car_count car_count,
all_things_count goods_count, unusual_car_count, commit_car_count,
commit_people_count commit_people_count,ptype
FROM tb_task_statistics WHERE task_id is not null
<if test="kkid != null ">
and kkid = #{kkid}

View File

@ -69,6 +69,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="selectMaxJlsj" resultType="java.util.Date" >
select max(JLGXSJ) from tb_mdjfjxxxb
</select>
<select id="selectMdjfList" parameterType="String" resultMap="TbMdjfjxxxbResult">
select MDJFBH, FSSJ, XZQHDM, XZQHMC, FSDZ, MDJFLY, TBDWMC, MDJFLX, MDJFJS, MDJFCD, DSR_SFZHM, DJR_SFZHM, DJSJ,
ZRDWDM, ZRDWMC, TCSJ, TCJCJS TCGCJS, TCJG, JLGXSJ from AH_MDJF_VIEW
where JLGXSJ > TO_DATE(#{jlgxsj}, 'YYYY-MM-DD HH24:MI:SS')
</select>
<select id="selectTbMdjfjxxxbById" parameterType="String" resultMap="TbMdjfjxxxbResult">
<include refid="selectTbMdjfjxxxbVo"/>
where MDJFBH = #{MDJFBH}

View File

@ -265,6 +265,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{Id}
</update>
<select id="getMdjfTj" parameterType="basepro.manager.pojo.TbXjxdzhxxb" resultMap="TbXjxdzhxxbResult" >
select PCMDJFSL, HJMDJFSL, HLJTJFSL, HJHLJTJFSL, LLJFSL, HJLLJFSL, JJFSL JJJFSL, HJJJJFSL, YLJFSL, HJYLJFSL
from AH_MDJF_TJ_VIEW
<where>
<if test="GAJGDM != null and GAJGDM != ''">
and jgdm = #{GAJGDM}
</if>
<if test="ZAFKRQ != null "> and tjsj = TO_DATE(#{ZAFKRQ}, 'yyyy-mm-dd') </if>
</where>
</select>
<delete id="deleteTbXjxdzhxxbById" parameterType="Long">
delete from tb_xjxdzhxxb where id = #{Id}
</delete>

View File

@ -3,6 +3,7 @@ package basepro.manager.service;
import basepro.manager.pojo.TbMdjfjxxxb;
import guo.ping.e3mall.common.page.TableDataInfo;
import java.util.Date;
import java.util.List;
/**
@ -40,6 +41,8 @@ public interface ITbMdjfjxxxbService
public int insertTbMdjfjxxxbGs(TbMdjfjxxxb tbMdjfjxxxb);
public int insertOrUpdate(List<TbMdjfjxxxb> mdjfjxxxbList);
/**
*
*
@ -64,4 +67,8 @@ public interface ITbMdjfjxxxbService
* @return
*/
public int deleteTbMdjfjxxxbById(String mdjfbh);
public Date selectMaxJlsj();
public List<TbMdjfjxxxb> selectMdjfList(String jlgxsj);
}

View File

@ -1,5 +1,6 @@
package basepro.manager.service;
import basepro.manager.pojo.SysDeptXzqh;
import basepro.manager.pojo.TbXjxdzhxxb;
import guo.ping.e3mall.common.page.TableDataInfo;
@ -70,4 +71,6 @@ public interface ITbXjxdzhxxbService
public TbXjxdzhxxb getNumByPctj(String manageDeptId, String date);
public List<TbXjxdzhxxb> xjxdStatics(TbXjxdzhxxb xjxdzhxxb);
public SysDeptXzqh selectSysDeptXzqhById(String DeptId);
}

View File

@ -150,6 +150,14 @@
<version>8.3.0</version>
</dependency>
<!-- oracle驱动-->
<!-- https://mvnrepository.com/artifact/com.oracle.database.jdbc/ojdbc8 -->
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>12.2.0.1</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>

View File

@ -36,6 +36,12 @@ public class DataSourceConfig {
return DataSourceBuilder.create().build();
}
@Bean(name = "db3")
@ConfigurationProperties(prefix = "spring.datasource.druid.db3")
public DataSource dataSourceThr() {
return DataSourceBuilder.create().build();
}
/**
* : AOP
@ -51,7 +57,7 @@ public class DataSourceConfig {
Map<Object, Object> dsMap = new HashMap<>();
dsMap.put("db1", dataSourceOne());
dsMap.put("db2", dataSourceTwo());
dsMap.put("db3", dataSourceThr());
dynamicDataSource.setTargetDataSources(dsMap);
return dynamicDataSource;
}

View File

@ -4,7 +4,9 @@ import java.util.Date;
import java.util.List;
import basepro.manager.config.DataSourceUtil;
import basepro.manager.mapper.SysDeptXzqhMapper;
import basepro.manager.mapper.TbChryxxbMapper;
import basepro.manager.pojo.SysDeptXzqh;
import basepro.manager.pojo.TbChryxxb;
import basepro.manager.service.ITbChryxxbService;
import com.github.pagehelper.PageHelper;
@ -27,6 +29,9 @@ public class TbChryxxbServiceImpl implements ITbChryxxbService
@Autowired
private TbChryxxbMapper tbChryxxbMapper;
@Autowired
private SysDeptXzqhMapper xzqhMapper;
/**
*
*
@ -79,6 +84,7 @@ public class TbChryxxbServiceImpl implements ITbChryxxbService
@Override
public int insertTbChryxxb(TbChryxxb tbChryxxb)
{
return tbChryxxbMapper.insertTbChryxxb(tbChryxxb);
}

View File

@ -1,5 +1,6 @@
package basepro.manager.service.impl;
import java.util.Date;
import java.util.List;
import java.util.UUID;
@ -94,6 +95,19 @@ public class TbMdjfjxxxbServiceImpl implements ITbMdjfjxxxbService
return tbMdjfjxxxbMapper.insertTbMdjfjxxxb(tbMdjfjxxxb);
}
@Override
public int insertOrUpdate(List<TbMdjfjxxxb> mdjfjxxxbList) {
for (TbMdjfjxxxb mdjfjxxxb : mdjfjxxxbList) {
TbMdjfjxxxb newMdjf = tbMdjfjxxxbMapper.selectTbMdjfjxxxbById(mdjfjxxxb.getMdjfbh());
if (null != newMdjf){
tbMdjfjxxxbMapper.updateTbMdjfjxxxb(mdjfjxxxb);
}else {
tbMdjfjxxxbMapper.insertTbMdjfjxxxb(mdjfjxxxb);
}
}
return 1;
}
/**
*
*
@ -152,4 +166,15 @@ public class TbMdjfjxxxbServiceImpl implements ITbMdjfjxxxbService
{
return tbMdjfjxxxbMapper.deleteTbMdjfjxxxbById(mdjfbh);
}
@Override
public Date selectMaxJlsj() {
return tbMdjfjxxxbMapper.selectMaxJlsj();
}
@Override
public List<TbMdjfjxxxb> selectMdjfList(String jlgxsj) {
DataSourceUtil.setDB("db3");
return tbMdjfjxxxbMapper.selectMdjfList(jlgxsj);
}
}

View File

@ -209,6 +209,34 @@ public class TbXjxdzhxxbServiceImpl implements ITbXjxdzhxxbService
xjxd.setXZQHDM(xzqh.getXzqhdm());
xjxd.setXZQHMC(xzqh.getXzqhmc());
}
TbXjxdzhxxb mdjfpara = new TbXjxdzhxxb();
mdjfpara.setGAJGDM(manageDeptId);
mdjfpara.setZAFKRQ(DateUtils.parseDate(date));
DataSourceUtil.setDB("db3");
TbXjxdzhxxb mdjf = tbXjxdzhxxbMapper.getMdjfTj(mdjfpara);
if (null != mdjf){
xjxd.setPCMDJFSL(mdjf.getPCMDJFSL());
xjxd.setHJMDJFSL(mdjf.getHJMDJFSL());
xjxd.setHLJTJFSL(mdjf.getHLJTJFSL());
xjxd.setHJHLJTJFSL(mdjf.getHJHLJTJFSL());
xjxd.setLLJFSL(mdjf.getLLJFSL());
xjxd.setHJLLJFSL(mdjf.getHJLLJFSL());
xjxd.setJJJFSL(mdjf.getJJJFSL());
xjxd.setHJJJJFSL(mdjf.getHJJJJFSL());
xjxd.setYLJFSL(mdjf.getYLJFSL());
xjxd.setHJYLJFSL(mdjf.getHJYLJFSL());
}else {
xjxd.setPCMDJFSL(0L);
xjxd.setHJMDJFSL(0L);
xjxd.setHLJTJFSL(0L);
xjxd.setHJHLJTJFSL(0L);
xjxd.setLLJFSL(0L);
xjxd.setHJLLJFSL(0L);
xjxd.setJJJFSL(0L);
xjxd.setHJJJJFSL(0L);
xjxd.setYLJFSL(0L);
xjxd.setHJYLJFSL(0L);
}
return xjxd;
}
@ -227,4 +255,9 @@ public class TbXjxdzhxxbServiceImpl implements ITbXjxdzhxxbService
}
return xjxdzhxxbList;
}
@Override
public SysDeptXzqh selectSysDeptXzqhById(String DeptId) {
return xzqhMapper.selectSysDeptXzqhById(DeptId);
}
}

View File

@ -18,6 +18,11 @@ spring:
password: Ycgis!2509
jdbc-url: jdbc:postgresql://192.168.0.168:5432/sjzl?currentSchema=public&useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
driver-class-name: org.postgresql.Driver
db3:
username: hsmj
password: hsmj
jdbc-url: jdbc:oracle:thin:@localhost:1521/orcl
driver-class-name: oracle.jdbc.driver.OracleDriver
# type: com.alibaba.druid.pool.DruidDataSource
devtools:

View File

@ -15,8 +15,13 @@ spring:
db2:
username: ahrs
password: Ycgis!2509
jdbc-url: jdbc:postgresql://53.1.213.131:25380/st_zazdr?currentSchema=public&useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
jdbc-url: jdbc:postgresql://53.1.213.131:25308/st_zazdr?currentSchema=public&useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
driver-class-name: org.postgresql.Driver
db3:
username: gab
password: gab2024
jdbc-url: jdbc:oracle:thin:@10.124.42.152:1521/pjxt
driver-class-name: oracle.jdbc.driver.OracleDriver
# type: com.alibaba.druid.pool.DruidDataSource
devtools:
restart:
@ -66,15 +71,15 @@ dubbo:
name: basepro-manager
registry:
address: zookeeper://53.1.252.35:2181?backup=53.1.252.179:2181,53.1.252.187:2181
timeout: 10000
timeout: 30000
scan:
basePackages: basepro.manager.service
protocol:
port: 20880
provider:
timeout: 10000
timeout: 30000
consumer:
timeout: 10000
timeout: 30000
#fastdfs 图片地址
imgUrl: http://53.1.252.187:8086/

View File

@ -1,8 +1,10 @@
package basepro.manager.controller;
import basepro.manager.pojo.SysDeptXzqh;
import basepro.manager.pojo.TbChryxxb;
import basepro.manager.service.ISysDictDataService;
import basepro.manager.service.ITbChryxxbService;
import basepro.manager.service.ITbXjxdzhxxbService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@ -22,6 +24,9 @@ public class InsertChryTask {
@Reference
private ISysDictDataService sysDictDataService;
@Reference
private ITbXjxdzhxxbService xjxdzhxxbService;
@Scheduled(cron = "4 11/5 * ? * *") // 每5分钟执行一次
// @Scheduled(cron = "0 0 1 * * ?") // 每天凌晨1点执行异一次
public void executeEveryMinute() {
@ -36,8 +41,13 @@ public class InsertChryTask {
for (TbChryxxb tbChryxxb : chryxxbList) {
String uuid = UUID.randomUUID().toString();
tbChryxxb.setId(uuid);
String xzqhmc = sysDictDataService.selectDictLabel("anhui_code", tbChryxxb.getXZQHDM());
tbChryxxb.setXZQHMC(xzqhmc);
SysDeptXzqh xzqh = xjxdzhxxbService.selectSysDeptXzqhById(tbChryxxb.getGAJGDM());
if (null != xzqh){
tbChryxxb.setXZQHDM(xzqh.getXzqhdm());
tbChryxxb.setXZQHMC(xzqh.getXzqhmc());
}
// String xzqhmc = sysDictDataService.selectDictLabel("anhui_code", tbChryxxb.getXZQHDM());
// tbChryxxb.setXZQHMC(xzqhmc);
tbChryxxbService.insertTbChryxxb(tbChryxxb);
tbChryxxbService.insertTbChryxxbGs(tbChryxxb);
}

View File

@ -83,7 +83,7 @@ LoginController extends BaseController {
@RequestMapping("/index")
public String index(ModelMap mmap){
SysUser sysUser = userService.selectUserByLoginName("admin");
SysUser sysUser = ShiroUtils.getSysUser();
boolean rememberMe = false;
UsernamePasswordToken token = new UsernamePasswordToken(sysUser.getPoliceId(), sysUser.getPassword(), rememberMe);
Subject subject = SecurityUtils.getSubject();

View File

@ -1,9 +1,11 @@
package basepro.manager.controller;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import basepro.manager.common.annotation.DataScope;
import basepro.manager.common.utils.DateUtils;
import basepro.manager.common.utils.poi.ExcelUtil;
import basepro.manager.pojo.TbMdjfjxxxb;
import basepro.manager.service.ITbMdjfjxxxbService;
@ -13,6 +15,7 @@ import guo.ping.e3mall.common.page.PageDomain;
import guo.ping.e3mall.common.page.TableSupport;
import guo.ping.e3mall.common.pojo.AjaxResult;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
@ -135,4 +138,13 @@ public class TbMdjfjxxxbController extends BaseController
{
return toAjax(tbMdjfjxxxbService.deleteTbMdjfjxxxbByIds(ids));
}
@Scheduled(cron = "4 11/5 * ? * *")
public void mdjfDataScheduled(){
Date exDate = tbMdjfjxxxbService.selectMaxJlsj();
List<TbMdjfjxxxb> mdjfjxxxbList = tbMdjfjxxxbService.selectMdjfList(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",exDate));
tbMdjfjxxxbService.insertOrUpdate(mdjfjxxxbList);
}
}

View File

@ -19,11 +19,11 @@ dubbo:
name: basepro-manager-web
registry:
address: zookeeper://53.1.252.35:2181?backup=53.1.252.179:2181,53.1.252.187:2181
timeout: 10000
timeout: 30000
consumer:
timeout: 10000
timeout: 30000
provider:
timeout: 10000
timeout: 30000
spring:
servlet:
multipart: