王队让后加的重点人员

develop
Angel 10 months ago
parent 1ca86f15b2
commit 007af4810f

@ -0,0 +1,314 @@
package com.ssf.mysqloracletest.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
/**
* ?ص???Ԥ??ģ????Ϣ?
* @TableName meta_imp_user_model_info
*/
@TableName(value ="meta_imp_user_model_info")
@Data
public class MetaImpUserModelInfo implements Serializable {
/**
* ????
*/
@TableId(type = IdType.AUTO)
private Long id;
private String warning_id;
/**
* ??̬??Ϣ???
*/
private Integer dataType;
/**
* ?ص???С?
*/
private String impUserSubType;
/**
* ?ص???????
*/
private String impUserName;
/**
* ?ص???????֤
*/
private String impUserIdCard;
/**
* ????????????
*/
private BigDecimal longitude;
/**
* ?????????γ?
*/
private BigDecimal latitude;
/**
* ?????ʱ?
*/
private String activityTime;
/**
* ????????????
*/
private String activityDeviceAddress;
/**
* ????????????
*/
private String activityDeviceCode;
/**
* ??????????????????????
*/
private String activityPoliceStationCode;
/**
* ??????????????????????
*/
private String activityPoliceStationName;
/**
* ???????Ϣ
*/
private String activityMessage;
/**
* Ԥ???????
*/
private String signPoliceman;
/**
* Ԥ??????????????֤
*/
private String signPolicemanIdCard;
/**
* ǩ??״̬
*/
private Integer signStatus;
/**
* ????״̬
*/
private Integer disposalStatus;
/**
* Ԥ?????յ?λ
*/
private String signPoliceStation;
/**
* Ԥ?????յ?λ???
*/
private String signPoliceCode;
/**
* Ԥ??ʱ?
*/
private String warningTime;
/**
* ?Ƿ??ص???λ
*/
private String isImpAddress;
/**
* ??ֵ1
*/
private String key1;
/**
* ????1
*/
private String value1;
/**
* ??ֵ2
*/
private String key2;
/**
* ????2
*/
private String value2;
/**
* ??ֵ3
*/
private String key3;
/**
* ????3
*/
private String value3;
/**
* ??ֵ4
*/
private String key4;
/**
* ????4
*/
private String value4;
/**
* ??ֵ5
*/
private String key5;
/**
* ????5
*/
private String value5;
/**
* ??ֵ6
*/
private String key6;
/**
* ????6
*/
private String value6;
/**
* ??ֵ7
*/
private String key7;
/**
* ????7
*/
private String value7;
/**
* ??ֵ8
*/
private String key8;
/**
* ????8
*/
private String value8;
/**
* ??ֵ9
*/
private String key9;
/**
* ????9
*/
private String value9;
/**
* ??ֵ10
*/
private String key10;
/**
* ????10
*/
private String value10;
/**
* ??ֵ11
*/
private String key11;
/**
* ????11
*/
private String value11;
/**
* ??ֵ12
*/
private String key12;
/**
* ????12
*/
private String value12;
/**
* ??ֵ13
*/
private String key13;
/**
* ????13
*/
private String value13;
/**
* ??ֵ14
*/
private String key14;
/**
* ????14
*/
private String value14;
/**
* ??ֵ15
*/
private String key15;
/**
* ????15
*/
private String value15;
/**
* ??ֵ16
*/
private String key16;
/**
* ????16
*/
private String value16;
/**
* ????ʱ?
*/
private Date createTime;
/**
* ?????
*/
private Integer createBy;
/**
* ????ʱ?
*/
private Date updateTime;
/**
* ?????
*/
private Integer updateBy;
/**
* 0:????Ծ,1:??Ծ
*/
private Integer isActive;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,89 @@
package com.ssf.mysqloracletest.domain;
import lombok.Data;
import java.io.Serializable;
@Data
public class SwzdryView implements Serializable {
private String ZDRYYJXXID;
private String DTXXLB;
private String ZDRYXXID;
private String ZDRYLBBJ;
private String ZDRYXL;
private String ZDRYXM;
private String ZDRYSFZH;
private String HDFSSJ;
private String HDFSDQH;
private String HDFSDXZ;
private String HDFSCSMC;
private String HDFSCSDM;
private String HDFSDSSGAJGDM;
private String HDFSDSSGAJGMC;
private String HDXGXX;
private String YJJSDWMC;
private String YJJSDW;
private String YJJSMJ;
private String YJJSMJSFZH;
private String YJFBSJ;
private String QSZT;
private String FKZT;
private String KEY1;
private String VALUE1;
private String KEY2;
private String VALUE2;
private String KEY3;
private String VALUE3;
private String KEY4;
private String VALUE4;
private String KEY5;
private String VALUE5;
private String KEY6;
private String VALUE6;
private String KEY7;
private String VALUE7;
private String KEY8;
private String VALUE8;
private String KEY9;
private String VALUE9;
private String KEY10;
private String VALUE10;
private String KEY11;
private String VALUE11;
private String KEY12;
private String VALUE12;
private String KEY13;
private String VALUE13;
private String KEY14;
private String VALUE14;
private String KEY15;
private String VALUE15;
private String KEY16;
private String VALUE16;
private String HDFSDJDZB;
private String HDFSDWDZB;
private String SFXF;
private String XFGZYQ;
private String XFRXM;
private String XFRSFZH;
private String XFRDWDM;
private String XFRDWMC;
private String XFSJ;
private String SFDW;
private String DXFS;
private String DXFSNR;
private String KS_HDFSDJDZB;
private String KS_HDFSDWDZB;
private String KS_HDFSDQH;
private String DXFSZD;
private String CZJG;
private String VALUE19;
private String SFFHBFRY;
private String VALUE20;
private String DXFSZALD;
private String DXFSXFLD;
private String DXFSZYLD;
private String DXFSPCSLD;
private String DXFSZJLD;
private String SFZDDW;
}

@ -0,0 +1,20 @@
package com.ssf.mysqloracletest.mapper;
import com.ssf.mysqloracletest.domain.MetaImpUserModelInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* @author 10503
* @description meta_imp_user_model_info(?ص???Ԥ??ģ????Ϣ?)Mapper
* @createDate 2024-01-27 17:35:51
* @Entity com.ssf.mysqloracletest.domain.MetaImpUserModelInfo
*/
@Mapper
public interface MetaImpUserModelInfoMapper extends BaseMapper<MetaImpUserModelInfo> {
}

@ -0,0 +1,7 @@
package com.ssf.mysqloracletest.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ssf.mysqloracletest.domain.SwzdryView;
public interface SwzdryViewMapper extends BaseMapper<SwzdryView> {
}

@ -0,0 +1,13 @@
package com.ssf.mysqloracletest.service;
import com.ssf.mysqloracletest.domain.MetaImpUserModelInfo;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @author 10503
* @description meta_imp_user_model_info(?ص???Ԥ??ģ????Ϣ?)Service
* @createDate 2024-01-27 17:35:51
*/
public interface MetaImpUserModelInfoService extends IService<MetaImpUserModelInfo> {
}

@ -0,0 +1,8 @@
package com.ssf.mysqloracletest.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ssf.mysqloracletest.domain.SlryOracle;
import com.ssf.mysqloracletest.domain.SwzdryView;
public interface SwzdryViewService extends IService<SwzdryView> {
}

@ -0,0 +1,24 @@
package com.ssf.mysqloracletest.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ssf.mysqloracletest.domain.MetaImpUserModelInfo;
import com.ssf.mysqloracletest.service.MetaImpUserModelInfoService;
import com.ssf.mysqloracletest.mapper.MetaImpUserModelInfoMapper;
import org.springframework.stereotype.Service;
/**
* @author 10503
* @description meta_imp_user_model_info(?ص???Ԥ??ģ????Ϣ?)Service
* @createDate 2024-01-27 17:35:51
*/
@Service
@DS("mysql")
public class MetaImpUserModelInfoServiceImpl extends ServiceImpl<MetaImpUserModelInfoMapper, MetaImpUserModelInfo>
implements MetaImpUserModelInfoService{
}

@ -0,0 +1,13 @@
package com.ssf.mysqloracletest.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ssf.mysqloracletest.domain.SwzdryView;
import com.ssf.mysqloracletest.mapper.SwzdryViewMapper;
import com.ssf.mysqloracletest.service.SwzdryViewService;
import org.springframework.stereotype.Service;
@Service
@DS("postgreUser")
public class SwzdryViewServiceImpl extends ServiceImpl <SwzdryViewMapper, SwzdryView> implements SwzdryViewService {
}

@ -0,0 +1,143 @@
package com.ssf.mysqloracletest.task;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.ssf.mysqloracletest.domain.MetaImpUserModelInfo;
import com.ssf.mysqloracletest.domain.SwzdryView;
import com.ssf.mysqloracletest.service.MetaImpUserInfoService;
import com.ssf.mysqloracletest.service.MetaImpUserModelInfoService;
import com.ssf.mysqloracletest.service.SwzdryViewService;
import com.ssf.mysqloracletest.utils.ConfigParam;
import com.ssf.mysqloracletest.utils.NumKit;
import com.ssf.mysqloracletest.utils.StringKit;
import lombok.RequiredArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.concurrent.CountDownLatch;
@Component
@RequiredArgsConstructor
public class MetaImpUserModelInfoTask {
private static final Logger logger = LoggerFactory.getLogger(MetaImpUserModelInfoTask.class);
private final SwzdryViewService swzdryViewService;
private final MetaImpUserModelInfoService metaimpUserModelInfoService;
final int oncesCounts = NumKit.checkInt(ConfigParam.oncesCounts) == 0 ? 1000 : NumKit.checkInt(ConfigParam.oncesCounts);
@Scheduled(initialDelay = 100, fixedDelay = 3000)
public void transswzdry() {
if (!"true".equals(ConfigParam.SwzdrySwitch)) {
return;
}
try {
int countTStrh = swzdryViewService.count();
if (countTStrh > 0) {
int count = countTStrh / oncesCounts;
CountDownLatch latch = new CountDownLatch(countTStrh);
for (int i = 0; i <= count; i++) {
try {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
QueryWrapper<SwzdryView> wrapper = new QueryWrapper<>();
List<SwzdryView> list = swzdryViewService.list(wrapper);
for (SwzdryView Info : list) {
MetaImpUserModelInfo modelInfo = new MetaImpUserModelInfo();
modelInfo.setWarning_id(Info.getZDRYYJXXID());
modelInfo.setDataType(Integer.parseInt(Info.getDTXXLB()));
modelInfo.setImpUserSubType(Info.getZDRYXL());
modelInfo.setImpUserName(Info.getZDRYXM());
modelInfo.setImpUserIdCard(Info.getZDRYSFZH());
modelInfo.setLongitude(new BigDecimal(Info.getHDFSDJDZB()));
modelInfo.setLatitude(new BigDecimal(Info.getHDFSDWDZB()));
modelInfo.setActivityTime(Info.getHDFSSJ());
modelInfo.setActivityDeviceAddress(Info.getHDFSCSDM());
modelInfo.setActivityDeviceCode(Info.getHDFSCSDM());
modelInfo.setActivityPoliceStationCode(Info.getHDFSDSSGAJGDM());
modelInfo.setActivityPoliceStationName(Info.getHDFSDSSGAJGMC());
modelInfo.setActivityMessage(Info.getHDXGXX());
modelInfo.setSignPoliceman(Info.getYJJSMJ());
modelInfo.setSignPolicemanIdCard(Info.getYJJSMJSFZH());
modelInfo.setSignStatus(Integer.parseInt(Info.getQSZT()));// 签收状态 0未签收 1已签收
modelInfo.setDisposalStatus(Integer.parseInt(Info.getFKZT()));// 反馈状态 0未反馈 1已反馈
modelInfo.setSignPoliceStation(Info.getYJJSDWMC());
modelInfo.setSignPoliceCode(Info.getYJJSDW());
String yjfbsjString = Info.getYJFBSJ();
Date yjfbsjDate = dateFormat.parse(yjfbsjString);
modelInfo.setWarningTime(StringKit.toString(yjfbsjDate));
modelInfo.setIsImpAddress(Info.getSFZDDW());
modelInfo.setKey1(Info.getKEY1());
modelInfo.setKey2(Info.getKEY2());
modelInfo.setKey3(Info.getKEY3());
modelInfo.setKey4(Info.getKEY4());
modelInfo.setKey5(Info.getKEY5());
modelInfo.setKey6(Info.getKEY6());
modelInfo.setKey7(Info.getKEY7());
modelInfo.setKey8(Info.getKEY8());
modelInfo.setKey9(Info.getKEY9());
modelInfo.setKey10(Info.getKEY10());
modelInfo.setKey11(Info.getKEY11());
modelInfo.setKey12(Info.getKEY12());
modelInfo.setKey13(Info.getKEY13());
modelInfo.setKey14(Info.getKEY14());
modelInfo.setKey15(Info.getKEY15());
modelInfo.setKey16(Info.getKEY16());
modelInfo.setValue1(Info.getVALUE1());
modelInfo.setValue2(Info.getVALUE2());
modelInfo.setValue3(Info.getVALUE3());
modelInfo.setValue4(Info.getVALUE4());
modelInfo.setValue5(Info.getVALUE5());
modelInfo.setValue6(Info.getVALUE6());
modelInfo.setValue7(Info.getVALUE7());
modelInfo.setValue8(Info.getVALUE8());
modelInfo.setValue9(Info.getVALUE9());
modelInfo.setValue10(Info.getVALUE10());
modelInfo.setValue11(Info.getVALUE11());
modelInfo.setValue12(Info.getVALUE12());
modelInfo.setValue13(Info.getVALUE13());
modelInfo.setValue14(Info.getVALUE14());
modelInfo.setValue15(Info.getVALUE15());
modelInfo.setValue16(Info.getVALUE16());
//确定一个数据是否唯一
MetaImpUserModelInfo one = metaimpUserModelInfoService.lambdaQuery().eq(MetaImpUserModelInfo::getWarning_id, Info.getZDRYYJXXID()).one();
if (one == null) {
boolean save = metaimpUserModelInfoService.save(modelInfo);
if (save) {
logger.info("MODEL:-:" + Info.getZDRYYJXXID() + ":插入成功");
}
} else {
UpdateWrapper<MetaImpUserModelInfo> wrapper1 = new UpdateWrapper<>();
wrapper1.eq("warning_id", Info.getZDRYYJXXID());
boolean update = metaimpUserModelInfoService.update(modelInfo, wrapper1);
if (update) {
logger.info("MODEL:-:" + Info.getZDRYYJXXID() + ":更新成功");
}
}
}
} catch (Exception e) {
logger.info(StringKit.getTrace(e));
}
latch.countDown();
}
try {
// Wait for all threads to complete
latch.await();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
} catch (Exception e) {
logger.info(StringKit.getTrace(e));
}
}
}
Loading…
Cancel
Save