瀏覽代碼

修改镜屏推送信息

konghl 4 年之前
父節點
當前提交
53804e97f6

+ 8 - 4
location-rescue-service/src/main/java/com/ai/bss/location/rescue/controller/AlarmManagementController.java

19
import com.ai.bss.components.common.model.PageBean;
19
import com.ai.bss.components.common.model.PageBean;
20
import com.ai.bss.location.rescue.service.interfaces.AlarmManagementService;
20
import com.ai.bss.location.rescue.service.interfaces.AlarmManagementService;
21
import com.ai.bss.location.rescue.util.EbcConstant;
21
import com.ai.bss.location.rescue.util.EbcConstant;
22
import com.ai.bss.position.model.EntityPosition;
22
import com.ai.bss.work.rescue.model.WorkTaskRescue;
23
import com.ai.bss.work.rescue.model.WorkTaskRescue;
23
import com.ai.bss.work.task.model.common.WorkTask;
24
import com.ai.bss.work.task.model.common.WorkTask;
24
25
74
	 */
75
	 */
75
	@ResponseBody
76
	@ResponseBody
76
	@RequestMapping("/assignRescuer")
77
	@RequestMapping("/assignRescuer")
77
	public CommonResponse<WorkTaskRescue> assignRescuer(@RequestBody Map<String, String> params,
78
	public CommonResponse<EntityPosition> assignRescuer(@RequestBody Map<String, String> params,
78
			HttpServletRequest request) throws Exception {
79
			HttpServletRequest request) throws Exception {
79
		if (params == null || StringUtils.isEmpty(params.get("workTaskId"))
80
		if (params == null || StringUtils.isEmpty(params.get("workTaskId"))
80
				|| StringUtils.isEmpty(params.get("rescuersId"))) {
81
				|| StringUtils.isEmpty(params.get("rescuersId"))) {
112
		workTaskRescue.setWorkTaskId(params.get("workTaskId"));
113
		workTaskRescue.setWorkTaskId(params.get("workTaskId"));
113
		workTaskRescue.setCloseTime(new Date());
114
		workTaskRescue.setCloseTime(new Date());
114
115
115
		return alarmManagementService.closeRescue(workTaskRescue, params.get("isFalseAlarm"));
116
		return alarmManagementService.closeRescue(workTaskRescue, params.get("isAssignAlarm"));
116
	}
117
	}
117
118
118
	/**
119
	/**
163
	*/
164
	*/
164
	@ResponseBody
165
	@ResponseBody
165
	@RequestMapping("/deleteCloseAlarm")
166
	@RequestMapping("/deleteCloseAlarm")
166
	public CommonResponse<Void> deleteCloseAlarm(@RequestBody Map<String, String> params) throws Exception {
167
	public  CommonResponse<WorkTaskRescue> deleteCloseAlarm(@RequestBody Map<String, String> params) throws Exception {
167
		if (params == null || StringUtils.isEmpty(params.get("workTaskId"))) {
168
		if (params == null || StringUtils.isEmpty(params.get("workTaskId"))) {
168
			return CommonResponse.fail("500", "删除失败");
169
			return CommonResponse.fail("500", "删除失败");
169
		}
170
		}
170
171
171
		return alarmManagementService.deleteCloseAlarm(params);
172
		WorkTaskRescue workTaskRescue = new WorkTaskRescue();
173
        workTaskRescue.setWorkTaskId(params.get("workTaskId"));
174
		
175
		return alarmManagementService.deleteCloseAlarm(workTaskRescue);
172
	}
176
	}
173
}
177
}

+ 18 - 6
location-rescue-service/src/main/java/com/ai/bss/location/rescue/service/impl/AlarmManagementServiceImpl.java

20
import com.ai.bss.location.rescue.service.interfaces.AlarmManagementService;
20
import com.ai.bss.location.rescue.service.interfaces.AlarmManagementService;
21
import com.ai.bss.location.rescue.util.DateUtil;
21
import com.ai.bss.location.rescue.util.DateUtil;
22
import com.ai.bss.location.rescue.util.EbcConstant;
22
import com.ai.bss.location.rescue.util.EbcConstant;
23
import com.ai.bss.position.model.EntityPosition;
23
import com.ai.bss.position.model.MapAreaBusinessType;
24
import com.ai.bss.position.model.MapAreaBusinessType;
25
import com.ai.bss.position.repository.EntityPositionRepository;
24
import com.ai.bss.position.service.api.MapAreaQuery;
26
import com.ai.bss.position.service.api.MapAreaQuery;
25
import com.ai.bss.work.rescue.model.WorkTaskRescue;
27
import com.ai.bss.work.rescue.model.WorkTaskRescue;
26
import com.ai.bss.work.rescue.service.api.RescueCommand;
28
import com.ai.bss.work.rescue.service.api.RescueCommand;
40
42
41
	@Autowired
43
	@Autowired
42
	private RescueQueryService rescueQueryService;
44
	private RescueQueryService rescueQueryService;
45
	
46
	@Autowired
47
	private EntityPositionRepository entityPositionRepository;
43
48
44
	@Autowired
49
	@Autowired
45
	private MapAreaTagQuery mapAreaTagQuery;
50
	private MapAreaTagQuery mapAreaTagQuery;
145
	 * @throws Exception
150
	 * @throws Exception
146
	 */
151
	 */
147
	@Override
152
	@Override
148
	public CommonResponse<WorkTaskRescue> assignRescuer(WorkTaskRescue workTaskRescue) throws Exception {
153
	public CommonResponse<EntityPosition> assignRescuer(WorkTaskRescue workTaskRescue) throws Exception {
149
		CommonRequest<WorkTaskRescue> commonRequest = new CommonRequest<WorkTaskRescue>(workTaskRescue);
154
		CommonRequest<WorkTaskRescue> commonRequest = new CommonRequest<WorkTaskRescue>(workTaskRescue);
150
		return rescueCommand.assignRescueEmployee(commonRequest);
155
		
156
		List<EntityPosition> list = entityPositionRepository.findByEntityId(workTaskRescue.getWorkTaskId());
157
		if (!CollectionUtils.isEmpty(list)) {
158
			return CommonResponse.ok(list.get(0));
159
		}else {
160
			return CommonResponse.ok(null);
161
		}
162
		
151
	}
163
	}
152
164
153
	/**
165
	/**
260
	/**
272
	/**
261
	 * 删除历史报警
273
	 * 删除历史报警
262
	 * 
274
	 * 
263
	* @param params
275
	* @param workTaskRescue
264
	* @return
276
	* @return
265
	* @throws Exception
277
	* @throws Exception
266
	*/
278
	*/
267
	@Override
279
	@Override
268
	public CommonResponse<Void> deleteCloseAlarm(Map<String, String> params) throws Exception {
269
270
		return null;
280
	public CommonResponse<WorkTaskRescue> deleteCloseAlarm(WorkTaskRescue workTaskRescue) throws Exception {
281
		CommonRequest<WorkTaskRescue> commonRequest=new CommonRequest(workTaskRescue);
282
		return rescueCommand.deleteTask(commonRequest);
271
	}
283
	}
272
284
273
}
285
}

+ 4 - 3
location-rescue-service/src/main/java/com/ai/bss/location/rescue/service/interfaces/AlarmManagementService.java

6
6
7
import com.ai.abc.api.model.CommonResponse;
7
import com.ai.abc.api.model.CommonResponse;
8
import com.ai.bss.components.common.model.PageBean;
8
import com.ai.bss.components.common.model.PageBean;
9
import com.ai.bss.position.model.EntityPosition;
9
import com.ai.bss.work.rescue.model.WorkTaskRescue;
10
import com.ai.bss.work.rescue.model.WorkTaskRescue;
10
11
11
/**
12
/**
36
	 * @return
37
	 * @return
37
	 * @throws Exception
38
	 * @throws Exception
38
	 */
39
	 */
39
	CommonResponse<WorkTaskRescue> assignRescuer(WorkTaskRescue workTaskRescue) throws Exception;
40
	CommonResponse<EntityPosition> assignRescuer(WorkTaskRescue workTaskRescue) throws Exception;
40
41
41
	/**
42
	/**
42
	 * 关闭救援
43
	 * 关闭救援
70
	/**
71
	/**
71
	 * 删除历史报警
72
	 * 删除历史报警
72
	 * 
73
	 * 
73
	* @param params
74
	* @param workTaskRescue
74
	* @return
75
	* @return
75
	* @throws Exception
76
	* @throws Exception
76
	*/
77
	*/
77
	CommonResponse<Void> deleteCloseAlarm(Map<String, String> params) throws Exception;
78
	 CommonResponse<WorkTaskRescue> deleteCloseAlarm(WorkTaskRescue workTaskRescue) throws Exception;
78
79
79
}
80
}

+ 1 - 0
location-rescue-service/src/main/java/com/ai/bss/location/rescue/service/task/LocationMirrorTask.java

47
				resultMap.put("unaggregatedEntityPositionList", new ArrayList<EntityPosition>());
47
				resultMap.put("unaggregatedEntityPositionList", new ArrayList<EntityPosition>());
48
			}
48
			}
49
49
50
			resultMap.put("currentEntityPosition", commonRequest.getData().getCurrentEntityPosition());
50
			resultMap.put("countMap", locationManagementService.loadEmployeeStatusCount());
51
			resultMap.put("countMap", locationManagementService.loadEmployeeStatusCount());
51
52
52
			String msg = JSON.toJSONString(CommonResponse.ok(resultMap));
53
			String msg = JSON.toJSONString(CommonResponse.ok(resultMap));