Commit a9e42464e47e743a75aca3a3bb130f6ee4df54f8
1 parent
a68ae57e
工单管理代码提交
Showing
30 changed files
with
1914 additions
and
0 deletions
pom.xml
| ... | ... | @@ -17,6 +17,7 @@ |
| 17 | 17 | <module>urbanops-module-infra</module> |
| 18 | 18 | <module>urbanops-module-gloabl</module> |
| 19 | 19 | <module>urbanops-module-garden</module> |
| 20 | + <module>urbanops-module-workorder</module> | |
| 20 | 21 | <!-- <module>urbanops-module-member</module>--> |
| 21 | 22 | <module>urbanops-module-bpm</module> |
| 22 | 23 | <!-- <module>urbanops-module-report</module>--> | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/attachment/AttachmentController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.attachment; | |
| 2 | + | |
| 3 | +import org.springframework.web.bind.annotation.*; | |
| 4 | +import jakarta.annotation.Resource; | |
| 5 | +import org.springframework.validation.annotation.Validated; | |
| 6 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 7 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 8 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 9 | +import io.swagger.v3.oas.annotations.Operation; | |
| 10 | + | |
| 11 | +import jakarta.validation.constraints.*; | |
| 12 | +import jakarta.validation.*; | |
| 13 | +import jakarta.servlet.http.*; | |
| 14 | +import java.util.*; | |
| 15 | +import java.io.IOException; | |
| 16 | + | |
| 17 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 18 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 19 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 20 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 21 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 22 | + | |
| 23 | +import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; | |
| 24 | + | |
| 25 | +import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; | |
| 26 | +import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.*; | |
| 27 | + | |
| 28 | +import com.zteits.urbanops.module.workorder.controller.admin.attachment.vo.*; | |
| 29 | +import com.zteits.urbanops.module.workorder.dal.dataobject.attachment.AttachmentDO; | |
| 30 | +import com.zteits.urbanops.module.workorder.service.attachment.AttachmentService; | |
| 31 | + | |
| 32 | +@Tag(name = "管理后台 - 工单附件信息") | |
| 33 | +@RestController | |
| 34 | +@RequestMapping("/workorder/attachment") | |
| 35 | +@Validated | |
| 36 | +public class AttachmentController { | |
| 37 | + | |
| 38 | + @Resource | |
| 39 | + private AttachmentService attachmentService; | |
| 40 | + | |
| 41 | + @PostMapping("/create") | |
| 42 | + @Operation(summary = "创建工单附件信息") | |
| 43 | + @PreAuthorize("@ss.hasPermission('workorder:attachment:create')") | |
| 44 | + public CommonResult<Long> createAttachment(@Valid @RequestBody AttachmentSaveReqVO createReqVO) { | |
| 45 | + return success(attachmentService.createAttachment(createReqVO)); | |
| 46 | + } | |
| 47 | + | |
| 48 | + @PutMapping("/update") | |
| 49 | + @Operation(summary = "更新工单附件信息") | |
| 50 | + @PreAuthorize("@ss.hasPermission('workorder:attachment:update')") | |
| 51 | + public CommonResult<Boolean> updateAttachment(@Valid @RequestBody AttachmentSaveReqVO updateReqVO) { | |
| 52 | + attachmentService.updateAttachment(updateReqVO); | |
| 53 | + return success(true); | |
| 54 | + } | |
| 55 | + | |
| 56 | + @DeleteMapping("/delete") | |
| 57 | + @Operation(summary = "删除工单附件信息") | |
| 58 | + @Parameter(name = "id", description = "编号", required = true) | |
| 59 | + @PreAuthorize("@ss.hasPermission('workorder:attachment:delete')") | |
| 60 | + public CommonResult<Boolean> deleteAttachment(@RequestParam("id") Long id) { | |
| 61 | + attachmentService.deleteAttachment(id); | |
| 62 | + return success(true); | |
| 63 | + } | |
| 64 | + | |
| 65 | + @DeleteMapping("/delete-list") | |
| 66 | + @Parameter(name = "ids", description = "编号", required = true) | |
| 67 | + @Operation(summary = "批量删除工单附件信息") | |
| 68 | + @PreAuthorize("@ss.hasPermission('workorder:attachment:delete')") | |
| 69 | + public CommonResult<Boolean> deleteAttachmentList(@RequestParam("ids") List<Long> ids) { | |
| 70 | + attachmentService.deleteAttachmentListByIds(ids); | |
| 71 | + return success(true); | |
| 72 | + } | |
| 73 | + | |
| 74 | + @GetMapping("/get") | |
| 75 | + @Operation(summary = "获得工单附件信息") | |
| 76 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | |
| 77 | + @PreAuthorize("@ss.hasPermission('workorder:attachment:query')") | |
| 78 | + public CommonResult<AttachmentRespVO> getAttachment(@RequestParam("id") Long id) { | |
| 79 | + AttachmentDO attachment = attachmentService.getAttachment(id); | |
| 80 | + return success(BeanUtils.toBean(attachment, AttachmentRespVO.class)); | |
| 81 | + } | |
| 82 | + | |
| 83 | + @GetMapping("/page") | |
| 84 | + @Operation(summary = "获得工单附件信息分页") | |
| 85 | + @PreAuthorize("@ss.hasPermission('workorder:attachment:query')") | |
| 86 | + public CommonResult<PageResult<AttachmentRespVO>> getAttachmentPage(@Valid AttachmentPageReqVO pageReqVO) { | |
| 87 | + PageResult<AttachmentDO> pageResult = attachmentService.getAttachmentPage(pageReqVO); | |
| 88 | + return success(BeanUtils.toBean(pageResult, AttachmentRespVO.class)); | |
| 89 | + } | |
| 90 | + | |
| 91 | + @GetMapping("/export-excel") | |
| 92 | + @Operation(summary = "导出工单附件信息 Excel") | |
| 93 | + @PreAuthorize("@ss.hasPermission('workorder:attachment:export')") | |
| 94 | + @ApiAccessLog(operateType = EXPORT) | |
| 95 | + public void exportAttachmentExcel(@Valid AttachmentPageReqVO pageReqVO, | |
| 96 | + HttpServletResponse response) throws IOException { | |
| 97 | + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 98 | + List<AttachmentDO> list = attachmentService.getAttachmentPage(pageReqVO).getList(); | |
| 99 | + // 导出 Excel | |
| 100 | + ExcelUtils.write(response, "工单附件信息.xls", "数据", AttachmentRespVO.class, | |
| 101 | + BeanUtils.toBean(list, AttachmentRespVO.class)); | |
| 102 | + } | |
| 103 | + | |
| 104 | +} | |
| 0 | 105 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/attachment/vo/AttachmentPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.attachment.vo; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import java.util.*; | |
| 5 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 6 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 7 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 8 | +import java.time.LocalDateTime; | |
| 9 | + | |
| 10 | +import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | |
| 11 | + | |
| 12 | +@Schema(description = "管理后台 - 工单附件信息分页 Request VO") | |
| 13 | +@Data | |
| 14 | +public class AttachmentPageReqVO extends PageParam { | |
| 15 | + | |
| 16 | + @Schema(description = "工单号") | |
| 17 | + private String orderNo; | |
| 18 | + | |
| 19 | + @Schema(description = "业务线:yl 园林,wy 物业,sz 市政 ") | |
| 20 | + private String busiLine; | |
| 21 | + | |
| 22 | + @Schema(description = "业务类型:01 问题图片,02 街道图片,03 选景图片", example = "1") | |
| 23 | + private String busiType; | |
| 24 | + | |
| 25 | + @Schema(description = "文件名称") | |
| 26 | + private String fileNames; | |
| 27 | + | |
| 28 | + @Schema(description = "路径", example = "https://www.iocoder.cn") | |
| 29 | + private String hostUrl; | |
| 30 | + | |
| 31 | + @Schema(description = "文件大小") | |
| 32 | + private String fileSize; | |
| 33 | + | |
| 34 | + @Schema(description = "文件类型", example = "2") | |
| 35 | + private String contentType; | |
| 36 | + | |
| 37 | + @Schema(description = "描述", example = "你说的对") | |
| 38 | + private String remark; | |
| 39 | + | |
| 40 | + @Schema(description = "创建时间") | |
| 41 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 42 | + private LocalDateTime[] createTime; | |
| 43 | + | |
| 44 | +} | |
| 0 | 45 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/attachment/vo/AttachmentRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.attachment.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.*; | |
| 5 | +import java.util.*; | |
| 6 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 7 | +import java.time.LocalDateTime; | |
| 8 | +import cn.idev.excel.annotation.*; | |
| 9 | + | |
| 10 | +@Schema(description = "管理后台 - 工单附件信息 Response VO") | |
| 11 | +@Data | |
| 12 | +@ExcelIgnoreUnannotated | |
| 13 | +public class AttachmentRespVO { | |
| 14 | + | |
| 15 | + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "4728") | |
| 16 | + @ExcelProperty("ID") | |
| 17 | + private Long id; | |
| 18 | + | |
| 19 | + @Schema(description = "工单号", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 20 | + @ExcelProperty("工单号") | |
| 21 | + private String orderNo; | |
| 22 | + | |
| 23 | + @Schema(description = "业务线:yl 园林,wy 物业,sz 市政 ", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 24 | + @ExcelProperty("业务线:yl 园林,wy 物业,sz 市政 ") | |
| 25 | + private String busiLine; | |
| 26 | + | |
| 27 | + @Schema(description = "业务类型:01 问题图片,02 街道图片,03 选景图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | |
| 28 | + @ExcelProperty("业务类型:01 问题图片,02 街道图片,03 选景图片") | |
| 29 | + private String busiType; | |
| 30 | + | |
| 31 | + @Schema(description = "文件名称") | |
| 32 | + @ExcelProperty("文件名称") | |
| 33 | + private String fileNames; | |
| 34 | + | |
| 35 | + @Schema(description = "路径", example = "https://www.iocoder.cn") | |
| 36 | + @ExcelProperty("路径") | |
| 37 | + private String hostUrl; | |
| 38 | + | |
| 39 | + @Schema(description = "文件大小") | |
| 40 | + @ExcelProperty("文件大小") | |
| 41 | + private String fileSize; | |
| 42 | + | |
| 43 | + @Schema(description = "文件类型", example = "2") | |
| 44 | + @ExcelProperty("文件类型") | |
| 45 | + private String contentType; | |
| 46 | + | |
| 47 | + @Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对") | |
| 48 | + @ExcelProperty("描述") | |
| 49 | + private String remark; | |
| 50 | + | |
| 51 | + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 52 | + @ExcelProperty("创建时间") | |
| 53 | + private LocalDateTime createTime; | |
| 54 | + | |
| 55 | +} | |
| 0 | 56 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/attachment/vo/AttachmentSaveReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.attachment.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.*; | |
| 5 | +import java.util.*; | |
| 6 | +import jakarta.validation.constraints.*; | |
| 7 | + | |
| 8 | +@Schema(description = "管理后台 - 工单附件信息新增/修改 Request VO") | |
| 9 | +@Data | |
| 10 | +public class AttachmentSaveReqVO { | |
| 11 | + | |
| 12 | + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "4728") | |
| 13 | + private Long id; | |
| 14 | + | |
| 15 | + @Schema(description = "工单号", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 16 | + @NotEmpty(message = "工单号不能为空") | |
| 17 | + private String orderNo; | |
| 18 | + | |
| 19 | + @Schema(description = "业务线:yl 园林,wy 物业,sz 市政 ", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 20 | + @NotEmpty(message = "业务线:yl 园林,wy 物业,sz 市政 不能为空") | |
| 21 | + private String busiLine; | |
| 22 | + | |
| 23 | + @Schema(description = "业务类型:01 问题图片,02 街道图片,03 选景图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | |
| 24 | + @NotEmpty(message = "业务类型:01 问题图片,02 街道图片,03 选景图片不能为空") | |
| 25 | + private String busiType; | |
| 26 | + | |
| 27 | + @Schema(description = "文件名称") | |
| 28 | + private String fileNames; | |
| 29 | + | |
| 30 | + @Schema(description = "路径", example = "https://www.iocoder.cn") | |
| 31 | + private String hostUrl; | |
| 32 | + | |
| 33 | + @Schema(description = "文件大小") | |
| 34 | + private String fileSize; | |
| 35 | + | |
| 36 | + @Schema(description = "文件类型", example = "2") | |
| 37 | + private String contentType; | |
| 38 | + | |
| 39 | + @Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对") | |
| 40 | + @NotEmpty(message = "描述不能为空") | |
| 41 | + private String remark; | |
| 42 | + | |
| 43 | +} | |
| 0 | 44 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/maininfo/MainInfoController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.maininfo; | |
| 2 | + | |
| 3 | +import org.springframework.web.bind.annotation.*; | |
| 4 | +import jakarta.annotation.Resource; | |
| 5 | +import org.springframework.validation.annotation.Validated; | |
| 6 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 7 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 8 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 9 | +import io.swagger.v3.oas.annotations.Operation; | |
| 10 | + | |
| 11 | +import jakarta.validation.constraints.*; | |
| 12 | +import jakarta.validation.*; | |
| 13 | +import jakarta.servlet.http.*; | |
| 14 | +import java.util.*; | |
| 15 | +import java.io.IOException; | |
| 16 | + | |
| 17 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 18 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 19 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 20 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 21 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 22 | + | |
| 23 | +import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; | |
| 24 | + | |
| 25 | +import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; | |
| 26 | +import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.*; | |
| 27 | + | |
| 28 | +import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.*; | |
| 29 | +import com.zteits.urbanops.module.workorder.dal.dataobject.maininfo.MainInfoDO; | |
| 30 | +import com.zteits.urbanops.module.workorder.service.maininfo.MainInfoService; | |
| 31 | + | |
| 32 | +@Tag(name = "管理后台 - 工单信息") | |
| 33 | +@RestController | |
| 34 | +@RequestMapping("/workorder/main-info") | |
| 35 | +@Validated | |
| 36 | +public class MainInfoController { | |
| 37 | + | |
| 38 | + @Resource | |
| 39 | + private MainInfoService mainInfoService; | |
| 40 | + | |
| 41 | + @PostMapping("/create") | |
| 42 | + @Operation(summary = "创建工单信息") | |
| 43 | + @PreAuthorize("@ss.hasPermission('workorder:main-info:create')") | |
| 44 | + public CommonResult<Long> createMainInfo(@Valid @RequestBody MainInfoSaveReqVO createReqVO) { | |
| 45 | + return success(mainInfoService.createMainInfo(createReqVO)); | |
| 46 | + } | |
| 47 | + | |
| 48 | + @PutMapping("/update") | |
| 49 | + @Operation(summary = "更新工单信息") | |
| 50 | + @PreAuthorize("@ss.hasPermission('workorder:main-info:update')") | |
| 51 | + public CommonResult<Boolean> updateMainInfo(@Valid @RequestBody MainInfoSaveReqVO updateReqVO) { | |
| 52 | + mainInfoService.updateMainInfo(updateReqVO); | |
| 53 | + return success(true); | |
| 54 | + } | |
| 55 | + | |
| 56 | + @DeleteMapping("/delete") | |
| 57 | + @Operation(summary = "删除工单信息") | |
| 58 | + @Parameter(name = "id", description = "编号", required = true) | |
| 59 | + @PreAuthorize("@ss.hasPermission('workorder:main-info:delete')") | |
| 60 | + public CommonResult<Boolean> deleteMainInfo(@RequestParam("id") Long id) { | |
| 61 | + mainInfoService.deleteMainInfo(id); | |
| 62 | + return success(true); | |
| 63 | + } | |
| 64 | + | |
| 65 | + @DeleteMapping("/delete-list") | |
| 66 | + @Parameter(name = "ids", description = "编号", required = true) | |
| 67 | + @Operation(summary = "批量删除工单信息") | |
| 68 | + @PreAuthorize("@ss.hasPermission('workorder:main-info:delete')") | |
| 69 | + public CommonResult<Boolean> deleteMainInfoList(@RequestParam("ids") List<Long> ids) { | |
| 70 | + mainInfoService.deleteMainInfoListByIds(ids); | |
| 71 | + return success(true); | |
| 72 | + } | |
| 73 | + | |
| 74 | + @GetMapping("/get") | |
| 75 | + @Operation(summary = "获得工单信息") | |
| 76 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | |
| 77 | + @PreAuthorize("@ss.hasPermission('workorder:main-info:query')") | |
| 78 | + public CommonResult<MainInfoRespVO> getMainInfo(@RequestParam("id") Long id) { | |
| 79 | + MainInfoDO mainInfo = mainInfoService.getMainInfo(id); | |
| 80 | + return success(BeanUtils.toBean(mainInfo, MainInfoRespVO.class)); | |
| 81 | + } | |
| 82 | + | |
| 83 | + @GetMapping("/page") | |
| 84 | + @Operation(summary = "获得工单信息分页") | |
| 85 | + @PreAuthorize("@ss.hasPermission('workorder:main-info:query')") | |
| 86 | + public CommonResult<PageResult<MainInfoRespVO>> getMainInfoPage(@Valid MainInfoPageReqVO pageReqVO) { | |
| 87 | + PageResult<MainInfoDO> pageResult = mainInfoService.getMainInfoPage(pageReqVO); | |
| 88 | + return success(BeanUtils.toBean(pageResult, MainInfoRespVO.class)); | |
| 89 | + } | |
| 90 | + | |
| 91 | + @GetMapping("/export-excel") | |
| 92 | + @Operation(summary = "导出工单信息 Excel") | |
| 93 | + @PreAuthorize("@ss.hasPermission('workorder:main-info:export')") | |
| 94 | + @ApiAccessLog(operateType = EXPORT) | |
| 95 | + public void exportMainInfoExcel(@Valid MainInfoPageReqVO pageReqVO, | |
| 96 | + HttpServletResponse response) throws IOException { | |
| 97 | + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 98 | + List<MainInfoDO> list = mainInfoService.getMainInfoPage(pageReqVO).getList(); | |
| 99 | + // 导出 Excel | |
| 100 | + ExcelUtils.write(response, "工单信息.xls", "数据", MainInfoRespVO.class, | |
| 101 | + BeanUtils.toBean(list, MainInfoRespVO.class)); | |
| 102 | + } | |
| 103 | + | |
| 104 | +} | |
| 0 | 105 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/maininfo/vo/MainInfoPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import java.util.*; | |
| 5 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 6 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 7 | +import java.math.BigDecimal; | |
| 8 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 9 | +import java.time.LocalDateTime; | |
| 10 | + | |
| 11 | +import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | |
| 12 | + | |
| 13 | +@Schema(description = "管理后台 - 工单信息分页 Request VO") | |
| 14 | +@Data | |
| 15 | +public class MainInfoPageReqVO extends PageParam { | |
| 16 | + | |
| 17 | + @Schema(description = "业务线:yl 园林,wy 物业,sz 市政 ") | |
| 18 | + private String busiLine; | |
| 19 | + | |
| 20 | + @Schema(description = "工单号") | |
| 21 | + private String orderNo; | |
| 22 | + | |
| 23 | + @Schema(description = "工单名称", example = "张三") | |
| 24 | + private String orderName; | |
| 25 | + | |
| 26 | + @Schema(description = "来源ID", example = "1828") | |
| 27 | + private Integer sourceId; | |
| 28 | + | |
| 29 | + @Schema(description = "来源名称", example = "芋艿") | |
| 30 | + private String sourceName; | |
| 31 | + | |
| 32 | + @Schema(description = "道路ID", example = "21128") | |
| 33 | + private Long roadId; | |
| 34 | + | |
| 35 | + @Schema(description = "道路名称", example = "王五") | |
| 36 | + private String roadName; | |
| 37 | + | |
| 38 | + @Schema(description = "街道ID", example = "27852") | |
| 39 | + private String streetId; | |
| 40 | + | |
| 41 | + @Schema(description = "街道名称", example = "芋艿") | |
| 42 | + private String streetName; | |
| 43 | + | |
| 44 | + @Schema(description = "养护级别ID", example = "28278") | |
| 45 | + private Integer curingLevelId; | |
| 46 | + | |
| 47 | + @Schema(description = "养护级别", example = "王五") | |
| 48 | + private String curingLevelName; | |
| 49 | + | |
| 50 | + @Schema(description = "提交日期") | |
| 51 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 52 | + private LocalDateTime[] commitDate; | |
| 53 | + | |
| 54 | + @Schema(description = "紧急程度:1:特急;2:紧急;3:一般", example = "2") | |
| 55 | + private Integer pressingType; | |
| 56 | + | |
| 57 | + @Schema(description = "提交用户ID", example = "12757") | |
| 58 | + private Long userId; | |
| 59 | + | |
| 60 | + @Schema(description = "提交用户名称", example = "王五") | |
| 61 | + private String userName; | |
| 62 | + | |
| 63 | + @Schema(description = "部门id", example = "26936") | |
| 64 | + private Long companyId; | |
| 65 | + | |
| 66 | + @Schema(description = "经纬度类型: 1:国标; 2:百度;3:高德;4:腾讯", example = "2") | |
| 67 | + private Integer latLonType; | |
| 68 | + | |
| 69 | + @Schema(description = "经度") | |
| 70 | + private BigDecimal lat; | |
| 71 | + | |
| 72 | + @Schema(description = "维度") | |
| 73 | + private BigDecimal lon; | |
| 74 | + | |
| 75 | + @Schema(description = "经纬度地址") | |
| 76 | + private String lonLatAddress; | |
| 77 | + | |
| 78 | + @Schema(description = "三方工单ID") | |
| 79 | + private String thirdWorkNo; | |
| 80 | + | |
| 81 | + @Schema(description = "三方工单结果上报状态:1:待推送;2:推送成功;3:推送失败") | |
| 82 | + private Integer thirdPushState; | |
| 83 | + | |
| 84 | + @Schema(description = "业务状态", example = "1") | |
| 85 | + private String buzStatus; | |
| 86 | + | |
| 87 | + @Schema(description = "审批状态", example = "2") | |
| 88 | + private Integer status; | |
| 89 | + | |
| 90 | + @Schema(description = "流程实例的编号", example = "9184") | |
| 91 | + private String processInstanceId; | |
| 92 | + | |
| 93 | + @Schema(description = "工单描述", example = "你说的对") | |
| 94 | + private String remark; | |
| 95 | + | |
| 96 | + @Schema(description = "创建时间") | |
| 97 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 98 | + private LocalDateTime[] createTime; | |
| 99 | + | |
| 100 | +} | |
| 0 | 101 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/maininfo/vo/MainInfoRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.*; | |
| 5 | +import java.util.*; | |
| 6 | +import java.math.BigDecimal; | |
| 7 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 8 | +import java.time.LocalDateTime; | |
| 9 | +import cn.idev.excel.annotation.*; | |
| 10 | + | |
| 11 | +@Schema(description = "管理后台 - 工单信息 Response VO") | |
| 12 | +@Data | |
| 13 | +@ExcelIgnoreUnannotated | |
| 14 | +public class MainInfoRespVO { | |
| 15 | + | |
| 16 | + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7114") | |
| 17 | + @ExcelProperty("ID") | |
| 18 | + private Long id; | |
| 19 | + | |
| 20 | + @Schema(description = "业务线:yl 园林,wy 物业,sz 市政 ", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 21 | + @ExcelProperty("业务线:yl 园林,wy 物业,sz 市政 ") | |
| 22 | + private String busiLine; | |
| 23 | + | |
| 24 | + @Schema(description = "工单号", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 25 | + @ExcelProperty("工单号") | |
| 26 | + private String orderNo; | |
| 27 | + | |
| 28 | + @Schema(description = "工单名称", example = "张三") | |
| 29 | + @ExcelProperty("工单名称") | |
| 30 | + private String orderName; | |
| 31 | + | |
| 32 | + @Schema(description = "来源ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1828") | |
| 33 | + @ExcelProperty("来源ID") | |
| 34 | + private Integer sourceId; | |
| 35 | + | |
| 36 | + @Schema(description = "来源名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") | |
| 37 | + @ExcelProperty("来源名称") | |
| 38 | + private String sourceName; | |
| 39 | + | |
| 40 | + @Schema(description = "道路ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21128") | |
| 41 | + @ExcelProperty("道路ID") | |
| 42 | + private Long roadId; | |
| 43 | + | |
| 44 | + @Schema(description = "道路名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") | |
| 45 | + @ExcelProperty("道路名称") | |
| 46 | + private String roadName; | |
| 47 | + | |
| 48 | + @Schema(description = "街道ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27852") | |
| 49 | + @ExcelProperty("街道ID") | |
| 50 | + private String streetId; | |
| 51 | + | |
| 52 | + @Schema(description = "街道名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") | |
| 53 | + @ExcelProperty("街道名称") | |
| 54 | + private String streetName; | |
| 55 | + | |
| 56 | + @Schema(description = "养护级别ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28278") | |
| 57 | + @ExcelProperty("养护级别ID") | |
| 58 | + private Integer curingLevelId; | |
| 59 | + | |
| 60 | + @Schema(description = "养护级别", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") | |
| 61 | + @ExcelProperty("养护级别") | |
| 62 | + private String curingLevelName; | |
| 63 | + | |
| 64 | + @Schema(description = "提交日期", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 65 | + @ExcelProperty("提交日期") | |
| 66 | + private LocalDateTime commitDate; | |
| 67 | + | |
| 68 | + @Schema(description = "紧急程度:1:特急;2:紧急;3:一般", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") | |
| 69 | + @ExcelProperty("紧急程度:1:特急;2:紧急;3:一般") | |
| 70 | + private Integer pressingType; | |
| 71 | + | |
| 72 | + @Schema(description = "提交用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12757") | |
| 73 | + @ExcelProperty("提交用户ID") | |
| 74 | + private Long userId; | |
| 75 | + | |
| 76 | + @Schema(description = "提交用户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") | |
| 77 | + @ExcelProperty("提交用户名称") | |
| 78 | + private String userName; | |
| 79 | + | |
| 80 | + @Schema(description = "部门id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26936") | |
| 81 | + @ExcelProperty("部门id") | |
| 82 | + private Long companyId; | |
| 83 | + | |
| 84 | + @Schema(description = "经纬度类型: 1:国标; 2:百度;3:高德;4:腾讯", example = "2") | |
| 85 | + @ExcelProperty("经纬度类型: 1:国标; 2:百度;3:高德;4:腾讯") | |
| 86 | + private Integer latLonType; | |
| 87 | + | |
| 88 | + @Schema(description = "经度", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 89 | + @ExcelProperty("经度") | |
| 90 | + private BigDecimal lat; | |
| 91 | + | |
| 92 | + @Schema(description = "维度", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 93 | + @ExcelProperty("维度") | |
| 94 | + private BigDecimal lon; | |
| 95 | + | |
| 96 | + @Schema(description = "经纬度地址", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 97 | + @ExcelProperty("经纬度地址") | |
| 98 | + private String lonLatAddress; | |
| 99 | + | |
| 100 | + @Schema(description = "三方工单ID") | |
| 101 | + @ExcelProperty("三方工单ID") | |
| 102 | + private String thirdWorkNo; | |
| 103 | + | |
| 104 | + @Schema(description = "三方工单结果上报状态:1:待推送;2:推送成功;3:推送失败") | |
| 105 | + @ExcelProperty("三方工单结果上报状态:1:待推送;2:推送成功;3:推送失败") | |
| 106 | + private Integer thirdPushState; | |
| 107 | + | |
| 108 | + @Schema(description = "业务状态", example = "1") | |
| 109 | + @ExcelProperty("业务状态") | |
| 110 | + private String buzStatus; | |
| 111 | + | |
| 112 | + @Schema(description = "审批状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") | |
| 113 | + @ExcelProperty("审批状态") | |
| 114 | + private Integer status; | |
| 115 | + | |
| 116 | + @Schema(description = "流程实例的编号", example = "9184") | |
| 117 | + @ExcelProperty("流程实例的编号") | |
| 118 | + private String processInstanceId; | |
| 119 | + | |
| 120 | + @Schema(description = "工单描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对") | |
| 121 | + @ExcelProperty("工单描述") | |
| 122 | + private String remark; | |
| 123 | + | |
| 124 | + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 125 | + @ExcelProperty("创建时间") | |
| 126 | + private LocalDateTime createTime; | |
| 127 | + | |
| 128 | +} | |
| 0 | 129 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/maininfo/vo/MainInfoSaveReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.*; | |
| 5 | +import java.util.*; | |
| 6 | +import jakarta.validation.constraints.*; | |
| 7 | +import java.math.BigDecimal; | |
| 8 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 9 | +import java.time.LocalDateTime; | |
| 10 | + | |
| 11 | +@Schema(description = "管理后台 - 工单信息新增/修改 Request VO") | |
| 12 | +@Data | |
| 13 | +public class MainInfoSaveReqVO { | |
| 14 | + | |
| 15 | + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7114") | |
| 16 | + private Long id; | |
| 17 | + | |
| 18 | + @Schema(description = "业务线:yl 园林,wy 物业,sz 市政 ", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 19 | + @NotEmpty(message = "业务线:yl 园林,wy 物业,sz 市政 不能为空") | |
| 20 | + private String busiLine; | |
| 21 | + | |
| 22 | + @Schema(description = "工单号", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 23 | + @NotEmpty(message = "工单号不能为空") | |
| 24 | + private String orderNo; | |
| 25 | + | |
| 26 | + @Schema(description = "工单名称", example = "张三") | |
| 27 | + private String orderName; | |
| 28 | + | |
| 29 | + @Schema(description = "来源ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1828") | |
| 30 | + @NotNull(message = "来源ID不能为空") | |
| 31 | + private Integer sourceId; | |
| 32 | + | |
| 33 | + @Schema(description = "来源名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") | |
| 34 | + @NotEmpty(message = "来源名称不能为空") | |
| 35 | + private String sourceName; | |
| 36 | + | |
| 37 | + @Schema(description = "道路ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21128") | |
| 38 | + @NotNull(message = "道路ID不能为空") | |
| 39 | + private Long roadId; | |
| 40 | + | |
| 41 | + @Schema(description = "道路名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") | |
| 42 | + @NotEmpty(message = "道路名称不能为空") | |
| 43 | + private String roadName; | |
| 44 | + | |
| 45 | + @Schema(description = "街道ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27852") | |
| 46 | + @NotEmpty(message = "街道ID不能为空") | |
| 47 | + private String streetId; | |
| 48 | + | |
| 49 | + @Schema(description = "街道名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") | |
| 50 | + @NotEmpty(message = "街道名称不能为空") | |
| 51 | + private String streetName; | |
| 52 | + | |
| 53 | + @Schema(description = "养护级别ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28278") | |
| 54 | + @NotNull(message = "养护级别ID不能为空") | |
| 55 | + private Integer curingLevelId; | |
| 56 | + | |
| 57 | + @Schema(description = "养护级别", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") | |
| 58 | + @NotEmpty(message = "养护级别不能为空") | |
| 59 | + private String curingLevelName; | |
| 60 | + | |
| 61 | + @Schema(description = "提交日期", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 62 | + @NotNull(message = "提交日期不能为空") | |
| 63 | + private LocalDateTime commitDate; | |
| 64 | + | |
| 65 | + @Schema(description = "紧急程度:1:特急;2:紧急;3:一般", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") | |
| 66 | + @NotNull(message = "紧急程度:1:特急;2:紧急;3:一般不能为空") | |
| 67 | + private Integer pressingType; | |
| 68 | + | |
| 69 | + @Schema(description = "提交用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12757") | |
| 70 | + @NotNull(message = "提交用户ID不能为空") | |
| 71 | + private Long userId; | |
| 72 | + | |
| 73 | + @Schema(description = "提交用户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") | |
| 74 | + @NotEmpty(message = "提交用户名称不能为空") | |
| 75 | + private String userName; | |
| 76 | + | |
| 77 | + @Schema(description = "部门id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26936") | |
| 78 | + @NotNull(message = "部门id不能为空") | |
| 79 | + private Long companyId; | |
| 80 | + | |
| 81 | + @Schema(description = "经纬度类型: 1:国标; 2:百度;3:高德;4:腾讯", example = "2") | |
| 82 | + private Integer latLonType; | |
| 83 | + | |
| 84 | + @Schema(description = "经度", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 85 | + @NotNull(message = "经度不能为空") | |
| 86 | + private BigDecimal lat; | |
| 87 | + | |
| 88 | + @Schema(description = "维度", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 89 | + @NotNull(message = "维度不能为空") | |
| 90 | + private BigDecimal lon; | |
| 91 | + | |
| 92 | + @Schema(description = "经纬度地址", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 93 | + @NotEmpty(message = "经纬度地址不能为空") | |
| 94 | + private String lonLatAddress; | |
| 95 | + | |
| 96 | + @Schema(description = "三方工单ID") | |
| 97 | + private String thirdWorkNo; | |
| 98 | + | |
| 99 | + @Schema(description = "三方工单结果上报状态:1:待推送;2:推送成功;3:推送失败") | |
| 100 | + private Integer thirdPushState; | |
| 101 | + | |
| 102 | + @Schema(description = "业务状态", example = "1") | |
| 103 | + private String buzStatus; | |
| 104 | + | |
| 105 | + @Schema(description = "审批状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") | |
| 106 | + @NotNull(message = "审批状态不能为空") | |
| 107 | + private Integer status; | |
| 108 | + | |
| 109 | + @Schema(description = "流程实例的编号", example = "9184") | |
| 110 | + private String processInstanceId; | |
| 111 | + | |
| 112 | + @Schema(description = "工单描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对") | |
| 113 | + @NotEmpty(message = "工单描述不能为空") | |
| 114 | + private String remark; | |
| 115 | + | |
| 116 | +} | |
| 0 | 117 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/materialdetail/MaterialDetailController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.materialdetail; | |
| 2 | + | |
| 3 | +import org.springframework.web.bind.annotation.*; | |
| 4 | +import jakarta.annotation.Resource; | |
| 5 | +import org.springframework.validation.annotation.Validated; | |
| 6 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 7 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 8 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 9 | +import io.swagger.v3.oas.annotations.Operation; | |
| 10 | + | |
| 11 | +import jakarta.validation.constraints.*; | |
| 12 | +import jakarta.validation.*; | |
| 13 | +import jakarta.servlet.http.*; | |
| 14 | +import java.util.*; | |
| 15 | +import java.io.IOException; | |
| 16 | + | |
| 17 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 18 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 19 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 20 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 21 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 22 | + | |
| 23 | +import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; | |
| 24 | + | |
| 25 | +import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; | |
| 26 | +import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.*; | |
| 27 | + | |
| 28 | +import com.zteits.urbanops.module.workorder.controller.admin.materialdetail.vo.*; | |
| 29 | +import com.zteits.urbanops.module.workorder.dal.dataobject.materialdetail.MaterialDetailDO; | |
| 30 | +import com.zteits.urbanops.module.workorder.service.materialdetail.MaterialDetailService; | |
| 31 | + | |
| 32 | +@Tag(name = "管理后台 - 工单耗材明细") | |
| 33 | +@RestController | |
| 34 | +@RequestMapping("/workorder/material-detail") | |
| 35 | +@Validated | |
| 36 | +public class MaterialDetailController { | |
| 37 | + | |
| 38 | + @Resource | |
| 39 | + private MaterialDetailService materialDetailService; | |
| 40 | + | |
| 41 | + @PostMapping("/create") | |
| 42 | + @Operation(summary = "创建工单耗材明细") | |
| 43 | + @PreAuthorize("@ss.hasPermission('workorder:material-detail:create')") | |
| 44 | + public CommonResult<Long> createMaterialDetail(@Valid @RequestBody MaterialDetailSaveReqVO createReqVO) { | |
| 45 | + return success(materialDetailService.createMaterialDetail(createReqVO)); | |
| 46 | + } | |
| 47 | + | |
| 48 | + @PutMapping("/update") | |
| 49 | + @Operation(summary = "更新工单耗材明细") | |
| 50 | + @PreAuthorize("@ss.hasPermission('workorder:material-detail:update')") | |
| 51 | + public CommonResult<Boolean> updateMaterialDetail(@Valid @RequestBody MaterialDetailSaveReqVO updateReqVO) { | |
| 52 | + materialDetailService.updateMaterialDetail(updateReqVO); | |
| 53 | + return success(true); | |
| 54 | + } | |
| 55 | + | |
| 56 | + @DeleteMapping("/delete") | |
| 57 | + @Operation(summary = "删除工单耗材明细") | |
| 58 | + @Parameter(name = "id", description = "编号", required = true) | |
| 59 | + @PreAuthorize("@ss.hasPermission('workorder:material-detail:delete')") | |
| 60 | + public CommonResult<Boolean> deleteMaterialDetail(@RequestParam("id") Long id) { | |
| 61 | + materialDetailService.deleteMaterialDetail(id); | |
| 62 | + return success(true); | |
| 63 | + } | |
| 64 | + | |
| 65 | + @DeleteMapping("/delete-list") | |
| 66 | + @Parameter(name = "ids", description = "编号", required = true) | |
| 67 | + @Operation(summary = "批量删除工单耗材明细") | |
| 68 | + @PreAuthorize("@ss.hasPermission('workorder:material-detail:delete')") | |
| 69 | + public CommonResult<Boolean> deleteMaterialDetailList(@RequestParam("ids") List<Long> ids) { | |
| 70 | + materialDetailService.deleteMaterialDetailListByIds(ids); | |
| 71 | + return success(true); | |
| 72 | + } | |
| 73 | + | |
| 74 | + @GetMapping("/get") | |
| 75 | + @Operation(summary = "获得工单耗材明细") | |
| 76 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | |
| 77 | + @PreAuthorize("@ss.hasPermission('workorder:material-detail:query')") | |
| 78 | + public CommonResult<MaterialDetailRespVO> getMaterialDetail(@RequestParam("id") Long id) { | |
| 79 | + MaterialDetailDO materialDetail = materialDetailService.getMaterialDetail(id); | |
| 80 | + return success(BeanUtils.toBean(materialDetail, MaterialDetailRespVO.class)); | |
| 81 | + } | |
| 82 | + | |
| 83 | + @GetMapping("/page") | |
| 84 | + @Operation(summary = "获得工单耗材明细分页") | |
| 85 | + @PreAuthorize("@ss.hasPermission('workorder:material-detail:query')") | |
| 86 | + public CommonResult<PageResult<MaterialDetailRespVO>> getMaterialDetailPage(@Valid MaterialDetailPageReqVO pageReqVO) { | |
| 87 | + PageResult<MaterialDetailDO> pageResult = materialDetailService.getMaterialDetailPage(pageReqVO); | |
| 88 | + return success(BeanUtils.toBean(pageResult, MaterialDetailRespVO.class)); | |
| 89 | + } | |
| 90 | + | |
| 91 | + @GetMapping("/export-excel") | |
| 92 | + @Operation(summary = "导出工单耗材明细 Excel") | |
| 93 | + @PreAuthorize("@ss.hasPermission('workorder:material-detail:export')") | |
| 94 | + @ApiAccessLog(operateType = EXPORT) | |
| 95 | + public void exportMaterialDetailExcel(@Valid MaterialDetailPageReqVO pageReqVO, | |
| 96 | + HttpServletResponse response) throws IOException { | |
| 97 | + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 98 | + List<MaterialDetailDO> list = materialDetailService.getMaterialDetailPage(pageReqVO).getList(); | |
| 99 | + // 导出 Excel | |
| 100 | + ExcelUtils.write(response, "工单耗材明细.xls", "数据", MaterialDetailRespVO.class, | |
| 101 | + BeanUtils.toBean(list, MaterialDetailRespVO.class)); | |
| 102 | + } | |
| 103 | + | |
| 104 | +} | |
| 0 | 105 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/materialdetail/vo/MaterialDetailPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.materialdetail.vo; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import java.util.*; | |
| 5 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 6 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 7 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 8 | +import java.time.LocalDateTime; | |
| 9 | + | |
| 10 | +import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | |
| 11 | + | |
| 12 | +@Schema(description = "管理后台 - 工单耗材明细分页 Request VO") | |
| 13 | +@Data | |
| 14 | +public class MaterialDetailPageReqVO extends PageParam { | |
| 15 | + | |
| 16 | + @Schema(description = "工单号") | |
| 17 | + private String orderNo; | |
| 18 | + | |
| 19 | + @Schema(description = "提交用户ID", example = "10300") | |
| 20 | + private Long userId; | |
| 21 | + | |
| 22 | + @Schema(description = "提交用户名称", example = "赵六") | |
| 23 | + private String userName; | |
| 24 | + | |
| 25 | + @Schema(description = "种类ID", example = "27821") | |
| 26 | + private Long classifyId; | |
| 27 | + | |
| 28 | + @Schema(description = "种类名称", example = "张三") | |
| 29 | + private String classifyName; | |
| 30 | + | |
| 31 | + @Schema(description = "类别ID", example = "23969") | |
| 32 | + private Long typeId; | |
| 33 | + | |
| 34 | + @Schema(description = "类别名称", example = "李四") | |
| 35 | + private String typeName; | |
| 36 | + | |
| 37 | + @Schema(description = "类别明细ID", example = "11240") | |
| 38 | + private Long typeDetailId; | |
| 39 | + | |
| 40 | + @Schema(description = "类别明细名称", example = "赵六") | |
| 41 | + private String typeDetailName; | |
| 42 | + | |
| 43 | + @Schema(description = "使用数量", example = "20141") | |
| 44 | + private Double userCount; | |
| 45 | + | |
| 46 | + @Schema(description = "单位", example = "李四") | |
| 47 | + private String unitName; | |
| 48 | + | |
| 49 | + @Schema(description = "状态(0正常 1停用)", example = "1") | |
| 50 | + private String status; | |
| 51 | + | |
| 52 | + @Schema(description = "描述", example = "你说的对") | |
| 53 | + private String remark; | |
| 54 | + | |
| 55 | + @Schema(description = "创建时间") | |
| 56 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 57 | + private LocalDateTime[] createTime; | |
| 58 | + | |
| 59 | +} | |
| 0 | 60 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/materialdetail/vo/MaterialDetailRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.materialdetail.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.*; | |
| 5 | +import java.util.*; | |
| 6 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 7 | +import java.time.LocalDateTime; | |
| 8 | +import cn.idev.excel.annotation.*; | |
| 9 | + | |
| 10 | +@Schema(description = "管理后台 - 工单耗材明细 Response VO") | |
| 11 | +@Data | |
| 12 | +@ExcelIgnoreUnannotated | |
| 13 | +public class MaterialDetailRespVO { | |
| 14 | + | |
| 15 | + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "234") | |
| 16 | + @ExcelProperty("ID") | |
| 17 | + private Long id; | |
| 18 | + | |
| 19 | + @Schema(description = "工单号", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 20 | + @ExcelProperty("工单号") | |
| 21 | + private String orderNo; | |
| 22 | + | |
| 23 | + @Schema(description = "提交用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10300") | |
| 24 | + @ExcelProperty("提交用户ID") | |
| 25 | + private Long userId; | |
| 26 | + | |
| 27 | + @Schema(description = "提交用户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") | |
| 28 | + @ExcelProperty("提交用户名称") | |
| 29 | + private String userName; | |
| 30 | + | |
| 31 | + @Schema(description = "种类ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27821") | |
| 32 | + @ExcelProperty("种类ID") | |
| 33 | + private Long classifyId; | |
| 34 | + | |
| 35 | + @Schema(description = "种类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") | |
| 36 | + @ExcelProperty("种类名称") | |
| 37 | + private String classifyName; | |
| 38 | + | |
| 39 | + @Schema(description = "类别ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23969") | |
| 40 | + @ExcelProperty("类别ID") | |
| 41 | + private Long typeId; | |
| 42 | + | |
| 43 | + @Schema(description = "类别名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") | |
| 44 | + @ExcelProperty("类别名称") | |
| 45 | + private String typeName; | |
| 46 | + | |
| 47 | + @Schema(description = "类别明细ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11240") | |
| 48 | + @ExcelProperty("类别明细ID") | |
| 49 | + private Long typeDetailId; | |
| 50 | + | |
| 51 | + @Schema(description = "类别明细名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") | |
| 52 | + @ExcelProperty("类别明细名称") | |
| 53 | + private String typeDetailName; | |
| 54 | + | |
| 55 | + @Schema(description = "使用数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "20141") | |
| 56 | + @ExcelProperty("使用数量") | |
| 57 | + private Double userCount; | |
| 58 | + | |
| 59 | + @Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") | |
| 60 | + @ExcelProperty("单位") | |
| 61 | + private String unitName; | |
| 62 | + | |
| 63 | + @Schema(description = "状态(0正常 1停用)", example = "1") | |
| 64 | + @ExcelProperty("状态(0正常 1停用)") | |
| 65 | + private String status; | |
| 66 | + | |
| 67 | + @Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对") | |
| 68 | + @ExcelProperty("描述") | |
| 69 | + private String remark; | |
| 70 | + | |
| 71 | + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 72 | + @ExcelProperty("创建时间") | |
| 73 | + private LocalDateTime createTime; | |
| 74 | + | |
| 75 | +} | |
| 0 | 76 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/materialdetail/vo/MaterialDetailSaveReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.materialdetail.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.*; | |
| 5 | +import java.util.*; | |
| 6 | +import jakarta.validation.constraints.*; | |
| 7 | + | |
| 8 | +@Schema(description = "管理后台 - 工单耗材明细新增/修改 Request VO") | |
| 9 | +@Data | |
| 10 | +public class MaterialDetailSaveReqVO { | |
| 11 | + | |
| 12 | + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "234") | |
| 13 | + private Long id; | |
| 14 | + | |
| 15 | + @Schema(description = "工单号", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 16 | + @NotEmpty(message = "工单号不能为空") | |
| 17 | + private String orderNo; | |
| 18 | + | |
| 19 | + @Schema(description = "提交用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10300") | |
| 20 | + @NotNull(message = "提交用户ID不能为空") | |
| 21 | + private Long userId; | |
| 22 | + | |
| 23 | + @Schema(description = "提交用户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") | |
| 24 | + @NotEmpty(message = "提交用户名称不能为空") | |
| 25 | + private String userName; | |
| 26 | + | |
| 27 | + @Schema(description = "种类ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27821") | |
| 28 | + @NotNull(message = "种类ID不能为空") | |
| 29 | + private Long classifyId; | |
| 30 | + | |
| 31 | + @Schema(description = "种类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") | |
| 32 | + @NotEmpty(message = "种类名称不能为空") | |
| 33 | + private String classifyName; | |
| 34 | + | |
| 35 | + @Schema(description = "类别ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23969") | |
| 36 | + @NotNull(message = "类别ID不能为空") | |
| 37 | + private Long typeId; | |
| 38 | + | |
| 39 | + @Schema(description = "类别名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") | |
| 40 | + @NotEmpty(message = "类别名称不能为空") | |
| 41 | + private String typeName; | |
| 42 | + | |
| 43 | + @Schema(description = "类别明细ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11240") | |
| 44 | + @NotNull(message = "类别明细ID不能为空") | |
| 45 | + private Long typeDetailId; | |
| 46 | + | |
| 47 | + @Schema(description = "类别明细名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") | |
| 48 | + @NotEmpty(message = "类别明细名称不能为空") | |
| 49 | + private String typeDetailName; | |
| 50 | + | |
| 51 | + @Schema(description = "使用数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "20141") | |
| 52 | + @NotNull(message = "使用数量不能为空") | |
| 53 | + private Double userCount; | |
| 54 | + | |
| 55 | + @Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") | |
| 56 | + @NotEmpty(message = "单位不能为空") | |
| 57 | + private String unitName; | |
| 58 | + | |
| 59 | + @Schema(description = "状态(0正常 1停用)", example = "1") | |
| 60 | + private String status; | |
| 61 | + | |
| 62 | + @Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对") | |
| 63 | + @NotEmpty(message = "描述不能为空") | |
| 64 | + private String remark; | |
| 65 | + | |
| 66 | +} | |
| 0 | 67 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/dal/dataobject/attachment/AttachmentDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.dal.dataobject.attachment; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import java.util.*; | |
| 5 | +import java.time.LocalDateTime; | |
| 6 | +import java.time.LocalDateTime; | |
| 7 | +import com.baomidou.mybatisplus.annotation.*; | |
| 8 | +import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 工单附件信息 DO | |
| 12 | + * | |
| 13 | + * @author 超级管理员 | |
| 14 | + */ | |
| 15 | +@TableName("workorder_attachment") | |
| 16 | +@KeySequence("workorder_attachment_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 | |
| 17 | +@Data | |
| 18 | +@EqualsAndHashCode(callSuper = true) | |
| 19 | +@ToString(callSuper = true) | |
| 20 | +@Builder | |
| 21 | +@NoArgsConstructor | |
| 22 | +@AllArgsConstructor | |
| 23 | +public class AttachmentDO extends BaseDO { | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * ID | |
| 27 | + */ | |
| 28 | + @TableId | |
| 29 | + private Long id; | |
| 30 | + /** | |
| 31 | + * 工单号 | |
| 32 | + */ | |
| 33 | + private String orderNo; | |
| 34 | + /** | |
| 35 | + * 业务线:yl 园林,wy 物业,sz 市政 | |
| 36 | + */ | |
| 37 | + private String busiLine; | |
| 38 | + /** | |
| 39 | + * 业务类型:01 问题图片,02 街道图片,03 选景图片 | |
| 40 | + */ | |
| 41 | + private String busiType; | |
| 42 | + /** | |
| 43 | + * 文件名称 | |
| 44 | + */ | |
| 45 | + private String fileNames; | |
| 46 | + /** | |
| 47 | + * 路径 | |
| 48 | + */ | |
| 49 | + private String hostUrl; | |
| 50 | + /** | |
| 51 | + * 文件大小 | |
| 52 | + */ | |
| 53 | + private String fileSize; | |
| 54 | + /** | |
| 55 | + * 文件类型 | |
| 56 | + */ | |
| 57 | + private String contentType; | |
| 58 | + /** | |
| 59 | + * 描述 | |
| 60 | + */ | |
| 61 | + private String remark; | |
| 62 | + | |
| 63 | + | |
| 64 | +} | |
| 0 | 65 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/dal/dataobject/maininfo/MainInfoDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.dal.dataobject.maininfo; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import java.util.*; | |
| 5 | +import java.time.LocalDateTime; | |
| 6 | +import java.math.BigDecimal; | |
| 7 | +import java.math.BigDecimal; | |
| 8 | +import java.time.LocalDateTime; | |
| 9 | +import java.time.LocalDateTime; | |
| 10 | +import com.baomidou.mybatisplus.annotation.*; | |
| 11 | +import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * 工单信息 DO | |
| 15 | + * | |
| 16 | + * @author 超级管理员 | |
| 17 | + */ | |
| 18 | +@TableName("workorder_main_info") | |
| 19 | +@KeySequence("workorder_main_info_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 | |
| 20 | +@Data | |
| 21 | +@EqualsAndHashCode(callSuper = true) | |
| 22 | +@ToString(callSuper = true) | |
| 23 | +@Builder | |
| 24 | +@NoArgsConstructor | |
| 25 | +@AllArgsConstructor | |
| 26 | +public class MainInfoDO extends BaseDO { | |
| 27 | + | |
| 28 | + /** | |
| 29 | + * ID | |
| 30 | + */ | |
| 31 | + @TableId | |
| 32 | + private Long id; | |
| 33 | + /** | |
| 34 | + * 业务线:yl 园林,wy 物业,sz 市政 | |
| 35 | + */ | |
| 36 | + private String busiLine; | |
| 37 | + /** | |
| 38 | + * 工单号 | |
| 39 | + */ | |
| 40 | + private String orderNo; | |
| 41 | + /** | |
| 42 | + * 工单名称 | |
| 43 | + */ | |
| 44 | + private String orderName; | |
| 45 | + /** | |
| 46 | + * 来源ID | |
| 47 | + */ | |
| 48 | + private Integer sourceId; | |
| 49 | + /** | |
| 50 | + * 来源名称 | |
| 51 | + */ | |
| 52 | + private String sourceName; | |
| 53 | + /** | |
| 54 | + * 道路ID | |
| 55 | + */ | |
| 56 | + private Long roadId; | |
| 57 | + /** | |
| 58 | + * 道路名称 | |
| 59 | + */ | |
| 60 | + private String roadName; | |
| 61 | + /** | |
| 62 | + * 街道ID | |
| 63 | + */ | |
| 64 | + private String streetId; | |
| 65 | + /** | |
| 66 | + * 街道名称 | |
| 67 | + */ | |
| 68 | + private String streetName; | |
| 69 | + /** | |
| 70 | + * 养护级别ID | |
| 71 | + */ | |
| 72 | + private Integer curingLevelId; | |
| 73 | + /** | |
| 74 | + * 养护级别 | |
| 75 | + */ | |
| 76 | + private String curingLevelName; | |
| 77 | + /** | |
| 78 | + * 提交日期 | |
| 79 | + */ | |
| 80 | + private LocalDateTime commitDate; | |
| 81 | + /** | |
| 82 | + * 紧急程度:1:特急;2:紧急;3:一般 | |
| 83 | + */ | |
| 84 | + private Integer pressingType; | |
| 85 | + /** | |
| 86 | + * 提交用户ID | |
| 87 | + */ | |
| 88 | + private Long userId; | |
| 89 | + /** | |
| 90 | + * 提交用户名称 | |
| 91 | + */ | |
| 92 | + private String userName; | |
| 93 | + /** | |
| 94 | + * 部门id | |
| 95 | + */ | |
| 96 | + private Long companyId; | |
| 97 | + /** | |
| 98 | + * 经纬度类型: 1:国标; 2:百度;3:高德;4:腾讯 | |
| 99 | + */ | |
| 100 | + private Integer latLonType; | |
| 101 | + /** | |
| 102 | + * 经度 | |
| 103 | + */ | |
| 104 | + private BigDecimal lat; | |
| 105 | + /** | |
| 106 | + * 维度 | |
| 107 | + */ | |
| 108 | + private BigDecimal lon; | |
| 109 | + /** | |
| 110 | + * 经纬度地址 | |
| 111 | + */ | |
| 112 | + private String lonLatAddress; | |
| 113 | + /** | |
| 114 | + * 三方工单ID | |
| 115 | + */ | |
| 116 | + private String thirdWorkNo; | |
| 117 | + /** | |
| 118 | + * 三方工单结果上报状态:1:待推送;2:推送成功;3:推送失败 | |
| 119 | + */ | |
| 120 | + private Integer thirdPushState; | |
| 121 | + /** | |
| 122 | + * 业务状态 | |
| 123 | + */ | |
| 124 | + private String buzStatus; | |
| 125 | + /** | |
| 126 | + * 审批状态 | |
| 127 | + */ | |
| 128 | + private Integer status; | |
| 129 | + /** | |
| 130 | + * 流程实例的编号 | |
| 131 | + */ | |
| 132 | + private String processInstanceId; | |
| 133 | + /** | |
| 134 | + * 工单描述 | |
| 135 | + */ | |
| 136 | + private String remark; | |
| 137 | + | |
| 138 | + | |
| 139 | +} | |
| 0 | 140 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/dal/dataobject/materialdetail/MaterialDetailDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.dal.dataobject.materialdetail; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import java.util.*; | |
| 5 | +import java.time.LocalDateTime; | |
| 6 | +import java.time.LocalDateTime; | |
| 7 | +import com.baomidou.mybatisplus.annotation.*; | |
| 8 | +import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 工单耗材明细 DO | |
| 12 | + * | |
| 13 | + * @author 超级管理员 | |
| 14 | + */ | |
| 15 | +@TableName("workorder_material_detail") | |
| 16 | +@KeySequence("workorder_material_detail_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 | |
| 17 | +@Data | |
| 18 | +@EqualsAndHashCode(callSuper = true) | |
| 19 | +@ToString(callSuper = true) | |
| 20 | +@Builder | |
| 21 | +@NoArgsConstructor | |
| 22 | +@AllArgsConstructor | |
| 23 | +public class MaterialDetailDO extends BaseDO { | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * ID | |
| 27 | + */ | |
| 28 | + @TableId | |
| 29 | + private Long id; | |
| 30 | + /** | |
| 31 | + * 工单号 | |
| 32 | + */ | |
| 33 | + private String orderNo; | |
| 34 | + /** | |
| 35 | + * 提交用户ID | |
| 36 | + */ | |
| 37 | + private Long userId; | |
| 38 | + /** | |
| 39 | + * 提交用户名称 | |
| 40 | + */ | |
| 41 | + private String userName; | |
| 42 | + /** | |
| 43 | + * 种类ID | |
| 44 | + */ | |
| 45 | + private Long classifyId; | |
| 46 | + /** | |
| 47 | + * 种类名称 | |
| 48 | + */ | |
| 49 | + private String classifyName; | |
| 50 | + /** | |
| 51 | + * 类别ID | |
| 52 | + */ | |
| 53 | + private Long typeId; | |
| 54 | + /** | |
| 55 | + * 类别名称 | |
| 56 | + */ | |
| 57 | + private String typeName; | |
| 58 | + /** | |
| 59 | + * 类别明细ID | |
| 60 | + */ | |
| 61 | + private Long typeDetailId; | |
| 62 | + /** | |
| 63 | + * 类别明细名称 | |
| 64 | + */ | |
| 65 | + private String typeDetailName; | |
| 66 | + /** | |
| 67 | + * 使用数量 | |
| 68 | + */ | |
| 69 | + private Double userCount; | |
| 70 | + /** | |
| 71 | + * 单位 | |
| 72 | + */ | |
| 73 | + private String unitName; | |
| 74 | + /** | |
| 75 | + * 状态(0正常 1停用) | |
| 76 | + */ | |
| 77 | + private String status; | |
| 78 | + /** | |
| 79 | + * 描述 | |
| 80 | + */ | |
| 81 | + private String remark; | |
| 82 | + | |
| 83 | + | |
| 84 | +} | |
| 0 | 85 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/dal/mysql/attachment/AttachmentMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.dal.mysql.attachment; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | + | |
| 5 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 6 | +import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 7 | +import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | |
| 8 | +import com.zteits.urbanops.module.workorder.dal.dataobject.attachment.AttachmentDO; | |
| 9 | +import org.apache.ibatis.annotations.Mapper; | |
| 10 | +import com.zteits.urbanops.module.workorder.controller.admin.attachment.vo.*; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 工单附件信息 Mapper | |
| 14 | + * | |
| 15 | + * @author 超级管理员 | |
| 16 | + */ | |
| 17 | +@Mapper | |
| 18 | +public interface AttachmentMapper extends BaseMapperX<AttachmentDO> { | |
| 19 | + | |
| 20 | + default PageResult<AttachmentDO> selectPage(AttachmentPageReqVO reqVO) { | |
| 21 | + return selectPage(reqVO, new LambdaQueryWrapperX<AttachmentDO>() | |
| 22 | + .eqIfPresent(AttachmentDO::getOrderNo, reqVO.getOrderNo()) | |
| 23 | + .eqIfPresent(AttachmentDO::getBusiLine, reqVO.getBusiLine()) | |
| 24 | + .eqIfPresent(AttachmentDO::getBusiType, reqVO.getBusiType()) | |
| 25 | + .eqIfPresent(AttachmentDO::getFileNames, reqVO.getFileNames()) | |
| 26 | + .eqIfPresent(AttachmentDO::getHostUrl, reqVO.getHostUrl()) | |
| 27 | + .eqIfPresent(AttachmentDO::getFileSize, reqVO.getFileSize()) | |
| 28 | + .eqIfPresent(AttachmentDO::getContentType, reqVO.getContentType()) | |
| 29 | + .eqIfPresent(AttachmentDO::getRemark, reqVO.getRemark()) | |
| 30 | + .betweenIfPresent(AttachmentDO::getCreateTime, reqVO.getCreateTime()) | |
| 31 | + .orderByDesc(AttachmentDO::getId)); | |
| 32 | + } | |
| 33 | + | |
| 34 | +} | |
| 0 | 35 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/dal/mysql/maininfo/MainInfoMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.dal.mysql.maininfo; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | + | |
| 5 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 6 | +import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 7 | +import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | |
| 8 | +import com.zteits.urbanops.module.workorder.dal.dataobject.maininfo.MainInfoDO; | |
| 9 | +import org.apache.ibatis.annotations.Mapper; | |
| 10 | +import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.*; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 工单信息 Mapper | |
| 14 | + * | |
| 15 | + * @author 超级管理员 | |
| 16 | + */ | |
| 17 | +@Mapper | |
| 18 | +public interface MainInfoMapper extends BaseMapperX<MainInfoDO> { | |
| 19 | + | |
| 20 | + default PageResult<MainInfoDO> selectPage(MainInfoPageReqVO reqVO) { | |
| 21 | + return selectPage(reqVO, new LambdaQueryWrapperX<MainInfoDO>() | |
| 22 | + .eqIfPresent(MainInfoDO::getBusiLine, reqVO.getBusiLine()) | |
| 23 | + .eqIfPresent(MainInfoDO::getOrderNo, reqVO.getOrderNo()) | |
| 24 | + .likeIfPresent(MainInfoDO::getOrderName, reqVO.getOrderName()) | |
| 25 | + .eqIfPresent(MainInfoDO::getSourceId, reqVO.getSourceId()) | |
| 26 | + .likeIfPresent(MainInfoDO::getSourceName, reqVO.getSourceName()) | |
| 27 | + .eqIfPresent(MainInfoDO::getRoadId, reqVO.getRoadId()) | |
| 28 | + .likeIfPresent(MainInfoDO::getRoadName, reqVO.getRoadName()) | |
| 29 | + .eqIfPresent(MainInfoDO::getStreetId, reqVO.getStreetId()) | |
| 30 | + .likeIfPresent(MainInfoDO::getStreetName, reqVO.getStreetName()) | |
| 31 | + .eqIfPresent(MainInfoDO::getCuringLevelId, reqVO.getCuringLevelId()) | |
| 32 | + .likeIfPresent(MainInfoDO::getCuringLevelName, reqVO.getCuringLevelName()) | |
| 33 | + .betweenIfPresent(MainInfoDO::getCommitDate, reqVO.getCommitDate()) | |
| 34 | + .eqIfPresent(MainInfoDO::getPressingType, reqVO.getPressingType()) | |
| 35 | + .eqIfPresent(MainInfoDO::getUserId, reqVO.getUserId()) | |
| 36 | + .likeIfPresent(MainInfoDO::getUserName, reqVO.getUserName()) | |
| 37 | + .eqIfPresent(MainInfoDO::getCompanyId, reqVO.getCompanyId()) | |
| 38 | + .eqIfPresent(MainInfoDO::getLatLonType, reqVO.getLatLonType()) | |
| 39 | + .eqIfPresent(MainInfoDO::getLat, reqVO.getLat()) | |
| 40 | + .eqIfPresent(MainInfoDO::getLon, reqVO.getLon()) | |
| 41 | + .eqIfPresent(MainInfoDO::getLonLatAddress, reqVO.getLonLatAddress()) | |
| 42 | + .eqIfPresent(MainInfoDO::getThirdWorkNo, reqVO.getThirdWorkNo()) | |
| 43 | + .eqIfPresent(MainInfoDO::getThirdPushState, reqVO.getThirdPushState()) | |
| 44 | + .eqIfPresent(MainInfoDO::getBuzStatus, reqVO.getBuzStatus()) | |
| 45 | + .eqIfPresent(MainInfoDO::getStatus, reqVO.getStatus()) | |
| 46 | + .eqIfPresent(MainInfoDO::getProcessInstanceId, reqVO.getProcessInstanceId()) | |
| 47 | + .eqIfPresent(MainInfoDO::getRemark, reqVO.getRemark()) | |
| 48 | + .betweenIfPresent(MainInfoDO::getCreateTime, reqVO.getCreateTime()) | |
| 49 | + .orderByDesc(MainInfoDO::getId)); | |
| 50 | + } | |
| 51 | + | |
| 52 | +} | |
| 0 | 53 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/dal/mysql/materialdetail/MaterialDetailMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.dal.mysql.materialdetail; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | + | |
| 5 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 6 | +import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 7 | +import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | |
| 8 | +import com.zteits.urbanops.module.workorder.dal.dataobject.materialdetail.MaterialDetailDO; | |
| 9 | +import org.apache.ibatis.annotations.Mapper; | |
| 10 | +import com.zteits.urbanops.module.workorder.controller.admin.materialdetail.vo.*; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 工单耗材明细 Mapper | |
| 14 | + * | |
| 15 | + * @author 超级管理员 | |
| 16 | + */ | |
| 17 | +@Mapper | |
| 18 | +public interface MaterialDetailMapper extends BaseMapperX<MaterialDetailDO> { | |
| 19 | + | |
| 20 | + default PageResult<MaterialDetailDO> selectPage(MaterialDetailPageReqVO reqVO) { | |
| 21 | + return selectPage(reqVO, new LambdaQueryWrapperX<MaterialDetailDO>() | |
| 22 | + .eqIfPresent(MaterialDetailDO::getOrderNo, reqVO.getOrderNo()) | |
| 23 | + .eqIfPresent(MaterialDetailDO::getUserId, reqVO.getUserId()) | |
| 24 | + .likeIfPresent(MaterialDetailDO::getUserName, reqVO.getUserName()) | |
| 25 | + .eqIfPresent(MaterialDetailDO::getClassifyId, reqVO.getClassifyId()) | |
| 26 | + .likeIfPresent(MaterialDetailDO::getClassifyName, reqVO.getClassifyName()) | |
| 27 | + .eqIfPresent(MaterialDetailDO::getTypeId, reqVO.getTypeId()) | |
| 28 | + .likeIfPresent(MaterialDetailDO::getTypeName, reqVO.getTypeName()) | |
| 29 | + .eqIfPresent(MaterialDetailDO::getTypeDetailId, reqVO.getTypeDetailId()) | |
| 30 | + .likeIfPresent(MaterialDetailDO::getTypeDetailName, reqVO.getTypeDetailName()) | |
| 31 | + .eqIfPresent(MaterialDetailDO::getUserCount, reqVO.getUserCount()) | |
| 32 | + .likeIfPresent(MaterialDetailDO::getUnitName, reqVO.getUnitName()) | |
| 33 | + .eqIfPresent(MaterialDetailDO::getStatus, reqVO.getStatus()) | |
| 34 | + .eqIfPresent(MaterialDetailDO::getRemark, reqVO.getRemark()) | |
| 35 | + .betweenIfPresent(MaterialDetailDO::getCreateTime, reqVO.getCreateTime()) | |
| 36 | + .orderByDesc(MaterialDetailDO::getId)); | |
| 37 | + } | |
| 38 | + | |
| 39 | +} | |
| 0 | 40 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/enums/ErrorCodeConstants.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.enums; | |
| 2 | + | |
| 3 | + | |
| 4 | +import com.zteits.urbanops.framework.common.exception.ErrorCode; | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * workorder 错误码枚举类 | |
| 8 | + * <p> | |
| 9 | + * workorder 系统,使用 1-100-000-000 段 | |
| 10 | + */ | |
| 11 | +public interface ErrorCodeConstants { | |
| 12 | + | |
| 13 | + // ========== server 工单 1-100-001-000 ========== | |
| 14 | + ErrorCode MAIN_INFO_NOT_EXISTS = new ErrorCode(1-100-001-000, "工单信息不存在"); | |
| 15 | + | |
| 16 | + ErrorCode ATTACHMENT_NOT_EXISTS = new ErrorCode(1-100-002-000, "工单附件信息不存在"); | |
| 17 | + | |
| 18 | + ErrorCode MATERIAL_DETAIL_NOT_EXISTS = new ErrorCode(1-100-003-000, "工单耗材明细不存在"); | |
| 19 | +} | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/attachment/AttachmentService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.service.attachment; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | +import jakarta.validation.*; | |
| 5 | +import com.zteits.urbanops.module.workorder.controller.admin.attachment.vo.*; | |
| 6 | +import com.zteits.urbanops.module.workorder.dal.dataobject.attachment.AttachmentDO; | |
| 7 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 8 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 工单附件信息 Service 接口 | |
| 12 | + * | |
| 13 | + * @author 超级管理员 | |
| 14 | + */ | |
| 15 | +public interface AttachmentService { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 创建工单附件信息 | |
| 19 | + * | |
| 20 | + * @param createReqVO 创建信息 | |
| 21 | + * @return 编号 | |
| 22 | + */ | |
| 23 | + Long createAttachment(@Valid AttachmentSaveReqVO createReqVO); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 更新工单附件信息 | |
| 27 | + * | |
| 28 | + * @param updateReqVO 更新信息 | |
| 29 | + */ | |
| 30 | + void updateAttachment(@Valid AttachmentSaveReqVO updateReqVO); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 删除工单附件信息 | |
| 34 | + * | |
| 35 | + * @param id 编号 | |
| 36 | + */ | |
| 37 | + void deleteAttachment(Long id); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 批量删除工单附件信息 | |
| 41 | + * | |
| 42 | + * @param ids 编号 | |
| 43 | + */ | |
| 44 | + void deleteAttachmentListByIds(List<Long> ids); | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 获得工单附件信息 | |
| 48 | + * | |
| 49 | + * @param id 编号 | |
| 50 | + * @return 工单附件信息 | |
| 51 | + */ | |
| 52 | + AttachmentDO getAttachment(Long id); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 获得工单附件信息分页 | |
| 56 | + * | |
| 57 | + * @param pageReqVO 分页查询 | |
| 58 | + * @return 工单附件信息分页 | |
| 59 | + */ | |
| 60 | + PageResult<AttachmentDO> getAttachmentPage(AttachmentPageReqVO pageReqVO); | |
| 61 | + | |
| 62 | +} | |
| 0 | 63 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/attachment/AttachmentServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.service.attachment; | |
| 2 | + | |
| 3 | +import cn.hutool.core.collection.CollUtil; | |
| 4 | +import org.springframework.stereotype.Service; | |
| 5 | +import jakarta.annotation.Resource; | |
| 6 | +import org.springframework.validation.annotation.Validated; | |
| 7 | +import org.springframework.transaction.annotation.Transactional; | |
| 8 | + | |
| 9 | +import java.util.*; | |
| 10 | +import com.zteits.urbanops.module.workorder.controller.admin.attachment.vo.*; | |
| 11 | +import com.zteits.urbanops.module.workorder.dal.dataobject.attachment.AttachmentDO; | |
| 12 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 13 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 14 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 15 | + | |
| 16 | +import com.zteits.urbanops.module.workorder.dal.mysql.attachment.AttachmentMapper; | |
| 17 | + | |
| 18 | +import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 19 | +import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.convertList; | |
| 20 | +import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.diffList; | |
| 21 | +import static com.zteits.urbanops.module.workorder.enums.ErrorCodeConstants.*; | |
| 22 | + | |
| 23 | +/** | |
| 24 | + * 工单附件信息 Service 实现类 | |
| 25 | + * | |
| 26 | + * @author 超级管理员 | |
| 27 | + */ | |
| 28 | +@Service | |
| 29 | +@Validated | |
| 30 | +public class AttachmentServiceImpl implements AttachmentService { | |
| 31 | + | |
| 32 | + @Resource | |
| 33 | + private AttachmentMapper attachmentMapper; | |
| 34 | + | |
| 35 | + @Override | |
| 36 | + public Long createAttachment(AttachmentSaveReqVO createReqVO) { | |
| 37 | + // 插入 | |
| 38 | + AttachmentDO attachment = BeanUtils.toBean(createReqVO, AttachmentDO.class); | |
| 39 | + attachmentMapper.insert(attachment); | |
| 40 | + | |
| 41 | + // 返回 | |
| 42 | + return attachment.getId(); | |
| 43 | + } | |
| 44 | + | |
| 45 | + @Override | |
| 46 | + public void updateAttachment(AttachmentSaveReqVO updateReqVO) { | |
| 47 | + // 校验存在 | |
| 48 | + validateAttachmentExists(updateReqVO.getId()); | |
| 49 | + // 更新 | |
| 50 | + AttachmentDO updateObj = BeanUtils.toBean(updateReqVO, AttachmentDO.class); | |
| 51 | + attachmentMapper.updateById(updateObj); | |
| 52 | + } | |
| 53 | + | |
| 54 | + @Override | |
| 55 | + public void deleteAttachment(Long id) { | |
| 56 | + // 校验存在 | |
| 57 | + validateAttachmentExists(id); | |
| 58 | + // 删除 | |
| 59 | + attachmentMapper.deleteById(id); | |
| 60 | + } | |
| 61 | + | |
| 62 | + @Override | |
| 63 | + public void deleteAttachmentListByIds(List<Long> ids) { | |
| 64 | + // 删除 | |
| 65 | + attachmentMapper.deleteByIds(ids); | |
| 66 | + } | |
| 67 | + | |
| 68 | + | |
| 69 | + private void validateAttachmentExists(Long id) { | |
| 70 | + if (attachmentMapper.selectById(id) == null) { | |
| 71 | + throw exception(ATTACHMENT_NOT_EXISTS); | |
| 72 | + } | |
| 73 | + } | |
| 74 | + | |
| 75 | + @Override | |
| 76 | + public AttachmentDO getAttachment(Long id) { | |
| 77 | + return attachmentMapper.selectById(id); | |
| 78 | + } | |
| 79 | + | |
| 80 | + @Override | |
| 81 | + public PageResult<AttachmentDO> getAttachmentPage(AttachmentPageReqVO pageReqVO) { | |
| 82 | + return attachmentMapper.selectPage(pageReqVO); | |
| 83 | + } | |
| 84 | + | |
| 85 | +} | |
| 0 | 86 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/maininfo/MainInfoService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.service.maininfo; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | +import jakarta.validation.*; | |
| 5 | +import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.*; | |
| 6 | +import com.zteits.urbanops.module.workorder.dal.dataobject.maininfo.MainInfoDO; | |
| 7 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 8 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 工单信息 Service 接口 | |
| 12 | + * | |
| 13 | + * @author 超级管理员 | |
| 14 | + */ | |
| 15 | +public interface MainInfoService { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 创建工单信息 | |
| 19 | + * | |
| 20 | + * @param createReqVO 创建信息 | |
| 21 | + * @return 编号 | |
| 22 | + */ | |
| 23 | + Long createMainInfo(@Valid MainInfoSaveReqVO createReqVO); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 更新工单信息 | |
| 27 | + * | |
| 28 | + * @param updateReqVO 更新信息 | |
| 29 | + */ | |
| 30 | + void updateMainInfo(@Valid MainInfoSaveReqVO updateReqVO); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 删除工单信息 | |
| 34 | + * | |
| 35 | + * @param id 编号 | |
| 36 | + */ | |
| 37 | + void deleteMainInfo(Long id); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 批量删除工单信息 | |
| 41 | + * | |
| 42 | + * @param ids 编号 | |
| 43 | + */ | |
| 44 | + void deleteMainInfoListByIds(List<Long> ids); | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 获得工单信息 | |
| 48 | + * | |
| 49 | + * @param id 编号 | |
| 50 | + * @return 工单信息 | |
| 51 | + */ | |
| 52 | + MainInfoDO getMainInfo(Long id); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 获得工单信息分页 | |
| 56 | + * | |
| 57 | + * @param pageReqVO 分页查询 | |
| 58 | + * @return 工单信息分页 | |
| 59 | + */ | |
| 60 | + PageResult<MainInfoDO> getMainInfoPage(MainInfoPageReqVO pageReqVO); | |
| 61 | + | |
| 62 | +} | |
| 0 | 63 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/maininfo/MainInfoServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.service.maininfo; | |
| 2 | + | |
| 3 | +import cn.hutool.core.collection.CollUtil; | |
| 4 | +import org.springframework.stereotype.Service; | |
| 5 | +import jakarta.annotation.Resource; | |
| 6 | +import org.springframework.validation.annotation.Validated; | |
| 7 | +import org.springframework.transaction.annotation.Transactional; | |
| 8 | + | |
| 9 | +import java.util.*; | |
| 10 | +import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.*; | |
| 11 | +import com.zteits.urbanops.module.workorder.dal.dataobject.maininfo.MainInfoDO; | |
| 12 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 13 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 14 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 15 | + | |
| 16 | +import com.zteits.urbanops.module.workorder.dal.mysql.maininfo.MainInfoMapper; | |
| 17 | + | |
| 18 | +import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 19 | +import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.convertList; | |
| 20 | +import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.diffList; | |
| 21 | +import static com.zteits.urbanops.module.workorder.enums.ErrorCodeConstants.*; | |
| 22 | + | |
| 23 | +/** | |
| 24 | + * 工单信息 Service 实现类 | |
| 25 | + * | |
| 26 | + * @author 超级管理员 | |
| 27 | + */ | |
| 28 | +@Service | |
| 29 | +@Validated | |
| 30 | +public class MainInfoServiceImpl implements MainInfoService { | |
| 31 | + | |
| 32 | + @Resource | |
| 33 | + private MainInfoMapper mainInfoMapper; | |
| 34 | + | |
| 35 | + @Override | |
| 36 | + public Long createMainInfo(MainInfoSaveReqVO createReqVO) { | |
| 37 | + // 插入 | |
| 38 | + MainInfoDO mainInfo = BeanUtils.toBean(createReqVO, MainInfoDO.class); | |
| 39 | + mainInfoMapper.insert(mainInfo); | |
| 40 | + | |
| 41 | + // 返回 | |
| 42 | + return mainInfo.getId(); | |
| 43 | + } | |
| 44 | + | |
| 45 | + @Override | |
| 46 | + public void updateMainInfo(MainInfoSaveReqVO updateReqVO) { | |
| 47 | + // 校验存在 | |
| 48 | + validateMainInfoExists(updateReqVO.getId()); | |
| 49 | + // 更新 | |
| 50 | + MainInfoDO updateObj = BeanUtils.toBean(updateReqVO, MainInfoDO.class); | |
| 51 | + mainInfoMapper.updateById(updateObj); | |
| 52 | + } | |
| 53 | + | |
| 54 | + @Override | |
| 55 | + public void deleteMainInfo(Long id) { | |
| 56 | + // 校验存在 | |
| 57 | + validateMainInfoExists(id); | |
| 58 | + // 删除 | |
| 59 | + mainInfoMapper.deleteById(id); | |
| 60 | + } | |
| 61 | + | |
| 62 | + @Override | |
| 63 | + public void deleteMainInfoListByIds(List<Long> ids) { | |
| 64 | + // 删除 | |
| 65 | + mainInfoMapper.deleteByIds(ids); | |
| 66 | + } | |
| 67 | + | |
| 68 | + | |
| 69 | + private void validateMainInfoExists(Long id) { | |
| 70 | + if (mainInfoMapper.selectById(id) == null) { | |
| 71 | + throw exception(MAIN_INFO_NOT_EXISTS); | |
| 72 | + } | |
| 73 | + } | |
| 74 | + | |
| 75 | + @Override | |
| 76 | + public MainInfoDO getMainInfo(Long id) { | |
| 77 | + return mainInfoMapper.selectById(id); | |
| 78 | + } | |
| 79 | + | |
| 80 | + @Override | |
| 81 | + public PageResult<MainInfoDO> getMainInfoPage(MainInfoPageReqVO pageReqVO) { | |
| 82 | + return mainInfoMapper.selectPage(pageReqVO); | |
| 83 | + } | |
| 84 | + | |
| 85 | +} | |
| 0 | 86 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/materialdetail/MaterialDetailService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.service.materialdetail; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | +import jakarta.validation.*; | |
| 5 | +import com.zteits.urbanops.module.workorder.controller.admin.materialdetail.vo.*; | |
| 6 | +import com.zteits.urbanops.module.workorder.dal.dataobject.materialdetail.MaterialDetailDO; | |
| 7 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 8 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 工单耗材明细 Service 接口 | |
| 12 | + * | |
| 13 | + * @author 超级管理员 | |
| 14 | + */ | |
| 15 | +public interface MaterialDetailService { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 创建工单耗材明细 | |
| 19 | + * | |
| 20 | + * @param createReqVO 创建信息 | |
| 21 | + * @return 编号 | |
| 22 | + */ | |
| 23 | + Long createMaterialDetail(@Valid MaterialDetailSaveReqVO createReqVO); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 更新工单耗材明细 | |
| 27 | + * | |
| 28 | + * @param updateReqVO 更新信息 | |
| 29 | + */ | |
| 30 | + void updateMaterialDetail(@Valid MaterialDetailSaveReqVO updateReqVO); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 删除工单耗材明细 | |
| 34 | + * | |
| 35 | + * @param id 编号 | |
| 36 | + */ | |
| 37 | + void deleteMaterialDetail(Long id); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 批量删除工单耗材明细 | |
| 41 | + * | |
| 42 | + * @param ids 编号 | |
| 43 | + */ | |
| 44 | + void deleteMaterialDetailListByIds(List<Long> ids); | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 获得工单耗材明细 | |
| 48 | + * | |
| 49 | + * @param id 编号 | |
| 50 | + * @return 工单耗材明细 | |
| 51 | + */ | |
| 52 | + MaterialDetailDO getMaterialDetail(Long id); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 获得工单耗材明细分页 | |
| 56 | + * | |
| 57 | + * @param pageReqVO 分页查询 | |
| 58 | + * @return 工单耗材明细分页 | |
| 59 | + */ | |
| 60 | + PageResult<MaterialDetailDO> getMaterialDetailPage(MaterialDetailPageReqVO pageReqVO); | |
| 61 | + | |
| 62 | +} | |
| 0 | 63 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/materialdetail/MaterialDetailServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.service.materialdetail; | |
| 2 | + | |
| 3 | +import cn.hutool.core.collection.CollUtil; | |
| 4 | +import org.springframework.stereotype.Service; | |
| 5 | +import jakarta.annotation.Resource; | |
| 6 | +import org.springframework.validation.annotation.Validated; | |
| 7 | +import org.springframework.transaction.annotation.Transactional; | |
| 8 | + | |
| 9 | +import java.util.*; | |
| 10 | +import com.zteits.urbanops.module.workorder.controller.admin.materialdetail.vo.*; | |
| 11 | +import com.zteits.urbanops.module.workorder.dal.dataobject.materialdetail.MaterialDetailDO; | |
| 12 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 13 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 14 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 15 | + | |
| 16 | +import com.zteits.urbanops.module.workorder.dal.mysql.materialdetail.MaterialDetailMapper; | |
| 17 | + | |
| 18 | +import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 19 | +import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.convertList; | |
| 20 | +import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.diffList; | |
| 21 | +import static com.zteits.urbanops.module.workorder.enums.ErrorCodeConstants.*; | |
| 22 | + | |
| 23 | +/** | |
| 24 | + * 工单耗材明细 Service 实现类 | |
| 25 | + * | |
| 26 | + * @author 超级管理员 | |
| 27 | + */ | |
| 28 | +@Service | |
| 29 | +@Validated | |
| 30 | +public class MaterialDetailServiceImpl implements MaterialDetailService { | |
| 31 | + | |
| 32 | + @Resource | |
| 33 | + private MaterialDetailMapper materialDetailMapper; | |
| 34 | + | |
| 35 | + @Override | |
| 36 | + public Long createMaterialDetail(MaterialDetailSaveReqVO createReqVO) { | |
| 37 | + // 插入 | |
| 38 | + MaterialDetailDO materialDetail = BeanUtils.toBean(createReqVO, MaterialDetailDO.class); | |
| 39 | + materialDetailMapper.insert(materialDetail); | |
| 40 | + | |
| 41 | + // 返回 | |
| 42 | + return materialDetail.getId(); | |
| 43 | + } | |
| 44 | + | |
| 45 | + @Override | |
| 46 | + public void updateMaterialDetail(MaterialDetailSaveReqVO updateReqVO) { | |
| 47 | + // 校验存在 | |
| 48 | + validateMaterialDetailExists(updateReqVO.getId()); | |
| 49 | + // 更新 | |
| 50 | + MaterialDetailDO updateObj = BeanUtils.toBean(updateReqVO, MaterialDetailDO.class); | |
| 51 | + materialDetailMapper.updateById(updateObj); | |
| 52 | + } | |
| 53 | + | |
| 54 | + @Override | |
| 55 | + public void deleteMaterialDetail(Long id) { | |
| 56 | + // 校验存在 | |
| 57 | + validateMaterialDetailExists(id); | |
| 58 | + // 删除 | |
| 59 | + materialDetailMapper.deleteById(id); | |
| 60 | + } | |
| 61 | + | |
| 62 | + @Override | |
| 63 | + public void deleteMaterialDetailListByIds(List<Long> ids) { | |
| 64 | + // 删除 | |
| 65 | + materialDetailMapper.deleteByIds(ids); | |
| 66 | + } | |
| 67 | + | |
| 68 | + | |
| 69 | + private void validateMaterialDetailExists(Long id) { | |
| 70 | + if (materialDetailMapper.selectById(id) == null) { | |
| 71 | + throw exception(MATERIAL_DETAIL_NOT_EXISTS); | |
| 72 | + } | |
| 73 | + } | |
| 74 | + | |
| 75 | + @Override | |
| 76 | + public MaterialDetailDO getMaterialDetail(Long id) { | |
| 77 | + return materialDetailMapper.selectById(id); | |
| 78 | + } | |
| 79 | + | |
| 80 | + @Override | |
| 81 | + public PageResult<MaterialDetailDO> getMaterialDetailPage(MaterialDetailPageReqVO pageReqVO) { | |
| 82 | + return materialDetailMapper.selectPage(pageReqVO); | |
| 83 | + } | |
| 84 | + | |
| 85 | +} | |
| 0 | 86 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/resources/mapper/maininfo/MainInfoMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | +<mapper namespace="com.zteits.urbanops.module.workorder.dal.mysql.maininfo.MainInfoMapper"> | |
| 4 | + | |
| 5 | + <!-- | |
| 6 | + 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 | |
| 7 | + 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 | |
| 8 | + 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 | |
| 9 | + 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ | |
| 10 | + --> | |
| 11 | + | |
| 12 | +</mapper> | |
| 0 | 13 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/resources/mapper/mapper/attachment/AttachmentMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | +<mapper namespace="com.zteits.urbanops.module.workorder.dal.mysql.attachment.AttachmentMapper"> | |
| 4 | + | |
| 5 | + <!-- | |
| 6 | + 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 | |
| 7 | + 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 | |
| 8 | + 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 | |
| 9 | + 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ | |
| 10 | + --> | |
| 11 | + | |
| 12 | +</mapper> | |
| 0 | 13 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/resources/mapper/materialdetail/MaterialDetailMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | +<mapper namespace="com.zteits.urbanops.module.workorder.dal.mysql.materialdetail.MaterialDetailMapper"> | |
| 4 | + | |
| 5 | + <!-- | |
| 6 | + 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 | |
| 7 | + 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 | |
| 8 | + 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 | |
| 9 | + 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ | |
| 10 | + --> | |
| 11 | + | |
| 12 | +</mapper> | |
| 0 | 13 | \ No newline at end of file | ... | ... |
urbanops-server/pom.xml
| ... | ... | @@ -43,6 +43,13 @@ |
| 43 | 43 | <artifactId>urbanops-module-garden</artifactId> |
| 44 | 44 | <version>${revision}</version> |
| 45 | 45 | </dependency> |
| 46 | + | |
| 47 | + <!-- 工单管理 --> | |
| 48 | + <dependency> | |
| 49 | + <groupId>com.zteits.boot</groupId> | |
| 50 | + <artifactId>urbanops-module-workorder</artifactId> | |
| 51 | + <version>${revision}</version> | |
| 52 | + </dependency> | |
| 46 | 53 | <!-- 会员中心。默认注释,保证编译速度 --> |
| 47 | 54 | <!-- <dependency>--> |
| 48 | 55 | <!-- <groupId>com.zteits.boot</groupId>--> | ... | ... |