|
@@ -79,6 +79,45 @@ public class DeviceCmdApiController {
|
|
|
return messageResult;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @GetMapping("queryDeviceParam")
|
|
|
+ @ApiOperation(value="查询设备参数")
|
|
|
+ public MessageResult<Map> queryDeviceParam(){
|
|
|
+ MessageResult<Map> messageResult = new MessageResult<>();
|
|
|
+
|
|
|
+ try {
|
|
|
+ DataDictionary regExpiredDays = dataDictionaryService.findByName("乘客登记照过期天数");
|
|
|
+ DataDictionary captureExpiredDays = dataDictionaryService.findByName("乘客抓拍照过期天数");
|
|
|
+
|
|
|
+ Map<String,Object> data = new HashMap<>();
|
|
|
+
|
|
|
+ if (regExpiredDays!=null) {
|
|
|
+ data.put("regExpiredDays", regExpiredDays.getValue());
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ data.put("regExpiredDays", 30);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (captureExpiredDays!=null) {
|
|
|
+ data.put("captureExpiredDays", captureExpiredDays.getValue());
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ data.put("captureExpiredDays", 7);
|
|
|
+ }
|
|
|
+
|
|
|
+ messageResult.setData(data);
|
|
|
+ messageResult.setResult(true);
|
|
|
+ }
|
|
|
+ catch (Exception ex){
|
|
|
+ log.error(ex.getMessage(),ex);
|
|
|
+
|
|
|
+ messageResult.setResult(false);
|
|
|
+ messageResult.setMessage(ex.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
+ return messageResult;
|
|
|
+ }
|
|
|
+
|
|
|
@PostMapping("downloadCommand")
|
|
|
@ApiOperation(value="下载设备待执行命令")
|
|
|
public MessageResult<List> downloadCommand(@RequestBody JSONObject requestBody){
|