Commit e884db38b963502f7129ef8fbb8de237b3b25924
1 parent
cd085bae
养护计划优化提交
Showing
7 changed files
with
38 additions
and
35 deletions
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/road/vo/RoadPageReqVO.java
| @@ -35,16 +35,16 @@ public class RoadPageReqVO extends PageParam { | @@ -35,16 +35,16 @@ public class RoadPageReqVO extends PageParam { | ||
| 35 | private String direction; | 35 | private String direction; |
| 36 | 36 | ||
| 37 | @Schema(description = "行道树绿化面积") | 37 | @Schema(description = "行道树绿化面积") |
| 38 | - private String greenBeltTreeArea; | 38 | + private Float greenBeltTreeArea; |
| 39 | 39 | ||
| 40 | @Schema(description = "绿化带面积") | 40 | @Schema(description = "绿化带面积") |
| 41 | - private String greenBeltArea; | 41 | + private Float greenBeltArea; |
| 42 | 42 | ||
| 43 | @Schema(description = "总绿化带面积") | 43 | @Schema(description = "总绿化带面积") |
| 44 | - private String totalArea; | 44 | + private Float totalArea; |
| 45 | 45 | ||
| 46 | @Schema(description = "行道树(棵)面积") | 46 | @Schema(description = "行道树(棵)面积") |
| 47 | - private String treeArea; | 47 | + private Float treeArea; |
| 48 | 48 | ||
| 49 | @Schema(description = "起点经度") | 49 | @Schema(description = "起点经度") |
| 50 | private String startingLatitude; | 50 | private String startingLatitude; |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/road/vo/RoadRespVO.java
| @@ -46,19 +46,19 @@ public class RoadRespVO { | @@ -46,19 +46,19 @@ public class RoadRespVO { | ||
| 46 | 46 | ||
| 47 | @Schema(description = "行道树绿化面积", requiredMode = Schema.RequiredMode.REQUIRED) | 47 | @Schema(description = "行道树绿化面积", requiredMode = Schema.RequiredMode.REQUIRED) |
| 48 | @ExcelProperty("行道树绿化面积") | 48 | @ExcelProperty("行道树绿化面积") |
| 49 | - private String greenBeltTreeArea; | 49 | + private Float greenBeltTreeArea; |
| 50 | 50 | ||
| 51 | @Schema(description = "绿化带面积", requiredMode = Schema.RequiredMode.REQUIRED) | 51 | @Schema(description = "绿化带面积", requiredMode = Schema.RequiredMode.REQUIRED) |
| 52 | @ExcelProperty("绿化带面积") | 52 | @ExcelProperty("绿化带面积") |
| 53 | - private String greenBeltArea; | 53 | + private Float greenBeltArea; |
| 54 | 54 | ||
| 55 | @Schema(description = "总绿化带面积", requiredMode = Schema.RequiredMode.REQUIRED) | 55 | @Schema(description = "总绿化带面积", requiredMode = Schema.RequiredMode.REQUIRED) |
| 56 | @ExcelProperty("总绿化带面积") | 56 | @ExcelProperty("总绿化带面积") |
| 57 | - private String totalArea; | 57 | + private Float totalArea; |
| 58 | 58 | ||
| 59 | @Schema(description = "行道树(棵)面积", requiredMode = Schema.RequiredMode.REQUIRED) | 59 | @Schema(description = "行道树(棵)面积", requiredMode = Schema.RequiredMode.REQUIRED) |
| 60 | @ExcelProperty("行道树(棵)面积") | 60 | @ExcelProperty("行道树(棵)面积") |
| 61 | - private String treeArea; | 61 | + private Float treeArea; |
| 62 | 62 | ||
| 63 | @Schema(description = "起点经度", requiredMode = Schema.RequiredMode.REQUIRED) | 63 | @Schema(description = "起点经度", requiredMode = Schema.RequiredMode.REQUIRED) |
| 64 | @ExcelProperty("起点经度") | 64 | @ExcelProperty("起点经度") |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/road/vo/RoadSaveReqVO.java
| @@ -39,24 +39,28 @@ public class RoadSaveReqVO { | @@ -39,24 +39,28 @@ public class RoadSaveReqVO { | ||
| 39 | private String direction; | 39 | private String direction; |
| 40 | 40 | ||
| 41 | @Schema(description = "行道树绿化面积", requiredMode = Schema.RequiredMode.REQUIRED) | 41 | @Schema(description = "行道树绿化面积", requiredMode = Schema.RequiredMode.REQUIRED) |
| 42 | - @NotEmpty(message = "行道树绿化面积不能为空") | ||
| 43 | - @Size(min=1, max = 200000, message = "行道树绿化面积长度") | ||
| 44 | - private String greenBeltTreeArea; | 42 | + @NotNull(message = "行道树绿化面积") // 注意:Float 是包装类,用 @NotNull |
| 43 | + @DecimalMin(value = "0.0", inclusive = true, message = "绿化带面积不能小于 0") | ||
| 44 | + @DecimalMax(value = "99999.99", inclusive = true, message = "绿化带面积不能大于 99999.99") | ||
| 45 | + private Float greenBeltTreeArea; | ||
| 45 | 46 | ||
| 46 | @Schema(description = "绿化带面积", requiredMode = Schema.RequiredMode.REQUIRED) | 47 | @Schema(description = "绿化带面积", requiredMode = Schema.RequiredMode.REQUIRED) |
| 47 | - @NotEmpty(message = "绿化带面积不能为空") | ||
| 48 | - @Size(min=1, max = 200000, message = "绿化带面积长度") | ||
| 49 | - private String greenBeltArea; | 48 | + @NotNull(message = "绿化带面积") // 注意:Float 是包装类,用 @NotNull |
| 49 | + @DecimalMin(value = "0.0", inclusive = true, message = "绿化带面积不能小于 0") | ||
| 50 | + @DecimalMax(value = "99999.99", inclusive = true, message = "绿化带面积不能大于 99999.99") | ||
| 51 | + private Float greenBeltArea; | ||
| 50 | 52 | ||
| 51 | @Schema(description = "总绿化带面积", requiredMode = Schema.RequiredMode.REQUIRED) | 53 | @Schema(description = "总绿化带面积", requiredMode = Schema.RequiredMode.REQUIRED) |
| 52 | - @NotEmpty(message = "总绿化带面积不能为空") | ||
| 53 | - @Size(min=1, max = 200000, message = "总绿化带面积长度") | ||
| 54 | - private String totalArea; | 54 | + @NotNull(message = "总绿化带面积不能为空") // 注意:Float 是包装类,用 @NotNull |
| 55 | + @DecimalMin(value = "0.0", inclusive = true, message = "总绿化带面积不能小于 0") | ||
| 56 | + @DecimalMax(value = "99999.99", inclusive = true, message = "总绿化带面积不能大于 99999.99") | ||
| 57 | + private Float totalArea; | ||
| 55 | 58 | ||
| 56 | @Schema(description = "行道树(棵)面积", requiredMode = Schema.RequiredMode.REQUIRED) | 59 | @Schema(description = "行道树(棵)面积", requiredMode = Schema.RequiredMode.REQUIRED) |
| 57 | - @NotEmpty(message = "行道树(棵)面积不能为空") | ||
| 58 | - @Size(min=1, max = 50, message = "行道树(棵)面积长度1-50") | ||
| 59 | - private String treeArea; | 60 | + @NotNull(message = "行道树(棵)面积不能为空") // 注意:Float 是包装类,用 @NotNull |
| 61 | + @DecimalMin(value = "0.0", inclusive = true, message = "行道树(棵)面积不能小于 0") | ||
| 62 | + @DecimalMax(value = "99999.99", inclusive = true, message = "行道树(棵)面积不能大于 99999.99") | ||
| 63 | + private Float treeArea; | ||
| 60 | 64 | ||
| 61 | @Schema(description = "起点经度", requiredMode = Schema.RequiredMode.REQUIRED) | 65 | @Schema(description = "起点经度", requiredMode = Schema.RequiredMode.REQUIRED) |
| 62 | @NotEmpty(message = "起点经度不能为空") | 66 | @NotEmpty(message = "起点经度不能为空") |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/vo/AppMaintainPlanDetailListByRoadPageReqVO.java
| @@ -16,6 +16,8 @@ import java.util.Set; | @@ -16,6 +16,8 @@ import java.util.Set; | ||
| 16 | @Data | 16 | @Data |
| 17 | public class AppMaintainPlanDetailListByRoadPageReqVO extends PageParam { | 17 | public class AppMaintainPlanDetailListByRoadPageReqVO extends PageParam { |
| 18 | 18 | ||
| 19 | + @Schema(description = "计划批次号") | ||
| 20 | + private String batchNo; | ||
| 19 | 21 | ||
| 20 | @Schema(description = "道路ID") | 22 | @Schema(description = "道路ID") |
| 21 | @NotNull | 23 | @NotNull |
| @@ -30,9 +32,9 @@ public class AppMaintainPlanDetailListByRoadPageReqVO extends PageParam { | @@ -30,9 +32,9 @@ public class AppMaintainPlanDetailListByRoadPageReqVO extends PageParam { | ||
| 30 | @Schema(description = "计划名称") | 32 | @Schema(description = "计划名称") |
| 31 | private String planName; | 33 | private String planName; |
| 32 | 34 | ||
| 33 | - @Schema(description = "计划批次号列表") | ||
| 34 | - @Hidden | ||
| 35 | - private Set<String> batchNos; | 35 | +// @Schema(description = "计划批次号列表") |
| 36 | +// @Hidden | ||
| 37 | +// private Set<String> batchNos; | ||
| 36 | 38 | ||
| 37 | @Schema(description = "业务线") | 39 | @Schema(description = "业务线") |
| 38 | @Hidden | 40 | @Hidden |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/road/RoadDO.java
| @@ -58,19 +58,19 @@ public class RoadDO extends BaseDO { | @@ -58,19 +58,19 @@ public class RoadDO extends BaseDO { | ||
| 58 | /** | 58 | /** |
| 59 | * 行道树绿化面积 | 59 | * 行道树绿化面积 |
| 60 | */ | 60 | */ |
| 61 | - private String greenBeltTreeArea; | 61 | + private Float greenBeltTreeArea; |
| 62 | /** | 62 | /** |
| 63 | * 绿化带面积 | 63 | * 绿化带面积 |
| 64 | */ | 64 | */ |
| 65 | - private String greenBeltArea; | 65 | + private Float greenBeltArea; |
| 66 | /** | 66 | /** |
| 67 | * 总绿化带面积 | 67 | * 总绿化带面积 |
| 68 | */ | 68 | */ |
| 69 | - private String totalArea; | 69 | + private Float totalArea; |
| 70 | /** | 70 | /** |
| 71 | * 行道树(棵)面积 | 71 | * 行道树(棵)面积 |
| 72 | */ | 72 | */ |
| 73 | - private String treeArea; | 73 | + private Float treeArea; |
| 74 | /** | 74 | /** |
| 75 | * 起点经度 | 75 | * 起点经度 |
| 76 | */ | 76 | */ |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/maintainplan/MaintainPlanDetailServiceImpl.java
| @@ -116,9 +116,9 @@ public class MaintainPlanDetailServiceImpl implements MaintainPlanDetailService | @@ -116,9 +116,9 @@ public class MaintainPlanDetailServiceImpl implements MaintainPlanDetailService | ||
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | /*1.查询登录用户角色*/ | 118 | /*1.查询登录用户角色*/ |
| 119 | - Set<String> batchNos = this.getBatchNosByLoginUserId(); | ||
| 120 | - pageReqVO.setLocalDateTime(LocalDateTime.now()); | ||
| 121 | - pageReqVO.setBatchNos(batchNos); | 119 | +// Set<String> batchNos = this.getBatchNosByLoginUserId(); |
| 120 | +// pageReqVO.setLocalDateTime(LocalDateTime.now()); | ||
| 121 | +// pageReqVO.setBatchNos(batchNos); | ||
| 122 | /*2.分页*/ | 122 | /*2.分页*/ |
| 123 | IPage<AppMaintainPlanDetailRespVO> mpPage = MyBatisUtils.buildPage(pageReqVO); | 123 | IPage<AppMaintainPlanDetailRespVO> mpPage = MyBatisUtils.buildPage(pageReqVO); |
| 124 | IPage<AppMaintainPlanDetailRespVO> page = maintainPlanDetailMapper.appMaintainPlanDetailListByRoadPage(mpPage, pageReqVO); | 124 | IPage<AppMaintainPlanDetailRespVO> page = maintainPlanDetailMapper.appMaintainPlanDetailListByRoadPage(mpPage, pageReqVO); |
urbanops-module-garden/src/main/resources/mapper/maintainplan/MaintainPlanDetailMapper.xml
| @@ -43,11 +43,8 @@ | @@ -43,11 +43,8 @@ | ||
| 43 | #{busiLine} | 43 | #{busiLine} |
| 44 | </foreach> | 44 | </foreach> |
| 45 | </if> | 45 | </if> |
| 46 | - <if test="req.batchNos != null and req.batchNos.size() > 0"> | ||
| 47 | - AND a.batch_no IN | ||
| 48 | - <foreach collection="req.batchNos" item="batchNo" open="(" separator="," close=")"> | ||
| 49 | - #{batchNo} | ||
| 50 | - </foreach> | 46 | + <if test="req.batchNo!= null and req.batchNo !=''"> |
| 47 | + AND a.batch_no= #{req.batchNo} | ||
| 51 | </if> | 48 | </if> |
| 52 | <!--状态 1:未完成;2:已完成;3:已失效--> | 49 | <!--状态 1:未完成;2:已完成;3:已失效--> |
| 53 | <if test="req.finishState == 3"> | 50 | <if test="req.finishState == 3"> |