diff --git a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalController.java b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalController.java index 3b1d535..cff7de2 100644 --- a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalController.java +++ b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalController.java @@ -7,6 +7,7 @@ import com.shxy.xymanager_common.bean.ServiceBody; import com.shxy.xymanager_common.bean.ServiceStatus; import com.shxy.xymanager_common.model.TerminalListModel; import com.shxy.xymanager_common.model.TerminalModel; +import com.shxy.xymanager_common.model.TerminalUpdateModel; import com.shxy.xymanager_common.vo.*; import com.shxy.xymanager_service.service.TerminalService; import io.swagger.annotations.Api; @@ -122,8 +123,8 @@ public class TerminalController extends BaseController { @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) @RequestMapping("/updateTerminalId") @Log(title = "图像装置ID设置", type = "修改") - public ResponseReult updateTerminalId(@RequestBody @Validated TerminalIdUpdateVo vo) { - ServiceBody serviceBody = terminalService.updateTerminalId(vo); + public ResponseReult updateTerminalId(@RequestBody @Validated TerminalIdUpdateVo vo) { + ServiceBody serviceBody = terminalService.updateTerminalId(vo); if (serviceBody.getCode() == ServiceStatus.SUCCESS) { return ResponseReult.success(serviceBody.getData()); } else { @@ -135,8 +136,8 @@ public class TerminalController extends BaseController { @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) @RequestMapping("/selectTerminalId") @Log(title = "图像装置ID查询", type = "修改") - public ResponseReult selectTerminalId(@RequestBody @Validated TerminalIdUpdateVo vo) { - ServiceBody serviceBody = terminalService.updateTerminalId(vo); + public ResponseReult selectTerminalId(@RequestBody @Validated TerminalIdUpdateVo vo) { + ServiceBody serviceBody = terminalService.updateTerminalId(vo); if (serviceBody.getCode() == ServiceStatus.SUCCESS) { return ResponseReult.success(serviceBody.getData()); } else { diff --git a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalPhotoController.java b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalPhotoController.java index 12e5a5f..169a316 100644 --- a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalPhotoController.java +++ b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalPhotoController.java @@ -62,8 +62,21 @@ public class TerminalPhotoController extends BaseController { @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) @RequestMapping("/getPhotoTime") @Log(title = "拍照时间表", type = "查询") - public ResponseReult getPhotoTime(@RequestBody @Validated TerminalPhotoTimeVo vo) { - ServiceBody serviceBody = terminalPhotoService.getPhotoTime(vo); + public ResponseReult getPhotoTime(@RequestBody @Validated TerminalPhotoTimeVo vo) { + ServiceBody serviceBody = terminalPhotoService.getPhotoTime(vo); + if (serviceBody.getCode() == ServiceStatus.SUCCESS) { + return ResponseReult.success(serviceBody.getData()); + } else { + return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg()); + } + } + + @ApiOperation(value = "拍照时间表查询触发", notes = "拍照时间表查询触发", httpMethod = "POST") + @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) + @RequestMapping("/selectPhotoTimeGet") + @Log(title = "拍照时间表查询触发", type = "查询") + public ResponseReult selectPhotoTimeGet(@RequestBody @Validated TerminalReqPhotoTimeVo vo) { + ServiceBody serviceBody = terminalPhotoService.selectPhotoTimeGet(vo); if (serviceBody.getCode() == ServiceStatus.SUCCESS) { return ResponseReult.success(serviceBody.getData()); } else { @@ -137,12 +150,12 @@ public class TerminalPhotoController extends BaseController { } } - @ApiOperation(value = "图像采集参数查询", notes = "图像采集参数查询", httpMethod = "POST") + @ApiOperation(value = "最新图片采集参数触发", notes = "最新图片采集参数触发", httpMethod = "POST") @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) @RequestMapping("/getPhotoQueryParamList") - @Log(title = "图像采集参数查询", type = "查询") - public ResponseReult getPhotoQueryParamList(@RequestParam("termId") Integer termId) { - ServiceBody serviceBody = terminalPhotoService.getPhotoQueryParam(termId); + @Log(title = "最新图片采集参数触发", type = "查询") + public ResponseReult getPhotoQueryParamList(@RequestParam("termId") Integer termId) { + ServiceBody serviceBody = terminalPhotoService.getPhotoQueryParam(termId); if (serviceBody.getCode() == ServiceStatus.SUCCESS) { return ResponseReult.success(serviceBody.getData()); } else { @@ -150,10 +163,10 @@ public class TerminalPhotoController extends BaseController { } } - @ApiOperation(value = "获取最新图片采集参数", notes = "获取最新图片采集参数", httpMethod = "POST") + @ApiOperation(value = "图像采集参数查询", notes = "图像采集参数查询", httpMethod = "POST") @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) - @RequestMapping("/getLastedPhotoQueryParam") - @Log(title = "获取最新图片采集参数", type = "查询") + @RequestMapping("/photoQueryParamGet") + @Log(title = "图像采集参数查询", type = "查询") public ResponseReult getLastedPhotoQueryParam(@RequestBody @Validated ReturnedPhotoParamsVo vo) { ServiceBody serviceBody = terminalPhotoService.getLastedPhotoQueryParam(vo); if (serviceBody.getCode() == ServiceStatus.SUCCESS) { diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/PhotoParamUpdateModel.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/PhotoParamUpdateModel.java new file mode 100644 index 0000000..bc32bb5 --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/PhotoParamUpdateModel.java @@ -0,0 +1,19 @@ +package com.shxy.xymanager_common.model; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * 图片轮询列表 + */ +@Data +@ApiModel(value = "图片采集参数更新对象", description = "图片采集参数对象信息") +public class PhotoParamUpdateModel implements Serializable { + @ApiModelProperty(value = "装置编号", example = "120") + private Integer termId; + @ApiModelProperty(value = "请求ID", example = "120") + private Integer requestId; +} diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalPhotosParamsModel.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalPhotosParamsModel.java index 3dfc6eb..40fae6b 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalPhotosParamsModel.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalPhotosParamsModel.java @@ -41,7 +41,5 @@ public class TerminalPhotosParamsModel implements Serializable { @ApiModelProperty(value = "心跳上送周期", example = "123456") private String cmdId; - @ApiModelProperty(value = "查询时间", example = "123456") - private DateTime queryTime; } diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalPhotosTimeModel.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalPhotosTimeModel.java index 2f3c265..a6a5647 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalPhotosTimeModel.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalPhotosTimeModel.java @@ -25,7 +25,7 @@ public class TerminalPhotosTimeModel implements Serializable { private Integer termId; - @ApiModelProperty(value = "自定义图像分辨率", example = "123456") + @ApiModelProperty(value = "请求ID", example = "123456") private Integer requestId; } diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalUpdateModel.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalUpdateModel.java new file mode 100644 index 0000000..4176e91 --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalUpdateModel.java @@ -0,0 +1,22 @@ +package com.shxy.xymanager_common.model; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigInteger; +import java.util.Date; +import java.util.List; + +/** + * 图片轮询列表 + */ +@Data +@ApiModel(value = "装置ID更新对象", description = "图片轮询列表对象信息") +public class TerminalUpdateModel implements Serializable { + @ApiModelProperty(value = "装置编号", example = "120") + private Integer termId; + @ApiModelProperty(value = "请求ID", example = "120") + private Integer requestId; +} diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/ReturnedPhotoParamsVo.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/ReturnedPhotoParamsVo.java index 7695771..94466cd 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/ReturnedPhotoParamsVo.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/ReturnedPhotoParamsVo.java @@ -16,5 +16,5 @@ public class ReturnedPhotoParamsVo { @ApiModelProperty(value = "手动拍照时间", required = true, example = "A0001") - private DateTime photoTime; + private Integer requestId; } diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalIdUpdateVo.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalIdUpdateVo.java index 2a482b3..123383c 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalIdUpdateVo.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalIdUpdateVo.java @@ -7,6 +7,9 @@ import lombok.Data; @Data @ApiModel(value = "装置信息对象", description = "设备信息对象描述") public class TerminalIdUpdateVo { + @ApiModelProperty(value = "装置编号", example = "123456") + private Integer termId; + @ApiModelProperty(value = "装置ID", example = "123456") private String cmdId; diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalReqPhotoTimeVo.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalReqPhotoTimeVo.java index 0d68b4d..a323e24 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalReqPhotoTimeVo.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalReqPhotoTimeVo.java @@ -18,9 +18,13 @@ public class TerminalReqPhotoTimeVo { @ApiModelProperty(value = "装置ID", example = "123455") private Short termId; + @NotNull(message = "检测装置ID不能缺少") + @ApiModelProperty(value = "检测装置ID", example = "123455") + private Short cmdId; + @ApiModelProperty(value = "请求ID", example = "123455") - private String requestId; + private Integer requestId; } diff --git a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalPhotoDao.java b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalPhotoDao.java index f499f45..114bbf2 100644 --- a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalPhotoDao.java +++ b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalPhotoDao.java @@ -47,7 +47,7 @@ public interface TerminalPhotoDao { BigInteger getLatestPhotoParam(Integer termId); - String getRequestResult(@Param("requestId") String requestId); + String getRequestResult(@Param("requestId") Integer requestId); } \ No newline at end of file diff --git a/xymanager_dao/src/main/resources/mappers/TerminalPhotoDao.xml b/xymanager_dao/src/main/resources/mappers/TerminalPhotoDao.xml index 10903e0..9ea5362 100644 --- a/xymanager_dao/src/main/resources/mappers/TerminalPhotoDao.xml +++ b/xymanager_dao/src/main/resources/mappers/TerminalPhotoDao.xml @@ -286,7 +286,7 @@ select result from request_results - where request_id = #{requestId,jdbcType=VARCHAR} + where request_id = #{requestId,jdbcType=TINYINT}