Browse Source

增加交通事件-根据事件、单个执行操作筛选设备接口

develop
Mr.Wang 11 months ago
parent
commit
ad774fea01
  1. 9
      zc-business/src/main/java/com/zc/business/controller/DcEmergencyPlansController.java
  2. 6
      zc-business/src/main/java/com/zc/business/domain/DcEventAnDcEmergencyPlans.java
  3. 5
      zc-business/src/main/java/com/zc/business/service/DcEmergencyPlansService.java
  4. 18
      zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java

9
zc-business/src/main/java/com/zc/business/controller/DcEmergencyPlansController.java

@ -82,6 +82,15 @@ public class DcEmergencyPlansController extends BaseController {
return AjaxResult.success(dcEmergencyPlansList.get(0));
}
/**
* 交通事件-根据事件单个执行操作筛选设备
*/
@ApiOperation("交通事件-根据事件、单个执行操作筛选设备")
@PostMapping("/list/event/deviceList")
public AjaxResult selectDeviceListByEventDcExecuteAction(@RequestBody DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans) {
return AjaxResult.success(dcEmergencyPlansService.selectDeviceListByEventDcExecuteAction(dcEventAnDcEmergencyPlans));
}
/**
* 交通事件-情报板确认回显原始模板
*/

6
zc-business/src/main/java/com/zc/business/domain/DcEventAnDcEmergencyPlans.java

@ -37,6 +37,12 @@ public class DcEventAnDcEmergencyPlans {
@ApiModelProperty("事件预案数据")
private DcEmergencyPlans dcEmergencyPlans;
/**
* 单个执行操作数据
*/
@ApiModelProperty("单个执行操作数据")
private DcExecuteAction dcExecuteAction;
/**
* 情报板模板数据
*/

5
zc-business/src/main/java/com/zc/business/service/DcEmergencyPlansService.java

@ -44,6 +44,11 @@ public interface DcEmergencyPlansService {
*/
void dispositionDeviceContent(List<DcEmergencyPlans> list, DcEvent dcEvent);
/**
* 交通事件-根据事件单个执行操作筛选设备
*/
List<DcDevice> selectDeviceListByEventDcExecuteAction(DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans);
/**
* 交通事件-情报板确认回显原始模板
*/

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

@ -185,6 +185,24 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
});
}
/**
* 交通事件-根据事件单个执行操作筛选设备
* @param dcEventAnDcEmergencyPlans
* @return
*/
@Override
public List<DcDevice> selectDeviceListByEventDcExecuteAction(DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans) {
// 事件桩号
DcEvent dcEvent = dcEventAnDcEmergencyPlans.getDcEvent();
dcEvent.setStakeMark(dcEvent.getStakeMark().replace("K", ""));
String[] markArray = dcEvent.getStakeMark().split("\\+");
if (markArray[1].length() < 3) {
// 不足三位 补零
markArray[1] = String.format("%0" + 3 + "d", markArray[1]);
}
return ruleFiltering(dcEventAnDcEmergencyPlans.getDcExecuteAction(), markArray, dcEvent.getDirection());
}
/**
* 更改智能发布中的发布内容-计算公里数
*/

Loading…
Cancel
Save