Browse Source

同步数据,推送,预按设备名称

develop
wangsixiang 3 months ago
parent
commit
b74116b935
  1. 5
      zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java
  2. 3
      zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java
  3. 2
      zc-business/src/main/java/com/zc/business/service/IDcPublishManageService.java
  4. 1
      zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java
  5. 11
      zc-business/src/main/java/com/zc/business/service/impl/DcPublishManageServiceImpl.java
  6. 2
      zc-business/src/main/java/com/zc/business/service/impl/MsmServiceImpl.java

5
zc-business/src/main/java/com/zc/business/controller/DcPublishManageController.java

@ -348,5 +348,10 @@ public class DcPublishManageController extends BaseController
ExcelUtil<DcPublishManage> util = new ExcelUtil<>(DcPublishManage.class); ExcelUtil<DcPublishManage> util = new ExcelUtil<>(DcPublishManage.class);
util.exportExcel(response, list, UniversalEnum.INFORMATION_RELEASE_MANAGEMENT_RECORD_DATA.getValue()); util.exportExcel(response, list, UniversalEnum.INFORMATION_RELEASE_MANAGEMENT_RECORD_DATA.getValue());
} }
//同步位置数据
@PostMapping("/manage")
public void selectDcPublishManage() {
dcPublishManageService.selectDcPublishManage();
}
} }

3
zc-business/src/main/java/com/zc/business/mapper/DcPublishManageMapper.java

@ -89,4 +89,7 @@ public interface DcPublishManageMapper
public List<DcPublishManage> selectDcPublishManageStatistics(DcPublishManage dcPublishManage); public List<DcPublishManage> selectDcPublishManageStatistics(DcPublishManage dcPublishManage);
//数据处理 //数据处理
public List<HashMap> selectOperLog(); public List<HashMap> selectOperLog();
//
public List<DcPublishManage> selectDcPublishManage();
} }

2
zc-business/src/main/java/com/zc/business/service/IDcPublishManageService.java

@ -79,4 +79,6 @@ public interface IDcPublishManageService
public List<DcPublishManage> selectDcPublishManageExport(DcPublishManage dcPublishManage); public List<DcPublishManage> selectDcPublishManageExport(DcPublishManage dcPublishManage);
//数据处理 //数据处理
public List<HashMap> selectOperLog() throws ParseException; public List<HashMap> selectOperLog() throws ParseException;
public void selectDcPublishManage();
} }

1
zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java

@ -1336,6 +1336,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
} else { } else {
dcPublishManage.setPublishChannels(UniversalEnum.SEVEN.getNumber()); dcPublishManage.setPublishChannels(UniversalEnum.SEVEN.getNumber());
} }
dcPublishManage.setPosition(dcOperLog.getDcDeviceName());
dcPublishManage.setContentDetails(JSON.toJSONString(propsList)); dcPublishManage.setContentDetails(JSON.toJSONString(propsList));
dcPublishManageService.insertDcPublishManage(dcPublishManage); dcPublishManageService.insertDcPublishManage(dcPublishManage);
} }

11
zc-business/src/main/java/com/zc/business/service/impl/DcPublishManageServiceImpl.java

@ -241,4 +241,15 @@ public class DcPublishManageServiceImpl implements IDcPublishManageService
} }
return null; return null;
} }
@Override
public void selectDcPublishManage() {
List<DcPublishManage> dcPublishManages = dcPublishManageMapper.selectDcPublishManage();
for (DcPublishManage manage:dcPublishManages){
DcPublishManage dcPublishManage = new DcPublishManage();
dcPublishManage.setId(manage.getId());
dcPublishManage.setPosition(manage.getPosition());
dcPublishManageMapper.updateDcPublishManage(dcPublishManage);
}
}
} }

2
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(); DcPublishManage dcPublishManage = new DcPublishManage();
String eventId = map.get("eventId").toString();//事件id String eventId = map.get("eventId").toString();//事件id
String content = map.get("content").toString();//信息内容 String content = map.get("content").toString();//信息内容
String stakeMark = map.get("stakeMark").toString();//桩号
// Integer eventType = dcPublishManageMapper.selectEventType(eventId);//事件类型 // Integer eventType = dcPublishManageMapper.selectEventType(eventId);//事件类型
// DcPublishingChannels publishManage = dcPublishManageMapper.selectPublishManage(eventType);//渠道信息 // DcPublishingChannels publishManage = dcPublishManageMapper.selectPublishManage(eventType);//渠道信息
// if (publishManage!=null){ // if (publishManage!=null){
@ -239,6 +240,7 @@ public class MsmServiceImpl implements IMsmService {
dcPublishManage.setContentDetails(map.get("content").toString()); dcPublishManage.setContentDetails(map.get("content").toString());
dcPublishManage.setPublishChannels(UniversalEnum.EIGHT.getNumber());//发布渠道类型:企业微信 dcPublishManage.setPublishChannels(UniversalEnum.EIGHT.getNumber());//发布渠道类型:企业微信
dcPublishManage.setPublishStatus(UniversalEnum.ONE.getNumber());//发布成功 dcPublishManage.setPublishStatus(UniversalEnum.ONE.getNumber());//发布成功
dcPublishManage.setPosition(stakeMark);
dcPublishManageMapper.insertDcPublishManage(dcPublishManage);//加入推送记录 dcPublishManageMapper.insertDcPublishManage(dcPublishManage);//加入推送记录
// ArrayList<String> array = (ArrayList<String>) map.get("type"); // ArrayList<String> array = (ArrayList<String>) map.get("type");
// Boolean send = null; // Boolean send = null;

Loading…
Cancel
Save