mdf:大屏显示今日任务报警时间接口
This commit is contained in:
@@ -82,7 +82,8 @@ public class DeviceBigScreenController {
|
|||||||
@PostMapping("/updateWarnTime")
|
@PostMapping("/updateWarnTime")
|
||||||
@Log("当日任务列表")
|
@Log("当日任务列表")
|
||||||
@ApiOperation("当日任务列表")
|
@ApiOperation("当日任务列表")
|
||||||
public void getTodayTask(@RequestBody JSONObject json){
|
public ResponseEntity<Object> getTodayTask(@RequestBody JSONObject json){
|
||||||
deviceBigScreenService.updateWarnTime(json);
|
JSONObject jsonObject = deviceBigScreenService.updateWarnTime(json);
|
||||||
|
return new ResponseEntity<>(jsonObject,HttpStatus.OK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,5 +55,5 @@ public interface DeviceBigScreenService {
|
|||||||
/**
|
/**
|
||||||
* 更新播报时间
|
* 更新播报时间
|
||||||
*/
|
*/
|
||||||
void updateWarnTime(JSONObject json);
|
JSONObject updateWarnTime(JSONObject json);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -546,7 +546,8 @@ public class DeviceBigScreenServiceImpl implements DeviceBigScreenService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateWarnTime(JSONObject json) {
|
public JSONObject updateWarnTime(JSONObject json) {
|
||||||
|
JSONObject result = new JSONObject();
|
||||||
if (ObjectUtil.isNotEmpty(json)){
|
if (ObjectUtil.isNotEmpty(json)){
|
||||||
try {
|
try {
|
||||||
JSONArray ids = json.getJSONArray("ids");
|
JSONArray ids = json.getJSONArray("ids");
|
||||||
@@ -555,9 +556,14 @@ public class DeviceBigScreenServiceImpl implements DeviceBigScreenService {
|
|||||||
param.put("WARN_TIME", DateUtil.now());
|
param.put("WARN_TIME", DateUtil.now());
|
||||||
WQLObject deviceRepairRequest = WQLObject.getWQLObject("EM_BI_DeviceRepairRequest");
|
WQLObject deviceRepairRequest = WQLObject.getWQLObject("EM_BI_DeviceRepairRequest");
|
||||||
deviceRepairRequest.update(param,"request_id in (\'"+requestId+"\')");
|
deviceRepairRequest.update(param,"request_id in (\'"+requestId+"\')");
|
||||||
|
result.put("code", "1");
|
||||||
|
result.put("desc", "更新成功");
|
||||||
}catch (Exception ex){
|
}catch (Exception ex){
|
||||||
|
result.put("code", "0");
|
||||||
|
result.put("desc", "更新失败");
|
||||||
log.error("updateWarnTime error:{}",ex.getMessage());
|
log.error("updateWarnTime error:{}",ex.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user