From 2be275027e708456f925f3dcdb5a9cfd897d6f3b Mon Sep 17 00:00:00 2001 From: huangzj <826100833@qq.com> Date: Mon, 17 Apr 2023 09:28:29 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pojo/param/CsDevModelAddParm.java | 4 +- .../pojo/param/CsDevModelAuditParm.java | 4 +- .../pojo/param/CsDevModelQueryListParm.java | 15 ++++-- .../pojo/param/CsDevModelQueryParm.java | 10 ++-- .../algorithm/pojo/param/CsDictAddParm.java | 1 + .../algorithm/pojo/param/CsEdDataAddParm.java | 4 +- .../pojo/param/CsEdDataAuditParm.java | 4 +- .../pojo/param/CsEdDataQueryParm.java | 8 +-- .../param/CsEngineeringQueryPageParm.java | 49 ++++++++++++++++++ .../algorithm/pojo/vo/CsEngineeringVO.java | 6 +++ .../algorithm/pojo/vo/ProjectEquipmentVO.java | 11 ++++ .../Equipment/DevModelController.java | 4 +- .../project/EngineeringController.java | 13 +++++ .../mapper/mapping/CsDevModelMapper.xml | 12 +++-- .../mapping/CsEquipmentDeliveryMapper.xml | 6 ++- ...apper.xml => CsProjectEquipmentMapper.xml} | 0 .../service/CsEngineeringService.java | 12 ++++- .../impl/CsEngineeringServiceImpl.java | 51 +++++++++++++++++++ 18 files changed, 184 insertions(+), 30 deletions(-) create mode 100644 pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEngineeringQueryPageParm.java rename pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/{CsProject EquipmentMapper.xml => CsProjectEquipmentMapper.xml} (100%) diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelAddParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelAddParm.java index ecb2bcf46..819163b20 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelAddParm.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelAddParm.java @@ -37,8 +37,8 @@ public class CsDevModelAddParm { * 版本日期 */ @ApiModelProperty(value = "版本日期") - @DateTimeFormat(pattern="yyyy-MM-dd") - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") private Date versionDate; /** diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelAuditParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelAuditParm.java index e7a83e28d..4039fcbc1 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelAuditParm.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelAuditParm.java @@ -39,8 +39,8 @@ public class CsDevModelAuditParm { * 版本日期 */ @ApiModelProperty(value = "版本日期") - @DateTimeFormat(pattern="yyyy-MM-dd") - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") private Date versionDate; /** diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelQueryListParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelQueryListParm.java index a61300a9e..c99e33785 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelQueryListParm.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelQueryListParm.java @@ -31,14 +31,19 @@ public class CsDevModelQueryListParm { * 版本日期 */ @ApiModelProperty(value = "版本日期") - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") - @DateTimeFormat(pattern="yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private String versionStartDate; @ApiModelProperty(value = "版本日期") - @DateTimeFormat(pattern="yyyy-MM-dd") - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") - private String versionendDate; + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private String versionEndDate; + + @ApiModelProperty(value = "版本准确日期") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private String versionDate; diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelQueryParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelQueryParm.java index cc535e912..d27a5e297 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelQueryParm.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDevModelQueryParm.java @@ -43,14 +43,14 @@ public class CsDevModelQueryParm { * 版本日期 */ @ApiModelProperty(value = "版本日期") - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") - @DateTimeFormat(pattern="yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private String versionStartDate; @ApiModelProperty(value = "版本日期") - @DateTimeFormat(pattern="yyyy-MM-dd") - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") - private String versionendDate; + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private String versionEndDate; diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDictAddParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDictAddParm.java index 1207b04b7..78f5f7aca 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDictAddParm.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsDictAddParm.java @@ -41,4 +41,5 @@ public class CsDictAddParm { @ApiModelProperty(value = "sort") private Integer sort; + } \ No newline at end of file diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataAddParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataAddParm.java index 46f01eecb..db4cfaea8 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataAddParm.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataAddParm.java @@ -50,8 +50,8 @@ public class CsEdDataAddParm { * 版本日期 */ @ApiModelProperty(value = "版本日期") - @DateTimeFormat(pattern="yyyy-MM-dd") - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") private Date versionDate; /** diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataAuditParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataAuditParm.java index 4a722abe3..ee922c83b 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataAuditParm.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataAuditParm.java @@ -47,8 +47,8 @@ public class CsEdDataAuditParm { * 版本日期 */ @ApiModelProperty(value = "版本日期") - @DateTimeFormat(pattern="yyyy-MM-dd") - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") private LocalDate versionDate; /** diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataQueryParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataQueryParm.java index 739b19580..b2fda15c1 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataQueryParm.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEdDataQueryParm.java @@ -43,13 +43,13 @@ public class CsEdDataQueryParm { * 版本日期 */ @ApiModelProperty(value = "版本日期") - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") - @DateTimeFormat(pattern="yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private String versionStartDate; @ApiModelProperty(value = "版本日期") - @DateTimeFormat(pattern="yyyy-MM-dd") - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") private String versionendDate; diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEngineeringQueryPageParm.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEngineeringQueryPageParm.java new file mode 100644 index 000000000..e061bacd3 --- /dev/null +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/param/CsEngineeringQueryPageParm.java @@ -0,0 +1,49 @@ +package com.njcn.algorithm.pojo.param; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; + +/** + * Description: + * 接口文档访问地址:http://serverIP:port/swagger-ui.html + * Date: 2023/4/10 19:47【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Data +public class CsEngineeringQueryPageParm { + + @NotNull(message="当前页不能为空!") + @Min(value = 1, message = "当前页不能为0") + @ApiModelProperty(value = "当前页",name = "currentPage",dataType ="Integer",required = true) + private Integer currentPage; + /**显示条数*/ + @NotNull(message="显示条数不能为空!") + @ApiModelProperty(value = "显示条数",name = "pageSize",dataType ="Integer",required = true) + private Integer pageSize; + @ApiModelProperty(value = "工程名称") + private String name; + + /** + * 用户id + */ + @ApiModelProperty(value = "用户id") + private String userId; + + /** + * 省 + */ + @ApiModelProperty(value = "省") + private String province; + + /** + * 市 + */ + @ApiModelProperty(value = "市") + private String city; + +} diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsEngineeringVO.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsEngineeringVO.java index 21925d84f..c54484e1d 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsEngineeringVO.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/CsEngineeringVO.java @@ -45,12 +45,18 @@ public class CsEngineeringVO extends BaseEntity { @ApiModelProperty(value = "省") private String province; + @ApiModelProperty(value = "省名称") + private String provinceName; + /** * 市 */ @ApiModelProperty(value = "市") private String city; + @ApiModelProperty(value = "市名称") + private String cityName; + /** * 描述 */ diff --git a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/ProjectEquipmentVO.java b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/ProjectEquipmentVO.java index cfa439bd0..c618518b6 100644 --- a/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/ProjectEquipmentVO.java +++ b/pqs-algorithm/algorithm-api/src/main/java/com/njcn/algorithm/pojo/vo/ProjectEquipmentVO.java @@ -17,6 +17,17 @@ import lombok.Data; @Data public class ProjectEquipmentVO { + /** + * id + */ + @ApiModelProperty(value = "工程id") + private String engineeringid; + + /** + * 工程名称 + */ + @ApiModelProperty(value = "工程名称") + private String engineeringName; @ApiModelProperty(value = "项目id") private String projectId; diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/Equipment/DevModelController.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/Equipment/DevModelController.java index ebac5a6fe..7546bd1b2 100644 --- a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/Equipment/DevModelController.java +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/Equipment/DevModelController.java @@ -81,8 +81,8 @@ public class DevModelController extends BaseController { @OperateInfo(info = LogEnum.BUSINESS_COMMON) @PostMapping("/queryEquipmentByProject") - @ApiOperation("通过项目查询出厂设备") - @ApiImplicitParam(name = "csDevModelQueryListParm", value = "项目信息", required = true) + @ApiOperation("设备模板列表查询") + @ApiImplicitParam(name = "csDevModelQueryListParm", value = "信息", required = true) public HttpResult> queryEquipmentByProject(@RequestBody CsDevModelQueryListParm csDevModelQueryListParm){ String methodDescribe = getMethodDescribe("queryEquipmentByProject"); diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/project/EngineeringController.java b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/project/EngineeringController.java index 2aac52f41..80ce57f75 100644 --- a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/project/EngineeringController.java +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/controller/project/EngineeringController.java @@ -1,7 +1,9 @@ package com.njcn.algorithm.controller.project; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.njcn.algorithm.pojo.param.CsEngineeringAddParm; import com.njcn.algorithm.pojo.param.CsEngineeringAuditParm; +import com.njcn.algorithm.pojo.param.CsEngineeringQueryPageParm; import com.njcn.algorithm.pojo.param.CsEngineeringQueryParm; import com.njcn.algorithm.pojo.vo.CsEngineeringVO; import com.njcn.algorithm.service.CsEngineeringService; @@ -74,4 +76,15 @@ public class EngineeringController extends BaseController { List csEngineeringVOList = csEngineeringService.queryEngineering(csEngineeringQueryParm); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, csEngineeringVOList, methodDescribe); } + + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @PostMapping("/queryEngineeringPage") + @ApiOperation("分页查询工程列表") + @ApiImplicitParam(name = "csEngineeringQueryPageParm", value = "修改项目参数", required = true) + public HttpResult> queryEngineeringPage(@Validated @RequestBody CsEngineeringQueryPageParm csEngineeringQueryPageParm){ + String methodDescribe = getMethodDescribe("queryEngineeringPage"); + + IPage page = csEngineeringService.queryEngineeringPage(csEngineeringQueryPageParm); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe); + } } diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsDevModelMapper.xml b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsDevModelMapper.xml index 61a53632b..f0455fb44 100644 --- a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsDevModelMapper.xml +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsDevModelMapper.xml @@ -29,8 +29,8 @@ AND a.version_date >= #{csDevModelQueryParm.versionStartDate } - - AND a.version_date <= #{csDevModelQueryParm.versionendDate } + + AND a.version_date <= #{csDevModelQueryParm.versionEndDate } @@ -49,8 +49,12 @@ AND a.version_date >= #{csDevModelQueryListParm.versionStartDate } - - AND a.version_date <= #{csDevModelQueryListParm.versionendDate } + + AND a.version_date <= #{csDevModelQueryListParm.versionEndDate } + + + + AND a.version_date = #{csDevModelQueryListParm.versionDate } diff --git a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEquipmentDeliveryMapper.xml b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEquipmentDeliveryMapper.xml index ad4ba21eb..5d082d682 100644 --- a/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEquipmentDeliveryMapper.xml +++ b/pqs-algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/mapper/mapping/CsEquipmentDeliveryMapper.xml @@ -32,15 +32,19 @@