Commit 27d3aea4a3a5ba504b19c7873ec23e5e2fda8e0f
Merge remote-tracking branch 'origin/dev' into dev
Showing
32 changed files
with
1961 additions
and
0 deletions
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/inspectionplan/InspectionPlanController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.inspectionplan; | |
| 2 | + | |
| 3 | +import jakarta.validation.constraints.NotBlank; | |
| 4 | +import org.springframework.web.bind.annotation.*; | |
| 5 | +import jakarta.annotation.Resource; | |
| 6 | +import org.springframework.validation.annotation.Validated; | |
| 7 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 8 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 9 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 10 | +import io.swagger.v3.oas.annotations.Operation; | |
| 11 | + | |
| 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.inspectionplan.vo.*; | |
| 29 | +import com.zteits.urbanops.module.garden.dal.dataobject.inspectionplan.InspectionPlanDO; | |
| 30 | +import com.zteits.urbanops.module.garden.service.inspectionplan.InspectionPlanService; | |
| 31 | + | |
| 32 | +@Tag(name = "管理后台 - 巡检计划汇总") | |
| 33 | +@RestController | |
| 34 | +@RequestMapping("/garden/inspection-plan") | |
| 35 | +@Validated | |
| 36 | +public class InspectionPlanController { | |
| 37 | + | |
| 38 | + @Resource | |
| 39 | + private InspectionPlanService inspectionPlanService; | |
| 40 | + | |
| 41 | + @PostMapping("/create") | |
| 42 | + @Operation(summary = "创建巡检计划汇总") | |
| 43 | + @PreAuthorize("@ss.hasPermission('garden:inspection-plan:create')") | |
| 44 | + public CommonResult<Long> createInspectionPlan(@Valid @RequestBody InspectionPlanSaveReqVO createReqVO) { | |
| 45 | + return inspectionPlanService.createInspectionPlan(createReqVO); | |
| 46 | + } | |
| 47 | + | |
| 48 | + @PutMapping("/update") | |
| 49 | + @Operation(summary = "更新巡检计划汇总") | |
| 50 | + @PreAuthorize("@ss.hasPermission('garden:inspection-plan:update')") | |
| 51 | + public CommonResult<Boolean> updateInspectionPlan(@Valid @RequestBody InspectionPlanUpdateReqVO updateReqVO) { | |
| 52 | + inspectionPlanService.updateInspectionPlan(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:inspection-plan:delete')") | |
| 60 | + public CommonResult<Boolean> deleteInspectionPlan(@RequestParam("id") Long id) { | |
| 61 | + inspectionPlanService.deleteInspectionPlan(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:inspection-plan:delete')") | |
| 69 | + public CommonResult<Boolean> deleteInspectionPlanList(@RequestParam("ids") List<Long> ids) { | |
| 70 | + inspectionPlanService.deleteInspectionPlanListByIds(ids); | |
| 71 | + return success(true); | |
| 72 | + } | |
| 73 | + | |
| 74 | + @DeleteMapping("/delete-batch_no") | |
| 75 | + @Parameter(name = "batchNo", description = "批次号", required = true) | |
| 76 | + @Operation(summary = "根据batch_no删除巡检计划汇总") | |
| 77 | + @PreAuthorize("@ss.hasPermission('garden:inspection-plan:delete')") | |
| 78 | + public CommonResult<Boolean> deleteInspectionPlanByBatchNo(@RequestParam("batch_no") @NotBlank String batchNo) { | |
| 79 | + inspectionPlanService.deleteInspectionPlanByBatchNo(batchNo); | |
| 80 | + return success(true); | |
| 81 | + } | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + @GetMapping("/get") | |
| 86 | + @Operation(summary = "获得巡检计划汇总") | |
| 87 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | |
| 88 | + @PreAuthorize("@ss.hasPermission('garden:inspection-plan:query')") | |
| 89 | + public CommonResult<InspectionPlanRespVO> getInspectionPlan(@RequestParam("id") Long id) { | |
| 90 | + InspectionPlanDO inspectionPlan = inspectionPlanService.getInspectionPlan(id); | |
| 91 | + return success(BeanUtils.toBean(inspectionPlan, InspectionPlanRespVO.class)); | |
| 92 | + } | |
| 93 | + | |
| 94 | + @GetMapping("/page") | |
| 95 | + @Operation(summary = "获得巡检计划汇总分页") | |
| 96 | + @PreAuthorize("@ss.hasPermission('garden:inspection-plan:query')") | |
| 97 | + public CommonResult<PageResult<InspectionPlanRespVO>> getInspectionPlanPage(@Valid InspectionPlanPageReqVO pageReqVO) { | |
| 98 | + PageResult<InspectionPlanDO> pageResult = inspectionPlanService.getInspectionPlanPage(pageReqVO); | |
| 99 | + return success(BeanUtils.toBean(pageResult, InspectionPlanRespVO.class)); | |
| 100 | + } | |
| 101 | + | |
| 102 | + @GetMapping("/export-excel") | |
| 103 | + @Operation(summary = "导出巡检计划汇总 Excel") | |
| 104 | + @PreAuthorize("@ss.hasPermission('garden:inspection-plan:export')") | |
| 105 | + @ApiAccessLog(operateType = EXPORT) | |
| 106 | + public void exportInspectionPlanExcel(@Valid InspectionPlanPageReqVO pageReqVO, | |
| 107 | + HttpServletResponse response) throws IOException { | |
| 108 | + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 109 | + List<InspectionPlanDO> list = inspectionPlanService.getInspectionPlanPage(pageReqVO).getList(); | |
| 110 | + // 导出 Excel | |
| 111 | + ExcelUtils.write(response, "巡检计划汇总.xls", "数据", InspectionPlanRespVO.class, | |
| 112 | + BeanUtils.toBean(list, InspectionPlanRespVO.class)); | |
| 113 | + } | |
| 114 | + | |
| 115 | +} | |
| 0 | 116 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/inspectionplan/InspectionPlanDetailController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.inspectionplan; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo.InspectionPlanDetailPageReqVO; | |
| 4 | +import com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo.InspectionPlanDetailRespVO; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo.InspectionPlanDetailSaveReqVO; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.inspectionplan.InspectionPlanDetailDO; | |
| 7 | +import com.zteits.urbanops.module.garden.service.inspectionplan.InspectionPlanDetailService; | |
| 8 | +import org.springframework.web.bind.annotation.*; | |
| 9 | +import jakarta.annotation.Resource; | |
| 10 | +import org.springframework.validation.annotation.Validated; | |
| 11 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 12 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 13 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 14 | +import io.swagger.v3.oas.annotations.Operation; | |
| 15 | + | |
| 16 | +import jakarta.validation.constraints.*; | |
| 17 | +import jakarta.validation.*; | |
| 18 | +import jakarta.servlet.http.*; | |
| 19 | +import java.util.*; | |
| 20 | +import java.io.IOException; | |
| 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 | + | |
| 34 | +@Tag(name = "管理后台 - 巡检计划") | |
| 35 | +@RestController | |
| 36 | +@RequestMapping("/garden/inspection-plan-detail") | |
| 37 | +@Validated | |
| 38 | +public class InspectionPlanDetailController { | |
| 39 | + | |
| 40 | + @Resource | |
| 41 | + private InspectionPlanDetailService inspectionPlanDetailService; | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + @PutMapping("/update") | |
| 46 | + @Operation(summary = "更新巡检计划") | |
| 47 | + @PreAuthorize("@ss.hasPermission('garden:inspection-plan-detail:update')") | |
| 48 | + public CommonResult<Boolean> updateInspectionPlanDetail(@Valid @RequestBody InspectionPlanDetailSaveReqVO updateReqVO) { | |
| 49 | + inspectionPlanDetailService.updateInspectionPlanDetail(updateReqVO); | |
| 50 | + return success(true); | |
| 51 | + } | |
| 52 | + | |
| 53 | + @DeleteMapping("/delete") | |
| 54 | + @Operation(summary = "删除巡检计划") | |
| 55 | + @Parameter(name = "id", description = "编号", required = true) | |
| 56 | + @PreAuthorize("@ss.hasPermission('garden:inspection-plan-detail:delete')") | |
| 57 | + public CommonResult<Boolean> deleteInspectionPlanDetail(@RequestParam("id") Long id) { | |
| 58 | + inspectionPlanDetailService.deleteInspectionPlanDetail(id); | |
| 59 | + return success(true); | |
| 60 | + } | |
| 61 | + | |
| 62 | + @DeleteMapping("/delete-list") | |
| 63 | + @Parameter(name = "ids", description = "编号", required = true) | |
| 64 | + @Operation(summary = "批量删除巡检计划") | |
| 65 | + @PreAuthorize("@ss.hasPermission('garden:inspection-plan-detail:delete')") | |
| 66 | + public CommonResult<Boolean> deleteInspectionPlanDetailList(@RequestParam("ids") List<Long> ids) { | |
| 67 | + inspectionPlanDetailService.deleteInspectionPlanDetailListByIds(ids); | |
| 68 | + return success(true); | |
| 69 | + } | |
| 70 | + | |
| 71 | + @GetMapping("/get") | |
| 72 | + @Operation(summary = "获得巡检计划") | |
| 73 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | |
| 74 | + @PreAuthorize("@ss.hasPermission('garden:inspection-plan-detail:query')") | |
| 75 | + public CommonResult<InspectionPlanDetailRespVO> getInspectionPlanDetail(@RequestParam("id") Long id) { | |
| 76 | + InspectionPlanDetailDO inspectionPlanDetail = inspectionPlanDetailService.getInspectionPlanDetail(id); | |
| 77 | + return success(BeanUtils.toBean(inspectionPlanDetail, InspectionPlanDetailRespVO.class)); | |
| 78 | + } | |
| 79 | + | |
| 80 | + @GetMapping("/page") | |
| 81 | + @Operation(summary = "获得巡检计划分页") | |
| 82 | + @PreAuthorize("@ss.hasPermission('garden:inspection-plan-detail:query')") | |
| 83 | + public CommonResult<PageResult<InspectionPlanDetailRespVO>> getInspectionPlanDetailPage(@Valid InspectionPlanDetailPageReqVO pageReqVO) { | |
| 84 | + PageResult<InspectionPlanDetailDO> pageResult = inspectionPlanDetailService.getInspectionPlanDetailPage(pageReqVO); | |
| 85 | + return success(BeanUtils.toBean(pageResult, InspectionPlanDetailRespVO.class)); | |
| 86 | + } | |
| 87 | + | |
| 88 | + @GetMapping("/export-excel") | |
| 89 | + @Operation(summary = "导出巡检计划 Excel") | |
| 90 | + @PreAuthorize("@ss.hasPermission('garden:inspection-plan-detail:export')") | |
| 91 | + @ApiAccessLog(operateType = EXPORT) | |
| 92 | + public void exportInspectionPlanDetailExcel(@Valid InspectionPlanDetailPageReqVO pageReqVO, | |
| 93 | + HttpServletResponse response) throws IOException { | |
| 94 | + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 95 | + List<InspectionPlanDetailDO> list = inspectionPlanDetailService.getInspectionPlanDetailPage(pageReqVO).getList(); | |
| 96 | + // 导出 Excel | |
| 97 | + ExcelUtils.write(response, "巡检计划.xls", "数据", InspectionPlanDetailRespVO.class, | |
| 98 | + BeanUtils.toBean(list, InspectionPlanDetailRespVO.class)); | |
| 99 | + } | |
| 100 | + | |
| 101 | +} | |
| 0 | 102 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/inspectionplan/InspectionPlanRoleController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.inspectionplan; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo.InspectionPlanRolePageReqVO; | |
| 4 | +import com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo.InspectionPlanRoleRespVO; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo.InspectionPlanRoleSaveReqVO; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.inspectionplan.InspectionPlanRoleDO; | |
| 7 | +import com.zteits.urbanops.module.garden.service.inspectionplan.InspectionPlanRoleService; | |
| 8 | +import org.springframework.web.bind.annotation.*; | |
| 9 | +import jakarta.annotation.Resource; | |
| 10 | +import org.springframework.validation.annotation.Validated; | |
| 11 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 12 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 13 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 14 | +import io.swagger.v3.oas.annotations.Operation; | |
| 15 | + | |
| 16 | +import jakarta.validation.constraints.*; | |
| 17 | +import jakarta.validation.*; | |
| 18 | +import jakarta.servlet.http.*; | |
| 19 | +import java.util.*; | |
| 20 | +import java.io.IOException; | |
| 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 | + | |
| 34 | +@Tag(name = "管理后台 - 巡检计划角色") | |
| 35 | +@RestController | |
| 36 | +@RequestMapping("/garden/inspection-plan-role") | |
| 37 | +@Validated | |
| 38 | +public class InspectionPlanRoleController { | |
| 39 | + | |
| 40 | + @Resource | |
| 41 | + private InspectionPlanRoleService inspectionPlanRoleService; | |
| 42 | + | |
| 43 | + @PostMapping("/create") | |
| 44 | + @Operation(summary = "创建巡检计划角色") | |
| 45 | + @PreAuthorize("@ss.hasPermission('garden:inspection-plan-role:create')") | |
| 46 | + public CommonResult<Long> createInspectionPlanRole(@Valid @RequestBody InspectionPlanRoleSaveReqVO createReqVO) { | |
| 47 | + return success(inspectionPlanRoleService.createInspectionPlanRole(createReqVO)); | |
| 48 | + } | |
| 49 | + | |
| 50 | + @PutMapping("/update") | |
| 51 | + @Operation(summary = "更新巡检计划角色") | |
| 52 | + @PreAuthorize("@ss.hasPermission('garden:inspection-plan-role:update')") | |
| 53 | + public CommonResult<Boolean> updateInspectionPlanRole(@Valid @RequestBody InspectionPlanRoleSaveReqVO updateReqVO) { | |
| 54 | + inspectionPlanRoleService.updateInspectionPlanRole(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:inspection-plan-role:delete')") | |
| 62 | + public CommonResult<Boolean> deleteInspectionPlanRole(@RequestParam("id") Long id) { | |
| 63 | + inspectionPlanRoleService.deleteInspectionPlanRole(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:inspection-plan-role:delete')") | |
| 71 | + public CommonResult<Boolean> deleteInspectionPlanRoleList(@RequestParam("ids") List<Long> ids) { | |
| 72 | + inspectionPlanRoleService.deleteInspectionPlanRoleListByIds(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:inspection-plan-role:query')") | |
| 80 | + public CommonResult<InspectionPlanRoleRespVO> getInspectionPlanRole(@RequestParam("id") Long id) { | |
| 81 | + InspectionPlanRoleDO inspectionPlanRole = inspectionPlanRoleService.getInspectionPlanRole(id); | |
| 82 | + return success(BeanUtils.toBean(inspectionPlanRole, InspectionPlanRoleRespVO.class)); | |
| 83 | + } | |
| 84 | + | |
| 85 | + @GetMapping("/page") | |
| 86 | + @Operation(summary = "获得巡检计划角色分页") | |
| 87 | + @PreAuthorize("@ss.hasPermission('garden:inspection-plan-role:query')") | |
| 88 | + public CommonResult<PageResult<InspectionPlanRoleRespVO>> getInspectionPlanRolePage(@Valid InspectionPlanRolePageReqVO pageReqVO) { | |
| 89 | + PageResult<InspectionPlanRoleDO> pageResult = inspectionPlanRoleService.getInspectionPlanRolePage(pageReqVO); | |
| 90 | + return success(BeanUtils.toBean(pageResult, InspectionPlanRoleRespVO.class)); | |
| 91 | + } | |
| 92 | + | |
| 93 | + @GetMapping("/export-excel") | |
| 94 | + @Operation(summary = "导出巡检计划角色 Excel") | |
| 95 | + @PreAuthorize("@ss.hasPermission('garden:inspection-plan-role:export')") | |
| 96 | + @ApiAccessLog(operateType = EXPORT) | |
| 97 | + public void exportInspectionPlanRoleExcel(@Valid InspectionPlanRolePageReqVO pageReqVO, | |
| 98 | + HttpServletResponse response) throws IOException { | |
| 99 | + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 100 | + List<InspectionPlanRoleDO> list = inspectionPlanRoleService.getInspectionPlanRolePage(pageReqVO).getList(); | |
| 101 | + // 导出 Excel | |
| 102 | + ExcelUtils.write(response, "巡检计划角色.xls", "数据", InspectionPlanRoleRespVO.class, | |
| 103 | + BeanUtils.toBean(list, InspectionPlanRoleRespVO.class)); | |
| 104 | + } | |
| 105 | + | |
| 106 | +} | |
| 0 | 107 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/inspectionplan/vo/InspectionPlanDetailPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo; | |
| 2 | + | |
| 3 | +import jakarta.validation.constraints.NotEmpty; | |
| 4 | +import lombok.*; | |
| 5 | + | |
| 6 | +import java.time.LocalDate; | |
| 7 | +import java.util.*; | |
| 8 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 9 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 10 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 11 | +import java.time.LocalDateTime; | |
| 12 | + | |
| 13 | +import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | |
| 14 | + | |
| 15 | +@Schema(description = "管理后台 - 巡检计划分页 Request VO") | |
| 16 | +@Data | |
| 17 | +public class InspectionPlanDetailPageReqVO extends PageParam { | |
| 18 | + | |
| 19 | + @Schema(description = "批次号") | |
| 20 | + @NotEmpty(message = "批次号不能为空") | |
| 21 | + private String batchNo; | |
| 22 | + | |
| 23 | + @Schema(description = "计划编码") | |
| 24 | + private String planNo; | |
| 25 | + | |
| 26 | + @Schema(description = "业务线: yl-园林;wy-物业:sz-市政") | |
| 27 | + private String busiLine; | |
| 28 | + | |
| 29 | + @Schema(description = "归属(一级部门id)", example = "1951") | |
| 30 | + private Long companyId; | |
| 31 | + | |
| 32 | + @Schema(description = "部门ID(道路负责部门id)", example = "16561") | |
| 33 | + private Long deptId; | |
| 34 | + | |
| 35 | + @Schema(description = "道路ID", example = "32704") | |
| 36 | + private Long roadId; | |
| 37 | + | |
| 38 | + @Schema(description = "排序号:第n次计划") | |
| 39 | + private Integer sortNum; | |
| 40 | + | |
| 41 | + @Schema(description = "执行开始时间") | |
| 42 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 43 | + private LocalDate[] beginTime; | |
| 44 | + | |
| 45 | + @Schema(description = "执行时间") | |
| 46 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 47 | + private LocalDate[] endTime; | |
| 48 | + | |
| 49 | + @Schema(description = "完成状态 1:未完成;2:进行中;3:已完成") | |
| 50 | + private Integer finishState; | |
| 51 | + | |
| 52 | + @Schema(description = "创建时间") | |
| 53 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 54 | + private LocalDateTime[] createTime; | |
| 55 | + | |
| 56 | +} | |
| 0 | 57 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/inspectionplan/vo/InspectionPlanDetailRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.*; | |
| 5 | + | |
| 6 | +import java.time.LocalDate; | |
| 7 | +import java.util.*; | |
| 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 InspectionPlanDetailRespVO { | |
| 16 | + | |
| 17 | + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16197") | |
| 18 | + @ExcelProperty("ID") | |
| 19 | + private Long id; | |
| 20 | + | |
| 21 | + @Schema(description = "批次号", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 22 | + @ExcelProperty("批次号") | |
| 23 | + private String batchNo; | |
| 24 | + | |
| 25 | + @Schema(description = "计划编码", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 26 | + @ExcelProperty("计划编码") | |
| 27 | + private String planNo; | |
| 28 | + | |
| 29 | + @Schema(description = "业务线: yl-园林;wy-物业:sz-市政", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 30 | + @ExcelProperty("业务线: yl-园林;wy-物业:sz-市政") | |
| 31 | + private String busiLine; | |
| 32 | + | |
| 33 | + @Schema(description = "归属(一级部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1951") | |
| 34 | + @ExcelProperty("归属(一级部门id)") | |
| 35 | + private Long companyId; | |
| 36 | + | |
| 37 | + @Schema(description = "部门ID(道路负责部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "16561") | |
| 38 | + @ExcelProperty("部门ID(道路负责部门id)") | |
| 39 | + private Long deptId; | |
| 40 | + | |
| 41 | + @Schema(description = "道路ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32704") | |
| 42 | + @ExcelProperty("道路ID") | |
| 43 | + private Long roadId; | |
| 44 | + | |
| 45 | + @Schema(description = "排序号:第n次计划", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 46 | + @ExcelProperty("排序号:第n次计划") | |
| 47 | + private Integer sortNum; | |
| 48 | + | |
| 49 | + @Schema(description = "执行开始时间") | |
| 50 | + @ExcelProperty("执行开始时间") | |
| 51 | + private LocalDate beginTime; | |
| 52 | + | |
| 53 | + @Schema(description = "执行时间") | |
| 54 | + @ExcelProperty("执行时间") | |
| 55 | + private LocalDate endTime; | |
| 56 | + | |
| 57 | + @Schema(description = "完成状态 1:未完成;2:进行中;3:已完成", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 58 | + @ExcelProperty("完成状态 1:未完成;2:进行中;3:已完成") | |
| 59 | + private Integer finishState; | |
| 60 | + | |
| 61 | + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 62 | + @ExcelProperty("创建时间") | |
| 63 | + private LocalDateTime createTime; | |
| 64 | + | |
| 65 | +} | |
| 0 | 66 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/inspectionplan/vo/InspectionPlanDetailSaveReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.*; | |
| 5 | + | |
| 6 | +import java.time.LocalDate; | |
| 7 | +import java.util.*; | |
| 8 | +import jakarta.validation.constraints.*; | |
| 9 | + | |
| 10 | +@Schema(description = "管理后台 - 巡检计划新增/修改 Request VO") | |
| 11 | +@Data | |
| 12 | +public class InspectionPlanDetailSaveReqVO { | |
| 13 | + | |
| 14 | + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16197") | |
| 15 | + private Long id; | |
| 16 | + | |
| 17 | + @Schema(description = "批次号", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 18 | + @NotEmpty(message = "批次号不能为空") | |
| 19 | + private String batchNo; | |
| 20 | + | |
| 21 | + @Schema(description = "计划编码", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 22 | + @NotEmpty(message = "计划编码不能为空") | |
| 23 | + private String planNo; | |
| 24 | + | |
| 25 | + @Schema(description = "业务线: yl-园林;wy-物业:sz-市政", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 26 | + @NotEmpty(message = "业务线: yl-园林;wy-物业:sz-市政不能为空") | |
| 27 | + private String busiLine; | |
| 28 | + | |
| 29 | + @Schema(description = "归属(一级部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1951") | |
| 30 | + @NotNull(message = "归属(一级部门id)不能为空") | |
| 31 | + private Long companyId; | |
| 32 | + | |
| 33 | + @Schema(description = "部门ID(道路负责部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "16561") | |
| 34 | + @NotNull(message = "部门ID(道路负责部门id)不能为空") | |
| 35 | + private Long deptId; | |
| 36 | + | |
| 37 | + @Schema(description = "道路ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32704") | |
| 38 | + @NotNull(message = "道路ID不能为空") | |
| 39 | + private Long roadId; | |
| 40 | + | |
| 41 | + @Schema(description = "排序号:第n次计划", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 42 | + @NotNull(message = "排序号:第n次计划不能为空") | |
| 43 | + private Integer sortNum; | |
| 44 | + | |
| 45 | + @Schema(description = "执行开始时间") | |
| 46 | + private LocalDate beginTime; | |
| 47 | + | |
| 48 | + @Schema(description = "执行时间") | |
| 49 | + private LocalDate endTime; | |
| 50 | + | |
| 51 | + @Schema(description = "完成状态 1:未完成;2:进行中;3:已完成", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 52 | + @NotNull(message = "完成状态 1:未完成;2:进行中;3:已完成不能为空") | |
| 53 | + private Integer finishState; | |
| 54 | + | |
| 55 | +} | |
| 0 | 56 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/inspectionplan/vo/InspectionPlanPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 5 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 6 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 7 | +import java.time.LocalDateTime; | |
| 8 | + | |
| 9 | +import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | |
| 10 | + | |
| 11 | +@Schema(description = "管理后台 - 巡检计划汇总分页 Request VO") | |
| 12 | +@Data | |
| 13 | +public class InspectionPlanPageReqVO extends PageParam { | |
| 14 | + | |
| 15 | + @Schema(description = "批次号") | |
| 16 | + private String batchNo; | |
| 17 | + | |
| 18 | + @Schema(description = "计划名称", example = "张三") | |
| 19 | + private String planName; | |
| 20 | + | |
| 21 | + | |
| 22 | + @Schema(description = "计划属性:1:标准计划;2:临时计划") | |
| 23 | + private Integer planAttr; | |
| 24 | + | |
| 25 | + @Schema(description = "养护类型:2001:浇水;2002:施肥;2003:有害生物防治;2004:修剪;2005:中耕除草;2006:打孔梳草;2007:绿地保洁;2008:园林废弃物收集运输 ;2009:补植;3001:绿地巡视;", example = "24742") | |
| 26 | + private Integer planTypeId; | |
| 27 | + | |
| 28 | + @Schema(description = "归属(一级部门id)", example = "20800") | |
| 29 | + private Long companyId; | |
| 30 | + | |
| 31 | + @Schema(description = "道路名称", example = "赵六") | |
| 32 | + private String roadName; | |
| 33 | + | |
| 34 | + @Schema(description = "养护级别: 10:特级;11:一级:12:二级;13:三级", example = "8588") | |
| 35 | + private Integer levelId; | |
| 36 | + | |
| 37 | + | |
| 38 | + @Schema(description = "开始时间") | |
| 39 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 40 | + private LocalDateTime[] beginTime; | |
| 41 | + | |
| 42 | + @Schema(description = "开始时间") | |
| 43 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 44 | + private LocalDateTime[] endTime; | |
| 45 | + | |
| 46 | +} | |
| 0 | 47 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/inspectionplan/vo/InspectionPlanRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.annotation.FieldFill; | |
| 4 | +import com.baomidou.mybatisplus.annotation.TableField; | |
| 5 | +import com.fhs.core.trans.anno.Trans; | |
| 6 | +import com.fhs.core.trans.constant.TransType; | |
| 7 | +import com.zteits.urbanops.module.garden.dal.dataobject.inspectionplan.InspectionPlanDO; | |
| 8 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 9 | +import lombok.*; | |
| 10 | +import java.time.LocalDateTime; | |
| 11 | +import cn.idev.excel.annotation.*; | |
| 12 | +import org.apache.ibatis.type.JdbcType; | |
| 13 | + | |
| 14 | +@Schema(description = "管理后台 - 巡检计划汇总 Response VO") | |
| 15 | +@Data | |
| 16 | +@ExcelIgnoreUnannotated | |
| 17 | +public class InspectionPlanRespVO { | |
| 18 | + | |
| 19 | + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10938") | |
| 20 | + @ExcelProperty("ID") | |
| 21 | + private Long id; | |
| 22 | + | |
| 23 | + @Schema(description = "批次号", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 24 | + @ExcelProperty("批次号") | |
| 25 | + private String batchNo; | |
| 26 | + | |
| 27 | + @Schema(description = "计划名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") | |
| 28 | + @ExcelProperty("计划名称") | |
| 29 | + private String planName; | |
| 30 | + | |
| 31 | + @Schema(description = "业务线: yl-园林;wy-物业:sz-市政", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 32 | + @ExcelProperty("业务线: yl-园林;wy-物业:sz-市政") | |
| 33 | + private String busiLine; | |
| 34 | + | |
| 35 | + @Schema(description = "计划属性:1:标准计划;2:临时计划", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 36 | + @ExcelProperty("计划属性:1:标准计划;2:临时计划") | |
| 37 | + private Integer planAttr; | |
| 38 | + | |
| 39 | + @Schema(description = "养护类型:2001:浇水;2002:施肥;2003:有害生物防治;2004:修剪;2005:中耕除草;2006:打孔梳草;2007:绿地保洁;2008:园林废弃物收集运输 ;2009:补植;3001:绿地巡视;", requiredMode = Schema.RequiredMode.REQUIRED, example = "24742") | |
| 40 | + @ExcelProperty("养护类型:2001:浇水;2002:施肥;2003:有害生物防治;2004:修剪;2005:中耕除草;2006:打孔梳草;2007:绿地保洁;2008:园林废弃物收集运输 ;2009:补植;3001:绿地巡视;") | |
| 41 | + private Integer planTypeId; | |
| 42 | + | |
| 43 | + @Schema(description = "归属(一级部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "20800") | |
| 44 | + @ExcelProperty("归属(一级部门id)") | |
| 45 | + private Long companyId; | |
| 46 | + | |
| 47 | + @Schema(description = "部门ID(道路负责部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "16445") | |
| 48 | + @ExcelProperty("部门ID(道路负责部门id)") | |
| 49 | + private Long deptId; | |
| 50 | + | |
| 51 | + @Schema(description = "道路ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15557") | |
| 52 | + @ExcelProperty("道路ID") | |
| 53 | + private Long roadId; | |
| 54 | + | |
| 55 | + @Schema(description = "道路名称", example = "赵六") | |
| 56 | + @ExcelProperty("道路名称") | |
| 57 | + private String roadName; | |
| 58 | + | |
| 59 | + @Schema(description = "养护级别: 10:特级;11:一级:12:二级;13:三级", requiredMode = Schema.RequiredMode.REQUIRED, example = "8588") | |
| 60 | + @ExcelProperty("养护级别: 10:特级;11:一级:12:二级;13:三级") | |
| 61 | + private Integer levelId; | |
| 62 | + | |
| 63 | + @Schema(description = "周期ID: 1:日/次;2:周/次;3:月/次;4:年/次", requiredMode = Schema.RequiredMode.REQUIRED, example = "6415") | |
| 64 | + @ExcelProperty("周期ID: 1:日/次;2:周/次;3:月/次;4:年/次") | |
| 65 | + private Integer cycleId; | |
| 66 | + | |
| 67 | + @Schema(description = "计划次数", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 68 | + @ExcelProperty("计划次数") | |
| 69 | + private Integer planNum; | |
| 70 | + | |
| 71 | + @Schema(description = "已完成次数", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 72 | + @ExcelProperty("已完成次数") | |
| 73 | + private Integer planFinishNum; | |
| 74 | + | |
| 75 | + @Schema(description = "完成状态 1:未完成;2:已完成", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 76 | + @ExcelProperty("完成状态 1:未完成;2:已完成") | |
| 77 | + private Integer finishState; | |
| 78 | + | |
| 79 | + @Schema(description = "开始时间") | |
| 80 | + @ExcelProperty("开始时间") | |
| 81 | + private LocalDateTime beginTime; | |
| 82 | + | |
| 83 | + @Schema(description = "开始时间") | |
| 84 | + @ExcelProperty("开始时间") | |
| 85 | + private LocalDateTime endTime; | |
| 86 | + | |
| 87 | + @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对") | |
| 88 | + @ExcelProperty("备注") | |
| 89 | + private String remark; | |
| 90 | + | |
| 91 | + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 92 | + @ExcelProperty("创建时间") | |
| 93 | + private LocalDateTime createTime; | |
| 94 | + | |
| 95 | + @Trans(type = TransType.SIMPLE, target = InspectionPlanDO.class, fields = {"creator", "creatorName"}, refs = {"creator", "creatorName"}) | |
| 96 | + @TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.VARCHAR) | |
| 97 | + private String creator; | |
| 98 | + | |
| 99 | + private String creatorName; | |
| 100 | + | |
| 101 | +} | |
| 0 | 102 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/inspectionplan/vo/InspectionPlanRoadReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import jakarta.validation.constraints.NotNull; | |
| 5 | +import lombok.Data; | |
| 6 | + | |
| 7 | +@Schema(description = "管理后台 - 巡检计划汇总新增/修改 Request VO") | |
| 8 | +@Data | |
| 9 | +public class InspectionPlanRoadReqVO { | |
| 10 | + | |
| 11 | + @Schema(description = "部门ID(道路负责部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "16445") | |
| 12 | + @NotNull(message = "部门ID(道路负责部门id)不能为空") | |
| 13 | + private Long deptId; | |
| 14 | + | |
| 15 | + @Schema(description = "道路ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15557") | |
| 16 | + @NotNull(message = "道路ID不能为空") | |
| 17 | + private Long roadId; | |
| 18 | + | |
| 19 | + @Schema(description = "道路名称", example = "赵六") | |
| 20 | + private String roadName; | |
| 21 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/inspectionplan/vo/InspectionPlanRolePageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.inspectionplan.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 InspectionPlanRolePageReqVO extends PageParam { | |
| 15 | + | |
| 16 | + @Schema(description = "批次号") | |
| 17 | + private String batchNo; | |
| 18 | + | |
| 19 | + @Schema(description = "归属(一级部门id)", example = "12346") | |
| 20 | + private Long companyId; | |
| 21 | + | |
| 22 | + @Schema(description = "部门ID(道路负责部门id)", example = "22415") | |
| 23 | + private Long deptId; | |
| 24 | + | |
| 25 | + @Schema(description = "角色ID", example = "21343") | |
| 26 | + private Long roleId; | |
| 27 | + | |
| 28 | + @Schema(description = "创建时间") | |
| 29 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 30 | + private LocalDateTime[] createTime; | |
| 31 | + | |
| 32 | +} | |
| 0 | 33 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/inspectionplan/vo/InspectionPlanRoleRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.inspectionplan.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 InspectionPlanRoleRespVO { | |
| 14 | + | |
| 15 | + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "4778") | |
| 16 | + @ExcelProperty("ID") | |
| 17 | + private Long id; | |
| 18 | + | |
| 19 | + @Schema(description = "批次号", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 20 | + @ExcelProperty("批次号") | |
| 21 | + private String batchNo; | |
| 22 | + | |
| 23 | + @Schema(description = "归属(一级部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "12346") | |
| 24 | + @ExcelProperty("归属(一级部门id)") | |
| 25 | + private Long companyId; | |
| 26 | + | |
| 27 | + @Schema(description = "部门ID(道路负责部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "22415") | |
| 28 | + @ExcelProperty("部门ID(道路负责部门id)") | |
| 29 | + private Long deptId; | |
| 30 | + | |
| 31 | + @Schema(description = "角色ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21343") | |
| 32 | + @ExcelProperty("角色ID") | |
| 33 | + private Long roleId; | |
| 34 | + | |
| 35 | + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 36 | + @ExcelProperty("创建时间") | |
| 37 | + private LocalDateTime createTime; | |
| 38 | + | |
| 39 | +} | |
| 0 | 40 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/inspectionplan/vo/InspectionPlanRoleSaveReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.inspectionplan.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 InspectionPlanRoleSaveReqVO { | |
| 11 | + | |
| 12 | + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "4778") | |
| 13 | + private Long id; | |
| 14 | + | |
| 15 | + @Schema(description = "批次号", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 16 | + @NotEmpty(message = "批次号不能为空") | |
| 17 | + private String batchNo; | |
| 18 | + | |
| 19 | + @Schema(description = "归属(一级部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "12346") | |
| 20 | + @NotNull(message = "归属(一级部门id)不能为空") | |
| 21 | + private Long companyId; | |
| 22 | + | |
| 23 | + @Schema(description = "部门ID(道路负责部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "22415") | |
| 24 | + @NotNull(message = "部门ID(道路负责部门id)不能为空") | |
| 25 | + private Long deptId; | |
| 26 | + | |
| 27 | + @Schema(description = "角色ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21343") | |
| 28 | + @NotNull(message = "角色ID不能为空") | |
| 29 | + private Long roleId; | |
| 30 | + | |
| 31 | +} | |
| 0 | 32 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/inspectionplan/vo/InspectionPlanSaveReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import jakarta.validation.Valid; | |
| 5 | +import lombok.*; | |
| 6 | + | |
| 7 | +import java.time.LocalDate; | |
| 8 | +import java.util.*; | |
| 9 | +import jakarta.validation.constraints.*; | |
| 10 | + | |
| 11 | + | |
| 12 | +@Schema(description = "管理后台 - 巡检计划汇总新增/修改 Request VO") | |
| 13 | +@Data | |
| 14 | +public class InspectionPlanSaveReqVO { | |
| 15 | + | |
| 16 | + @Schema(description = "计划名称后缀", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "张三") | |
| 17 | + private String planNameSuffix; | |
| 18 | + | |
| 19 | + @Schema(description = "业务线: yl-园林;wy-物业:sz-市政", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 20 | + @NotEmpty(message = "业务线: yl-园林;wy-物业:sz-市政不能为空") | |
| 21 | + private String busiLine; | |
| 22 | + | |
| 23 | + @Schema(description = "计划属性:1:标准计划;2:临时计划", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | |
| 24 | + @NotNull(message = "计划属性:1:标准计划;2:临时计划不能为空") | |
| 25 | + private Integer planAttr; | |
| 26 | + | |
| 27 | + @Schema(description = "养护类型:2001:浇水;2002:施肥;2003:有害生物防治;2004:修剪;2005:中耕除草;2006:打孔梳草;2007:绿地保洁;2008:园林废弃物收集运输 ;2009:补植;3001:绿地巡视;", requiredMode = Schema.RequiredMode.REQUIRED, example = "24742") | |
| 28 | + @NotNull(message = "养护类型:2001:浇水;2002:施肥;2003:有害生物防治;2004:修剪;2005:中耕除草;2006:打孔梳草;2007:绿地保洁;2008:园林废弃物收集运输 ;2009:补植;3001:绿地巡视;不能为空") | |
| 29 | + private Integer planTypeId; | |
| 30 | + | |
| 31 | + @Schema(description = "归属(一级部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "20800") | |
| 32 | + @NotNull(message = "归属(一级部门id)不能为空") | |
| 33 | + private Long companyId; | |
| 34 | + | |
| 35 | + @Schema(description = "道路信息", requiredMode = Schema.RequiredMode.REQUIRED, example = "[{\"deptId\":11,\"roadId\":1,\"roadName\":\"测试\"}]") | |
| 36 | + @Size(min = 1) | |
| 37 | + @Valid | |
| 38 | + private List<InspectionPlanRoadReqVO> roadListReqVO; | |
| 39 | + | |
| 40 | + @Schema(description = "养护级别: 10:特级;11:一级:12:二级;13:三级", requiredMode = Schema.RequiredMode.REQUIRED, example = "8588") | |
| 41 | + @NotNull(message = "养护级别: 10:特级;11:一级:12:二级;13:三级不能为空") | |
| 42 | + private Integer levelId; | |
| 43 | + | |
| 44 | + @Schema(description = "频次值", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 45 | + @NotEmpty(message = "频次值不能为空") | |
| 46 | + private String rateValue; | |
| 47 | + | |
| 48 | + @Schema(description = "周期ID: 1:日/次;2:周/次;3:月/次;4:年/次", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | |
| 49 | + @NotNull(message = "周期ID: 1:日/次;2:周/次;3:月/次;4:年/次不能为空") | |
| 50 | + @Min(1) | |
| 51 | + @Max(4) | |
| 52 | + private Integer cycleId; | |
| 53 | + | |
| 54 | + @Schema(description = "开始时间") | |
| 55 | + private LocalDate beginTime; | |
| 56 | + | |
| 57 | + @Schema(description = "开始时间") | |
| 58 | + private LocalDate endTime; | |
| 59 | + | |
| 60 | + @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对") | |
| 61 | + @NotEmpty(message = "备注不能为空") | |
| 62 | + private String remark; | |
| 63 | + | |
| 64 | + @NotNull(message = "角色Ids不能为空") | |
| 65 | + @Schema(description = "角色Ids", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1,2]") | |
| 66 | + @Size(min = 1) | |
| 67 | + private Set<Long> roleIds; | |
| 68 | + | |
| 69 | +} | |
| 0 | 70 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/inspectionplan/vo/InspectionPlanUpdateReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import jakarta.validation.constraints.NotEmpty; | |
| 5 | +import jakarta.validation.constraints.NotNull; | |
| 6 | +import lombok.Data; | |
| 7 | + | |
| 8 | +import java.time.LocalDateTime; | |
| 9 | + | |
| 10 | +@Schema(description = "管理后台 - 巡检计划汇总新增/修改 Request VO") | |
| 11 | +@Data | |
| 12 | +public class InspectionPlanUpdateReqVO { | |
| 13 | + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10938") | |
| 14 | + private Long id; | |
| 15 | + | |
| 16 | + | |
| 17 | + @Schema(description = "业务线: yl-园林;wy-物业:sz-市政", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 18 | + @NotEmpty(message = "业务线: yl-园林;wy-物业:sz-市政不能为空") | |
| 19 | + private String busiLine; | |
| 20 | + | |
| 21 | + @Schema(description = "计划属性:1:标准计划;2:临时计划", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 22 | + @NotNull(message = "计划属性:1:标准计划;2:临时计划不能为空") | |
| 23 | + private Integer planAttr; | |
| 24 | + | |
| 25 | + @Schema(description = "养护类型:2001:浇水;2002:施肥;2003:有害生物防治;2004:修剪;2005:中耕除草;2006:打孔梳草;2007:绿地保洁;2008:园林废弃物收集运输 ;2009:补植;3001:绿地巡视;", requiredMode = Schema.RequiredMode.REQUIRED, example = "24742") | |
| 26 | + @NotNull(message = "养护类型:2001:浇水;2002:施肥;2003:有害生物防治;2004:修剪;2005:中耕除草;2006:打孔梳草;2007:绿地保洁;2008:园林废弃物收集运输 ;2009:补植;3001:绿地巡视;不能为空") | |
| 27 | + private Integer planTypeId; | |
| 28 | + | |
| 29 | + @Schema(description = "归属(一级部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "20800") | |
| 30 | + @NotNull(message = "归属(一级部门id)不能为空") | |
| 31 | + private Long companyId; | |
| 32 | + | |
| 33 | + @Schema(description = "部门ID(道路负责部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "16445") | |
| 34 | + @NotNull(message = "部门ID(道路负责部门id)不能为空") | |
| 35 | + private Long deptId; | |
| 36 | + | |
| 37 | + @Schema(description = "道路ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15557") | |
| 38 | + @NotNull(message = "道路ID不能为空") | |
| 39 | + private Long roadId; | |
| 40 | + | |
| 41 | + @Schema(description = "道路名称", example = "赵六") | |
| 42 | + private String roadName; | |
| 43 | + | |
| 44 | + @Schema(description = "养护级别: 10:特级;11:一级:12:二级;13:三级", requiredMode = Schema.RequiredMode.REQUIRED, example = "8588") | |
| 45 | + @NotNull(message = "养护级别: 10:特级;11:一级:12:二级;13:三级不能为空") | |
| 46 | + private Integer levelId; | |
| 47 | + | |
| 48 | + @Schema(description = "周期ID: 1:日/次;2:周/次;3:月/次;4:年/次", requiredMode = Schema.RequiredMode.REQUIRED, example = "6415") | |
| 49 | + @NotNull(message = "周期ID: 1:日/次;2:周/次;3:月/次;4:年/次不能为空") | |
| 50 | + private Integer cycleId; | |
| 51 | + | |
| 52 | + @Schema(description = "计划次数", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 53 | + @NotNull(message = "计划次数不能为空") | |
| 54 | + private Integer planNum; | |
| 55 | + | |
| 56 | + @Schema(description = "已完成次数", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 57 | + @NotNull(message = "已完成次数不能为空") | |
| 58 | + private Integer planFinishNum; | |
| 59 | + | |
| 60 | + @Schema(description = "完成状态 1:未完成;2:已完成", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 61 | + @NotNull(message = "完成状态 1:未完成;2:已完成不能为空") | |
| 62 | + private Integer finishState; | |
| 63 | + | |
| 64 | + @Schema(description = "开始时间") | |
| 65 | + private LocalDateTime beginTime; | |
| 66 | + | |
| 67 | + @Schema(description = "开始时间") | |
| 68 | + private LocalDateTime endTime; | |
| 69 | + | |
| 70 | + @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对") | |
| 71 | + @NotEmpty(message = "备注不能为空") | |
| 72 | + private String remark; | |
| 73 | + | |
| 74 | +} | |
| 0 | 75 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/inspectionplan/InspectionPlanDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.inspectionplan; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import java.time.LocalDateTime; | |
| 5 | +import com.baomidou.mybatisplus.annotation.*; | |
| 6 | +import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * 巡检计划汇总 DO | |
| 10 | + * | |
| 11 | + * @author 超级管理员 | |
| 12 | + */ | |
| 13 | +@TableName("garden_inspection_plan") | |
| 14 | +@KeySequence("garden_inspection_plan_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 | |
| 15 | +@Data | |
| 16 | +@EqualsAndHashCode(callSuper = true) | |
| 17 | +@ToString(callSuper = true) | |
| 18 | +@Builder | |
| 19 | +@NoArgsConstructor | |
| 20 | +@AllArgsConstructor | |
| 21 | +public class InspectionPlanDO extends BaseDO { | |
| 22 | + | |
| 23 | + /** | |
| 24 | + * ID | |
| 25 | + */ | |
| 26 | + @TableId | |
| 27 | + private Long id; | |
| 28 | + /** | |
| 29 | + * 批次号 | |
| 30 | + */ | |
| 31 | + private String batchNo; | |
| 32 | + /** | |
| 33 | + * 计划名称 | |
| 34 | + */ | |
| 35 | + private String planName; | |
| 36 | + /** | |
| 37 | + * 业务线: yl-园林;wy-物业:sz-市政 | |
| 38 | + */ | |
| 39 | + private String busiLine; | |
| 40 | + /** | |
| 41 | + * 计划属性:1:标准计划;2:临时计划 | |
| 42 | + */ | |
| 43 | + private Integer planAttr; | |
| 44 | + /** | |
| 45 | + * 养护类型:2001:浇水;2002:施肥;2003:有害生物防治;2004:修剪;2005:中耕除草;2006:打孔梳草;2007:绿地保洁;2008:园林废弃物收集运输 ;2009:补植;3001:绿地巡视; | |
| 46 | + */ | |
| 47 | + private Integer planTypeId; | |
| 48 | + /** | |
| 49 | + * 归属(一级部门id) | |
| 50 | + */ | |
| 51 | + private Long companyId; | |
| 52 | + /** | |
| 53 | + * 部门ID(道路负责部门id) | |
| 54 | + */ | |
| 55 | + private Long deptId; | |
| 56 | + /** | |
| 57 | + * 道路ID | |
| 58 | + */ | |
| 59 | + private Long roadId; | |
| 60 | + /** | |
| 61 | + * 道路名称 | |
| 62 | + */ | |
| 63 | + private String roadName; | |
| 64 | + /** | |
| 65 | + * 养护级别: 10:特级;11:一级:12:二级;13:三级 | |
| 66 | + */ | |
| 67 | + private Integer levelId; | |
| 68 | + /** | |
| 69 | + * 周期ID: 1:日/次;2:周/次;3:月/次;4:年/次 | |
| 70 | + */ | |
| 71 | + private Integer cycleId; | |
| 72 | + /** | |
| 73 | + * 计划次数 | |
| 74 | + */ | |
| 75 | + private Integer planNum; | |
| 76 | + /** | |
| 77 | + * 已完成次数 | |
| 78 | + */ | |
| 79 | + private Integer planFinishNum; | |
| 80 | + /** | |
| 81 | + * 完成状态 1:未完成;2:已完成 | |
| 82 | + */ | |
| 83 | + private Integer finishState; | |
| 84 | + /** | |
| 85 | + * 开始时间 | |
| 86 | + */ | |
| 87 | + private LocalDateTime beginTime; | |
| 88 | + /** | |
| 89 | + * 开始时间 | |
| 90 | + */ | |
| 91 | + private LocalDateTime endTime; | |
| 92 | + /** | |
| 93 | + * 备注 | |
| 94 | + */ | |
| 95 | + private String remark; | |
| 96 | + | |
| 97 | + | |
| 98 | +} | |
| 0 | 99 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/inspectionplan/InspectionPlanDetailDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.inspectionplan; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | + | |
| 5 | +import java.time.LocalDate; | |
| 6 | +import java.util.*; | |
| 7 | +import java.time.LocalDateTime; | |
| 8 | +import java.time.LocalDateTime; | |
| 9 | +import com.baomidou.mybatisplus.annotation.*; | |
| 10 | +import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 巡检计划 DO | |
| 14 | + * | |
| 15 | + * @author 超级管理员 | |
| 16 | + */ | |
| 17 | +@TableName("garden_inspection_plan_detail") | |
| 18 | +@KeySequence("garden_inspection_plan_detail_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 InspectionPlanDetailDO extends BaseDO { | |
| 26 | + | |
| 27 | + /** | |
| 28 | + * ID | |
| 29 | + */ | |
| 30 | + @TableId | |
| 31 | + private Long id; | |
| 32 | + /** | |
| 33 | + * 批次号 | |
| 34 | + */ | |
| 35 | + private String batchNo; | |
| 36 | + /** | |
| 37 | + * 计划编码 | |
| 38 | + */ | |
| 39 | + private String planNo; | |
| 40 | + /** | |
| 41 | + * 业务线: yl-园林;wy-物业:sz-市政 | |
| 42 | + */ | |
| 43 | + private String busiLine; | |
| 44 | + /** | |
| 45 | + * 归属(一级部门id) | |
| 46 | + */ | |
| 47 | + private Long companyId; | |
| 48 | + /** | |
| 49 | + * 部门ID(道路负责部门id) | |
| 50 | + */ | |
| 51 | + private Long deptId; | |
| 52 | + /** | |
| 53 | + * 道路ID | |
| 54 | + */ | |
| 55 | + private Long roadId; | |
| 56 | + /** | |
| 57 | + * 排序号:第n次计划 | |
| 58 | + */ | |
| 59 | + private Integer sortNum; | |
| 60 | + /** | |
| 61 | + * 执行开始时间 | |
| 62 | + */ | |
| 63 | + private LocalDate beginTime; | |
| 64 | + /** | |
| 65 | + * 执行时间 | |
| 66 | + */ | |
| 67 | + private LocalDate endTime; | |
| 68 | + /** | |
| 69 | + * 完成状态 1:未完成;2:进行中;3:已完成 | |
| 70 | + */ | |
| 71 | + private Integer finishState; | |
| 72 | + | |
| 73 | + | |
| 74 | +} | |
| 0 | 75 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/inspectionplan/InspectionPlanRoleDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.inspectionplan; | |
| 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_inspection_plan_role") | |
| 16 | +@KeySequence("garden_inspection_plan_role_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 InspectionPlanRoleDO extends BaseDO { | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * ID | |
| 27 | + */ | |
| 28 | + @TableId | |
| 29 | + private Long id; | |
| 30 | + /** | |
| 31 | + * 批次号 | |
| 32 | + */ | |
| 33 | + private String batchNo; | |
| 34 | + /** | |
| 35 | + * 归属(一级部门id) | |
| 36 | + */ | |
| 37 | + private Long companyId; | |
| 38 | + /** | |
| 39 | + * 部门ID(道路负责部门id) | |
| 40 | + */ | |
| 41 | + private Long deptId; | |
| 42 | + /** | |
| 43 | + * 角色ID | |
| 44 | + */ | |
| 45 | + private Long roleId; | |
| 46 | + | |
| 47 | + | |
| 48 | +} | |
| 0 | 49 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/inspectionplan/InspectionPlanDetailMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.inspectionplan; | |
| 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.inspectionplan.InspectionPlanDetailDO; | |
| 9 | +import org.apache.ibatis.annotations.Mapper; | |
| 10 | +import com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo.*; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 巡检计划 Mapper | |
| 14 | + * | |
| 15 | + * @author 超级管理员 | |
| 16 | + */ | |
| 17 | +@Mapper | |
| 18 | +public interface InspectionPlanDetailMapper extends BaseMapperX<InspectionPlanDetailDO> { | |
| 19 | + | |
| 20 | + default PageResult<InspectionPlanDetailDO> selectPage(InspectionPlanDetailPageReqVO reqVO) { | |
| 21 | + return selectPage(reqVO, new LambdaQueryWrapperX<InspectionPlanDetailDO>() | |
| 22 | + .eqIfPresent(InspectionPlanDetailDO::getBatchNo, reqVO.getBatchNo()) | |
| 23 | + .eqIfPresent(InspectionPlanDetailDO::getPlanNo, reqVO.getPlanNo()) | |
| 24 | + .eqIfPresent(InspectionPlanDetailDO::getBusiLine, reqVO.getBusiLine()) | |
| 25 | + .eqIfPresent(InspectionPlanDetailDO::getCompanyId, reqVO.getCompanyId()) | |
| 26 | + .eqIfPresent(InspectionPlanDetailDO::getDeptId, reqVO.getDeptId()) | |
| 27 | + .eqIfPresent(InspectionPlanDetailDO::getRoadId, reqVO.getRoadId()) | |
| 28 | + .eqIfPresent(InspectionPlanDetailDO::getSortNum, reqVO.getSortNum()) | |
| 29 | + .betweenIfPresent(InspectionPlanDetailDO::getBeginTime, reqVO.getBeginTime()) | |
| 30 | + .betweenIfPresent(InspectionPlanDetailDO::getEndTime, reqVO.getEndTime()) | |
| 31 | + .eqIfPresent(InspectionPlanDetailDO::getFinishState, reqVO.getFinishState()) | |
| 32 | + .betweenIfPresent(InspectionPlanDetailDO::getCreateTime, reqVO.getCreateTime()) | |
| 33 | + .orderByDesc(InspectionPlanDetailDO::getId)); | |
| 34 | + } | |
| 35 | + | |
| 36 | +} | |
| 0 | 37 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/inspectionplan/InspectionPlanMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.inspectionplan; | |
| 2 | + | |
| 3 | + | |
| 4 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 5 | +import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 6 | +import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | |
| 7 | +import com.zteits.urbanops.module.garden.dal.dataobject.inspectionplan.InspectionPlanDO; | |
| 8 | +import org.apache.ibatis.annotations.Mapper; | |
| 9 | +import com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo.*; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 巡检计划汇总 Mapper | |
| 13 | + * | |
| 14 | + * @author 超级管理员 | |
| 15 | + */ | |
| 16 | +@Mapper | |
| 17 | +public interface InspectionPlanMapper extends BaseMapperX<InspectionPlanDO> { | |
| 18 | + | |
| 19 | + default PageResult<InspectionPlanDO> selectPage(InspectionPlanPageReqVO reqVO) { | |
| 20 | + return selectPage(reqVO, new LambdaQueryWrapperX<InspectionPlanDO>() | |
| 21 | + .eqIfPresent(InspectionPlanDO::getBatchNo, reqVO.getBatchNo()) | |
| 22 | + .likeIfPresent(InspectionPlanDO::getPlanName, reqVO.getPlanName()) | |
| 23 | + .eqIfPresent(InspectionPlanDO::getPlanAttr, reqVO.getPlanAttr()) | |
| 24 | + .eqIfPresent(InspectionPlanDO::getPlanTypeId, reqVO.getPlanTypeId()) | |
| 25 | + .eqIfPresent(InspectionPlanDO::getCompanyId, reqVO.getCompanyId()) | |
| 26 | + .likeIfPresent(InspectionPlanDO::getRoadName, reqVO.getRoadName()) | |
| 27 | + .eqIfPresent(InspectionPlanDO::getLevelId, reqVO.getLevelId()) | |
| 28 | + .betweenIfPresent(InspectionPlanDO::getBeginTime, reqVO.getBeginTime()) | |
| 29 | + .betweenIfPresent(InspectionPlanDO::getEndTime, reqVO.getEndTime()) | |
| 30 | + .orderByDesc(InspectionPlanDO::getId)); | |
| 31 | + } | |
| 32 | + | |
| 33 | +} | |
| 0 | 34 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/inspectionplan/InspectionPlanRoleMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.inspectionplan; | |
| 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.controller.admin.inspectionplan.vo.InspectionPlanRolePageReqVO; | |
| 9 | +import com.zteits.urbanops.module.garden.dal.dataobject.inspectionplan.InspectionPlanRoleDO; | |
| 10 | +import org.apache.ibatis.annotations.Mapper; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 巡检计划角色 Mapper | |
| 14 | + * | |
| 15 | + * @author 超级管理员 | |
| 16 | + */ | |
| 17 | +@Mapper | |
| 18 | +public interface InspectionPlanRoleMapper extends BaseMapperX<InspectionPlanRoleDO> { | |
| 19 | + | |
| 20 | + default PageResult<InspectionPlanRoleDO> selectPage(InspectionPlanRolePageReqVO reqVO) { | |
| 21 | + return selectPage(reqVO, new LambdaQueryWrapperX<InspectionPlanRoleDO>() | |
| 22 | + .eqIfPresent(InspectionPlanRoleDO::getBatchNo, reqVO.getBatchNo()) | |
| 23 | + .eqIfPresent(InspectionPlanRoleDO::getCompanyId, reqVO.getCompanyId()) | |
| 24 | + .eqIfPresent(InspectionPlanRoleDO::getDeptId, reqVO.getDeptId()) | |
| 25 | + .eqIfPresent(InspectionPlanRoleDO::getRoleId, reqVO.getRoleId()) | |
| 26 | + .betweenIfPresent(InspectionPlanRoleDO::getCreateTime, reqVO.getCreateTime()) | |
| 27 | + .orderByDesc(InspectionPlanRoleDO::getId)); | |
| 28 | + } | |
| 29 | + | |
| 30 | +} | |
| 0 | 31 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/enums/ErrorCodeConstants.java
| ... | ... | @@ -52,4 +52,10 @@ public interface ErrorCodeConstants { |
| 52 | 52 | ErrorCode WASTE_RECORD_NOT_EXISTS = new ErrorCode(1-100-003-012, "园林废弃物录入不存在"); |
| 53 | 53 | |
| 54 | 54 | ErrorCode WATER_FEE_NOT_EXISTS = new ErrorCode(1-100-003-013, "水费录入信息不存在"); |
| 55 | + | |
| 56 | + // ========== 巡检计划汇总 TODO 补充编号 ========== | |
| 57 | + ErrorCode INSPECTION_PLAN_NOT_EXISTS = new ErrorCode(1-200-100-001, "巡检计划汇总不存在"); | |
| 58 | + ErrorCode INSPECTION_CYCLE_ID_ERROR = new ErrorCode(1-200-100-002, "周期id错误"); | |
| 59 | + ErrorCode INSPECTION_CYCLE_ERROR = new ErrorCode(1-200-100-003, "获取两个时间之间间隔天数错误"); | |
| 60 | + ErrorCode INSPECTION_PLAN_EXISTS = new ErrorCode(1-200-100-004, "道路对应类型已存在记录"); | |
| 55 | 61 | } | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/enums/FinishStateEnum.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.enums; | |
| 2 | + | |
| 3 | + | |
| 4 | +public enum FinishStateEnum { | |
| 5 | + | |
| 6 | + /** | |
| 7 | + * 未完成 | |
| 8 | + */ | |
| 9 | + NOT_FINISHED(1), | |
| 10 | + /** | |
| 11 | + * 已完成 | |
| 12 | + */ | |
| 13 | + FINISHED(2), | |
| 14 | + ; | |
| 15 | + | |
| 16 | + FinishStateEnum(Integer status) { | |
| 17 | + this.status = status; | |
| 18 | + } | |
| 19 | + | |
| 20 | + private Integer status; | |
| 21 | + | |
| 22 | + public Integer getStatus() { | |
| 23 | + return status; | |
| 24 | + } | |
| 25 | + | |
| 26 | + public void setStatus(Integer status) { | |
| 27 | + this.status = status; | |
| 28 | + } | |
| 29 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/enums/PlanConstants.java
0 → 100644
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/inspectionplan/InspectionPlanDetailService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.inspectionplan; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | +import jakarta.validation.*; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo.*; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.inspectionplan.InspectionPlanDetailDO; | |
| 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 InspectionPlanDetailService { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 创建巡检计划 | |
| 19 | + * | |
| 20 | + * @param createReqVO 创建信息 | |
| 21 | + * @return 编号 | |
| 22 | + */ | |
| 23 | + Long createInspectionPlanDetail(@Valid InspectionPlanDetailSaveReqVO createReqVO); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 更新巡检计划 | |
| 27 | + * | |
| 28 | + * @param updateReqVO 更新信息 | |
| 29 | + */ | |
| 30 | + void updateInspectionPlanDetail(@Valid InspectionPlanDetailSaveReqVO updateReqVO); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 删除巡检计划 | |
| 34 | + * | |
| 35 | + * @param id 编号 | |
| 36 | + */ | |
| 37 | + void deleteInspectionPlanDetail(Long id); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 批量删除巡检计划 | |
| 41 | + * | |
| 42 | + * @param ids 编号 | |
| 43 | + */ | |
| 44 | + void deleteInspectionPlanDetailListByIds(List<Long> ids); | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 获得巡检计划 | |
| 48 | + * | |
| 49 | + * @param id 编号 | |
| 50 | + * @return 巡检计划 | |
| 51 | + */ | |
| 52 | + InspectionPlanDetailDO getInspectionPlanDetail(Long id); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 获得巡检计划分页 | |
| 56 | + * | |
| 57 | + * @param pageReqVO 分页查询 | |
| 58 | + * @return 巡检计划分页 | |
| 59 | + */ | |
| 60 | + PageResult<InspectionPlanDetailDO> getInspectionPlanDetailPage(InspectionPlanDetailPageReqVO pageReqVO); | |
| 61 | + | |
| 62 | +} | |
| 0 | 63 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/inspectionplan/InspectionPlanDetailServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.inspectionplan; | |
| 2 | + | |
| 3 | +import cn.hutool.core.collection.CollUtil; | |
| 4 | +import org.springframework.stereotype.Service; | |
| 5 | +import jakarta.annotation.Resource; | |
| 6 | +import org.springframework.validation.annotation.Validated; | |
| 7 | +import org.springframework.transaction.annotation.Transactional; | |
| 8 | + | |
| 9 | +import java.util.*; | |
| 10 | +import com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo.*; | |
| 11 | +import com.zteits.urbanops.module.garden.dal.dataobject.inspectionplan.InspectionPlanDetailDO; | |
| 12 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 13 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 14 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 15 | + | |
| 16 | +import com.zteits.urbanops.module.garden.dal.mysql.inspectionplan.InspectionPlanDetailMapper; | |
| 17 | + | |
| 18 | +import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 19 | +import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.convertList; | |
| 20 | +import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.diffList; | |
| 21 | +import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.*; | |
| 22 | + | |
| 23 | +/** | |
| 24 | + * 巡检计划 Service 实现类 | |
| 25 | + * | |
| 26 | + * @author 超级管理员 | |
| 27 | + */ | |
| 28 | +@Service | |
| 29 | +@Validated | |
| 30 | +public class InspectionPlanDetailServiceImpl implements InspectionPlanDetailService { | |
| 31 | + | |
| 32 | + @Resource | |
| 33 | + private InspectionPlanDetailMapper inspectionPlanDetailMapper; | |
| 34 | + | |
| 35 | + @Override | |
| 36 | + public Long createInspectionPlanDetail(InspectionPlanDetailSaveReqVO createReqVO) { | |
| 37 | + // 插入 | |
| 38 | + InspectionPlanDetailDO inspectionPlanDetail = BeanUtils.toBean(createReqVO, InspectionPlanDetailDO.class); | |
| 39 | + inspectionPlanDetailMapper.insert(inspectionPlanDetail); | |
| 40 | + | |
| 41 | + // 返回 | |
| 42 | + return inspectionPlanDetail.getId(); | |
| 43 | + } | |
| 44 | + | |
| 45 | + @Override | |
| 46 | + public void updateInspectionPlanDetail(InspectionPlanDetailSaveReqVO updateReqVO) { | |
| 47 | + // 校验存在 | |
| 48 | + validateInspectionPlanDetailExists(updateReqVO.getId()); | |
| 49 | + // 更新 | |
| 50 | + InspectionPlanDetailDO updateObj = BeanUtils.toBean(updateReqVO, InspectionPlanDetailDO.class); | |
| 51 | + inspectionPlanDetailMapper.updateById(updateObj); | |
| 52 | + } | |
| 53 | + | |
| 54 | + @Override | |
| 55 | + public void deleteInspectionPlanDetail(Long id) { | |
| 56 | + // 校验存在 | |
| 57 | + validateInspectionPlanDetailExists(id); | |
| 58 | + // 删除 | |
| 59 | + inspectionPlanDetailMapper.deleteById(id); | |
| 60 | + } | |
| 61 | + | |
| 62 | + @Override | |
| 63 | + public void deleteInspectionPlanDetailListByIds(List<Long> ids) { | |
| 64 | + // 删除 | |
| 65 | + inspectionPlanDetailMapper.deleteByIds(ids); | |
| 66 | + } | |
| 67 | + | |
| 68 | + | |
| 69 | + private void validateInspectionPlanDetailExists(Long id) { | |
| 70 | + if (inspectionPlanDetailMapper.selectById(id) == null) { | |
| 71 | + //throw exception(INSPECTION_PLAN_DETAIL_NOT_EXISTS); | |
| 72 | + } | |
| 73 | + } | |
| 74 | + | |
| 75 | + @Override | |
| 76 | + public InspectionPlanDetailDO getInspectionPlanDetail(Long id) { | |
| 77 | + return inspectionPlanDetailMapper.selectById(id); | |
| 78 | + } | |
| 79 | + | |
| 80 | + @Override | |
| 81 | + public PageResult<InspectionPlanDetailDO> getInspectionPlanDetailPage(InspectionPlanDetailPageReqVO pageReqVO) { | |
| 82 | + return inspectionPlanDetailMapper.selectPage(pageReqVO); | |
| 83 | + } | |
| 84 | + | |
| 85 | +} | |
| 0 | 86 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/inspectionplan/InspectionPlanRoleService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.inspectionplan; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | + | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo.InspectionPlanRolePageReqVO; | |
| 6 | +import com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo.InspectionPlanRoleSaveReqVO; | |
| 7 | +import com.zteits.urbanops.module.garden.dal.dataobject.inspectionplan.InspectionPlanRoleDO; | |
| 8 | +import jakarta.validation.*; | |
| 9 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 巡检计划角色 Service 接口 | |
| 13 | + * | |
| 14 | + * @author 超级管理员 | |
| 15 | + */ | |
| 16 | +public interface InspectionPlanRoleService { | |
| 17 | + | |
| 18 | + /** | |
| 19 | + * 创建巡检计划角色 | |
| 20 | + * | |
| 21 | + * @param createReqVO 创建信息 | |
| 22 | + * @return 编号 | |
| 23 | + */ | |
| 24 | + Long createInspectionPlanRole(@Valid InspectionPlanRoleSaveReqVO createReqVO); | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * 更新巡检计划角色 | |
| 28 | + * | |
| 29 | + * @param updateReqVO 更新信息 | |
| 30 | + */ | |
| 31 | + void updateInspectionPlanRole(@Valid InspectionPlanRoleSaveReqVO updateReqVO); | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 删除巡检计划角色 | |
| 35 | + * | |
| 36 | + * @param id 编号 | |
| 37 | + */ | |
| 38 | + void deleteInspectionPlanRole(Long id); | |
| 39 | + | |
| 40 | + /** | |
| 41 | + * 批量删除巡检计划角色 | |
| 42 | + * | |
| 43 | + * @param ids 编号 | |
| 44 | + */ | |
| 45 | + void deleteInspectionPlanRoleListByIds(List<Long> ids); | |
| 46 | + | |
| 47 | + /** | |
| 48 | + * 获得巡检计划角色 | |
| 49 | + * | |
| 50 | + * @param id 编号 | |
| 51 | + * @return 巡检计划角色 | |
| 52 | + */ | |
| 53 | + InspectionPlanRoleDO getInspectionPlanRole(Long id); | |
| 54 | + | |
| 55 | + /** | |
| 56 | + * 获得巡检计划角色分页 | |
| 57 | + * | |
| 58 | + * @param pageReqVO 分页查询 | |
| 59 | + * @return 巡检计划角色分页 | |
| 60 | + */ | |
| 61 | + PageResult<InspectionPlanRoleDO> getInspectionPlanRolePage(InspectionPlanRolePageReqVO pageReqVO); | |
| 62 | + | |
| 63 | +} | |
| 0 | 64 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/inspectionplan/InspectionPlanRoleServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.inspectionplan; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo.InspectionPlanRolePageReqVO; | |
| 4 | +import com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo.InspectionPlanRoleSaveReqVO; | |
| 5 | +import com.zteits.urbanops.module.garden.dal.dataobject.inspectionplan.InspectionPlanRoleDO; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.mysql.inspectionplan.InspectionPlanRoleMapper; | |
| 7 | +import org.springframework.stereotype.Service; | |
| 8 | +import jakarta.annotation.Resource; | |
| 9 | +import org.springframework.validation.annotation.Validated; | |
| 10 | + | |
| 11 | +import java.util.*; | |
| 12 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 13 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 14 | + | |
| 15 | +/** | |
| 16 | + * 巡检计划角色 Service 实现类 | |
| 17 | + * | |
| 18 | + * @author 超级管理员 | |
| 19 | + */ | |
| 20 | +@Service | |
| 21 | +@Validated | |
| 22 | +public class InspectionPlanRoleServiceImpl implements InspectionPlanRoleService { | |
| 23 | + | |
| 24 | + @Resource | |
| 25 | + private InspectionPlanRoleMapper inspectionPlanRoleMapper; | |
| 26 | + | |
| 27 | + @Override | |
| 28 | + public Long createInspectionPlanRole(InspectionPlanRoleSaveReqVO createReqVO) { | |
| 29 | + // 插入 | |
| 30 | + InspectionPlanRoleDO inspectionPlanRole = BeanUtils.toBean(createReqVO, InspectionPlanRoleDO.class); | |
| 31 | + inspectionPlanRoleMapper.insert(inspectionPlanRole); | |
| 32 | + | |
| 33 | + // 返回 | |
| 34 | + return inspectionPlanRole.getId(); | |
| 35 | + } | |
| 36 | + | |
| 37 | + @Override | |
| 38 | + public void updateInspectionPlanRole(InspectionPlanRoleSaveReqVO updateReqVO) { | |
| 39 | + // 校验存在 | |
| 40 | + validateInspectionPlanRoleExists(updateReqVO.getId()); | |
| 41 | + // 更新 | |
| 42 | + InspectionPlanRoleDO updateObj = BeanUtils.toBean(updateReqVO, InspectionPlanRoleDO.class); | |
| 43 | + inspectionPlanRoleMapper.updateById(updateObj); | |
| 44 | + } | |
| 45 | + | |
| 46 | + @Override | |
| 47 | + public void deleteInspectionPlanRole(Long id) { | |
| 48 | + // 校验存在 | |
| 49 | + validateInspectionPlanRoleExists(id); | |
| 50 | + // 删除 | |
| 51 | + inspectionPlanRoleMapper.deleteById(id); | |
| 52 | + } | |
| 53 | + | |
| 54 | + @Override | |
| 55 | + public void deleteInspectionPlanRoleListByIds(List<Long> ids) { | |
| 56 | + // 删除 | |
| 57 | + inspectionPlanRoleMapper.deleteByIds(ids); | |
| 58 | + } | |
| 59 | + | |
| 60 | + | |
| 61 | + private void validateInspectionPlanRoleExists(Long id) { | |
| 62 | + if (inspectionPlanRoleMapper.selectById(id) == null) { | |
| 63 | + //throw exception(""); | |
| 64 | + } | |
| 65 | + } | |
| 66 | + | |
| 67 | + @Override | |
| 68 | + public InspectionPlanRoleDO getInspectionPlanRole(Long id) { | |
| 69 | + return inspectionPlanRoleMapper.selectById(id); | |
| 70 | + } | |
| 71 | + | |
| 72 | + @Override | |
| 73 | + public PageResult<InspectionPlanRoleDO> getInspectionPlanRolePage(InspectionPlanRolePageReqVO pageReqVO) { | |
| 74 | + return inspectionPlanRoleMapper.selectPage(pageReqVO); | |
| 75 | + } | |
| 76 | + | |
| 77 | +} | |
| 0 | 78 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/inspectionplan/InspectionPlanService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.inspectionplan; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | + | |
| 5 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 6 | +import jakarta.validation.*; | |
| 7 | +import com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo.*; | |
| 8 | +import com.zteits.urbanops.module.garden.dal.dataobject.inspectionplan.InspectionPlanDO; | |
| 9 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 巡检计划汇总 Service 接口 | |
| 13 | + * | |
| 14 | + * @author 超级管理员 | |
| 15 | + */ | |
| 16 | +public interface InspectionPlanService { | |
| 17 | + | |
| 18 | + /** | |
| 19 | + * 创建巡检计划汇总 | |
| 20 | + * | |
| 21 | + * @param createReqVO 创建信息 | |
| 22 | + * @return 编号 | |
| 23 | + */ | |
| 24 | + CommonResult<Long> createInspectionPlan(@Valid InspectionPlanSaveReqVO createReqVO); | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * 更新巡检计划汇总 | |
| 28 | + * | |
| 29 | + * @param updateReqVO 更新信息 | |
| 30 | + */ | |
| 31 | + void updateInspectionPlan(@Valid InspectionPlanUpdateReqVO updateReqVO); | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 删除巡检计划汇总 | |
| 35 | + * | |
| 36 | + * @param id 编号 | |
| 37 | + */ | |
| 38 | + void deleteInspectionPlan(Long id); | |
| 39 | + | |
| 40 | + /** | |
| 41 | + * 批量删除巡检计划汇总 | |
| 42 | + * | |
| 43 | + * @param ids 编号 | |
| 44 | + */ | |
| 45 | + void deleteInspectionPlanListByIds(List<Long> ids); | |
| 46 | + | |
| 47 | + /** | |
| 48 | + * 获得巡检计划汇总 | |
| 49 | + * | |
| 50 | + * @param id 编号 | |
| 51 | + * @return 巡检计划汇总 | |
| 52 | + */ | |
| 53 | + InspectionPlanDO getInspectionPlan(Long id); | |
| 54 | + | |
| 55 | + /** | |
| 56 | + * 获得巡检计划汇总分页 | |
| 57 | + * | |
| 58 | + * @param pageReqVO 分页查询 | |
| 59 | + * @return 巡检计划汇总分页 | |
| 60 | + */ | |
| 61 | + PageResult<InspectionPlanDO> getInspectionPlanPage(InspectionPlanPageReqVO pageReqVO); | |
| 62 | + | |
| 63 | + /** | |
| 64 | + * 根据批次号删除 | |
| 65 | + * @param batchNo 批次号 | |
| 66 | + */ | |
| 67 | + void deleteInspectionPlanByBatchNo(String batchNo); | |
| 68 | + | |
| 69 | +} | |
| 0 | 70 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/inspectionplan/InspectionPlanServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.inspectionplan; | |
| 2 | + | |
| 3 | +import cn.hutool.core.date.DateUtil; | |
| 4 | +import cn.hutool.core.util.RandomUtil; | |
| 5 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |
| 6 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 7 | +import com.zteits.urbanops.framework.common.util.collection.CollectionUtils; | |
| 8 | +import com.zteits.urbanops.framework.dict.core.DictFrameworkUtils; | |
| 9 | +import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; | |
| 10 | +import com.zteits.urbanops.module.garden.dal.dataobject.inspectionplan.InspectionPlanDetailDO; | |
| 11 | +import com.zteits.urbanops.module.garden.dal.dataobject.inspectionplan.InspectionPlanRoleDO; | |
| 12 | +import com.zteits.urbanops.module.garden.dal.mysql.inspectionplan.InspectionPlanDetailMapper; | |
| 13 | +import com.zteits.urbanops.module.garden.dal.mysql.inspectionplan.InspectionPlanRoleMapper; | |
| 14 | +import com.zteits.urbanops.module.garden.enums.FinishStateEnum; | |
| 15 | +import com.zteits.urbanops.module.garden.enums.PlanConstants; | |
| 16 | +import com.zteits.urbanops.module.garden.util.TimeIntervalCalculatorUtil; | |
| 17 | +import lombok.extern.slf4j.Slf4j; | |
| 18 | +import org.springframework.stereotype.Service; | |
| 19 | +import jakarta.annotation.Resource; | |
| 20 | +import org.springframework.transaction.annotation.Transactional; | |
| 21 | +import org.springframework.validation.annotation.Validated; | |
| 22 | + | |
| 23 | +import java.time.LocalDate; | |
| 24 | +import java.time.LocalDateTime; | |
| 25 | +import java.time.format.DateTimeFormatter; | |
| 26 | +import java.util.*; | |
| 27 | +import java.util.concurrent.atomic.AtomicInteger; | |
| 28 | +import java.util.stream.Collectors; | |
| 29 | + | |
| 30 | +import com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo.*; | |
| 31 | +import com.zteits.urbanops.module.garden.dal.dataobject.inspectionplan.InspectionPlanDO; | |
| 32 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 33 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 34 | + | |
| 35 | +import com.zteits.urbanops.module.garden.dal.mysql.inspectionplan.InspectionPlanMapper; | |
| 36 | + | |
| 37 | +import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 38 | +import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.*; | |
| 39 | + | |
| 40 | +/** | |
| 41 | + * 巡检计划汇总 Service 实现类 | |
| 42 | + * | |
| 43 | + * @author 超级管理员 | |
| 44 | + */ | |
| 45 | +@Service | |
| 46 | +@Validated | |
| 47 | +@Slf4j | |
| 48 | +public class InspectionPlanServiceImpl implements InspectionPlanService { | |
| 49 | + | |
| 50 | + @Resource | |
| 51 | + private InspectionPlanMapper inspectionPlanMapper; | |
| 52 | + | |
| 53 | + @Resource | |
| 54 | + private InspectionPlanDetailMapper inspectionPlanDetailMapper; | |
| 55 | + | |
| 56 | + @Resource | |
| 57 | + private InspectionPlanRoleMapper inspectionPlanRoleMapper; | |
| 58 | + | |
| 59 | + @Transactional(rollbackFor = Exception.class) | |
| 60 | + @Override | |
| 61 | + public CommonResult<Long> createInspectionPlan(InspectionPlanSaveReqVO createReqVO) { | |
| 62 | + //存在性校验 | |
| 63 | + validateInspectionPlanExists(createReqVO); | |
| 64 | + LocalDateTime now = LocalDateTime.now(); | |
| 65 | + String userName = SecurityFrameworkUtils.getLoginUserId()+""; | |
| 66 | + int rateValue; | |
| 67 | + if (createReqVO.getRateValue().contains("/")) { | |
| 68 | + rateValue = Integer.parseInt(createReqVO.getRateValue().split("/")[1]); | |
| 69 | + } else { | |
| 70 | + rateValue = Integer.parseInt(createReqVO.getRateValue()); | |
| 71 | + } | |
| 72 | + //计算开始和计算时间 在间隔周期下每天的次数 | |
| 73 | + List<String> betweenDayList = TimeIntervalCalculatorUtil.calculateIntervals(createReqVO.getBeginTime(), createReqVO.getEndTime(), createReqVO.getCycleId(), rateValue); | |
| 74 | + if (CollectionUtils.isAnyEmpty(betweenDayList)) { | |
| 75 | + log.warn("获取两个时间之间间隔天数错误"); | |
| 76 | + return CommonResult.error(INSPECTION_CYCLE_ERROR); | |
| 77 | + } | |
| 78 | + //计算计划次数 | |
| 79 | + Integer planNum = betweenDayList.size(); | |
| 80 | + InspectionPlanDO inspectionPlan = BeanUtils.toBean(createReqVO, InspectionPlanDO.class); | |
| 81 | + AtomicInteger count = new AtomicInteger(); | |
| 82 | + | |
| 83 | + //按照道路创建计划 | |
| 84 | + createReqVO.getRoadListReqVO().forEach(roadReqVO -> { | |
| 85 | + String batchNo = "BN" + DateUtil.format(new Date(), "yyyyMMddHHmmssSSS") + RandomUtil.randomInt(1000); | |
| 86 | + inspectionPlan.setBatchNo(batchNo); | |
| 87 | + inspectionPlan.setPlanFinishNum(0); | |
| 88 | + inspectionPlan.setFinishState(FinishStateEnum.NOT_FINISHED.getStatus()); | |
| 89 | + inspectionPlan.setPlanNum(planNum); | |
| 90 | + inspectionPlan.setCreateTime(now); | |
| 91 | + inspectionPlan.setUpdateTime(now); | |
| 92 | + inspectionPlan.setCreator(userName); | |
| 93 | + inspectionPlan.setUpdater(userName); | |
| 94 | + inspectionPlan.setDeptId(roadReqVO.getDeptId()); | |
| 95 | + inspectionPlan.setRoadId(roadReqVO.getRoadId()); | |
| 96 | + inspectionPlan.setRoadName(roadReqVO.getRoadName()); | |
| 97 | + //计划属性label | |
| 98 | + String planAttrLabel = DictFrameworkUtils.parseDictDataLabel(PlanConstants.GARDEN_PLAN_ATTR_REDIS_KEY, createReqVO.getPlanAttr()); | |
| 99 | + inspectionPlan.setPlanName(roadReqVO.getRoadName() + planAttrLabel + createReqVO.getPlanNameSuffix()); | |
| 100 | + /*1.插入巡查计划*/ | |
| 101 | + count.addAndGet(inspectionPlanMapper.insert(inspectionPlan)); | |
| 102 | + /*2.插入角色*/ | |
| 103 | + createReqVO.getRoleIds().forEach(roleId -> { | |
| 104 | + InspectionPlanRoleDO inspectionPlanRoleDO = new InspectionPlanRoleDO(); | |
| 105 | + inspectionPlanRoleDO.setBatchNo(batchNo); | |
| 106 | + inspectionPlanRoleDO.setCompanyId(createReqVO.getCompanyId()); | |
| 107 | + inspectionPlanRoleDO.setDeptId(roadReqVO.getDeptId()); | |
| 108 | + inspectionPlanRoleDO.setCreateTime(now); | |
| 109 | + inspectionPlanRoleDO.setUpdateTime(now); | |
| 110 | + inspectionPlanRoleDO.setCreator(userName); | |
| 111 | + inspectionPlanRoleDO.setUpdater(userName); | |
| 112 | + inspectionPlanRoleDO.setRoleId(roleId); | |
| 113 | + inspectionPlanRoleMapper.insert(inspectionPlanRoleDO); | |
| 114 | + }); | |
| 115 | + /*3.插入巡查计划明细*/ | |
| 116 | + for (int i = 0; i < betweenDayList.size(); i++) { | |
| 117 | + String[] dateStr = betweenDayList.get(i).split("/"); | |
| 118 | + InspectionPlanDetailDO entity = getInspectionPlanDetailDO(batchNo, createReqVO, roadReqVO, now, userName); | |
| 119 | + entity.setSortNum(i+1); | |
| 120 | + entity.setBeginTime(LocalDate.parse(dateStr[0], DateTimeFormatter.ofPattern("yyyy-MM-dd"))); | |
| 121 | + entity.setEndTime(LocalDate.parse(dateStr[1], DateTimeFormatter.ofPattern("yyyy-MM-dd"))); | |
| 122 | + | |
| 123 | + inspectionPlanDetailMapper.insert(entity); | |
| 124 | + } | |
| 125 | + }); | |
| 126 | + | |
| 127 | + // 返回 | |
| 128 | + return CommonResult.success(count.longValue()); | |
| 129 | + } | |
| 130 | + | |
| 131 | + private InspectionPlanDetailDO getInspectionPlanDetailDO(String batchNo, InspectionPlanSaveReqVO saveReqVO, | |
| 132 | + InspectionPlanRoadReqVO roadReqVO, LocalDateTime now, String userName) { | |
| 133 | + InspectionPlanDetailDO entity = new InspectionPlanDetailDO(); | |
| 134 | + entity.setBatchNo(batchNo); | |
| 135 | + entity.setPlanNo("P" + DateUtil.format(new Date(), "yyyyMMddHHmmssSSS") + RandomUtil.randomInt(1000)); | |
| 136 | + entity.setBusiLine(saveReqVO.getBusiLine()); | |
| 137 | + entity.setCompanyId(saveReqVO.getCompanyId()); | |
| 138 | + entity.setDeptId(roadReqVO.getDeptId()); | |
| 139 | + entity.setRoadId(roadReqVO.getRoadId()); | |
| 140 | + entity.setFinishState(FinishStateEnum.NOT_FINISHED.getStatus()); | |
| 141 | + entity.setCreator(userName); | |
| 142 | + entity.setUpdater(userName); | |
| 143 | + entity.setCreateTime(now); | |
| 144 | + entity.setUpdateTime(now); | |
| 145 | + return entity; | |
| 146 | + } | |
| 147 | + | |
| 148 | + @Override | |
| 149 | + public void updateInspectionPlan(InspectionPlanUpdateReqVO updateReqVO) { | |
| 150 | + // 校验存在 | |
| 151 | + validateInspectionPlanExists(updateReqVO.getId()); | |
| 152 | + // 更新 | |
| 153 | + InspectionPlanDO updateObj = BeanUtils.toBean(updateReqVO, InspectionPlanDO.class); | |
| 154 | + inspectionPlanMapper.updateById(updateObj); | |
| 155 | + } | |
| 156 | + | |
| 157 | + @Override | |
| 158 | + public void deleteInspectionPlan(Long id) { | |
| 159 | + // 校验存在 | |
| 160 | + validateInspectionPlanExists(id); | |
| 161 | + // 删除 | |
| 162 | + inspectionPlanMapper.deleteById(id); | |
| 163 | + } | |
| 164 | + | |
| 165 | + @Override | |
| 166 | + public void deleteInspectionPlanListByIds(List<Long> ids) { | |
| 167 | + // 删除 | |
| 168 | + inspectionPlanMapper.deleteByIds(ids); | |
| 169 | + } | |
| 170 | + | |
| 171 | + | |
| 172 | + private void validateInspectionPlanExists(InspectionPlanSaveReqVO req) { | |
| 173 | + Set<Long> roadIds = req.getRoadListReqVO().stream().map(InspectionPlanRoadReqVO::getRoadId).collect(Collectors.toSet()); | |
| 174 | + QueryWrapper<InspectionPlanDO> sql = new QueryWrapper<>(); | |
| 175 | + sql.lambda().eq(InspectionPlanDO::getPlanTypeId, req.getPlanTypeId()) | |
| 176 | + .in(InspectionPlanDO::getRoadId, roadIds) | |
| 177 | + .between(InspectionPlanDO::getBeginTime, req.getBeginTime(), req.getEndTime()); | |
| 178 | + | |
| 179 | + Long count = inspectionPlanMapper.selectCount(sql); | |
| 180 | + if (count > 0) { | |
| 181 | + throw exception(INSPECTION_PLAN_EXISTS); | |
| 182 | + } | |
| 183 | + } | |
| 184 | + | |
| 185 | + private void validateInspectionPlanExists(Long id) { | |
| 186 | + if (inspectionPlanMapper.selectById(id) == null) { | |
| 187 | + throw exception(INSPECTION_PLAN_NOT_EXISTS); | |
| 188 | + } | |
| 189 | + } | |
| 190 | + | |
| 191 | + | |
| 192 | + @Override | |
| 193 | + public InspectionPlanDO getInspectionPlan(Long id) { | |
| 194 | + return inspectionPlanMapper.selectById(id); | |
| 195 | + } | |
| 196 | + | |
| 197 | + @Override | |
| 198 | + public PageResult<InspectionPlanDO> getInspectionPlanPage(InspectionPlanPageReqVO pageReqVO) { | |
| 199 | + return inspectionPlanMapper.selectPage(pageReqVO); | |
| 200 | + } | |
| 201 | + | |
| 202 | + @Override | |
| 203 | + public void deleteInspectionPlanByBatchNo(String batchNo) { | |
| 204 | + inspectionPlanMapper.delete(InspectionPlanDO::getBatchNo, batchNo); | |
| 205 | + inspectionPlanDetailMapper.delete(InspectionPlanDetailDO::getBatchNo, batchNo); | |
| 206 | + inspectionPlanRoleMapper.delete(InspectionPlanRoleDO::getBatchNo, batchNo); | |
| 207 | + } | |
| 208 | + | |
| 209 | +} | |
| 0 | 210 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/util/TimeIntervalCalculatorUtil.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.util; | |
| 2 | + | |
| 3 | + | |
| 4 | +import java.time.LocalDate; | |
| 5 | +import java.util.ArrayList; | |
| 6 | +import java.util.List; | |
| 7 | + | |
| 8 | +import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 9 | +import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.INSPECTION_CYCLE_ID_ERROR; | |
| 10 | + | |
| 11 | +public class TimeIntervalCalculatorUtil { | |
| 12 | + enum IntervalUnit { | |
| 13 | + DAY, WEEK, MONTH, YEAR | |
| 14 | + } | |
| 15 | + | |
| 16 | + public static void main(String[] args) { | |
| 17 | + | |
| 18 | + System.out.println("请输入开始日期(yyyy-MM-dd):"); | |
| 19 | + LocalDate startDate = LocalDate.of(2025,10,1); | |
| 20 | + | |
| 21 | + System.out.println("请输入结束日期(yyyy-MM-dd):"); | |
| 22 | + LocalDate endDate = LocalDate.of(2025,10,7); | |
| 23 | + | |
| 24 | + System.out.println("请选择间隔单位(1.天 2.周 3.月 4.年):"); | |
| 25 | + IntervalUnit unit = IntervalUnit.DAY; | |
| 26 | + | |
| 27 | + System.out.println("请输入间隔数量(如2表示每2天/周/月/年):"); | |
| 28 | + int intervalCount =2; | |
| 29 | + | |
| 30 | + List<String> intervals = calculateIntervals(startDate, endDate, 1, intervalCount); | |
| 31 | + | |
| 32 | + System.out.println("\n执行周期:"); | |
| 33 | + intervals.forEach(System.out::println); | |
| 34 | + } | |
| 35 | + | |
| 36 | + /** | |
| 37 | + * 执行次数计算 | |
| 38 | + * @param start | |
| 39 | + * @param end | |
| 40 | + * @param cycleId 1:日/次;2:周/次;3:月/次;4:年/次 | |
| 41 | + * @param intervalCount | |
| 42 | + * @return | |
| 43 | + */ | |
| 44 | + public static List<String> calculateIntervals(LocalDate start, LocalDate end, Integer cycleId, int intervalCount) { | |
| 45 | + List<String> intervals = new ArrayList<>(); | |
| 46 | + LocalDate currentStart = start; | |
| 47 | + IntervalUnit unit = getIntervalUnit(cycleId); | |
| 48 | + | |
| 49 | + while (currentStart.isBefore(end) || currentStart.isEqual(end)) { | |
| 50 | + LocalDate currentEnd = calculateEndDate(currentStart, end, unit, intervalCount); | |
| 51 | + intervals.add(currentStart + "/" + currentEnd); | |
| 52 | + currentStart = currentEnd.plusDays(1); | |
| 53 | + } | |
| 54 | + | |
| 55 | + return intervals; | |
| 56 | + } | |
| 57 | + | |
| 58 | + private static LocalDate calculateEndDate(LocalDate currentStart, LocalDate endDate, | |
| 59 | + IntervalUnit unit, int intervalCount) { | |
| 60 | + switch (unit) { | |
| 61 | + case DAY: | |
| 62 | + LocalDate dayEnd = currentStart.plusDays(intervalCount - 1); | |
| 63 | + return dayEnd.isAfter(endDate) ? endDate : dayEnd; | |
| 64 | + case WEEK: | |
| 65 | + LocalDate weekEnd = currentStart.plusDays(7 * intervalCount - 1); | |
| 66 | + return weekEnd.isAfter(endDate) ? endDate : weekEnd; | |
| 67 | + case MONTH: | |
| 68 | + LocalDate monthEnd = currentStart.plusMonths(intervalCount) | |
| 69 | + .withDayOfMonth(1).minusDays(1); | |
| 70 | + return monthEnd.isAfter(endDate) ? endDate : monthEnd; | |
| 71 | + case YEAR: | |
| 72 | + LocalDate yearEnd = currentStart.plusYears(intervalCount) | |
| 73 | + .withDayOfYear(1).minusDays(1); | |
| 74 | + return yearEnd.isAfter(endDate) ? endDate : yearEnd; | |
| 75 | + default: | |
| 76 | + return endDate; | |
| 77 | + } | |
| 78 | + } | |
| 79 | + | |
| 80 | + /** | |
| 81 | + * 转换枚举 | |
| 82 | + * @param cycleId 1:日/次;2:周/次;3:月/次;4:年/次 | |
| 83 | + * @return | |
| 84 | + */ | |
| 85 | + public static IntervalUnit getIntervalUnit(Integer cycleId) { | |
| 86 | + switch (cycleId) { | |
| 87 | + case 1: | |
| 88 | + return IntervalUnit.DAY; | |
| 89 | + case 2: | |
| 90 | + return IntervalUnit.WEEK; | |
| 91 | + case 3: | |
| 92 | + return IntervalUnit.MONTH; | |
| 93 | + case 4: | |
| 94 | + return IntervalUnit.YEAR; | |
| 95 | + default: | |
| 96 | + throw exception(INSPECTION_CYCLE_ID_ERROR); | |
| 97 | + } | |
| 98 | + } | |
| 99 | + | |
| 100 | +} | ... | ... |
urbanops-module-garden/src/main/resources/mapper/inspectionplan/InspectionPlanDetailMapper.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.inspectionplan.InspectionPlanDetailMapper"> | |
| 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/inspectionplan/InspectionPlanMapper.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.inspectionplan.InspectionPlanMapper"> | |
| 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 | ... | ... |