Commit 0c59519af7e3d3350341fd1f02af501ea37f1250
Merge remote-tracking branch 'origin/dev' into dev
Showing
14 changed files
with
188 additions
and
30 deletions
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/road/vo/RoadSaveReqVO.java
| @@ -32,7 +32,6 @@ public class RoadSaveReqVO { | @@ -32,7 +32,6 @@ public class RoadSaveReqVO { | ||
| 32 | private Integer levelId; | 32 | private Integer levelId; |
| 33 | 33 | ||
| 34 | @Schema(description = "道路属性") | 34 | @Schema(description = "道路属性") |
| 35 | - @Size(min=2, max = 50) | ||
| 36 | private String roadAttr; | 35 | private String roadAttr; |
| 37 | 36 | ||
| 38 | @Schema(description = "道路方位 W-西 E-东 N-北 S-南 参考字典roadDirection", requiredMode = Schema.RequiredMode.REQUIRED) | 37 | @Schema(description = "道路方位 W-西 E-东 N-北 S-南 参考字典roadDirection", requiredMode = Schema.RequiredMode.REQUIRED) |
| @@ -41,22 +40,22 @@ public class RoadSaveReqVO { | @@ -41,22 +40,22 @@ public class RoadSaveReqVO { | ||
| 41 | 40 | ||
| 42 | @Schema(description = "行道树绿化面积", requiredMode = Schema.RequiredMode.REQUIRED) | 41 | @Schema(description = "行道树绿化面积", requiredMode = Schema.RequiredMode.REQUIRED) |
| 43 | @NotEmpty(message = "行道树绿化面积不能为空") | 42 | @NotEmpty(message = "行道树绿化面积不能为空") |
| 44 | - @Size(min=2, max = 50) | 43 | + @Size(min=1, max = 200000, message = "行道树绿化面积长度") |
| 45 | private String greenBeltTreeArea; | 44 | private String greenBeltTreeArea; |
| 46 | 45 | ||
| 47 | @Schema(description = "绿化带面积", requiredMode = Schema.RequiredMode.REQUIRED) | 46 | @Schema(description = "绿化带面积", requiredMode = Schema.RequiredMode.REQUIRED) |
| 48 | @NotEmpty(message = "绿化带面积不能为空") | 47 | @NotEmpty(message = "绿化带面积不能为空") |
| 49 | - @Size(min=2, max = 50) | 48 | + @Size(min=1, max = 200000, message = "绿化带面积长度") |
| 50 | private String greenBeltArea; | 49 | private String greenBeltArea; |
| 51 | 50 | ||
| 52 | @Schema(description = "总绿化带面积", requiredMode = Schema.RequiredMode.REQUIRED) | 51 | @Schema(description = "总绿化带面积", requiredMode = Schema.RequiredMode.REQUIRED) |
| 53 | @NotEmpty(message = "总绿化带面积不能为空") | 52 | @NotEmpty(message = "总绿化带面积不能为空") |
| 54 | - @Size(min=2, max = 50) | 53 | + @Size(min=1, max = 200000, message = "总绿化带面积长度") |
| 55 | private String totalArea; | 54 | private String totalArea; |
| 56 | 55 | ||
| 57 | @Schema(description = "行道树(棵)面积", requiredMode = Schema.RequiredMode.REQUIRED) | 56 | @Schema(description = "行道树(棵)面积", requiredMode = Schema.RequiredMode.REQUIRED) |
| 58 | @NotEmpty(message = "行道树(棵)面积不能为空") | 57 | @NotEmpty(message = "行道树(棵)面积不能为空") |
| 59 | - @Size(min=2, max = 50) | 58 | + @Size(min=1, max = 50, message = "行道树(棵)面积长度1-50") |
| 60 | private String treeArea; | 59 | private String treeArea; |
| 61 | 60 | ||
| 62 | @Schema(description = "起点经度", requiredMode = Schema.RequiredMode.REQUIRED) | 61 | @Schema(description = "起点经度", requiredMode = Schema.RequiredMode.REQUIRED) |
| @@ -69,6 +68,7 @@ public class RoadSaveReqVO { | @@ -69,6 +68,7 @@ public class RoadSaveReqVO { | ||
| 69 | 68 | ||
| 70 | @Schema(description = "起点描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜") | 69 | @Schema(description = "起点描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜") |
| 71 | @NotEmpty(message = "起点描述不能为空") | 70 | @NotEmpty(message = "起点描述不能为空") |
| 71 | + @Size(min=1, max = 64, message = "起点描述最大64") | ||
| 72 | private String startingRemark; | 72 | private String startingRemark; |
| 73 | 73 | ||
| 74 | @Schema(description = "终点经度", requiredMode = Schema.RequiredMode.REQUIRED) | 74 | @Schema(description = "终点经度", requiredMode = Schema.RequiredMode.REQUIRED) |
| @@ -81,10 +81,12 @@ public class RoadSaveReqVO { | @@ -81,10 +81,12 @@ public class RoadSaveReqVO { | ||
| 81 | 81 | ||
| 82 | @Schema(description = "终点描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜") | 82 | @Schema(description = "终点描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜") |
| 83 | @NotEmpty(message = "终点描述不能为空") | 83 | @NotEmpty(message = "终点描述不能为空") |
| 84 | + @Size(min=1, max = 64, message = "起点经度长度最大64") | ||
| 84 | private String endRemark; | 85 | private String endRemark; |
| 85 | 86 | ||
| 86 | @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜") | 87 | @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜") |
| 87 | @NotEmpty(message = "备注不能为空") | 88 | @NotEmpty(message = "备注不能为空") |
| 89 | + @Size(min=0, max = 500, message = "备注不能为空") | ||
| 88 | private String remark; | 90 | private String remark; |
| 89 | 91 | ||
| 90 | @Schema(description = "归属(一级部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2323") | 92 | @Schema(description = "归属(一级部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2323") |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/road/vo/RoadUpdateReqVO.java
| @@ -3,6 +3,7 @@ package com.zteits.urbanops.module.garden.controller.admin.road.vo; | @@ -3,6 +3,7 @@ package com.zteits.urbanops.module.garden.controller.admin.road.vo; | ||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | import jakarta.validation.constraints.NotEmpty; | 4 | import jakarta.validation.constraints.NotEmpty; |
| 5 | import jakarta.validation.constraints.NotNull; | 5 | import jakarta.validation.constraints.NotNull; |
| 6 | +import jakarta.validation.constraints.Size; | ||
| 6 | import lombok.Data; | 7 | import lombok.Data; |
| 7 | 8 | ||
| 8 | @Schema(description = "管理后台 - 道路管理新增/修改 Request VO") | 9 | @Schema(description = "管理后台 - 道路管理新增/修改 Request VO") |
| @@ -15,6 +16,7 @@ public class RoadUpdateReqVO { | @@ -15,6 +16,7 @@ public class RoadUpdateReqVO { | ||
| 15 | 16 | ||
| 16 | @Schema(description = "道路名称", example = "赵六") | 17 | @Schema(description = "道路名称", example = "赵六") |
| 17 | @NotEmpty(message = "道路名称不能为空") | 18 | @NotEmpty(message = "道路名称不能为空") |
| 19 | + @Size(min=2, max = 128, message = "道路名称长度") | ||
| 18 | private String roadName; | 20 | private String roadName; |
| 19 | 21 | ||
| 20 | @Schema(description = "街道ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11139") | 22 | @Schema(description = "街道ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11139") |
| @@ -42,18 +44,22 @@ public class RoadUpdateReqVO { | @@ -42,18 +44,22 @@ public class RoadUpdateReqVO { | ||
| 42 | 44 | ||
| 43 | @Schema(description = "行道树绿化面积", requiredMode = Schema.RequiredMode.REQUIRED) | 45 | @Schema(description = "行道树绿化面积", requiredMode = Schema.RequiredMode.REQUIRED) |
| 44 | @NotEmpty(message = "行道树绿化面积不能为空") | 46 | @NotEmpty(message = "行道树绿化面积不能为空") |
| 47 | + @Size(min=1, max = 200000, message = "行道树绿化面积长度") | ||
| 45 | private String greenBeltTreeArea; | 48 | private String greenBeltTreeArea; |
| 46 | 49 | ||
| 47 | @Schema(description = "绿化带面积", requiredMode = Schema.RequiredMode.REQUIRED) | 50 | @Schema(description = "绿化带面积", requiredMode = Schema.RequiredMode.REQUIRED) |
| 48 | @NotEmpty(message = "绿化带面积不能为空") | 51 | @NotEmpty(message = "绿化带面积不能为空") |
| 52 | + @Size(min=1, max = 200000, message = "绿化带面积长度") | ||
| 49 | private String greenBeltArea; | 53 | private String greenBeltArea; |
| 50 | 54 | ||
| 51 | @Schema(description = "总绿化带面积", requiredMode = Schema.RequiredMode.REQUIRED) | 55 | @Schema(description = "总绿化带面积", requiredMode = Schema.RequiredMode.REQUIRED) |
| 52 | @NotEmpty(message = "总绿化带面积不能为空") | 56 | @NotEmpty(message = "总绿化带面积不能为空") |
| 57 | + @Size(min=1, max = 200000, message = "总绿化带面积长度") | ||
| 53 | private String totalArea; | 58 | private String totalArea; |
| 54 | 59 | ||
| 55 | @Schema(description = "行道树(棵)面积", requiredMode = Schema.RequiredMode.REQUIRED) | 60 | @Schema(description = "行道树(棵)面积", requiredMode = Schema.RequiredMode.REQUIRED) |
| 56 | @NotEmpty(message = "行道树(棵)面积不能为空") | 61 | @NotEmpty(message = "行道树(棵)面积不能为空") |
| 62 | + @Size(min=1, max = 50, message = "行道树(棵)面积长度") | ||
| 57 | private String treeArea; | 63 | private String treeArea; |
| 58 | 64 | ||
| 59 | @Schema(description = "起点经度", requiredMode = Schema.RequiredMode.REQUIRED) | 65 | @Schema(description = "起点经度", requiredMode = Schema.RequiredMode.REQUIRED) |
| @@ -66,6 +72,7 @@ public class RoadUpdateReqVO { | @@ -66,6 +72,7 @@ public class RoadUpdateReqVO { | ||
| 66 | 72 | ||
| 67 | @Schema(description = "起点描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜") | 73 | @Schema(description = "起点描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜") |
| 68 | @NotEmpty(message = "起点描述不能为空") | 74 | @NotEmpty(message = "起点描述不能为空") |
| 75 | + @Size(min=1, max = 64, message = "起点描述最大64") | ||
| 69 | private String startingRemark; | 76 | private String startingRemark; |
| 70 | 77 | ||
| 71 | @Schema(description = "终点经度", requiredMode = Schema.RequiredMode.REQUIRED) | 78 | @Schema(description = "终点经度", requiredMode = Schema.RequiredMode.REQUIRED) |
| @@ -78,10 +85,12 @@ public class RoadUpdateReqVO { | @@ -78,10 +85,12 @@ public class RoadUpdateReqVO { | ||
| 78 | 85 | ||
| 79 | @Schema(description = "终点描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜") | 86 | @Schema(description = "终点描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜") |
| 80 | @NotEmpty(message = "终点描述不能为空") | 87 | @NotEmpty(message = "终点描述不能为空") |
| 88 | + @Size(min=1, max = 64, message = "起点经度长度最大64") | ||
| 81 | private String endRemark; | 89 | private String endRemark; |
| 82 | 90 | ||
| 83 | @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜") | 91 | @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜") |
| 84 | @NotEmpty(message = "备注不能为空") | 92 | @NotEmpty(message = "备注不能为空") |
| 93 | + @Size(max = 500, message = "备注不能为空") | ||
| 85 | private String remark; | 94 | private String remark; |
| 86 | 95 | ||
| 87 | @Schema(description = "归属(一级部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2323") | 96 | @Schema(description = "归属(一级部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2323") |
| @@ -93,11 +102,9 @@ public class RoadUpdateReqVO { | @@ -93,11 +102,9 @@ public class RoadUpdateReqVO { | ||
| 93 | private Long deptId; | 102 | private Long deptId; |
| 94 | 103 | ||
| 95 | @Schema(description = "创建者", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") | 104 | @Schema(description = "创建者", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") |
| 96 | - @NotEmpty(message = "创建者不能为空") | ||
| 97 | private String creatorName; | 105 | private String creatorName; |
| 98 | 106 | ||
| 99 | @Schema(description = "更新者", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") | 107 | @Schema(description = "更新者", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") |
| 100 | - @NotEmpty(message = "更新者不能为空") | ||
| 101 | private String updaterName; | 108 | private String updaterName; |
| 102 | 109 | ||
| 103 | } | 110 | } |
| 104 | \ No newline at end of file | 111 | \ No newline at end of file |
urbanops-module-system/src/main/java/com/zteits/urbanops/module/system/controller/app/appmodule/AppAppModuleController.java
| @@ -15,8 +15,12 @@ import org.springframework.web.bind.annotation.GetMapping; | @@ -15,8 +15,12 @@ import org.springframework.web.bind.annotation.GetMapping; | ||
| 15 | import org.springframework.web.bind.annotation.RequestMapping; | 15 | import org.springframework.web.bind.annotation.RequestMapping; |
| 16 | import org.springframework.web.bind.annotation.RestController; | 16 | import org.springframework.web.bind.annotation.RestController; |
| 17 | 17 | ||
| 18 | +import java.util.ArrayList; | ||
| 19 | +import java.util.Collections; | ||
| 18 | import java.util.Comparator; | 20 | import java.util.Comparator; |
| 21 | +import java.util.LinkedHashMap; | ||
| 19 | import java.util.List; | 22 | import java.util.List; |
| 23 | +import java.util.Map; | ||
| 20 | 24 | ||
| 21 | import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | 25 | import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; |
| 22 | 26 | ||
| @@ -47,13 +51,56 @@ public class AppAppModuleController { | @@ -47,13 +51,56 @@ public class AppAppModuleController { | ||
| 47 | // 填充统计数据(根据extra中的statisticKey配置) | 51 | // 填充统计数据(根据extra中的statisticKey配置) |
| 48 | // appModuleService.fillModuleStatistics(list, userId); | 52 | // appModuleService.fillModuleStatistics(list, userId); |
| 49 | 53 | ||
| 50 | - // 排序并转换 | ||
| 51 | - list.sort(Comparator.comparing(AppModuleDO::getSort)); | ||
| 52 | - List<AppModuleVO> result = AppModuleConvert.INSTANCE.convertAppList(list); | 54 | + // 转换为 VO 列表并构建树 |
| 55 | + List<AppModuleVO> modules = AppModuleConvert.INSTANCE.convertAppList(list); | ||
| 56 | + List<AppModuleVO> moduleTree = buildModuleTree(modules); | ||
| 53 | 57 | ||
| 54 | // MapStruct 转换已通过 @AfterMapping 自动填充 statisticCount | 58 | // MapStruct 转换已通过 @AfterMapping 自动填充 statisticCount |
| 55 | 59 | ||
| 56 | - return success(result); | 60 | + return success(moduleTree); |
| 61 | + } | ||
| 62 | + | ||
| 63 | + private List<AppModuleVO> buildModuleTree(List<AppModuleVO> modules) { | ||
| 64 | + if (modules == null || modules.isEmpty()) { | ||
| 65 | + return Collections.emptyList(); | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + Map<Long, AppModuleVO> moduleMap = new LinkedHashMap<>(modules.size()); | ||
| 69 | + for (AppModuleVO module : modules) { | ||
| 70 | + module.setChildren(new ArrayList<>()); | ||
| 71 | + moduleMap.put(module.getId(), module); | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + List<AppModuleVO> roots = new ArrayList<>(); | ||
| 75 | + for (AppModuleVO module : modules) { | ||
| 76 | + Long parentId = module.getParentId(); | ||
| 77 | + if (parentId == null || AppModuleDO.ID_ROOT.equals(parentId)) { | ||
| 78 | + roots.add(module); | ||
| 79 | + continue; | ||
| 80 | + } | ||
| 81 | + | ||
| 82 | + AppModuleVO parent = moduleMap.get(parentId); | ||
| 83 | + if (parent == null) { | ||
| 84 | + roots.add(module); | ||
| 85 | + continue; | ||
| 86 | + } | ||
| 87 | + parent.getChildren().add(module); | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + sortModules(roots); | ||
| 91 | + return roots; | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + private void sortModules(List<AppModuleVO> modules) { | ||
| 95 | + if (modules == null || modules.isEmpty()) { | ||
| 96 | + return; | ||
| 97 | + } | ||
| 98 | + | ||
| 99 | + modules.sort(Comparator.comparing(AppModuleVO::getSort, | ||
| 100 | + Comparator.nullsLast(Integer::compareTo))); | ||
| 101 | + for (AppModuleVO module : modules) { | ||
| 102 | + sortModules(module.getChildren()); | ||
| 103 | + } | ||
| 57 | } | 104 | } |
| 58 | 105 | ||
| 59 | } | 106 | } |
urbanops-module-system/src/main/java/com/zteits/urbanops/module/system/controller/app/appmodule/vo/AppModuleVO.java
| @@ -3,6 +3,7 @@ package com.zteits.urbanops.module.system.controller.app.appmodule.vo; | @@ -3,6 +3,7 @@ package com.zteits.urbanops.module.system.controller.app.appmodule.vo; | ||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | import lombok.Data; | 4 | import lombok.Data; |
| 5 | 5 | ||
| 6 | +import java.util.List; | ||
| 6 | import java.util.Map; | 7 | import java.util.Map; |
| 7 | 8 | ||
| 8 | @Schema(description = "用户 APP - App 功能模块 Response VO") | 9 | @Schema(description = "用户 APP - App 功能模块 Response VO") |
| @@ -51,4 +52,7 @@ public class AppModuleVO { | @@ -51,4 +52,7 @@ public class AppModuleVO { | ||
| 51 | @Schema(description = "扩展字段 JSON", example = "{}") | 52 | @Schema(description = "扩展字段 JSON", example = "{}") |
| 52 | private Map<String, Object> extra; | 53 | private Map<String, Object> extra; |
| 53 | 54 | ||
| 55 | + @Schema(description = "子模块集合") | ||
| 56 | + private List<AppModuleVO> children; | ||
| 57 | + | ||
| 54 | } | 58 | } |
urbanops-module-system/src/main/java/com/zteits/urbanops/module/system/service/appmodule/AppModuleServiceImpl.java
| @@ -143,6 +143,7 @@ public class AppModuleServiceImpl implements AppModuleService { | @@ -143,6 +143,7 @@ public class AppModuleServiceImpl implements AppModuleService { | ||
| 143 | // 查询所有启用的模块 | 143 | // 查询所有启用的模块 |
| 144 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); | 144 | reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); |
| 145 | List<AppModuleDO> modules = getAppModuleList(reqVO); | 145 | List<AppModuleDO> modules = getAppModuleList(reqVO); |
| 146 | + modules = includeParentModules(modules); | ||
| 146 | 147 | ||
| 147 | // 过滤掉关闭的节点 | 148 | // 过滤掉关闭的节点 |
| 148 | modules = filterDisableModules(modules); | 149 | modules = filterDisableModules(modules); |
| @@ -159,6 +160,46 @@ public class AppModuleServiceImpl implements AppModuleService { | @@ -159,6 +160,46 @@ public class AppModuleServiceImpl implements AppModuleService { | ||
| 159 | return modules; | 160 | return modules; |
| 160 | } | 161 | } |
| 161 | 162 | ||
| 163 | + private List<AppModuleDO> includeParentModules(List<AppModuleDO> modules) { | ||
| 164 | + if (CollUtil.isEmpty(modules)) { | ||
| 165 | + return modules; | ||
| 166 | + } | ||
| 167 | + | ||
| 168 | + Map<Long, AppModuleDO> moduleMap = new LinkedHashMap<>(); | ||
| 169 | + for (AppModuleDO module : modules) { | ||
| 170 | + moduleMap.put(module.getId(), module); | ||
| 171 | + } | ||
| 172 | + | ||
| 173 | + Set<Long> pendingParentIds = new HashSet<>(); | ||
| 174 | + for (AppModuleDO module : modules) { | ||
| 175 | + Long parentId = module.getParentId(); | ||
| 176 | + if (parentId == null || ObjUtil.equal(parentId, ID_ROOT) || moduleMap.containsKey(parentId)) { | ||
| 177 | + continue; | ||
| 178 | + } | ||
| 179 | + pendingParentIds.add(parentId); | ||
| 180 | + } | ||
| 181 | + | ||
| 182 | + while (CollUtil.isNotEmpty(pendingParentIds)) { | ||
| 183 | + List<AppModuleDO> parents = appModuleMapper.selectByIds(pendingParentIds); | ||
| 184 | + pendingParentIds = new HashSet<>(); | ||
| 185 | + for (AppModuleDO parent : parents) { | ||
| 186 | + if (parent == null) { | ||
| 187 | + continue; | ||
| 188 | + } | ||
| 189 | + if (!moduleMap.containsKey(parent.getId())) { | ||
| 190 | + moduleMap.put(parent.getId(), parent); | ||
| 191 | + } | ||
| 192 | + Long ancestorId = parent.getParentId(); | ||
| 193 | + if (ancestorId != null && !ObjUtil.equal(ancestorId, ID_ROOT) | ||
| 194 | + && !moduleMap.containsKey(ancestorId)) { | ||
| 195 | + pendingParentIds.add(ancestorId); | ||
| 196 | + } | ||
| 197 | + } | ||
| 198 | + } | ||
| 199 | + | ||
| 200 | + return new ArrayList<>(moduleMap.values()); | ||
| 201 | + } | ||
| 202 | + | ||
| 162 | @Override | 203 | @Override |
| 163 | public List<AppModuleDO> filterDisableModules(List<AppModuleDO> moduleList) { | 204 | public List<AppModuleDO> filterDisableModules(List<AppModuleDO> moduleList) { |
| 164 | if (CollUtil.isEmpty(moduleList)) { | 205 | if (CollUtil.isEmpty(moduleList)) { |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/garden/BpmGardenInspectController.java
| @@ -3,11 +3,7 @@ package com.zteits.urbanops.module.workorder.controller.admin.garden; | @@ -3,11 +3,7 @@ package com.zteits.urbanops.module.workorder.controller.admin.garden; | ||
| 3 | import com.zteits.urbanops.framework.common.pojo.CommonResult; | 3 | import com.zteits.urbanops.framework.common.pojo.CommonResult; |
| 4 | import com.zteits.urbanops.framework.common.pojo.PageResult; | 4 | import com.zteits.urbanops.framework.common.pojo.PageResult; |
| 5 | import com.zteits.urbanops.framework.common.util.object.BeanUtils; | 5 | import com.zteits.urbanops.framework.common.util.object.BeanUtils; |
| 6 | -import com.zteits.urbanops.module.bpm.controller.admin.oa.vo.BpmOALeaveCreateReqVO; | ||
| 7 | -import com.zteits.urbanops.module.bpm.controller.admin.oa.vo.BpmOALeavePageReqVO; | ||
| 8 | -import com.zteits.urbanops.module.bpm.controller.admin.oa.vo.BpmOALeaveRespVO; | ||
| 9 | -import com.zteits.urbanops.module.bpm.dal.dataobject.oa.BpmOALeaveDO; | ||
| 10 | -import com.zteits.urbanops.module.workorder.controller.admin.garden.vo.BpmGardenWorkOrderCreateReqVo; | 6 | +import com.zteits.urbanops.module.workorder.controller.admin.garden.vo.BpmGardenWorkOrderCreateReqVO; |
| 11 | import com.zteits.urbanops.module.workorder.controller.admin.garden.vo.BpmGardenWorkOrderPageReqVO; | 7 | import com.zteits.urbanops.module.workorder.controller.admin.garden.vo.BpmGardenWorkOrderPageReqVO; |
| 12 | import com.zteits.urbanops.module.workorder.controller.admin.garden.vo.BpmGardenWorkOrderRespVO; | 8 | import com.zteits.urbanops.module.workorder.controller.admin.garden.vo.BpmGardenWorkOrderRespVO; |
| 13 | import com.zteits.urbanops.module.workorder.dal.dataobject.garden.BpmGardenWorkOrderDO; | 9 | import com.zteits.urbanops.module.workorder.dal.dataobject.garden.BpmGardenWorkOrderDO; |
| @@ -41,7 +37,7 @@ public class BpmGardenInspectController { | @@ -41,7 +37,7 @@ public class BpmGardenInspectController { | ||
| 41 | @PostMapping("/create") | 37 | @PostMapping("/create") |
| 42 | @PreAuthorize("@ss.hasPermission('bpm:garden-inspection:create')") | 38 | @PreAuthorize("@ss.hasPermission('bpm:garden-inspection:create')") |
| 43 | @Operation(summary = "创建请求申请") | 39 | @Operation(summary = "创建请求申请") |
| 44 | - public CommonResult<Long> createGardenInspection(@Valid @RequestBody BpmGardenWorkOrderCreateReqVo createReqVO) { | 40 | + public CommonResult<Long> createGardenInspection(@Valid @RequestBody BpmGardenWorkOrderCreateReqVO createReqVO) { |
| 45 | return success(gardenService.createWorkOrder(getLoginUserId(), createReqVO)); | 41 | return success(gardenService.createWorkOrder(getLoginUserId(), createReqVO)); |
| 46 | } | 42 | } |
| 47 | 43 |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/garden/vo/BpmGardenWorkOrderCreateReqVo.java renamed to urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/garden/vo/BpmGardenWorkOrderCreateReqVO.java
| @@ -18,7 +18,7 @@ import java.util.Map; | @@ -18,7 +18,7 @@ import java.util.Map; | ||
| 18 | */ | 18 | */ |
| 19 | @Schema(description = "园林工单请求创建 Request VO") | 19 | @Schema(description = "园林工单请求创建 Request VO") |
| 20 | @Data | 20 | @Data |
| 21 | -public class BpmGardenWorkOrderCreateReqVo { | 21 | +public class BpmGardenWorkOrderCreateReqVO { |
| 22 | 22 | ||
| 23 | @Schema(description = "业务线:yl 园林,wy 物业,sz 市政 ", requiredMode = Schema.RequiredMode.REQUIRED) | 23 | @Schema(description = "业务线:yl 园林,wy 物业,sz 市政 ", requiredMode = Schema.RequiredMode.REQUIRED) |
| 24 | @NotEmpty(message = "业务线:yl 园林,wy 物业,sz 市政 不能为空") | 24 | @NotEmpty(message = "业务线:yl 园林,wy 物业,sz 市政 不能为空") |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/AppGardenWorkOrderController.java
| @@ -5,7 +5,9 @@ import com.zteits.urbanops.framework.common.pojo.PageResult; | @@ -5,7 +5,9 @@ import com.zteits.urbanops.framework.common.pojo.PageResult; | ||
| 5 | import com.zteits.urbanops.framework.common.util.object.BeanUtils; | 5 | import com.zteits.urbanops.framework.common.util.object.BeanUtils; |
| 6 | import com.zteits.urbanops.module.workorder.controller.admin.garden.vo.BpmGardenWorkOrderPageReqVO; | 6 | import com.zteits.urbanops.module.workorder.controller.admin.garden.vo.BpmGardenWorkOrderPageReqVO; |
| 7 | import com.zteits.urbanops.module.workorder.controller.admin.garden.vo.BpmGardenWorkOrderRespVO; | 7 | import com.zteits.urbanops.module.workorder.controller.admin.garden.vo.BpmGardenWorkOrderRespVO; |
| 8 | +import com.zteits.urbanops.module.workorder.controller.app.garden.vo.AppGardenWorkOrderPageReqVO; | ||
| 8 | import com.zteits.urbanops.module.workorder.controller.app.garden.vo.AppGardenWorkOrderReqVO; | 9 | import com.zteits.urbanops.module.workorder.controller.app.garden.vo.AppGardenWorkOrderReqVO; |
| 10 | +import com.zteits.urbanops.module.workorder.controller.app.garden.vo.AppGardenWorkOrderRespVO; | ||
| 9 | import com.zteits.urbanops.module.workorder.dal.dataobject.garden.BpmGardenWorkOrderDO; | 11 | import com.zteits.urbanops.module.workorder.dal.dataobject.garden.BpmGardenWorkOrderDO; |
| 10 | import com.zteits.urbanops.module.workorder.service.garden.BpmGardenService; | 12 | import com.zteits.urbanops.module.workorder.service.garden.BpmGardenService; |
| 11 | import io.swagger.v3.oas.annotations.Operation; | 13 | import io.swagger.v3.oas.annotations.Operation; |
| @@ -27,36 +29,40 @@ import static com.zteits.urbanops.framework.security.core.util.SecurityFramework | @@ -27,36 +29,40 @@ import static com.zteits.urbanops.framework.security.core.util.SecurityFramework | ||
| 27 | */ | 29 | */ |
| 28 | @Tag(name = "APP - 园林工单bpm") | 30 | @Tag(name = "APP - 园林工单bpm") |
| 29 | @RestController | 31 | @RestController |
| 30 | -@RequestMapping("/app/garden/workorder") | 32 | +@RequestMapping("/bpm/garden/workorder") |
| 31 | public class AppGardenWorkOrderController { | 33 | public class AppGardenWorkOrderController { |
| 32 | @Resource | 34 | @Resource |
| 33 | private BpmGardenService gardenService; | 35 | private BpmGardenService gardenService; |
| 34 | 36 | ||
| 35 | @PostMapping("/create") | 37 | @PostMapping("/create") |
| 38 | + //@PreAuthorize("@ss.hasPermission('bpm:garden-workorder:create')") | ||
| 36 | @Operation(summary = "app-创建工单信息") | 39 | @Operation(summary = "app-创建工单信息") |
| 37 | public CommonResult<Long> createMainInfo(@Valid @RequestBody AppGardenWorkOrderReqVO createReqVO) { | 40 | public CommonResult<Long> createMainInfo(@Valid @RequestBody AppGardenWorkOrderReqVO createReqVO) { |
| 38 | return success(gardenService.createWorkOrder(createReqVO)); | 41 | return success(gardenService.createWorkOrder(createReqVO)); |
| 39 | } | 42 | } |
| 40 | 43 | ||
| 41 | @PostMapping("/createQuick") | 44 | @PostMapping("/createQuick") |
| 45 | + //@PreAuthorize("@ss.hasPermission('bpm:garden-workorder:create')") | ||
| 42 | @Operation(summary = "app-创建快速工单信息") | 46 | @Operation(summary = "app-创建快速工单信息") |
| 43 | public CommonResult<Long> createMainInfoQuick(@Valid @RequestBody AppGardenWorkOrderReqVO createReqVO) { | 47 | public CommonResult<Long> createMainInfoQuick(@Valid @RequestBody AppGardenWorkOrderReqVO createReqVO) { |
| 44 | return success(gardenService.createWorkOrderQuick(createReqVO)); | 48 | return success(gardenService.createWorkOrderQuick(createReqVO)); |
| 45 | } | 49 | } |
| 46 | 50 | ||
| 47 | @GetMapping("/get") | 51 | @GetMapping("/get") |
| 52 | + //@PreAuthorize("@ss.hasPermission('bpm:garden-workorder:query')") | ||
| 48 | @Operation(summary = "app-获得工单详情") | 53 | @Operation(summary = "app-获得工单详情") |
| 49 | @Parameter(name = "id", description = "编号", required = true, example = "1024") | 54 | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| 50 | - public CommonResult<BpmGardenWorkOrderRespVO> getGardenInspection(@RequestParam("id") Long id) { | 55 | + public CommonResult<AppGardenWorkOrderRespVO> getGardenInspection(@RequestParam("id") Long id) { |
| 51 | BpmGardenWorkOrderDO gardenInspection = gardenService.getWorkOrder(id); | 56 | BpmGardenWorkOrderDO gardenInspection = gardenService.getWorkOrder(id); |
| 52 | - return success(BeanUtils.toBean(gardenInspection, BpmGardenWorkOrderRespVO.class)); | 57 | + return success(BeanUtils.toBean(gardenInspection, AppGardenWorkOrderRespVO.class)); |
| 53 | } | 58 | } |
| 54 | 59 | ||
| 55 | @GetMapping("/page") | 60 | @GetMapping("/page") |
| 61 | + //@PreAuthorize("@ss.hasPermission('bpm:garden-workorder:query')") | ||
| 56 | @Operation(summary = "app-获得园林巡检工单申请分页") | 62 | @Operation(summary = "app-获得园林巡检工单申请分页") |
| 57 | - public CommonResult<PageResult<BpmGardenWorkOrderRespVO>> getGardenInspectionPage(@Valid BpmGardenWorkOrderPageReqVO pageVO) { | 63 | + public CommonResult<PageResult<AppGardenWorkOrderRespVO>> getGardenInspectionPage(@Valid AppGardenWorkOrderPageReqVO pageVO) { |
| 58 | PageResult<BpmGardenWorkOrderDO> pageResult = gardenService.getGardenInspectionPage(getLoginUserId(), pageVO); | 64 | PageResult<BpmGardenWorkOrderDO> pageResult = gardenService.getGardenInspectionPage(getLoginUserId(), pageVO); |
| 59 | - return success(BeanUtils.toBean(pageResult, BpmGardenWorkOrderRespVO.class)); | 65 | + return success(BeanUtils.toBean(pageResult, AppGardenWorkOrderRespVO.class)); |
| 60 | } | 66 | } |
| 61 | 67 | ||
| 62 | } | 68 | } |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/vo/AppGardenWorkOrderPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.app.garden.vo; | ||
| 2 | + | ||
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | ||
| 4 | +import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.MainInfoPageReqVO; | ||
| 5 | +import io.swagger.v3.oas.annotations.media.Schema; | ||
| 6 | +import lombok.Data; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * @author yanhuiqing | ||
| 10 | + * @version 1.0 | ||
| 11 | + * @description: TODO | ||
| 12 | + * @date 2025/12/9 20:21 | ||
| 13 | + */ | ||
| 14 | +@Schema(description = "管理后台 - 工单信息分页 Request VO") | ||
| 15 | +@Data | ||
| 16 | +public class AppGardenWorkOrderPageReqVO extends MainInfoPageReqVO { | ||
| 17 | +} |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/vo/AppGardenWorkOrderReqVO.java
| @@ -36,7 +36,7 @@ public class AppGardenWorkOrderReqVO { | @@ -36,7 +36,7 @@ public class AppGardenWorkOrderReqVO { | ||
| 36 | @Length(max = 500) | 36 | @Length(max = 500) |
| 37 | private String remark; | 37 | private String remark; |
| 38 | 38 | ||
| 39 | - @NotEmpty(message = "经纬度类型") | 39 | + |
| 40 | @Schema(description = "经纬度类型: 1:国标; 2:百度;3:高德;4:腾讯", example = "2") | 40 | @Schema(description = "经纬度类型: 1:国标; 2:百度;3:高德;4:腾讯", example = "2") |
| 41 | private Integer latLonType; | 41 | private Integer latLonType; |
| 42 | 42 | ||
| @@ -59,7 +59,7 @@ public class AppGardenWorkOrderReqVO { | @@ -59,7 +59,7 @@ public class AppGardenWorkOrderReqVO { | ||
| 59 | @Schema(description = "工单名称", example = "绿地卫生") | 59 | @Schema(description = "工单名称", example = "绿地卫生") |
| 60 | private String orderName; | 60 | private String orderName; |
| 61 | 61 | ||
| 62 | - @Schema(description = "来源ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | 62 | + @Schema(description = "来源ID 工单来源 1、巡查,2、游客居民,3、12345,4、网格", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 63 | //@NotNull(message = "来源ID不能为空") | 63 | //@NotNull(message = "来源ID不能为空") |
| 64 | private Integer sourceId; | 64 | private Integer sourceId; |
| 65 | 65 |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/vo/AppGardenWorkOrderRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.app.garden.vo; | ||
| 2 | + | ||
| 3 | +import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.MainInfoRespVO; | ||
| 4 | +import io.swagger.v3.oas.annotations.media.Schema; | ||
| 5 | +import lombok.Data; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * @author yanhuiqing | ||
| 9 | + * @version 1.0 | ||
| 10 | + * @description: TODO | ||
| 11 | + * @date 2025/12/9 20:18 | ||
| 12 | + */ | ||
| 13 | +@Schema(description = "APP - 园林工单流程 Response VO") | ||
| 14 | +@Data | ||
| 15 | +public class AppGardenWorkOrderRespVO extends MainInfoRespVO { | ||
| 16 | +} |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmGardenService.java
| 1 | package com.zteits.urbanops.module.workorder.service.garden; | 1 | package com.zteits.urbanops.module.workorder.service.garden; |
| 2 | 2 | ||
| 3 | import com.zteits.urbanops.framework.common.pojo.PageResult; | 3 | import com.zteits.urbanops.framework.common.pojo.PageResult; |
| 4 | -import com.zteits.urbanops.module.workorder.controller.admin.garden.vo.BpmGardenWorkOrderCreateReqVo; | 4 | +import com.zteits.urbanops.module.workorder.controller.admin.garden.vo.BpmGardenWorkOrderCreateReqVO; |
| 5 | import com.zteits.urbanops.module.workorder.controller.admin.garden.vo.BpmGardenWorkOrderPageReqVO; | 5 | import com.zteits.urbanops.module.workorder.controller.admin.garden.vo.BpmGardenWorkOrderPageReqVO; |
| 6 | +import com.zteits.urbanops.module.workorder.controller.app.garden.vo.AppGardenWorkOrderPageReqVO; | ||
| 6 | import com.zteits.urbanops.module.workorder.controller.app.garden.vo.AppGardenWorkOrderReqVO; | 7 | import com.zteits.urbanops.module.workorder.controller.app.garden.vo.AppGardenWorkOrderReqVO; |
| 7 | import com.zteits.urbanops.module.workorder.dal.dataobject.garden.BpmGardenWorkOrderDO; | 8 | import com.zteits.urbanops.module.workorder.dal.dataobject.garden.BpmGardenWorkOrderDO; |
| 8 | import jakarta.validation.Valid; | 9 | import jakarta.validation.Valid; |
| @@ -25,7 +26,7 @@ public interface BpmGardenService { | @@ -25,7 +26,7 @@ public interface BpmGardenService { | ||
| 25 | * @param createRequestVo | 26 | * @param createRequestVo |
| 26 | * @return | 27 | * @return |
| 27 | */ | 28 | */ |
| 28 | - Long createWorkOrder(Long userId,@Valid BpmGardenWorkOrderCreateReqVo createRequestVo); | 29 | + Long createWorkOrder(Long userId,@Valid BpmGardenWorkOrderCreateReqVO createRequestVo); |
| 29 | 30 | ||
| 30 | /** | 31 | /** |
| 31 | * 更新工单申请的状态 | 32 | * 更新工单申请的状态 |
| @@ -49,6 +50,14 @@ public interface BpmGardenService { | @@ -49,6 +50,14 @@ public interface BpmGardenService { | ||
| 49 | * @param pageVO | 50 | * @param pageVO |
| 50 | * @return | 51 | * @return |
| 51 | */ | 52 | */ |
| 53 | + PageResult<BpmGardenWorkOrderDO> getGardenInspectionPage(Long loginUserId, AppGardenWorkOrderPageReqVO pageVO); | ||
| 54 | + | ||
| 55 | + /** | ||
| 56 | + * 获得工单分页数据 | ||
| 57 | + * @param loginUserId | ||
| 58 | + * @param pageVO | ||
| 59 | + * @return | ||
| 60 | + */ | ||
| 52 | PageResult<BpmGardenWorkOrderDO> getGardenInspectionPage(Long loginUserId, BpmGardenWorkOrderPageReqVO pageVO); | 61 | PageResult<BpmGardenWorkOrderDO> getGardenInspectionPage(Long loginUserId, BpmGardenWorkOrderPageReqVO pageVO); |
| 53 | 62 | ||
| 54 | /** | 63 | /** |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmGardenServiceImpl.java
| @@ -8,12 +8,12 @@ import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; | @@ -8,12 +8,12 @@ import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; | ||
| 8 | import com.zteits.urbanops.module.bpm.api.task.BpmProcessInstanceApi; | 8 | import com.zteits.urbanops.module.bpm.api.task.BpmProcessInstanceApi; |
| 9 | import com.zteits.urbanops.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; | 9 | import com.zteits.urbanops.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; |
| 10 | import com.zteits.urbanops.module.bpm.enums.task.BpmTaskStatusEnum; | 10 | import com.zteits.urbanops.module.bpm.enums.task.BpmTaskStatusEnum; |
| 11 | -import com.zteits.urbanops.module.bpm.service.task.BpmProcessInstanceService; | ||
| 12 | import com.zteits.urbanops.module.workorder.api.constant.BpmCommonConstant; | 11 | import com.zteits.urbanops.module.workorder.api.constant.BpmCommonConstant; |
| 13 | import com.zteits.urbanops.module.workorder.api.workorder.WorkOrderApi; | 12 | import com.zteits.urbanops.module.workorder.api.workorder.WorkOrderApi; |
| 14 | -import com.zteits.urbanops.module.workorder.controller.admin.garden.vo.BpmGardenWorkOrderCreateReqVo; | 13 | +import com.zteits.urbanops.module.workorder.controller.admin.garden.vo.BpmGardenWorkOrderCreateReqVO; |
| 15 | import com.zteits.urbanops.module.workorder.controller.admin.garden.vo.BpmGardenWorkOrderPageReqVO; | 14 | import com.zteits.urbanops.module.workorder.controller.admin.garden.vo.BpmGardenWorkOrderPageReqVO; |
| 16 | import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.MainInfoPageReqVO; | 15 | import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.MainInfoPageReqVO; |
| 16 | +import com.zteits.urbanops.module.workorder.controller.app.garden.vo.AppGardenWorkOrderPageReqVO; | ||
| 17 | import com.zteits.urbanops.module.workorder.controller.app.garden.vo.AppGardenWorkOrderReqVO; | 17 | import com.zteits.urbanops.module.workorder.controller.app.garden.vo.AppGardenWorkOrderReqVO; |
| 18 | import com.zteits.urbanops.module.workorder.dal.dataobject.attachment.AttachmentDO; | 18 | import com.zteits.urbanops.module.workorder.dal.dataobject.attachment.AttachmentDO; |
| 19 | import com.zteits.urbanops.module.workorder.dal.dataobject.garden.BpmGardenWorkOrderDO; | 19 | import com.zteits.urbanops.module.workorder.dal.dataobject.garden.BpmGardenWorkOrderDO; |
| @@ -71,6 +71,8 @@ public class BpmGardenServiceImpl implements BpmGardenService{ | @@ -71,6 +71,8 @@ public class BpmGardenServiceImpl implements BpmGardenService{ | ||
| 71 | workOrder.setOrderName("园林工单"); | 71 | workOrder.setOrderName("园林工单"); |
| 72 | workOrder.setCompanyId(SecurityFrameworkUtils.getCompanyId()); | 72 | workOrder.setCompanyId(SecurityFrameworkUtils.getCompanyId()); |
| 73 | workOrder.setBusiLine(SecurityFrameworkUtils.getBusiLine()); | 73 | workOrder.setBusiLine(SecurityFrameworkUtils.getBusiLine()); |
| 74 | + workOrder.setUserId(SecurityFrameworkUtils.getLoginUserId()); | ||
| 75 | + workOrder.setUserName(SecurityFrameworkUtils.getLoginUserNickname()); | ||
| 74 | workOrderMapper.insert(workOrder); | 76 | workOrderMapper.insert(workOrder); |
| 75 | 77 | ||
| 76 | //附件插入 | 78 | //附件插入 |
| @@ -119,7 +121,7 @@ public class BpmGardenServiceImpl implements BpmGardenService{ | @@ -119,7 +121,7 @@ public class BpmGardenServiceImpl implements BpmGardenService{ | ||
| 119 | 121 | ||
| 120 | @Override | 122 | @Override |
| 121 | @Transactional(rollbackFor = Exception.class) | 123 | @Transactional(rollbackFor = Exception.class) |
| 122 | - public Long createWorkOrder(Long userId, BpmGardenWorkOrderCreateReqVo createRequestVo) { | 124 | + public Long createWorkOrder(Long userId, BpmGardenWorkOrderCreateReqVO createRequestVo) { |
| 123 | List<String> imgList = createRequestVo.getImgs(); | 125 | List<String> imgList = createRequestVo.getImgs(); |
| 124 | List<String> streetImgList = createRequestVo.getStreetImgList(); | 126 | List<String> streetImgList = createRequestVo.getStreetImgList(); |
| 125 | List<String> longRangeImgList = createRequestVo.getLongRangeImgList(); | 127 | List<String> longRangeImgList = createRequestVo.getLongRangeImgList(); |
| @@ -238,5 +240,13 @@ public class BpmGardenServiceImpl implements BpmGardenService{ | @@ -238,5 +240,13 @@ public class BpmGardenServiceImpl implements BpmGardenService{ | ||
| 238 | return targetList; | 240 | return targetList; |
| 239 | } | 241 | } |
| 240 | 242 | ||
| 243 | + @Override | ||
| 244 | + public PageResult<BpmGardenWorkOrderDO> getGardenInspectionPage(Long loginUserId, AppGardenWorkOrderPageReqVO pageVO) { | ||
| 245 | + MainInfoPageReqVO mainInfoPageReqVo = BeanUtils.toBean(pageVO,MainInfoPageReqVO.class); | ||
| 246 | + PageResult<MainInfoDO> pageList = workOrderMapper.selectPage(loginUserId, mainInfoPageReqVo); | ||
| 247 | + PageResult<BpmGardenWorkOrderDO> targetList = BeanUtils.toBean(pageList,BpmGardenWorkOrderDO.class); | ||
| 248 | + return targetList; | ||
| 249 | + } | ||
| 250 | + | ||
| 241 | 251 | ||
| 242 | } | 252 | } |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/listener/BpmQuickProcessTaskAutoCompleteListener.java
| @@ -5,6 +5,7 @@ import com.zteits.urbanops.module.bpm.api.event.BpmProcessInstanceStatusEventLis | @@ -5,6 +5,7 @@ import com.zteits.urbanops.module.bpm.api.event.BpmProcessInstanceStatusEventLis | ||
| 5 | import com.zteits.urbanops.module.workorder.api.constant.BpmCommonConstant; | 5 | import com.zteits.urbanops.module.workorder.api.constant.BpmCommonConstant; |
| 6 | import com.zteits.urbanops.module.workorder.service.garden.BpmGardenService; | 6 | import com.zteits.urbanops.module.workorder.service.garden.BpmGardenService; |
| 7 | import jakarta.annotation.Resource; | 7 | import jakarta.annotation.Resource; |
| 8 | +import lombok.extern.slf4j.Slf4j; | ||
| 8 | import org.flowable.common.engine.api.delegate.event.FlowableEngineEntityEvent; | 9 | import org.flowable.common.engine.api.delegate.event.FlowableEngineEntityEvent; |
| 9 | import org.springframework.stereotype.Component; | 10 | import org.springframework.stereotype.Component; |
| 10 | 11 | ||
| @@ -15,6 +16,7 @@ import org.springframework.stereotype.Component; | @@ -15,6 +16,7 @@ import org.springframework.stereotype.Component; | ||
| 15 | * @date 2025/12/6 14:00 | 16 | * @date 2025/12/6 14:00 |
| 16 | */ | 17 | */ |
| 17 | @Component | 18 | @Component |
| 19 | +@Slf4j | ||
| 18 | public class BpmQuickProcessTaskAutoCompleteListener extends BpmProcessInstanceStatusEventListener { | 20 | public class BpmQuickProcessTaskAutoCompleteListener extends BpmProcessInstanceStatusEventListener { |
| 19 | @Resource | 21 | @Resource |
| 20 | private BpmGardenService gardenService; | 22 | private BpmGardenService gardenService; |
| @@ -25,6 +27,7 @@ public class BpmQuickProcessTaskAutoCompleteListener extends BpmProcessInstanceS | @@ -25,6 +27,7 @@ public class BpmQuickProcessTaskAutoCompleteListener extends BpmProcessInstanceS | ||
| 25 | 27 | ||
| 26 | @Override | 28 | @Override |
| 27 | protected void onEvent(BpmProcessInstanceStatusEvent event) { | 29 | protected void onEvent(BpmProcessInstanceStatusEvent event) { |
| 30 | + log.info("业务ID:"+event.getBusinessKey()+",业务状态"+event.getStatus()); | ||
| 28 | gardenService.updateWorkOrderStatus(Long.parseLong(event.getBusinessKey()), event.getStatus()); | 31 | gardenService.updateWorkOrderStatus(Long.parseLong(event.getBusinessKey()), event.getStatus()); |
| 29 | 32 | ||
| 30 | } | 33 | } |