Commit 51303578f7d980810c9ff905d25dac95856031f2
1 parent
3a88a59b
道路优化提交
Showing
6 changed files
with
29 additions
and
6 deletions
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/road/RoadController.java
| ... | ... | @@ -75,8 +75,7 @@ public class RoadController { |
| 75 | 75 | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| 76 | 76 | @PreAuthorize("@ss.hasPermission('garden:road:query')") |
| 77 | 77 | public CommonResult<RoadRespVO> getRoad(@RequestParam("id") Long id) { |
| 78 | - RoadDO road = roadService.getRoad(id); | |
| 79 | - return success(BeanUtils.toBean(road, RoadRespVO.class)); | |
| 78 | + return success(roadService.getRoad(id)); | |
| 80 | 79 | } |
| 81 | 80 | |
| 82 | 81 | @GetMapping("/page") | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/road/vo/RoadSaveReqVO.java
| ... | ... | @@ -11,7 +11,8 @@ public class RoadSaveReqVO { |
| 11 | 11 | |
| 12 | 12 | |
| 13 | 13 | @Schema(description = "道路名称", example = "赵六") |
| 14 | - @Length(max = 128) | |
| 14 | + @NotEmpty(message = "道路名称不能为空") | |
| 15 | + @Size(min=2, max = 128, message = "道路名称长度") | |
| 15 | 16 | private String roadName; |
| 16 | 17 | |
| 17 | 18 | @Schema(description = "街道ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11139") |
| ... | ... | @@ -31,26 +32,32 @@ public class RoadSaveReqVO { |
| 31 | 32 | private Integer levelId; |
| 32 | 33 | |
| 33 | 34 | @Schema(description = "道路属性") |
| 35 | + @Size(min=2, max = 50) | |
| 34 | 36 | private String roadAttr; |
| 35 | 37 | |
| 36 | 38 | @Schema(description = "道路方位 W-西 E-东 N-北 S-南 参考字典roadDirection", requiredMode = Schema.RequiredMode.REQUIRED) |
| 37 | 39 | @NotEmpty(message = "道路方位 W-西 E-东 N-北 S-南 参考字典roadDirection不能为空") |
| 40 | + @Size(min=2, max = 50) | |
| 38 | 41 | private String direction; |
| 39 | 42 | |
| 40 | 43 | @Schema(description = "行道树绿化面积", requiredMode = Schema.RequiredMode.REQUIRED) |
| 41 | 44 | @NotEmpty(message = "行道树绿化面积不能为空") |
| 45 | + @Size(min=2, max = 50) | |
| 42 | 46 | private String greenBeltTreeArea; |
| 43 | 47 | |
| 44 | 48 | @Schema(description = "绿化带面积", requiredMode = Schema.RequiredMode.REQUIRED) |
| 45 | 49 | @NotEmpty(message = "绿化带面积不能为空") |
| 50 | + @Size(min=2, max = 50) | |
| 46 | 51 | private String greenBeltArea; |
| 47 | 52 | |
| 48 | 53 | @Schema(description = "总绿化带面积", requiredMode = Schema.RequiredMode.REQUIRED) |
| 49 | 54 | @NotEmpty(message = "总绿化带面积不能为空") |
| 55 | + @Size(min=2, max = 50) | |
| 50 | 56 | private String totalArea; |
| 51 | 57 | |
| 52 | 58 | @Schema(description = "行道树(棵)面积", requiredMode = Schema.RequiredMode.REQUIRED) |
| 53 | 59 | @NotEmpty(message = "行道树(棵)面积不能为空") |
| 60 | + @Size(min=2, max = 50) | |
| 54 | 61 | private String treeArea; |
| 55 | 62 | |
| 56 | 63 | @Schema(description = "起点经度", requiredMode = Schema.RequiredMode.REQUIRED) | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/road/RoadService.java
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/road/RoadServiceImpl.java
| ... | ... | @@ -97,8 +97,13 @@ public class RoadServiceImpl implements RoadService { |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | @Override |
| 100 | - public RoadDO getRoad(Long id) { | |
| 101 | - return roadMapper.selectById(id); | |
| 100 | + public RoadRespVO getRoad(Long id) { | |
| 101 | + RoadDO roadDO = roadMapper.selectById(id); | |
| 102 | + RoadRespVO respVO = BeanUtils.toBean(roadDO, RoadRespVO.class); | |
| 103 | + List<RoadRespVO> list = new ArrayList<>(); | |
| 104 | + list.add(respVO); | |
| 105 | + addDataInspectionPlan(list); | |
| 106 | + return respVO; | |
| 102 | 107 | } |
| 103 | 108 | |
| 104 | 109 | @Override | ... | ... |
urbanops-module-system/src/main/java/com/zteits/urbanops/module/system/api/user/AdminUserApi.java
| ... | ... | @@ -2,6 +2,7 @@ package com.zteits.urbanops.module.system.api.user; |
| 2 | 2 | |
| 3 | 3 | import com.zteits.urbanops.framework.common.util.collection.CollectionUtils; |
| 4 | 4 | import com.zteits.urbanops.module.system.api.user.dto.AdminUserRespDTO; |
| 5 | +import com.zteits.urbanops.module.system.controller.admin.user.vo.user.DictDataRespVO; | |
| 5 | 6 | |
| 6 | 7 | import java.util.Collection; |
| 7 | 8 | import java.util.Collections; |
| ... | ... | @@ -86,4 +87,9 @@ public interface AdminUserApi { |
| 86 | 87 | */ |
| 87 | 88 | void validateUserList(Collection<Long> ids); |
| 88 | 89 | |
| 90 | + /** | |
| 91 | + * 获取登录人业务线列表 | |
| 92 | + * @return 业务线列表 | |
| 93 | + */ | |
| 94 | + List<DictDataRespVO> getLoginBusiLine(); | |
| 89 | 95 | } | ... | ... |
urbanops-module-system/src/main/java/com/zteits/urbanops/module/system/api/user/AdminUserApiImpl.java
| ... | ... | @@ -5,6 +5,7 @@ import cn.hutool.core.util.ObjUtil; |
| 5 | 5 | import com.zteits.urbanops.framework.common.util.object.BeanUtils; |
| 6 | 6 | import com.zteits.urbanops.framework.datapermission.core.util.DataPermissionUtils; |
| 7 | 7 | import com.zteits.urbanops.module.system.api.user.dto.AdminUserRespDTO; |
| 8 | +import com.zteits.urbanops.module.system.controller.admin.user.vo.user.DictDataRespVO; | |
| 8 | 9 | import com.zteits.urbanops.module.system.dal.dataobject.dept.DeptDO; |
| 9 | 10 | import com.zteits.urbanops.module.system.dal.dataobject.user.AdminUserDO; |
| 10 | 11 | import com.zteits.urbanops.module.system.service.dept.DeptService; |
| ... | ... | @@ -83,4 +84,9 @@ public class AdminUserApiImpl implements AdminUserApi { |
| 83 | 84 | userService.validateUserList(ids); |
| 84 | 85 | } |
| 85 | 86 | |
| 87 | + @Override | |
| 88 | + public List<DictDataRespVO> getLoginBusiLine() { | |
| 89 | + return userService.getLoginBusiLine(); | |
| 90 | + } | |
| 91 | + | |
| 86 | 92 | } | ... | ... |