|
|
|
@ -48,14 +48,16 @@ public class AlarmInfoTask {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
QueryWrapper<JcjJjxxViewMysql> queryWrapper = new QueryWrapper<>();
|
|
|
|
|
queryWrapper.isNull("STATUS");
|
|
|
|
|
Page<JcjJjxxViewMysql> page = new Page<>(1, 200);
|
|
|
|
|
List<JcjJjxxViewMysql> resultList = jjxxViewMysqlService.page(page, queryWrapper).getRecords();
|
|
|
|
|
JcjJjxxViewMysql jjxxViewMysqlCp = new JcjJjxxViewMysql();
|
|
|
|
|
jjxxViewMysqlCp.setLEFTTOPLONGITUDE("120.423914");
|
|
|
|
|
jjxxViewMysqlCp.setRIGHTBOTTOMLONGITUDE("120.439581");
|
|
|
|
|
jjxxViewMysqlCp.setRIGHTBOTTOMLATITUDE("33.823756");
|
|
|
|
|
jjxxViewMysqlCp.setLEFTTOPLATITUDE("33.833082");
|
|
|
|
|
|
|
|
|
|
CountDownLatch latch = new CountDownLatch(resultList.size());
|
|
|
|
|
List<JcjJjxxViewMysql> selectloaction = jjxxViewMysqlService.selectloaction(jjxxViewMysqlCp);
|
|
|
|
|
CountDownLatch latch = new CountDownLatch(selectloaction.size());
|
|
|
|
|
ExecutorService JjxxPool = Executors.newFixedThreadPool(5);
|
|
|
|
|
for (JcjJjxxViewMysql bean : resultList) {
|
|
|
|
|
for (JcjJjxxViewMysql bean : selectloaction) {
|
|
|
|
|
JjxxPool.submit(() -> {
|
|
|
|
|
cleanJjxx(bean);
|
|
|
|
|
logger.info("清洗完成");
|
|
|
|
@ -79,60 +81,54 @@ public class AlarmInfoTask {
|
|
|
|
|
|
|
|
|
|
private void cleanJjxx(JcjJjxxViewMysql bean) {
|
|
|
|
|
JcjJjxxViewMysql jjxxViewMysqlCp = new JcjJjxxViewMysql();
|
|
|
|
|
jjxxViewMysqlCp.setLEFTTOPLONGITUDE("120.423914");
|
|
|
|
|
jjxxViewMysqlCp.setRIGHTBOTTOMLONGITUDE("120.439581");
|
|
|
|
|
jjxxViewMysqlCp.setRIGHTBOTTOMLATITUDE("33.823756");
|
|
|
|
|
jjxxViewMysqlCp.setLEFTTOPLATITUDE("33.833082");
|
|
|
|
|
List<JcjJjxxViewMysql> selectloaction = jjxxViewMysqlService.selectloaction(jjxxViewMysqlCp);
|
|
|
|
|
System.out.println();
|
|
|
|
|
BeanUtils.copyProperties(bean, jjxxViewMysqlCp);
|
|
|
|
|
try {
|
|
|
|
|
// BeanUtils.copyProperties(bean, selectloaction);
|
|
|
|
|
// JcjJjxxViewMysql jwd = jjxxViewMysqlService.selectJcjJxxByJJBH(selectloaction.getJJBH());
|
|
|
|
|
// MetaAlarmInfo alarmInfo = new MetaAlarmInfo();
|
|
|
|
|
// //设置目标字段的值
|
|
|
|
|
// //alarm_code<-----JJBH 接警编号
|
|
|
|
|
// alarmInfo.setAlarmCode(selectloaction.getJJBH());
|
|
|
|
|
// //police_receiver_name<-----JJRXM接警人姓名
|
|
|
|
|
// alarmInfo.setPoliceReceiverName(selectloaction.getJJRXM());
|
|
|
|
|
// //alarm_response_time<-----JJRQSJ接警日期时间
|
|
|
|
|
// alarmInfo.setAlarmResponseTime(selectloaction.getJJRQSJ());
|
|
|
|
|
// //alarm_response_content<-----BJNR接警报警内容
|
|
|
|
|
// alarmInfo.setAlarmResponseContent(selectloaction.getBJNR());
|
|
|
|
|
// //informant_name<-----BJR接警报警人
|
|
|
|
|
// alarmInfo.setInformantName(selectloaction.getBJR());
|
|
|
|
|
// //informant_time<-----BJDHSJ接警报警时间
|
|
|
|
|
// alarmInfo.setInformantTime(selectloaction.getBJDHSJ());
|
|
|
|
|
// //informant_phone<-----LXDH接警报警人联系电话
|
|
|
|
|
// alarmInfo.setInformantPhone(selectloaction.getLXDH());
|
|
|
|
|
// //alarm_response_type<-----BJLXMC报警类型名称
|
|
|
|
|
// alarmInfo.setAlarmResponseTypeName(selectloaction.getBJLXMC());
|
|
|
|
|
// //alarm_address<-----SFDD接警事发地址
|
|
|
|
|
// alarmInfo.setAlarmAddress(selectloaction.getSFDD());
|
|
|
|
|
// //alarm_response_unit<-----JJDWMC接警单位名称
|
|
|
|
|
// alarmInfo.setAlarmResponseUnit(selectloaction.getJJDWMC());
|
|
|
|
|
//
|
|
|
|
|
// if (jwd.getGIS_Y() != null) {
|
|
|
|
|
// //latitude(纬度)<-----WDZB纬度坐标
|
|
|
|
|
// alarmInfo.setLatitude(NumKit.checkBigDecimal(jwd.getGIS_Y()));
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// if (jwd.getGIS_X() != null) {
|
|
|
|
|
// //longitude(经度)<-----JDZB经度坐标
|
|
|
|
|
// alarmInfo.setLongitude(NumKit.checkBigDecimal(jwd.getGIS_X()));
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// boolean b = alarmInfoService.save(alarmInfo);
|
|
|
|
|
//
|
|
|
|
|
// if (b) {
|
|
|
|
|
// selectloaction.setSTATUS("1");
|
|
|
|
|
// jjxxViewMysqlService.updateJjxxByJJBH(selectloaction);
|
|
|
|
|
// logger.info("状态修改为:1");
|
|
|
|
|
// }
|
|
|
|
|
JcjJjxxViewMysql jwd = jjxxViewMysqlService.selectJcjJxxByJJBH(jjxxViewMysqlCp.getJJBH());
|
|
|
|
|
MetaAlarmInfo alarmInfo = new MetaAlarmInfo();
|
|
|
|
|
//设置目标字段的值
|
|
|
|
|
//alarm_code<-----JJBH 接警编号
|
|
|
|
|
alarmInfo.setAlarmCode(jjxxViewMysqlCp.getJJBH());
|
|
|
|
|
//police_receiver_name<-----JJRXM接警人姓名
|
|
|
|
|
alarmInfo.setPoliceReceiverName(jjxxViewMysqlCp.getJJRXM());
|
|
|
|
|
//alarm_response_time<-----JJRQSJ接警日期时间
|
|
|
|
|
alarmInfo.setAlarmResponseTime(jjxxViewMysqlCp.getJJRQSJ());
|
|
|
|
|
//alarm_response_content<-----BJNR接警报警内容
|
|
|
|
|
alarmInfo.setAlarmResponseContent(jjxxViewMysqlCp.getBJNR());
|
|
|
|
|
//informant_name<-----BJR接警报警人
|
|
|
|
|
alarmInfo.setInformantName(jjxxViewMysqlCp.getBJR());
|
|
|
|
|
//informant_time<-----BJDHSJ接警报警时间
|
|
|
|
|
alarmInfo.setInformantTime(jjxxViewMysqlCp.getBJDHSJ());
|
|
|
|
|
//informant_phone<-----LXDH接警报警人联系电话
|
|
|
|
|
alarmInfo.setInformantPhone(jjxxViewMysqlCp.getLXDH());
|
|
|
|
|
//alarm_response_type<-----BJLXMC报警类型名称
|
|
|
|
|
alarmInfo.setAlarmResponseTypeName(jjxxViewMysqlCp.getBJLXMC());
|
|
|
|
|
//alarm_address<-----SFDD接警事发地址
|
|
|
|
|
alarmInfo.setAlarmAddress(jjxxViewMysqlCp.getSFDD());
|
|
|
|
|
//alarm_response_unit<-----JJDWMC接警单位名称
|
|
|
|
|
alarmInfo.setAlarmResponseUnit(jjxxViewMysqlCp.getJJDWMC());
|
|
|
|
|
|
|
|
|
|
if (jwd.getGIS_Y() != null) {
|
|
|
|
|
//latitude(纬度)<-----WDZB纬度坐标
|
|
|
|
|
alarmInfo.setLatitude(NumKit.checkBigDecimal(jwd.getGIS_Y()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (jwd.getGIS_X() != null) {
|
|
|
|
|
//longitude(经度)<-----JDZB经度坐标
|
|
|
|
|
alarmInfo.setLongitude(NumKit.checkBigDecimal(jwd.getGIS_X()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
boolean b = alarmInfoService.save(alarmInfo);
|
|
|
|
|
|
|
|
|
|
if (b) {
|
|
|
|
|
jjxxViewMysqlCp.setSTATUS("1");
|
|
|
|
|
jjxxViewMysqlService.updateJjxxByJJBH(jjxxViewMysqlCp);
|
|
|
|
|
logger.info("状态修改为:1");
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
// logger.info(StringKit.getTrace(e));
|
|
|
|
|
// selectloaction.setSTATUS("2");
|
|
|
|
|
// jjxxViewMysqlService.updateJjxxByJJBH(selectloaction);
|
|
|
|
|
// logger.info("状态修改为:2");
|
|
|
|
|
logger.info(StringKit.getTrace(e));
|
|
|
|
|
jjxxViewMysqlCp.setSTATUS("2");
|
|
|
|
|
jjxxViewMysqlService.updateJjxxByJJBH(jjxxViewMysqlCp);
|
|
|
|
|
logger.info("状态修改为:2");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|