Browse Source

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

develop
wangsixiang 6 months ago
parent
commit
245a7627a5
  1. 12
      zc-business/src/main/java/com/zc/business/controller/DcDeviceController.java
  2. 12
      zc-business/src/main/java/com/zc/business/enums/ValueConverter.java
  3. 46
      zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java

12
zc-business/src/main/java/com/zc/business/controller/DcDeviceController.java

@ -15,6 +15,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.service.ISysConfigService;
import com.zc.business.constant.DeviceTypeConstants; import com.zc.business.constant.DeviceTypeConstants;
import com.zc.business.domain.DcDevice; import com.zc.business.domain.DcDevice;
import com.zc.business.interfaces.OperationLog; import com.zc.business.interfaces.OperationLog;
@ -62,6 +63,9 @@ public class DcDeviceController extends BaseController {
@Resource @Resource
private BroadcastController broadcastController; private BroadcastController broadcastController;
@Resource
private ISysConfigService configService;
//*********************************设备增删改查****************************************** //*********************************设备增删改查******************************************
/** /**
@ -805,5 +809,13 @@ public class DcDeviceController extends BaseController {
} }
return null; return null;
} }
/**
* 设备箱-设备操作口令校验
*/
@GetMapping("/kouling/{secretKey}")
public AjaxResult verifySecretKey(@PathVariable String secretKey) {
String key = configService.selectConfigByKey("sbx-fun-kl");//密钥
return AjaxResult.success(key.equals(secretKey));
}
} }

12
zc-business/src/main/java/com/zc/business/enums/ValueConverter.java

@ -206,7 +206,7 @@ public class ValueConverter {
eventLabel.put("dcEventAbnormalWeather.numericalValue","异常天气数值"); eventLabel.put("dcEventAbnormalWeather.numericalValue","异常天气数值");
eventLabel.put("dcEventAccident.reporterName","报警人姓名"); eventLabel.put("dcEventAccident.reporterName","报警人姓名");
eventLabel.put("dcEventAccident.reporterPhoneNumber","报警人电话"); eventLabel.put("dcEventAccident.reporterPhoneNumber","报警人电话");
eventLabel.put("dcEventAccident.locationType","地点"); eventLabel.put("dcEventAccident.locationType","地点类型");
eventLabel.put("dcEventAccident.trafficJam","压车(公里)"); eventLabel.put("dcEventAccident.trafficJam","压车(公里)");
eventLabel.put("dcEventAccident.weatherCondition","天气情况"); eventLabel.put("dcEventAccident.weatherCondition","天气情况");
eventLabel.put("dcEventAccident.impactLevel","影响"); eventLabel.put("dcEventAccident.impactLevel","影响");
@ -227,7 +227,7 @@ public class ValueConverter {
eventLabel.put("dcEventAccident.seriousInjuries","重伤(人)"); eventLabel.put("dcEventAccident.seriousInjuries","重伤(人)");
eventLabel.put("dcEventAccident.fatalities","死亡(人)"); eventLabel.put("dcEventAccident.fatalities","死亡(人)");
eventLabel.put("dcEventAccident.isPrivate","私密事件"); eventLabel.put("dcEventAccident.isPrivate","私密事件");
eventLabel.put("dcEventAccident.facilityId","设施关联"); eventLabel.put("dcEventAccident.facilityId","设施");
// eventLabel.put("dcEventAccident.rampId","匝道id"); // eventLabel.put("dcEventAccident.rampId","匝道id");
eventLabel.put("dcEventAccident.location","地点"); eventLabel.put("dcEventAccident.location","地点");
eventLabel.put("dcEventConstruction.controlMode","管制方式"); eventLabel.put("dcEventConstruction.controlMode","管制方式");
@ -236,7 +236,7 @@ public class ValueConverter {
eventLabel.put("dcEventConstruction.specialConstruction","专项施工"); eventLabel.put("dcEventConstruction.specialConstruction","专项施工");
eventLabel.put("dcEventConstruction.otherConstructionName","其他施工名称"); eventLabel.put("dcEventConstruction.otherConstructionName","其他施工名称");
eventLabel.put("dcEventConstruction.constructionMeasurement","施工措施"); eventLabel.put("dcEventConstruction.constructionMeasurement","施工措施");
// eventLabel.put("dcEventConstruction.facilityId","设施id"); eventLabel.put("dcEventConstruction.facilityId","设施");
eventLabel.put("dcEventConstruction.exitsInlets","出入口"); eventLabel.put("dcEventConstruction.exitsInlets","出入口");
eventLabel.put("dcEventConstruction.laneOccupancy","占用车道"); eventLabel.put("dcEventConstruction.laneOccupancy","占用车道");
eventLabel.put("dcEventConstruction.trafficCondition","通行情况"); eventLabel.put("dcEventConstruction.trafficCondition","通行情况");
@ -250,7 +250,7 @@ public class ValueConverter {
eventLabel.put("dcEventTrafficCongestion.congestionMileage","拥堵里程(公里)"); eventLabel.put("dcEventTrafficCongestion.congestionMileage","拥堵里程(公里)");
eventLabel.put("dcEventTrafficCongestion.maxCongestionMileage","最大拥堵里程(公里)"); eventLabel.put("dcEventTrafficCongestion.maxCongestionMileage","最大拥堵里程(公里)");
eventLabel.put("dcEventTrafficCongestion.congestionCause","拥堵原因"); eventLabel.put("dcEventTrafficCongestion.congestionCause","拥堵原因");
// eventLabel.put("dcEventTrafficCongestion.facilityId","设施id"); eventLabel.put("dcEventTrafficCongestion.facilityId","设施");
// eventLabel.put("dcEventTrafficCongestion.rampId","匝道"); // eventLabel.put("dcEventTrafficCongestion.rampId","匝道");
eventLabel.put("dcEventTrafficCongestion.location","地点"); eventLabel.put("dcEventTrafficCongestion.location","地点");
eventLabel.put("dcEventTrafficCongestion.detailedReasons","详细原因"); eventLabel.put("dcEventTrafficCongestion.detailedReasons","详细原因");
@ -273,13 +273,13 @@ public class ValueConverter {
eventLabel.put("dcEventVehicleAccident.seriousInjuries","重伤(人)"); eventLabel.put("dcEventVehicleAccident.seriousInjuries","重伤(人)");
eventLabel.put("dcEventVehicleAccident.fatalities","死亡(人)"); eventLabel.put("dcEventVehicleAccident.fatalities","死亡(人)");
eventLabel.put("dcEventVehicleAccident.isPrivate","私密事件"); eventLabel.put("dcEventVehicleAccident.isPrivate","私密事件");
eventLabel.put("dcEventVehicleAccident.facilityId","地点"); eventLabel.put("dcEventVehicleAccident.facilityId","设施");
// eventLabel.put("dcEventVehicleAccident.rampId","匝道"); // eventLabel.put("dcEventVehicleAccident.rampId","匝道");
eventLabel.put("dcEventVehicleAccident.location","地点"); eventLabel.put("dcEventVehicleAccident.location","地点");
eventLabel.put("dcEventTrafficControl.controlType","管制分类"); eventLabel.put("dcEventTrafficControl.controlType","管制分类");
eventLabel.put("dcEventTrafficControl.controlCause","管制原因"); eventLabel.put("dcEventTrafficControl.controlCause","管制原因");
eventLabel.put("dcEventTrafficControl.exitsInlets","出入口"); eventLabel.put("dcEventTrafficControl.exitsInlets","出入口");
// eventLabel.put("dcEventTrafficControl.facilityId","设施id"); eventLabel.put("dcEventTrafficControl.facilityId","设施");
// eventLabel.put("dcEventTrafficControl.rampId","匝道"); // eventLabel.put("dcEventTrafficControl.rampId","匝道");
eventLabel.put("dcEventTrafficControl.causeType","原因类型"); eventLabel.put("dcEventTrafficControl.causeType","原因类型");
eventLabel.put("dcEventTrafficControl.measure","措施"); eventLabel.put("dcEventTrafficControl.measure","措施");

46
zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java

@ -89,6 +89,9 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
@Autowired @Autowired
private DcStakeMarkMapper dcStakeMarkMapper; private DcStakeMarkMapper dcStakeMarkMapper;
@Autowired
private DcRampMapper dcRampMapper;
private final String HAPPEN = "发生"; private final String HAPPEN = "发生";
private final String EVENT = "事件"; private final String EVENT = "事件";
private final String SUBEVENT = "0"; private final String SUBEVENT = "0";
@ -1814,6 +1817,49 @@ public class DcEventServiceImpl extends ServiceImpl<DcEventMapper, DcEvent> impl
} else if ("2".equals(result.getRight())) { } else if ("2".equals(result.getRight())) {
result.setRight("禁止"); result.setRight("禁止");
} }
} else if ("dcEventAccident.facilityId".equals(result.getRightPath())
|| "dcEventConstruction.facilityId".equals(result.getRightPath())
|| "dcEventServiceArea.facilityId".equals(result.getRightPath())
|| "dcEventTrafficCongestion.facilityId".equals(result.getRightPath())
|| "dcEventVehicleAccident.facilityId".equals(result.getRightPath())
|| "dcEventTrafficControl.facilityId".equals(result.getRightPath())){
DcFacility dcFacility = dcFacilityService.getFacility(result.getRight().toString());
if (dcFacility != null){
result.setRight(dcFacility.getFacilityName());
}
} else if ("dcEventAccident.location".equals(result.getRightPath())){
DcEventAccident dcEventAccident = newEvent.getDcEventAccident();
if (dcEventAccident.getLocationType() == 3){
DcRamp dcRamp = dcRampMapper.selectDcRampById((Long) result.getRight());
if (dcRamp != null){
result.setRight(dcRamp.getRampName());
}
} else if (dcEventAccident.getLocationType() == 4){
if ("1".equals(result.getRight())) {
result.setRight("入口车道");
} else if ("2".equals(result.getRight())) {
result.setRight("入口匝道");
} else if ("3".equals(result.getRight())) {
result.setRight("入口");
} else if ("4".equals(result.getRight())) {
result.setRight("入口内广场");
} else if ("5".equals(result.getRight())) {
result.setRight("出口车道");
} else if ("6".equals(result.getRight())) {
result.setRight("出口匝道");
} else if ("7".equals(result.getRight())) {
result.setRight("外广场");
} else if ("8".equals(result.getRight())) {
result.setRight("出口");
} else if ("9".equals(result.getRight())) {
result.setRight("(站外)入口匝道");
} else if ("10".equals(result.getRight())) {
result.setRight("(站外)出口匝道");
} else if ("11".equals(result.getRight())) {
result.setRight("出口内广场");
}
}
} }
String label = ValueConverter.eventLabel(result.getRightPath()); String label = ValueConverter.eventLabel(result.getRightPath());
if (StringUtils.isNotEmpty(label)) { if (StringUtils.isNotEmpty(label)) {

Loading…
Cancel
Save