From b74116b9356d32483d1c87377292a81d48c0cc1f Mon Sep 17 00:00:00 2001 From: wangsixiang <2970484253@qq.com> Date: Fri, 30 Aug 2024 16:15:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E6=95=B0=E6=8D=AE,=E6=8E=A8?= =?UTF-8?q?=E9=80=81,=E9=A2=84=E6=8C=89=E8=AE=BE=E5=A4=87=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DcPublishManageController.java | 5 +++++ .../com/zc/business/mapper/DcPublishManageMapper.java | 3 +++ .../zc/business/service/IDcPublishManageService.java | 2 ++ .../service/impl/DcEmergencyPlansServiceImpl.java | 1 + .../service/impl/DcPublishManageServiceImpl.java | 11 +++++++++++ .../com/zc/business/service/impl/MsmServiceImpl.java | 2 ++ 6 files changed, 24 insertions(+) diff --git a/zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java b/zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java index aaba69c6..27b20db4 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java @@ -348,5 +348,10 @@ public class DcPublishManageController extends BaseController ExcelUtil util = new ExcelUtil<>(DcPublishManage.class); util.exportExcel(response, list, UniversalEnum.INFORMATION_RELEASE_MANAGEMENT_RECORD_DATA.getValue()); } + //同步位置数据 + @PostMapping("/manage") + public void selectDcPublishManage() { + dcPublishManageService.selectDcPublishManage(); + } } diff --git a/zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java b/zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java index d8c0e384..89cd202a 100644 --- a/zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java +++ b/zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java @@ -89,4 +89,7 @@ public interface DcPublishManageMapper public List selectDcPublishManageStatistics(DcPublishManage dcPublishManage); //数据处理 public List selectOperLog(); + // + public List selectDcPublishManage(); + } diff --git a/zc-business/src/main/java/com/zc/business/service/IDcPublishManageService.java b/zc-business/src/main/java/com/zc/business/service/IDcPublishManageService.java index e42583d8..f6e8a055 100644 --- a/zc-business/src/main/java/com/zc/business/service/IDcPublishManageService.java +++ b/zc-business/src/main/java/com/zc/business/service/IDcPublishManageService.java @@ -79,4 +79,6 @@ public interface IDcPublishManageService public List selectDcPublishManageExport(DcPublishManage dcPublishManage); //数据处理 public List selectOperLog() throws ParseException; + + public void selectDcPublishManage(); } diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java index eacd8d8f..bf190b9c 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java @@ -1336,6 +1336,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { } else { dcPublishManage.setPublishChannels(UniversalEnum.SEVEN.getNumber()); } + dcPublishManage.setPosition(dcOperLog.getDcDeviceName()); dcPublishManage.setContentDetails(JSON.toJSONString(propsList)); dcPublishManageService.insertDcPublishManage(dcPublishManage); } diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcPublishManageServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcPublishManageServiceImpl.java index 8261c14b..487a95d8 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcPublishManageServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcPublishManageServiceImpl.java @@ -241,4 +241,15 @@ public class DcPublishManageServiceImpl implements IDcPublishManageService } return null; } + + @Override + public void selectDcPublishManage() { + List dcPublishManages = dcPublishManageMapper.selectDcPublishManage(); + for (DcPublishManage manage:dcPublishManages){ + DcPublishManage dcPublishManage = new DcPublishManage(); + dcPublishManage.setId(manage.getId()); + dcPublishManage.setPosition(manage.getPosition()); + dcPublishManageMapper.updateDcPublishManage(dcPublishManage); + } + } } diff --git a/zc-business/src/main/java/com/zc/business/service/impl/MsmServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/MsmServiceImpl.java index 450edf35..8ed77809 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/MsmServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/MsmServiceImpl.java @@ -227,6 +227,7 @@ public class MsmServiceImpl implements IMsmService { DcPublishManage dcPublishManage = new DcPublishManage(); String eventId = map.get("eventId").toString();//事件id String content = map.get("content").toString();//信息内容 + String stakeMark = map.get("stakeMark").toString();//桩号 // Integer eventType = dcPublishManageMapper.selectEventType(eventId);//事件类型 // DcPublishingChannels publishManage = dcPublishManageMapper.selectPublishManage(eventType);//渠道信息 // if (publishManage!=null){ @@ -239,6 +240,7 @@ public class MsmServiceImpl implements IMsmService { dcPublishManage.setContentDetails(map.get("content").toString()); dcPublishManage.setPublishChannels(UniversalEnum.EIGHT.getNumber());//发布渠道类型:企业微信 dcPublishManage.setPublishStatus(UniversalEnum.ONE.getNumber());//发布成功 + dcPublishManage.setPosition(stakeMark); dcPublishManageMapper.insertDcPublishManage(dcPublishManage);//加入推送记录 // ArrayList array = (ArrayList) map.get("type"); // Boolean send = null;