|
|
@ -18,6 +18,7 @@ import com.zc.business.enums.UniversalEnum; |
|
|
|
import com.zc.business.enums.ValueConverter; |
|
|
|
import com.zc.business.enums.WarningSubclassEnum; |
|
|
|
import com.zc.business.mapper.DcEventMapper; |
|
|
|
import com.zc.business.mapper.DcEventProcessMapper; |
|
|
|
import com.zc.business.mapper.DcProcessConfigMapper; |
|
|
|
import com.zc.business.mapper.DcWarningMapper; |
|
|
|
import com.zc.business.service.IDcEventService; |
|
|
@ -67,6 +68,8 @@ public class DcWarningServiceImpl implements IDcWarningService { |
|
|
|
@Autowired |
|
|
|
private DcEventProcessServiceImpl dcEventProcessService; |
|
|
|
@Autowired |
|
|
|
private DcEventProcessMapper dcEventProcessMapper; |
|
|
|
@Autowired |
|
|
|
private IDcTrafficPoliceService dcTrafficPoliceService; |
|
|
|
@Autowired |
|
|
|
private DcProcessConfigMapper dcProcessConfigMapper; |
|
|
@ -272,6 +275,26 @@ public class DcWarningServiceImpl implements IDcWarningService { |
|
|
|
} |
|
|
|
//事件推送至 Websocket
|
|
|
|
int i = dcWarningMapper.insertDcWarning(dcWarning);//如果没有配置策略直接加入数据库;
|
|
|
|
|
|
|
|
//扫码报警提前插入处置记录
|
|
|
|
if (dcWarning.getWarningSource() == 5){ |
|
|
|
DcEventProcess dcEventProcess = new DcEventProcess(); |
|
|
|
dcEventProcess.setEventId(uuid); |
|
|
|
dcEventProcess.setSource(2); |
|
|
|
JSONObject otherConfig = new JSONObject(dcWarning.getOtherConfig()); |
|
|
|
String phone = otherConfig.getString("phone"); |
|
|
|
|
|
|
|
String direction = "1".equals(dcWarning.getDirection()) ? "菏泽方向" : "济南方向"; |
|
|
|
String typeName = ValueConverter.eventTypeName(dcWarning.getWarningType().toString()); |
|
|
|
|
|
|
|
String context = dcWarning.getStakeMark() + direction + "," + phone + "上报了一起" + typeName + "事件"; |
|
|
|
dcEventProcess.setContext(context); |
|
|
|
dcEventProcess.setOperatorName("上报人"); |
|
|
|
dcEventProcess.setOperationTime(new Date()); |
|
|
|
dcEventProcessMapper.insertDcEventProcess(dcEventProcess); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
extracted(dcWarning); |
|
|
|
return i; |
|
|
|
} |
|
|
|