Commit b96de9a426859e1e9694155540e02210a99b23cc
1 parent
ae0c1003
工单修改
Showing
3 changed files
with
199 additions
and
8 deletions
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/maininfo/MainInfoController.java
| @@ -10,6 +10,7 @@ import com.zteits.urbanops.module.system.api.user.AdminUserApi; | @@ -10,6 +10,7 @@ import com.zteits.urbanops.module.system.api.user.AdminUserApi; | ||
| 10 | import com.zteits.urbanops.module.system.api.user.dto.AdminUserRespDTO; | 10 | import com.zteits.urbanops.module.system.api.user.dto.AdminUserRespDTO; |
| 11 | import com.zteits.urbanops.module.system.dal.dataobject.dept.DeptDO; | 11 | import com.zteits.urbanops.module.system.dal.dataobject.dept.DeptDO; |
| 12 | import com.zteits.urbanops.module.system.service.dept.DeptService; | 12 | import com.zteits.urbanops.module.system.service.dept.DeptService; |
| 13 | +import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.AdminMainInfoRespVO; | ||
| 13 | import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.MainInfoPageReqVO; | 14 | import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.MainInfoPageReqVO; |
| 14 | import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.MainInfoSaveReqVO; | 15 | import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.MainInfoSaveReqVO; |
| 15 | import com.zteits.urbanops.module.workorder.convert.maininfo.MainInfoConvert; | 16 | import com.zteits.urbanops.module.workorder.convert.maininfo.MainInfoConvert; |
| @@ -53,6 +54,8 @@ public class MainInfoController { | @@ -53,6 +54,8 @@ public class MainInfoController { | ||
| 53 | private DeptService deptService; | 54 | private DeptService deptService; |
| 54 | @Resource | 55 | @Resource |
| 55 | private AdminUserApi adminUserApi; | 56 | private AdminUserApi adminUserApi; |
| 57 | + //@Resource | ||
| 58 | + //private BpmTaskApi bpmTaskApi; | ||
| 56 | 59 | ||
| 57 | @PostMapping("/create") | 60 | @PostMapping("/create") |
| 58 | @Operation(summary = "创建工单信息") | 61 | @Operation(summary = "创建工单信息") |
| @@ -91,7 +94,7 @@ public class MainInfoController { | @@ -91,7 +94,7 @@ public class MainInfoController { | ||
| 91 | @Operation(summary = "获得工单信息") | 94 | @Operation(summary = "获得工单信息") |
| 92 | @Parameter(name = "id", description = "编号", required = true, example = "1024") | 95 | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| 93 | @PreAuthorize("@ss.hasPermission('workorder:main-info:query')") | 96 | @PreAuthorize("@ss.hasPermission('workorder:main-info:query')") |
| 94 | - public CommonResult<MainInfoRespVO> getMainInfo(@RequestParam("id") Long id) { | 97 | + public CommonResult<AdminMainInfoRespVO> getMainInfo(@RequestParam("id") Long id) { |
| 95 | MainInfoDO mainInfo = mainInfoService.getMainInfo(id); | 98 | MainInfoDO mainInfo = mainInfoService.getMainInfo(id); |
| 96 | 99 | ||
| 97 | // 若订单号列表非空,查询附件;否则跳过 | 100 | // 若订单号列表非空,查询附件;否则跳过 |
| @@ -124,7 +127,7 @@ public class MainInfoController { | @@ -124,7 +127,7 @@ public class MainInfoController { | ||
| 124 | @GetMapping("/page") | 127 | @GetMapping("/page") |
| 125 | @Operation(summary = "获得工单信息分页") | 128 | @Operation(summary = "获得工单信息分页") |
| 126 | @PreAuthorize("@ss.hasPermission('workorder:main-info:query')") | 129 | @PreAuthorize("@ss.hasPermission('workorder:main-info:query')") |
| 127 | - public CommonResult<PageResult<MainInfoRespVO>> getMainInfoPage(@Valid MainInfoPageReqVO pageReqVO) { | 130 | + public CommonResult<PageResult<AdminMainInfoRespVO>> getMainInfoPage(@Valid MainInfoPageReqVO pageReqVO) { |
| 128 | //登录人所属业务线 | 131 | //登录人所属业务线 |
| 129 | pageReqVO.setBusiLine(getBusiLine()); | 132 | pageReqVO.setBusiLine(getBusiLine()); |
| 130 | PageResult<MainInfoDO> pageResult = mainInfoService.getMainInfoPage(pageReqVO); | 133 | PageResult<MainInfoDO> pageResult = mainInfoService.getMainInfoPage(pageReqVO); |
| @@ -158,7 +161,18 @@ public class MainInfoController { | @@ -158,7 +161,18 @@ public class MainInfoController { | ||
| 158 | } | 161 | } |
| 159 | } | 162 | } |
| 160 | } | 163 | } |
| 161 | - // 4. 转换并返回结果 | 164 | + //4. 查询处理人 |
| 165 | +// List<String> processInstanceIdList = pageResult.getList().stream() | ||
| 166 | +// .map(MainInfoDO::getProcessInstanceId) | ||
| 167 | +// .filter(orderNo -> orderNo != null && !orderNo.isBlank()) | ||
| 168 | +// .collect(Collectors.toList()); | ||
| 169 | +// for (String s : processInstanceIdList) { | ||
| 170 | +// List<BpmTaskRespVO> bpmTaskRespVOS = bpmTaskApi.getTaskListByProcessInstanceId(s); | ||
| 171 | +// if (bpmTaskRespVOS != null) { | ||
| 172 | +// | ||
| 173 | +// } | ||
| 174 | +// } | ||
| 175 | + // 5. 转换并返回结果 | ||
| 162 | return success(MainInfoConvert.INSTANCE.buildMainInfoPage(pageResult, attachmentMap)); | 176 | return success(MainInfoConvert.INSTANCE.buildMainInfoPage(pageResult, attachmentMap)); |
| 163 | } | 177 | } |
| 164 | 178 |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/maininfo/vo/AdminMainInfoRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo; | ||
| 2 | + | ||
| 3 | +import cn.idev.excel.annotation.ExcelIgnoreUnannotated; | ||
| 4 | +import cn.idev.excel.annotation.ExcelProperty; | ||
| 5 | +import io.swagger.v3.oas.annotations.media.Schema; | ||
| 6 | +import lombok.Data; | ||
| 7 | + | ||
| 8 | +import java.math.BigDecimal; | ||
| 9 | +import java.time.LocalDateTime; | ||
| 10 | +import java.util.List; | ||
| 11 | +import java.util.Set; | ||
| 12 | + | ||
| 13 | +@Schema(description = "管理后台 - 工单信息 Response VO") | ||
| 14 | +@Data | ||
| 15 | +@ExcelIgnoreUnannotated | ||
| 16 | +public class AdminMainInfoRespVO { | ||
| 17 | + | ||
| 18 | + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7114") | ||
| 19 | + @ExcelProperty("ID") | ||
| 20 | + private Long id; | ||
| 21 | + | ||
| 22 | + @Schema(description = "业务线:yl 园林,wy 物业,sz 市政 ", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| 23 | + @ExcelProperty("业务线:yl 园林,wy 物业,sz 市政 ") | ||
| 24 | + private String busiLine; | ||
| 25 | + | ||
| 26 | + @Schema(description = "工单号", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| 27 | + @ExcelProperty("工单号") | ||
| 28 | + private String orderNo; | ||
| 29 | + | ||
| 30 | + @Schema(description = "工单名称", example = "张三") | ||
| 31 | + @ExcelProperty("工单名称") | ||
| 32 | + private String orderName; | ||
| 33 | + | ||
| 34 | + /** | ||
| 35 | + * 工单类型 Q:快速工单,C:普通工单,O:其他工单 | ||
| 36 | + */ | ||
| 37 | + private String orderType; | ||
| 38 | + | ||
| 39 | + @Schema(description = "来源ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1828") | ||
| 40 | + @ExcelProperty("来源ID 问题来源 1、巡查,2、游客居民,3、12345,4、网格 5、大区经理") | ||
| 41 | + private Integer sourceId; | ||
| 42 | + | ||
| 43 | + @Schema(description = "来源名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") | ||
| 44 | + @ExcelProperty("来源名称") | ||
| 45 | + private String sourceName; | ||
| 46 | + | ||
| 47 | + @Schema(description = "道路ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21128") | ||
| 48 | + @ExcelProperty("道路ID") | ||
| 49 | + private Long roadId; | ||
| 50 | + | ||
| 51 | + @Schema(description = "道路名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") | ||
| 52 | + @ExcelProperty("道路名称") | ||
| 53 | + private String roadName; | ||
| 54 | + | ||
| 55 | + @Schema(description = "街道ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27852") | ||
| 56 | + @ExcelProperty("街道ID") | ||
| 57 | + private String streetId; | ||
| 58 | + | ||
| 59 | + @Schema(description = "街道名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") | ||
| 60 | + @ExcelProperty("街道名称") | ||
| 61 | + private String streetName; | ||
| 62 | + | ||
| 63 | + @Schema(description = "养护级别ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28278") | ||
| 64 | + @ExcelProperty("养护级别ID") | ||
| 65 | + private Integer curingLevelId; | ||
| 66 | + | ||
| 67 | + @Schema(description = "养护级别", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") | ||
| 68 | + @ExcelProperty("养护级别") | ||
| 69 | + private String curingLevelName; | ||
| 70 | + | ||
| 71 | + @Schema(description = "提交日期", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| 72 | + @ExcelProperty("提交日期") | ||
| 73 | + private LocalDateTime commitDate; | ||
| 74 | + | ||
| 75 | + @Schema(description = "希望完成时间", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| 76 | + @ExcelProperty("希望完成时间") | ||
| 77 | + private LocalDateTime expectedFinishDate; | ||
| 78 | + | ||
| 79 | + @Schema(description = "完成时间", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| 80 | + @ExcelProperty("完成时间") | ||
| 81 | + private LocalDateTime finishDate; | ||
| 82 | + | ||
| 83 | + @Schema(description = "紧急程度:1:特急;2:紧急;3:一般", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") | ||
| 84 | + @ExcelProperty("紧急程度:1:特急;2:紧急;3:一般") | ||
| 85 | + private Integer pressingType; | ||
| 86 | + | ||
| 87 | + @Schema(description = "提交用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12757") | ||
| 88 | + private Long userId; | ||
| 89 | + | ||
| 90 | + @Schema(description = "提交用户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") | ||
| 91 | + @ExcelProperty("提交用户名称") | ||
| 92 | + private String userName; | ||
| 93 | + | ||
| 94 | + @Schema(description = "部门id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26936") | ||
| 95 | + private Long companyId; | ||
| 96 | + | ||
| 97 | + @Schema(description = "单位名称") | ||
| 98 | + @ExcelProperty("单位名称") | ||
| 99 | + private String companyName; | ||
| 100 | + | ||
| 101 | + @Schema(description = "经纬度类型: 1:国标; 2:百度;3:高德;4:腾讯", example = "2") | ||
| 102 | + @ExcelProperty("经纬度类型: 1:国标; 2:百度;3:高德;4:腾讯") | ||
| 103 | + private Integer latLonType; | ||
| 104 | + | ||
| 105 | + @Schema(description = "经度", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| 106 | + @ExcelProperty("经度") | ||
| 107 | + private BigDecimal lat; | ||
| 108 | + | ||
| 109 | + @Schema(description = "维度", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| 110 | + @ExcelProperty("维度") | ||
| 111 | + private BigDecimal lon; | ||
| 112 | + | ||
| 113 | + @Schema(description = "经纬度地址", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| 114 | + @ExcelProperty("经纬度地址") | ||
| 115 | + private String lonLatAddress; | ||
| 116 | + | ||
| 117 | + @Schema(description = "三方工单ID") | ||
| 118 | + @ExcelProperty("三方工单ID") | ||
| 119 | + private String thirdWorkNo; | ||
| 120 | + | ||
| 121 | + @Schema(description = "三方工单结果上报状态:1:待推送;2:推送成功;3:推送失败") | ||
| 122 | + @ExcelProperty("三方工单结果上报状态:1:待推送;2:推送成功;3:推送失败") | ||
| 123 | + private Integer thirdPushState; | ||
| 124 | + | ||
| 125 | + @Schema(description = "业务状态", example = "1") | ||
| 126 | + @ExcelProperty("业务状态") | ||
| 127 | + private String buzStatus; | ||
| 128 | + | ||
| 129 | + @Schema(description = "审批状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") | ||
| 130 | + @ExcelProperty("审批状态") | ||
| 131 | + private Integer status; | ||
| 132 | + | ||
| 133 | + @Schema(description = "流程实例的编号", example = "9184") | ||
| 134 | + @ExcelProperty("流程实例的编号") | ||
| 135 | + private String processInstanceId; | ||
| 136 | + | ||
| 137 | + @Schema(description = "工单描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对") | ||
| 138 | + @ExcelProperty("工单描述") | ||
| 139 | + private String remark; | ||
| 140 | + | ||
| 141 | + @Schema(description = "工单完成结果描述", example = "已完成") | ||
| 142 | + @ExcelProperty("工单完成结果描述") | ||
| 143 | + private String handleResult; | ||
| 144 | + | ||
| 145 | + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| 146 | + @ExcelProperty("创建时间") | ||
| 147 | + private LocalDateTime createTime; | ||
| 148 | + | ||
| 149 | + @Schema(description = "文件名称") | ||
| 150 | + private List<String> fileNames; | ||
| 151 | + | ||
| 152 | + @Schema(description = "共同处理人") | ||
| 153 | + private Set<Long> coHandlers; | ||
| 154 | + @Schema(description = "共同处理人名称,多个为数组") | ||
| 155 | + private List<String> coHandlersName; | ||
| 156 | + | ||
| 157 | + @Schema(description = "提交人电话") | ||
| 158 | + private String userMobile; | ||
| 159 | + /** | ||
| 160 | + * 实施人员名称 | ||
| 161 | + */ | ||
| 162 | + @Schema(description = "养护员") | ||
| 163 | + private String workerName; | ||
| 164 | + | ||
| 165 | + /** | ||
| 166 | + * 实施人员部门id | ||
| 167 | + */ | ||
| 168 | + private Long workerCompanyId; | ||
| 169 | + | ||
| 170 | + /** | ||
| 171 | + * 处理人 | ||
| 172 | + */ | ||
| 173 | + private String handlerName; | ||
| 174 | + | ||
| 175 | + | ||
| 176 | +} |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/convert/maininfo/MainInfoConvert.java
| @@ -4,6 +4,7 @@ import com.zteits.urbanops.framework.common.pojo.PageResult; | @@ -4,6 +4,7 @@ import com.zteits.urbanops.framework.common.pojo.PageResult; | ||
| 4 | import com.zteits.urbanops.framework.common.util.collection.CollectionUtils; | 4 | import com.zteits.urbanops.framework.common.util.collection.CollectionUtils; |
| 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.system.api.user.dto.AdminUserRespDTO; | 6 | import com.zteits.urbanops.module.system.api.user.dto.AdminUserRespDTO; |
| 7 | +import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.AdminMainInfoRespVO; | ||
| 7 | import com.zteits.urbanops.module.workorder.dal.dataobject.attachment.AttachmentDO; | 8 | import com.zteits.urbanops.module.workorder.dal.dataobject.attachment.AttachmentDO; |
| 8 | import com.zteits.urbanops.module.workorder.dal.dataobject.maininfo.MainInfoDO; | 9 | import com.zteits.urbanops.module.workorder.dal.dataobject.maininfo.MainInfoDO; |
| 9 | import com.zteits.urbanops.module.workorder.dto.MainInfoRespVO; | 10 | import com.zteits.urbanops.module.workorder.dto.MainInfoRespVO; |
| @@ -24,9 +25,9 @@ public interface MainInfoConvert { | @@ -24,9 +25,9 @@ public interface MainInfoConvert { | ||
| 24 | 25 | ||
| 25 | MainInfoConvert INSTANCE = Mappers.getMapper(MainInfoConvert.class); | 26 | MainInfoConvert INSTANCE = Mappers.getMapper(MainInfoConvert.class); |
| 26 | 27 | ||
| 27 | - default PageResult<MainInfoRespVO> buildMainInfoPage(PageResult<MainInfoDO> pageResult, Map<String, AttachmentDO> attachmentMap) { | ||
| 28 | - List<MainInfoRespVO> mainInfoVOList = CollectionUtils.convertList(pageResult.getList(), mainInfoDO -> { | ||
| 29 | - MainInfoRespVO mainInfoVo = BeanUtils.toBean(mainInfoDO, MainInfoRespVO.class); | 28 | + default PageResult<AdminMainInfoRespVO> buildMainInfoPage(PageResult<MainInfoDO> pageResult, Map<String, AttachmentDO> attachmentMap) { |
| 29 | + List<AdminMainInfoRespVO> mainInfoVOList = CollectionUtils.convertList(pageResult.getList(), mainInfoDO -> { | ||
| 30 | + AdminMainInfoRespVO mainInfoVo = BeanUtils.toBean(mainInfoDO, AdminMainInfoRespVO.class); | ||
| 30 | if (attachmentMap != null && !attachmentMap.isEmpty()) { | 31 | if (attachmentMap != null && !attachmentMap.isEmpty()) { |
| 31 | AttachmentDO attachmentDO = attachmentMap.get(mainInfoDO.getOrderNo()); | 32 | AttachmentDO attachmentDO = attachmentMap.get(mainInfoDO.getOrderNo()); |
| 32 | if (attachmentDO != null) { | 33 | if (attachmentDO != null) { |
| @@ -44,8 +45,8 @@ public interface MainInfoConvert { | @@ -44,8 +45,8 @@ public interface MainInfoConvert { | ||
| 44 | return new PageResult<>(mainInfoVOList, pageResult.getTotal()); | 45 | return new PageResult<>(mainInfoVOList, pageResult.getTotal()); |
| 45 | } | 46 | } |
| 46 | 47 | ||
| 47 | - default MainInfoRespVO buildMainInfo(MainInfoDO mainInfoDO, Map<String, AttachmentDO> attachmentMap, String deptName,Map<Long, AdminUserRespDTO> userMap) { | ||
| 48 | - MainInfoRespVO mainInfoVo = BeanUtils.toBean(mainInfoDO, MainInfoRespVO.class); | 48 | + default AdminMainInfoRespVO buildMainInfo(MainInfoDO mainInfoDO, Map<String, AttachmentDO> attachmentMap, String deptName,Map<Long, AdminUserRespDTO> userMap) { |
| 49 | + AdminMainInfoRespVO mainInfoVo = BeanUtils.toBean(mainInfoDO, AdminMainInfoRespVO.class); | ||
| 49 | if (mainInfoDO != null) { | 50 | if (mainInfoDO != null) { |
| 50 | if (attachmentMap != null && !attachmentMap.isEmpty()) { | 51 | if (attachmentMap != null && !attachmentMap.isEmpty()) { |
| 51 | AttachmentDO attachmentDO = attachmentMap.get(mainInfoDO.getOrderNo()); | 52 | AttachmentDO attachmentDO = attachmentMap.get(mainInfoDO.getOrderNo()); |