Commit 9f3e6c46122b54b418494dd6370d8a4951b58809

Authored by 王富生
Committed by 王彪总
1 parent 05df533d

app巡查汇总查询提交

urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/inspectionplan/vo/InspectionPlanPageReqVO.java
... ... @@ -28,6 +28,10 @@ public class InspectionPlanPageReqVO extends PageParam {
28 28 @Schema(description = "归属(一级部门id)", example = "20800")
29 29 private Long companyId;
30 30  
  31 + @Schema(description = "部门ID", example = "101")
  32 + private String deptId;
  33 +
  34 +
31 35 @Schema(description = "道路名称", example = "赵六")
32 36 private String roadName;
33 37  
... ...
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/road/vo/RoadSaveReqVO.java
... ... @@ -85,8 +85,7 @@ public class RoadSaveReqVO {
85 85 private String endRemark;
86 86  
87 87 @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
88   - @NotEmpty(message = "备注不能为空")
89   - @Size(min=0, max = 500, message = "备注不能为空")
  88 + @Size(max = 500, message = "备注最大500字符")
90 89 private String remark;
91 90  
92 91 @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
... ... @@ -89,8 +89,7 @@ public class RoadUpdateReqVO {
89 89 private String endRemark;
90 90  
91 91 @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
92   - @NotEmpty(message = "备注不能为空")
93   - @Size(max = 500, message = "备注不能为空")
  92 + @Size(max = 500, message = "备注最大500")
94 93 private String remark;
95 94  
96 95 @Schema(description = "归属(一级部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2323")
... ...
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/inspectionplan/InspectionPlanInterceptMapper.java
... ... @@ -23,6 +23,7 @@ public interface InspectionPlanInterceptMapper extends BaseMapperX<InspectionPla
23 23 .likeIfPresent(InspectionPlanDO::getPlanName, reqVO.getPlanName())
24 24 .eqIfPresent(InspectionPlanDO::getPlanAttr, reqVO.getPlanAttr())
25 25 .eqIfPresent(InspectionPlanDO::getPlanTypeId, reqVO.getPlanTypeId())
  26 + .eqIfPresent(InspectionPlanDO::getDeptId, reqVO.getDeptId())
26 27 .eqIfPresent(InspectionPlanDO::getCompanyId, reqVO.getCompanyId())
27 28 .likeIfPresent(InspectionPlanDO::getRoadName, reqVO.getRoadName())
28 29 .eqIfPresent(InspectionPlanDO::getLevelId, reqVO.getLevelId())
... ...
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/api/constant/BpmCommonConstant.java
... ... @@ -26,15 +26,15 @@ public class BpmCommonConstant {
26 26 /**
27 27 * 园林问题单图片类型
28 28 */
29   - public static final String GARDEN_INSPECT_WO_ATTACH1 = "01";
  29 + public static final String PROBLEM_IMG_GROUP = "01";
30 30 /**
31   - * 园林街道图片类型
  31 + * 园林处理结果图片类型
32 32 */
33   - public static final String GARDEN_INSPECT_WO_ATTACH2 = "02";
  33 + public static final String RESULT_IMG_GROUP = "02";
34 34 /**
35 35 * 园林远景图片类型
36 36 */
37   - public static final String GARDEN_INSPECT_WO_ATTACH3 = "03";
  37 +// public static final String GARDEN_INSPECT_WO_ATTACH3 = "03";
38 38 /**
39 39 * 园林工单编号前缀
40 40 */
... ...
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/vo/AppGardenWorkOrderRespVO.java
... ... @@ -4,6 +4,8 @@ import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.MainInf
4 4 import io.swagger.v3.oas.annotations.media.Schema;
5 5 import lombok.Data;
6 6  
  7 +import java.util.List;
  8 +
7 9 /**
8 10 * @author yanhuiqing
9 11 * @version 1.0
... ... @@ -13,4 +15,10 @@ import lombok.Data;
13 15 @Schema(description = "APP - 园林工单流程 Response VO")
14 16 @Data
15 17 public class AppGardenWorkOrderRespVO extends MainInfoRespVO {
  18 +
  19 + @Schema(description = "问题图片", example = "9184")
  20 + private List<String> problemImgsList;
  21 +
  22 + @Schema(description = "处理完成照片", example = "9184")
  23 + private List<String> completeImgsList;
16 24 }
... ...
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/dal/dataobject/garden/BpmGardenWorkOrderDO.java
1 1 package com.zteits.urbanops.module.workorder.dal.dataobject.garden;
2 2  
3 3 import com.zteits.urbanops.module.workorder.dal.dataobject.maininfo.MainInfoDO;
  4 +import io.swagger.v3.oas.annotations.media.Schema;
  5 +import lombok.Data;
  6 +
  7 +import java.util.List;
4 8  
5 9 /**
6 10 * @author yanhuiqing
... ... @@ -8,5 +12,12 @@ import com.zteits.urbanops.module.workorder.dal.dataobject.maininfo.MainInfoDO;
8 12 * @description: TODO
9 13 * @date 2025/12/1 11:34
10 14 */
  15 +@Data
11 16 public class BpmGardenWorkOrderDO extends MainInfoDO {
  17 +
  18 + @Schema(description = "问题图片", example = "9184")
  19 + private List<String> problemImgsList;
  20 +
  21 + @Schema(description = "处理完成照片", example = "9184")
  22 + private List<String> completeImgsList;
12 23 }
... ...
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmGardenServiceImpl.java
... ... @@ -31,6 +31,8 @@ import java.time.LocalDateTime;
31 31 import java.util.HashMap;
32 32 import java.util.List;
33 33 import java.util.Map;
  34 +import java.util.Arrays;
  35 +import java.util.stream.Collectors;
34 36  
35 37 import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception;
36 38 import static com.zteits.urbanops.module.workorder.enums.ErrorCodeConstants.MAIN_INFO_NOT_EXISTS;
... ... @@ -175,43 +177,49 @@ public class BpmGardenServiceImpl implements BpmGardenService{
175 177 if(ObjectUtils.isNotAllEmpty(imgList)){
176 178 AttachmentDO saveDO = new AttachmentDO();
177 179 saveDO.setBusiLine(workOrder.getBusiLine());
178   - saveDO.setBusiType(BpmCommonConstant.GARDEN_INSPECT_WO_ATTACH1);
  180 + saveDO.setBusiType(BpmCommonConstant.PROBLEM_IMG_GROUP);
179 181 saveDO.setOrderNo(workOrder.getOrderNo());
180 182 String filePaths = String.join(",",imgList);
181 183 saveDO.setFileNames(filePaths);
182 184 LambdaQueryWrapper<AttachmentDO> deleteWrapper = new LambdaQueryWrapper<AttachmentDO>()
183 185 .eq(AttachmentDO::getBusiLine, workOrder.getBusiLine())
184   - .eq(AttachmentDO::getBusiType, BpmCommonConstant.GARDEN_INSPECT_WO_ATTACH1)
  186 + .eq(AttachmentDO::getBusiType, BpmCommonConstant.PROBLEM_IMG_GROUP)
185 187 .eq(AttachmentDO::getOrderNo, workOrder.getOrderNo());
186 188 attachmentMapper.delete(deleteWrapper);
187 189 attachmentMapper.insert(saveDO);
188 190 }
189   - //街道图片
190   - if(ObjectUtils.isNotAllEmpty(streetImgList)){
191   - AttachmentDO saveDO = new AttachmentDO();
192   - saveDO.setBusiLine(workOrder.getBusiLine());
193   - saveDO.setBusiType(BpmCommonConstant.GARDEN_INSPECT_WO_ATTACH2);
194   - saveDO.setOrderNo(workOrder.getOrderNo());
195   - String filePaths = String.join(",",streetImgList);
196   - saveDO.setFileNames(filePaths);
197   - LambdaQueryWrapper<AttachmentDO> deleteWrapper = new LambdaQueryWrapper<AttachmentDO>()
198   - .eq(AttachmentDO::getBusiLine, workOrder.getBusiLine())
199   - .eq(AttachmentDO::getBusiType, BpmCommonConstant.GARDEN_INSPECT_WO_ATTACH2)
200   - .eq(AttachmentDO::getOrderNo, workOrder.getOrderNo());
201   - attachmentMapper.delete(deleteWrapper);
202   - attachmentMapper.insert(saveDO);
  191 +// //街道图片
  192 +// if(ObjectUtils.isNotAllEmpty(streetImgList)){
  193 +// AttachmentDO saveDO = new AttachmentDO();
  194 +// saveDO.setBusiLine(workOrder.getBusiLine());
  195 +// saveDO.setBusiType(BpmCommonConstant.GARDEN_INSPECT_WO_ATTACH2);
  196 +// saveDO.setOrderNo(workOrder.getOrderNo());
  197 +// String filePaths = String.join(",",streetImgList);
  198 +// saveDO.setFileNames(filePaths);
  199 +// LambdaQueryWrapper<AttachmentDO> deleteWrapper = new LambdaQueryWrapper<AttachmentDO>()
  200 +// .eq(AttachmentDO::getBusiLine, workOrder.getBusiLine())
  201 +// .eq(AttachmentDO::getBusiType, BpmCommonConstant.GARDEN_INSPECT_WO_ATTACH2)
  202 +// .eq(AttachmentDO::getOrderNo, workOrder.getOrderNo());
  203 +// attachmentMapper.delete(deleteWrapper);
  204 +// attachmentMapper.insert(saveDO);
  205 +// }
  206 + List<String> resultImgs = new java.util.ArrayList<>();
  207 + if (ObjectUtils.isNotAllEmpty(streetImgList)) {
  208 + resultImgs.addAll(streetImgList);
  209 + }
  210 + if (ObjectUtils.isNotAllEmpty(longRangeImgList)) {
  211 + resultImgs.addAll(longRangeImgList);
203 212 }
204   - //远景图片
205   - if(ObjectUtils.isNotAllEmpty(longRangeImgList)){
  213 + if(ObjectUtils.isNotAllEmpty(resultImgs)){
206 214 AttachmentDO saveDO = new AttachmentDO();
207 215 saveDO.setBusiLine(workOrder.getBusiLine());
208   - saveDO.setBusiType(BpmCommonConstant.GARDEN_INSPECT_WO_ATTACH3);
  216 + saveDO.setBusiType(BpmCommonConstant.RESULT_IMG_GROUP);
209 217 saveDO.setOrderNo(workOrder.getOrderNo());
210   - String filePaths = String.join(",",longRangeImgList);
  218 + String filePaths = String.join(",",resultImgs);
211 219 saveDO.setFileNames(filePaths);
212 220 LambdaQueryWrapper<AttachmentDO> deleteWrapper = new LambdaQueryWrapper<AttachmentDO>()
213 221 .eq(AttachmentDO::getBusiLine, workOrder.getBusiLine())
214   - .eq(AttachmentDO::getBusiType, BpmCommonConstant.GARDEN_INSPECT_WO_ATTACH3)
  222 + .eq(AttachmentDO::getBusiType, BpmCommonConstant.RESULT_IMG_GROUP)
215 223 .eq(AttachmentDO::getOrderNo, workOrder.getOrderNo());
216 224 attachmentMapper.delete(deleteWrapper);
217 225 attachmentMapper.insert(saveDO);
... ... @@ -220,6 +228,24 @@ public class BpmGardenServiceImpl implements BpmGardenService{
220 228  
221 229 }
222 230  
  231 + private List<String> attachmentGet(String busiLine, String busiType, String orderNo) {
  232 + LambdaQueryWrapper<AttachmentDO> queryWrapper = new LambdaQueryWrapper<AttachmentDO>()
  233 + .eq(AttachmentDO::getBusiLine, busiLine)
  234 + .eq(AttachmentDO::getBusiType, busiType)
  235 + .eq(AttachmentDO::getOrderNo, orderNo);
  236 + List<AttachmentDO> attachments = attachmentMapper.selectList(queryWrapper);
  237 + if (attachments == null || attachments.isEmpty()) {
  238 + return List.of();
  239 + }
  240 + return attachments.stream()
  241 + .map(AttachmentDO::getFileNames)
  242 + .filter(s -> s != null && !s.isEmpty())
  243 + .flatMap(s -> Arrays.stream(s.split(",")).map(String::trim))
  244 + .filter(s -> !s.isEmpty())
  245 + .distinct()
  246 + .collect(Collectors.toList());
  247 + }
  248 +
223 249  
224 250 @Override
225 251 public void updateWorkOrderStatus(Long id, Integer status) {
... ... @@ -236,7 +262,8 @@ public class BpmGardenServiceImpl implements BpmGardenService{
236 262 public BpmGardenWorkOrderDO getWorkOrder(Long id) {
237 263 MainInfoDO workOrder = workOrderMapper.selectById(id);
238 264 BpmGardenWorkOrderDO targetVo = BeanUtils.toBean(workOrder, BpmGardenWorkOrderDO.class);
239   - //TODO 定义页面展示字段在此扩展
  265 + targetVo.setProblemImgsList(attachmentGet(workOrder.getBusiLine(), BpmCommonConstant.PROBLEM_IMG_GROUP, workOrder.getOrderNo()));
  266 + targetVo.setCompleteImgsList(attachmentGet(workOrder.getBusiLine(), BpmCommonConstant.RESULT_IMG_GROUP, workOrder.getOrderNo()));
240 267 return targetVo;
241 268 }
242 269  
... ...
urbanops-server/src/main/resources/application.yaml
... ... @@ -67,7 +67,7 @@ flowable:
67 67 mybatis-plus:
68 68 configuration:
69 69 map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
70   - log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  70 + # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
71 71 global-config:
72 72 db-config:
73 73 id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
... ...