Commit 90215340615c6943464019ccf16fe7d02ee17d55
1 parent
57dda2d9
派单及人机材功能迁移
Showing
76 changed files
with
5248 additions
and
0 deletions
urbanops-module-garden/pom.xml
| ... | ... | @@ -114,6 +114,11 @@ |
| 114 | 114 | <artifactId>tika-core</artifactId> <!-- 文件客户端:文件类型的识别 --> |
| 115 | 115 | </dependency> |
| 116 | 116 | |
| 117 | + <dependency> | |
| 118 | + <groupId>com.zteits.boot</groupId> | |
| 119 | + <artifactId>urbanops-module-system</artifactId> | |
| 120 | + <version>${revision}</version> | |
| 121 | + </dependency> | |
| 117 | 122 | </dependencies> |
| 118 | 123 | |
| 119 | 124 | </project> | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/assigntasks/AssignTasksController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.assigntasks; | |
| 2 | + | |
| 3 | +import jakarta.annotation.security.PermitAll; | |
| 4 | +import org.springframework.util.CollectionUtils; | |
| 5 | +import org.springframework.web.bind.annotation.*; | |
| 6 | +import jakarta.annotation.Resource; | |
| 7 | +import org.springframework.validation.annotation.Validated; | |
| 8 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 9 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 10 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 11 | +import io.swagger.v3.oas.annotations.Operation; | |
| 12 | + | |
| 13 | +import jakarta.validation.constraints.*; | |
| 14 | +import jakarta.validation.*; | |
| 15 | +import jakarta.servlet.http.*; | |
| 16 | +import java.util.*; | |
| 17 | +import java.io.IOException; | |
| 18 | + | |
| 19 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 20 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 21 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 22 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 23 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 24 | + | |
| 25 | +import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; | |
| 26 | + | |
| 27 | +import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; | |
| 28 | +import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.*; | |
| 29 | + | |
| 30 | +import com.zteits.urbanops.module.garden.controller.admin.assigntasks.vo.*; | |
| 31 | +import com.zteits.urbanops.module.garden.dal.dataobject.assigntasks.AssignTasksDO; | |
| 32 | +import com.zteits.urbanops.module.garden.service.assigntasks.AssignTasksService; | |
| 33 | + | |
| 34 | +@Tag(name = "管理后台 - 派单任务主表(记录派单任务基本信息)") | |
| 35 | +@RestController | |
| 36 | +@RequestMapping("/garden/assign-tasks") | |
| 37 | +@Validated | |
| 38 | +public class AssignTasksController { | |
| 39 | + | |
| 40 | + @Resource | |
| 41 | + private AssignTasksService assignTasksService; | |
| 42 | + | |
| 43 | + @PostMapping("/create") | |
| 44 | + @Operation(summary = "创建派单任务主表(记录派单任务基本信息)") | |
| 45 | + @PreAuthorize("@ss.hasPermission('garden:assign-tasks:create')") | |
| 46 | + public CommonResult<Long> createAssignTasks(@Valid @RequestBody AssignTasksSaveReqVO createReqVO) { | |
| 47 | + return success(assignTasksService.createAssignTasks(createReqVO)); | |
| 48 | + } | |
| 49 | + | |
| 50 | + @PutMapping("/update") | |
| 51 | + @Operation(summary = "更新派单任务主表(记录派单任务基本信息)") | |
| 52 | + @PreAuthorize("@ss.hasPermission('garden:assign-tasks:update')") | |
| 53 | + public CommonResult<Boolean> updateAssignTasks(@Valid @RequestBody AssignTasksSaveReqVO updateReqVO) { | |
| 54 | + assignTasksService.updateAssignTasks(updateReqVO); | |
| 55 | + return success(true); | |
| 56 | + } | |
| 57 | + | |
| 58 | + @DeleteMapping("/delete") | |
| 59 | + @Operation(summary = "删除派单任务主表(记录派单任务基本信息)") | |
| 60 | + @Parameter(name = "id", description = "编号", required = true) | |
| 61 | + @PreAuthorize("@ss.hasPermission('garden:assign-tasks:delete')") | |
| 62 | + public CommonResult<Boolean> deleteAssignTasks(@RequestParam("id") Long id) { | |
| 63 | + assignTasksService.deleteAssignTasks(id); | |
| 64 | + return success(true); | |
| 65 | + } | |
| 66 | + | |
| 67 | + @DeleteMapping("/delete-list") | |
| 68 | + @Parameter(name = "ids", description = "编号", required = true) | |
| 69 | + @Operation(summary = "批量删除派单任务主表(记录派单任务基本信息)") | |
| 70 | + @PreAuthorize("@ss.hasPermission('garden:assign-tasks:delete')") | |
| 71 | + public CommonResult<Boolean> deleteAssignTasksList(@RequestParam("ids") List<Long> ids) { | |
| 72 | + assignTasksService.deleteAssignTasksListByIds(ids); | |
| 73 | + return success(true); | |
| 74 | + } | |
| 75 | + | |
| 76 | + @GetMapping("/get") | |
| 77 | + @Operation(summary = "获得派单任务主表(记录派单任务基本信息)") | |
| 78 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | |
| 79 | + @PreAuthorize("@ss.hasPermission('garden:assign-tasks:query')") | |
| 80 | + public CommonResult<AssignTasksRespVO> getAssignTasks(@RequestParam("id") Long id) { | |
| 81 | + AssignTasksDO assignTasks = assignTasksService.getAssignTasks(id); | |
| 82 | + return success(BeanUtils.toBean(assignTasks, AssignTasksRespVO.class)); | |
| 83 | + } | |
| 84 | + | |
| 85 | + @GetMapping("/page") | |
| 86 | + @Operation(summary = "获得派单任务主表(记录派单任务基本信息)分页") | |
| 87 | + @PreAuthorize("@ss.hasPermission('garden:assign-tasks:query')") | |
| 88 | + public CommonResult<PageResult<AssignTasksRespVO>> getAssignTasksPage(@Valid AssignTasksPageReqVO pageReqVO) { | |
| 89 | + PageResult<AssignTasksDO> pageResult = assignTasksService.getAssignTasksPage(pageReqVO); | |
| 90 | + return success(BeanUtils.toBean(pageResult, AssignTasksRespVO.class)); | |
| 91 | + } | |
| 92 | + | |
| 93 | + @GetMapping("/export-excel") | |
| 94 | + @Operation(summary = "导出派单任务主表(记录派单任务基本信息) Excel") | |
| 95 | + @PreAuthorize("@ss.hasPermission('garden:assign-tasks:export')") | |
| 96 | + @ApiAccessLog(operateType = EXPORT) | |
| 97 | + public void exportAssignTasksExcel(@Valid AssignTasksPageReqVO pageReqVO, | |
| 98 | + HttpServletResponse response) throws IOException { | |
| 99 | + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 100 | + List<AssignTasksDO> list = assignTasksService.getAssignTasksPage(pageReqVO).getList(); | |
| 101 | + // 导出 Excel | |
| 102 | + ExcelUtils.write(response, "派单任务主表(记录派单任务基本信息).xls", "数据", AssignTasksRespVO.class, | |
| 103 | + BeanUtils.toBean(list, AssignTasksRespVO.class)); | |
| 104 | + } | |
| 105 | + | |
| 106 | + @Operation(summary = "定时任务处理超时" ) | |
| 107 | + @PostMapping(value= "/tasksOutTimeAuto") | |
| 108 | + @PermitAll | |
| 109 | + public CommonResult tasksOutTimeAuto() { | |
| 110 | + return success(assignTasksService.tasksOutTimeAuto()); | |
| 111 | + } | |
| 112 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/assigntasks/vo/AssignTasksPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.assigntasks.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 AssignTasksPageReqVO extends PageParam { | |
| 15 | + | |
| 16 | + @Schema(description = "任务名称", example = "张三") | |
| 17 | + private String taskName; | |
| 18 | + | |
| 19 | + @Schema(description = "任务类型(关联数据字典,如:日常巡检、紧急维修等)", example = "1") | |
| 20 | + private String taskType; | |
| 21 | + | |
| 22 | + @Schema(description = "任务截止时间") | |
| 23 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 24 | + private LocalDateTime[] deadline; | |
| 25 | + | |
| 26 | + @Schema(description = "派单模板文件路径(如:任务详情模板、填报表格等)") | |
| 27 | + private String templateFile; | |
| 28 | + | |
| 29 | + @Schema(description = "任务整体完成状态(0:未完成,1:已完成;所有关联单位均完成时自动更新为1)") | |
| 30 | + private Integer parentFinish; | |
| 31 | + | |
| 32 | + @Schema(description = "整体完成时间(仅当parent_finish=1时有值)") | |
| 33 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 34 | + private LocalDateTime[] finishTime; | |
| 35 | + | |
| 36 | + @Schema(description = "任务备注(如:特殊要求、注意事项等)") | |
| 37 | + private String note; | |
| 38 | + | |
| 39 | + @Schema(description = "创建人(关联用户ID,任务派发人)") | |
| 40 | + private String creator; | |
| 41 | + | |
| 42 | + @Schema(description = "任务创建时间(派单时间)") | |
| 43 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 44 | + private LocalDateTime[] createTime; | |
| 45 | + | |
| 46 | + @Schema(description = "修改人(关联用户ID,最后修改人)") | |
| 47 | + private String updater; | |
| 48 | + | |
| 49 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/assigntasks/vo/AssignTasksRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.assigntasks.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 AssignTasksRespVO { | |
| 14 | + | |
| 15 | + @Schema(description = "自增ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3654") | |
| 16 | + @ExcelProperty("自增ID") | |
| 17 | + private Long id; | |
| 18 | + | |
| 19 | + @Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") | |
| 20 | + @ExcelProperty("任务名称") | |
| 21 | + private String taskName; | |
| 22 | + | |
| 23 | + @Schema(description = "任务类型(关联数据字典,如:日常巡检、紧急维修等)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | |
| 24 | + @ExcelProperty("任务类型(关联数据字典,如:日常巡检、紧急维修等)") | |
| 25 | + private String taskType; | |
| 26 | + | |
| 27 | + @Schema(description = "任务截止时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 28 | + @ExcelProperty("任务截止时间") | |
| 29 | + private LocalDateTime deadline; | |
| 30 | + | |
| 31 | + @Schema(description = "派单模板文件路径(如:任务详情模板、填报表格等)") | |
| 32 | + @ExcelProperty("派单模板文件路径(如:任务详情模板、填报表格等)") | |
| 33 | + private String templateFile; | |
| 34 | + | |
| 35 | + @Schema(description = "任务整体完成状态(0:未完成,1:已完成;所有关联单位均完成时自动更新为1)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 36 | + @ExcelProperty("任务整体完成状态(0:未完成,1:已完成;所有关联单位均完成时自动更新为1)") | |
| 37 | + private Integer parentFinish; | |
| 38 | + | |
| 39 | + @Schema(description = "整体完成时间(仅当parent_finish=1时有值)") | |
| 40 | + @ExcelProperty("整体完成时间(仅当parent_finish=1时有值)") | |
| 41 | + private LocalDateTime finishTime; | |
| 42 | + | |
| 43 | + @Schema(description = "任务备注(如:特殊要求、注意事项等)") | |
| 44 | + @ExcelProperty("任务备注(如:特殊要求、注意事项等)") | |
| 45 | + private String note; | |
| 46 | + | |
| 47 | + @Schema(description = "创建人(关联用户ID,任务派发人)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 48 | + @ExcelProperty("创建人(关联用户ID,任务派发人)") | |
| 49 | + private String creator; | |
| 50 | + | |
| 51 | + @Schema(description = "任务创建时间(派单时间)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 52 | + @ExcelProperty("任务创建时间(派单时间)") | |
| 53 | + private LocalDateTime createTime; | |
| 54 | + | |
| 55 | + @Schema(description = "修改人(关联用户ID,最后修改人)") | |
| 56 | + @ExcelProperty("修改人(关联用户ID,最后修改人)") | |
| 57 | + private String updater; | |
| 58 | + | |
| 59 | + | |
| 60 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/assigntasks/vo/AssignTasksSaveReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.assigntasks.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 org.springframework.format.annotation.DateTimeFormat; | |
| 8 | +import java.time.LocalDateTime; | |
| 9 | + | |
| 10 | +@Schema(description = "管理后台 - 派单任务主表(记录派单任务基本信息)新增/修改 Request VO") | |
| 11 | +@Data | |
| 12 | +public class AssignTasksSaveReqVO { | |
| 13 | + | |
| 14 | + @Schema(description = "自增ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3654") | |
| 15 | + private Long id; | |
| 16 | + | |
| 17 | + @Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") | |
| 18 | + @NotEmpty(message = "任务名称不能为空") | |
| 19 | + private String taskName; | |
| 20 | + | |
| 21 | + @Schema(description = "任务类型(关联数据字典,如:日常巡检、紧急维修等)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | |
| 22 | + @NotEmpty(message = "任务类型(关联数据字典,如:日常巡检、紧急维修等)不能为空") | |
| 23 | + private String taskType; | |
| 24 | + | |
| 25 | + @Schema(description = "任务截止时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 26 | + @NotNull(message = "任务截止时间不能为空") | |
| 27 | + private LocalDateTime deadline; | |
| 28 | + | |
| 29 | + @Schema(description = "派单模板文件路径(如:任务详情模板、填报表格等)") | |
| 30 | + private String templateFile; | |
| 31 | + | |
| 32 | + @Schema(description = "任务整体完成状态(0:未完成,1:已完成;所有关联单位均完成时自动更新为1)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 33 | + //@NotNull(message = "任务整体完成状态(0:未完成,1:已完成;所有关联单位均完成时自动更新为1)不能为空") | |
| 34 | + private Integer parentFinish; | |
| 35 | + | |
| 36 | + @Schema(description = "整体完成时间(仅当parent_finish=1时有值)") | |
| 37 | + private LocalDateTime finishTime; | |
| 38 | + | |
| 39 | + @Schema(description = "任务备注(如:特殊要求、注意事项等)") | |
| 40 | + private String note; | |
| 41 | + | |
| 42 | + @Schema(description = "创建人(关联用户ID,任务派发人)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 43 | + //@NotEmpty(message = "创建人(关联用户ID,任务派发人)不能为空") | |
| 44 | + private String creator; | |
| 45 | + | |
| 46 | + @Schema(description = "修改人(关联用户ID,最后修改人)") | |
| 47 | + private String updater; | |
| 48 | + | |
| 49 | + /*单位集合*/ | |
| 50 | + private String[] companyIds; | |
| 51 | + | |
| 52 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/assigntasksinfo/AssignTasksInfoController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.assigntasksinfo; | |
| 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.garden.controller.admin.assigntasksinfo.vo.*; | |
| 29 | +import com.zteits.urbanops.module.garden.dal.dataobject.assigntasksinfo.AssignTasksInfoDO; | |
| 30 | +import com.zteits.urbanops.module.garden.service.assigntasksinfo.AssignTasksInfoService; | |
| 31 | + | |
| 32 | +@Tag(name = "管理后台 - 派单任务-单位关联表(记录单位接收派单后的执行详情)") | |
| 33 | +@RestController | |
| 34 | +@RequestMapping("/garden/assign-tasks-info") | |
| 35 | +@Validated | |
| 36 | +public class AssignTasksInfoController { | |
| 37 | + | |
| 38 | + @Resource | |
| 39 | + private AssignTasksInfoService assignTasksInfoService; | |
| 40 | + | |
| 41 | + @PostMapping("/create") | |
| 42 | + @Operation(summary = "创建派单任务-单位关联表(记录单位接收派单后的执行详情)") | |
| 43 | + @PreAuthorize("@ss.hasPermission('garden:assign-tasks-info:create')") | |
| 44 | + public CommonResult<Long> createAssignTasksInfo(@Valid @RequestBody AssignTasksInfoSaveReqVO createReqVO) { | |
| 45 | + return success(assignTasksInfoService.createAssignTasksInfo(createReqVO)); | |
| 46 | + } | |
| 47 | + | |
| 48 | + @PutMapping("/update") | |
| 49 | + @Operation(summary = "更新派单任务-单位关联表(记录单位接收派单后的执行详情)") | |
| 50 | + @PreAuthorize("@ss.hasPermission('garden:assign-tasks-info:update')") | |
| 51 | + public CommonResult<Boolean> updateAssignTasksInfo(@Valid @RequestBody AssignTasksInfoSaveReqVO updateReqVO) { | |
| 52 | + assignTasksInfoService.updateAssignTasksInfo(updateReqVO); | |
| 53 | + return success(true); | |
| 54 | + } | |
| 55 | + | |
| 56 | + @DeleteMapping("/delete") | |
| 57 | + @Operation(summary = "删除派单任务-单位关联表(记录单位接收派单后的执行详情)") | |
| 58 | + @Parameter(name = "id", description = "编号", required = true) | |
| 59 | + @PreAuthorize("@ss.hasPermission('garden:assign-tasks-info:delete')") | |
| 60 | + public CommonResult<Boolean> deleteAssignTasksInfo(@RequestParam("id") Long id) { | |
| 61 | + assignTasksInfoService.deleteAssignTasksInfo(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('garden:assign-tasks-info:delete')") | |
| 69 | + public CommonResult<Boolean> deleteAssignTasksInfoList(@RequestParam("ids") List<Long> ids) { | |
| 70 | + assignTasksInfoService.deleteAssignTasksInfoListByIds(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('garden:assign-tasks-info:query')") | |
| 78 | + public CommonResult<AssignTasksInfoRespVO> getAssignTasksInfo(@RequestParam("id") Long id) { | |
| 79 | + AssignTasksInfoDO assignTasksInfo = assignTasksInfoService.getAssignTasksInfo(id); | |
| 80 | + return success(BeanUtils.toBean(assignTasksInfo, AssignTasksInfoRespVO.class)); | |
| 81 | + } | |
| 82 | + | |
| 83 | + @GetMapping("/page") | |
| 84 | + @Operation(summary = "获得派单任务-单位关联表(记录单位接收派单后的执行详情)分页") | |
| 85 | + @PreAuthorize("@ss.hasPermission('garden:assign-tasks-info:query')") | |
| 86 | + public CommonResult<PageResult<AssignTasksInfoRespVO>> getAssignTasksInfoPage(@Valid AssignTasksInfoPageReqVO pageReqVO) { | |
| 87 | + PageResult<AssignTasksInfoDO> pageResult = assignTasksInfoService.getAssignTasksInfoPage(pageReqVO); | |
| 88 | + return success(BeanUtils.toBean(pageResult, AssignTasksInfoRespVO.class)); | |
| 89 | + } | |
| 90 | + | |
| 91 | + @GetMapping("/export-excel") | |
| 92 | + @Operation(summary = "导出派单任务-单位关联表(记录单位接收派单后的执行详情) Excel") | |
| 93 | + @PreAuthorize("@ss.hasPermission('garden:assign-tasks-info:export')") | |
| 94 | + @ApiAccessLog(operateType = EXPORT) | |
| 95 | + public void exportAssignTasksInfoExcel(@Valid AssignTasksInfoPageReqVO pageReqVO, | |
| 96 | + HttpServletResponse response) throws IOException { | |
| 97 | + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 98 | + List<AssignTasksInfoDO> list = assignTasksInfoService.getAssignTasksInfoPage(pageReqVO).getList(); | |
| 99 | + // 导出 Excel | |
| 100 | + ExcelUtils.write(response, "派单任务-单位关联表(记录单位接收派单后的执行详情).xls", "数据", AssignTasksInfoRespVO.class, | |
| 101 | + BeanUtils.toBean(list, AssignTasksInfoRespVO.class)); | |
| 102 | + } | |
| 103 | + | |
| 104 | +} | |
| 0 | 105 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/assigntasksinfo/vo/AssignTasksInfoPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.assigntasksinfo.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 AssignTasksInfoPageReqVO extends PageParam { | |
| 15 | + | |
| 16 | + @Schema(description = "关联派单任务主表ID(外键,关联td_assign_tasks.id)", example = "1875") | |
| 17 | + private Long taskId; | |
| 18 | + | |
| 19 | + @Schema(description = "单位ID(关联单位表主键)", example = "11926") | |
| 20 | + private String companyId; | |
| 21 | + | |
| 22 | + @Schema(description = "单位ID(关联单位表主键)", example = "张三") | |
| 23 | + private String companyName; | |
| 24 | + | |
| 25 | + @Schema(description = "填报人ID(单位指定的任务负责人)", example = "28216") | |
| 26 | + private String writePersonId; | |
| 27 | + | |
| 28 | + @Schema(description = "填报人姓名") | |
| 29 | + private String writePerson; | |
| 30 | + | |
| 31 | + @Schema(description = "填报人手机号") | |
| 32 | + private String writePersonPhone; | |
| 33 | + | |
| 34 | + @Schema(description = "填报时间(仅当finish=1时有值)") | |
| 35 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 36 | + private LocalDateTime[] writeTime; | |
| 37 | + | |
| 38 | + @Schema(description = "单位任务完成状态(0:未完成,1:已完成)") | |
| 39 | + private Integer finish; | |
| 40 | + | |
| 41 | + @Schema(description = "是否超期(0:未超期,1:超期;NULL:未到截止时间)") | |
| 42 | + private Integer isOverdue; | |
| 43 | + | |
| 44 | + @Schema(description = "单位提交的任务文件路径(如:填报表格、现场照片等)") | |
| 45 | + private String dataFile; | |
| 46 | + | |
| 47 | + @Schema(description = "催缴次数(未完成时的提醒次数)") | |
| 48 | + private Integer rushNum; | |
| 49 | + | |
| 50 | + @Schema(description = "新任务标记(0:未读,1:已读)") | |
| 51 | + private Integer newFlag; | |
| 52 | + | |
| 53 | + @Schema(description = "已读时间(仅当new_flag=1时有值)") | |
| 54 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 55 | + private LocalDateTime[] newFlagTime; | |
| 56 | + | |
| 57 | + @Schema(description = "驳回备注(当finish=2时,说明驳回原因)", example = "你说的对") | |
| 58 | + private String rejectRemark; | |
| 59 | + | |
| 60 | + @Schema(description = "单位任务确认状态(已确认/未确认,单位接收任务后需确认)") | |
| 61 | + private String confirm; | |
| 62 | + | |
| 63 | + @Schema(description = "确认时间(单位确认接收任务的时间)") | |
| 64 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 65 | + private LocalDateTime[] confirmTime; | |
| 66 | + | |
| 67 | + @Schema(description = "创建人(关联用户ID,将任务派给该单位的操作人)") | |
| 68 | + private String creator; | |
| 69 | + | |
| 70 | + @Schema(description = "关联记录创建时间(派单给单位的时间)") | |
| 71 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 72 | + private LocalDateTime[] createTime; | |
| 73 | + | |
| 74 | + @Schema(description = "修改人(关联用户ID,最后修改该记录的操作人)") | |
| 75 | + private String updater; | |
| 76 | + | |
| 77 | + @Schema(description = "备注", example = "你猜") | |
| 78 | + private String remark; | |
| 79 | + | |
| 80 | + @Schema(description = "是否打回0:正常 1:打回") | |
| 81 | + private Integer isReject; | |
| 82 | + | |
| 83 | + @Schema(description = "0:正常1:停用", example = "1") | |
| 84 | + private Integer status; | |
| 85 | + | |
| 86 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/assigntasksinfo/vo/AssignTasksInfoRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.assigntasksinfo.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 AssignTasksInfoRespVO { | |
| 14 | + | |
| 15 | + @Schema(description = "自增ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12148") | |
| 16 | + @ExcelProperty("自增ID") | |
| 17 | + private Long id; | |
| 18 | + | |
| 19 | + @Schema(description = "关联派单任务主表ID(外键,关联td_assign_tasks.id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1875") | |
| 20 | + @ExcelProperty("关联派单任务主表ID(外键,关联td_assign_tasks.id)") | |
| 21 | + private Long taskId; | |
| 22 | + | |
| 23 | + @Schema(description = "单位ID(关联单位表主键)", requiredMode = Schema.RequiredMode.REQUIRED, example = "11926") | |
| 24 | + @ExcelProperty("单位ID(关联单位表主键)") | |
| 25 | + private String companyId; | |
| 26 | + | |
| 27 | + @Schema(description = "单位ID(关联单位表主键)", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") | |
| 28 | + @ExcelProperty("单位ID(关联单位表主键)") | |
| 29 | + private String companyName; | |
| 30 | + | |
| 31 | + @Schema(description = "填报人ID(单位指定的任务负责人)", example = "28216") | |
| 32 | + @ExcelProperty("填报人ID(单位指定的任务负责人)") | |
| 33 | + private String writePersonId; | |
| 34 | + | |
| 35 | + @Schema(description = "填报人姓名") | |
| 36 | + @ExcelProperty("填报人姓名") | |
| 37 | + private String writePerson; | |
| 38 | + | |
| 39 | + @Schema(description = "填报人手机号") | |
| 40 | + @ExcelProperty("填报人手机号") | |
| 41 | + private String writePersonPhone; | |
| 42 | + | |
| 43 | + @Schema(description = "填报时间(仅当finish=1时有值)") | |
| 44 | + @ExcelProperty("填报时间(仅当finish=1时有值)") | |
| 45 | + private LocalDateTime writeTime; | |
| 46 | + | |
| 47 | + @Schema(description = "单位任务完成状态(0:未完成,1:已完成)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 48 | + @ExcelProperty("单位任务完成状态(0:未完成,1:已完成)") | |
| 49 | + private Integer finish; | |
| 50 | + | |
| 51 | + @Schema(description = "是否超期(0:未超期,1:超期;NULL:未到截止时间)") | |
| 52 | + @ExcelProperty("是否超期(0:未超期,1:超期;NULL:未到截止时间)") | |
| 53 | + private Integer isOverdue; | |
| 54 | + | |
| 55 | + @Schema(description = "单位提交的任务文件路径(如:填报表格、现场照片等)") | |
| 56 | + @ExcelProperty("单位提交的任务文件路径(如:填报表格、现场照片等)") | |
| 57 | + private String dataFile; | |
| 58 | + | |
| 59 | + @Schema(description = "催缴次数(未完成时的提醒次数)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 60 | + @ExcelProperty("催缴次数(未完成时的提醒次数)") | |
| 61 | + private Integer rushNum; | |
| 62 | + | |
| 63 | + @Schema(description = "新任务标记(0:未读,1:已读)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 64 | + @ExcelProperty("新任务标记(0:未读,1:已读)") | |
| 65 | + private Integer newFlag; | |
| 66 | + | |
| 67 | + @Schema(description = "已读时间(仅当new_flag=1时有值)") | |
| 68 | + @ExcelProperty("已读时间(仅当new_flag=1时有值)") | |
| 69 | + private LocalDateTime newFlagTime; | |
| 70 | + | |
| 71 | + @Schema(description = "驳回备注(当finish=2时,说明驳回原因)", example = "你说的对") | |
| 72 | + @ExcelProperty("驳回备注(当finish=2时,说明驳回原因)") | |
| 73 | + private String rejectRemark; | |
| 74 | + | |
| 75 | + @Schema(description = "单位任务确认状态(已确认/未确认,单位接收任务后需确认)") | |
| 76 | + @ExcelProperty("单位任务确认状态(已确认/未确认,单位接收任务后需确认)") | |
| 77 | + private String confirm; | |
| 78 | + | |
| 79 | + @Schema(description = "确认时间(单位确认接收任务的时间)") | |
| 80 | + @ExcelProperty("确认时间(单位确认接收任务的时间)") | |
| 81 | + private LocalDateTime confirmTime; | |
| 82 | + | |
| 83 | + @Schema(description = "创建人(关联用户ID,将任务派给该单位的操作人)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 84 | + @ExcelProperty("创建人(关联用户ID,将任务派给该单位的操作人)") | |
| 85 | + private String creator; | |
| 86 | + | |
| 87 | + @Schema(description = "关联记录创建时间(派单给单位的时间)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 88 | + @ExcelProperty("关联记录创建时间(派单给单位的时间)") | |
| 89 | + private LocalDateTime createTime; | |
| 90 | + | |
| 91 | + @Schema(description = "修改人(关联用户ID,最后修改该记录的操作人)") | |
| 92 | + @ExcelProperty("修改人(关联用户ID,最后修改该记录的操作人)") | |
| 93 | + private String updater; | |
| 94 | + | |
| 95 | + @Schema(description = "备注", example = "你猜") | |
| 96 | + @ExcelProperty("备注") | |
| 97 | + private String remark; | |
| 98 | + | |
| 99 | + @Schema(description = "是否打回0:正常 1:打回") | |
| 100 | + @ExcelProperty("是否打回0:正常 1:打回") | |
| 101 | + private Integer isReject; | |
| 102 | + | |
| 103 | + @Schema(description = "0:正常1:停用", example = "1") | |
| 104 | + @ExcelProperty("0:正常1:停用") | |
| 105 | + private Integer status; | |
| 106 | + | |
| 107 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/assigntasksinfo/vo/AssignTasksInfoSaveReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.assigntasksinfo.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 org.springframework.format.annotation.DateTimeFormat; | |
| 8 | +import java.time.LocalDateTime; | |
| 9 | + | |
| 10 | +@Schema(description = "管理后台 - 派单任务-单位关联表(记录单位接收派单后的执行详情)新增/修改 Request VO") | |
| 11 | +@Data | |
| 12 | +public class AssignTasksInfoSaveReqVO { | |
| 13 | + | |
| 14 | + @Schema(description = "自增ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12148") | |
| 15 | + private Long id; | |
| 16 | + | |
| 17 | + @Schema(description = "关联派单任务主表ID(外键,关联td_assign_tasks.id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1875") | |
| 18 | + @NotNull(message = "关联派单任务主表ID(外键,关联td_assign_tasks.id)不能为空") | |
| 19 | + private Long taskId; | |
| 20 | + | |
| 21 | + @Schema(description = "单位ID(关联单位表主键)", requiredMode = Schema.RequiredMode.REQUIRED, example = "11926") | |
| 22 | + @NotEmpty(message = "单位ID(关联单位表主键)不能为空") | |
| 23 | + private String companyId; | |
| 24 | + | |
| 25 | + @Schema(description = "单位ID(关联单位表主键)", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") | |
| 26 | + @NotEmpty(message = "单位ID(关联单位表主键)不能为空") | |
| 27 | + private String companyName; | |
| 28 | + | |
| 29 | + @Schema(description = "填报人ID(单位指定的任务负责人)", example = "28216") | |
| 30 | + private String writePersonId; | |
| 31 | + | |
| 32 | + @Schema(description = "填报人姓名") | |
| 33 | + private String writePerson; | |
| 34 | + | |
| 35 | + @Schema(description = "填报人手机号") | |
| 36 | + private String writePersonPhone; | |
| 37 | + | |
| 38 | + @Schema(description = "填报时间(仅当finish=1时有值)") | |
| 39 | + private LocalDateTime writeTime; | |
| 40 | + | |
| 41 | + @Schema(description = "单位任务完成状态(0:未完成,1:已完成)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 42 | + //@NotNull(message = "单位任务完成状态(0:未完成,1:已完成)不能为空") | |
| 43 | + private Integer finish; | |
| 44 | + | |
| 45 | + @Schema(description = "是否超期(0:未超期,1:超期;NULL:未到截止时间)") | |
| 46 | + private Integer isOverdue; | |
| 47 | + | |
| 48 | + @Schema(description = "单位提交的任务文件路径(如:填报表格、现场照片等)") | |
| 49 | + private String dataFile; | |
| 50 | + | |
| 51 | + @Schema(description = "催缴次数(未完成时的提醒次数)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 52 | + @NotNull(message = "催缴次数(未完成时的提醒次数)不能为空") | |
| 53 | + private Integer rushNum; | |
| 54 | + | |
| 55 | + @Schema(description = "新任务标记(0:未读,1:已读)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 56 | + @NotNull(message = "新任务标记(0:未读,1:已读)不能为空") | |
| 57 | + private Integer newFlag; | |
| 58 | + | |
| 59 | + @Schema(description = "已读时间(仅当new_flag=1时有值)") | |
| 60 | + private LocalDateTime newFlagTime; | |
| 61 | + | |
| 62 | + @Schema(description = "驳回备注(当finish=2时,说明驳回原因)", example = "你说的对") | |
| 63 | + private String rejectRemark; | |
| 64 | + | |
| 65 | + @Schema(description = "单位任务确认状态(已确认/未确认,单位接收任务后需确认)") | |
| 66 | + private String confirm; | |
| 67 | + | |
| 68 | + @Schema(description = "确认时间(单位确认接收任务的时间)") | |
| 69 | + private LocalDateTime confirmTime; | |
| 70 | + | |
| 71 | + @Schema(description = "创建人(关联用户ID,将任务派给该单位的操作人)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 72 | + //@NotEmpty(message = "创建人(关联用户ID,将任务派给该单位的操作人)不能为空") | |
| 73 | + private String creator; | |
| 74 | + | |
| 75 | + @Schema(description = "修改人(关联用户ID,最后修改该记录的操作人)") | |
| 76 | + private String updater; | |
| 77 | + | |
| 78 | + @Schema(description = "备注", example = "你猜") | |
| 79 | + private String remark; | |
| 80 | + | |
| 81 | + @Schema(description = "是否打回0:正常 1:打回") | |
| 82 | + private Integer isReject; | |
| 83 | + | |
| 84 | + @Schema(description = "0:正常1:停用", example = "1") | |
| 85 | + private Integer status; | |
| 86 | + | |
| 87 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/departmentcost/DepartmentCostController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.departmentcost; | |
| 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.garden.controller.admin.departmentcost.vo.*; | |
| 29 | +import com.zteits.urbanops.module.garden.dal.dataobject.departmentcost.DepartmentCostDO; | |
| 30 | +import com.zteits.urbanops.module.garden.service.departmentcost.DepartmentCostService; | |
| 31 | + | |
| 32 | +@Tag(name = "管理后台 - 部门费用录入") | |
| 33 | +@RestController | |
| 34 | +@RequestMapping("/garden/department-cost") | |
| 35 | +@Validated | |
| 36 | +public class DepartmentCostController { | |
| 37 | + | |
| 38 | + @Resource | |
| 39 | + private DepartmentCostService departmentCostService; | |
| 40 | + | |
| 41 | + @PostMapping("/create") | |
| 42 | + @Operation(summary = "创建部门费用录入") | |
| 43 | + @PreAuthorize("@ss.hasPermission('garden:department-cost:create')") | |
| 44 | + public CommonResult<Long> createDepartmentCost(@Valid @RequestBody DepartmentCostSaveReqVO createReqVO) { | |
| 45 | + return success(departmentCostService.createDepartmentCost(createReqVO)); | |
| 46 | + } | |
| 47 | + | |
| 48 | + @PutMapping("/update") | |
| 49 | + @Operation(summary = "更新部门费用录入") | |
| 50 | + @PreAuthorize("@ss.hasPermission('garden:department-cost:update')") | |
| 51 | + public CommonResult<Boolean> updateDepartmentCost(@Valid @RequestBody DepartmentCostSaveReqVO updateReqVO) { | |
| 52 | + departmentCostService.updateDepartmentCost(updateReqVO); | |
| 53 | + return success(true); | |
| 54 | + } | |
| 55 | + | |
| 56 | + @DeleteMapping("/delete") | |
| 57 | + @Operation(summary = "删除部门费用录入") | |
| 58 | + @Parameter(name = "id", description = "编号", required = true) | |
| 59 | + @PreAuthorize("@ss.hasPermission('garden:department-cost:delete')") | |
| 60 | + public CommonResult<Boolean> deleteDepartmentCost(@RequestParam("id") Long id) { | |
| 61 | + departmentCostService.deleteDepartmentCost(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('garden:department-cost:delete')") | |
| 69 | + public CommonResult<Boolean> deleteDepartmentCostList(@RequestParam("ids") List<Long> ids) { | |
| 70 | + departmentCostService.deleteDepartmentCostListByIds(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('garden:department-cost:query')") | |
| 78 | + public CommonResult<DepartmentCostRespVO> getDepartmentCost(@RequestParam("id") Long id) { | |
| 79 | + DepartmentCostDO departmentCost = departmentCostService.getDepartmentCost(id); | |
| 80 | + return success(BeanUtils.toBean(departmentCost, DepartmentCostRespVO.class)); | |
| 81 | + } | |
| 82 | + | |
| 83 | + @GetMapping("/page") | |
| 84 | + @Operation(summary = "获得部门费用录入分页") | |
| 85 | + @PreAuthorize("@ss.hasPermission('garden:department-cost:query')") | |
| 86 | + public CommonResult<PageResult<DepartmentCostRespVO>> getDepartmentCostPage(@Valid DepartmentCostPageReqVO pageReqVO) { | |
| 87 | + PageResult<DepartmentCostDO> pageResult = departmentCostService.getDepartmentCostPage(pageReqVO); | |
| 88 | + return success(BeanUtils.toBean(pageResult, DepartmentCostRespVO.class)); | |
| 89 | + } | |
| 90 | + | |
| 91 | + @GetMapping("/export-excel") | |
| 92 | + @Operation(summary = "导出部门费用录入 Excel") | |
| 93 | + @PreAuthorize("@ss.hasPermission('garden:department-cost:export')") | |
| 94 | + @ApiAccessLog(operateType = EXPORT) | |
| 95 | + public void exportDepartmentCostExcel(@Valid DepartmentCostPageReqVO pageReqVO, | |
| 96 | + HttpServletResponse response) throws IOException { | |
| 97 | + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 98 | + List<DepartmentCostDO> list = departmentCostService.getDepartmentCostPage(pageReqVO).getList(); | |
| 99 | + // 导出 Excel | |
| 100 | + ExcelUtils.write(response, "部门费用录入.xls", "数据", DepartmentCostRespVO.class, | |
| 101 | + BeanUtils.toBean(list, DepartmentCostRespVO.class)); | |
| 102 | + } | |
| 103 | + | |
| 104 | +} | |
| 0 | 105 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/departmentcost/vo/DepartmentCostPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.departmentcost.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 DepartmentCostPageReqVO extends PageParam { | |
| 16 | + | |
| 17 | + @Schema(description = "工资年月(如202506)") | |
| 18 | + private String salaryMonth; | |
| 19 | + | |
| 20 | + @Schema(description = "费用名称", example = "张三") | |
| 21 | + private String expenseName; | |
| 22 | + | |
| 23 | + @Schema(description = "部门名称", example = "芋艿") | |
| 24 | + private String departmentName; | |
| 25 | + | |
| 26 | + @Schema(description = "人员数量", example = "20926") | |
| 27 | + private Integer personCount; | |
| 28 | + | |
| 29 | + @Schema(description = "部门总额") | |
| 30 | + private BigDecimal deptTotalCost; | |
| 31 | + | |
| 32 | + @Schema(description = "归属公司", example = "赵六") | |
| 33 | + private String companyName; | |
| 34 | + | |
| 35 | + @Schema(description = "归属公司ID", example = "7417") | |
| 36 | + private String companyId; | |
| 37 | + | |
| 38 | + @Schema(description = "部门id", example = "11454") | |
| 39 | + private Long deptId; | |
| 40 | + | |
| 41 | + @Schema(description = "备注", example = "你猜") | |
| 42 | + private String remark; | |
| 43 | + | |
| 44 | + @Schema(description = "创建时间") | |
| 45 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 46 | + private LocalDateTime[] createTime; | |
| 47 | + | |
| 48 | +} | |
| 0 | 49 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/departmentcost/vo/DepartmentCostRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.departmentcost.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 DepartmentCostRespVO { | |
| 15 | + | |
| 16 | + @Schema(description = "记录ID,自增主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "10037") | |
| 17 | + @ExcelProperty("记录ID,自增主键") | |
| 18 | + private Long id; | |
| 19 | + | |
| 20 | + @Schema(description = "工资年月(如202506)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 21 | + @ExcelProperty("工资年月(如202506)") | |
| 22 | + private String salaryMonth; | |
| 23 | + | |
| 24 | + @Schema(description = "费用名称", example = "张三") | |
| 25 | + @ExcelProperty("费用名称") | |
| 26 | + private String expenseName; | |
| 27 | + | |
| 28 | + @Schema(description = "部门名称", example = "芋艿") | |
| 29 | + @ExcelProperty("部门名称") | |
| 30 | + private String departmentName; | |
| 31 | + | |
| 32 | + @Schema(description = "人员数量", example = "20926") | |
| 33 | + @ExcelProperty("人员数量") | |
| 34 | + private Integer personCount; | |
| 35 | + | |
| 36 | + @Schema(description = "部门总额", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 37 | + @ExcelProperty("部门总额") | |
| 38 | + private BigDecimal deptTotalCost; | |
| 39 | + | |
| 40 | + @Schema(description = "归属公司", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") | |
| 41 | + @ExcelProperty("归属公司") | |
| 42 | + private String companyName; | |
| 43 | + | |
| 44 | + @Schema(description = "归属公司ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7417") | |
| 45 | + @ExcelProperty("归属公司ID") | |
| 46 | + private String companyId; | |
| 47 | + | |
| 48 | + @Schema(description = "部门id", example = "11454") | |
| 49 | + @ExcelProperty("部门id") | |
| 50 | + private Long deptId; | |
| 51 | + | |
| 52 | + @Schema(description = "备注", example = "你猜") | |
| 53 | + @ExcelProperty("备注") | |
| 54 | + private String remark; | |
| 55 | + | |
| 56 | + @Schema(description = "创建时间") | |
| 57 | + @ExcelProperty("创建时间") | |
| 58 | + private LocalDateTime createTime; | |
| 59 | + | |
| 60 | +} | |
| 0 | 61 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/departmentcost/vo/DepartmentCostSaveReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.departmentcost.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 | + | |
| 9 | +@Schema(description = "管理后台 - 部门费用录入新增/修改 Request VO") | |
| 10 | +@Data | |
| 11 | +public class DepartmentCostSaveReqVO { | |
| 12 | + | |
| 13 | + @Schema(description = "记录ID,自增主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "10037") | |
| 14 | + private Long id; | |
| 15 | + | |
| 16 | + @Schema(description = "工资年月(如202506)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 17 | + @NotEmpty(message = "工资年月(如202506)不能为空") | |
| 18 | + private String salaryMonth; | |
| 19 | + | |
| 20 | + @Schema(description = "费用名称", example = "张三") | |
| 21 | + private String expenseName; | |
| 22 | + | |
| 23 | + @Schema(description = "部门名称", example = "芋艿") | |
| 24 | + private String departmentName; | |
| 25 | + | |
| 26 | + @Schema(description = "人员数量", example = "20926") | |
| 27 | + private Integer personCount; | |
| 28 | + | |
| 29 | + @Schema(description = "部门总额", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 30 | + @NotNull(message = "部门总额不能为空") | |
| 31 | + private BigDecimal deptTotalCost; | |
| 32 | + | |
| 33 | + @Schema(description = "归属公司", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") | |
| 34 | + @NotEmpty(message = "归属公司不能为空") | |
| 35 | + private String companyName; | |
| 36 | + | |
| 37 | + @Schema(description = "归属公司ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7417") | |
| 38 | + @NotEmpty(message = "归属公司ID不能为空") | |
| 39 | + private String companyId; | |
| 40 | + | |
| 41 | + @Schema(description = "部门id", example = "11454") | |
| 42 | + private Long deptId; | |
| 43 | + | |
| 44 | + @Schema(description = "备注", example = "你猜") | |
| 45 | + private String remark; | |
| 46 | + | |
| 47 | +} | |
| 0 | 48 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/mechanicalcost/MechanicalCostController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.mechanicalcost; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.module.garden.controller.admin.personalcost.vo.PersonalCostRespVO; | |
| 4 | +import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | |
| 5 | +import com.zteits.urbanops.module.garden.enums.CostFeeConstants; | |
| 6 | +import com.zteits.urbanops.module.garden.service.teambizdomainrel.TeamBizdomainRelService; | |
| 7 | +import org.springframework.web.bind.annotation.*; | |
| 8 | +import jakarta.annotation.Resource; | |
| 9 | +import org.springframework.validation.annotation.Validated; | |
| 10 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 11 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 12 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 13 | +import io.swagger.v3.oas.annotations.Operation; | |
| 14 | + | |
| 15 | +import jakarta.validation.constraints.*; | |
| 16 | +import jakarta.validation.*; | |
| 17 | +import jakarta.servlet.http.*; | |
| 18 | +import java.util.*; | |
| 19 | +import java.io.IOException; | |
| 20 | +import java.util.stream.Collectors; | |
| 21 | + | |
| 22 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 23 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 24 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 25 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 26 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 27 | + | |
| 28 | +import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; | |
| 29 | + | |
| 30 | +import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; | |
| 31 | +import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.*; | |
| 32 | + | |
| 33 | +import com.zteits.urbanops.module.garden.controller.admin.mechanicalcost.vo.*; | |
| 34 | +import com.zteits.urbanops.module.garden.dal.dataobject.mechanicalcost.MechanicalCostDO; | |
| 35 | +import com.zteits.urbanops.module.garden.service.mechanicalcost.MechanicalCostService; | |
| 36 | + | |
| 37 | +@Tag(name = "管理后台 - 自有机械费用录入") | |
| 38 | +@RestController | |
| 39 | +@RequestMapping("/garden/mechanical-cost") | |
| 40 | +@Validated | |
| 41 | +public class MechanicalCostController { | |
| 42 | + | |
| 43 | + @Resource | |
| 44 | + private MechanicalCostService mechanicalCostService; | |
| 45 | + | |
| 46 | + @Resource | |
| 47 | + TeamBizdomainRelService teamBizdomainRelService; | |
| 48 | + | |
| 49 | + @PostMapping("/create") | |
| 50 | + @Operation(summary = "创建自有机械费用录入") | |
| 51 | + @PreAuthorize("@ss.hasPermission('garden:mechanical-cost:create')") | |
| 52 | + public CommonResult<Long> createMechanicalCost(@Valid @RequestBody MechanicalCostSaveReqVO createReqVO) { | |
| 53 | + return success(mechanicalCostService.createMechanicalCost(createReqVO)); | |
| 54 | + } | |
| 55 | + | |
| 56 | + @PutMapping("/update") | |
| 57 | + @Operation(summary = "更新自有机械费用录入") | |
| 58 | + @PreAuthorize("@ss.hasPermission('garden:mechanical-cost:update')") | |
| 59 | + public CommonResult<Boolean> updateMechanicalCost(@Valid @RequestBody MechanicalCostSaveReqVO updateReqVO) { | |
| 60 | + mechanicalCostService.updateMechanicalCost(updateReqVO); | |
| 61 | + return success(true); | |
| 62 | + } | |
| 63 | + | |
| 64 | + @DeleteMapping("/delete") | |
| 65 | + @Operation(summary = "删除自有机械费用录入") | |
| 66 | + @Parameter(name = "id", description = "编号", required = true) | |
| 67 | + @PreAuthorize("@ss.hasPermission('garden:mechanical-cost:delete')") | |
| 68 | + public CommonResult<Boolean> deleteMechanicalCost(@RequestParam("id") Long id) { | |
| 69 | + mechanicalCostService.deleteMechanicalCost(id); | |
| 70 | + return success(true); | |
| 71 | + } | |
| 72 | + | |
| 73 | + @DeleteMapping("/delete-list") | |
| 74 | + @Parameter(name = "ids", description = "编号", required = true) | |
| 75 | + @Operation(summary = "批量删除自有机械费用录入") | |
| 76 | + @PreAuthorize("@ss.hasPermission('garden:mechanical-cost:delete')") | |
| 77 | + public CommonResult<Boolean> deleteMechanicalCostList(@RequestParam("ids") List<Long> ids) { | |
| 78 | + mechanicalCostService.deleteMechanicalCostListByIds(ids); | |
| 79 | + return success(true); | |
| 80 | + } | |
| 81 | + | |
| 82 | + @GetMapping("/get") | |
| 83 | + @Operation(summary = "获得自有机械费用录入") | |
| 84 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | |
| 85 | + @PreAuthorize("@ss.hasPermission('garden:mechanical-cost:query')") | |
| 86 | + public CommonResult<MechanicalCostRespVO> getMechanicalCost(@RequestParam("id") Long id) { | |
| 87 | + MechanicalCostDO mechanicalCost = mechanicalCostService.getMechanicalCost(id); | |
| 88 | + | |
| 89 | + //add by wq 20251119 前端返回集合 | |
| 90 | + MechanicalCostRespVO mechanicalCostRespVO = null; | |
| 91 | + if (mechanicalCost != null) { | |
| 92 | + mechanicalCostRespVO = BeanUtils.toBean(mechanicalCost, MechanicalCostRespVO.class); | |
| 93 | + | |
| 94 | + List<TeamBizdomainRelDO> teamBizdomainRelList = teamBizdomainRelService.getTeamBizdomainRelList(mechanicalCost.getId(), CostFeeConstants.COSTFEE_MECHANICAL); | |
| 95 | + mechanicalCostRespVO.setTeamIds(teamBizdomainRelList); | |
| 96 | + // 提取团队ID列表(使用Stream简化循环) | |
| 97 | + List<String> teamIdList = teamBizdomainRelList.stream() | |
| 98 | + .map(TeamBizdomainRelDO::getTeamId) // 提取teamId | |
| 99 | + .filter(Objects::nonNull) // 过滤null值(可选,根据业务需要) | |
| 100 | + .collect(Collectors.toList()); | |
| 101 | + mechanicalCostRespVO.setTeamIdList(teamIdList); | |
| 102 | + } | |
| 103 | + //add by wq 20251119 前端返回集合 | |
| 104 | + return success(mechanicalCostRespVO); | |
| 105 | + } | |
| 106 | + | |
| 107 | + @GetMapping("/page") | |
| 108 | + @Operation(summary = "获得自有机械费用录入分页") | |
| 109 | + @PreAuthorize("@ss.hasPermission('garden:mechanical-cost:query')") | |
| 110 | + public CommonResult<PageResult<MechanicalCostRespVO>> getMechanicalCostPage(@Valid MechanicalCostPageReqVO pageReqVO) { | |
| 111 | + PageResult<MechanicalCostDO> pageResult = mechanicalCostService.getMechanicalCostPage(pageReqVO); | |
| 112 | + return success(BeanUtils.toBean(pageResult, MechanicalCostRespVO.class)); | |
| 113 | + } | |
| 114 | + | |
| 115 | + @GetMapping("/export-excel") | |
| 116 | + @Operation(summary = "导出自有机械费用录入 Excel") | |
| 117 | + @PreAuthorize("@ss.hasPermission('garden:mechanical-cost:export')") | |
| 118 | + @ApiAccessLog(operateType = EXPORT) | |
| 119 | + public void exportMechanicalCostExcel(@Valid MechanicalCostPageReqVO pageReqVO, | |
| 120 | + HttpServletResponse response) throws IOException { | |
| 121 | + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 122 | + List<MechanicalCostDO> list = mechanicalCostService.getMechanicalCostPage(pageReqVO).getList(); | |
| 123 | + // 导出 Excel | |
| 124 | + ExcelUtils.write(response, "自有机械费用录入.xls", "数据", MechanicalCostRespVO.class, | |
| 125 | + BeanUtils.toBean(list, MechanicalCostRespVO.class)); | |
| 126 | + } | |
| 127 | + | |
| 128 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/mechanicalcost/vo/MechanicalCostPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.mechanicalcost.vo; | |
| 2 | + | |
| 3 | +import cn.idev.excel.annotation.ExcelProperty; | |
| 4 | +import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | |
| 5 | +import lombok.*; | |
| 6 | + | |
| 7 | +import java.time.LocalDate; | |
| 8 | +import java.util.*; | |
| 9 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 10 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 11 | +import java.math.BigDecimal; | |
| 12 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 13 | +import java.time.LocalDateTime; | |
| 14 | + | |
| 15 | +import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | |
| 16 | + | |
| 17 | +@Schema(description = "管理后台 - 自有机械费用录入分页 Request VO") | |
| 18 | +@Data | |
| 19 | +public class MechanicalCostPageReqVO extends PageParam { | |
| 20 | + | |
| 21 | + @Schema(description = "机械类型", example = "1") | |
| 22 | + private String mechType; | |
| 23 | + | |
| 24 | + @Schema(description = "机械编号") | |
| 25 | + private String mechCode; | |
| 26 | + | |
| 27 | + @Schema(description = "机械名称", example = "王五") | |
| 28 | + private String mechName; | |
| 29 | + | |
| 30 | + @Schema(description = "机械类别(如工具类)") | |
| 31 | + private String mechCategory; | |
| 32 | + | |
| 33 | + @Schema(description = "单价", example = "3767") | |
| 34 | + private BigDecimal unitPrice; | |
| 35 | + | |
| 36 | + @Schema(description = "数量") | |
| 37 | + private Integer quantity; | |
| 38 | + | |
| 39 | + @Schema(description = "车牌号") | |
| 40 | + private String licensePlate; | |
| 41 | + | |
| 42 | + @Schema(description = "车辆类别(如汽油、纯电新能源等)") | |
| 43 | + private String vehicleCategory; | |
| 44 | + | |
| 45 | + @Schema(description = "车辆类型(如大型客车、轻型栏板货车等)", example = "2") | |
| 46 | + private String vehicleType; | |
| 47 | + | |
| 48 | + @Schema(description = "开始使用时间") | |
| 49 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 50 | + private LocalDate[] startUseTime; | |
| 51 | + | |
| 52 | + @Schema(description = "使用年限") | |
| 53 | + private Long serviceLife; | |
| 54 | + | |
| 55 | + @Schema(description = "结束使用时间") | |
| 56 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 57 | + private LocalDate[] endUseTime; | |
| 58 | + | |
| 59 | + @Schema(description = "归属公司", example = "张三") | |
| 60 | + private String companyName; | |
| 61 | + | |
| 62 | + @Schema(description = "归属公司ID", example = "5463") | |
| 63 | + private String companyId; | |
| 64 | + | |
| 65 | + @Schema(description = "部门id", example = "13645") | |
| 66 | + private Long deptId; | |
| 67 | + | |
| 68 | + @Schema(description = "备注", example = "随便") | |
| 69 | + private String remark; | |
| 70 | + | |
| 71 | + @Schema(description = "创建时间") | |
| 72 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 73 | + private LocalDateTime[] createTime; | |
| 74 | + | |
| 75 | + @ExcelProperty("班组") | |
| 76 | + private List<TeamBizdomainRelDO> teamIds; | |
| 77 | + | |
| 78 | + private List teamIdList; | |
| 79 | + | |
| 80 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/mechanicalcost/vo/MechanicalCostRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.mechanicalcost.vo; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | |
| 4 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 5 | +import lombok.*; | |
| 6 | + | |
| 7 | +import java.time.LocalDate; | |
| 8 | +import java.util.*; | |
| 9 | +import java.math.BigDecimal; | |
| 10 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 11 | +import java.time.LocalDateTime; | |
| 12 | +import cn.idev.excel.annotation.*; | |
| 13 | + | |
| 14 | +@Schema(description = "管理后台 - 自有机械费用录入 Response VO") | |
| 15 | +@Data | |
| 16 | +@ExcelIgnoreUnannotated | |
| 17 | +public class MechanicalCostRespVO { | |
| 18 | + | |
| 19 | + @Schema(description = "记录ID,自增主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "20133") | |
| 20 | + @ExcelProperty("记录ID,自增主键") | |
| 21 | + private Long id; | |
| 22 | + | |
| 23 | + @Schema(description = "机械类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | |
| 24 | + @ExcelProperty("机械类型") | |
| 25 | + private String mechType; | |
| 26 | + | |
| 27 | + @Schema(description = "机械编号", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 28 | + @ExcelProperty("机械编号") | |
| 29 | + private String mechCode; | |
| 30 | + | |
| 31 | + @Schema(description = "机械名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") | |
| 32 | + @ExcelProperty("机械名称") | |
| 33 | + private String mechName; | |
| 34 | + | |
| 35 | + @Schema(description = "机械类别(如工具类)") | |
| 36 | + @ExcelProperty("机械类别(如工具类)") | |
| 37 | + private String mechCategory; | |
| 38 | + | |
| 39 | + @Schema(description = "单价", requiredMode = Schema.RequiredMode.REQUIRED, example = "3767") | |
| 40 | + @ExcelProperty("单价") | |
| 41 | + private BigDecimal unitPrice; | |
| 42 | + | |
| 43 | + @Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 44 | + @ExcelProperty("数量") | |
| 45 | + private Integer quantity; | |
| 46 | + | |
| 47 | + @Schema(description = "车牌号") | |
| 48 | + @ExcelProperty("车牌号") | |
| 49 | + private String licensePlate; | |
| 50 | + | |
| 51 | + @Schema(description = "车辆类别(如汽油、纯电新能源等)") | |
| 52 | + @ExcelProperty("车辆类别(如汽油、纯电新能源等)") | |
| 53 | + private String vehicleCategory; | |
| 54 | + | |
| 55 | + @Schema(description = "车辆类型(如大型客车、轻型栏板货车等)", example = "2") | |
| 56 | + @ExcelProperty("车辆类型(如大型客车、轻型栏板货车等)") | |
| 57 | + private String vehicleType; | |
| 58 | + | |
| 59 | + @Schema(description = "开始使用时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 60 | + @ExcelProperty("开始使用时间") | |
| 61 | + private LocalDate startUseTime; | |
| 62 | + | |
| 63 | + @Schema(description = "使用年限") | |
| 64 | + @ExcelProperty("使用年限") | |
| 65 | + private Long serviceLife; | |
| 66 | + | |
| 67 | + @Schema(description = "结束使用时间") | |
| 68 | + @ExcelProperty("结束使用时间") | |
| 69 | + private LocalDate endUseTime; | |
| 70 | + | |
| 71 | + @Schema(description = "归属公司", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") | |
| 72 | + @ExcelProperty("归属公司") | |
| 73 | + private String companyName; | |
| 74 | + | |
| 75 | + @Schema(description = "归属公司ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5463") | |
| 76 | + @ExcelProperty("归属公司ID") | |
| 77 | + private String companyId; | |
| 78 | + | |
| 79 | + @Schema(description = "部门id", example = "13645") | |
| 80 | + @ExcelProperty("部门id") | |
| 81 | + private Long deptId; | |
| 82 | + | |
| 83 | + @Schema(description = "备注", example = "随便") | |
| 84 | + @ExcelProperty("备注") | |
| 85 | + private String remark; | |
| 86 | + | |
| 87 | + @Schema(description = "创建时间") | |
| 88 | + @ExcelProperty("创建时间") | |
| 89 | + private LocalDateTime createTime; | |
| 90 | + | |
| 91 | + @ExcelProperty("班组") | |
| 92 | + private List<TeamBizdomainRelDO> teamIds; | |
| 93 | + | |
| 94 | + private List teamIdList; | |
| 95 | + | |
| 96 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/mechanicalcost/vo/MechanicalCostSaveReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.mechanicalcost.vo; | |
| 2 | + | |
| 3 | +import cn.idev.excel.annotation.ExcelProperty; | |
| 4 | +import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | |
| 5 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 6 | +import lombok.*; | |
| 7 | + | |
| 8 | +import java.time.LocalDate; | |
| 9 | +import java.util.*; | |
| 10 | +import jakarta.validation.constraints.*; | |
| 11 | +import java.math.BigDecimal; | |
| 12 | + | |
| 13 | +@Schema(description = "管理后台 - 自有机械费用录入新增/修改 Request VO") | |
| 14 | +@Data | |
| 15 | +public class MechanicalCostSaveReqVO { | |
| 16 | + | |
| 17 | + @Schema(description = "记录ID,自增主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "20133") | |
| 18 | + private Long id; | |
| 19 | + | |
| 20 | + @Schema(description = "机械类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | |
| 21 | + @NotEmpty(message = "机械类型不能为空") | |
| 22 | + private String mechType; | |
| 23 | + | |
| 24 | + @Schema(description = "机械编号", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 25 | + @NotEmpty(message = "机械编号不能为空") | |
| 26 | + private String mechCode; | |
| 27 | + | |
| 28 | + @Schema(description = "机械名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") | |
| 29 | + @NotEmpty(message = "机械名称不能为空") | |
| 30 | + private String mechName; | |
| 31 | + | |
| 32 | + @Schema(description = "机械类别(如工具类)") | |
| 33 | + private String mechCategory; | |
| 34 | + | |
| 35 | + @Schema(description = "单价", requiredMode = Schema.RequiredMode.REQUIRED, example = "3767") | |
| 36 | + @NotNull(message = "单价不能为空") | |
| 37 | + private BigDecimal unitPrice; | |
| 38 | + | |
| 39 | + @Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 40 | + @NotNull(message = "数量不能为空") | |
| 41 | + private Integer quantity; | |
| 42 | + | |
| 43 | + @Schema(description = "车牌号") | |
| 44 | + private String licensePlate; | |
| 45 | + | |
| 46 | + @Schema(description = "车辆类别(如汽油、纯电新能源等)") | |
| 47 | + private String vehicleCategory; | |
| 48 | + | |
| 49 | + @Schema(description = "车辆类型(如大型客车、轻型栏板货车等)", example = "2") | |
| 50 | + private String vehicleType; | |
| 51 | + | |
| 52 | + @Schema(description = "开始使用时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 53 | + @NotNull(message = "开始使用时间不能为空") | |
| 54 | + private LocalDate startUseTime; | |
| 55 | + | |
| 56 | + @Schema(description = "使用年限") | |
| 57 | + private Long serviceLife; | |
| 58 | + | |
| 59 | + @Schema(description = "结束使用时间") | |
| 60 | + private LocalDate endUseTime; | |
| 61 | + | |
| 62 | + @Schema(description = "归属公司", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") | |
| 63 | + @NotEmpty(message = "归属公司不能为空") | |
| 64 | + private String companyName; | |
| 65 | + | |
| 66 | + @Schema(description = "归属公司ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5463") | |
| 67 | + @NotEmpty(message = "归属公司ID不能为空") | |
| 68 | + private String companyId; | |
| 69 | + | |
| 70 | + @Schema(description = "部门id", example = "13645") | |
| 71 | + private Long deptId; | |
| 72 | + | |
| 73 | + @Schema(description = "备注", example = "随便") | |
| 74 | + private String remark; | |
| 75 | + | |
| 76 | + @ExcelProperty("班组") | |
| 77 | + private List<TeamBizdomainRelDO> teamIds; | |
| 78 | + | |
| 79 | + private List teamIdList; | |
| 80 | + | |
| 81 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/mechanicaldepreciation/MechanicalDepreciationController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.mechanicaldepreciation; | |
| 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.garden.controller.admin.mechanicaldepreciation.vo.*; | |
| 29 | +import com.zteits.urbanops.module.garden.dal.dataobject.mechanicaldepreciation.MechanicalDepreciationDO; | |
| 30 | +import com.zteits.urbanops.module.garden.service.mechanicaldepreciation.MechanicalDepreciationService; | |
| 31 | + | |
| 32 | +@Tag(name = "管理后台 - 自有机械折旧子") | |
| 33 | +@RestController | |
| 34 | +@RequestMapping("/garden/mechanical-depreciation") | |
| 35 | +@Validated | |
| 36 | +public class MechanicalDepreciationController { | |
| 37 | + | |
| 38 | + @Resource | |
| 39 | + private MechanicalDepreciationService mechanicalDepreciationService; | |
| 40 | + | |
| 41 | + @PostMapping("/create") | |
| 42 | + @Operation(summary = "创建自有机械折旧子") | |
| 43 | + @PreAuthorize("@ss.hasPermission('garden:mechanical-depreciation:create')") | |
| 44 | + public CommonResult<Long> createMechanicalDepreciation(@Valid @RequestBody MechanicalDepreciationSaveReqVO createReqVO) { | |
| 45 | + return success(mechanicalDepreciationService.createMechanicalDepreciation(createReqVO)); | |
| 46 | + } | |
| 47 | + | |
| 48 | + @PutMapping("/update") | |
| 49 | + @Operation(summary = "更新自有机械折旧子") | |
| 50 | + @PreAuthorize("@ss.hasPermission('garden:mechanical-depreciation:update')") | |
| 51 | + public CommonResult<Boolean> updateMechanicalDepreciation(@Valid @RequestBody MechanicalDepreciationSaveReqVO updateReqVO) { | |
| 52 | + mechanicalDepreciationService.updateMechanicalDepreciation(updateReqVO); | |
| 53 | + return success(true); | |
| 54 | + } | |
| 55 | + | |
| 56 | + @DeleteMapping("/delete") | |
| 57 | + @Operation(summary = "删除自有机械折旧子") | |
| 58 | + @Parameter(name = "id", description = "编号", required = true) | |
| 59 | + @PreAuthorize("@ss.hasPermission('garden:mechanical-depreciation:delete')") | |
| 60 | + public CommonResult<Boolean> deleteMechanicalDepreciation(@RequestParam("id") Long id) { | |
| 61 | + mechanicalDepreciationService.deleteMechanicalDepreciation(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('garden:mechanical-depreciation:delete')") | |
| 69 | + public CommonResult<Boolean> deleteMechanicalDepreciationList(@RequestParam("ids") List<Long> ids) { | |
| 70 | + mechanicalDepreciationService.deleteMechanicalDepreciationListByIds(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('garden:mechanical-depreciation:query')") | |
| 78 | + public CommonResult<MechanicalDepreciationRespVO> getMechanicalDepreciation(@RequestParam("id") Long id) { | |
| 79 | + MechanicalDepreciationDO mechanicalDepreciation = mechanicalDepreciationService.getMechanicalDepreciation(id); | |
| 80 | + return success(BeanUtils.toBean(mechanicalDepreciation, MechanicalDepreciationRespVO.class)); | |
| 81 | + } | |
| 82 | + | |
| 83 | + @GetMapping("/page") | |
| 84 | + @Operation(summary = "获得自有机械折旧子分页") | |
| 85 | + @PreAuthorize("@ss.hasPermission('garden:mechanical-depreciation:query')") | |
| 86 | + public CommonResult<PageResult<MechanicalDepreciationRespVO>> getMechanicalDepreciationPage(@Valid MechanicalDepreciationPageReqVO pageReqVO) { | |
| 87 | + PageResult<MechanicalDepreciationDO> pageResult = mechanicalDepreciationService.getMechanicalDepreciationPage(pageReqVO); | |
| 88 | + return success(BeanUtils.toBean(pageResult, MechanicalDepreciationRespVO.class)); | |
| 89 | + } | |
| 90 | + | |
| 91 | + @GetMapping("/export-excel") | |
| 92 | + @Operation(summary = "导出自有机械折旧子 Excel") | |
| 93 | + @PreAuthorize("@ss.hasPermission('garden:mechanical-depreciation:export')") | |
| 94 | + @ApiAccessLog(operateType = EXPORT) | |
| 95 | + public void exportMechanicalDepreciationExcel(@Valid MechanicalDepreciationPageReqVO pageReqVO, | |
| 96 | + HttpServletResponse response) throws IOException { | |
| 97 | + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 98 | + List<MechanicalDepreciationDO> list = mechanicalDepreciationService.getMechanicalDepreciationPage(pageReqVO).getList(); | |
| 99 | + // 导出 Excel | |
| 100 | + ExcelUtils.write(response, "自有机械折旧子.xls", "数据", MechanicalDepreciationRespVO.class, | |
| 101 | + BeanUtils.toBean(list, MechanicalDepreciationRespVO.class)); | |
| 102 | + } | |
| 103 | + | |
| 104 | +} | |
| 0 | 105 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/mechanicaldepreciation/vo/MechanicalDepreciationPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.mechanicaldepreciation.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 MechanicalDepreciationPageReqVO extends PageParam { | |
| 16 | + | |
| 17 | + @Schema(description = "关联的机械ID(对应td_mechanical_cost的id)", example = "27435") | |
| 18 | + private Long mechId; | |
| 19 | + | |
| 20 | + @Schema(description = "折旧期间(格式:YYYY-MM)") | |
| 21 | + private String depreciationPeriod; | |
| 22 | + | |
| 23 | + @Schema(description = "原值") | |
| 24 | + private BigDecimal originalValue; | |
| 25 | + | |
| 26 | + @Schema(description = "预估净值(原值-预估净值=需要折旧总额)") | |
| 27 | + private BigDecimal netValue; | |
| 28 | + | |
| 29 | + @Schema(description = "本期折旧额") | |
| 30 | + private BigDecimal depreciationAmount; | |
| 31 | + | |
| 32 | + @Schema(description = "累计折旧") | |
| 33 | + private BigDecimal accumulatedDepreciation; | |
| 34 | + | |
| 35 | + @Schema(description = "折旧方法(如直线法)") | |
| 36 | + private String depreciationMethod; | |
| 37 | + | |
| 38 | + @Schema(description = "残值率(%)") | |
| 39 | + private BigDecimal residualRate; | |
| 40 | + | |
| 41 | + @Schema(description = "使用年限") | |
| 42 | + private Integer serviceLife; | |
| 43 | + | |
| 44 | + @Schema(description = "剩余折旧期数") | |
| 45 | + private Integer remainingPeriods; | |
| 46 | + | |
| 47 | + @Schema(description = "备注", example = "你猜") | |
| 48 | + private String remark; | |
| 49 | + | |
| 50 | + @Schema(description = "创建时间") | |
| 51 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 52 | + private LocalDateTime[] createTime; | |
| 53 | + | |
| 54 | +} | |
| 0 | 55 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/mechanicaldepreciation/vo/MechanicalDepreciationRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.mechanicaldepreciation.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 MechanicalDepreciationRespVO { | |
| 15 | + | |
| 16 | + @Schema(description = "折旧记录ID,自增主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "8218") | |
| 17 | + @ExcelProperty("折旧记录ID,自增主键") | |
| 18 | + private Long id; | |
| 19 | + | |
| 20 | + @Schema(description = "关联的机械ID(对应td_mechanical_cost的id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "27435") | |
| 21 | + @ExcelProperty("关联的机械ID(对应td_mechanical_cost的id)") | |
| 22 | + private Long mechId; | |
| 23 | + | |
| 24 | + @Schema(description = "折旧期间(格式:YYYY-MM)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 25 | + @ExcelProperty("折旧期间(格式:YYYY-MM)") | |
| 26 | + private String depreciationPeriod; | |
| 27 | + | |
| 28 | + @Schema(description = "原值", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 29 | + @ExcelProperty("原值") | |
| 30 | + private BigDecimal originalValue; | |
| 31 | + | |
| 32 | + @Schema(description = "预估净值(原值-预估净值=需要折旧总额)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 33 | + @ExcelProperty("预估净值(原值-预估净值=需要折旧总额)") | |
| 34 | + private BigDecimal netValue; | |
| 35 | + | |
| 36 | + @Schema(description = "本期折旧额", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 37 | + @ExcelProperty("本期折旧额") | |
| 38 | + private BigDecimal depreciationAmount; | |
| 39 | + | |
| 40 | + @Schema(description = "累计折旧", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 41 | + @ExcelProperty("累计折旧") | |
| 42 | + private BigDecimal accumulatedDepreciation; | |
| 43 | + | |
| 44 | + @Schema(description = "折旧方法(如直线法)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 45 | + @ExcelProperty("折旧方法(如直线法)") | |
| 46 | + private String depreciationMethod; | |
| 47 | + | |
| 48 | + @Schema(description = "残值率(%)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 49 | + @ExcelProperty("残值率(%)") | |
| 50 | + private BigDecimal residualRate; | |
| 51 | + | |
| 52 | + @Schema(description = "使用年限", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 53 | + @ExcelProperty("使用年限") | |
| 54 | + private Integer serviceLife; | |
| 55 | + | |
| 56 | + @Schema(description = "剩余折旧期数", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 57 | + @ExcelProperty("剩余折旧期数") | |
| 58 | + private Integer remainingPeriods; | |
| 59 | + | |
| 60 | + @Schema(description = "备注", example = "你猜") | |
| 61 | + @ExcelProperty("备注") | |
| 62 | + private String remark; | |
| 63 | + | |
| 64 | + @Schema(description = "创建时间") | |
| 65 | + @ExcelProperty("创建时间") | |
| 66 | + private LocalDateTime createTime; | |
| 67 | + | |
| 68 | +} | |
| 0 | 69 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/mechanicaldepreciation/vo/MechanicalDepreciationSaveReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.mechanicaldepreciation.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 | + | |
| 9 | +@Schema(description = "管理后台 - 自有机械折旧子新增/修改 Request VO") | |
| 10 | +@Data | |
| 11 | +public class MechanicalDepreciationSaveReqVO { | |
| 12 | + | |
| 13 | + @Schema(description = "折旧记录ID,自增主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "8218") | |
| 14 | + private Long id; | |
| 15 | + | |
| 16 | + @Schema(description = "关联的机械ID(对应td_mechanical_cost的id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "27435") | |
| 17 | + @NotNull(message = "关联的机械ID(对应td_mechanical_cost的id)不能为空") | |
| 18 | + private Long mechId; | |
| 19 | + | |
| 20 | + @Schema(description = "折旧期间(格式:YYYY-MM)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 21 | + @NotEmpty(message = "折旧期间(格式:YYYY-MM)不能为空") | |
| 22 | + private String depreciationPeriod; | |
| 23 | + | |
| 24 | + @Schema(description = "原值", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 25 | + @NotNull(message = "原值不能为空") | |
| 26 | + private BigDecimal originalValue; | |
| 27 | + | |
| 28 | + @Schema(description = "预估净值(原值-预估净值=需要折旧总额)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 29 | + @NotNull(message = "预估净值(原值-预估净值=需要折旧总额)不能为空") | |
| 30 | + private BigDecimal netValue; | |
| 31 | + | |
| 32 | + @Schema(description = "本期折旧额", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 33 | + @NotNull(message = "本期折旧额不能为空") | |
| 34 | + private BigDecimal depreciationAmount; | |
| 35 | + | |
| 36 | + @Schema(description = "累计折旧", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 37 | + @NotNull(message = "累计折旧不能为空") | |
| 38 | + private BigDecimal accumulatedDepreciation; | |
| 39 | + | |
| 40 | + @Schema(description = "折旧方法(如直线法)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 41 | + @NotEmpty(message = "折旧方法(如直线法)不能为空") | |
| 42 | + private String depreciationMethod; | |
| 43 | + | |
| 44 | + @Schema(description = "残值率(%)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 45 | + @NotNull(message = "残值率(%)不能为空") | |
| 46 | + private BigDecimal residualRate; | |
| 47 | + | |
| 48 | + @Schema(description = "使用年限", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 49 | + @NotNull(message = "使用年限不能为空") | |
| 50 | + private Integer serviceLife; | |
| 51 | + | |
| 52 | + @Schema(description = "剩余折旧期数", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 53 | + @NotNull(message = "剩余折旧期数不能为空") | |
| 54 | + private Integer remainingPeriods; | |
| 55 | + | |
| 56 | + @Schema(description = "备注", example = "你猜") | |
| 57 | + private String remark; | |
| 58 | + | |
| 59 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/personalcost/PersonalCostController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.personalcost; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; | |
| 4 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 5 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 6 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 7 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 8 | +import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; | |
| 9 | +import com.zteits.urbanops.module.garden.controller.admin.personalcost.vo.PersonalCostPageReqVO; | |
| 10 | +import com.zteits.urbanops.module.garden.controller.admin.personalcost.vo.PersonalCostRespVO; | |
| 11 | +import com.zteits.urbanops.module.garden.controller.admin.personalcost.vo.PersonalCostSaveReqVO; | |
| 12 | +import com.zteits.urbanops.module.garden.dal.dataobject.personalcost.PersonalCostDO; | |
| 13 | +import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | |
| 14 | +import com.zteits.urbanops.module.garden.enums.CostFeeConstants; | |
| 15 | +import com.zteits.urbanops.module.garden.service.personalcost.PersonalCostService; | |
| 16 | +import com.zteits.urbanops.module.garden.service.teambizdomainrel.TeamBizdomainRelService; | |
| 17 | +import io.swagger.v3.oas.annotations.Operation; | |
| 18 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 19 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 20 | +import jakarta.annotation.Resource; | |
| 21 | +import jakarta.servlet.http.HttpServletResponse; | |
| 22 | +import jakarta.validation.Valid; | |
| 23 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 24 | +import org.springframework.validation.annotation.Validated; | |
| 25 | +import org.springframework.web.bind.annotation.*; | |
| 26 | + | |
| 27 | +import java.io.IOException; | |
| 28 | +import java.util.List; | |
| 29 | +import java.util.Objects; | |
| 30 | +import java.util.stream.Collectors; | |
| 31 | + | |
| 32 | +import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 33 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 34 | + | |
| 35 | +@Tag(name = "管理后台 - 人员费用录入 - 个人费用") | |
| 36 | +@RestController | |
| 37 | +@RequestMapping("/garden/personal-cost") | |
| 38 | +@Validated | |
| 39 | +public class PersonalCostController { | |
| 40 | + | |
| 41 | + @Resource | |
| 42 | + private PersonalCostService personalCostService; | |
| 43 | + @Resource | |
| 44 | + TeamBizdomainRelService teamBizdomainRelService; | |
| 45 | + | |
| 46 | + @PostMapping("/create") | |
| 47 | + @Operation(summary = "创建人员费用录入 - 个人费用") | |
| 48 | + @PreAuthorize("@ss.hasPermission('garden:personal-cost:create')") | |
| 49 | + public CommonResult<Long> createPersonalCost(@Valid @RequestBody PersonalCostSaveReqVO createReqVO) { | |
| 50 | + return success(personalCostService.createPersonalCost(createReqVO)); | |
| 51 | + } | |
| 52 | + | |
| 53 | + @PutMapping("/update") | |
| 54 | + @Operation(summary = "更新人员费用录入 - 个人费用") | |
| 55 | + @PreAuthorize("@ss.hasPermission('garden:personal-cost:update')") | |
| 56 | + public CommonResult<Boolean> updatePersonalCost(@Valid @RequestBody PersonalCostSaveReqVO updateReqVO) { | |
| 57 | + personalCostService.updatePersonalCost(updateReqVO); | |
| 58 | + return success(true); | |
| 59 | + } | |
| 60 | + | |
| 61 | + @DeleteMapping("/delete") | |
| 62 | + @Operation(summary = "删除人员费用录入 - 个人费用") | |
| 63 | + @Parameter(name = "id", description = "编号", required = true) | |
| 64 | + @PreAuthorize("@ss.hasPermission('garden:personal-cost:delete')") | |
| 65 | + public CommonResult<Boolean> deletePersonalCost(@RequestParam("id") Long id) { | |
| 66 | + personalCostService.deletePersonalCost(id); | |
| 67 | + return success(true); | |
| 68 | + } | |
| 69 | + | |
| 70 | + @DeleteMapping("/delete-list") | |
| 71 | + @Parameter(name = "ids", description = "编号", required = true) | |
| 72 | + @Operation(summary = "批量删除人员费用录入 - 个人费用") | |
| 73 | + @PreAuthorize("@ss.hasPermission('garden:personal-cost:delete')") | |
| 74 | + public CommonResult<Boolean> deletePersonalCostList(@RequestParam("ids") List<Long> ids) { | |
| 75 | + personalCostService.deletePersonalCostListByIds(ids); | |
| 76 | + return success(true); | |
| 77 | + } | |
| 78 | + | |
| 79 | + @GetMapping("/get") | |
| 80 | + @Operation(summary = "获得人员费用录入 - 个人费用") | |
| 81 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | |
| 82 | + @PreAuthorize("@ss.hasPermission('garden:personal-cost:query')") | |
| 83 | + public CommonResult<PersonalCostRespVO> getPersonalCost(@RequestParam("id") Long id) { | |
| 84 | + PersonalCostDO personalCost = personalCostService.getPersonalCost(id); | |
| 85 | + //add by wq 20251119 前端返回集合 | |
| 86 | + PersonalCostRespVO personalCostRespVO = null; | |
| 87 | + if (personalCost != null) { | |
| 88 | + personalCostRespVO = BeanUtils.toBean(personalCost, PersonalCostRespVO.class); | |
| 89 | + | |
| 90 | + List<TeamBizdomainRelDO> teamBizdomainRelList = teamBizdomainRelService.getTeamBizdomainRelList(personalCost.getId(), CostFeeConstants.COSTFEE_PERSONAL); | |
| 91 | + personalCostRespVO.setTeamIds(teamBizdomainRelList); | |
| 92 | + // 提取团队ID列表(使用Stream简化循环) | |
| 93 | + List<String> teamIdList = teamBizdomainRelList.stream() | |
| 94 | + .map(TeamBizdomainRelDO::getTeamId) // 提取teamId | |
| 95 | + .filter(Objects::nonNull) // 过滤null值(可选,根据业务需要) | |
| 96 | + .collect(Collectors.toList()); | |
| 97 | + personalCostRespVO.setTeamIdList(teamIdList); | |
| 98 | + } | |
| 99 | + //add by wq 20251119 前端返回集合 | |
| 100 | + return success(personalCostRespVO); | |
| 101 | + } | |
| 102 | + | |
| 103 | + @GetMapping("/page") | |
| 104 | + @Operation(summary = "获得人员费用录入 - 个人费用分页") | |
| 105 | + @PreAuthorize("@ss.hasPermission('garden:personal-cost:query')") | |
| 106 | + public CommonResult<PageResult<PersonalCostRespVO>> getPersonalCostPage(@Valid PersonalCostPageReqVO pageReqVO) { | |
| 107 | + PageResult<PersonalCostDO> pageResult = personalCostService.getPersonalCostPage(pageReqVO); | |
| 108 | + return success(BeanUtils.toBean(pageResult, PersonalCostRespVO.class)); | |
| 109 | + } | |
| 110 | + | |
| 111 | + @GetMapping("/export-excel") | |
| 112 | + @Operation(summary = "导出人员费用录入 - 个人费用 Excel") | |
| 113 | + @PreAuthorize("@ss.hasPermission('garden:personal-cost:export')") | |
| 114 | + @ApiAccessLog(operateType = EXPORT) | |
| 115 | + public void exportPersonalCostExcel(@Valid PersonalCostPageReqVO pageReqVO, | |
| 116 | + HttpServletResponse response) throws IOException { | |
| 117 | + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 118 | + List<PersonalCostDO> list = personalCostService.getPersonalCostPage(pageReqVO).getList(); | |
| 119 | + // 导出 Excel | |
| 120 | + ExcelUtils.write(response, "人员费用录入 - 个人费用.xls", "数据", PersonalCostRespVO.class, | |
| 121 | + BeanUtils.toBean(list, PersonalCostRespVO.class)); | |
| 122 | + } | |
| 123 | + | |
| 124 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/personalcost/vo/PersonalCostPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.personalcost.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 PersonalCostPageReqVO extends PageParam { | |
| 16 | + | |
| 17 | + @Schema(description = "工资年月(如202506)") | |
| 18 | + private String salaryMonth; | |
| 19 | + | |
| 20 | + @Schema(description = "姓名", example = "张三") | |
| 21 | + private String name; | |
| 22 | + | |
| 23 | + @Schema(description = "工资金额") | |
| 24 | + private BigDecimal salaryAmount; | |
| 25 | + | |
| 26 | + @Schema(description = "岗位名称", example = "李四") | |
| 27 | + private String postName; | |
| 28 | + | |
| 29 | + @Schema(description = "岗位类别(如正式员工、外包员工等)") | |
| 30 | + private String postCategory; | |
| 31 | + | |
| 32 | + @Schema(description = "归属公司", example = "芋艿") | |
| 33 | + private String companyName; | |
| 34 | + | |
| 35 | + @Schema(description = "归属公司ID", example = "28850") | |
| 36 | + private String companyId; | |
| 37 | + | |
| 38 | + @Schema(description = "部门id", example = "18461") | |
| 39 | + private Long deptId; | |
| 40 | + | |
| 41 | + @Schema(description = "备注", example = "随便") | |
| 42 | + private String remark; | |
| 43 | + | |
| 44 | + @Schema(description = "创建时间") | |
| 45 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 46 | + private LocalDateTime[] createTime; | |
| 47 | + | |
| 48 | +} | |
| 0 | 49 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/personalcost/vo/PersonalCostRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.personalcost.vo; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | |
| 4 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 5 | +import lombok.*; | |
| 6 | +import java.util.*; | |
| 7 | +import java.math.BigDecimal; | |
| 8 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 9 | +import java.time.LocalDateTime; | |
| 10 | +import cn.idev.excel.annotation.*; | |
| 11 | + | |
| 12 | +@Schema(description = "管理后台 - 人员费用录入 - 个人费用 Response VO") | |
| 13 | +@Data | |
| 14 | +@ExcelIgnoreUnannotated | |
| 15 | +public class PersonalCostRespVO { | |
| 16 | + | |
| 17 | + @Schema(description = "记录ID,自增主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14090") | |
| 18 | + @ExcelProperty("记录ID,自增主键") | |
| 19 | + private Long id; | |
| 20 | + | |
| 21 | + @Schema(description = "工资年月(如202506)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 22 | + @ExcelProperty("工资年月(如202506)") | |
| 23 | + private String salaryMonth; | |
| 24 | + | |
| 25 | + @Schema(description = "姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") | |
| 26 | + @ExcelProperty("姓名") | |
| 27 | + private String name; | |
| 28 | + | |
| 29 | + @Schema(description = "工资金额", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 30 | + @ExcelProperty("工资金额") | |
| 31 | + private BigDecimal salaryAmount; | |
| 32 | + | |
| 33 | + @Schema(description = "岗位名称", example = "李四") | |
| 34 | + @ExcelProperty("岗位名称") | |
| 35 | + private String postName; | |
| 36 | + | |
| 37 | + @Schema(description = "岗位类别(如正式员工、外包员工等)") | |
| 38 | + @ExcelProperty("岗位类别(如正式员工、外包员工等)") | |
| 39 | + private String postCategory; | |
| 40 | + | |
| 41 | + @Schema(description = "归属公司", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") | |
| 42 | + @ExcelProperty("归属公司") | |
| 43 | + private String companyName; | |
| 44 | + | |
| 45 | + @Schema(description = "归属公司ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28850") | |
| 46 | + @ExcelProperty("归属公司ID") | |
| 47 | + private String companyId; | |
| 48 | + | |
| 49 | + @Schema(description = "部门id", example = "18461") | |
| 50 | + @ExcelProperty("部门id") | |
| 51 | + private Long deptId; | |
| 52 | + | |
| 53 | + @Schema(description = "备注", example = "随便") | |
| 54 | + @ExcelProperty("备注") | |
| 55 | + private String remark; | |
| 56 | + | |
| 57 | + @Schema(description = "创建时间") | |
| 58 | + @ExcelProperty("创建时间") | |
| 59 | + private LocalDateTime createTime; | |
| 60 | + | |
| 61 | + @ExcelProperty("班组") | |
| 62 | + private List<TeamBizdomainRelDO> teamIds; | |
| 63 | + | |
| 64 | + private List teamIdList; | |
| 65 | + | |
| 66 | + | |
| 67 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/personalcost/vo/PersonalCostSaveReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.personalcost.vo; | |
| 2 | + | |
| 3 | +import cn.idev.excel.annotation.ExcelProperty; | |
| 4 | +import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | |
| 5 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 6 | +import lombok.*; | |
| 7 | +import java.util.*; | |
| 8 | +import jakarta.validation.constraints.*; | |
| 9 | +import java.math.BigDecimal; | |
| 10 | + | |
| 11 | +@Schema(description = "管理后台 - 人员费用录入 - 个人费用新增/修改 Request VO") | |
| 12 | +@Data | |
| 13 | +public class PersonalCostSaveReqVO { | |
| 14 | + | |
| 15 | + @Schema(description = "记录ID,自增主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14090") | |
| 16 | + private Long id; | |
| 17 | + | |
| 18 | + @Schema(description = "工资年月(如202506)", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 19 | + @NotEmpty(message = "工资年月(如202506)不能为空") | |
| 20 | + private String salaryMonth; | |
| 21 | + | |
| 22 | + @Schema(description = "姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") | |
| 23 | + @NotEmpty(message = "姓名不能为空") | |
| 24 | + private String name; | |
| 25 | + | |
| 26 | + @Schema(description = "工资金额", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 27 | + @NotNull(message = "工资金额不能为空") | |
| 28 | + private BigDecimal salaryAmount; | |
| 29 | + | |
| 30 | + @Schema(description = "岗位名称", example = "李四") | |
| 31 | + private String postName; | |
| 32 | + | |
| 33 | + @Schema(description = "岗位类别(如正式员工、外包员工等)") | |
| 34 | + private String postCategory; | |
| 35 | + | |
| 36 | + @Schema(description = "归属公司", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") | |
| 37 | + @NotEmpty(message = "归属公司不能为空") | |
| 38 | + private String companyName; | |
| 39 | + | |
| 40 | + @Schema(description = "归属公司ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28850") | |
| 41 | + @NotEmpty(message = "归属公司ID不能为空") | |
| 42 | + private String companyId; | |
| 43 | + | |
| 44 | + @Schema(description = "部门id", example = "18461") | |
| 45 | + private Long deptId; | |
| 46 | + | |
| 47 | + @Schema(description = "备注", example = "随便") | |
| 48 | + private String remark; | |
| 49 | + | |
| 50 | + @ExcelProperty("班组") | |
| 51 | + private List<TeamBizdomainRelDO> teamIds; | |
| 52 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/rentalmechanicalcost/RentalMechanicalCostController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.module.garden.controller.admin.mechanicalcost.vo.MechanicalCostRespVO; | |
| 4 | +import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | |
| 5 | +import com.zteits.urbanops.module.garden.enums.CostFeeConstants; | |
| 6 | +import com.zteits.urbanops.module.garden.service.teambizdomainrel.TeamBizdomainRelService; | |
| 7 | +import org.springframework.web.bind.annotation.*; | |
| 8 | +import jakarta.annotation.Resource; | |
| 9 | +import org.springframework.validation.annotation.Validated; | |
| 10 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 11 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 12 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 13 | +import io.swagger.v3.oas.annotations.Operation; | |
| 14 | + | |
| 15 | +import jakarta.validation.constraints.*; | |
| 16 | +import jakarta.validation.*; | |
| 17 | +import jakarta.servlet.http.*; | |
| 18 | +import java.util.*; | |
| 19 | +import java.io.IOException; | |
| 20 | +import java.util.stream.Collectors; | |
| 21 | + | |
| 22 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 23 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 24 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 25 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 26 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 27 | + | |
| 28 | +import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; | |
| 29 | + | |
| 30 | +import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; | |
| 31 | +import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.*; | |
| 32 | + | |
| 33 | +import com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo.*; | |
| 34 | +import com.zteits.urbanops.module.garden.dal.dataobject.rentalmechanicalcost.RentalMechanicalCostDO; | |
| 35 | +import com.zteits.urbanops.module.garden.service.rentalmechanicalcost.RentalMechanicalCostService; | |
| 36 | + | |
| 37 | +@Tag(name = "管理后台 - 租赁机械费用录入") | |
| 38 | +@RestController | |
| 39 | +@RequestMapping("/garden/rental-mechanical-cost") | |
| 40 | +@Validated | |
| 41 | +public class RentalMechanicalCostController { | |
| 42 | + | |
| 43 | + @Resource | |
| 44 | + private RentalMechanicalCostService rentalMechanicalCostService; | |
| 45 | + @Resource | |
| 46 | + TeamBizdomainRelService teamBizdomainRelService; | |
| 47 | + @PostMapping("/create") | |
| 48 | + @Operation(summary = "创建租赁机械费用录入") | |
| 49 | + @PreAuthorize("@ss.hasPermission('garden:rental-mechanical-cost:create')") | |
| 50 | + public CommonResult<Long> createRentalMechanicalCost(@Valid @RequestBody RentalMechanicalCostSaveReqVO createReqVO) { | |
| 51 | + return success(rentalMechanicalCostService.createRentalMechanicalCost(createReqVO)); | |
| 52 | + } | |
| 53 | + | |
| 54 | + @PutMapping("/update") | |
| 55 | + @Operation(summary = "更新租赁机械费用录入") | |
| 56 | + @PreAuthorize("@ss.hasPermission('garden:rental-mechanical-cost:update')") | |
| 57 | + public CommonResult<Boolean> updateRentalMechanicalCost(@Valid @RequestBody RentalMechanicalCostSaveReqVO updateReqVO) { | |
| 58 | + rentalMechanicalCostService.updateRentalMechanicalCost(updateReqVO); | |
| 59 | + return success(true); | |
| 60 | + } | |
| 61 | + | |
| 62 | + @DeleteMapping("/delete") | |
| 63 | + @Operation(summary = "删除租赁机械费用录入") | |
| 64 | + @Parameter(name = "id", description = "编号", required = true) | |
| 65 | + @PreAuthorize("@ss.hasPermission('garden:rental-mechanical-cost:delete')") | |
| 66 | + public CommonResult<Boolean> deleteRentalMechanicalCost(@RequestParam("id") Long id) { | |
| 67 | + rentalMechanicalCostService.deleteRentalMechanicalCost(id); | |
| 68 | + return success(true); | |
| 69 | + } | |
| 70 | + | |
| 71 | + @DeleteMapping("/delete-list") | |
| 72 | + @Parameter(name = "ids", description = "编号", required = true) | |
| 73 | + @Operation(summary = "批量删除租赁机械费用录入") | |
| 74 | + @PreAuthorize("@ss.hasPermission('garden:rental-mechanical-cost:delete')") | |
| 75 | + public CommonResult<Boolean> deleteRentalMechanicalCostList(@RequestParam("ids") List<Long> ids) { | |
| 76 | + rentalMechanicalCostService.deleteRentalMechanicalCostListByIds(ids); | |
| 77 | + return success(true); | |
| 78 | + } | |
| 79 | + | |
| 80 | + @GetMapping("/get") | |
| 81 | + @Operation(summary = "获得租赁机械费用录入") | |
| 82 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | |
| 83 | + @PreAuthorize("@ss.hasPermission('garden:rental-mechanical-cost:query')") | |
| 84 | + public CommonResult<RentalMechanicalCostRespVO> getRentalMechanicalCost(@RequestParam("id") Long id) { | |
| 85 | + RentalMechanicalCostDO rentalMechanicalCost = rentalMechanicalCostService.getRentalMechanicalCost(id); | |
| 86 | + | |
| 87 | + //add by wq 20251119 前端返回集合 | |
| 88 | + RentalMechanicalCostRespVO mechanicalCostRespVO = null; | |
| 89 | + if (rentalMechanicalCost != null) { | |
| 90 | + mechanicalCostRespVO = BeanUtils.toBean(rentalMechanicalCost, RentalMechanicalCostRespVO.class); | |
| 91 | + | |
| 92 | + List<TeamBizdomainRelDO> teamBizdomainRelList = teamBizdomainRelService.getTeamBizdomainRelList(rentalMechanicalCost.getId(), CostFeeConstants.COSTFEE_RENTALMECHANICAL); | |
| 93 | + mechanicalCostRespVO.setTeamIds(teamBizdomainRelList); | |
| 94 | + } | |
| 95 | + //add by wq 20251119 前端返回集合 | |
| 96 | + return success(mechanicalCostRespVO); | |
| 97 | + } | |
| 98 | + | |
| 99 | + @GetMapping("/page") | |
| 100 | + @Operation(summary = "获得租赁机械费用录入分页") | |
| 101 | + @PreAuthorize("@ss.hasPermission('garden:rental-mechanical-cost:query')") | |
| 102 | + public CommonResult<PageResult<RentalMechanicalCostRespVO>> getRentalMechanicalCostPage(@Valid RentalMechanicalCostPageReqVO pageReqVO) { | |
| 103 | + PageResult<RentalMechanicalCostDO> pageResult = rentalMechanicalCostService.getRentalMechanicalCostPage(pageReqVO); | |
| 104 | + return success(BeanUtils.toBean(pageResult, RentalMechanicalCostRespVO.class)); | |
| 105 | + } | |
| 106 | + | |
| 107 | + @GetMapping("/export-excel") | |
| 108 | + @Operation(summary = "导出租赁机械费用录入 Excel") | |
| 109 | + @PreAuthorize("@ss.hasPermission('garden:rental-mechanical-cost:export')") | |
| 110 | + @ApiAccessLog(operateType = EXPORT) | |
| 111 | + public void exportRentalMechanicalCostExcel(@Valid RentalMechanicalCostPageReqVO pageReqVO, | |
| 112 | + HttpServletResponse response) throws IOException { | |
| 113 | + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 114 | + List<RentalMechanicalCostDO> list = rentalMechanicalCostService.getRentalMechanicalCostPage(pageReqVO).getList(); | |
| 115 | + // 导出 Excel | |
| 116 | + ExcelUtils.write(response, "租赁机械费用录入.xls", "数据", RentalMechanicalCostRespVO.class, | |
| 117 | + BeanUtils.toBean(list, RentalMechanicalCostRespVO.class)); | |
| 118 | + } | |
| 119 | + | |
| 120 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/rentalmechanicalcost/vo/RentalMechanicalCostPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo; | |
| 2 | + | |
| 3 | +import cn.idev.excel.annotation.ExcelProperty; | |
| 4 | +import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | |
| 5 | +import lombok.*; | |
| 6 | + | |
| 7 | +import java.time.LocalDate; | |
| 8 | +import java.util.*; | |
| 9 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 10 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 11 | +import java.math.BigDecimal; | |
| 12 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 13 | +import java.time.LocalDateTime; | |
| 14 | + | |
| 15 | +import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | |
| 16 | + | |
| 17 | +@Schema(description = "管理后台 - 租赁机械费用录入分页 Request VO") | |
| 18 | +@Data | |
| 19 | +public class RentalMechanicalCostPageReqVO extends PageParam { | |
| 20 | + | |
| 21 | + @Schema(description = "机械名称", example = "张三") | |
| 22 | + private String mechName; | |
| 23 | + | |
| 24 | + @Schema(description = "机械类型", example = "2") | |
| 25 | + private String mechType; | |
| 26 | + | |
| 27 | + @Schema(description = "租赁总价格", example = "316") | |
| 28 | + private BigDecimal rentalTotalPrice; | |
| 29 | + | |
| 30 | + @Schema(description = "数量") | |
| 31 | + private Integer quantity; | |
| 32 | + | |
| 33 | + @Schema(description = "车牌号") | |
| 34 | + private String licensePlate; | |
| 35 | + | |
| 36 | + @Schema(description = "车辆类别(如汽油、纯电新能源等)") | |
| 37 | + private String vehicleCategory; | |
| 38 | + | |
| 39 | + @Schema(description = "车辆类型(如大型客车、轻型栏板货车等)", example = "2") | |
| 40 | + private String vehicleType; | |
| 41 | + | |
| 42 | + @Schema(description = "开始使用时间") | |
| 43 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 44 | + private LocalDate[] startUseTime; | |
| 45 | + | |
| 46 | + @Schema(description = "使用时长(天)") | |
| 47 | + private Integer useDuration; | |
| 48 | + | |
| 49 | + @Schema(description = "结束使用时间") | |
| 50 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 51 | + private LocalDate[] endUseTime; | |
| 52 | + | |
| 53 | + @Schema(description = "归属公司", example = "李四") | |
| 54 | + private String companyName; | |
| 55 | + | |
| 56 | + @Schema(description = "归属公司ID", example = "25530") | |
| 57 | + private String companyId; | |
| 58 | + | |
| 59 | + @Schema(description = "部门id", example = "25446") | |
| 60 | + private Long deptId; | |
| 61 | + | |
| 62 | + @Schema(description = "道路ID数组(多选)") | |
| 63 | + private String roadIds; | |
| 64 | + | |
| 65 | + @Schema(description = "备注", example = "你说的对") | |
| 66 | + private String remark; | |
| 67 | + | |
| 68 | + @Schema(description = "创建时间") | |
| 69 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 70 | + private LocalDateTime[] createTime; | |
| 71 | + | |
| 72 | + @ExcelProperty("班组") | |
| 73 | + private List<TeamBizdomainRelDO> teamIds; | |
| 74 | + | |
| 75 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/rentalmechanicalcost/vo/RentalMechanicalCostRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | |
| 4 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 5 | +import lombok.*; | |
| 6 | + | |
| 7 | +import java.time.LocalDate; | |
| 8 | +import java.util.*; | |
| 9 | +import java.math.BigDecimal; | |
| 10 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 11 | +import java.time.LocalDateTime; | |
| 12 | +import cn.idev.excel.annotation.*; | |
| 13 | + | |
| 14 | +@Schema(description = "管理后台 - 租赁机械费用录入 Response VO") | |
| 15 | +@Data | |
| 16 | +@ExcelIgnoreUnannotated | |
| 17 | +public class RentalMechanicalCostRespVO { | |
| 18 | + | |
| 19 | + @Schema(description = "记录ID,自增主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "9115") | |
| 20 | + @ExcelProperty("记录ID,自增主键") | |
| 21 | + private Long id; | |
| 22 | + | |
| 23 | + @Schema(description = "机械名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") | |
| 24 | + @ExcelProperty("机械名称") | |
| 25 | + private String mechName; | |
| 26 | + | |
| 27 | + @Schema(description = "机械类型", example = "2") | |
| 28 | + @ExcelProperty("机械类型") | |
| 29 | + private String mechType; | |
| 30 | + | |
| 31 | + @Schema(description = "租赁总价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "316") | |
| 32 | + @ExcelProperty("租赁总价格") | |
| 33 | + private BigDecimal rentalTotalPrice; | |
| 34 | + | |
| 35 | + @Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 36 | + @ExcelProperty("数量") | |
| 37 | + private Integer quantity; | |
| 38 | + | |
| 39 | + @Schema(description = "车牌号") | |
| 40 | + @ExcelProperty("车牌号") | |
| 41 | + private String licensePlate; | |
| 42 | + | |
| 43 | + @Schema(description = "车辆类别(如汽油、纯电新能源等)") | |
| 44 | + @ExcelProperty("车辆类别(如汽油、纯电新能源等)") | |
| 45 | + private String vehicleCategory; | |
| 46 | + | |
| 47 | + @Schema(description = "车辆类型(如大型客车、轻型栏板货车等)", example = "2") | |
| 48 | + @ExcelProperty("车辆类型(如大型客车、轻型栏板货车等)") | |
| 49 | + private String vehicleType; | |
| 50 | + | |
| 51 | + @Schema(description = "开始使用时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 52 | + @ExcelProperty("开始使用时间") | |
| 53 | + private LocalDate startUseTime; | |
| 54 | + | |
| 55 | + @Schema(description = "使用时长(天)") | |
| 56 | + @ExcelProperty("使用时长(天)") | |
| 57 | + private Integer useDuration; | |
| 58 | + | |
| 59 | + @Schema(description = "结束使用时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 60 | + @ExcelProperty("结束使用时间") | |
| 61 | + private LocalDate endUseTime; | |
| 62 | + | |
| 63 | + @Schema(description = "归属公司", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") | |
| 64 | + @ExcelProperty("归属公司") | |
| 65 | + private String companyName; | |
| 66 | + | |
| 67 | + @Schema(description = "归属公司ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25530") | |
| 68 | + @ExcelProperty("归属公司ID") | |
| 69 | + private String companyId; | |
| 70 | + | |
| 71 | + @Schema(description = "部门id", example = "25446") | |
| 72 | + @ExcelProperty("部门id") | |
| 73 | + private Long deptId; | |
| 74 | + | |
| 75 | + @Schema(description = "道路ID数组(多选)") | |
| 76 | + @ExcelProperty("道路ID数组(多选)") | |
| 77 | + private String roadIds; | |
| 78 | + | |
| 79 | + @Schema(description = "备注", example = "你说的对") | |
| 80 | + @ExcelProperty("备注") | |
| 81 | + private String remark; | |
| 82 | + | |
| 83 | + @Schema(description = "创建时间") | |
| 84 | + @ExcelProperty("创建时间") | |
| 85 | + private LocalDateTime createTime; | |
| 86 | + | |
| 87 | + @ExcelProperty("班组") | |
| 88 | + private List<TeamBizdomainRelDO> teamIds; | |
| 89 | + | |
| 90 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/rentalmechanicalcost/vo/RentalMechanicalCostSaveReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo; | |
| 2 | + | |
| 3 | +import cn.idev.excel.annotation.ExcelProperty; | |
| 4 | +import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | |
| 5 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 6 | +import lombok.*; | |
| 7 | + | |
| 8 | +import java.time.LocalDate; | |
| 9 | +import java.util.*; | |
| 10 | +import jakarta.validation.constraints.*; | |
| 11 | +import java.math.BigDecimal; | |
| 12 | + | |
| 13 | +@Schema(description = "管理后台 - 租赁机械费用录入新增/修改 Request VO") | |
| 14 | +@Data | |
| 15 | +public class RentalMechanicalCostSaveReqVO { | |
| 16 | + | |
| 17 | + @Schema(description = "记录ID,自增主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "9115") | |
| 18 | + private Long id; | |
| 19 | + | |
| 20 | + @Schema(description = "机械名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") | |
| 21 | + @NotEmpty(message = "机械名称不能为空") | |
| 22 | + private String mechName; | |
| 23 | + | |
| 24 | + @Schema(description = "机械类型", example = "2") | |
| 25 | + private String mechType; | |
| 26 | + | |
| 27 | + @Schema(description = "租赁总价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "316") | |
| 28 | + @NotNull(message = "租赁总价格不能为空") | |
| 29 | + private BigDecimal rentalTotalPrice; | |
| 30 | + | |
| 31 | + @Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 32 | + @NotNull(message = "数量不能为空") | |
| 33 | + private Integer quantity; | |
| 34 | + | |
| 35 | + @Schema(description = "车牌号") | |
| 36 | + private String licensePlate; | |
| 37 | + | |
| 38 | + @Schema(description = "车辆类别(如汽油、纯电新能源等)") | |
| 39 | + private String vehicleCategory; | |
| 40 | + | |
| 41 | + @Schema(description = "车辆类型(如大型客车、轻型栏板货车等)", example = "2") | |
| 42 | + private String vehicleType; | |
| 43 | + | |
| 44 | + @Schema(description = "开始使用时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 45 | + @NotNull(message = "开始使用时间不能为空") | |
| 46 | + private LocalDate startUseTime; | |
| 47 | + | |
| 48 | + @Schema(description = "使用时长(天)") | |
| 49 | + private Integer useDuration; | |
| 50 | + | |
| 51 | + @Schema(description = "结束使用时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 52 | + @NotNull(message = "结束使用时间不能为空") | |
| 53 | + private LocalDate endUseTime; | |
| 54 | + | |
| 55 | + @Schema(description = "归属公司", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") | |
| 56 | + @NotEmpty(message = "归属公司不能为空") | |
| 57 | + private String companyName; | |
| 58 | + | |
| 59 | + @Schema(description = "归属公司ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25530") | |
| 60 | + @NotEmpty(message = "归属公司ID不能为空") | |
| 61 | + private String companyId; | |
| 62 | + | |
| 63 | + @Schema(description = "部门id", example = "25446") | |
| 64 | + private Long deptId; | |
| 65 | + | |
| 66 | + @Schema(description = "道路ID数组(多选)") | |
| 67 | + private String roadIds; | |
| 68 | + | |
| 69 | + @Schema(description = "备注", example = "你说的对") | |
| 70 | + private String remark; | |
| 71 | + @ExcelProperty("班组") | |
| 72 | + private List<TeamBizdomainRelDO> teamIds; | |
| 73 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/teambizdomainrel/TeamBizdomainRelController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.teambizdomainrel; | |
| 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.garden.controller.admin.teambizdomainrel.vo.*; | |
| 29 | +import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | |
| 30 | +import com.zteits.urbanops.module.garden.service.teambizdomainrel.TeamBizdomainRelService; | |
| 31 | + | |
| 32 | +@Tag(name = "管理后台 - 班组关联") | |
| 33 | +@RestController | |
| 34 | +@RequestMapping("/garden/team-bizdomain-rel") | |
| 35 | +@Validated | |
| 36 | +public class TeamBizdomainRelController { | |
| 37 | + | |
| 38 | + @Resource | |
| 39 | + private TeamBizdomainRelService teamBizdomainRelService; | |
| 40 | + | |
| 41 | + @PostMapping("/create") | |
| 42 | + @Operation(summary = "创建班组关联") | |
| 43 | + @PreAuthorize("@ss.hasPermission('garden:team-bizdomain-rel:create')") | |
| 44 | + public CommonResult<Long> createTeamBizdomainRel(@Valid @RequestBody TeamBizdomainRelSaveReqVO createReqVO) { | |
| 45 | + return success(teamBizdomainRelService.createTeamBizdomainRel(createReqVO)); | |
| 46 | + } | |
| 47 | + | |
| 48 | + @PutMapping("/update") | |
| 49 | + @Operation(summary = "更新班组关联") | |
| 50 | + @PreAuthorize("@ss.hasPermission('garden:team-bizdomain-rel:update')") | |
| 51 | + public CommonResult<Boolean> updateTeamBizdomainRel(@Valid @RequestBody TeamBizdomainRelSaveReqVO updateReqVO) { | |
| 52 | + teamBizdomainRelService.updateTeamBizdomainRel(updateReqVO); | |
| 53 | + return success(true); | |
| 54 | + } | |
| 55 | + | |
| 56 | + @DeleteMapping("/delete") | |
| 57 | + @Operation(summary = "删除班组关联") | |
| 58 | + @Parameter(name = "id", description = "编号", required = true) | |
| 59 | + @PreAuthorize("@ss.hasPermission('garden:team-bizdomain-rel:delete')") | |
| 60 | + public CommonResult<Boolean> deleteTeamBizdomainRel(@RequestParam("id") Long id) { | |
| 61 | + teamBizdomainRelService.deleteTeamBizdomainRel(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('garden:team-bizdomain-rel:delete')") | |
| 69 | + public CommonResult<Boolean> deleteTeamBizdomainRelList(@RequestParam("ids") List<Long> ids) { | |
| 70 | + teamBizdomainRelService.deleteTeamBizdomainRelListByIds(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('garden:team-bizdomain-rel:query')") | |
| 78 | + public CommonResult<TeamBizdomainRelRespVO> getTeamBizdomainRel(@RequestParam("id") Long id) { | |
| 79 | + TeamBizdomainRelDO teamBizdomainRel = teamBizdomainRelService.getTeamBizdomainRel(id); | |
| 80 | + return success(BeanUtils.toBean(teamBizdomainRel, TeamBizdomainRelRespVO.class)); | |
| 81 | + } | |
| 82 | + | |
| 83 | + @GetMapping("/page") | |
| 84 | + @Operation(summary = "获得班组关联分页") | |
| 85 | + @PreAuthorize("@ss.hasPermission('garden:team-bizdomain-rel:query')") | |
| 86 | + public CommonResult<PageResult<TeamBizdomainRelRespVO>> getTeamBizdomainRelPage(@Valid TeamBizdomainRelPageReqVO pageReqVO) { | |
| 87 | + PageResult<TeamBizdomainRelDO> pageResult = teamBizdomainRelService.getTeamBizdomainRelPage(pageReqVO); | |
| 88 | + return success(BeanUtils.toBean(pageResult, TeamBizdomainRelRespVO.class)); | |
| 89 | + } | |
| 90 | + | |
| 91 | + @GetMapping("/export-excel") | |
| 92 | + @Operation(summary = "导出班组关联 Excel") | |
| 93 | + @PreAuthorize("@ss.hasPermission('garden:team-bizdomain-rel:export')") | |
| 94 | + @ApiAccessLog(operateType = EXPORT) | |
| 95 | + public void exportTeamBizdomainRelExcel(@Valid TeamBizdomainRelPageReqVO pageReqVO, | |
| 96 | + HttpServletResponse response) throws IOException { | |
| 97 | + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 98 | + List<TeamBizdomainRelDO> list = teamBizdomainRelService.getTeamBizdomainRelPage(pageReqVO).getList(); | |
| 99 | + // 导出 Excel | |
| 100 | + ExcelUtils.write(response, "班组关联.xls", "数据", TeamBizdomainRelRespVO.class, | |
| 101 | + BeanUtils.toBean(list, TeamBizdomainRelRespVO.class)); | |
| 102 | + } | |
| 103 | + | |
| 104 | +} | |
| 0 | 105 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/teambizdomainrel/vo/TeamBizdomainRelPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.teambizdomainrel.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 TeamBizdomainRelPageReqVO extends PageParam { | |
| 15 | + | |
| 16 | + @Schema(description = "业务表主键", example = "4740") | |
| 17 | + private String busiId; | |
| 18 | + | |
| 19 | + @Schema(description = "班组编码", example = "27533") | |
| 20 | + private String teamId; | |
| 21 | + | |
| 22 | + @Schema(description = "班组名称", example = "王五") | |
| 23 | + private String teamName; | |
| 24 | + | |
| 25 | + @Schema(description = "班组名称") | |
| 26 | + private Long weight; | |
| 27 | + | |
| 28 | + @Schema(description = "归属公司", example = "张三") | |
| 29 | + private String companyName; | |
| 30 | + | |
| 31 | + @Schema(description = "归属公司ID", example = "29798") | |
| 32 | + private String companyId; | |
| 33 | + | |
| 34 | + @Schema(description = "创建时间") | |
| 35 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 36 | + private LocalDateTime[] createTime; | |
| 37 | + | |
| 38 | + @Schema(description = "业务类型", example = "1") | |
| 39 | + private String busiType; | |
| 40 | + | |
| 41 | +} | |
| 0 | 42 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/teambizdomainrel/vo/TeamBizdomainRelRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.teambizdomainrel.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 TeamBizdomainRelRespVO { | |
| 14 | + | |
| 15 | + @Schema(description = "记录ID,自增主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14177") | |
| 16 | + @ExcelProperty("记录ID,自增主键") | |
| 17 | + private Long id; | |
| 18 | + | |
| 19 | + @Schema(description = "业务表主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4740") | |
| 20 | + @ExcelProperty("业务表主键") | |
| 21 | + private String busiId; | |
| 22 | + | |
| 23 | + @Schema(description = "班组编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "27533") | |
| 24 | + @ExcelProperty("班组编码") | |
| 25 | + private String teamId; | |
| 26 | + | |
| 27 | + @Schema(description = "班组名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") | |
| 28 | + @ExcelProperty("班组名称") | |
| 29 | + private String teamName; | |
| 30 | + | |
| 31 | + @Schema(description = "班组名称") | |
| 32 | + @ExcelProperty("班组名称") | |
| 33 | + private Long weight; | |
| 34 | + | |
| 35 | + @Schema(description = "归属公司", example = "张三") | |
| 36 | + @ExcelProperty("归属公司") | |
| 37 | + private String companyName; | |
| 38 | + | |
| 39 | + @Schema(description = "归属公司ID", example = "29798") | |
| 40 | + @ExcelProperty("归属公司ID") | |
| 41 | + private String companyId; | |
| 42 | + | |
| 43 | + @Schema(description = "创建时间") | |
| 44 | + @ExcelProperty("创建时间") | |
| 45 | + private LocalDateTime createTime; | |
| 46 | + | |
| 47 | + @Schema(description = "业务类型", example = "1") | |
| 48 | + @ExcelProperty("业务类型") | |
| 49 | + private String busiType; | |
| 50 | + | |
| 51 | +} | |
| 0 | 52 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/teambizdomainrel/vo/TeamBizdomainRelSaveReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.teambizdomainrel.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 TeamBizdomainRelSaveReqVO { | |
| 11 | + | |
| 12 | + @Schema(description = "记录ID,自增主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14177") | |
| 13 | + private Long id; | |
| 14 | + | |
| 15 | + @Schema(description = "业务表主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4740") | |
| 16 | + @NotEmpty(message = "业务表主键不能为空") | |
| 17 | + private String busiId; | |
| 18 | + | |
| 19 | + @Schema(description = "班组编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "27533") | |
| 20 | + @NotEmpty(message = "班组编码不能为空") | |
| 21 | + private String teamId; | |
| 22 | + | |
| 23 | + @Schema(description = "班组名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") | |
| 24 | + @NotEmpty(message = "班组名称不能为空") | |
| 25 | + private String teamName; | |
| 26 | + | |
| 27 | + @Schema(description = "班组名称") | |
| 28 | + private Long weight; | |
| 29 | + | |
| 30 | + @Schema(description = "归属公司", example = "张三") | |
| 31 | + private String companyName; | |
| 32 | + | |
| 33 | + @Schema(description = "归属公司ID", example = "29798") | |
| 34 | + private String companyId; | |
| 35 | + | |
| 36 | + @Schema(description = "业务类型", example = "1") | |
| 37 | + private String busiType; | |
| 38 | + | |
| 39 | +} | |
| 0 | 40 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/assigntasks/AssignTasksDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.assigntasks; | |
| 2 | + | |
| 3 | +import com.alibaba.fastjson.JSONArray; | |
| 4 | +import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; | |
| 5 | +import lombok.*; | |
| 6 | + | |
| 7 | +import java.io.Serializable; | |
| 8 | +import java.util.*; | |
| 9 | +import java.time.LocalDateTime; | |
| 10 | +import com.baomidou.mybatisplus.annotation.*; | |
| 11 | +import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | |
| 12 | +/** | |
| 13 | + * 派单任务主表(记录派单任务基本信息) DO | |
| 14 | + * | |
| 15 | + * @author 超级管理员 | |
| 16 | + */ | |
| 17 | +@TableName("garden_assign_tasks") | |
| 18 | +@KeySequence("garden_assign_tasks_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 | |
| 19 | +@Data | |
| 20 | +@EqualsAndHashCode(callSuper = true) | |
| 21 | +@ToString(callSuper = true) | |
| 22 | +@Builder | |
| 23 | +@NoArgsConstructor | |
| 24 | +@AllArgsConstructor | |
| 25 | +public class AssignTasksDO extends BaseDO { | |
| 26 | + | |
| 27 | + /** | |
| 28 | + * 自增ID | |
| 29 | + */ | |
| 30 | + @TableId | |
| 31 | + private Long id; | |
| 32 | + /** | |
| 33 | + * 任务名称 | |
| 34 | + */ | |
| 35 | + private String taskName; | |
| 36 | + /** | |
| 37 | + * 任务类型(关联数据字典,如:日常巡检、紧急维修等) | |
| 38 | + */ | |
| 39 | + private String taskType; | |
| 40 | + /** | |
| 41 | + * 任务截止时间 | |
| 42 | + */ | |
| 43 | + private LocalDateTime deadline; | |
| 44 | + /** | |
| 45 | + * 派单模板文件路径(如:任务详情模板、填报表格等) | |
| 46 | + */ | |
| 47 | + private String templateFile; | |
| 48 | + /** | |
| 49 | + * 任务整体完成状态(0:未完成,1:已完成;所有关联单位均完成时自动更新为1) | |
| 50 | + */ | |
| 51 | + private Integer parentFinish; | |
| 52 | + /** | |
| 53 | + * 整体完成时间(仅当parent_finish=1时有值) | |
| 54 | + */ | |
| 55 | + private LocalDateTime finishTime; | |
| 56 | + /** | |
| 57 | + * 任务备注(如:特殊要求、注意事项等) | |
| 58 | + */ | |
| 59 | + private String note; | |
| 60 | + | |
| 61 | + | |
| 62 | + @Data | |
| 63 | + public static class TemplateFileDO implements Serializable { | |
| 64 | + private String url; | |
| 65 | + private String name; | |
| 66 | + private String fileServerUrl; | |
| 67 | + } | |
| 68 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/assigntasksinfo/AssignTasksInfoDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.assigntasksinfo; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; | |
| 4 | +import lombok.*; | |
| 5 | +import java.util.*; | |
| 6 | +import java.time.LocalDateTime; | |
| 7 | +import java.time.LocalDateTime; | |
| 8 | +import java.time.LocalDateTime; | |
| 9 | +import java.time.LocalDateTime; | |
| 10 | +import java.time.LocalDateTime; | |
| 11 | +import com.baomidou.mybatisplus.annotation.*; | |
| 12 | +import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * 派单任务-单位关联表(记录单位接收派单后的执行详情) DO | |
| 16 | + * | |
| 17 | + * @author 超级管理员 | |
| 18 | + */ | |
| 19 | +@TableName("garden_assign_tasks_info") | |
| 20 | +@KeySequence("garden_assign_tasks_info_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 | |
| 21 | +@Data | |
| 22 | +@EqualsAndHashCode(callSuper = true) | |
| 23 | +@ToString(callSuper = true) | |
| 24 | +@Builder | |
| 25 | +@NoArgsConstructor | |
| 26 | +@AllArgsConstructor | |
| 27 | +public class AssignTasksInfoDO extends BaseDO { | |
| 28 | + | |
| 29 | + /** | |
| 30 | + * 自增ID | |
| 31 | + */ | |
| 32 | + @TableId | |
| 33 | + private Long id; | |
| 34 | + /** | |
| 35 | + * 关联派单任务主表ID(外键,关联td_assign_tasks.id) | |
| 36 | + */ | |
| 37 | + private Long taskId; | |
| 38 | + /** | |
| 39 | + * 单位ID(关联单位表主键) | |
| 40 | + */ | |
| 41 | + private String companyId; | |
| 42 | + /** | |
| 43 | + * 单位ID(关联单位表主键) | |
| 44 | + */ | |
| 45 | + private String companyName; | |
| 46 | + /** | |
| 47 | + * 填报人ID(单位指定的任务负责人) | |
| 48 | + */ | |
| 49 | + private String writePersonId; | |
| 50 | + /** | |
| 51 | + * 填报人姓名 | |
| 52 | + */ | |
| 53 | + private String writePerson; | |
| 54 | + /** | |
| 55 | + * 填报人手机号 | |
| 56 | + */ | |
| 57 | + private String writePersonPhone; | |
| 58 | + /** | |
| 59 | + * 填报时间(仅当finish=1时有值) | |
| 60 | + */ | |
| 61 | + private LocalDateTime writeTime; | |
| 62 | + /** | |
| 63 | + * 单位任务完成状态(0:未完成,1:已完成) | |
| 64 | + */ | |
| 65 | + private Integer finish; | |
| 66 | + /** | |
| 67 | + * 是否超期(0:未超期,1:超期;NULL:未到截止时间) | |
| 68 | + */ | |
| 69 | + private Integer isOverdue; | |
| 70 | + /** | |
| 71 | + * 单位提交的任务文件路径(如:填报表格、现场照片等) | |
| 72 | + */ | |
| 73 | + @TableField(typeHandler = JacksonTypeHandler.class) | |
| 74 | + private List dataFile; | |
| 75 | + /** | |
| 76 | + * 催缴次数(未完成时的提醒次数) | |
| 77 | + */ | |
| 78 | + private Integer rushNum; | |
| 79 | + /** | |
| 80 | + * 新任务标记(0:未读,1:已读) | |
| 81 | + */ | |
| 82 | + private Integer newFlag; | |
| 83 | + /** | |
| 84 | + * 已读时间(仅当new_flag=1时有值) | |
| 85 | + */ | |
| 86 | + private LocalDateTime newFlagTime; | |
| 87 | + /** | |
| 88 | + * 驳回备注(当finish=2时,说明驳回原因) | |
| 89 | + */ | |
| 90 | + private String rejectRemark; | |
| 91 | + /** | |
| 92 | + * 单位任务确认状态(已确认/未确认,单位接收任务后需确认) | |
| 93 | + */ | |
| 94 | + private String confirm; | |
| 95 | + /** | |
| 96 | + * 确认时间(单位确认接收任务的时间) | |
| 97 | + */ | |
| 98 | + private LocalDateTime confirmTime; | |
| 99 | + | |
| 100 | + /** | |
| 101 | + * 备注 | |
| 102 | + */ | |
| 103 | + private String remark; | |
| 104 | + /** | |
| 105 | + * 是否打回0:正常 1:打回 | |
| 106 | + */ | |
| 107 | + private Integer isReject; | |
| 108 | + | |
| 109 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/departmentcost/DepartmentCostDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.departmentcost; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import java.util.*; | |
| 5 | +import java.math.BigDecimal; | |
| 6 | +import java.time.LocalDateTime; | |
| 7 | +import java.time.LocalDateTime; | |
| 8 | +import com.baomidou.mybatisplus.annotation.*; | |
| 9 | +import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 部门费用录入 DO | |
| 13 | + * | |
| 14 | + * @author 超级管理员 | |
| 15 | + */ | |
| 16 | +@TableName("garden_department_cost") | |
| 17 | +@KeySequence("garden_department_cost_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 | |
| 18 | +@Data | |
| 19 | +@EqualsAndHashCode(callSuper = true) | |
| 20 | +@ToString(callSuper = true) | |
| 21 | +@Builder | |
| 22 | +@NoArgsConstructor | |
| 23 | +@AllArgsConstructor | |
| 24 | +public class DepartmentCostDO extends BaseDO { | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * 记录ID,自增主键 | |
| 28 | + */ | |
| 29 | + @TableId | |
| 30 | + private Long id; | |
| 31 | + /** | |
| 32 | + * 工资年月(如202506) | |
| 33 | + */ | |
| 34 | + private String salaryMonth; | |
| 35 | + /** | |
| 36 | + * 费用名称 | |
| 37 | + */ | |
| 38 | + private String expenseName; | |
| 39 | + /** | |
| 40 | + * 部门名称 | |
| 41 | + */ | |
| 42 | + private String departmentName; | |
| 43 | + /** | |
| 44 | + * 人员数量 | |
| 45 | + */ | |
| 46 | + private Integer personCount; | |
| 47 | + /** | |
| 48 | + * 部门总额 | |
| 49 | + */ | |
| 50 | + private BigDecimal deptTotalCost; | |
| 51 | + /** | |
| 52 | + * 归属公司 | |
| 53 | + */ | |
| 54 | + private String companyName; | |
| 55 | + /** | |
| 56 | + * 归属公司ID | |
| 57 | + */ | |
| 58 | + private String companyId; | |
| 59 | + /** | |
| 60 | + * 部门id | |
| 61 | + */ | |
| 62 | + private Long deptId; | |
| 63 | + /** | |
| 64 | + * 备注 | |
| 65 | + */ | |
| 66 | + private String remark; | |
| 67 | + | |
| 68 | + | |
| 69 | +} | |
| 0 | 70 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/mechanicalcost/MechanicalCostDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.mechanicalcost; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | + | |
| 5 | +import java.time.LocalDate; | |
| 6 | +import java.util.*; | |
| 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("garden_mechanical_cost") | |
| 19 | +@KeySequence("garden_mechanical_cost_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 MechanicalCostDO extends BaseDO { | |
| 27 | + | |
| 28 | + /** | |
| 29 | + * 记录ID,自增主键 | |
| 30 | + */ | |
| 31 | + @TableId | |
| 32 | + private Long id; | |
| 33 | + /** | |
| 34 | + * 机械类型 | |
| 35 | + */ | |
| 36 | + private String mechType; | |
| 37 | + /** | |
| 38 | + * 机械编号 | |
| 39 | + */ | |
| 40 | + private String mechCode; | |
| 41 | + /** | |
| 42 | + * 机械名称 | |
| 43 | + */ | |
| 44 | + private String mechName; | |
| 45 | + /** | |
| 46 | + * 机械类别(如工具类) | |
| 47 | + */ | |
| 48 | + private String mechCategory; | |
| 49 | + /** | |
| 50 | + * 单价 | |
| 51 | + */ | |
| 52 | + private BigDecimal unitPrice; | |
| 53 | + /** | |
| 54 | + * 数量 | |
| 55 | + */ | |
| 56 | + private Integer quantity; | |
| 57 | + /** | |
| 58 | + * 车牌号 | |
| 59 | + */ | |
| 60 | + private String licensePlate; | |
| 61 | + /** | |
| 62 | + * 车辆类别(如汽油、纯电新能源等) | |
| 63 | + */ | |
| 64 | + private String vehicleCategory; | |
| 65 | + /** | |
| 66 | + * 车辆类型(如大型客车、轻型栏板货车等) | |
| 67 | + */ | |
| 68 | + private String vehicleType; | |
| 69 | + /** | |
| 70 | + * 开始使用时间 | |
| 71 | + */ | |
| 72 | + private LocalDate startUseTime; | |
| 73 | + /** | |
| 74 | + * 使用年限 | |
| 75 | + */ | |
| 76 | + private Long serviceLife; | |
| 77 | + /** | |
| 78 | + * 结束使用时间 | |
| 79 | + */ | |
| 80 | + private LocalDate endUseTime; | |
| 81 | + /** | |
| 82 | + * 归属公司 | |
| 83 | + */ | |
| 84 | + private String companyName; | |
| 85 | + /** | |
| 86 | + * 归属公司ID | |
| 87 | + */ | |
| 88 | + private String companyId; | |
| 89 | + /** | |
| 90 | + * 部门id | |
| 91 | + */ | |
| 92 | + private Long deptId; | |
| 93 | + /** | |
| 94 | + * 备注 | |
| 95 | + */ | |
| 96 | + private String remark; | |
| 97 | + | |
| 98 | + | |
| 99 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/mechanicaldepreciation/MechanicalDepreciationDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.mechanicaldepreciation; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import java.util.*; | |
| 5 | +import java.math.BigDecimal; | |
| 6 | +import java.math.BigDecimal; | |
| 7 | +import java.math.BigDecimal; | |
| 8 | +import java.math.BigDecimal; | |
| 9 | +import java.math.BigDecimal; | |
| 10 | +import java.time.LocalDateTime; | |
| 11 | +import java.time.LocalDateTime; | |
| 12 | +import com.baomidou.mybatisplus.annotation.*; | |
| 13 | +import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | |
| 14 | + | |
| 15 | +/** | |
| 16 | + * 自有机械折旧子 DO | |
| 17 | + * | |
| 18 | + * @author 超级管理员 | |
| 19 | + */ | |
| 20 | +@TableName("garden_mechanical_depreciation") | |
| 21 | +@KeySequence("garden_mechanical_depreciation_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 | |
| 22 | +@Data | |
| 23 | +@EqualsAndHashCode(callSuper = true) | |
| 24 | +@ToString(callSuper = true) | |
| 25 | +@Builder | |
| 26 | +@NoArgsConstructor | |
| 27 | +@AllArgsConstructor | |
| 28 | +public class MechanicalDepreciationDO extends BaseDO { | |
| 29 | + | |
| 30 | + /** | |
| 31 | + * 折旧记录ID,自增主键 | |
| 32 | + */ | |
| 33 | + @TableId | |
| 34 | + private Long id; | |
| 35 | + /** | |
| 36 | + * 关联的机械ID(对应td_mechanical_cost的id) | |
| 37 | + */ | |
| 38 | + private Long mechId; | |
| 39 | + /** | |
| 40 | + * 折旧期间(格式:YYYY-MM) | |
| 41 | + */ | |
| 42 | + private String depreciationPeriod; | |
| 43 | + /** | |
| 44 | + * 原值 | |
| 45 | + */ | |
| 46 | + private BigDecimal originalValue; | |
| 47 | + /** | |
| 48 | + * 预估净值(原值-预估净值=需要折旧总额) | |
| 49 | + */ | |
| 50 | + private BigDecimal netValue; | |
| 51 | + /** | |
| 52 | + * 本期折旧额 | |
| 53 | + */ | |
| 54 | + private BigDecimal depreciationAmount; | |
| 55 | + /** | |
| 56 | + * 累计折旧 | |
| 57 | + */ | |
| 58 | + private BigDecimal accumulatedDepreciation; | |
| 59 | + /** | |
| 60 | + * 折旧方法(如直线法) | |
| 61 | + */ | |
| 62 | + private String depreciationMethod; | |
| 63 | + /** | |
| 64 | + * 残值率(%) | |
| 65 | + */ | |
| 66 | + private BigDecimal residualRate; | |
| 67 | + /** | |
| 68 | + * 使用年限 | |
| 69 | + */ | |
| 70 | + private Integer serviceLife; | |
| 71 | + /** | |
| 72 | + * 剩余折旧期数 | |
| 73 | + */ | |
| 74 | + private Integer remainingPeriods; | |
| 75 | + /** | |
| 76 | + * 备注 | |
| 77 | + */ | |
| 78 | + private String remark; | |
| 79 | + | |
| 80 | + | |
| 81 | +} | |
| 0 | 82 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/personalcost/PersonalCostDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.personalcost; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import java.util.*; | |
| 5 | +import java.math.BigDecimal; | |
| 6 | +import java.time.LocalDateTime; | |
| 7 | +import java.time.LocalDateTime; | |
| 8 | +import com.baomidou.mybatisplus.annotation.*; | |
| 9 | +import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 人员费用录入 - 个人费用 DO | |
| 13 | + * | |
| 14 | + * @author 超级管理员 | |
| 15 | + */ | |
| 16 | +@TableName("garden_personal_cost") | |
| 17 | +@KeySequence("garden_personal_cost_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 | |
| 18 | +@Data | |
| 19 | +@EqualsAndHashCode(callSuper = true) | |
| 20 | +@ToString(callSuper = true) | |
| 21 | +@Builder | |
| 22 | +@NoArgsConstructor | |
| 23 | +@AllArgsConstructor | |
| 24 | +public class PersonalCostDO extends BaseDO { | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * 记录ID,自增主键 | |
| 28 | + */ | |
| 29 | + @TableId | |
| 30 | + private Long id; | |
| 31 | + /** | |
| 32 | + * 工资年月(如202506) | |
| 33 | + */ | |
| 34 | + private String salaryMonth; | |
| 35 | + /** | |
| 36 | + * 姓名 | |
| 37 | + */ | |
| 38 | + private String name; | |
| 39 | + /** | |
| 40 | + * 工资金额 | |
| 41 | + */ | |
| 42 | + private BigDecimal salaryAmount; | |
| 43 | + /** | |
| 44 | + * 岗位名称 | |
| 45 | + */ | |
| 46 | + private String postName; | |
| 47 | + /** | |
| 48 | + * 岗位类别(如正式员工、外包员工等) | |
| 49 | + */ | |
| 50 | + private String postCategory; | |
| 51 | + /** | |
| 52 | + * 归属公司 | |
| 53 | + */ | |
| 54 | + private String companyName; | |
| 55 | + /** | |
| 56 | + * 归属公司ID | |
| 57 | + */ | |
| 58 | + private String companyId; | |
| 59 | + /** | |
| 60 | + * 部门id | |
| 61 | + */ | |
| 62 | + private Long deptId; | |
| 63 | + /** | |
| 64 | + * 备注 | |
| 65 | + */ | |
| 66 | + private String remark; | |
| 67 | + | |
| 68 | + | |
| 69 | +} | |
| 0 | 70 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/rentalmechanicalcost/RentalMechanicalCostDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.rentalmechanicalcost; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | + | |
| 5 | +import java.time.LocalDate; | |
| 6 | +import java.util.*; | |
| 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("garden_rental_mechanical_cost") | |
| 19 | +@KeySequence("garden_rental_mechanical_cost_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 RentalMechanicalCostDO extends BaseDO { | |
| 27 | + | |
| 28 | + /** | |
| 29 | + * 记录ID,自增主键 | |
| 30 | + */ | |
| 31 | + @TableId | |
| 32 | + private Long id; | |
| 33 | + /** | |
| 34 | + * 机械名称 | |
| 35 | + */ | |
| 36 | + private String mechName; | |
| 37 | + /** | |
| 38 | + * 机械类型 | |
| 39 | + */ | |
| 40 | + private String mechType; | |
| 41 | + /** | |
| 42 | + * 租赁总价格 | |
| 43 | + */ | |
| 44 | + private BigDecimal rentalTotalPrice; | |
| 45 | + /** | |
| 46 | + * 数量 | |
| 47 | + */ | |
| 48 | + private Integer quantity; | |
| 49 | + /** | |
| 50 | + * 车牌号 | |
| 51 | + */ | |
| 52 | + private String licensePlate; | |
| 53 | + /** | |
| 54 | + * 车辆类别(如汽油、纯电新能源等) | |
| 55 | + */ | |
| 56 | + private String vehicleCategory; | |
| 57 | + /** | |
| 58 | + * 车辆类型(如大型客车、轻型栏板货车等) | |
| 59 | + */ | |
| 60 | + private String vehicleType; | |
| 61 | + /** | |
| 62 | + * 开始使用时间 | |
| 63 | + */ | |
| 64 | + private LocalDate startUseTime; | |
| 65 | + /** | |
| 66 | + * 使用时长(天) | |
| 67 | + */ | |
| 68 | + private Integer useDuration; | |
| 69 | + /** | |
| 70 | + * 结束使用时间 | |
| 71 | + */ | |
| 72 | + private LocalDate endUseTime; | |
| 73 | + /** | |
| 74 | + * 归属公司 | |
| 75 | + */ | |
| 76 | + private String companyName; | |
| 77 | + /** | |
| 78 | + * 归属公司ID | |
| 79 | + */ | |
| 80 | + private String companyId; | |
| 81 | + /** | |
| 82 | + * 部门id | |
| 83 | + */ | |
| 84 | + private Long deptId; | |
| 85 | + /** | |
| 86 | + * 班组ID数组(多选) | |
| 87 | + */ | |
| 88 | + private String teamIds; | |
| 89 | + /** | |
| 90 | + * 道路ID数组(多选) | |
| 91 | + */ | |
| 92 | + private String roadIds; | |
| 93 | + /** | |
| 94 | + * 备注 | |
| 95 | + */ | |
| 96 | + private String remark; | |
| 97 | + | |
| 98 | + | |
| 99 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/teambizdomainrel/TeamBizdomainRelDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel; | |
| 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("garden_team_bizdomain_rel") | |
| 16 | +@KeySequence("garden_team_bizdomain_rel_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 TeamBizdomainRelDO extends BaseDO { | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 记录ID,自增主键 | |
| 27 | + */ | |
| 28 | + @TableId | |
| 29 | + private Long id; | |
| 30 | + /** | |
| 31 | + * 业务表主键 | |
| 32 | + */ | |
| 33 | + private String busiId; | |
| 34 | + /** | |
| 35 | + * 班组编码 | |
| 36 | + */ | |
| 37 | + private String teamId; | |
| 38 | + /** | |
| 39 | + * 班组名称 | |
| 40 | + */ | |
| 41 | + private String teamName; | |
| 42 | + /** | |
| 43 | + * 班组名称 | |
| 44 | + */ | |
| 45 | + private Long weight; | |
| 46 | + /** | |
| 47 | + * 归属公司 | |
| 48 | + */ | |
| 49 | + private String companyName; | |
| 50 | + /** | |
| 51 | + * 归属公司ID | |
| 52 | + */ | |
| 53 | + private String companyId; | |
| 54 | + /** | |
| 55 | + * 业务类型 | |
| 56 | + */ | |
| 57 | + private String busiType; | |
| 58 | + | |
| 59 | + | |
| 60 | +} | |
| 0 | 61 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/assigntasks/AssignTasksMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.assigntasks; | |
| 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.garden.dal.dataobject.assigntasks.AssignTasksDO; | |
| 9 | +import org.apache.ibatis.annotations.Mapper; | |
| 10 | +import com.zteits.urbanops.module.garden.controller.admin.assigntasks.vo.*; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 派单任务主表(记录派单任务基本信息) Mapper | |
| 14 | + * | |
| 15 | + * @author 超级管理员 | |
| 16 | + */ | |
| 17 | +@Mapper | |
| 18 | +public interface AssignTasksMapper extends BaseMapperX<AssignTasksDO> { | |
| 19 | + | |
| 20 | + default PageResult<AssignTasksDO> selectPage(AssignTasksPageReqVO reqVO) { | |
| 21 | + return selectPage(reqVO, new LambdaQueryWrapperX<AssignTasksDO>() | |
| 22 | + .likeIfPresent(AssignTasksDO::getTaskName, reqVO.getTaskName()) | |
| 23 | + .eqIfPresent(AssignTasksDO::getTaskType, reqVO.getTaskType()) | |
| 24 | + .eqIfPresent(AssignTasksDO::getDeadline, reqVO.getDeadline()) | |
| 25 | + .eqIfPresent(AssignTasksDO::getTemplateFile, reqVO.getTemplateFile()) | |
| 26 | + .eqIfPresent(AssignTasksDO::getParentFinish, reqVO.getParentFinish()) | |
| 27 | + .betweenIfPresent(AssignTasksDO::getFinishTime, reqVO.getFinishTime()) | |
| 28 | + .eqIfPresent(AssignTasksDO::getNote, reqVO.getNote()) | |
| 29 | + .eqIfPresent(AssignTasksDO::getCreator, reqVO.getCreator()) | |
| 30 | + .betweenIfPresent(AssignTasksDO::getCreateTime, reqVO.getCreateTime()) | |
| 31 | + .eqIfPresent(AssignTasksDO::getUpdater, reqVO.getUpdater()) | |
| 32 | + .betweenIfPresent(AssignTasksDO::getDeadline, reqVO.getDeadline()) | |
| 33 | + .orderByDesc(AssignTasksDO::getId)); | |
| 34 | + } | |
| 35 | + | |
| 36 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/assigntasksinfo/AssignTasksInfoMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.assigntasksinfo; | |
| 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.garden.dal.dataobject.assigntasksinfo.AssignTasksInfoDO; | |
| 9 | +import org.apache.ibatis.annotations.Mapper; | |
| 10 | +import com.zteits.urbanops.module.garden.controller.admin.assigntasksinfo.vo.*; | |
| 11 | +import org.apache.ibatis.annotations.Param; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * 派单任务-单位关联表(记录单位接收派单后的执行详情) Mapper | |
| 15 | + * | |
| 16 | + * @author 超级管理员 | |
| 17 | + */ | |
| 18 | +@Mapper | |
| 19 | +public interface AssignTasksInfoMapper extends BaseMapperX<AssignTasksInfoDO> { | |
| 20 | + | |
| 21 | + default PageResult<AssignTasksInfoDO> selectPage(AssignTasksInfoPageReqVO reqVO) { | |
| 22 | + return selectPage(reqVO, new LambdaQueryWrapperX<AssignTasksInfoDO>() | |
| 23 | + .eqIfPresent(AssignTasksInfoDO::getTaskId, reqVO.getTaskId()) | |
| 24 | + .eqIfPresent(AssignTasksInfoDO::getCompanyId, reqVO.getCompanyId()) | |
| 25 | + .likeIfPresent(AssignTasksInfoDO::getCompanyName, reqVO.getCompanyName()) | |
| 26 | + .eqIfPresent(AssignTasksInfoDO::getWritePersonId, reqVO.getWritePersonId()) | |
| 27 | + .eqIfPresent(AssignTasksInfoDO::getWritePerson, reqVO.getWritePerson()) | |
| 28 | + .eqIfPresent(AssignTasksInfoDO::getWritePersonPhone, reqVO.getWritePersonPhone()) | |
| 29 | + .betweenIfPresent(AssignTasksInfoDO::getWriteTime, reqVO.getWriteTime()) | |
| 30 | + .eqIfPresent(AssignTasksInfoDO::getFinish, reqVO.getFinish()) | |
| 31 | + .eqIfPresent(AssignTasksInfoDO::getIsOverdue, reqVO.getIsOverdue()) | |
| 32 | + .eqIfPresent(AssignTasksInfoDO::getDataFile, reqVO.getDataFile()) | |
| 33 | + .eqIfPresent(AssignTasksInfoDO::getRushNum, reqVO.getRushNum()) | |
| 34 | + .eqIfPresent(AssignTasksInfoDO::getNewFlag, reqVO.getNewFlag()) | |
| 35 | + .betweenIfPresent(AssignTasksInfoDO::getNewFlagTime, reqVO.getNewFlagTime()) | |
| 36 | + .eqIfPresent(AssignTasksInfoDO::getRejectRemark, reqVO.getRejectRemark()) | |
| 37 | + .eqIfPresent(AssignTasksInfoDO::getConfirm, reqVO.getConfirm()) | |
| 38 | + .betweenIfPresent(AssignTasksInfoDO::getConfirmTime, reqVO.getConfirmTime()) | |
| 39 | + .eqIfPresent(AssignTasksInfoDO::getCreator, reqVO.getCreator()) | |
| 40 | + .betweenIfPresent(AssignTasksInfoDO::getCreateTime, reqVO.getCreateTime()) | |
| 41 | + .eqIfPresent(AssignTasksInfoDO::getUpdater, reqVO.getUpdater()) | |
| 42 | + .eqIfPresent(AssignTasksInfoDO::getRemark, reqVO.getRemark()) | |
| 43 | + .eqIfPresent(AssignTasksInfoDO::getIsReject, reqVO.getIsReject()) | |
| 44 | + .orderByDesc(AssignTasksInfoDO::getId)); | |
| 45 | + } | |
| 46 | + | |
| 47 | + /** | |
| 48 | + * 删除派单任务-单位关联(记录单位接收派单后的执行详情) | |
| 49 | + * | |
| 50 | + * @param ids 派单任务-单位关联(记录单位接收派单后的执行详情)ID | |
| 51 | + * @return 结果 | |
| 52 | + */ | |
| 53 | + public int deleteAssignTaskInfoByTaskId(List<Long> ids); | |
| 54 | + | |
| 55 | + /** | |
| 56 | + * 批量更新“是否超时”字段 | |
| 57 | + */ | |
| 58 | + public int batchUpdateIsOverdue(@Param("list") List<AssignTasksInfoDO> taskInfoList); | |
| 59 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/departmentcost/DepartmentCostMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.departmentcost; | |
| 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.garden.dal.dataobject.departmentcost.DepartmentCostDO; | |
| 9 | +import org.apache.ibatis.annotations.Mapper; | |
| 10 | +import com.zteits.urbanops.module.garden.controller.admin.departmentcost.vo.*; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 部门费用录入 Mapper | |
| 14 | + * | |
| 15 | + * @author 超级管理员 | |
| 16 | + */ | |
| 17 | +@Mapper | |
| 18 | +public interface DepartmentCostMapper extends BaseMapperX<DepartmentCostDO> { | |
| 19 | + | |
| 20 | + default PageResult<DepartmentCostDO> selectPage(DepartmentCostPageReqVO reqVO) { | |
| 21 | + return selectPage(reqVO, new LambdaQueryWrapperX<DepartmentCostDO>() | |
| 22 | + .eqIfPresent(DepartmentCostDO::getSalaryMonth, reqVO.getSalaryMonth()) | |
| 23 | + .likeIfPresent(DepartmentCostDO::getExpenseName, reqVO.getExpenseName()) | |
| 24 | + .likeIfPresent(DepartmentCostDO::getDepartmentName, reqVO.getDepartmentName()) | |
| 25 | + .eqIfPresent(DepartmentCostDO::getPersonCount, reqVO.getPersonCount()) | |
| 26 | + .eqIfPresent(DepartmentCostDO::getDeptTotalCost, reqVO.getDeptTotalCost()) | |
| 27 | + .likeIfPresent(DepartmentCostDO::getCompanyName, reqVO.getCompanyName()) | |
| 28 | + .eqIfPresent(DepartmentCostDO::getCompanyId, reqVO.getCompanyId()) | |
| 29 | + .eqIfPresent(DepartmentCostDO::getDeptId, reqVO.getDeptId()) | |
| 30 | + .eqIfPresent(DepartmentCostDO::getRemark, reqVO.getRemark()) | |
| 31 | + .betweenIfPresent(DepartmentCostDO::getCreateTime, reqVO.getCreateTime()) | |
| 32 | + .orderByDesc(DepartmentCostDO::getId)); | |
| 33 | + } | |
| 34 | + | |
| 35 | +} | |
| 0 | 36 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/mechanicalcost/MechanicalCostMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.mechanicalcost; | |
| 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.garden.dal.dataobject.mechanicalcost.MechanicalCostDO; | |
| 9 | +import org.apache.ibatis.annotations.Mapper; | |
| 10 | +import com.zteits.urbanops.module.garden.controller.admin.mechanicalcost.vo.*; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 自有机械费用录入 Mapper | |
| 14 | + * | |
| 15 | + * @author 超级管理员 | |
| 16 | + */ | |
| 17 | +@Mapper | |
| 18 | +public interface MechanicalCostMapper extends BaseMapperX<MechanicalCostDO> { | |
| 19 | + | |
| 20 | + default PageResult<MechanicalCostDO> selectPage(MechanicalCostPageReqVO reqVO) { | |
| 21 | + return selectPage(reqVO, new LambdaQueryWrapperX<MechanicalCostDO>() | |
| 22 | + .eqIfPresent(MechanicalCostDO::getMechType, reqVO.getMechType()) | |
| 23 | + .eqIfPresent(MechanicalCostDO::getMechCode, reqVO.getMechCode()) | |
| 24 | + .likeIfPresent(MechanicalCostDO::getMechName, reqVO.getMechName()) | |
| 25 | + .eqIfPresent(MechanicalCostDO::getMechCategory, reqVO.getMechCategory()) | |
| 26 | + .eqIfPresent(MechanicalCostDO::getUnitPrice, reqVO.getUnitPrice()) | |
| 27 | + .eqIfPresent(MechanicalCostDO::getQuantity, reqVO.getQuantity()) | |
| 28 | + .eqIfPresent(MechanicalCostDO::getLicensePlate, reqVO.getLicensePlate()) | |
| 29 | + .eqIfPresent(MechanicalCostDO::getVehicleCategory, reqVO.getVehicleCategory()) | |
| 30 | + .eqIfPresent(MechanicalCostDO::getVehicleType, reqVO.getVehicleType()) | |
| 31 | + .betweenIfPresent(MechanicalCostDO::getStartUseTime, reqVO.getStartUseTime()) | |
| 32 | + .eqIfPresent(MechanicalCostDO::getServiceLife, reqVO.getServiceLife()) | |
| 33 | + .betweenIfPresent(MechanicalCostDO::getEndUseTime, reqVO.getEndUseTime()) | |
| 34 | + .likeIfPresent(MechanicalCostDO::getCompanyName, reqVO.getCompanyName()) | |
| 35 | + .eqIfPresent(MechanicalCostDO::getCompanyId, reqVO.getCompanyId()) | |
| 36 | + .eqIfPresent(MechanicalCostDO::getDeptId, reqVO.getDeptId()) | |
| 37 | + .eqIfPresent(MechanicalCostDO::getRemark, reqVO.getRemark()) | |
| 38 | + .betweenIfPresent(MechanicalCostDO::getCreateTime, reqVO.getCreateTime()) | |
| 39 | + .orderByDesc(MechanicalCostDO::getId)); | |
| 40 | + } | |
| 41 | + | |
| 42 | +} | |
| 0 | 43 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/mechanicaldepreciation/MechanicalDepreciationMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.mechanicaldepreciation; | |
| 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.garden.dal.dataobject.mechanicaldepreciation.MechanicalDepreciationDO; | |
| 9 | +import org.apache.ibatis.annotations.Mapper; | |
| 10 | +import com.zteits.urbanops.module.garden.controller.admin.mechanicaldepreciation.vo.*; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 自有机械折旧子 Mapper | |
| 14 | + * | |
| 15 | + * @author 超级管理员 | |
| 16 | + */ | |
| 17 | +@Mapper | |
| 18 | +public interface MechanicalDepreciationMapper extends BaseMapperX<MechanicalDepreciationDO> { | |
| 19 | + | |
| 20 | + default PageResult<MechanicalDepreciationDO> selectPage(MechanicalDepreciationPageReqVO reqVO) { | |
| 21 | + return selectPage(reqVO, new LambdaQueryWrapperX<MechanicalDepreciationDO>() | |
| 22 | + .eqIfPresent(MechanicalDepreciationDO::getMechId, reqVO.getMechId()) | |
| 23 | + .eqIfPresent(MechanicalDepreciationDO::getDepreciationPeriod, reqVO.getDepreciationPeriod()) | |
| 24 | + .eqIfPresent(MechanicalDepreciationDO::getOriginalValue, reqVO.getOriginalValue()) | |
| 25 | + .eqIfPresent(MechanicalDepreciationDO::getNetValue, reqVO.getNetValue()) | |
| 26 | + .eqIfPresent(MechanicalDepreciationDO::getDepreciationAmount, reqVO.getDepreciationAmount()) | |
| 27 | + .eqIfPresent(MechanicalDepreciationDO::getAccumulatedDepreciation, reqVO.getAccumulatedDepreciation()) | |
| 28 | + .eqIfPresent(MechanicalDepreciationDO::getDepreciationMethod, reqVO.getDepreciationMethod()) | |
| 29 | + .eqIfPresent(MechanicalDepreciationDO::getResidualRate, reqVO.getResidualRate()) | |
| 30 | + .eqIfPresent(MechanicalDepreciationDO::getServiceLife, reqVO.getServiceLife()) | |
| 31 | + .eqIfPresent(MechanicalDepreciationDO::getRemainingPeriods, reqVO.getRemainingPeriods()) | |
| 32 | + .eqIfPresent(MechanicalDepreciationDO::getRemark, reqVO.getRemark()) | |
| 33 | + .betweenIfPresent(MechanicalDepreciationDO::getCreateTime, reqVO.getCreateTime()) | |
| 34 | + .orderByDesc(MechanicalDepreciationDO::getId)); | |
| 35 | + } | |
| 36 | + | |
| 37 | +} | |
| 0 | 38 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/personalcost/PersonalCostMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.personalcost; | |
| 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.garden.dal.dataobject.personalcost.PersonalCostDO; | |
| 9 | +import org.apache.ibatis.annotations.Mapper; | |
| 10 | +import com.zteits.urbanops.module.garden.controller.admin.personalcost.vo.*; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 人员费用录入 - 个人费用 Mapper | |
| 14 | + * | |
| 15 | + * @author 超级管理员 | |
| 16 | + */ | |
| 17 | +@Mapper | |
| 18 | +public interface PersonalCostMapper extends BaseMapperX<PersonalCostDO> { | |
| 19 | + | |
| 20 | + default PageResult<PersonalCostDO> selectPage(PersonalCostPageReqVO reqVO) { | |
| 21 | + return selectPage(reqVO, new LambdaQueryWrapperX<PersonalCostDO>() | |
| 22 | + .eqIfPresent(PersonalCostDO::getSalaryMonth, reqVO.getSalaryMonth()) | |
| 23 | + .likeIfPresent(PersonalCostDO::getName, reqVO.getName()) | |
| 24 | + .eqIfPresent(PersonalCostDO::getSalaryAmount, reqVO.getSalaryAmount()) | |
| 25 | + .likeIfPresent(PersonalCostDO::getPostName, reqVO.getPostName()) | |
| 26 | + .eqIfPresent(PersonalCostDO::getPostCategory, reqVO.getPostCategory()) | |
| 27 | + .likeIfPresent(PersonalCostDO::getCompanyName, reqVO.getCompanyName()) | |
| 28 | + .eqIfPresent(PersonalCostDO::getCompanyId, reqVO.getCompanyId()) | |
| 29 | + .eqIfPresent(PersonalCostDO::getDeptId, reqVO.getDeptId()) | |
| 30 | + .eqIfPresent(PersonalCostDO::getRemark, reqVO.getRemark()) | |
| 31 | + .betweenIfPresent(PersonalCostDO::getCreateTime, reqVO.getCreateTime()) | |
| 32 | + .orderByDesc(PersonalCostDO::getId)); | |
| 33 | + } | |
| 34 | + | |
| 35 | +} | |
| 0 | 36 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/rentalmechanicalcost/RentalMechanicalCostMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.rentalmechanicalcost; | |
| 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.garden.dal.dataobject.rentalmechanicalcost.RentalMechanicalCostDO; | |
| 9 | +import org.apache.ibatis.annotations.Mapper; | |
| 10 | +import com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo.*; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 租赁机械费用录入 Mapper | |
| 14 | + * | |
| 15 | + * @author 超级管理员 | |
| 16 | + */ | |
| 17 | +@Mapper | |
| 18 | +public interface RentalMechanicalCostMapper extends BaseMapperX<RentalMechanicalCostDO> { | |
| 19 | + | |
| 20 | + default PageResult<RentalMechanicalCostDO> selectPage(RentalMechanicalCostPageReqVO reqVO) { | |
| 21 | + return selectPage(reqVO, new LambdaQueryWrapperX<RentalMechanicalCostDO>() | |
| 22 | + .likeIfPresent(RentalMechanicalCostDO::getMechName, reqVO.getMechName()) | |
| 23 | + .eqIfPresent(RentalMechanicalCostDO::getMechType, reqVO.getMechType()) | |
| 24 | + .eqIfPresent(RentalMechanicalCostDO::getRentalTotalPrice, reqVO.getRentalTotalPrice()) | |
| 25 | + .eqIfPresent(RentalMechanicalCostDO::getQuantity, reqVO.getQuantity()) | |
| 26 | + .eqIfPresent(RentalMechanicalCostDO::getLicensePlate, reqVO.getLicensePlate()) | |
| 27 | + .eqIfPresent(RentalMechanicalCostDO::getVehicleCategory, reqVO.getVehicleCategory()) | |
| 28 | + .eqIfPresent(RentalMechanicalCostDO::getVehicleType, reqVO.getVehicleType()) | |
| 29 | + .betweenIfPresent(RentalMechanicalCostDO::getStartUseTime, reqVO.getStartUseTime()) | |
| 30 | + .eqIfPresent(RentalMechanicalCostDO::getUseDuration, reqVO.getUseDuration()) | |
| 31 | + .betweenIfPresent(RentalMechanicalCostDO::getEndUseTime, reqVO.getEndUseTime()) | |
| 32 | + .likeIfPresent(RentalMechanicalCostDO::getCompanyName, reqVO.getCompanyName()) | |
| 33 | + .eqIfPresent(RentalMechanicalCostDO::getCompanyId, reqVO.getCompanyId()) | |
| 34 | + .eqIfPresent(RentalMechanicalCostDO::getDeptId, reqVO.getDeptId()) | |
| 35 | + .eqIfPresent(RentalMechanicalCostDO::getTeamIds, reqVO.getTeamIds()) | |
| 36 | + .eqIfPresent(RentalMechanicalCostDO::getRoadIds, reqVO.getRoadIds()) | |
| 37 | + .eqIfPresent(RentalMechanicalCostDO::getRemark, reqVO.getRemark()) | |
| 38 | + .betweenIfPresent(RentalMechanicalCostDO::getCreateTime, reqVO.getCreateTime()) | |
| 39 | + .orderByDesc(RentalMechanicalCostDO::getId)); | |
| 40 | + } | |
| 41 | + | |
| 42 | +} | |
| 0 | 43 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/teambizdomainrel/TeamBizdomainRelMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.teambizdomainrel; | |
| 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.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | |
| 9 | +import org.apache.ibatis.annotations.Mapper; | |
| 10 | +import com.zteits.urbanops.module.garden.controller.admin.teambizdomainrel.vo.*; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 班组关联 Mapper | |
| 14 | + * | |
| 15 | + * @author 超级管理员 | |
| 16 | + */ | |
| 17 | +@Mapper | |
| 18 | +public interface TeamBizdomainRelMapper extends BaseMapperX<TeamBizdomainRelDO> { | |
| 19 | + | |
| 20 | + default PageResult<TeamBizdomainRelDO> selectPage(TeamBizdomainRelPageReqVO reqVO) { | |
| 21 | + return selectPage(reqVO, new LambdaQueryWrapperX<TeamBizdomainRelDO>() | |
| 22 | + .eqIfPresent(TeamBizdomainRelDO::getBusiId, reqVO.getBusiId()) | |
| 23 | + .eqIfPresent(TeamBizdomainRelDO::getTeamId, reqVO.getTeamId()) | |
| 24 | + .likeIfPresent(TeamBizdomainRelDO::getTeamName, reqVO.getTeamName()) | |
| 25 | + .eqIfPresent(TeamBizdomainRelDO::getWeight, reqVO.getWeight()) | |
| 26 | + .likeIfPresent(TeamBizdomainRelDO::getCompanyName, reqVO.getCompanyName()) | |
| 27 | + .eqIfPresent(TeamBizdomainRelDO::getCompanyId, reqVO.getCompanyId()) | |
| 28 | + .betweenIfPresent(TeamBizdomainRelDO::getCreateTime, reqVO.getCreateTime()) | |
| 29 | + .eqIfPresent(TeamBizdomainRelDO::getBusiType, reqVO.getBusiType()) | |
| 30 | + .orderByDesc(TeamBizdomainRelDO::getId)); | |
| 31 | + } | |
| 32 | + | |
| 33 | +} | |
| 0 | 34 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/enums/AssignTasksConstants.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.enums; | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * @Classname AssignTasksConstants | |
| 5 | + * @Description 派单静态数据 | |
| 6 | + * @Date 2025/11/16 16:43 | |
| 7 | + * @Created by wangqian | |
| 8 | + */ | |
| 9 | +public class AssignTasksConstants { | |
| 10 | + | |
| 11 | + /*初始状态*/ | |
| 12 | + public static final Integer ASSIGN_TASK_FINISH_0 = 0; | |
| 13 | + /* 完成*/ | |
| 14 | + public static final Integer ASSIGN_TASK_FINISH_1 = 1; | |
| 15 | + | |
| 16 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/enums/CostFeeConstants.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.enums; | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * @Classname CostFeeConstants | |
| 5 | + * @Description 人机材 | |
| 6 | + * @Date 2025/11/19 20:42 | |
| 7 | + * @Created by wangqian | |
| 8 | + */ | |
| 9 | +public class CostFeeConstants { | |
| 10 | + | |
| 11 | + public static final String COSTFEE_WATER = "costFree_water"; | |
| 12 | + | |
| 13 | + public static final String COSTFEE_PERSONAL = "costFree_presonal"; | |
| 14 | + | |
| 15 | + public static final String COSTFEE_DEPARTMENT = "costFee_department"; | |
| 16 | + | |
| 17 | + public static final String COSTFEE_GARDENWASTE = "costFee_gardenWaste"; | |
| 18 | + | |
| 19 | + public static final String COSTFEE_MECHANICAL = "costFee_mechanical"; | |
| 20 | + | |
| 21 | + public static final String COSTFEE_RENTALMECHANICAL = "costFee_rentalmechanical"; | |
| 22 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/enums/ErrorCodeConstants.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.enums; | |
| 2 | + | |
| 3 | + | |
| 4 | +import com.zteits.urbanops.framework.common.exception.ErrorCode; | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * ERP 错误码枚举类 | |
| 8 | + * <p> | |
| 9 | + * erp 系统,使用 1-100-000-000 段 | |
| 10 | + */ | |
| 11 | +public interface ErrorCodeConstants { | |
| 12 | + | |
| 13 | + // ========== server 派单 1-100-001-000 ========== | |
| 14 | + ErrorCode ASSIGN_TASKS_NOT_EXISTS = new ErrorCode(1-100-001-000, "派单任务主表(记录派单任务基本信息)不存在"); | |
| 15 | + | |
| 16 | + ErrorCode ASSIGN_TASKS_NOT_EXISTS_001 = new ErrorCode(1-100-001-001, "派单任务主表(记录派单任务基本信息)不存在"); | |
| 17 | + ErrorCode ASSIGN_TASKS_NOT_EXISTS_002 = new ErrorCode(1-100-001-002, "未全部完成,不能确认"); | |
| 18 | + | |
| 19 | + ErrorCode ASSIGN_TASKS_INFO_NOT_EXISTS = new ErrorCode(1-100-002-000, "派发单位不能为空"); | |
| 20 | + | |
| 21 | + ErrorCode ASSIGN_TASKS_INFO_NOT_EXISTS_100 = new ErrorCode(1-100-002-100, "用户未登录"); | |
| 22 | + | |
| 23 | + ErrorCode ASSIGN_TASKS_INFO_NOT_EXISTS_001 = new ErrorCode(1-100-002-001, "派发单位不能为空"); | |
| 24 | + | |
| 25 | + ErrorCode ASSIGN_TASKS_INFO_NOT_EXISTS_002 = new ErrorCode(1-100-002-002, "派单已完成,不允许删除"); | |
| 26 | + | |
| 27 | + ErrorCode ASSIGN_TASKS_INFO_NOT_EXISTS_003 = new ErrorCode(1-100-002-003, "更新派单任务失败:任务ID不能为空"); | |
| 28 | + | |
| 29 | + // ========== 人机材料 1-100-003-000========== | |
| 30 | + | |
| 31 | + ErrorCode COST_FEE_NOT_EXISTS = new ErrorCode(1-100-003-000, "费用已录入"); | |
| 32 | + | |
| 33 | + // ========== 部门费用费用 1-100-005-000========== | |
| 34 | + ErrorCode DEPARTMENT_COST_NOT_EXISTS_01 = new ErrorCode(1-100-003-001, "部门费用为空"); | |
| 35 | + | |
| 36 | + // ========== 人员费用 1-100-005-000========== | |
| 37 | + ErrorCode PERSONAL_COST_NOT_EXISTS = new ErrorCode(1-100-004-000, "人员费用为空"); | |
| 38 | + | |
| 39 | + ErrorCode PERSONAL_COST_NOT_EXISTS_001 = new ErrorCode(1-100-004-001, "参数错误"); | |
| 40 | + | |
| 41 | + // ========== 自有机械材料 1-100-005-000========== | |
| 42 | + ErrorCode MECHANICAL_COST_NOT_EXISTS = new ErrorCode(1-100-005-000, "费用已录入"); | |
| 43 | + ErrorCode MECHANICAL_COST_NOT_EXISTS_001 = new ErrorCode(1-100-006-001, "参数错误"); | |
| 44 | + | |
| 45 | + // ========== 自有机械折旧 1-100-006-000========== | |
| 46 | + ErrorCode MECHANICAL_DEPRECIATION_NOT_EXISTS_001 = new ErrorCode(1-100-006-001, "参数错误"); | |
| 47 | + | |
| 48 | + | |
| 49 | + // ========== 租赁机械 1-100-007-000========== | |
| 50 | + ErrorCode RENTAL_MECHANICAL_COST_NOT_EXISTS = new ErrorCode(1-100-007-000, "费用已录入"); | |
| 51 | + | |
| 52 | + | |
| 53 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/assigntasks/AssignTasksService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.assigntasks; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | +import jakarta.validation.*; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.assigntasks.vo.*; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.assigntasks.AssignTasksDO; | |
| 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 AssignTasksService { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 创建派单任务主表(记录派单任务基本信息) | |
| 19 | + * | |
| 20 | + * @param createReqVO 创建信息 | |
| 21 | + * @return 编号 | |
| 22 | + */ | |
| 23 | + Long createAssignTasks(@Valid AssignTasksSaveReqVO createReqVO); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 更新派单任务主表(记录派单任务基本信息) | |
| 27 | + * | |
| 28 | + * @param updateReqVO 更新信息 | |
| 29 | + */ | |
| 30 | + void updateAssignTasks(@Valid AssignTasksSaveReqVO updateReqVO); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 删除派单任务主表(记录派单任务基本信息) | |
| 34 | + * | |
| 35 | + * @param id 编号 | |
| 36 | + */ | |
| 37 | + void deleteAssignTasks(Long id); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 批量删除派单任务主表(记录派单任务基本信息) | |
| 41 | + * | |
| 42 | + * @param ids 编号 | |
| 43 | + */ | |
| 44 | + void deleteAssignTasksListByIds(List<Long> ids); | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 获得派单任务主表(记录派单任务基本信息) | |
| 48 | + * | |
| 49 | + * @param id 编号 | |
| 50 | + * @return 派单任务主表(记录派单任务基本信息) | |
| 51 | + */ | |
| 52 | + AssignTasksDO getAssignTasks(Long id); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 获得派单任务主表(记录派单任务基本信息)分页 | |
| 56 | + * | |
| 57 | + * @param pageReqVO 分页查询 | |
| 58 | + * @return 派单任务主表(记录派单任务基本信息)分页 | |
| 59 | + */ | |
| 60 | + PageResult<AssignTasksDO> getAssignTasksPage(AssignTasksPageReqVO pageReqVO); | |
| 61 | + | |
| 62 | + /** | |
| 63 | + * @Author wangqian | |
| 64 | + * @Description | |
| 65 | + * @Date 2025/11/17 23:02 | |
| 66 | + * @Param id | |
| 67 | + * @Return int | |
| 68 | + */ | |
| 69 | + public int confirmAssignTasksById(Long id); | |
| 70 | + | |
| 71 | + /** | |
| 72 | + * @Author wangqian | |
| 73 | + * @Description 超时定时任务处理 | |
| 74 | + * @Date 2025/11/17 23:02 | |
| 75 | + * @Param | |
| 76 | + * @Return int | |
| 77 | + */ | |
| 78 | + public int tasksOutTimeAuto(); | |
| 79 | + | |
| 80 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/assigntasks/AssignTasksServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.assigntasks; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
| 4 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
| 5 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 6 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 7 | +import com.zteits.urbanops.module.garden.controller.admin.assigntasks.vo.AssignTasksPageReqVO; | |
| 8 | +import com.zteits.urbanops.module.garden.controller.admin.assigntasks.vo.AssignTasksSaveReqVO; | |
| 9 | +import com.zteits.urbanops.module.garden.dal.dataobject.assigntasks.AssignTasksDO; | |
| 10 | +import com.zteits.urbanops.module.garden.dal.dataobject.assigntasksinfo.AssignTasksInfoDO; | |
| 11 | +import com.zteits.urbanops.module.garden.dal.mysql.assigntasks.AssignTasksMapper; | |
| 12 | +import com.zteits.urbanops.module.garden.dal.mysql.assigntasksinfo.AssignTasksInfoMapper; | |
| 13 | +import com.zteits.urbanops.module.garden.enums.AssignTasksConstants; | |
| 14 | +import com.zteits.urbanops.module.garden.service.assigntasksinfo.AssignTasksInfoService; | |
| 15 | +import jakarta.annotation.Resource; | |
| 16 | +import lombok.extern.slf4j.Slf4j; | |
| 17 | +import org.springframework.stereotype.Service; | |
| 18 | +import org.springframework.transaction.annotation.Transactional; | |
| 19 | +import org.springframework.util.CollectionUtils; | |
| 20 | +import org.springframework.validation.annotation.Validated; | |
| 21 | + | |
| 22 | +import java.time.LocalDateTime; | |
| 23 | +import java.util.ArrayList; | |
| 24 | +import java.util.List; | |
| 25 | + | |
| 26 | +import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 27 | +import static com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; | |
| 28 | +import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.*; | |
| 29 | + | |
| 30 | +/** | |
| 31 | + * 派单任务主表(记录派单任务基本信息) Service 实现类 | |
| 32 | + * | |
| 33 | + * @author 超级管理员 | |
| 34 | + */ | |
| 35 | +@Service | |
| 36 | +@Validated | |
| 37 | +@Slf4j | |
| 38 | +public class AssignTasksServiceImpl implements AssignTasksService { | |
| 39 | + | |
| 40 | + @Resource | |
| 41 | + private AssignTasksMapper assignTasksMapper; | |
| 42 | + | |
| 43 | + @Resource | |
| 44 | + private AssignTasksInfoMapper assiAssignTasksInfoMapper; | |
| 45 | + | |
| 46 | + @Resource | |
| 47 | + private AssignTasksInfoService assignTasksInfoService; | |
| 48 | + | |
| 49 | + | |
| 50 | + @Transactional(rollbackFor = Exception.class) | |
| 51 | + @Override | |
| 52 | + public Long createAssignTasks(AssignTasksSaveReqVO createReqVO) { | |
| 53 | + // 插入 | |
| 54 | + AssignTasksDO assignTasks = BeanUtils.toBean(createReqVO, AssignTasksDO.class); | |
| 55 | + assignTasksMapper.insert(assignTasks); | |
| 56 | + //保存单位明细 | |
| 57 | + String[] originalCompanyIds = createReqVO.getCompanyIds(); | |
| 58 | + if (originalCompanyIds == null || originalCompanyIds.length == 0) { | |
| 59 | + throw exception(ASSIGN_TASKS_NOT_EXISTS_001); | |
| 60 | + } | |
| 61 | + assignTasksInfoService.saveAssignTasksInfos(createReqVO.getCompanyIds(), assignTasks.getId()); | |
| 62 | + //保存单位明细 | |
| 63 | + | |
| 64 | + // 返回 | |
| 65 | + return assignTasks.getId(); | |
| 66 | + } | |
| 67 | + | |
| 68 | + @Transactional(rollbackFor = Exception.class) | |
| 69 | + @Override | |
| 70 | + public void updateAssignTasks(AssignTasksSaveReqVO updateReqVO) { | |
| 71 | + // 校验存在 | |
| 72 | + validateAssignTasksExists(updateReqVO.getId()); | |
| 73 | + // 更新 | |
| 74 | + AssignTasksDO updateObj = BeanUtils.toBean(updateReqVO, AssignTasksDO.class); | |
| 75 | + assignTasksMapper.updateById(updateObj); | |
| 76 | + | |
| 77 | + // add by wq 20251116 | |
| 78 | + String[] originalCompanyIds = updateReqVO.getCompanyIds(); | |
| 79 | + if (originalCompanyIds == null || originalCompanyIds.length == 0) { | |
| 80 | + throw exception(ASSIGN_TASKS_NOT_EXISTS_001); | |
| 81 | + } | |
| 82 | + | |
| 83 | + assignTasksInfoService.updateAssignTasksInfos(updateReqVO.getCompanyIds(), updateObj.getId()); | |
| 84 | + } | |
| 85 | + | |
| 86 | + @Override | |
| 87 | + public void deleteAssignTasks(Long id) { | |
| 88 | + // 校验存在 | |
| 89 | + validateAssignTasksExists(id); | |
| 90 | + // 删除 | |
| 91 | + assignTasksMapper.deleteById(id); | |
| 92 | + } | |
| 93 | + | |
| 94 | + @Override | |
| 95 | + @Transactional | |
| 96 | + public void deleteAssignTasksListByIds(List<Long> ids) { | |
| 97 | + // 删除 | |
| 98 | + assignTasksMapper.deleteByIds(ids); | |
| 99 | + //删除关联的明细 | |
| 100 | + assiAssignTasksInfoMapper.deleteAssignTaskInfoByTaskId(ids); | |
| 101 | + } | |
| 102 | + | |
| 103 | + | |
| 104 | + private void validateAssignTasksExists(Long id) { | |
| 105 | + if (assignTasksMapper.selectById(id) == null) { | |
| 106 | + throw exception(ASSIGN_TASKS_NOT_EXISTS); | |
| 107 | + } | |
| 108 | + } | |
| 109 | + | |
| 110 | + @Override | |
| 111 | + public AssignTasksDO getAssignTasks(Long id) { | |
| 112 | + return assignTasksMapper.selectById(id); | |
| 113 | + } | |
| 114 | + | |
| 115 | + @Override | |
| 116 | + public PageResult<AssignTasksDO> getAssignTasksPage(AssignTasksPageReqVO pageReqVO) { | |
| 117 | + return assignTasksMapper.selectPage(pageReqVO); | |
| 118 | + } | |
| 119 | + | |
| 120 | + | |
| 121 | + @Override | |
| 122 | + public int confirmAssignTasksById(Long id) { | |
| 123 | + // 获得用户基本信息 | |
| 124 | + AssignTasksDO assignTasks = assignTasksMapper.selectById(id); | |
| 125 | + | |
| 126 | + List<AssignTasksInfoDO> assignTaskInfoList = assiAssignTasksInfoMapper.selectList(AssignTasksInfoDO::getTaskId,assignTasks.getId()); | |
| 127 | + boolean allSubTaskFinished = assignTaskInfoList.stream() | |
| 128 | + .allMatch(subTask -> 1 == subTask.getFinish()); | |
| 129 | + | |
| 130 | + //所有都完成反馈 | |
| 131 | + if(allSubTaskFinished) { | |
| 132 | + assignTasks.setParentFinish(AssignTasksConstants.ASSIGN_TASK_FINISH_1); | |
| 133 | + assignTasks.setFinishTime(LocalDateTime.now()); | |
| 134 | + assignTasks.setUpdateTime(LocalDateTime.now()); | |
| 135 | + assignTasks.setUpdater(String.valueOf(getLoginUserId())); | |
| 136 | + assignTasksMapper.updateById(assignTasks); | |
| 137 | + } else { | |
| 138 | + throw exception(ASSIGN_TASKS_NOT_EXISTS_002); | |
| 139 | + } | |
| 140 | + return 1; | |
| 141 | + } | |
| 142 | + | |
| 143 | + @Override | |
| 144 | + public int tasksOutTimeAuto() { | |
| 145 | + //查询未完成的派单 | |
| 146 | + // 1. 初始化统计变量:记录更新成功的超时记录数 | |
| 147 | + int updatedCount = 0; | |
| 148 | + LocalDateTime now = LocalDateTime.now(); // 提前获取当前时间(同一批处理时间一致) | |
| 149 | + log.info("开始处理超时派单,当前时间:{}", now); | |
| 150 | + | |
| 151 | + try { | |
| 152 | + // 2. 查询所有“未完成的派单”(parentFinish=0) | |
| 153 | + List<AssignTasksDO> assignTasks = assignTasksMapper.selectList(AssignTasksDO::getParentFinish,0); | |
| 154 | + | |
| 155 | + if (CollectionUtils.isEmpty(assignTasks)) { | |
| 156 | + log.info("无未完成的派单,无需处理"); | |
| 157 | + return 0; | |
| 158 | + } | |
| 159 | + | |
| 160 | + List<AssignTasksInfoDO> timeoutTaskInfos = new ArrayList<>(); | |
| 161 | + | |
| 162 | + for (AssignTasksDO assignTasksDO : assignTasks) { | |
| 163 | + //查询所有符合条件的派单详情(taskId in 列表 + finish=0) | |
| 164 | + LambdaQueryWrapper<AssignTasksInfoDO> queryWrapper = Wrappers.lambdaQuery(); | |
| 165 | + queryWrapper.eq(AssignTasksInfoDO::getFinish, 0); | |
| 166 | + queryWrapper.eq(AssignTasksInfoDO::getTaskId, assignTasksDO.getId()); | |
| 167 | + queryWrapper.eq(AssignTasksInfoDO::getIsOverdue, 0); | |
| 168 | + List<AssignTasksInfoDO> taskInfoList = assiAssignTasksInfoMapper.selectList(queryWrapper); | |
| 169 | + if (CollectionUtils.isEmpty(taskInfoList)) { | |
| 170 | + log.info("未找到未完成的派单详情,无需处理"); | |
| 171 | + return 0; | |
| 172 | + } | |
| 173 | + | |
| 174 | + // 4. 筛选“已超时”的派单详情(截止时间 < 当前时间) | |
| 175 | + for (AssignTasksInfoDO taskInfo : taskInfoList) { | |
| 176 | + // 4.1 转换:将数据库的Date | |
| 177 | + LocalDateTime deadline = assignTasks.get(0).getDeadline(); | |
| 178 | + // 4.2 比较:截止时间早于当前时间 → 超时 | |
| 179 | + if (deadline.isBefore(now)) { | |
| 180 | + taskInfo.setIsOverdue(1); // 标记为超时 | |
| 181 | + timeoutTaskInfos.add(taskInfo); | |
| 182 | + } | |
| 183 | + } | |
| 184 | + } | |
| 185 | + | |
| 186 | + if (CollectionUtils.isEmpty(timeoutTaskInfos)) { | |
| 187 | + log.info("无超时的派单详情,无需更新"); | |
| 188 | + return 0; | |
| 189 | + } | |
| 190 | + | |
| 191 | + // 5. 优化:批量更新 | |
| 192 | + updatedCount = assiAssignTasksInfoMapper.batchUpdateIsOverdue(timeoutTaskInfos); | |
| 193 | + log.info("派单超时处理完成,共筛选出{}条超时记录,成功更新{}条", timeoutTaskInfos.size(), updatedCount); | |
| 194 | + | |
| 195 | + } catch (Exception e) { | |
| 196 | + log.error("处理超时派单时发生异常", e); | |
| 197 | + } | |
| 198 | + log.info("派单任务超时处理 end"+ LocalDateTime.now()); | |
| 199 | + return updatedCount; | |
| 200 | + } | |
| 201 | + | |
| 202 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/assigntasksinfo/AssignTasksInfoService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.assigntasksinfo; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | +import jakarta.validation.*; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.assigntasksinfo.vo.*; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.assigntasksinfo.AssignTasksInfoDO; | |
| 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 AssignTasksInfoService { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 创建派单任务-单位关联表(记录单位接收派单后的执行详情) | |
| 19 | + * | |
| 20 | + * @param createReqVO 创建信息 | |
| 21 | + * @return 编号 | |
| 22 | + */ | |
| 23 | + Long createAssignTasksInfo(@Valid AssignTasksInfoSaveReqVO createReqVO); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 更新派单任务-单位关联表(记录单位接收派单后的执行详情) | |
| 27 | + * | |
| 28 | + * @param updateReqVO 更新信息 | |
| 29 | + */ | |
| 30 | + void updateAssignTasksInfo(@Valid AssignTasksInfoSaveReqVO updateReqVO); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 删除派单任务-单位关联表(记录单位接收派单后的执行详情) | |
| 34 | + * | |
| 35 | + * @param id 编号 | |
| 36 | + */ | |
| 37 | + void deleteAssignTasksInfo(Long id); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 批量删除派单任务-单位关联表(记录单位接收派单后的执行详情) | |
| 41 | + * | |
| 42 | + * @param ids 编号 | |
| 43 | + */ | |
| 44 | + void deleteAssignTasksInfoListByIds(List<Long> ids); | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 获得派单任务-单位关联表(记录单位接收派单后的执行详情) | |
| 48 | + * | |
| 49 | + * @param id 编号 | |
| 50 | + * @return 派单任务-单位关联表(记录单位接收派单后的执行详情) | |
| 51 | + */ | |
| 52 | + AssignTasksInfoDO getAssignTasksInfo(Long id); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 获得派单任务-单位关联表(记录单位接收派单后的执行详情)分页 | |
| 56 | + * | |
| 57 | + * @param pageReqVO 分页查询 | |
| 58 | + * @return 派单任务-单位关联表(记录单位接收派单后的执行详情)分页 | |
| 59 | + */ | |
| 60 | + PageResult<AssignTasksInfoDO> getAssignTasksInfoPage(AssignTasksInfoPageReqVO pageReqVO); | |
| 61 | + | |
| 62 | + /** | |
| 63 | + * @Author wangqian | |
| 64 | + * @Description 同步保存单位派单详情 | |
| 65 | + * @Date 2025/11/16 17:07 | |
| 66 | + * @Param companyIds | |
| 67 | + * @param taskId | |
| 68 | + * @Return java.lang.Long | |
| 69 | + */ | |
| 70 | + public void saveAssignTasksInfos(String[] companyIds, Long taskId); | |
| 71 | + | |
| 72 | + public void updateAssignTasksInfos(String[] companyIds, Long taskId); | |
| 73 | + | |
| 74 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/assigntasksinfo/AssignTasksInfoServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.assigntasksinfo; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 4 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.assigntasksinfo.vo.AssignTasksInfoPageReqVO; | |
| 6 | +import com.zteits.urbanops.module.garden.controller.admin.assigntasksinfo.vo.AssignTasksInfoSaveReqVO; | |
| 7 | +import com.zteits.urbanops.module.garden.dal.dataobject.assigntasksinfo.AssignTasksInfoDO; | |
| 8 | +import com.zteits.urbanops.module.garden.dal.mysql.assigntasksinfo.AssignTasksInfoMapper; | |
| 9 | +import jakarta.annotation.Resource; | |
| 10 | +import lombok.extern.slf4j.Slf4j; | |
| 11 | +import org.apache.commons.lang3.StringUtils; | |
| 12 | +import org.springframework.stereotype.Service; | |
| 13 | +import org.springframework.validation.annotation.Validated; | |
| 14 | + | |
| 15 | +import java.util.*; | |
| 16 | +import java.util.stream.Collectors; | |
| 17 | + | |
| 18 | +import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 19 | +import static com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; | |
| 20 | +import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.*; | |
| 21 | + | |
| 22 | +/** | |
| 23 | + * 派单任务-单位关联表(记录单位接收派单后的执行详情) Service 实现类 | |
| 24 | + * | |
| 25 | + * @author 超级管理员 | |
| 26 | + */ | |
| 27 | +@Service | |
| 28 | +@Validated | |
| 29 | +@Slf4j | |
| 30 | +public class AssignTasksInfoServiceImpl implements AssignTasksInfoService { | |
| 31 | + | |
| 32 | + @Resource | |
| 33 | + private AssignTasksInfoMapper assignTasksInfoMapper; | |
| 34 | + | |
| 35 | + @Override | |
| 36 | + public Long createAssignTasksInfo(AssignTasksInfoSaveReqVO createReqVO) { | |
| 37 | + // 插入 | |
| 38 | + AssignTasksInfoDO assignTasksInfo = BeanUtils.toBean(createReqVO, AssignTasksInfoDO.class); | |
| 39 | + assignTasksInfoMapper.insert(assignTasksInfo); | |
| 40 | + | |
| 41 | + // 返回 | |
| 42 | + return assignTasksInfo.getId(); | |
| 43 | + } | |
| 44 | + | |
| 45 | + @Override | |
| 46 | + public void updateAssignTasksInfo(AssignTasksInfoSaveReqVO updateReqVO) { | |
| 47 | + // 校验存在 | |
| 48 | + validateAssignTasksInfoExists(updateReqVO.getId()); | |
| 49 | + // 更新 | |
| 50 | + AssignTasksInfoDO updateObj = BeanUtils.toBean(updateReqVO, AssignTasksInfoDO.class); | |
| 51 | + assignTasksInfoMapper.updateById(updateObj); | |
| 52 | + } | |
| 53 | + | |
| 54 | + @Override | |
| 55 | + public void deleteAssignTasksInfo(Long id) { | |
| 56 | + // 校验存在 | |
| 57 | + validateAssignTasksInfoExists(id); | |
| 58 | + // 删除 | |
| 59 | + assignTasksInfoMapper.deleteById(id); | |
| 60 | + } | |
| 61 | + | |
| 62 | + @Override | |
| 63 | + public void deleteAssignTasksInfoListByIds(List<Long> ids) { | |
| 64 | + // 删除 | |
| 65 | + assignTasksInfoMapper.deleteByIds(ids); | |
| 66 | + } | |
| 67 | + | |
| 68 | + | |
| 69 | + private void validateAssignTasksInfoExists(Long id) { | |
| 70 | + if (assignTasksInfoMapper.selectById(id) == null) { | |
| 71 | + throw exception(ASSIGN_TASKS_INFO_NOT_EXISTS); | |
| 72 | + } | |
| 73 | + } | |
| 74 | + | |
| 75 | + @Override | |
| 76 | + public AssignTasksInfoDO getAssignTasksInfo(Long id) { | |
| 77 | + return assignTasksInfoMapper.selectById(id); | |
| 78 | + } | |
| 79 | + | |
| 80 | + @Override | |
| 81 | + public PageResult<AssignTasksInfoDO> getAssignTasksInfoPage(AssignTasksInfoPageReqVO pageReqVO) { | |
| 82 | + return assignTasksInfoMapper.selectPage(pageReqVO); | |
| 83 | + } | |
| 84 | + | |
| 85 | + @Override | |
| 86 | + public void saveAssignTasksInfos(String[] companyIds, Long taskId) { | |
| 87 | + // 获得用户基本信息 | |
| 88 | + String userId = String.valueOf(getLoginUserId()); | |
| 89 | + if (companyIds != null && companyIds.length > 0) { | |
| 90 | + for (String companyId : companyIds) { | |
| 91 | + AssignTasksInfoSaveReqVO assignTaskInfo = new AssignTasksInfoSaveReqVO(); | |
| 92 | + assignTaskInfo.setCompanyId(companyId); | |
| 93 | + //assignTaskInfo.setCompanyName(CompanyConstant.getCompanyName(Long.parseLong(companyId))); | |
| 94 | + assignTaskInfo.setTaskId(taskId); | |
| 95 | + assignTaskInfo.setUpdater(userId); | |
| 96 | + AssignTasksInfoDO assignTasksInfo = BeanUtils.toBean(assignTaskInfo, AssignTasksInfoDO.class); | |
| 97 | + | |
| 98 | + assignTasksInfoMapper.insert(assignTasksInfo); | |
| 99 | + } | |
| 100 | + } | |
| 101 | + } | |
| 102 | + | |
| 103 | + @Override | |
| 104 | + public void updateAssignTasksInfos(String[] companyIds, Long taskId) { | |
| 105 | + // 1. 日志与入参校验(提前拦截无效参数) | |
| 106 | + log.info("开始更新派单任务的公司关联信息 | 任务ID:{},目标公司ID列表:{}", | |
| 107 | + taskId, Arrays.toString(companyIds)); | |
| 108 | + | |
| 109 | + if (taskId == null) { | |
| 110 | + log.error("更新派单任务失败:任务ID不能为空"); | |
| 111 | + throw exception(ASSIGN_TASKS_INFO_NOT_EXISTS_003); // 假设 PARAM_ERROR 是通用参数错误码,需替换为实际枚举 | |
| 112 | + } | |
| 113 | + | |
| 114 | + // 2. 获取当前登录用户(校验用户有效性) | |
| 115 | + Long loginUserId = getLoginUserId(); | |
| 116 | + | |
| 117 | + // 3. 预处理目标公司ID列表(避免重复转换,处理null场景) | |
| 118 | + List<String> targetCompanyIdStrs = Optional.ofNullable(companyIds) | |
| 119 | + .map(Arrays::asList) | |
| 120 | + .orElse(Collections.emptyList()) | |
| 121 | + .stream() | |
| 122 | + .filter(StringUtils::isNotBlank) // 过滤空字符串(避免无效数据) | |
| 123 | + .distinct() // 去重:避免重复添加同一公司 | |
| 124 | + .collect(Collectors.toList()); | |
| 125 | + | |
| 126 | + // 4. 查询该任务下已关联的派单记录 | |
| 127 | + List<AssignTasksInfoDO> existingAssignTaskInfos = assignTasksInfoMapper | |
| 128 | + .selectList(AssignTasksInfoDO::getTaskId, taskId); | |
| 129 | + log.info("当前任务已关联的派单记录数:{}", existingAssignTaskInfos.size()); | |
| 130 | + | |
| 131 | + // 4.1 提取已关联的公司ID(String类型,用于后续判断) | |
| 132 | + List<String> existingCompanyIdStrs = existingAssignTaskInfos.stream() | |
| 133 | + .map(info -> String.valueOf(info.getCompanyId())) // 统一转为String,避免类型不匹配 | |
| 134 | + .collect(Collectors.toList()); | |
| 135 | + | |
| 136 | + // 5. 处理需要删除的派单记录(不在目标列表中且未读的记录) | |
| 137 | + List<Long> needDeleteIds = new ArrayList<>(); | |
| 138 | + for (AssignTasksInfoDO existingTask : existingAssignTaskInfos) { | |
| 139 | + String existingCompanyIdStr = String.valueOf(existingTask.getCompanyId()); | |
| 140 | + // 目标列表不包含当前公司ID → 需要删除 | |
| 141 | + if (!targetCompanyIdStrs.contains(existingCompanyIdStr)) { | |
| 142 | + // 已读状态(finish=1)不允许删除 | |
| 143 | + if (Objects.equals(existingTask.getFinish(), 1)) { | |
| 144 | + log.error("删除派单失败:任务已读不允许删除 | 派单ID:{},公司ID:{}", | |
| 145 | + existingTask.getId(), existingCompanyIdStr); | |
| 146 | + throw exception(ASSIGN_TASKS_INFO_NOT_EXISTS_002); // 建议修改异常码语义为“已读任务不允许删除” | |
| 147 | + } | |
| 148 | + needDeleteIds.add(existingTask.getId()); | |
| 149 | + } | |
| 150 | + } | |
| 151 | + | |
| 152 | + // 5.1 批量删除(减少数据库交互) | |
| 153 | + if (!needDeleteIds.isEmpty()) { | |
| 154 | + this.deleteAssignTasksInfoListByIds(needDeleteIds); | |
| 155 | + log.info("批量删除派单记录成功 | 删除ID列表:{}", needDeleteIds); | |
| 156 | + } | |
| 157 | + | |
| 158 | + // 6. 处理需要新增的派单记录(目标列表中不存在于已关联列表的公司) | |
| 159 | + for (String targetCompanyId : targetCompanyIdStrs) { | |
| 160 | + if (!existingCompanyIdStrs.contains(targetCompanyId)) { | |
| 161 | + // 直接构建DO对象(跳过VO转换,减少开销) | |
| 162 | + AssignTasksInfoSaveReqVO assignTaskInfo = new AssignTasksInfoSaveReqVO(); | |
| 163 | + assignTaskInfo.setCompanyId(targetCompanyId); | |
| 164 | + //assignTaskInfo.setCompanyName(CompanyConstant.getCompanyName(Long.parseLong(companyId))); | |
| 165 | + assignTaskInfo.setTaskId(taskId); | |
| 166 | + assignTaskInfo.setCreator(String.valueOf(loginUserId)); | |
| 167 | + AssignTasksInfoDO assignTasksInfo = BeanUtils.toBean(assignTaskInfo, AssignTasksInfoDO.class); | |
| 168 | + | |
| 169 | + assignTasksInfoMapper.insert(assignTasksInfo); | |
| 170 | + | |
| 171 | + } | |
| 172 | + } | |
| 173 | + } | |
| 174 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/departmentcost/DepartmentCostService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.departmentcost; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | +import jakarta.validation.*; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.departmentcost.vo.*; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.departmentcost.DepartmentCostDO; | |
| 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 DepartmentCostService { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 创建部门费用录入 | |
| 19 | + * | |
| 20 | + * @param createReqVO 创建信息 | |
| 21 | + * @return 编号 | |
| 22 | + */ | |
| 23 | + Long createDepartmentCost(@Valid DepartmentCostSaveReqVO createReqVO); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 更新部门费用录入 | |
| 27 | + * | |
| 28 | + * @param updateReqVO 更新信息 | |
| 29 | + */ | |
| 30 | + void updateDepartmentCost(@Valid DepartmentCostSaveReqVO updateReqVO); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 删除部门费用录入 | |
| 34 | + * | |
| 35 | + * @param id 编号 | |
| 36 | + */ | |
| 37 | + void deleteDepartmentCost(Long id); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 批量删除部门费用录入 | |
| 41 | + * | |
| 42 | + * @param ids 编号 | |
| 43 | + */ | |
| 44 | + void deleteDepartmentCostListByIds(List<Long> ids); | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 获得部门费用录入 | |
| 48 | + * | |
| 49 | + * @param id 编号 | |
| 50 | + * @return 部门费用录入 | |
| 51 | + */ | |
| 52 | + DepartmentCostDO getDepartmentCost(Long id); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 获得部门费用录入分页 | |
| 56 | + * | |
| 57 | + * @param pageReqVO 分页查询 | |
| 58 | + * @return 部门费用录入分页 | |
| 59 | + */ | |
| 60 | + PageResult<DepartmentCostDO> getDepartmentCostPage(DepartmentCostPageReqVO pageReqVO); | |
| 61 | + | |
| 62 | +} | |
| 0 | 63 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/departmentcost/DepartmentCostServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.departmentcost; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
| 4 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
| 5 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 6 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 7 | +import com.zteits.urbanops.module.garden.controller.admin.departmentcost.vo.DepartmentCostPageReqVO; | |
| 8 | +import com.zteits.urbanops.module.garden.controller.admin.departmentcost.vo.DepartmentCostSaveReqVO; | |
| 9 | +import com.zteits.urbanops.module.garden.dal.dataobject.departmentcost.DepartmentCostDO; | |
| 10 | +import com.zteits.urbanops.module.garden.dal.mysql.departmentcost.DepartmentCostMapper; | |
| 11 | +import jakarta.annotation.Resource; | |
| 12 | +import org.springframework.stereotype.Service; | |
| 13 | +import org.springframework.util.CollectionUtils; | |
| 14 | +import org.springframework.validation.annotation.Validated; | |
| 15 | + | |
| 16 | +import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 17 | +import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.*; | |
| 18 | + | |
| 19 | + | |
| 20 | +import java.util.List; | |
| 21 | + | |
| 22 | +/** | |
| 23 | + * 部门费用录入 Service 实现类 | |
| 24 | + * | |
| 25 | + * @author 超级管理员 | |
| 26 | + */ | |
| 27 | +@Service | |
| 28 | +@Validated | |
| 29 | +public class DepartmentCostServiceImpl implements DepartmentCostService { | |
| 30 | + | |
| 31 | + @Resource | |
| 32 | + private DepartmentCostMapper departmentCostMapper; | |
| 33 | + | |
| 34 | + @Override | |
| 35 | + public Long createDepartmentCost(DepartmentCostSaveReqVO createReqVO) { | |
| 36 | + // 插入 | |
| 37 | + DepartmentCostDO departmentCost = BeanUtils.toBean(createReqVO, DepartmentCostDO.class); | |
| 38 | + | |
| 39 | + // add bt wq 20251119 插入增加校验 | |
| 40 | + LambdaQueryWrapper<DepartmentCostDO> queryWrapper = Wrappers.lambdaQuery(); | |
| 41 | + queryWrapper.eq(DepartmentCostDO::getSalaryMonth, departmentCost.getSalaryMonth()); | |
| 42 | + queryWrapper.eq(DepartmentCostDO::getExpenseName, departmentCost.getExpenseName()); | |
| 43 | + queryWrapper.eq(DepartmentCostDO::getCompanyId, departmentCost.getCompanyId()); | |
| 44 | + List<DepartmentCostDO> list = departmentCostMapper.selectList(queryWrapper); | |
| 45 | + if (!CollectionUtils.isEmpty(list)) { | |
| 46 | + throw exception(COST_FEE_NOT_EXISTS); | |
| 47 | + } | |
| 48 | + // add bt wq 20251119 插入增加校验 | |
| 49 | + | |
| 50 | + departmentCostMapper.insert(departmentCost); | |
| 51 | + | |
| 52 | + // 返回 | |
| 53 | + return departmentCost.getId(); | |
| 54 | + } | |
| 55 | + | |
| 56 | + @Override | |
| 57 | + public void updateDepartmentCost(DepartmentCostSaveReqVO updateReqVO) { | |
| 58 | + // 校验存在 | |
| 59 | + validateDepartmentCostExists(updateReqVO.getId()); | |
| 60 | + // 更新 | |
| 61 | + DepartmentCostDO updateObj = BeanUtils.toBean(updateReqVO, DepartmentCostDO.class); | |
| 62 | + | |
| 63 | + // add bt wq 20251119 插入增加校验 | |
| 64 | + LambdaQueryWrapper<DepartmentCostDO> queryWrapper = Wrappers.lambdaQuery(); | |
| 65 | + queryWrapper.eq(DepartmentCostDO::getSalaryMonth, updateObj.getSalaryMonth()); | |
| 66 | + queryWrapper.eq(DepartmentCostDO::getExpenseName, updateObj.getExpenseName()); | |
| 67 | + queryWrapper.eq(DepartmentCostDO::getCompanyId, updateObj.getCompanyId()); | |
| 68 | + List<DepartmentCostDO> list = departmentCostMapper.selectList(queryWrapper); | |
| 69 | + if (!CollectionUtils.isEmpty(list)) { | |
| 70 | + throw exception(COST_FEE_NOT_EXISTS); | |
| 71 | + } | |
| 72 | + // add bt wq 20251119 插入增加校验 | |
| 73 | + departmentCostMapper.updateById(updateObj); | |
| 74 | + } | |
| 75 | + | |
| 76 | + @Override | |
| 77 | + public void deleteDepartmentCost(Long id) { | |
| 78 | + // 校验存在 | |
| 79 | + validateDepartmentCostExists(id); | |
| 80 | + // 删除 | |
| 81 | + departmentCostMapper.deleteById(id); | |
| 82 | + } | |
| 83 | + | |
| 84 | + @Override | |
| 85 | + public void deleteDepartmentCostListByIds(List<Long> ids) { | |
| 86 | + // 删除 | |
| 87 | + departmentCostMapper.deleteByIds(ids); | |
| 88 | + } | |
| 89 | + | |
| 90 | + | |
| 91 | + private void validateDepartmentCostExists(Long id) { | |
| 92 | + if (departmentCostMapper.selectById(id) == null) { | |
| 93 | + throw exception(DEPARTMENT_COST_NOT_EXISTS_01); | |
| 94 | + } | |
| 95 | + } | |
| 96 | + | |
| 97 | + @Override | |
| 98 | + public DepartmentCostDO getDepartmentCost(Long id) { | |
| 99 | + return departmentCostMapper.selectById(id); | |
| 100 | + } | |
| 101 | + | |
| 102 | + @Override | |
| 103 | + public PageResult<DepartmentCostDO> getDepartmentCostPage(DepartmentCostPageReqVO pageReqVO) { | |
| 104 | + return departmentCostMapper.selectPage(pageReqVO); | |
| 105 | + } | |
| 106 | + | |
| 107 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/mechanicalcost/MechanicalCostService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.mechanicalcost; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | +import jakarta.validation.*; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.mechanicalcost.vo.*; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.mechanicalcost.MechanicalCostDO; | |
| 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 MechanicalCostService { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 创建自有机械费用录入 | |
| 19 | + * | |
| 20 | + * @param createReqVO 创建信息 | |
| 21 | + * @return 编号 | |
| 22 | + */ | |
| 23 | + Long createMechanicalCost(@Valid MechanicalCostSaveReqVO createReqVO); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 更新自有机械费用录入 | |
| 27 | + * | |
| 28 | + * @param updateReqVO 更新信息 | |
| 29 | + */ | |
| 30 | + void updateMechanicalCost(@Valid MechanicalCostSaveReqVO updateReqVO); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 删除自有机械费用录入 | |
| 34 | + * | |
| 35 | + * @param id 编号 | |
| 36 | + */ | |
| 37 | + void deleteMechanicalCost(Long id); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 批量删除自有机械费用录入 | |
| 41 | + * | |
| 42 | + * @param ids 编号 | |
| 43 | + */ | |
| 44 | + void deleteMechanicalCostListByIds(List<Long> ids); | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 获得自有机械费用录入 | |
| 48 | + * | |
| 49 | + * @param id 编号 | |
| 50 | + * @return 自有机械费用录入 | |
| 51 | + */ | |
| 52 | + MechanicalCostDO getMechanicalCost(Long id); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 获得自有机械费用录入分页 | |
| 56 | + * | |
| 57 | + * @param pageReqVO 分页查询 | |
| 58 | + * @return 自有机械费用录入分页 | |
| 59 | + */ | |
| 60 | + PageResult<MechanicalCostDO> getMechanicalCostPage(MechanicalCostPageReqVO pageReqVO); | |
| 61 | + | |
| 62 | +} | |
| 0 | 63 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/mechanicalcost/MechanicalCostServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.mechanicalcost; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 4 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.mechanicalcost.vo.MechanicalCostPageReqVO; | |
| 6 | +import com.zteits.urbanops.module.garden.controller.admin.mechanicalcost.vo.MechanicalCostSaveReqVO; | |
| 7 | +import com.zteits.urbanops.module.garden.dal.dataobject.mechanicalcost.MechanicalCostDO; | |
| 8 | +import com.zteits.urbanops.module.garden.dal.mysql.mechanicalcost.MechanicalCostMapper; | |
| 9 | +import com.zteits.urbanops.module.garden.enums.CostFeeConstants; | |
| 10 | +import com.zteits.urbanops.module.garden.service.mechanicaldepreciation.MechanicalDepreciationService; | |
| 11 | +import com.zteits.urbanops.module.garden.service.teambizdomainrel.TeamBizdomainRelService; | |
| 12 | +import jakarta.annotation.Resource; | |
| 13 | +import org.apache.commons.collections4.CollectionUtils; | |
| 14 | +import org.springframework.stereotype.Service; | |
| 15 | +import org.springframework.transaction.annotation.Transactional; | |
| 16 | +import org.springframework.validation.annotation.Validated; | |
| 17 | + | |
| 18 | +import java.util.List; | |
| 19 | + | |
| 20 | +import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 21 | +import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.MECHANICAL_COST_NOT_EXISTS; | |
| 22 | + | |
| 23 | + | |
| 24 | +/** | |
| 25 | + * 自有机械费用录入 Service 实现类 | |
| 26 | + * | |
| 27 | + * @author 超级管理员 | |
| 28 | + */ | |
| 29 | +@Service | |
| 30 | +@Validated | |
| 31 | +public class MechanicalCostServiceImpl implements MechanicalCostService { | |
| 32 | + | |
| 33 | + @Resource | |
| 34 | + private MechanicalCostMapper mechanicalCostMapper; | |
| 35 | + @Resource | |
| 36 | + private TeamBizdomainRelService teamBizdomainRelService; | |
| 37 | + @Resource | |
| 38 | + private MechanicalDepreciationService mechanicalDepreciationService; | |
| 39 | + | |
| 40 | + @Override | |
| 41 | + public Long createMechanicalCost(MechanicalCostSaveReqVO createReqVO) { | |
| 42 | + // 插入 | |
| 43 | + MechanicalCostDO mechanicalCost = BeanUtils.toBean(createReqVO, MechanicalCostDO.class); | |
| 44 | + mechanicalCostMapper.insert(mechanicalCost); | |
| 45 | + //add by wq 保存班组信息关联表 | |
| 46 | + teamBizdomainRelService.saveTeamBizdomainRel(createReqVO.getTeamIds(), mechanicalCost.getId(), mechanicalCost.getCompanyId(), mechanicalCost.getCompanyName(), CostFeeConstants.COSTFEE_MECHANICAL); | |
| 47 | + //add by wq 保存班组信息关联表 | |
| 48 | + | |
| 49 | + // 返回 | |
| 50 | + return mechanicalCost.getId(); | |
| 51 | + } | |
| 52 | + | |
| 53 | + @Override | |
| 54 | + public void updateMechanicalCost(MechanicalCostSaveReqVO updateReqVO) { | |
| 55 | + // 校验存在 | |
| 56 | + validateMechanicalCostExists(updateReqVO.getId()); | |
| 57 | + // 更新 | |
| 58 | + MechanicalCostDO updateObj = BeanUtils.toBean(updateReqVO, MechanicalCostDO.class); | |
| 59 | + mechanicalCostMapper.updateById(updateObj); | |
| 60 | + | |
| 61 | + //add by wq 保存班组信息关联表 | |
| 62 | + teamBizdomainRelService.deleteTeamBizdomainRel(updateObj.getId(), CostFeeConstants.COSTFEE_MECHANICAL); | |
| 63 | + teamBizdomainRelService.saveTeamBizdomainRel(updateReqVO.getTeamIds(), updateObj.getId(), updateObj.getCompanyId(), updateObj.getCompanyName(), CostFeeConstants.COSTFEE_MECHANICAL); | |
| 64 | + //add by wq 保存班组信息关联表 | |
| 65 | + } | |
| 66 | + | |
| 67 | + @Override | |
| 68 | + @Transactional | |
| 69 | + public void deleteMechanicalCost(Long id) { | |
| 70 | + // 校验存在 | |
| 71 | + validateMechanicalCostExists(id); | |
| 72 | + // 删除 | |
| 73 | + mechanicalCostMapper.deleteById(id); | |
| 74 | + | |
| 75 | + //add by wq 删除班组信息关联表 | |
| 76 | + teamBizdomainRelService.deleteTeamBizdomainRel(id, CostFeeConstants.COSTFEE_MECHANICAL); | |
| 77 | + // //删除折旧 | |
| 78 | + mechanicalDepreciationService.deleteMechanicalDepreciationByMechId(id); | |
| 79 | + //add by wq 删除班组信息关联表 | |
| 80 | + } | |
| 81 | + | |
| 82 | + @Override | |
| 83 | + public void deleteMechanicalCostListByIds(List<Long> ids) { | |
| 84 | + // 删除 | |
| 85 | + mechanicalCostMapper.deleteByIds(ids); | |
| 86 | + //add by wq 删除班组信息关联表 | |
| 87 | + if(CollectionUtils.isNotEmpty(ids)) { | |
| 88 | + for (Long id : ids) { | |
| 89 | + //批量删除 | |
| 90 | + teamBizdomainRelService.deleteTeamBizdomainRel(id, CostFeeConstants.COSTFEE_MECHANICAL); | |
| 91 | + //删除折旧 | |
| 92 | + mechanicalDepreciationService.deleteMechanicalDepreciationByMechId(id); | |
| 93 | + } | |
| 94 | + } | |
| 95 | + //add by wq 删除班组信息关联表 | |
| 96 | + | |
| 97 | + } | |
| 98 | + | |
| 99 | + | |
| 100 | + private void validateMechanicalCostExists(Long id) { | |
| 101 | + if (mechanicalCostMapper.selectById(id) == null) { | |
| 102 | + throw exception(MECHANICAL_COST_NOT_EXISTS); | |
| 103 | + } | |
| 104 | + } | |
| 105 | + | |
| 106 | + @Override | |
| 107 | + public MechanicalCostDO getMechanicalCost(Long id) { | |
| 108 | + return mechanicalCostMapper.selectById(id); | |
| 109 | + } | |
| 110 | + | |
| 111 | + @Override | |
| 112 | + public PageResult<MechanicalCostDO> getMechanicalCostPage(MechanicalCostPageReqVO pageReqVO) { | |
| 113 | + return mechanicalCostMapper.selectPage(pageReqVO); | |
| 114 | + } | |
| 115 | + | |
| 116 | + | |
| 117 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/mechanicaldepreciation/MechanicalDepreciationService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.mechanicaldepreciation; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | +import jakarta.validation.*; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.mechanicaldepreciation.vo.*; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.mechanicaldepreciation.MechanicalDepreciationDO; | |
| 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 MechanicalDepreciationService { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 创建自有机械折旧子 | |
| 19 | + * | |
| 20 | + * @param createReqVO 创建信息 | |
| 21 | + * @return 编号 | |
| 22 | + */ | |
| 23 | + Long createMechanicalDepreciation(@Valid MechanicalDepreciationSaveReqVO createReqVO); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 更新自有机械折旧子 | |
| 27 | + * | |
| 28 | + * @param updateReqVO 更新信息 | |
| 29 | + */ | |
| 30 | + void updateMechanicalDepreciation(@Valid MechanicalDepreciationSaveReqVO updateReqVO); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 删除自有机械折旧子 | |
| 34 | + * | |
| 35 | + * @param id 编号 | |
| 36 | + */ | |
| 37 | + void deleteMechanicalDepreciation(Long id); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 批量删除自有机械折旧子 | |
| 41 | + * | |
| 42 | + * @param ids 编号 | |
| 43 | + */ | |
| 44 | + void deleteMechanicalDepreciationListByIds(List<Long> ids); | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 获得自有机械折旧子 | |
| 48 | + * | |
| 49 | + * @param id 编号 | |
| 50 | + * @return 自有机械折旧子 | |
| 51 | + */ | |
| 52 | + MechanicalDepreciationDO getMechanicalDepreciation(Long id); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 获得自有机械折旧子分页 | |
| 56 | + * | |
| 57 | + * @param pageReqVO 分页查询 | |
| 58 | + * @return 自有机械折旧子分页 | |
| 59 | + */ | |
| 60 | + PageResult<MechanicalDepreciationDO> getMechanicalDepreciationPage(MechanicalDepreciationPageReqVO pageReqVO); | |
| 61 | + | |
| 62 | + | |
| 63 | + /** | |
| 64 | + * 删除自有机械折旧 | |
| 65 | + * | |
| 66 | + * @param mechId 编号 | |
| 67 | + */ | |
| 68 | + void deleteMechanicalDepreciationByMechId(Long mechId); | |
| 69 | + | |
| 70 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/mechanicaldepreciation/MechanicalDepreciationServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.mechanicaldepreciation; | |
| 2 | + | |
| 3 | +import cn.hutool.core.collection.CollUtil; | |
| 4 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
| 5 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | |
| 7 | +import org.apache.commons.lang3.StringUtils; | |
| 8 | +import org.springframework.stereotype.Service; | |
| 9 | +import jakarta.annotation.Resource; | |
| 10 | +import org.springframework.validation.annotation.Validated; | |
| 11 | +import org.springframework.transaction.annotation.Transactional; | |
| 12 | + | |
| 13 | +import java.util.*; | |
| 14 | +import com.zteits.urbanops.module.garden.controller.admin.mechanicaldepreciation.vo.*; | |
| 15 | +import com.zteits.urbanops.module.garden.dal.dataobject.mechanicaldepreciation.MechanicalDepreciationDO; | |
| 16 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 17 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 18 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 19 | + | |
| 20 | +import com.zteits.urbanops.module.garden.dal.mysql.mechanicaldepreciation.MechanicalDepreciationMapper; | |
| 21 | + | |
| 22 | +import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 23 | +import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.convertList; | |
| 24 | +import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.diffList; | |
| 25 | +import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.*; | |
| 26 | + | |
| 27 | +/** | |
| 28 | + * 自有机械折旧子 Service 实现类 | |
| 29 | + * | |
| 30 | + * @author 超级管理员 | |
| 31 | + */ | |
| 32 | +@Service | |
| 33 | +@Validated | |
| 34 | +public class MechanicalDepreciationServiceImpl implements MechanicalDepreciationService { | |
| 35 | + | |
| 36 | + @Resource | |
| 37 | + private MechanicalDepreciationMapper mechanicalDepreciationMapper; | |
| 38 | + | |
| 39 | + @Override | |
| 40 | + public Long createMechanicalDepreciation(MechanicalDepreciationSaveReqVO createReqVO) { | |
| 41 | + // 插入 | |
| 42 | + MechanicalDepreciationDO mechanicalDepreciation = BeanUtils.toBean(createReqVO, MechanicalDepreciationDO.class); | |
| 43 | + mechanicalDepreciationMapper.insert(mechanicalDepreciation); | |
| 44 | + | |
| 45 | + // 返回 | |
| 46 | + return mechanicalDepreciation.getId(); | |
| 47 | + } | |
| 48 | + | |
| 49 | + @Override | |
| 50 | + public void updateMechanicalDepreciation(MechanicalDepreciationSaveReqVO updateReqVO) { | |
| 51 | + // 校验存在 | |
| 52 | + validateMechanicalDepreciationExists(updateReqVO.getId()); | |
| 53 | + // 更新 | |
| 54 | + MechanicalDepreciationDO updateObj = BeanUtils.toBean(updateReqVO, MechanicalDepreciationDO.class); | |
| 55 | + mechanicalDepreciationMapper.updateById(updateObj); | |
| 56 | + } | |
| 57 | + | |
| 58 | + @Override | |
| 59 | + public void deleteMechanicalDepreciation(Long id) { | |
| 60 | + // 校验存在 | |
| 61 | + validateMechanicalDepreciationExists(id); | |
| 62 | + // 删除 | |
| 63 | + mechanicalDepreciationMapper.deleteById(id); | |
| 64 | + } | |
| 65 | + | |
| 66 | + @Override | |
| 67 | + public void deleteMechanicalDepreciationListByIds(List<Long> ids) { | |
| 68 | + // 删除 | |
| 69 | + mechanicalDepreciationMapper.deleteByIds(ids); | |
| 70 | + } | |
| 71 | + | |
| 72 | + | |
| 73 | + private void validateMechanicalDepreciationExists(Long id) { | |
| 74 | + if (mechanicalDepreciationMapper.selectById(id) == null) { | |
| 75 | + throw exception(MECHANICAL_DEPRECIATION_NOT_EXISTS); | |
| 76 | + } | |
| 77 | + } | |
| 78 | + | |
| 79 | + @Override | |
| 80 | + public MechanicalDepreciationDO getMechanicalDepreciation(Long id) { | |
| 81 | + return mechanicalDepreciationMapper.selectById(id); | |
| 82 | + } | |
| 83 | + | |
| 84 | + @Override | |
| 85 | + public PageResult<MechanicalDepreciationDO> getMechanicalDepreciationPage(MechanicalDepreciationPageReqVO pageReqVO) { | |
| 86 | + return mechanicalDepreciationMapper.selectPage(pageReqVO); | |
| 87 | + } | |
| 88 | + | |
| 89 | + @Override | |
| 90 | + public void deleteMechanicalDepreciationByMechId(Long mechId) { | |
| 91 | + if (mechId == null) { | |
| 92 | + throw exception(MECHANICAL_DEPRECIATION_NOT_EXISTS_001); | |
| 93 | + } | |
| 94 | + LambdaQueryWrapper<MechanicalDepreciationDO> queryWrapper = Wrappers.lambdaQuery(); | |
| 95 | + queryWrapper.eq(MechanicalDepreciationDO::getMechId, String.valueOf(mechId)); | |
| 96 | + mechanicalDepreciationMapper.delete(queryWrapper); | |
| 97 | + } | |
| 98 | + | |
| 99 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/personalcost/PersonalCostService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.personalcost; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | +import jakarta.validation.*; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.personalcost.vo.*; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.personalcost.PersonalCostDO; | |
| 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 PersonalCostService { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 创建人员费用录入 - 个人费用 | |
| 19 | + * | |
| 20 | + * @param createReqVO 创建信息 | |
| 21 | + * @return 编号 | |
| 22 | + */ | |
| 23 | + Long createPersonalCost(@Valid PersonalCostSaveReqVO createReqVO); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 更新人员费用录入 - 个人费用 | |
| 27 | + * | |
| 28 | + * @param updateReqVO 更新信息 | |
| 29 | + */ | |
| 30 | + void updatePersonalCost(@Valid PersonalCostSaveReqVO updateReqVO); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 删除人员费用录入 - 个人费用 | |
| 34 | + * | |
| 35 | + * @param id 编号 | |
| 36 | + */ | |
| 37 | + void deletePersonalCost(Long id); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 批量删除人员费用录入 - 个人费用 | |
| 41 | + * | |
| 42 | + * @param ids 编号 | |
| 43 | + */ | |
| 44 | + void deletePersonalCostListByIds(List<Long> ids); | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 获得人员费用录入 - 个人费用 | |
| 48 | + * | |
| 49 | + * @param id 编号 | |
| 50 | + * @return 人员费用录入 - 个人费用 | |
| 51 | + */ | |
| 52 | + PersonalCostDO getPersonalCost(Long id); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 获得人员费用录入 - 个人费用分页 | |
| 56 | + * | |
| 57 | + * @param pageReqVO 分页查询 | |
| 58 | + * @return 人员费用录入 - 个人费用分页 | |
| 59 | + */ | |
| 60 | + PageResult<PersonalCostDO> getPersonalCostPage(PersonalCostPageReqVO pageReqVO); | |
| 61 | + | |
| 62 | +} | |
| 0 | 63 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/personalcost/PersonalCostServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.personalcost; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
| 4 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
| 5 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 6 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 7 | +import com.zteits.urbanops.module.garden.controller.admin.personalcost.vo.PersonalCostPageReqVO; | |
| 8 | +import com.zteits.urbanops.module.garden.controller.admin.personalcost.vo.PersonalCostSaveReqVO; | |
| 9 | +import com.zteits.urbanops.module.garden.dal.dataobject.departmentcost.DepartmentCostDO; | |
| 10 | +import com.zteits.urbanops.module.garden.dal.dataobject.personalcost.PersonalCostDO; | |
| 11 | +import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | |
| 12 | +import com.zteits.urbanops.module.garden.dal.mysql.personalcost.PersonalCostMapper; | |
| 13 | +import com.zteits.urbanops.module.garden.dal.mysql.teambizdomainrel.TeamBizdomainRelMapper; | |
| 14 | +import com.zteits.urbanops.module.garden.enums.CostFeeConstants; | |
| 15 | +import com.zteits.urbanops.module.garden.service.teambizdomainrel.TeamBizdomainRelService; | |
| 16 | +import jakarta.annotation.Resource; | |
| 17 | +import org.apache.commons.collections4.CollectionUtils; | |
| 18 | +import org.apache.commons.lang3.StringUtils; | |
| 19 | +import org.springframework.stereotype.Service; | |
| 20 | +import org.springframework.transaction.annotation.Transactional; | |
| 21 | +import org.springframework.validation.annotation.Validated; | |
| 22 | + | |
| 23 | +import java.util.List; | |
| 24 | + | |
| 25 | +import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 26 | +import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.PERSONAL_COST_NOT_EXISTS; | |
| 27 | +import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.PERSONAL_COST_NOT_EXISTS_001; | |
| 28 | + | |
| 29 | +/** | |
| 30 | + * 人员费用录入 - 个人费用 Service 实现类 | |
| 31 | + * | |
| 32 | + * @author 超级管理员 | |
| 33 | + */ | |
| 34 | +@Service | |
| 35 | +@Validated | |
| 36 | +public class PersonalCostServiceImpl implements PersonalCostService { | |
| 37 | + | |
| 38 | + @Resource | |
| 39 | + private PersonalCostMapper personalCostMapper; | |
| 40 | + @Resource | |
| 41 | + TeamBizdomainRelService teamBizdomainRelService; | |
| 42 | + | |
| 43 | + @Override | |
| 44 | + @Transactional | |
| 45 | + public Long createPersonalCost(PersonalCostSaveReqVO createReqVO) { | |
| 46 | + // 插入 | |
| 47 | + PersonalCostDO personalCost = BeanUtils.toBean(createReqVO, PersonalCostDO.class); | |
| 48 | + personalCostMapper.insert(personalCost); | |
| 49 | + | |
| 50 | + //add by wq 保存班组信息关联表 | |
| 51 | + teamBizdomainRelService.saveTeamBizdomainRel(createReqVO.getTeamIds(), personalCost.getId(), personalCost.getCompanyId(), personalCost.getCompanyName(), CostFeeConstants.COSTFEE_PERSONAL); | |
| 52 | + //add by wq 保存班组信息关联表 | |
| 53 | + | |
| 54 | + // 返回 | |
| 55 | + return personalCost.getId(); | |
| 56 | + } | |
| 57 | + | |
| 58 | + @Override | |
| 59 | + @Transactional | |
| 60 | + public void updatePersonalCost(PersonalCostSaveReqVO updateReqVO) { | |
| 61 | + // 校验存在 | |
| 62 | + validatePersonalCostExists(updateReqVO.getId()); | |
| 63 | + // 更新 | |
| 64 | + PersonalCostDO updateObj = BeanUtils.toBean(updateReqVO, PersonalCostDO.class); | |
| 65 | + personalCostMapper.updateById(updateObj); | |
| 66 | + | |
| 67 | + //add by wq 保存班组信息关联表 | |
| 68 | + teamBizdomainRelService.deleteTeamBizdomainRel(updateObj.getId(), CostFeeConstants.COSTFEE_PERSONAL); | |
| 69 | + teamBizdomainRelService.saveTeamBizdomainRel(updateReqVO.getTeamIds(), updateObj.getId(), updateObj.getCompanyId(), updateObj.getCompanyName(), CostFeeConstants.COSTFEE_PERSONAL); | |
| 70 | + | |
| 71 | + //add by wq 保存班组信息关联表 | |
| 72 | + } | |
| 73 | + | |
| 74 | + @Override | |
| 75 | + public void deletePersonalCost(Long id) { | |
| 76 | + // 校验存在 | |
| 77 | + validatePersonalCostExists(id); | |
| 78 | + // 删除 | |
| 79 | + personalCostMapper.deleteById(id); | |
| 80 | + // add by wq 删除 | |
| 81 | + teamBizdomainRelService.deleteTeamBizdomainRel(id, CostFeeConstants.COSTFEE_PERSONAL); | |
| 82 | + // add by wq 删除 | |
| 83 | + } | |
| 84 | + | |
| 85 | + @Override | |
| 86 | + public void deletePersonalCostListByIds(List<Long> ids) { | |
| 87 | + // 删除 | |
| 88 | + personalCostMapper.deleteByIds(ids); | |
| 89 | + // add by wq 删除 | |
| 90 | + if(ids.size() > 0) { | |
| 91 | + for (Long id : ids) { | |
| 92 | + teamBizdomainRelService.deleteTeamBizdomainRel(id, CostFeeConstants.COSTFEE_PERSONAL); | |
| 93 | + } | |
| 94 | + } | |
| 95 | + // add by wq 删除 | |
| 96 | + } | |
| 97 | + | |
| 98 | + | |
| 99 | + private void validatePersonalCostExists(Long id) { | |
| 100 | + if (personalCostMapper.selectById(id) == null) { | |
| 101 | + throw exception(PERSONAL_COST_NOT_EXISTS); | |
| 102 | + } | |
| 103 | + } | |
| 104 | + | |
| 105 | + @Override | |
| 106 | + public PersonalCostDO getPersonalCost(Long id) { | |
| 107 | + return personalCostMapper.selectById(id); | |
| 108 | + } | |
| 109 | + | |
| 110 | + @Override | |
| 111 | + public PageResult<PersonalCostDO> getPersonalCostPage(PersonalCostPageReqVO pageReqVO) { | |
| 112 | + return personalCostMapper.selectPage(pageReqVO); | |
| 113 | + } | |
| 114 | + | |
| 115 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/rentalmechanicalcost/RentalMechanicalCostService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.rentalmechanicalcost; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | +import jakarta.validation.*; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo.*; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.rentalmechanicalcost.RentalMechanicalCostDO; | |
| 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 RentalMechanicalCostService { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 创建租赁机械费用录入 | |
| 19 | + * | |
| 20 | + * @param createReqVO 创建信息 | |
| 21 | + * @return 编号 | |
| 22 | + */ | |
| 23 | + Long createRentalMechanicalCost(@Valid RentalMechanicalCostSaveReqVO createReqVO); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 更新租赁机械费用录入 | |
| 27 | + * | |
| 28 | + * @param updateReqVO 更新信息 | |
| 29 | + */ | |
| 30 | + void updateRentalMechanicalCost(@Valid RentalMechanicalCostSaveReqVO updateReqVO); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 删除租赁机械费用录入 | |
| 34 | + * | |
| 35 | + * @param id 编号 | |
| 36 | + */ | |
| 37 | + void deleteRentalMechanicalCost(Long id); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 批量删除租赁机械费用录入 | |
| 41 | + * | |
| 42 | + * @param ids 编号 | |
| 43 | + */ | |
| 44 | + void deleteRentalMechanicalCostListByIds(List<Long> ids); | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 获得租赁机械费用录入 | |
| 48 | + * | |
| 49 | + * @param id 编号 | |
| 50 | + * @return 租赁机械费用录入 | |
| 51 | + */ | |
| 52 | + RentalMechanicalCostDO getRentalMechanicalCost(Long id); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 获得租赁机械费用录入分页 | |
| 56 | + * | |
| 57 | + * @param pageReqVO 分页查询 | |
| 58 | + * @return 租赁机械费用录入分页 | |
| 59 | + */ | |
| 60 | + PageResult<RentalMechanicalCostDO> getRentalMechanicalCostPage(RentalMechanicalCostPageReqVO pageReqVO); | |
| 61 | + | |
| 62 | +} | |
| 0 | 63 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/rentalmechanicalcost/RentalMechanicalCostServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.rentalmechanicalcost; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 4 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo.RentalMechanicalCostPageReqVO; | |
| 6 | +import com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo.RentalMechanicalCostSaveReqVO; | |
| 7 | +import com.zteits.urbanops.module.garden.dal.dataobject.rentalmechanicalcost.RentalMechanicalCostDO; | |
| 8 | +import com.zteits.urbanops.module.garden.dal.mysql.rentalmechanicalcost.RentalMechanicalCostMapper; | |
| 9 | +import com.zteits.urbanops.module.garden.enums.CostFeeConstants; | |
| 10 | +import com.zteits.urbanops.module.garden.service.teambizdomainrel.TeamBizdomainRelService; | |
| 11 | +import jakarta.annotation.Resource; | |
| 12 | +import org.apache.commons.collections4.CollectionUtils; | |
| 13 | +import org.springframework.stereotype.Service; | |
| 14 | +import org.springframework.validation.annotation.Validated; | |
| 15 | + | |
| 16 | +import java.util.List; | |
| 17 | + | |
| 18 | + | |
| 19 | +import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 20 | +import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.*; | |
| 21 | + | |
| 22 | +/** | |
| 23 | + * 租赁机械费用录入 Service 实现类 | |
| 24 | + * | |
| 25 | + * @author 超级管理员 | |
| 26 | + */ | |
| 27 | +@Service | |
| 28 | +@Validated | |
| 29 | +public class RentalMechanicalCostServiceImpl implements RentalMechanicalCostService { | |
| 30 | + | |
| 31 | + @Resource | |
| 32 | + private RentalMechanicalCostMapper rentalMechanicalCostMapper; | |
| 33 | + | |
| 34 | + @Resource | |
| 35 | + private TeamBizdomainRelService teamBizdomainRelService; | |
| 36 | + | |
| 37 | + @Override | |
| 38 | + public Long createRentalMechanicalCost(RentalMechanicalCostSaveReqVO createReqVO) { | |
| 39 | + // 插入 | |
| 40 | + RentalMechanicalCostDO rentalMechanicalCost = BeanUtils.toBean(createReqVO, RentalMechanicalCostDO.class); | |
| 41 | + rentalMechanicalCostMapper.insert(rentalMechanicalCost); | |
| 42 | + | |
| 43 | + //add by wq 保存班组信息关联表 | |
| 44 | + teamBizdomainRelService.saveTeamBizdomainRel(createReqVO.getTeamIds(), rentalMechanicalCost.getId(), rentalMechanicalCost.getCompanyId(), rentalMechanicalCost.getCompanyName(), CostFeeConstants.COSTFEE_RENTALMECHANICAL); | |
| 45 | + //add by wq 保存班组信息关联表 | |
| 46 | + // 返回 | |
| 47 | + return rentalMechanicalCost.getId(); | |
| 48 | + } | |
| 49 | + | |
| 50 | + @Override | |
| 51 | + public void updateRentalMechanicalCost(RentalMechanicalCostSaveReqVO updateReqVO) { | |
| 52 | + // 校验存在 | |
| 53 | + validateRentalMechanicalCostExists(updateReqVO.getId()); | |
| 54 | + // 更新 | |
| 55 | + RentalMechanicalCostDO updateObj = BeanUtils.toBean(updateReqVO, RentalMechanicalCostDO.class); | |
| 56 | + rentalMechanicalCostMapper.updateById(updateObj); | |
| 57 | + | |
| 58 | + //add by wq 保存班组信息关联表 | |
| 59 | + teamBizdomainRelService.deleteTeamBizdomainRel(updateObj.getId(), CostFeeConstants.COSTFEE_RENTALMECHANICAL); | |
| 60 | + teamBizdomainRelService.saveTeamBizdomainRel(updateReqVO.getTeamIds(), updateObj.getId(), updateObj.getCompanyId(), updateObj.getCompanyName(), CostFeeConstants.COSTFEE_RENTALMECHANICAL); | |
| 61 | + //add by wq 保存班组信息关联表 | |
| 62 | + } | |
| 63 | + | |
| 64 | + @Override | |
| 65 | + public void deleteRentalMechanicalCost(Long id) { | |
| 66 | + // 校验存在 | |
| 67 | + validateRentalMechanicalCostExists(id); | |
| 68 | + // 删除 | |
| 69 | + rentalMechanicalCostMapper.deleteById(id); | |
| 70 | + | |
| 71 | + //add by wq 删除班组信息关联表 | |
| 72 | + teamBizdomainRelService.deleteTeamBizdomainRel(id, CostFeeConstants.COSTFEE_RENTALMECHANICAL); | |
| 73 | + //add by wq 删除班组信息关联表 | |
| 74 | + } | |
| 75 | + | |
| 76 | + @Override | |
| 77 | + public void deleteRentalMechanicalCostListByIds(List<Long> ids) { | |
| 78 | + // 删除 | |
| 79 | + rentalMechanicalCostMapper.deleteByIds(ids); | |
| 80 | + | |
| 81 | + //add by wq 删除班组信息关联表 | |
| 82 | + if(CollectionUtils.isNotEmpty(ids)) { | |
| 83 | + for (Long id : ids) { | |
| 84 | + //批量删除 | |
| 85 | + teamBizdomainRelService.deleteTeamBizdomainRel(id, CostFeeConstants.COSTFEE_MECHANICAL); | |
| 86 | + } | |
| 87 | + } | |
| 88 | + //add by wq 删除班组信息关联表 | |
| 89 | + } | |
| 90 | + | |
| 91 | + | |
| 92 | + private void validateRentalMechanicalCostExists(Long id) { | |
| 93 | + if (rentalMechanicalCostMapper.selectById(id) == null) { | |
| 94 | + throw exception(RENTAL_MECHANICAL_COST_NOT_EXISTS); | |
| 95 | + } | |
| 96 | + } | |
| 97 | + | |
| 98 | + @Override | |
| 99 | + public RentalMechanicalCostDO getRentalMechanicalCost(Long id) { | |
| 100 | + return rentalMechanicalCostMapper.selectById(id); | |
| 101 | + } | |
| 102 | + | |
| 103 | + @Override | |
| 104 | + public PageResult<RentalMechanicalCostDO> getRentalMechanicalCostPage(RentalMechanicalCostPageReqVO pageReqVO) { | |
| 105 | + return rentalMechanicalCostMapper.selectPage(pageReqVO); | |
| 106 | + } | |
| 107 | + | |
| 108 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/teambizdomainrel/TeamBizdomainRelService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.teambizdomainrel; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | +import jakarta.validation.*; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.teambizdomainrel.vo.*; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | |
| 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 TeamBizdomainRelService { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 创建班组关联 | |
| 19 | + * | |
| 20 | + * @param createReqVO 创建信息 | |
| 21 | + * @return 编号 | |
| 22 | + */ | |
| 23 | + Long createTeamBizdomainRel(@Valid TeamBizdomainRelSaveReqVO createReqVO); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 更新班组关联 | |
| 27 | + * | |
| 28 | + * @param updateReqVO 更新信息 | |
| 29 | + */ | |
| 30 | + void updateTeamBizdomainRel(@Valid TeamBizdomainRelSaveReqVO updateReqVO); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 删除班组关联 | |
| 34 | + * | |
| 35 | + * @param id 编号 | |
| 36 | + */ | |
| 37 | + void deleteTeamBizdomainRel(Long id); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 批量删除班组关联 | |
| 41 | + * | |
| 42 | + * @param ids 编号 | |
| 43 | + */ | |
| 44 | + void deleteTeamBizdomainRelListByIds(List<Long> ids); | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 获得班组关联 | |
| 48 | + * | |
| 49 | + * @param id 编号 | |
| 50 | + * @return 班组关联 | |
| 51 | + */ | |
| 52 | + TeamBizdomainRelDO getTeamBizdomainRel(Long id); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 获得班组关联分页 | |
| 56 | + * | |
| 57 | + * @param pageReqVO 分页查询 | |
| 58 | + * @return 班组关联分页 | |
| 59 | + */ | |
| 60 | + PageResult<TeamBizdomainRelDO> getTeamBizdomainRelPage(TeamBizdomainRelPageReqVO pageReqVO); | |
| 61 | + | |
| 62 | + /** | |
| 63 | + * @Author wangqian | |
| 64 | + * @Description 获取费用关联信息 | |
| 65 | + * @Date 2025/11/19 20:47 | |
| 66 | + * @Param busiId | |
| 67 | + * @param busiType | |
| 68 | + * @Return java.util.List<com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO> | |
| 69 | + */ | |
| 70 | + public List<TeamBizdomainRelDO> getTeamBizdomainRelList(Long busiId, String busiType); | |
| 71 | + | |
| 72 | + public void saveTeamBizdomainRel(List<TeamBizdomainRelDO> teamList, Long busiId, String companyId, String companyName ,String busiType) ; | |
| 73 | + | |
| 74 | + public void deleteTeamBizdomainRel(Long id, String busiType); | |
| 75 | + | |
| 76 | + | |
| 77 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/teambizdomainrel/TeamBizdomainRelServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.teambizdomainrel; | |
| 2 | + | |
| 3 | +import cn.hutool.core.collection.CollUtil; | |
| 4 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
| 5 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
| 6 | +import com.zteits.urbanops.module.garden.enums.CostFeeConstants; | |
| 7 | +import org.apache.commons.collections4.CollectionUtils; | |
| 8 | +import org.apache.commons.lang3.StringUtils; | |
| 9 | +import org.springframework.stereotype.Service; | |
| 10 | +import jakarta.annotation.Resource; | |
| 11 | +import org.springframework.validation.annotation.Validated; | |
| 12 | +import org.springframework.transaction.annotation.Transactional; | |
| 13 | + | |
| 14 | +import java.util.*; | |
| 15 | +import com.zteits.urbanops.module.garden.controller.admin.teambizdomainrel.vo.*; | |
| 16 | +import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | |
| 17 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 18 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 19 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 20 | + | |
| 21 | +import com.zteits.urbanops.module.garden.dal.mysql.teambizdomainrel.TeamBizdomainRelMapper; | |
| 22 | + | |
| 23 | +import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 24 | +import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.convertList; | |
| 25 | +import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.diffList; | |
| 26 | +import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.*; | |
| 27 | + | |
| 28 | +/** | |
| 29 | + * 班组关联 Service 实现类 | |
| 30 | + * | |
| 31 | + * @author 超级管理员 | |
| 32 | + */ | |
| 33 | +@Service | |
| 34 | +@Validated | |
| 35 | +public class TeamBizdomainRelServiceImpl implements TeamBizdomainRelService { | |
| 36 | + | |
| 37 | + @Resource | |
| 38 | + private TeamBizdomainRelMapper teamBizdomainRelMapper; | |
| 39 | + | |
| 40 | + @Override | |
| 41 | + public Long createTeamBizdomainRel(TeamBizdomainRelSaveReqVO createReqVO) { | |
| 42 | + // 插入 | |
| 43 | + TeamBizdomainRelDO teamBizdomainRel = BeanUtils.toBean(createReqVO, TeamBizdomainRelDO.class); | |
| 44 | + teamBizdomainRelMapper.insert(teamBizdomainRel); | |
| 45 | + | |
| 46 | + // 返回 | |
| 47 | + return teamBizdomainRel.getId(); | |
| 48 | + } | |
| 49 | + | |
| 50 | + @Override | |
| 51 | + public void updateTeamBizdomainRel(TeamBizdomainRelSaveReqVO updateReqVO) { | |
| 52 | + // 校验存在 | |
| 53 | + validateTeamBizdomainRelExists(updateReqVO.getId()); | |
| 54 | + // 更新 | |
| 55 | + TeamBizdomainRelDO updateObj = BeanUtils.toBean(updateReqVO, TeamBizdomainRelDO.class); | |
| 56 | + teamBizdomainRelMapper.updateById(updateObj); | |
| 57 | + } | |
| 58 | + | |
| 59 | + @Override | |
| 60 | + public void deleteTeamBizdomainRel(Long id) { | |
| 61 | + // 校验存在 | |
| 62 | + validateTeamBizdomainRelExists(id); | |
| 63 | + // 删除 | |
| 64 | + teamBizdomainRelMapper.deleteById(id); | |
| 65 | + } | |
| 66 | + | |
| 67 | + @Override | |
| 68 | + public void deleteTeamBizdomainRelListByIds(List<Long> ids) { | |
| 69 | + // 删除 | |
| 70 | + teamBizdomainRelMapper.deleteByIds(ids); | |
| 71 | + } | |
| 72 | + | |
| 73 | + | |
| 74 | + private void validateTeamBizdomainRelExists(Long id) { | |
| 75 | + if (teamBizdomainRelMapper.selectById(id) == null) { | |
| 76 | + //throw exception(TEAM_BIZDOMAIN_REL_NOT_EXISTS); | |
| 77 | + } | |
| 78 | + } | |
| 79 | + | |
| 80 | + @Override | |
| 81 | + public TeamBizdomainRelDO getTeamBizdomainRel(Long id) { | |
| 82 | + return teamBizdomainRelMapper.selectById(id); | |
| 83 | + } | |
| 84 | + | |
| 85 | + @Override | |
| 86 | + public PageResult<TeamBizdomainRelDO> getTeamBizdomainRelPage(TeamBizdomainRelPageReqVO pageReqVO) { | |
| 87 | + return teamBizdomainRelMapper.selectPage(pageReqVO); | |
| 88 | + } | |
| 89 | + | |
| 90 | + public List<TeamBizdomainRelDO> getTeamBizdomainRelList(Long busiId, String busiType) { | |
| 91 | + if (busiId == null && StringUtils.isEmpty(busiType)) { | |
| 92 | + throw exception(MECHANICAL_COST_NOT_EXISTS_001); | |
| 93 | + } | |
| 94 | + LambdaQueryWrapper<TeamBizdomainRelDO> queryWrapper = Wrappers.lambdaQuery(); | |
| 95 | + queryWrapper.eq(TeamBizdomainRelDO::getBusiId, busiId); | |
| 96 | + queryWrapper.eq(TeamBizdomainRelDO::getBusiType, busiType); | |
| 97 | + return teamBizdomainRelMapper.selectList(queryWrapper); | |
| 98 | + } | |
| 99 | + | |
| 100 | + @Override | |
| 101 | + public void saveTeamBizdomainRel(List<TeamBizdomainRelDO> teamList, Long busiId, String companyId, String companyName ,String busiType) { | |
| 102 | + if (CollectionUtils.isNotEmpty(teamList)) { | |
| 103 | + for (TeamBizdomainRelDO team : teamList) { | |
| 104 | + if (team != null && StringUtils.isNotEmpty(team.getTeamId())) { | |
| 105 | + TeamBizdomainRelDO teamBizdomainRel = new TeamBizdomainRelDO(); | |
| 106 | + teamBizdomainRel.setBusiId(String.valueOf(busiId)); | |
| 107 | + teamBizdomainRel.setCompanyId(companyId); | |
| 108 | + teamBizdomainRel.setCompanyName(companyName); | |
| 109 | + teamBizdomainRel.setTeamName(team.getTeamName()); | |
| 110 | + teamBizdomainRel.setTeamId(team.getTeamId()); | |
| 111 | + teamBizdomainRel.setBusiType(busiType); | |
| 112 | + teamBizdomainRelMapper.insert(teamBizdomainRel); | |
| 113 | + } | |
| 114 | + } | |
| 115 | + } | |
| 116 | + } | |
| 117 | + | |
| 118 | + @Override | |
| 119 | + public void deleteTeamBizdomainRel(Long id, String busiType ) { | |
| 120 | + if (id == null && StringUtils.isEmpty(busiType)) { | |
| 121 | + throw exception(MECHANICAL_COST_NOT_EXISTS_001); | |
| 122 | + } | |
| 123 | + LambdaQueryWrapper<TeamBizdomainRelDO> queryWrapper = Wrappers.lambdaQuery(); | |
| 124 | + queryWrapper.eq(TeamBizdomainRelDO::getBusiId, String.valueOf(id)); | |
| 125 | + queryWrapper.eq(TeamBizdomainRelDO::getBusiType, busiType); | |
| 126 | + teamBizdomainRelMapper.delete(queryWrapper); | |
| 127 | + } | |
| 128 | +} | ... | ... |
urbanops-module-garden/src/main/resources/mapper/assigntasksinfo/AssignTasksInfoMapper.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.garden.dal.mysql.assigntasksinfo.AssignTasksInfoMapper"> | |
| 4 | + | |
| 5 | + | |
| 6 | + <!-- 按ID删除: --> | |
| 7 | + <delete id="deleteAssignTaskInfoByTaskId" parameterType="Long"> | |
| 8 | + update td_assign_task_info set status= 1 where task_id in | |
| 9 | + <foreach item="item" collection="list" open="(" separator="," close=")"> | |
| 10 | + #{item.id} | |
| 11 | + </foreach> | |
| 12 | + </delete> | |
| 13 | + | |
| 14 | + <!-- 新增:批量更新is_overdue --> | |
| 15 | + <update id="batchUpdateIsOverdue"> | |
| 16 | + update td_assign_task_info | |
| 17 | + set is_overdue = 1, | |
| 18 | + update_time = now() | |
| 19 | + where id in | |
| 20 | + <foreach item="item" collection="list" open="(" separator="," close=")"> | |
| 21 | + #{item.id} | |
| 22 | + </foreach> | |
| 23 | + and finish = 0 | |
| 24 | + </update> | |
| 25 | + | |
| 26 | +</mapper> | ... | ... |
urbanops-module-garden/src/main/resources/mapper/departmentcost/DepartmentCostMapper.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.garden.dal.mysql.departmentcost.DepartmentCostMapper"> | |
| 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-garden/src/main/resources/mapper/mechanicalcost/MechanicalCostMapper.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.garden.dal.mysql.mechanicalcost.MechanicalCostMapper"> | |
| 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-garden/src/main/resources/mapper/mechanicaldepreciation/MechanicalDepreciationMapper.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.garden.dal.mysql.mechanicaldepreciation.MechanicalDepreciationMapper"> | |
| 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-garden/src/main/resources/mapper/personalcost/PersonalCostMapper.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.garden.dal.mysql.personalcost.PersonalCostMapper"> | |
| 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-garden/src/main/resources/mapper/rentalmechanicalcost/RentalMechanicalCostMapper.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.garden.dal.mysql.rentalmechanicalcost.RentalMechanicalCostMapper"> | |
| 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-garden/src/main/resources/mapper/teambizdomainrel/TeamBizdomainRelMapper.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.garden.dal.mysql.teambizdomainrel.TeamBizdomainRelMapper"> | |
| 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-gloabl/src/main/resources/mapper/mechanicalcost/MechanicalCostMapper.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.garden.dal.mysql.mechanicalcost.MechanicalCostMapper"> | |
| 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 | ... | ... |