Browse Source

Merge remote-tracking branch 'origin/develop' into develop

develop
wangsixiang 5 months ago
parent
commit
c1e2c31439
  1. 3
      zc-business/src/main/java/com/zc/business/controller/StatusController.java
  2. 41
      zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java

3
zc-business/src/main/java/com/zc/business/controller/StatusController.java

@ -245,6 +245,7 @@ public class StatusController extends BaseController {
itemTypeMap.put("1-4", "360°全景摄像机");
itemTypeMap.put("1-5", "180°全景摄像机");
itemTypeMap.put("2-1", "门架式可变信息标志");
itemTypeMap.put("2-2", "站前可变信息标志");
itemTypeMap.put("2-3", "雨棚可变信息标志");
itemTypeMap.put("2-4", "站前悬臂式可变信息标志");
itemTypeMap.put("3", "气象检测器");
@ -366,7 +367,7 @@ public class StatusController extends BaseController {
subMap.put("排序规则",ruleMap);
}else{
String[] rules = {"全部设备","高清网络枪型固定摄像机","高清网络球形摄像机","桥下高清网络球形摄像机","360°全景摄像机","180°全景摄像机",
"门架式可变信息标志","雨棚可变信息标志","站前悬臂式可变信息标志","气象检测器","路段语音广播系统","护栏碰撞预警系统","毫米波雷达",
"门架式可变信息标志","雨棚可变信息标志","站前可变信息标志","站前悬臂式可变信息标志","气象检测器","路段语音广播系统","护栏碰撞预警系统","毫米波雷达",
"合流区预警系统","激光疲劳唤醒","一类交通量调查站","智能行车诱导系统","智能设备箱"};
orderRule= Arrays.toString(rules).replace("[","").replace("]","").replace(" ","");
ruleMap.put("rule",orderRule);

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

@ -74,6 +74,9 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
@Resource
private ISysDeptService iSysDeptService;
@Resource
private IDcPublishManageService dcPublishManageService;
/**
* 查询事件预案
@ -764,6 +767,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
try {
// 根据不通设备类型,执行不通的功能操作
invokedFunction(
id,
dcEventAnDcEmergencyPlans.getOperationType(),
dcDevices,
otherConfig,
@ -816,7 +820,8 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
/**
* 根据不通设备类型执行不通的功能操作
*/
public void invokedFunction(Integer operationType,
public void invokedFunction(String eventId,
Integer operationType,
List<DcDevice> dcDevices,
JSONObject otherConfig,
JSONArray resultArray) {
@ -983,7 +988,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
result.put("deviceName", device.getDeviceName());
result.put("content", params.get("text"));
processingDeviceParameters("A1", functionList, props);
processingDeviceParameters("A1", functionList, params);
JSONObject returnResult = broadcastController.nearCamListDistance(params);
result.put("result", returnResult);
@ -1035,7 +1040,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
}
proDevice.put("functions", functionList);
propsList.add(proDevice);
insertEquipmentControlRecordTable(device, propsList, resultArray, status, remark.toString());
insertEquipmentControlRecordTable(device, propsList, resultArray, status, remark.toString(),eventId);
} catch (HttpException | IOException e) {
log.error(e.toString());
throw new RuntimeException(e);
@ -1148,11 +1153,13 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
/**
* 设备控制记录表插入
*/
@Transactional(rollbackFor = Exception.class)
public void insertEquipmentControlRecordTable(DcDevice dcDevice,
List<HashMap<String, List<Map<String, Object>>>> propsList,
JSONArray resultList,
Integer status,
String remark) {
String remark,
String eventId) {
DcOperLog dcOperLog = new DcOperLog();
List<String> deviceIds = new ArrayList<>();
@ -1177,6 +1184,32 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
dcOperLog.setOperTime(new Date());
dcOperLog.setRemark(remark);
iDcOperLogService.addDcOperLog(dcOperLog);
// 插入公众服务统计记录表
if (Objects.equals(dcDevice.getDeviceType(), "2") || Objects.equals(dcDevice.getDeviceType(), "5")) {
DcPublishManage dcPublishManage = new DcPublishManage();
if (Objects.equals(status, 0)) {
dcPublishManage.setPublishStatus(1);//发布状态1-成功2-失败
} else {
dcPublishManage.setPublishStatus(2);//发布状态1-成功2-失败
}
dcPublishManage.setEventId(eventId);
dcPublishManage.setPublisher(loginUser.getUsername());//发布人
dcPublishManage.setPublishTime(new Date());//发布时间
dcPublishManage.setCreateTime(new Date());//创建时间
if (StringUtils.isNotEmpty(dcOperLog.getId())) {
dcPublishManage.setLogId(Long.valueOf(dcOperLog.getId()));//发布的如果的情报板传对应id
}
if (Objects.equals(dcDevice.getDeviceType(), "2")) {
dcPublishManage.setPublishChannels(4);
} else {
dcPublishManage.setPublishChannels(7);
}
dcPublishManage.setContentDetails(JSON.toJSONString(propsList));
dcPublishManageService.insertDcPublishManage(dcPublishManage);
}
}

Loading…
Cancel
Save