Commit 59523d5fb7148123ca1ea2f0a3d8bc30912f9b12
1 parent
04ee424b
添加道路及删除
Showing
30 changed files
with
682 additions
and
760 deletions
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/maintainrate/MaintainRateController.java deleted
| 1 | -package com.zteits.urbanops.module.garden.controller.admin.maintainrate; | |
| 2 | - | |
| 3 | -import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 4 | -import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 5 | -import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; | |
| 6 | -import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 7 | -import com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo.MaintainRatePageReqVO; | |
| 8 | -import com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo.MaintainRateReqVO; | |
| 9 | -import com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo.MaintainRateRespVO; | |
| 10 | -import com.zteits.urbanops.module.garden.dal.dataobject.maintainrate.MaintainRateDO; | |
| 11 | -import com.zteits.urbanops.module.garden.service.maintainrate.MaintainRateService; | |
| 12 | -import io.swagger.v3.oas.annotations.Operation; | |
| 13 | -import io.swagger.v3.oas.annotations.Parameter; | |
| 14 | -import io.swagger.v3.oas.annotations.tags.Tag; | |
| 15 | -import jakarta.annotation.Resource; | |
| 16 | -import jakarta.servlet.http.HttpServletResponse; | |
| 17 | -import jakarta.validation.Valid; | |
| 18 | -import org.springframework.security.access.prepost.PreAuthorize; | |
| 19 | -import org.springframework.web.bind.annotation.*; | |
| 20 | - | |
| 21 | -import java.io.IOException; | |
| 22 | -import java.util.List; | |
| 23 | - | |
| 24 | -import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 25 | -import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 26 | -import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; | |
| 27 | - | |
| 28 | -@Tag(name = "管理后台 - 养护频次") | |
| 29 | -@RestController | |
| 30 | -@RequestMapping("/maintain/rate") | |
| 31 | -public class MaintainRateController { | |
| 32 | - | |
| 33 | - @Resource | |
| 34 | - private MaintainRateService maintainRateService; | |
| 35 | - | |
| 36 | - @PostMapping("/listForPage") | |
| 37 | - @Operation(summary = "养护频次-分页查询") | |
| 38 | - @PreAuthorize("@ss.hasPermission('garden:maintain-rate:query')") | |
| 39 | - public CommonResult<PageResult<MaintainRateDO>> listForPage(@Valid @RequestBody MaintainRatePageReqVO reqVO) { | |
| 40 | - return success(maintainRateService.selectPage(reqVO)); | |
| 41 | - } | |
| 42 | - | |
| 43 | - @PostMapping("/getMaintainRateValue") | |
| 44 | - @Operation(summary = "养护频次-获取养护频次值") | |
| 45 | - @PreAuthorize("@ss.hasPermission('garden:maintain-rate:query')") | |
| 46 | - public CommonResult<MaintainRateRespVO> getMaintainRateValue(@Valid @RequestBody MaintainRateReqVO reqVO) { | |
| 47 | - return success(maintainRateService.getMaintainRateValue(reqVO)); | |
| 48 | - } | |
| 49 | - | |
| 50 | - @GetMapping("/selectMaintainRateByLevel") | |
| 51 | - @Operation(summary = "通过植物类型获取养护频次值") | |
| 52 | - @PreAuthorize("@ss.hasPermission('garden:maintain-rate:query')") | |
| 53 | - public CommonResult<MaintainRateRespVO> selectMaintainRateByLevel(@RequestParam("maintain_type_id") Integer maintainTypeId, | |
| 54 | - @RequestParam("level") Integer level) { | |
| 55 | - return success(maintainRateService.selectMaintainRateByLevel(maintainTypeId, level)); | |
| 56 | - } | |
| 57 | - | |
| 58 | - @GetMapping("/export") | |
| 59 | - @Operation(summary = "导出养护频次列表") | |
| 60 | - @PreAuthorize("@ss.hasPermission('garden:maintain-rate:export')") | |
| 61 | - @ApiAccessLog(operateType = EXPORT) | |
| 62 | - public void exportExcel(@Valid MaintainRatePageReqVO reqVO, HttpServletResponse response) throws IOException { | |
| 63 | - List<MaintainRateDO> list = maintainRateService.selectPage(reqVO).getList(); | |
| 64 | - ExcelUtils.write(response, "养护频次.xls", "数据", MaintainRateDO.class, | |
| 65 | - BeanUtils.toBean(list, MaintainRateDO.class)); | |
| 66 | - } | |
| 67 | - | |
| 68 | - @GetMapping("/{id}") | |
| 69 | - @Operation(summary = "养护频次-详情") | |
| 70 | - @Parameter(name = "id", description = "编号", required = true) | |
| 71 | - @PreAuthorize("@ss.hasPermission('garden:maintain-rate:query')") | |
| 72 | - public CommonResult<MaintainRateDO> getInfo(@PathVariable("id") Long id) { | |
| 73 | - return success(maintainRateService.selectById(id)); | |
| 74 | - } | |
| 75 | - | |
| 76 | - @PostMapping("/add") | |
| 77 | - @Operation(summary = "养护频次-添加") | |
| 78 | - @PreAuthorize("@ss.hasPermission('garden:maintain-rate:create')") | |
| 79 | - public CommonResult<Boolean> add(@Valid @RequestBody MaintainRateDO entity) { | |
| 80 | - entity.setStatus("0"); | |
| 81 | - return success(maintainRateService.insert(entity)); | |
| 82 | - } | |
| 83 | - | |
| 84 | - @PostMapping("/edit") | |
| 85 | - @Operation(summary = "养护频次-修改") | |
| 86 | - @PreAuthorize("@ss.hasPermission('garden:maintain-rate:update')") | |
| 87 | - public CommonResult<Boolean> edit(@Valid @RequestBody MaintainRateDO entity) { | |
| 88 | - return success(maintainRateService.update(entity)); | |
| 89 | - } | |
| 90 | - | |
| 91 | - @GetMapping("/delete/byId") | |
| 92 | - @Operation(summary = "养护频次-删除") | |
| 93 | - @PreAuthorize("@ss.hasPermission('garden:maintain-rate:delete')") | |
| 94 | - public CommonResult<Boolean> deleteById(@RequestParam("id") Long id) { | |
| 95 | - return success(maintainRateService.deleteById(id)); | |
| 96 | - } | |
| 97 | -} | |
| 98 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/maintainrate/vo/MaintainRatePageReqVO.java deleted
| 1 | -package com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo; | |
| 2 | - | |
| 3 | -import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 4 | -import io.swagger.v3.oas.annotations.media.Schema; | |
| 5 | -import lombok.Data; | |
| 6 | - | |
| 7 | -@Data | |
| 8 | -public class MaintainRatePageReqVO extends PageParam { | |
| 9 | - @Schema(description = "类型:1巡查;2养护") | |
| 10 | - private Integer type; | |
| 11 | - | |
| 12 | - @Schema(description = "科目ID") | |
| 13 | - private Integer maintainSubjectId; | |
| 14 | - | |
| 15 | - @Schema(description = "科目名称") | |
| 16 | - private String maintainSubjectName; | |
| 17 | - | |
| 18 | - @Schema(description = "养护类型ID") | |
| 19 | - private Integer maintainTypeId; | |
| 20 | - | |
| 21 | - @Schema(description = "养护类型名称") | |
| 22 | - private String maintainTypeName; | |
| 23 | - | |
| 24 | - @Schema(description = "周期ID") | |
| 25 | - private Integer cycleId; | |
| 26 | - | |
| 27 | - @Schema(description = "周期名称") | |
| 28 | - private String cycleName; | |
| 29 | - | |
| 30 | - @Schema(description = "状态") | |
| 31 | - private String status; | |
| 32 | -} | |
| 33 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/maintainrate/vo/MaintainRateReqVO.java deleted
| 1 | -package com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo; | |
| 2 | - | |
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | -import jakarta.validation.constraints.NotNull; | |
| 5 | -import lombok.Data; | |
| 6 | - | |
| 7 | -@Data | |
| 8 | -public class MaintainRateReqVO { | |
| 9 | - @NotNull | |
| 10 | - @Schema(description = "科目ID") | |
| 11 | - private Integer maintainSubjectId; | |
| 12 | - | |
| 13 | - @NotNull | |
| 14 | - @Schema(description = "养护类型ID") | |
| 15 | - private Integer maintainTypeId; | |
| 16 | -} | |
| 17 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/maintainrate/vo/MaintainRateRespVO.java deleted
| 1 | -package com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo; | |
| 2 | - | |
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | -import lombok.Data; | |
| 5 | - | |
| 6 | -@Data | |
| 7 | -public class MaintainRateRespVO { | |
| 8 | - @Schema(description = "养护类型ID") | |
| 9 | - private Integer maintainTypeId; | |
| 10 | - @Schema(description = "养护类型名称") | |
| 11 | - private String maintainTypeName; | |
| 12 | - | |
| 13 | - @Schema(description = "周期ID") | |
| 14 | - private Integer cycleId; | |
| 15 | - @Schema(description = "周期名称") | |
| 16 | - private String cycleName; | |
| 17 | - | |
| 18 | - @Schema(description = "特级频次") | |
| 19 | - private String levelTop; | |
| 20 | - @Schema(description = "一级频次") | |
| 21 | - private String levelOne; | |
| 22 | - @Schema(description = "二级频次") | |
| 23 | - private String levelTwo; | |
| 24 | - @Schema(description = "三级频次") | |
| 25 | - private String levelThree; | |
| 26 | - | |
| 27 | - @Schema(description = "根据等级选择的频次值") | |
| 28 | - private String value; | |
| 29 | -} | |
| 30 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/road/RoadController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.road; | |
| 2 | + | |
| 3 | +import org.springframework.web.bind.annotation.*; | |
| 4 | +import jakarta.annotation.Resource; | |
| 5 | +import org.springframework.validation.annotation.Validated; | |
| 6 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 7 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 8 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 9 | +import io.swagger.v3.oas.annotations.Operation; | |
| 10 | + | |
| 11 | +import jakarta.validation.constraints.*; | |
| 12 | +import jakarta.validation.*; | |
| 13 | +import jakarta.servlet.http.*; | |
| 14 | +import java.util.*; | |
| 15 | +import java.io.IOException; | |
| 16 | + | |
| 17 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 18 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 19 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 20 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 21 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 22 | + | |
| 23 | +import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; | |
| 24 | + | |
| 25 | +import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; | |
| 26 | +import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.*; | |
| 27 | + | |
| 28 | +import com.zteits.urbanops.module.garden.controller.admin.road.vo.*; | |
| 29 | +import com.zteits.urbanops.module.garden.dal.dataobject.road.RoadDO; | |
| 30 | +import com.zteits.urbanops.module.garden.service.road.RoadService; | |
| 31 | + | |
| 32 | +@Tag(name = "管理后台 - 道路管理") | |
| 33 | +@RestController | |
| 34 | +@RequestMapping("/garden/road") | |
| 35 | +@Validated | |
| 36 | +public class RoadController { | |
| 37 | + | |
| 38 | + @Resource | |
| 39 | + private RoadService roadService; | |
| 40 | + | |
| 41 | + @PostMapping("/create") | |
| 42 | + @Operation(summary = "创建道路管理") | |
| 43 | + @PreAuthorize("@ss.hasPermission('garden:road:create')") | |
| 44 | + public CommonResult<Long> createRoad(@Valid @RequestBody RoadSaveReqVO createReqVO) { | |
| 45 | + return success(roadService.createRoad(createReqVO)); | |
| 46 | + } | |
| 47 | + | |
| 48 | + @PutMapping("/update") | |
| 49 | + @Operation(summary = "更新道路管理") | |
| 50 | + @PreAuthorize("@ss.hasPermission('garden:road:update')") | |
| 51 | + public CommonResult<Boolean> updateRoad(@Valid @RequestBody RoadSaveReqVO updateReqVO) { | |
| 52 | + roadService.updateRoad(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:road:delete')") | |
| 60 | + public CommonResult<Boolean> deleteRoad(@RequestParam("id") Long id) { | |
| 61 | + roadService.deleteRoad(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:road:delete')") | |
| 69 | + public CommonResult<Boolean> deleteRoadList(@RequestParam("ids") List<Long> ids) { | |
| 70 | + roadService.deleteRoadListByIds(ids); | |
| 71 | + return success(true); | |
| 72 | + } | |
| 73 | + | |
| 74 | + @GetMapping("/get") | |
| 75 | + @Operation(summary = "获得道路管理") | |
| 76 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | |
| 77 | + @PreAuthorize("@ss.hasPermission('garden:road:query')") | |
| 78 | + public CommonResult<RoadRespVO> getRoad(@RequestParam("id") Long id) { | |
| 79 | + RoadDO road = roadService.getRoad(id); | |
| 80 | + return success(BeanUtils.toBean(road, RoadRespVO.class)); | |
| 81 | + } | |
| 82 | + | |
| 83 | + @GetMapping("/page") | |
| 84 | + @Operation(summary = "获得道路管理分页") | |
| 85 | + @PreAuthorize("@ss.hasPermission('garden:road:query')") | |
| 86 | + public CommonResult<PageResult<RoadRespVO>> getRoadPage(@Valid RoadPageReqVO pageReqVO) { | |
| 87 | + PageResult<RoadDO> pageResult = roadService.getRoadPage(pageReqVO); | |
| 88 | + return success(BeanUtils.toBean(pageResult, RoadRespVO.class)); | |
| 89 | + } | |
| 90 | + | |
| 91 | + @GetMapping("/export-excel") | |
| 92 | + @Operation(summary = "导出道路管理 Excel") | |
| 93 | + @PreAuthorize("@ss.hasPermission('garden:road:export')") | |
| 94 | + @ApiAccessLog(operateType = EXPORT) | |
| 95 | + public void exportRoadExcel(@Valid RoadPageReqVO pageReqVO, | |
| 96 | + HttpServletResponse response) throws IOException { | |
| 97 | + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 98 | + List<RoadDO> list = roadService.getRoadPage(pageReqVO).getList(); | |
| 99 | + // 导出 Excel | |
| 100 | + ExcelUtils.write(response, "道路管理.xls", "数据", RoadRespVO.class, | |
| 101 | + BeanUtils.toBean(list, RoadRespVO.class)); | |
| 102 | + } | |
| 103 | + | |
| 104 | +} | |
| 0 | 105 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/road/vo/RoadPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.road.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 RoadPageReqVO extends PageParam { | |
| 15 | + | |
| 16 | + @Schema(description = "道路名称", example = "赵六") | |
| 17 | + private String roadName; | |
| 18 | + | |
| 19 | + @Schema(description = "街道ID", example = "30480") | |
| 20 | + private String streetId; | |
| 21 | + | |
| 22 | + @Schema(description = "街道名称", example = "赵六") | |
| 23 | + private String streetName; | |
| 24 | + | |
| 25 | + @Schema(description = "养护级别: 10:特级;11:一级:12:二级;13:三级", example = "26337") | |
| 26 | + private Integer levelId; | |
| 27 | + | |
| 28 | + @Schema(description = "行道树绿化面积") | |
| 29 | + private String greenBeltTreeArea; | |
| 30 | + | |
| 31 | + @Schema(description = "绿化带面积") | |
| 32 | + private String greenBeltArea; | |
| 33 | + | |
| 34 | + @Schema(description = "总绿化带面积") | |
| 35 | + private String totalArea; | |
| 36 | + | |
| 37 | + @Schema(description = "行道树(棵)面积") | |
| 38 | + private String treeArea; | |
| 39 | + | |
| 40 | + @Schema(description = "起点经度") | |
| 41 | + private String startingLatitude; | |
| 42 | + | |
| 43 | + @Schema(description = "起点维度") | |
| 44 | + private String startingLongitude; | |
| 45 | + | |
| 46 | + @Schema(description = "起点描述", example = "你猜") | |
| 47 | + private String startingRemark; | |
| 48 | + | |
| 49 | + @Schema(description = "终点经度") | |
| 50 | + private String endLatitude; | |
| 51 | + | |
| 52 | + @Schema(description = "终点维度") | |
| 53 | + private String endLongitude; | |
| 54 | + | |
| 55 | + @Schema(description = "终点描述", example = "你猜") | |
| 56 | + private String endRemark; | |
| 57 | + | |
| 58 | + @Schema(description = "备注", example = "你猜") | |
| 59 | + private String remark; | |
| 60 | + | |
| 61 | + @Schema(description = "归属(一级部门id)", example = "2323") | |
| 62 | + private Long companyId; | |
| 63 | + | |
| 64 | + @Schema(description = "部门ID(道路负责部门id)", example = "13872") | |
| 65 | + private Long deptId; | |
| 66 | + | |
| 67 | + @Schema(description = "创建者", example = "赵六") | |
| 68 | + private String creatorName; | |
| 69 | + | |
| 70 | + @Schema(description = "创建时间") | |
| 71 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 72 | + private LocalDateTime[] createTime; | |
| 73 | + | |
| 74 | + @Schema(description = "更新者", example = "芋艿") | |
| 75 | + private String updaterName; | |
| 76 | + | |
| 77 | +} | |
| 0 | 78 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/road/vo/RoadRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.road.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 RoadRespVO { | |
| 14 | + | |
| 15 | + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15456") | |
| 16 | + @ExcelProperty("ID") | |
| 17 | + private Long id; | |
| 18 | + | |
| 19 | + @Schema(description = "道路名称", example = "赵六") | |
| 20 | + @ExcelProperty("道路名称") | |
| 21 | + private String roadName; | |
| 22 | + | |
| 23 | + @Schema(description = "街道ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30480") | |
| 24 | + @ExcelProperty("街道ID") | |
| 25 | + private String streetId; | |
| 26 | + | |
| 27 | + @Schema(description = "街道名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") | |
| 28 | + @ExcelProperty("街道名称") | |
| 29 | + private String streetName; | |
| 30 | + | |
| 31 | + @Schema(description = "养护级别: 10:特级;11:一级:12:二级;13:三级", requiredMode = Schema.RequiredMode.REQUIRED, example = "26337") | |
| 32 | + @ExcelProperty("养护级别: 10:特级;11:一级:12:二级;13:三级") | |
| 33 | + private Integer levelId; | |
| 34 | + | |
| 35 | + @Schema(description = "行道树绿化面积", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 36 | + @ExcelProperty("行道树绿化面积") | |
| 37 | + private String greenBeltTreeArea; | |
| 38 | + | |
| 39 | + @Schema(description = "绿化带面积", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 40 | + @ExcelProperty("绿化带面积") | |
| 41 | + private String greenBeltArea; | |
| 42 | + | |
| 43 | + @Schema(description = "总绿化带面积", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 44 | + @ExcelProperty("总绿化带面积") | |
| 45 | + private String totalArea; | |
| 46 | + | |
| 47 | + @Schema(description = "行道树(棵)面积", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 48 | + @ExcelProperty("行道树(棵)面积") | |
| 49 | + private String treeArea; | |
| 50 | + | |
| 51 | + @Schema(description = "起点经度", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 52 | + @ExcelProperty("起点经度") | |
| 53 | + private String startingLatitude; | |
| 54 | + | |
| 55 | + @Schema(description = "起点维度", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 56 | + @ExcelProperty("起点维度") | |
| 57 | + private String startingLongitude; | |
| 58 | + | |
| 59 | + @Schema(description = "起点描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜") | |
| 60 | + @ExcelProperty("起点描述") | |
| 61 | + private String startingRemark; | |
| 62 | + | |
| 63 | + @Schema(description = "终点经度", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 64 | + @ExcelProperty("终点经度") | |
| 65 | + private String endLatitude; | |
| 66 | + | |
| 67 | + @Schema(description = "终点维度", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 68 | + @ExcelProperty("终点维度") | |
| 69 | + private String endLongitude; | |
| 70 | + | |
| 71 | + @Schema(description = "终点描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜") | |
| 72 | + @ExcelProperty("终点描述") | |
| 73 | + private String endRemark; | |
| 74 | + | |
| 75 | + @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜") | |
| 76 | + @ExcelProperty("备注") | |
| 77 | + private String remark; | |
| 78 | + | |
| 79 | + @Schema(description = "归属(一级部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2323") | |
| 80 | + @ExcelProperty("归属(一级部门id)") | |
| 81 | + private Long companyId; | |
| 82 | + | |
| 83 | + @Schema(description = "部门ID(道路负责部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "13872") | |
| 84 | + @ExcelProperty("部门ID(道路负责部门id)") | |
| 85 | + private Long deptId; | |
| 86 | + | |
| 87 | + @Schema(description = "创建者", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") | |
| 88 | + @ExcelProperty("创建者") | |
| 89 | + private String creatorName; | |
| 90 | + | |
| 91 | + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 92 | + @ExcelProperty("创建时间") | |
| 93 | + private LocalDateTime createTime; | |
| 94 | + | |
| 95 | + @Schema(description = "更新者", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") | |
| 96 | + @ExcelProperty("更新者") | |
| 97 | + private String updaterName; | |
| 98 | + | |
| 99 | +} | |
| 0 | 100 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/road/vo/RoadSaveReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.road.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 RoadSaveReqVO { | |
| 11 | + | |
| 12 | + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15456") | |
| 13 | + private Long id; | |
| 14 | + | |
| 15 | + @Schema(description = "道路名称", example = "赵六") | |
| 16 | + private String roadName; | |
| 17 | + | |
| 18 | + @Schema(description = "街道ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30480") | |
| 19 | + @NotEmpty(message = "街道ID不能为空") | |
| 20 | + private String streetId; | |
| 21 | + | |
| 22 | + @Schema(description = "街道名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") | |
| 23 | + @NotEmpty(message = "街道名称不能为空") | |
| 24 | + private String streetName; | |
| 25 | + | |
| 26 | + @Schema(description = "养护级别: 10:特级;11:一级:12:二级;13:三级", requiredMode = Schema.RequiredMode.REQUIRED, example = "26337") | |
| 27 | + @NotNull(message = "养护级别: 10:特级;11:一级:12:二级;13:三级不能为空") | |
| 28 | + private Integer levelId; | |
| 29 | + | |
| 30 | + @Schema(description = "行道树绿化面积", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 31 | + @NotEmpty(message = "行道树绿化面积不能为空") | |
| 32 | + private String greenBeltTreeArea; | |
| 33 | + | |
| 34 | + @Schema(description = "绿化带面积", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 35 | + @NotEmpty(message = "绿化带面积不能为空") | |
| 36 | + private String greenBeltArea; | |
| 37 | + | |
| 38 | + @Schema(description = "总绿化带面积", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 39 | + @NotEmpty(message = "总绿化带面积不能为空") | |
| 40 | + private String totalArea; | |
| 41 | + | |
| 42 | + @Schema(description = "行道树(棵)面积", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 43 | + @NotEmpty(message = "行道树(棵)面积不能为空") | |
| 44 | + private String treeArea; | |
| 45 | + | |
| 46 | + @Schema(description = "起点经度", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 47 | + @NotEmpty(message = "起点经度不能为空") | |
| 48 | + private String startingLatitude; | |
| 49 | + | |
| 50 | + @Schema(description = "起点维度", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 51 | + @NotEmpty(message = "起点维度不能为空") | |
| 52 | + private String startingLongitude; | |
| 53 | + | |
| 54 | + @Schema(description = "起点描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜") | |
| 55 | + @NotEmpty(message = "起点描述不能为空") | |
| 56 | + private String startingRemark; | |
| 57 | + | |
| 58 | + @Schema(description = "终点经度", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 59 | + @NotEmpty(message = "终点经度不能为空") | |
| 60 | + private String endLatitude; | |
| 61 | + | |
| 62 | + @Schema(description = "终点维度", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 63 | + @NotEmpty(message = "终点维度不能为空") | |
| 64 | + private String endLongitude; | |
| 65 | + | |
| 66 | + @Schema(description = "终点描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜") | |
| 67 | + @NotEmpty(message = "终点描述不能为空") | |
| 68 | + private String endRemark; | |
| 69 | + | |
| 70 | + @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜") | |
| 71 | + @NotEmpty(message = "备注不能为空") | |
| 72 | + private String remark; | |
| 73 | + | |
| 74 | + @Schema(description = "归属(一级部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2323") | |
| 75 | + @NotNull(message = "归属(一级部门id)不能为空") | |
| 76 | + private Long companyId; | |
| 77 | + | |
| 78 | + @Schema(description = "部门ID(道路负责部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "13872") | |
| 79 | + @NotNull(message = "部门ID(道路负责部门id)不能为空") | |
| 80 | + private Long deptId; | |
| 81 | + | |
| 82 | + @Schema(description = "创建者", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") | |
| 83 | + @NotEmpty(message = "创建者不能为空") | |
| 84 | + private String creatorName; | |
| 85 | + | |
| 86 | + @Schema(description = "更新者", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") | |
| 87 | + @NotEmpty(message = "更新者不能为空") | |
| 88 | + private String updaterName; | |
| 89 | + | |
| 90 | +} | |
| 0 | 91 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/roadmanager/RoadManagerController.java deleted
| 1 | -package com.zteits.urbanops.module.garden.controller.admin.roadmanager; | |
| 2 | - | |
| 3 | -import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 4 | -import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 5 | -import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; | |
| 6 | -import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 7 | -import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; | |
| 8 | -import com.zteits.urbanops.module.garden.controller.admin.roadmanager.vo.RoadManagerPageReqVO; | |
| 9 | -import com.zteits.urbanops.module.garden.controller.admin.roadmanager.vo.RoadManagerSaveReqVO; | |
| 10 | -import com.zteits.urbanops.module.garden.dal.dataobject.road.RoadManagerDO; | |
| 11 | -import com.zteits.urbanops.module.garden.service.road.RoadManagerService; | |
| 12 | -import io.swagger.v3.oas.annotations.Operation; | |
| 13 | -import io.swagger.v3.oas.annotations.Parameter; | |
| 14 | -import io.swagger.v3.oas.annotations.tags.Tag; | |
| 15 | -import jakarta.annotation.Resource; | |
| 16 | -import jakarta.servlet.http.HttpServletResponse; | |
| 17 | -import jakarta.validation.Valid; | |
| 18 | -import org.springframework.security.access.prepost.PreAuthorize; | |
| 19 | -import org.springframework.web.bind.annotation.*; | |
| 20 | - | |
| 21 | -import java.io.IOException; | |
| 22 | -import java.util.List; | |
| 23 | - | |
| 24 | -import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 25 | -import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 26 | -import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; | |
| 27 | - | |
| 28 | -@Tag(name = "管理后台 - 道路数据管理") | |
| 29 | -@RestController | |
| 30 | -@RequestMapping("/road/manager") | |
| 31 | -public class RoadManagerController { | |
| 32 | - | |
| 33 | - @Resource | |
| 34 | - private RoadManagerService roadManagerService; | |
| 35 | - | |
| 36 | - @PostMapping("/listForPage") | |
| 37 | - @Operation(summary = "道路数据管理-分页") | |
| 38 | - @PreAuthorize("@ss.hasPermission('garden:road-manager:query')") | |
| 39 | - public CommonResult<PageResult<RoadManagerDO>> listForPage(@Valid @RequestBody RoadManagerPageReqVO reqVO) { | |
| 40 | - return success(roadManagerService.selectPage(reqVO)); | |
| 41 | - } | |
| 42 | - | |
| 43 | - @GetMapping("/export") | |
| 44 | - @Operation(summary = "道路数据管理-导出") | |
| 45 | - @PreAuthorize("@ss.hasPermission('garden:road-manager:export')") | |
| 46 | - @ApiAccessLog(operateType = EXPORT) | |
| 47 | - public void exportExcel(RoadManagerPageReqVO reqVO, HttpServletResponse response) throws IOException { | |
| 48 | - List<RoadManagerDO> list = roadManagerService.selectPage(reqVO).getList(); | |
| 49 | - ExcelUtils.write(response, "道路数据.xls", "数据", RoadManagerDO.class, | |
| 50 | - BeanUtils.toBean(list, RoadManagerDO.class)); | |
| 51 | - } | |
| 52 | - | |
| 53 | - @GetMapping("/getById") | |
| 54 | - @Operation(summary = "道路数据管理-详情") | |
| 55 | - @Parameter(name = "id", description = "编号", required = true) | |
| 56 | - @PreAuthorize("@ss.hasPermission('garden:road-manager:query')") | |
| 57 | - public CommonResult<RoadManagerDO> getById(@RequestParam("id") Long id) { | |
| 58 | - return success(roadManagerService.selectById(id)); | |
| 59 | - } | |
| 60 | - | |
| 61 | - @PostMapping("/add") | |
| 62 | - @Operation(summary = "道路数据管理-添加") | |
| 63 | - @PreAuthorize("@ss.hasPermission('garden:road-manager:create')") | |
| 64 | - public CommonResult<Boolean> add(@Valid @RequestBody RoadManagerSaveReqVO reqVO) { | |
| 65 | - RoadManagerDO entity = BeanUtils.toBean(reqVO, RoadManagerDO.class); | |
| 66 | - entity.setStatus(0); | |
| 67 | - return success(roadManagerService.insert(entity)); | |
| 68 | - } | |
| 69 | - | |
| 70 | - @PostMapping("/edit") | |
| 71 | - @Operation(summary = "道路数据管理-修改") | |
| 72 | - @PreAuthorize("@ss.hasPermission('garden:road-manager:update')") | |
| 73 | - public CommonResult<Boolean> edit(@Valid @RequestBody RoadManagerSaveReqVO reqVO) { | |
| 74 | - RoadManagerDO entity = BeanUtils.toBean(reqVO, RoadManagerDO.class); | |
| 75 | - entity.setStatus(0); | |
| 76 | - return success(roadManagerService.update(entity)); | |
| 77 | - } | |
| 78 | - | |
| 79 | - @GetMapping("/deleteById") | |
| 80 | - @Operation(summary = "道路数据管理-删除") | |
| 81 | - @PreAuthorize("@ss.hasPermission('garden:road-manager:delete')") | |
| 82 | - public CommonResult<Boolean> deleteById(@RequestParam("id") Long id) { | |
| 83 | - return success(roadManagerService.deleteById(id)); | |
| 84 | - } | |
| 85 | - | |
| 86 | - @GetMapping("/list") | |
| 87 | - @Operation(summary = "道路数据管理-列表") | |
| 88 | - @PreAuthorize("@ss.hasPermission('garden:road-manager:query')") | |
| 89 | - public CommonResult<List<RoadManagerDO>> list(@RequestParam(value = "company_id", required = false) Long companyId) { | |
| 90 | - RoadManagerDO where = new RoadManagerDO(); | |
| 91 | - where.setCompanyId(companyId); | |
| 92 | - return success(roadManagerService.selectList(where)); | |
| 93 | - } | |
| 94 | - | |
| 95 | - @GetMapping("/tree") | |
| 96 | - @Operation(summary = "道路数据管理-树") | |
| 97 | - @PreAuthorize("@ss.hasPermission('garden:road-manager:query')") | |
| 98 | - public CommonResult<List<RoadManagerDO>> tree(@RequestParam(value = "company_id", required = false) Long companyId) { | |
| 99 | - RoadManagerDO where = new RoadManagerDO(); | |
| 100 | - where.setCompanyId(companyId); | |
| 101 | - return success(roadManagerService.selectList(where)); | |
| 102 | - } | |
| 103 | -} | |
| 104 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/roadmanager/vo/RoadManagerPageReqVO.java deleted
| 1 | -package com.zteits.urbanops.module.garden.controller.admin.roadmanager.vo; | |
| 2 | - | |
| 3 | -import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 4 | -import io.swagger.v3.oas.annotations.media.Schema; | |
| 5 | -import lombok.Data; | |
| 6 | - | |
| 7 | -@Data | |
| 8 | -public class RoadManagerPageReqVO extends PageParam { | |
| 9 | - @Schema(description = "道路名称") | |
| 10 | - private String roadName; | |
| 11 | - @Schema(description = "街道ID") | |
| 12 | - private String streetId; | |
| 13 | - @Schema(description = "街道名称") | |
| 14 | - private String streetName; | |
| 15 | - @Schema(description = "养护级别ID") | |
| 16 | - private Integer curingLevelId; | |
| 17 | - @Schema(description = "养护级别") | |
| 18 | - private String curingLevelName; | |
| 19 | - @Schema(description = "公司ID") | |
| 20 | - private Long companyId; | |
| 21 | - @Schema(description = "部门ID") | |
| 22 | - private Long deptId; | |
| 23 | - @Schema(description = "状态") | |
| 24 | - private Integer status; | |
| 25 | -} | |
| 26 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/roadmanager/vo/RoadManagerSaveReqVO.java deleted
| 1 | -package com.zteits.urbanops.module.garden.controller.admin.roadmanager.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 | -@Data | |
| 9 | -public class RoadManagerSaveReqVO { | |
| 10 | - private Long id; | |
| 11 | - @NotEmpty | |
| 12 | - @Schema(description = "道路名称") | |
| 13 | - private String roadName; | |
| 14 | - private String streetId; | |
| 15 | - private String streetName; | |
| 16 | - private Integer curingLevelId; | |
| 17 | - private String curingLevelName; | |
| 18 | - private String greenBeltTreeArea; | |
| 19 | - private String greenBeltArea; | |
| 20 | - private String totalArea; | |
| 21 | - private String treeArea; | |
| 22 | - private String startingLatitude; | |
| 23 | - private String startingLongitude; | |
| 24 | - private String startingRemark; | |
| 25 | - private String endLatitude; | |
| 26 | - private String endLongitude; | |
| 27 | - private String endRemark; | |
| 28 | - private Integer status; | |
| 29 | - private Long companyId; | |
| 30 | - private String companyName; | |
| 31 | - private Long deptId; | |
| 32 | - private String roadAttr; | |
| 33 | - private String direction; | |
| 34 | -} | |
| 35 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/standingbook/StandingBookController.java deleted
| 1 | -package com.zteits.urbanops.module.garden.controller.admin.standingbook; | |
| 2 | - | |
| 3 | -import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 4 | -import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 5 | -import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 6 | -import com.zteits.urbanops.module.garden.controller.admin.standingbook.vo.StandingBookPageReqVO; | |
| 7 | -import com.zteits.urbanops.module.garden.dal.dataobject.standingbook.StandingBookDO; | |
| 8 | -import com.zteits.urbanops.module.garden.service.standingbook.StandingBookService; | |
| 9 | -import io.swagger.v3.oas.annotations.Operation; | |
| 10 | -import io.swagger.v3.oas.annotations.tags.Tag; | |
| 11 | -import jakarta.annotation.Resource; | |
| 12 | -import org.springframework.web.bind.annotation.PostMapping; | |
| 13 | -import org.springframework.web.bind.annotation.RequestBody; | |
| 14 | -import org.springframework.web.bind.annotation.RequestMapping; | |
| 15 | -import org.springframework.web.bind.annotation.RestController; | |
| 16 | - | |
| 17 | -import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 18 | - | |
| 19 | -@Tag(name = "管理后台 - 年度基础台账") | |
| 20 | -@RestController | |
| 21 | -@RequestMapping("/standing/book") | |
| 22 | -public class StandingBookController { | |
| 23 | - | |
| 24 | - @Resource | |
| 25 | - private StandingBookService standingBookService; | |
| 26 | - | |
| 27 | - @PostMapping("/listForPage") | |
| 28 | - @Operation(summary = "年度基础台账-分页") | |
| 29 | - public CommonResult<PageResult<StandingBookDO>> listForPage(@RequestBody StandingBookPageReqVO reqVO) { | |
| 30 | - PageParam page = new PageParam(); | |
| 31 | - page.setPageNo(reqVO.getPageNo()); | |
| 32 | - page.setPageSize(reqVO.getPageSize()); | |
| 33 | - return success(standingBookService.selectPage(page, reqVO)); | |
| 34 | - } | |
| 35 | -} | |
| 36 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/standingbook/vo/StandingBookPageReqVO.java deleted
| 1 | -package com.zteits.urbanops.module.garden.controller.admin.standingbook.vo; | |
| 2 | - | |
| 3 | -import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 4 | -import lombok.Data; | |
| 5 | - | |
| 6 | -@Data | |
| 7 | -public class StandingBookPageReqVO extends PageParam { | |
| 8 | - private String standingBookYear; | |
| 9 | -} | |
| 10 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/maintainrate/MaintainRateDO.java deleted
| 1 | -package com.zteits.urbanops.module.garden.dal.dataobject.maintainrate; | |
| 2 | - | |
| 3 | -import com.baomidou.mybatisplus.annotation.KeySequence; | |
| 4 | -import com.baomidou.mybatisplus.annotation.TableId; | |
| 5 | -import com.baomidou.mybatisplus.annotation.TableName; | |
| 6 | -import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | |
| 7 | -import lombok.*; | |
| 8 | - | |
| 9 | -/** | |
| 10 | - * 养护频次 DO | |
| 11 | - */ | |
| 12 | -@TableName("garden_maintain_rate") | |
| 13 | -@KeySequence("garden_maintain_rate_seq") | |
| 14 | -@Data | |
| 15 | -@EqualsAndHashCode(callSuper = true) | |
| 16 | -@ToString(callSuper = true) | |
| 17 | -@Builder | |
| 18 | -@NoArgsConstructor | |
| 19 | -@AllArgsConstructor | |
| 20 | -public class MaintainRateDO extends BaseDO { | |
| 21 | - | |
| 22 | - @TableId | |
| 23 | - private Long id; | |
| 24 | - | |
| 25 | - private Integer type; | |
| 26 | - | |
| 27 | - private Integer maintainSubjectId; | |
| 28 | - private String maintainSubjectName; | |
| 29 | - | |
| 30 | - private Integer maintainTypeId; | |
| 31 | - private String maintainTypeName; | |
| 32 | - | |
| 33 | - private String levelTop; | |
| 34 | - private String levelOne; | |
| 35 | - private String levelTwo; | |
| 36 | - private String levelThree; | |
| 37 | - | |
| 38 | - private Integer cycleId; | |
| 39 | - private String cycleName; | |
| 40 | - | |
| 41 | - private String status; | |
| 42 | -} | |
| 43 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/road/RoadDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.road; | |
| 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_road") | |
| 16 | +@KeySequence("garden_road_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 RoadDO extends BaseDO { | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * ID | |
| 27 | + */ | |
| 28 | + @TableId | |
| 29 | + private Long id; | |
| 30 | + /** | |
| 31 | + * 道路名称 | |
| 32 | + */ | |
| 33 | + private String roadName; | |
| 34 | + /** | |
| 35 | + * 街道ID | |
| 36 | + */ | |
| 37 | + private String streetId; | |
| 38 | + /** | |
| 39 | + * 街道名称 | |
| 40 | + */ | |
| 41 | + private String streetName; | |
| 42 | + /** | |
| 43 | + * 养护级别: 10:特级;11:一级:12:二级;13:三级 | |
| 44 | + */ | |
| 45 | + private Integer levelId; | |
| 46 | + /** | |
| 47 | + * 行道树绿化面积 | |
| 48 | + */ | |
| 49 | + private String greenBeltTreeArea; | |
| 50 | + /** | |
| 51 | + * 绿化带面积 | |
| 52 | + */ | |
| 53 | + private String greenBeltArea; | |
| 54 | + /** | |
| 55 | + * 总绿化带面积 | |
| 56 | + */ | |
| 57 | + private String totalArea; | |
| 58 | + /** | |
| 59 | + * 行道树(棵)面积 | |
| 60 | + */ | |
| 61 | + private String treeArea; | |
| 62 | + /** | |
| 63 | + * 起点经度 | |
| 64 | + */ | |
| 65 | + private String startingLatitude; | |
| 66 | + /** | |
| 67 | + * 起点维度 | |
| 68 | + */ | |
| 69 | + private String startingLongitude; | |
| 70 | + /** | |
| 71 | + * 起点描述 | |
| 72 | + */ | |
| 73 | + private String startingRemark; | |
| 74 | + /** | |
| 75 | + * 终点经度 | |
| 76 | + */ | |
| 77 | + private String endLatitude; | |
| 78 | + /** | |
| 79 | + * 终点维度 | |
| 80 | + */ | |
| 81 | + private String endLongitude; | |
| 82 | + /** | |
| 83 | + * 终点描述 | |
| 84 | + */ | |
| 85 | + private String endRemark; | |
| 86 | + /** | |
| 87 | + * 备注 | |
| 88 | + */ | |
| 89 | + private String remark; | |
| 90 | + /** | |
| 91 | + * 归属(一级部门id) | |
| 92 | + */ | |
| 93 | + private Long companyId; | |
| 94 | + /** | |
| 95 | + * 部门ID(道路负责部门id) | |
| 96 | + */ | |
| 97 | + private Long deptId; | |
| 98 | + /** | |
| 99 | + * 创建者 | |
| 100 | + */ | |
| 101 | + private String creatorName; | |
| 102 | + /** | |
| 103 | + * 更新者 | |
| 104 | + */ | |
| 105 | + private String updaterName; | |
| 106 | + | |
| 107 | + | |
| 108 | +} | |
| 0 | 109 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/road/RoadManagerDO.java deleted
| 1 | -package com.zteits.urbanops.module.garden.dal.dataobject.road; | |
| 2 | - | |
| 3 | -import com.baomidou.mybatisplus.annotation.KeySequence; | |
| 4 | -import com.baomidou.mybatisplus.annotation.TableId; | |
| 5 | -import com.baomidou.mybatisplus.annotation.TableName; | |
| 6 | -import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | |
| 7 | -import lombok.Data; | |
| 8 | - | |
| 9 | -@TableName("garden_road_manager") | |
| 10 | -@KeySequence("garden_road_manager_seq") | |
| 11 | -@Data | |
| 12 | -public class RoadManagerDO extends BaseDO { | |
| 13 | - @TableId | |
| 14 | - private Long id; | |
| 15 | - private String roadName; | |
| 16 | - private String streetId; | |
| 17 | - private String streetName; | |
| 18 | - private Integer curingLevelId; | |
| 19 | - private String curingLevelName; | |
| 20 | - private String greenBeltTreeArea; | |
| 21 | - private String greenBeltArea; | |
| 22 | - private String totalArea; | |
| 23 | - private String treeArea; | |
| 24 | - private String startingLatitude; | |
| 25 | - private String startingLongitude; | |
| 26 | - private String startingRemark; | |
| 27 | - private String endLatitude; | |
| 28 | - private String endLongitude; | |
| 29 | - private String endRemark; | |
| 30 | - private Integer status; | |
| 31 | - private Long companyId; | |
| 32 | - private String companyName; | |
| 33 | - private Long deptId; | |
| 34 | - private String roadAttr; | |
| 35 | - private String direction; | |
| 36 | -} | |
| 37 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/standingbook/StandingBookDO.java deleted
| 1 | -package com.zteits.urbanops.module.garden.dal.dataobject.standingbook; | |
| 2 | - | |
| 3 | -import com.baomidou.mybatisplus.annotation.TableId; | |
| 4 | -import com.baomidou.mybatisplus.annotation.TableName; | |
| 5 | -import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | |
| 6 | -import lombok.Data; | |
| 7 | - | |
| 8 | -@TableName("garden_standing_book") | |
| 9 | -@Data | |
| 10 | -public class StandingBookDO extends BaseDO { | |
| 11 | - @TableId | |
| 12 | - private Long id; | |
| 13 | - private String standingBookNo; | |
| 14 | - private String standingBookYear; | |
| 15 | - private Long belongCompanyId; | |
| 16 | -} | |
| 17 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/maintainrate/MaintainRateMapper.java deleted
| 1 | -package com.zteits.urbanops.module.garden.dal.mysql.maintainrate; | |
| 2 | - | |
| 3 | -import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 4 | -import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | |
| 5 | -import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 6 | -import com.zteits.urbanops.module.garden.dal.dataobject.maintainrate.MaintainRateDO; | |
| 7 | -import com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo.MaintainRatePageReqVO; | |
| 8 | -import org.apache.ibatis.annotations.Mapper; | |
| 9 | - | |
| 10 | -@Mapper | |
| 11 | -public interface MaintainRateMapper extends BaseMapperX<MaintainRateDO> { | |
| 12 | - | |
| 13 | - default PageResult<MaintainRateDO> selectPage(MaintainRatePageReqVO reqVO) { | |
| 14 | - return selectPage(reqVO, new LambdaQueryWrapperX<MaintainRateDO>() | |
| 15 | - .eqIfPresent(MaintainRateDO::getType, reqVO.getType()) | |
| 16 | - .eqIfPresent(MaintainRateDO::getMaintainSubjectId, reqVO.getMaintainSubjectId()) | |
| 17 | - .likeIfPresent(MaintainRateDO::getMaintainSubjectName, reqVO.getMaintainSubjectName()) | |
| 18 | - .eqIfPresent(MaintainRateDO::getMaintainTypeId, reqVO.getMaintainTypeId()) | |
| 19 | - .likeIfPresent(MaintainRateDO::getMaintainTypeName, reqVO.getMaintainTypeName()) | |
| 20 | - .eqIfPresent(MaintainRateDO::getCycleId, reqVO.getCycleId()) | |
| 21 | - .likeIfPresent(MaintainRateDO::getCycleName, reqVO.getCycleName()) | |
| 22 | - .eqIfPresent(MaintainRateDO::getStatus, reqVO.getStatus()) | |
| 23 | - .orderByDesc(MaintainRateDO::getId)); | |
| 24 | - } | |
| 25 | -} | |
| 26 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/road/RoadManagerMapper.java deleted
| 1 | -package com.zteits.urbanops.module.garden.dal.mysql.road; | |
| 2 | - | |
| 3 | -import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 4 | -import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | |
| 5 | -import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 6 | -import com.zteits.urbanops.module.garden.controller.admin.roadmanager.vo.RoadManagerPageReqVO; | |
| 7 | -import com.zteits.urbanops.module.garden.dal.dataobject.road.RoadManagerDO; | |
| 8 | -import org.apache.ibatis.annotations.Mapper; | |
| 9 | - | |
| 10 | -@Mapper | |
| 11 | -public interface RoadManagerMapper extends BaseMapperX<RoadManagerDO> { | |
| 12 | - | |
| 13 | - default PageResult<RoadManagerDO> selectPage(RoadManagerPageReqVO reqVO) { | |
| 14 | - return selectPage(reqVO, new LambdaQueryWrapperX<RoadManagerDO>() | |
| 15 | - .likeIfPresent(RoadManagerDO::getRoadName, reqVO.getRoadName()) | |
| 16 | - .eqIfPresent(RoadManagerDO::getStreetId, reqVO.getStreetId()) | |
| 17 | - .likeIfPresent(RoadManagerDO::getStreetName, reqVO.getStreetName()) | |
| 18 | - .eqIfPresent(RoadManagerDO::getCuringLevelId, reqVO.getCuringLevelId()) | |
| 19 | - .likeIfPresent(RoadManagerDO::getCuringLevelName, reqVO.getCuringLevelName()) | |
| 20 | - .eqIfPresent(RoadManagerDO::getCompanyId, reqVO.getCompanyId()) | |
| 21 | - .eqIfPresent(RoadManagerDO::getDeptId, reqVO.getDeptId()) | |
| 22 | - .eqIfPresent(RoadManagerDO::getStatus, reqVO.getStatus()) | |
| 23 | - .orderByDesc(RoadManagerDO::getId)); | |
| 24 | - } | |
| 25 | -} | |
| 26 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/road/RoadMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.road; | |
| 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.road.RoadDO; | |
| 9 | +import org.apache.ibatis.annotations.Mapper; | |
| 10 | +import com.zteits.urbanops.module.garden.controller.admin.road.vo.*; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 道路管理 Mapper | |
| 14 | + * | |
| 15 | + * @author 超级管理员 | |
| 16 | + */ | |
| 17 | +@Mapper | |
| 18 | +public interface RoadMapper extends BaseMapperX<RoadDO> { | |
| 19 | + | |
| 20 | + default PageResult<RoadDO> selectPage(RoadPageReqVO reqVO) { | |
| 21 | + return selectPage(reqVO, new LambdaQueryWrapperX<RoadDO>() | |
| 22 | + .likeIfPresent(RoadDO::getRoadName, reqVO.getRoadName()) | |
| 23 | + .eqIfPresent(RoadDO::getStreetId, reqVO.getStreetId()) | |
| 24 | + .likeIfPresent(RoadDO::getStreetName, reqVO.getStreetName()) | |
| 25 | + .eqIfPresent(RoadDO::getLevelId, reqVO.getLevelId()) | |
| 26 | + .eqIfPresent(RoadDO::getGreenBeltTreeArea, reqVO.getGreenBeltTreeArea()) | |
| 27 | + .eqIfPresent(RoadDO::getGreenBeltArea, reqVO.getGreenBeltArea()) | |
| 28 | + .eqIfPresent(RoadDO::getTotalArea, reqVO.getTotalArea()) | |
| 29 | + .eqIfPresent(RoadDO::getTreeArea, reqVO.getTreeArea()) | |
| 30 | + .eqIfPresent(RoadDO::getStartingLatitude, reqVO.getStartingLatitude()) | |
| 31 | + .eqIfPresent(RoadDO::getStartingLongitude, reqVO.getStartingLongitude()) | |
| 32 | + .eqIfPresent(RoadDO::getStartingRemark, reqVO.getStartingRemark()) | |
| 33 | + .eqIfPresent(RoadDO::getEndLatitude, reqVO.getEndLatitude()) | |
| 34 | + .eqIfPresent(RoadDO::getEndLongitude, reqVO.getEndLongitude()) | |
| 35 | + .eqIfPresent(RoadDO::getEndRemark, reqVO.getEndRemark()) | |
| 36 | + .eqIfPresent(RoadDO::getRemark, reqVO.getRemark()) | |
| 37 | + .eqIfPresent(RoadDO::getCompanyId, reqVO.getCompanyId()) | |
| 38 | + .eqIfPresent(RoadDO::getDeptId, reqVO.getDeptId()) | |
| 39 | + .likeIfPresent(RoadDO::getCreatorName, reqVO.getCreatorName()) | |
| 40 | + .betweenIfPresent(RoadDO::getCreateTime, reqVO.getCreateTime()) | |
| 41 | + .likeIfPresent(RoadDO::getUpdaterName, reqVO.getUpdaterName()) | |
| 42 | + .orderByDesc(RoadDO::getId)); | |
| 43 | + } | |
| 44 | + | |
| 45 | +} | |
| 0 | 46 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/standingbook/StandingBookMapper.java deleted
| 1 | -package com.zteits.urbanops.module.garden.dal.mysql.standingbook; | |
| 2 | - | |
| 3 | -import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 4 | -import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | |
| 5 | -import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 6 | -import com.zteits.urbanops.module.garden.dal.dataobject.standingbook.StandingBookDO; | |
| 7 | -import org.apache.ibatis.annotations.Mapper; | |
| 8 | - | |
| 9 | -@Mapper | |
| 10 | -public interface StandingBookMapper extends BaseMapperX<StandingBookDO> { | |
| 11 | - default PageResult<StandingBookDO> selectPage(com.zteits.urbanops.framework.common.pojo.PageParam pageParam, StandingBookDO where) { | |
| 12 | - return selectPage(pageParam, null, new LambdaQueryWrapperX<StandingBookDO>() | |
| 13 | - .eqIfPresent(StandingBookDO::getStandingBookYear, where.getStandingBookYear()) | |
| 14 | - .orderByDesc(StandingBookDO::getId)); | |
| 15 | - } | |
| 16 | -} | |
| 17 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/maintainrate/MaintainRateService.java deleted
| 1 | -package com.zteits.urbanops.module.garden.service.maintainrate; | |
| 2 | - | |
| 3 | -import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 4 | -import com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo.MaintainRatePageReqVO; | |
| 5 | -import com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo.MaintainRateReqVO; | |
| 6 | -import com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo.MaintainRateRespVO; | |
| 7 | -import com.zteits.urbanops.module.garden.dal.dataobject.maintainrate.MaintainRateDO; | |
| 8 | - | |
| 9 | -public interface MaintainRateService { | |
| 10 | - | |
| 11 | - PageResult<MaintainRateDO> selectPage(MaintainRatePageReqVO reqVO); | |
| 12 | - | |
| 13 | - MaintainRateDO selectById(Long id); | |
| 14 | - | |
| 15 | - Boolean insert(MaintainRateDO entity); | |
| 16 | - | |
| 17 | - Boolean update(MaintainRateDO entity); | |
| 18 | - | |
| 19 | - Boolean deleteById(Long id); | |
| 20 | - | |
| 21 | - MaintainRateRespVO getMaintainRateValue(MaintainRateReqVO reqVO); | |
| 22 | - | |
| 23 | - MaintainRateRespVO selectMaintainRateByLevel(Integer maintainTypeId, Integer level); | |
| 24 | -} | |
| 25 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/maintainrate/MaintainRateServiceImpl.java deleted
| 1 | -package com.zteits.urbanops.module.garden.service.maintainrate; | |
| 2 | - | |
| 3 | -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
| 4 | -import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
| 5 | -import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 6 | -import com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo.MaintainRatePageReqVO; | |
| 7 | -import com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo.MaintainRateReqVO; | |
| 8 | -import com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo.MaintainRateRespVO; | |
| 9 | -import com.zteits.urbanops.module.garden.dal.dataobject.maintainrate.MaintainRateDO; | |
| 10 | -import com.zteits.urbanops.module.garden.dal.mysql.maintainrate.MaintainRateMapper; | |
| 11 | -import jakarta.annotation.Resource; | |
| 12 | -import org.springframework.stereotype.Service; | |
| 13 | -import org.springframework.validation.annotation.Validated; | |
| 14 | - | |
| 15 | -@Service | |
| 16 | -@Validated | |
| 17 | -public class MaintainRateServiceImpl implements MaintainRateService { | |
| 18 | - | |
| 19 | - @Resource | |
| 20 | - private MaintainRateMapper maintainRateMapper; | |
| 21 | - | |
| 22 | - @Override | |
| 23 | - public PageResult<MaintainRateDO> selectPage(MaintainRatePageReqVO reqVO) { | |
| 24 | - return maintainRateMapper.selectPage(reqVO); | |
| 25 | - } | |
| 26 | - | |
| 27 | - @Override | |
| 28 | - public MaintainRateDO selectById(Long id) { | |
| 29 | - return maintainRateMapper.selectById(id); | |
| 30 | - } | |
| 31 | - | |
| 32 | - @Override | |
| 33 | - public Boolean insert(MaintainRateDO entity) { | |
| 34 | - return maintainRateMapper.insert(entity) > 0; | |
| 35 | - } | |
| 36 | - | |
| 37 | - @Override | |
| 38 | - public Boolean update(MaintainRateDO entity) { | |
| 39 | - return maintainRateMapper.updateById(entity) > 0; | |
| 40 | - } | |
| 41 | - | |
| 42 | - @Override | |
| 43 | - public Boolean deleteById(Long id) { | |
| 44 | - return maintainRateMapper.deleteById(id) > 0; | |
| 45 | - } | |
| 46 | - | |
| 47 | - @Override | |
| 48 | - public MaintainRateRespVO getMaintainRateValue(MaintainRateReqVO reqVO) { | |
| 49 | - LambdaQueryWrapper<MaintainRateDO> qw = Wrappers.lambdaQuery(); | |
| 50 | - qw.eq(MaintainRateDO::getMaintainSubjectId, reqVO.getMaintainSubjectId()); | |
| 51 | - qw.eq(MaintainRateDO::getMaintainTypeId, reqVO.getMaintainTypeId()); | |
| 52 | - qw.orderByDesc(MaintainRateDO::getId); | |
| 53 | - MaintainRateDO rate = maintainRateMapper.selectOne(qw); | |
| 54 | - if (rate == null) { | |
| 55 | - return null; | |
| 56 | - } | |
| 57 | - MaintainRateRespVO resp = new MaintainRateRespVO(); | |
| 58 | - resp.setMaintainTypeId(rate.getMaintainTypeId()); | |
| 59 | - resp.setMaintainTypeName(rate.getMaintainTypeName()); | |
| 60 | - resp.setCycleId(rate.getCycleId()); | |
| 61 | - resp.setCycleName(rate.getCycleName()); | |
| 62 | - resp.setLevelTop(rate.getLevelTop()); | |
| 63 | - resp.setLevelOne(rate.getLevelOne()); | |
| 64 | - resp.setLevelTwo(rate.getLevelTwo()); | |
| 65 | - resp.setLevelThree(rate.getLevelThree()); | |
| 66 | - return resp; | |
| 67 | - } | |
| 68 | - | |
| 69 | - @Override | |
| 70 | - public MaintainRateRespVO selectMaintainRateByLevel(Integer maintainTypeId, Integer level) { | |
| 71 | - LambdaQueryWrapper<MaintainRateDO> qw = Wrappers.lambdaQuery(); | |
| 72 | - qw.eq(MaintainRateDO::getMaintainTypeId, maintainTypeId); | |
| 73 | - qw.orderByDesc(MaintainRateDO::getId); | |
| 74 | - MaintainRateDO rate = maintainRateMapper.selectOne(qw); | |
| 75 | - if (rate == null) { | |
| 76 | - return null; | |
| 77 | - } | |
| 78 | - MaintainRateRespVO resp = new MaintainRateRespVO(); | |
| 79 | - resp.setMaintainTypeId(rate.getMaintainTypeId()); | |
| 80 | - resp.setMaintainTypeName(rate.getMaintainTypeName()); | |
| 81 | - resp.setCycleId(rate.getCycleId()); | |
| 82 | - resp.setCycleName(rate.getCycleName()); | |
| 83 | - String value; | |
| 84 | - if (level != null && level == 10) { | |
| 85 | - value = rate.getLevelTop(); | |
| 86 | - } else if (level != null && level == 11) { | |
| 87 | - value = rate.getLevelOne(); | |
| 88 | - } else if (level != null && level == 12) { | |
| 89 | - value = rate.getLevelTwo(); | |
| 90 | - } else { | |
| 91 | - value = rate.getLevelThree(); | |
| 92 | - } | |
| 93 | - resp.setValue(value); | |
| 94 | - return resp; | |
| 95 | - } | |
| 96 | -} | |
| 97 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/road/RoadManagerService.java deleted
| 1 | -package com.zteits.urbanops.module.garden.service.road; | |
| 2 | - | |
| 3 | -import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 4 | -import com.zteits.urbanops.module.garden.controller.admin.roadmanager.vo.RoadManagerPageReqVO; | |
| 5 | -import com.zteits.urbanops.module.garden.dal.dataobject.road.RoadManagerDO; | |
| 6 | - | |
| 7 | -import java.util.List; | |
| 8 | - | |
| 9 | -public interface RoadManagerService { | |
| 10 | - PageResult<RoadManagerDO> selectPage(RoadManagerPageReqVO reqVO); | |
| 11 | - RoadManagerDO selectById(Long id); | |
| 12 | - Boolean insert(RoadManagerDO entity); | |
| 13 | - Boolean update(RoadManagerDO entity); | |
| 14 | - Boolean deleteById(Long id); | |
| 15 | - List<RoadManagerDO> selectList(RoadManagerDO where); | |
| 16 | -} | |
| 17 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/road/RoadManagerServiceImpl.java deleted
| 1 | -package com.zteits.urbanops.module.garden.service.road; | |
| 2 | - | |
| 3 | -import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 4 | -import com.zteits.urbanops.module.garden.controller.admin.roadmanager.vo.RoadManagerPageReqVO; | |
| 5 | -import com.zteits.urbanops.module.garden.dal.dataobject.road.RoadManagerDO; | |
| 6 | -import com.zteits.urbanops.module.garden.dal.mysql.road.RoadManagerMapper; | |
| 7 | -import jakarta.annotation.Resource; | |
| 8 | -import org.springframework.stereotype.Service; | |
| 9 | - | |
| 10 | -import java.util.List; | |
| 11 | - | |
| 12 | -@Service | |
| 13 | -public class RoadManagerServiceImpl implements RoadManagerService { | |
| 14 | - | |
| 15 | - @Resource | |
| 16 | - private RoadManagerMapper roadManagerMapper; | |
| 17 | - | |
| 18 | - @Override | |
| 19 | - public PageResult<RoadManagerDO> selectPage(RoadManagerPageReqVO reqVO) { | |
| 20 | - return roadManagerMapper.selectPage(reqVO); | |
| 21 | - } | |
| 22 | - | |
| 23 | - @Override | |
| 24 | - public RoadManagerDO selectById(Long id) { | |
| 25 | - return roadManagerMapper.selectById(id); | |
| 26 | - } | |
| 27 | - | |
| 28 | - @Override | |
| 29 | - public Boolean insert(RoadManagerDO entity) { | |
| 30 | - return roadManagerMapper.insert(entity) > 0; | |
| 31 | - } | |
| 32 | - | |
| 33 | - @Override | |
| 34 | - public Boolean update(RoadManagerDO entity) { | |
| 35 | - return roadManagerMapper.updateById(entity) > 0; | |
| 36 | - } | |
| 37 | - | |
| 38 | - @Override | |
| 39 | - public Boolean deleteById(Long id) { | |
| 40 | - return roadManagerMapper.deleteById(id) > 0; | |
| 41 | - } | |
| 42 | - | |
| 43 | - @Override | |
| 44 | - public List<RoadManagerDO> selectList(RoadManagerDO where) { | |
| 45 | - return roadManagerMapper.selectList(new com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX<RoadManagerDO>() | |
| 46 | - .eqIfPresent(RoadManagerDO::getCompanyId, where.getCompanyId()) | |
| 47 | - .eqIfPresent(RoadManagerDO::getDeptId, where.getDeptId()) | |
| 48 | - .likeIfPresent(RoadManagerDO::getRoadName, where.getRoadName()) | |
| 49 | - .orderByAsc(RoadManagerDO::getRoadName)); | |
| 50 | - } | |
| 51 | -} | |
| 52 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/road/RoadService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.road; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | +import jakarta.validation.*; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.road.vo.*; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.road.RoadDO; | |
| 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 RoadService { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 创建道路管理 | |
| 19 | + * | |
| 20 | + * @param createReqVO 创建信息 | |
| 21 | + * @return 编号 | |
| 22 | + */ | |
| 23 | + Long createRoad(@Valid RoadSaveReqVO createReqVO); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 更新道路管理 | |
| 27 | + * | |
| 28 | + * @param updateReqVO 更新信息 | |
| 29 | + */ | |
| 30 | + void updateRoad(@Valid RoadSaveReqVO updateReqVO); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 删除道路管理 | |
| 34 | + * | |
| 35 | + * @param id 编号 | |
| 36 | + */ | |
| 37 | + void deleteRoad(Long id); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 批量删除道路管理 | |
| 41 | + * | |
| 42 | + * @param ids 编号 | |
| 43 | + */ | |
| 44 | + void deleteRoadListByIds(List<Long> ids); | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 获得道路管理 | |
| 48 | + * | |
| 49 | + * @param id 编号 | |
| 50 | + * @return 道路管理 | |
| 51 | + */ | |
| 52 | + RoadDO getRoad(Long id); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 获得道路管理分页 | |
| 56 | + * | |
| 57 | + * @param pageReqVO 分页查询 | |
| 58 | + * @return 道路管理分页 | |
| 59 | + */ | |
| 60 | + PageResult<RoadDO> getRoadPage(RoadPageReqVO pageReqVO); | |
| 61 | + | |
| 62 | +} | |
| 0 | 63 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/road/RoadServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.road; | |
| 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.road.vo.*; | |
| 11 | +import com.zteits.urbanops.module.garden.dal.dataobject.road.RoadDO; | |
| 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.road.RoadMapper; | |
| 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 RoadServiceImpl implements RoadService { | |
| 31 | + | |
| 32 | + @Resource | |
| 33 | + private RoadMapper roadMapper; | |
| 34 | + | |
| 35 | + @Override | |
| 36 | + public Long createRoad(RoadSaveReqVO createReqVO) { | |
| 37 | + // 插入 | |
| 38 | + RoadDO road = BeanUtils.toBean(createReqVO, RoadDO.class); | |
| 39 | + roadMapper.insert(road); | |
| 40 | + | |
| 41 | + // 返回 | |
| 42 | + return road.getId(); | |
| 43 | + } | |
| 44 | + | |
| 45 | + @Override | |
| 46 | + public void updateRoad(RoadSaveReqVO updateReqVO) { | |
| 47 | + // 校验存在 | |
| 48 | + validateRoadExists(updateReqVO.getId()); | |
| 49 | + // 更新 | |
| 50 | + RoadDO updateObj = BeanUtils.toBean(updateReqVO, RoadDO.class); | |
| 51 | + roadMapper.updateById(updateObj); | |
| 52 | + } | |
| 53 | + | |
| 54 | + @Override | |
| 55 | + public void deleteRoad(Long id) { | |
| 56 | + // 校验存在 | |
| 57 | + validateRoadExists(id); | |
| 58 | + // 删除 | |
| 59 | + roadMapper.deleteById(id); | |
| 60 | + } | |
| 61 | + | |
| 62 | + @Override | |
| 63 | + public void deleteRoadListByIds(List<Long> ids) { | |
| 64 | + // 删除 | |
| 65 | + roadMapper.deleteByIds(ids); | |
| 66 | + } | |
| 67 | + | |
| 68 | + | |
| 69 | + private void validateRoadExists(Long id) { | |
| 70 | + if (roadMapper.selectById(id) == null) { | |
| 71 | + // throw exception(ROAD_NOT_EXISTS); | |
| 72 | + } | |
| 73 | + } | |
| 74 | + | |
| 75 | + @Override | |
| 76 | + public RoadDO getRoad(Long id) { | |
| 77 | + return roadMapper.selectById(id); | |
| 78 | + } | |
| 79 | + | |
| 80 | + @Override | |
| 81 | + public PageResult<RoadDO> getRoadPage(RoadPageReqVO pageReqVO) { | |
| 82 | + return roadMapper.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/standingbook/StandingBookService.java deleted
| 1 | -package com.zteits.urbanops.module.garden.service.standingbook; | |
| 2 | - | |
| 3 | -import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 4 | -import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 5 | -import com.zteits.urbanops.module.garden.controller.admin.standingbook.vo.StandingBookPageReqVO; | |
| 6 | -import com.zteits.urbanops.module.garden.dal.dataobject.standingbook.StandingBookDO; | |
| 7 | - | |
| 8 | -public interface StandingBookService { | |
| 9 | - PageResult<StandingBookDO> selectPage(PageParam pageParam, StandingBookPageReqVO reqVO); | |
| 10 | -} | |
| 11 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/standingbook/StandingBookServiceImpl.java deleted
| 1 | -package com.zteits.urbanops.module.garden.service.standingbook; | |
| 2 | - | |
| 3 | -import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 4 | -import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 5 | -import com.zteits.urbanops.module.garden.controller.admin.standingbook.vo.StandingBookPageReqVO; | |
| 6 | -import com.zteits.urbanops.module.garden.dal.dataobject.standingbook.StandingBookDO; | |
| 7 | -import com.zteits.urbanops.module.garden.dal.mysql.standingbook.StandingBookMapper; | |
| 8 | -import jakarta.annotation.Resource; | |
| 9 | -import org.springframework.stereotype.Service; | |
| 10 | - | |
| 11 | -@Service | |
| 12 | -public class StandingBookServiceImpl implements StandingBookService { | |
| 13 | - | |
| 14 | - @Resource | |
| 15 | - private StandingBookMapper mapper; | |
| 16 | - | |
| 17 | - @Override | |
| 18 | - public PageResult<StandingBookDO> selectPage(PageParam pageParam, StandingBookPageReqVO reqVO) { | |
| 19 | - StandingBookDO where = new StandingBookDO(); | |
| 20 | - where.setStandingBookYear(reqVO.getStandingBookYear()); | |
| 21 | - return mapper.selectPage(pageParam, where); | |
| 22 | - } | |
| 23 | -} | |
| 24 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/resources/mapper/road/RoadMapper.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.road.RoadMapper"> | |
| 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 | ... | ... |