Commit 1d6a881e2f5e8a50215a2f709af61e4438e1b63b
Merge remote-tracking branch 'origin/dev' into dev
Showing
82 changed files
with
6459 additions
and
515 deletions
pom.xml
| ... | ... | @@ -17,6 +17,7 @@ |
| 17 | 17 | <module>urbanops-module-infra</module> |
| 18 | 18 | <module>urbanops-module-gloabl</module> |
| 19 | 19 | <module>urbanops-module-garden</module> |
| 20 | + <module>urbanops-module-workorder</module> | |
| 20 | 21 | <!-- <module>urbanops-module-member</module>--> |
| 21 | 22 | <module>urbanops-module-bpm</module> |
| 22 | 23 | <!-- <module>urbanops-module-report</module>--> | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/oldtrees/OldtreesController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.oldtrees; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.dict.core.DictFrameworkUtils; | |
| 4 | +import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; | |
| 5 | +import org.apache.catalina.security.SecurityUtil; | |
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 7 | +import org.springframework.web.bind.annotation.*; | |
| 8 | +import jakarta.annotation.Resource; | |
| 9 | +import org.springframework.validation.annotation.Validated; | |
| 10 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 11 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 12 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 13 | +import io.swagger.v3.oas.annotations.Operation; | |
| 14 | + | |
| 15 | +import jakarta.validation.constraints.*; | |
| 16 | +import jakarta.validation.*; | |
| 17 | +import jakarta.servlet.http.*; | |
| 18 | + | |
| 19 | +import java.time.LocalDateTime; | |
| 20 | +import java.util.*; | |
| 21 | +import java.io.IOException; | |
| 22 | + | |
| 23 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 24 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 25 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 26 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 27 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 28 | + | |
| 29 | +import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; | |
| 30 | + | |
| 31 | +import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; | |
| 32 | +import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.*; | |
| 33 | + | |
| 34 | +import com.zteits.urbanops.module.garden.controller.admin.oldtrees.vo.*; | |
| 35 | +import com.zteits.urbanops.module.garden.dal.dataobject.oldtrees.OldtreesDO; | |
| 36 | +import com.zteits.urbanops.module.garden.service.oldtrees.OldtreesService; | |
| 37 | + | |
| 38 | +@Tag(name = "管理后台 - 古树名木") | |
| 39 | +@RestController | |
| 40 | +@RequestMapping({"/garden/oldtrees","/treerecord/oldtrees"}) | |
| 41 | +@Validated | |
| 42 | +public class OldtreesController { | |
| 43 | + | |
| 44 | + @Resource | |
| 45 | + private OldtreesService oldtreesService; | |
| 46 | + @Autowired | |
| 47 | + private DictFrameworkUtils dictUtils; | |
| 48 | + | |
| 49 | + @PostMapping({"/create",""}) | |
| 50 | + @Operation(summary = "创建古树名木") | |
| 51 | + @PreAuthorize("@ss.hasPermission('garden:oldtrees:create')") | |
| 52 | + public CommonResult<String> createOldtrees(@Valid @RequestBody OldtreesSaveReqVO createReqVO) { | |
| 53 | + return success(oldtreesService.createOldtrees(createReqVO)); | |
| 54 | + } | |
| 55 | + | |
| 56 | + @PutMapping({"/update", ""}) | |
| 57 | + @Operation(summary = "修改古树台账") | |
| 58 | + @PreAuthorize("@ss.hasPermission('garden:oldtrees:update')") | |
| 59 | + public CommonResult<Boolean> updateOldtrees(@Valid @RequestBody OldtreesSaveReqVO updateReqVO) { | |
| 60 | + Long userId = SecurityFrameworkUtils.getLoginUserId(); | |
| 61 | + updateReqVO.setUpdateby(String.valueOf(userId)); | |
| 62 | + oldtreesService.updateOldtrees(updateReqVO); | |
| 63 | + return success(true); | |
| 64 | + } | |
| 65 | + | |
| 66 | + @DeleteMapping("/delete") | |
| 67 | + @Operation(summary = "删除古树名木") | |
| 68 | + @Parameter(name = "id", description = "编号", required = true) | |
| 69 | + @PreAuthorize("@ss.hasPermission('garden:oldtrees:delete')") | |
| 70 | + public CommonResult<Boolean> deleteOldtrees(@RequestParam("id") String id) { | |
| 71 | + oldtreesService.deleteOldtrees(id); | |
| 72 | + return success(true); | |
| 73 | + } | |
| 74 | + | |
| 75 | + @DeleteMapping("/delete-list") | |
| 76 | + @Parameter(name = "ids", description = "编号", required = true) | |
| 77 | + @Operation(summary = "批量删除古树名木") | |
| 78 | + @PreAuthorize("@ss.hasPermission('garden:oldtrees:delete')") | |
| 79 | + public CommonResult<Boolean> deleteOldtreesList(@RequestParam("ids") List<String> ids) { | |
| 80 | + oldtreesService.deleteOldtreesListByIds(ids); | |
| 81 | + return success(true); | |
| 82 | + } | |
| 83 | + | |
| 84 | + @GetMapping("/get") | |
| 85 | + @Operation(summary = "获取古树台账详细信息") | |
| 86 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | |
| 87 | + @PreAuthorize("@ss.hasPermission('garden:oldtrees:query')") | |
| 88 | + public CommonResult<OldtreesRespVO> getOldtrees(@RequestParam("id") String id) { | |
| 89 | + OldtreesDO oldtrees = oldtreesService.getOldtrees(id); | |
| 90 | + return success(BeanUtils.toBean(oldtrees, OldtreesRespVO.class)); | |
| 91 | + } | |
| 92 | + | |
| 93 | + @GetMapping({"/page","/list"}) | |
| 94 | + @Operation(summary = "获得古树台账分页") | |
| 95 | + @PreAuthorize("@ss.hasPermission('garden:oldtrees:query')") | |
| 96 | + public CommonResult<PageResult<OldtreesRespVO>> getOldtreesPage(@Valid OldtreesPageReqVO pageReqVO) { | |
| 97 | + PageResult<OldtreesDO> pageResult = oldtreesService.getOldtreesPage(pageReqVO); | |
| 98 | + return success(BeanUtils.toBean(pageResult, OldtreesRespVO.class)); | |
| 99 | + } | |
| 100 | + | |
| 101 | + @GetMapping({"/export-excel","export"}) | |
| 102 | + @Operation(summary = "导出古树台账 Excel") | |
| 103 | + @PreAuthorize("@ss.hasPermission('garden:oldtrees:export')") | |
| 104 | + @ApiAccessLog(operateType = EXPORT) | |
| 105 | + public void exportOldtreesExcel(@Valid OldtreesPageReqVO pageReqVO, | |
| 106 | + HttpServletResponse response) throws IOException { | |
| 107 | + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 108 | + List<OldtreesDO> list = oldtreesService.getOldtreesPage(pageReqVO).getList(); | |
| 109 | + | |
| 110 | + fillDictData(list); | |
| 111 | + | |
| 112 | + // 导出 Excel | |
| 113 | + ExcelUtils.write(response, "古树台账.xls", "数据", OldtreesRespVO.class, | |
| 114 | + BeanUtils.toBean(list, OldtreesRespVO.class)); | |
| 115 | + } | |
| 116 | + | |
| 117 | + private void fillDictData(List<OldtreesDO> list) { | |
| 118 | + for (OldtreesDO gardenTree : list) { | |
| 119 | + String maintainUnit = DictFrameworkUtils.parseDictDataValue("maintain_unit", gardenTree.getMaintainunit()); | |
| 120 | + gardenTree.setMaintainunit(maintainUnit); | |
| 121 | + | |
| 122 | + String street = DictFrameworkUtils.parseDictDataValue("street_belong", gardenTree.getStreet()); | |
| 123 | + gardenTree.setStreet(street); | |
| 124 | + | |
| 125 | + String ownership = DictFrameworkUtils.parseDictDataValue("tree_ownership", gardenTree.getOldtreeownership()); | |
| 126 | + gardenTree.setOldtreeownership(ownership); | |
| 127 | + | |
| 128 | + String growthVigor = DictFrameworkUtils.parseDictDataValue("growth_vigor", gardenTree.getGrowthvigor()); | |
| 129 | + gardenTree.setGrowthvigor(growthVigor); | |
| 130 | + String treeLevel = DictFrameworkUtils.parseDictDataValue("tree_level", gardenTree.getTreelevel()); | |
| 131 | + gardenTree.setTreelevel(treeLevel); | |
| 132 | + String dataState = DictFrameworkUtils.parseDictDataValue("data_state", gardenTree.getDatastate()); | |
| 133 | + gardenTree.setDatastate(dataState); | |
| 134 | + } | |
| 135 | + } | |
| 136 | + | |
| 137 | +} | |
| 0 | 138 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/oldtrees/vo/OldtreesPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.oldtrees.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 OldtreesPageReqVO extends PageParam { | |
| 15 | + | |
| 16 | + @Schema(description = "编号") | |
| 17 | + private String famoustreenumber; | |
| 18 | + | |
| 19 | + @Schema(description = "级别--数据字典:一级、两级") | |
| 20 | + private String treelevel; | |
| 21 | + | |
| 22 | + @Schema(description = "树种", example = "2") | |
| 23 | + private String treetype; | |
| 24 | + | |
| 25 | + @Schema(description = "所在地") | |
| 26 | + private String location; | |
| 27 | + | |
| 28 | + @Schema(description = "养护单位") | |
| 29 | + private String maintainunit; | |
| 30 | + | |
| 31 | + @Schema(description = "权属分类--数据字典:专业绿地和单位(居住区)") | |
| 32 | + private String oldtreeownership; | |
| 33 | + | |
| 34 | + @Schema(description = "生长地点") | |
| 35 | + private String growlocation; | |
| 36 | + | |
| 37 | + @Schema(description = "拉丁名", example = "李四") | |
| 38 | + private String latinname; | |
| 39 | + | |
| 40 | + @Schema(description = "树高") | |
| 41 | + private String treeheight; | |
| 42 | + | |
| 43 | + @Schema(description = "估测树龄") | |
| 44 | + private String estimationtreeage; | |
| 45 | + | |
| 46 | + @Schema(description = "胸径") | |
| 47 | + private String dbh; | |
| 48 | + | |
| 49 | + @Schema(description = "经度") | |
| 50 | + private String longitude; | |
| 51 | + | |
| 52 | + @Schema(description = "纬度") | |
| 53 | + private String latitude; | |
| 54 | + | |
| 55 | + @Schema(description = "冠幅东西") | |
| 56 | + private String canopyeastwest; | |
| 57 | + | |
| 58 | + @Schema(description = "冠幅南北") | |
| 59 | + private String canopysouthnorth; | |
| 60 | + | |
| 61 | + @Schema(description = "管护责任单位") | |
| 62 | + private String managedutyunit; | |
| 63 | + | |
| 64 | + @Schema(description = "干周") | |
| 65 | + private String weekday; | |
| 66 | + | |
| 67 | + @Schema(description = "生长势--数据字典:正常,衰弱,濒危,死亡") | |
| 68 | + private String growthvigor; | |
| 69 | + | |
| 70 | + @Schema(description = "生长环境") | |
| 71 | + private String growthenvironment; | |
| 72 | + | |
| 73 | + @Schema(description = "古树照片一") | |
| 74 | + private String treephotoone; | |
| 75 | + | |
| 76 | + @Schema(description = "春季养护管理措施") | |
| 77 | + private String springmaintenance; | |
| 78 | + | |
| 79 | + @Schema(description = "夏季养护管理措施") | |
| 80 | + private String summermaintenance; | |
| 81 | + | |
| 82 | + @Schema(description = "秋季养护管理措施") | |
| 83 | + private String autumnmaintenance; | |
| 84 | + | |
| 85 | + @Schema(description = "冬季养护管理措施") | |
| 86 | + private String wintermaintenance; | |
| 87 | + | |
| 88 | + @Schema(description = "年度") | |
| 89 | + private String annual; | |
| 90 | + | |
| 91 | + @Schema(description = "养护记录备注", example = "随便") | |
| 92 | + private String curingremark; | |
| 93 | + | |
| 94 | + @Schema(description = "古树照片二") | |
| 95 | + private String treephototwo; | |
| 96 | + | |
| 97 | + @Schema(description = "古树照片三") | |
| 98 | + private String treephotothree; | |
| 99 | + | |
| 100 | + @Schema(description = "古树铭牌照片") | |
| 101 | + private String nameplatephoto; | |
| 102 | + | |
| 103 | + @Schema(description = "数据状态(已更新、未更新)") | |
| 104 | + private String datastate; | |
| 105 | + | |
| 106 | + @Schema(description = "养护员工--作业队下派古树时选择的派发员工") | |
| 107 | + private String curingstaff; | |
| 108 | + | |
| 109 | + @Schema(description = "状态(驳回/确认)") | |
| 110 | + private String state; | |
| 111 | + | |
| 112 | + @Schema(description = "平台驳回状态(平台驳回)") | |
| 113 | + private String platformstate; | |
| 114 | + | |
| 115 | + @Schema(description = "所属街道") | |
| 116 | + private String street; | |
| 117 | + | |
| 118 | + @Schema(description = "责任人姓名", example = "赵六") | |
| 119 | + private String responsibleusername; | |
| 120 | + | |
| 121 | + @Schema(description = "责任人电话") | |
| 122 | + private String responsibleuserphone; | |
| 123 | + | |
| 124 | + @Schema(description = "创建者") | |
| 125 | + private String createby; | |
| 126 | + | |
| 127 | + @Schema(description = "创建时间") | |
| 128 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 129 | + private LocalDateTime[] createtime; | |
| 130 | + | |
| 131 | + @Schema(description = "更新者") | |
| 132 | + private String updateby; | |
| 133 | + | |
| 134 | + @Schema(description = "更新时间") | |
| 135 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 136 | + private String[] updatetime; | |
| 137 | + | |
| 138 | + @Schema(description = "部门id", example = "20245") | |
| 139 | + private Long deptId; | |
| 140 | + | |
| 141 | +} | |
| 0 | 142 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/oldtrees/vo/OldtreesRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.oldtrees.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 OldtreesRespVO { | |
| 14 | + | |
| 15 | + @Schema(description = "id", example = "4258") | |
| 16 | + @ExcelProperty("id") | |
| 17 | + private String id; | |
| 18 | + | |
| 19 | + @Schema(description = "编号") | |
| 20 | + @ExcelProperty("编号") | |
| 21 | + private String famoustreenumber; | |
| 22 | + | |
| 23 | + @Schema(description = "级别--数据字典:一级、两级") | |
| 24 | + @ExcelProperty("级别--数据字典:一级、两级") | |
| 25 | + private String treelevel; | |
| 26 | + | |
| 27 | + @Schema(description = "树种", example = "2") | |
| 28 | + @ExcelProperty("树种") | |
| 29 | + private String treetype; | |
| 30 | + | |
| 31 | + @Schema(description = "所在地") | |
| 32 | + @ExcelProperty("所在地") | |
| 33 | + private String location; | |
| 34 | + | |
| 35 | + @Schema(description = "养护单位") | |
| 36 | + @ExcelProperty("养护单位") | |
| 37 | + private String maintainunit; | |
| 38 | + | |
| 39 | + @Schema(description = "权属分类--数据字典:专业绿地和单位(居住区)") | |
| 40 | + @ExcelProperty("权属分类--数据字典:专业绿地和单位(居住区)") | |
| 41 | + private String oldtreeownership; | |
| 42 | + | |
| 43 | + @Schema(description = "生长地点") | |
| 44 | + @ExcelProperty("生长地点") | |
| 45 | + private String growlocation; | |
| 46 | + | |
| 47 | + @Schema(description = "拉丁名", example = "李四") | |
| 48 | + @ExcelProperty("拉丁名") | |
| 49 | + private String latinname; | |
| 50 | + | |
| 51 | + @Schema(description = "树高") | |
| 52 | + @ExcelProperty("树高") | |
| 53 | + private String treeheight; | |
| 54 | + | |
| 55 | + @Schema(description = "估测树龄") | |
| 56 | + @ExcelProperty("估测树龄") | |
| 57 | + private String estimationtreeage; | |
| 58 | + | |
| 59 | + @Schema(description = "胸径") | |
| 60 | + @ExcelProperty("胸径") | |
| 61 | + private String dbh; | |
| 62 | + | |
| 63 | + @Schema(description = "经度") | |
| 64 | + @ExcelProperty("经度") | |
| 65 | + private String longitude; | |
| 66 | + | |
| 67 | + @Schema(description = "纬度") | |
| 68 | + @ExcelProperty("纬度") | |
| 69 | + private String latitude; | |
| 70 | + | |
| 71 | + @Schema(description = "冠幅东西") | |
| 72 | + @ExcelProperty("冠幅东西") | |
| 73 | + private String canopyeastwest; | |
| 74 | + | |
| 75 | + @Schema(description = "冠幅南北") | |
| 76 | + @ExcelProperty("冠幅南北") | |
| 77 | + private String canopysouthnorth; | |
| 78 | + | |
| 79 | + @Schema(description = "管护责任单位") | |
| 80 | + @ExcelProperty("管护责任单位") | |
| 81 | + private String managedutyunit; | |
| 82 | + | |
| 83 | + @Schema(description = "干周") | |
| 84 | + @ExcelProperty("干周") | |
| 85 | + private String weekday; | |
| 86 | + | |
| 87 | + @Schema(description = "生长势--数据字典:正常,衰弱,濒危,死亡") | |
| 88 | + @ExcelProperty("生长势--数据字典:正常,衰弱,濒危,死亡") | |
| 89 | + private String growthvigor; | |
| 90 | + | |
| 91 | + @Schema(description = "生长环境") | |
| 92 | + @ExcelProperty("生长环境") | |
| 93 | + private String growthenvironment; | |
| 94 | + | |
| 95 | + @Schema(description = "古树照片一") | |
| 96 | + @ExcelProperty("古树照片一") | |
| 97 | + private String treephotoone; | |
| 98 | + | |
| 99 | + @Schema(description = "春季养护管理措施") | |
| 100 | + @ExcelProperty("春季养护管理措施") | |
| 101 | + private String springmaintenance; | |
| 102 | + | |
| 103 | + @Schema(description = "夏季养护管理措施") | |
| 104 | + @ExcelProperty("夏季养护管理措施") | |
| 105 | + private String summermaintenance; | |
| 106 | + | |
| 107 | + @Schema(description = "秋季养护管理措施") | |
| 108 | + @ExcelProperty("秋季养护管理措施") | |
| 109 | + private String autumnmaintenance; | |
| 110 | + | |
| 111 | + @Schema(description = "冬季养护管理措施") | |
| 112 | + @ExcelProperty("冬季养护管理措施") | |
| 113 | + private String wintermaintenance; | |
| 114 | + | |
| 115 | + @Schema(description = "年度") | |
| 116 | + @ExcelProperty("年度") | |
| 117 | + private String annual; | |
| 118 | + | |
| 119 | + @Schema(description = "养护记录备注", example = "随便") | |
| 120 | + @ExcelProperty("养护记录备注") | |
| 121 | + private String curingremark; | |
| 122 | + | |
| 123 | + @Schema(description = "古树照片二") | |
| 124 | + @ExcelProperty("古树照片二") | |
| 125 | + private String treephototwo; | |
| 126 | + | |
| 127 | + @Schema(description = "古树照片三") | |
| 128 | + @ExcelProperty("古树照片三") | |
| 129 | + private String treephotothree; | |
| 130 | + | |
| 131 | + @Schema(description = "古树铭牌照片") | |
| 132 | + @ExcelProperty("古树铭牌照片") | |
| 133 | + private String nameplatephoto; | |
| 134 | + | |
| 135 | + @Schema(description = "数据状态(已更新、未更新)") | |
| 136 | + @ExcelProperty("数据状态(已更新、未更新)") | |
| 137 | + private String datastate; | |
| 138 | + | |
| 139 | + @Schema(description = "养护员工--作业队下派古树时选择的派发员工") | |
| 140 | + @ExcelProperty("养护员工--作业队下派古树时选择的派发员工") | |
| 141 | + private String curingstaff; | |
| 142 | + | |
| 143 | + @Schema(description = "状态(驳回/确认)") | |
| 144 | + @ExcelProperty("状态(驳回/确认)") | |
| 145 | + private String state; | |
| 146 | + | |
| 147 | + @Schema(description = "平台驳回状态(平台驳回)") | |
| 148 | + @ExcelProperty("平台驳回状态(平台驳回)") | |
| 149 | + private String platformstate; | |
| 150 | + | |
| 151 | + @Schema(description = "所属街道") | |
| 152 | + @ExcelProperty("所属街道") | |
| 153 | + private String street; | |
| 154 | + | |
| 155 | + @Schema(description = "责任人姓名", example = "赵六") | |
| 156 | + @ExcelProperty("责任人姓名") | |
| 157 | + private String responsibleusername; | |
| 158 | + | |
| 159 | + @Schema(description = "责任人电话") | |
| 160 | + @ExcelProperty("责任人电话") | |
| 161 | + private String responsibleuserphone; | |
| 162 | + | |
| 163 | + @Schema(description = "创建者") | |
| 164 | + @ExcelProperty("创建者") | |
| 165 | + private String createby; | |
| 166 | + | |
| 167 | + @Schema(description = "创建时间") | |
| 168 | + @ExcelProperty("创建时间") | |
| 169 | + private LocalDateTime createtime; | |
| 170 | + | |
| 171 | + @Schema(description = "更新者") | |
| 172 | + @ExcelProperty("更新者") | |
| 173 | + private String updateby; | |
| 174 | + | |
| 175 | + @Schema(description = "更新时间") | |
| 176 | + @ExcelProperty("更新时间") | |
| 177 | + private String updatetime; | |
| 178 | + | |
| 179 | + @Schema(description = "部门id", requiredMode = Schema.RequiredMode.REQUIRED, example = "20245") | |
| 180 | + @ExcelProperty("部门id") | |
| 181 | + private Long deptId; | |
| 182 | + | |
| 183 | +} | |
| 0 | 184 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/oldtrees/vo/OldtreesSaveReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.oldtrees.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.*; | |
| 5 | +import java.util.*; | |
| 6 | +import jakarta.validation.constraints.*; | |
| 7 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 8 | +import java.time.LocalDateTime; | |
| 9 | + | |
| 10 | +@Schema(description = "管理后台 - 古树名木新增/修改 Request VO") | |
| 11 | +@Data | |
| 12 | +public class OldtreesSaveReqVO { | |
| 13 | + | |
| 14 | + @Schema(description = "id", example = "4258") | |
| 15 | + private String id; | |
| 16 | + | |
| 17 | + @Schema(description = "编号") | |
| 18 | + private String famoustreenumber; | |
| 19 | + | |
| 20 | + @Schema(description = "级别--数据字典:一级、两级") | |
| 21 | + private String treelevel; | |
| 22 | + | |
| 23 | + @Schema(description = "树种", example = "2") | |
| 24 | + private String treetype; | |
| 25 | + | |
| 26 | + @Schema(description = "所在地") | |
| 27 | + private String location; | |
| 28 | + | |
| 29 | + @Schema(description = "养护单位") | |
| 30 | + private String maintainunit; | |
| 31 | + | |
| 32 | + @Schema(description = "权属分类--数据字典:专业绿地和单位(居住区)") | |
| 33 | + private String oldtreeownership; | |
| 34 | + | |
| 35 | + @Schema(description = "生长地点") | |
| 36 | + private String growlocation; | |
| 37 | + | |
| 38 | + @Schema(description = "拉丁名", example = "李四") | |
| 39 | + private String latinname; | |
| 40 | + | |
| 41 | + @Schema(description = "树高") | |
| 42 | + private String treeheight; | |
| 43 | + | |
| 44 | + @Schema(description = "估测树龄") | |
| 45 | + private String estimationtreeage; | |
| 46 | + | |
| 47 | + @Schema(description = "胸径") | |
| 48 | + private String dbh; | |
| 49 | + | |
| 50 | + @Schema(description = "经度") | |
| 51 | + private String longitude; | |
| 52 | + | |
| 53 | + @Schema(description = "纬度") | |
| 54 | + private String latitude; | |
| 55 | + | |
| 56 | + @Schema(description = "冠幅东西") | |
| 57 | + private String canopyeastwest; | |
| 58 | + | |
| 59 | + @Schema(description = "冠幅南北") | |
| 60 | + private String canopysouthnorth; | |
| 61 | + | |
| 62 | + @Schema(description = "管护责任单位") | |
| 63 | + private String managedutyunit; | |
| 64 | + | |
| 65 | + @Schema(description = "干周") | |
| 66 | + private String weekday; | |
| 67 | + | |
| 68 | + @Schema(description = "生长势--数据字典:正常,衰弱,濒危,死亡") | |
| 69 | + private String growthvigor; | |
| 70 | + | |
| 71 | + @Schema(description = "生长环境") | |
| 72 | + private String growthenvironment; | |
| 73 | + | |
| 74 | + @Schema(description = "古树照片一") | |
| 75 | + private String treephotoone; | |
| 76 | + | |
| 77 | + @Schema(description = "春季养护管理措施") | |
| 78 | + private String springmaintenance; | |
| 79 | + | |
| 80 | + @Schema(description = "夏季养护管理措施") | |
| 81 | + private String summermaintenance; | |
| 82 | + | |
| 83 | + @Schema(description = "秋季养护管理措施") | |
| 84 | + private String autumnmaintenance; | |
| 85 | + | |
| 86 | + @Schema(description = "冬季养护管理措施") | |
| 87 | + private String wintermaintenance; | |
| 88 | + | |
| 89 | + @Schema(description = "年度") | |
| 90 | + private String annual; | |
| 91 | + | |
| 92 | + @Schema(description = "养护记录备注", example = "随便") | |
| 93 | + private String curingremark; | |
| 94 | + | |
| 95 | + @Schema(description = "古树照片二") | |
| 96 | + private String treephototwo; | |
| 97 | + | |
| 98 | + @Schema(description = "古树照片三") | |
| 99 | + private String treephotothree; | |
| 100 | + | |
| 101 | + @Schema(description = "古树铭牌照片") | |
| 102 | + private String nameplatephoto; | |
| 103 | + | |
| 104 | + @Schema(description = "数据状态(已更新、未更新)") | |
| 105 | + private String datastate; | |
| 106 | + | |
| 107 | + @Schema(description = "养护员工--作业队下派古树时选择的派发员工") | |
| 108 | + private String curingstaff; | |
| 109 | + | |
| 110 | + @Schema(description = "状态(驳回/确认)") | |
| 111 | + private String state; | |
| 112 | + | |
| 113 | + @Schema(description = "平台驳回状态(平台驳回)") | |
| 114 | + private String platformstate; | |
| 115 | + | |
| 116 | + @Schema(description = "所属街道") | |
| 117 | + private String street; | |
| 118 | + | |
| 119 | + @Schema(description = "责任人姓名", example = "赵六") | |
| 120 | + private String responsibleusername; | |
| 121 | + | |
| 122 | + @Schema(description = "责任人电话") | |
| 123 | + private String responsibleuserphone; | |
| 124 | + | |
| 125 | + @Schema(description = "创建者") | |
| 126 | + private String createby; | |
| 127 | + | |
| 128 | + @Schema(description = "创建时间") | |
| 129 | + private LocalDateTime createtime; | |
| 130 | + | |
| 131 | + @Schema(description = "更新者") | |
| 132 | + private String updateby; | |
| 133 | + | |
| 134 | + @Schema(description = "更新时间") | |
| 135 | + private LocalDateTime updatetime; | |
| 136 | + | |
| 137 | + @Schema(description = "部门id", requiredMode = Schema.RequiredMode.REQUIRED, example = "20245") | |
| 138 | + @NotNull(message = "部门id不能为空") | |
| 139 | + private Long deptId; | |
| 140 | + | |
| 141 | + private List<String> treeImgList; | |
| 142 | + | |
| 143 | + private List<String> nameplatephotoList; | |
| 144 | + | |
| 145 | +} | |
| 0 | 146 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/oldtreeschangelog/OldtreesChangeLogController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.oldtreeschangelog; | |
| 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.oldtreeschangelog.vo.*; | |
| 29 | +import com.zteits.urbanops.module.garden.dal.dataobject.oldtreeschangelog.OldtreesChangeLogDO; | |
| 30 | +import com.zteits.urbanops.module.garden.service.oldtreeschangelog.OldtreesChangeLogService; | |
| 31 | + | |
| 32 | +@Tag(name = "管理后台 - 古树名木修改记录") | |
| 33 | +@RestController | |
| 34 | +@RequestMapping({"/garden/oldtrees-change-log","/treerecord/logs"}) | |
| 35 | +@Validated | |
| 36 | +public class OldtreesChangeLogController { | |
| 37 | + | |
| 38 | + @Resource | |
| 39 | + private OldtreesChangeLogService oldtreesChangeLogService; | |
| 40 | + | |
| 41 | + @PostMapping("/create") | |
| 42 | + @Operation(summary = "创建古树名木修改记录") | |
| 43 | + @PreAuthorize("@ss.hasPermission('garden:oldtrees-change-log:create')") | |
| 44 | + public CommonResult<String> createOldtreesChangeLog(@Valid @RequestBody OldtreesChangeLogSaveReqVO createReqVO) { | |
| 45 | + return success(oldtreesChangeLogService.createOldtreesChangeLog(createReqVO)); | |
| 46 | + } | |
| 47 | + | |
| 48 | + @PutMapping("/update") | |
| 49 | + @Operation(summary = "更新古树名木修改记录") | |
| 50 | + @PreAuthorize("@ss.hasPermission('garden:oldtrees-change-log:update')") | |
| 51 | + public CommonResult<Boolean> updateOldtreesChangeLog(@Valid @RequestBody OldtreesChangeLogSaveReqVO updateReqVO) { | |
| 52 | + oldtreesChangeLogService.updateOldtreesChangeLog(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:oldtrees-change-log:delete')") | |
| 60 | + public CommonResult<Boolean> deleteOldtreesChangeLog(@RequestParam("id") String id) { | |
| 61 | + oldtreesChangeLogService.deleteOldtreesChangeLog(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:oldtrees-change-log:delete')") | |
| 69 | + public CommonResult<Boolean> deleteOldtreesChangeLogList(@RequestParam("ids") List<String> ids) { | |
| 70 | + oldtreesChangeLogService.deleteOldtreesChangeLogListByIds(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:oldtrees-change-log:query')") | |
| 78 | + public CommonResult<OldtreesChangeLogRespVO> getOldtreesChangeLog(@RequestParam("id") String id) { | |
| 79 | + OldtreesChangeLogDO oldtreesChangeLog = oldtreesChangeLogService.getOldtreesChangeLog(id); | |
| 80 | + return success(BeanUtils.toBean(oldtreesChangeLog, OldtreesChangeLogRespVO.class)); | |
| 81 | + } | |
| 82 | + | |
| 83 | + @GetMapping({"/page","/list"}) | |
| 84 | + @Operation(summary = "查询古树名木修改记录列表") | |
| 85 | + @PreAuthorize("@ss.hasPermission('garden:oldtrees-change-log:query')") | |
| 86 | + public CommonResult<PageResult<OldtreesChangeLogRespVO>> getOldtreesChangeLogPage(@Valid OldtreesChangeLogPageReqVO pageReqVO) { | |
| 87 | + PageResult<OldtreesChangeLogDO> pageResult = oldtreesChangeLogService.getOldtreesChangeLogPage(pageReqVO); | |
| 88 | + return success(BeanUtils.toBean(pageResult, OldtreesChangeLogRespVO.class)); | |
| 89 | + } | |
| 90 | + | |
| 91 | + @GetMapping("/export-excel") | |
| 92 | + @Operation(summary = "导出古树名木修改记录 Excel") | |
| 93 | + @PreAuthorize("@ss.hasPermission('garden:oldtrees-change-log:export')") | |
| 94 | + @ApiAccessLog(operateType = EXPORT) | |
| 95 | + public void exportOldtreesChangeLogExcel(@Valid OldtreesChangeLogPageReqVO pageReqVO, | |
| 96 | + HttpServletResponse response) throws IOException { | |
| 97 | + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 98 | + List<OldtreesChangeLogDO> list = oldtreesChangeLogService.getOldtreesChangeLogPage(pageReqVO).getList(); | |
| 99 | + // 导出 Excel | |
| 100 | + ExcelUtils.write(response, "古树名木修改记录.xls", "数据", OldtreesChangeLogRespVO.class, | |
| 101 | + BeanUtils.toBean(list, OldtreesChangeLogRespVO.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/oldtreeschangelog/vo/OldtreesChangeLogPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.oldtreeschangelog.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 OldtreesChangeLogPageReqVO extends PageParam { | |
| 15 | + | |
| 16 | + @Schema(description = "garden_oldtrees 的主键", example = "32596") | |
| 17 | + private String oldtreeid; | |
| 18 | + | |
| 19 | + @Schema(description = "编号") | |
| 20 | + private String famoustreenumber; | |
| 21 | + | |
| 22 | + @Schema(description = "级别--数据字典:一级、两级") | |
| 23 | + private String treelevel; | |
| 24 | + | |
| 25 | + @Schema(description = "树种", example = "2") | |
| 26 | + private String treetype; | |
| 27 | + | |
| 28 | + @Schema(description = "所在地") | |
| 29 | + private String location; | |
| 30 | + | |
| 31 | + @Schema(description = "养护单位") | |
| 32 | + private String maintainunit; | |
| 33 | + | |
| 34 | + @Schema(description = "权属分类--数据字典:专业绿地和单位(居住区)") | |
| 35 | + private String oldtreeownership; | |
| 36 | + | |
| 37 | + @Schema(description = "生长地点") | |
| 38 | + private String growlocation; | |
| 39 | + | |
| 40 | + @Schema(description = "拉丁名", example = "张三") | |
| 41 | + private String latinname; | |
| 42 | + | |
| 43 | + @Schema(description = "树高") | |
| 44 | + private String treeheight; | |
| 45 | + | |
| 46 | + @Schema(description = "估测树龄") | |
| 47 | + private String estimationtreeage; | |
| 48 | + | |
| 49 | + @Schema(description = "胸径") | |
| 50 | + private String dbh; | |
| 51 | + | |
| 52 | + @Schema(description = "经度") | |
| 53 | + private String longitude; | |
| 54 | + | |
| 55 | + @Schema(description = "纬度") | |
| 56 | + private String latitude; | |
| 57 | + | |
| 58 | + @Schema(description = "冠幅东西") | |
| 59 | + private String canopyeastwest; | |
| 60 | + | |
| 61 | + @Schema(description = "冠幅南北") | |
| 62 | + private String canopysouthnorth; | |
| 63 | + | |
| 64 | + @Schema(description = "管护责任单位") | |
| 65 | + private String managedutyunit; | |
| 66 | + | |
| 67 | + @Schema(description = "干周") | |
| 68 | + private String weekday; | |
| 69 | + | |
| 70 | + @Schema(description = "生长势--数据字典:正常,衰弱,濒危,死亡") | |
| 71 | + private String growthvigor; | |
| 72 | + | |
| 73 | + @Schema(description = "生长环境") | |
| 74 | + private String growthenvironment; | |
| 75 | + | |
| 76 | + @Schema(description = "古树照片一") | |
| 77 | + private String treephotoone; | |
| 78 | + | |
| 79 | + @Schema(description = "春季养护管理措施") | |
| 80 | + private String springmaintenance; | |
| 81 | + | |
| 82 | + @Schema(description = "夏季养护管理措施") | |
| 83 | + private String summermaintenance; | |
| 84 | + | |
| 85 | + @Schema(description = "秋季养护管理措施") | |
| 86 | + private String autumnmaintenance; | |
| 87 | + | |
| 88 | + @Schema(description = "冬季养护管理措施") | |
| 89 | + private String wintermaintenance; | |
| 90 | + | |
| 91 | + @Schema(description = "年度") | |
| 92 | + private String annual; | |
| 93 | + | |
| 94 | + @Schema(description = "养护记录备注", example = "你说的对") | |
| 95 | + private String curingremark; | |
| 96 | + | |
| 97 | + @Schema(description = "古树照片二") | |
| 98 | + private String treephototwo; | |
| 99 | + | |
| 100 | + @Schema(description = "古树照片三") | |
| 101 | + private String treephotothree; | |
| 102 | + | |
| 103 | + @Schema(description = "古树铭牌照片") | |
| 104 | + private String nameplatephoto; | |
| 105 | + | |
| 106 | + @Schema(description = "数据状态(已更新、未更新)") | |
| 107 | + private String datastate; | |
| 108 | + | |
| 109 | + @Schema(description = "养护员工--作业队下派古树时选择的派发员工") | |
| 110 | + private String curingstaff; | |
| 111 | + | |
| 112 | + @Schema(description = "状态(驳回/确认)") | |
| 113 | + private String state; | |
| 114 | + | |
| 115 | + @Schema(description = "平台驳回状态(平台驳回)") | |
| 116 | + private String platformstate; | |
| 117 | + | |
| 118 | + @Schema(description = "所属街道") | |
| 119 | + private String street; | |
| 120 | + | |
| 121 | + @Schema(description = "负责人姓名", example = "芋艿") | |
| 122 | + private String responsibleusername; | |
| 123 | + | |
| 124 | + @Schema(description = "负责人电话") | |
| 125 | + private String responsibleuserphone; | |
| 126 | + | |
| 127 | + @Schema(description = "创建者") | |
| 128 | + private String createby; | |
| 129 | + | |
| 130 | + @Schema(description = "创建时间") | |
| 131 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 132 | + private LocalDateTime[] createtime; | |
| 133 | + | |
| 134 | + @Schema(description = "更新者") | |
| 135 | + private String updateby; | |
| 136 | + | |
| 137 | + @Schema(description = "更新时间") | |
| 138 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 139 | + private String[] updatetime; | |
| 140 | + | |
| 141 | +} | |
| 0 | 142 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/oldtreeschangelog/vo/OldtreesChangeLogRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.oldtreeschangelog.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 OldtreesChangeLogRespVO { | |
| 14 | + | |
| 15 | + @Schema(description = "id", example = "148") | |
| 16 | + @ExcelProperty("id") | |
| 17 | + private String id; | |
| 18 | + | |
| 19 | + @Schema(description = "garden_oldtrees 的主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "32596") | |
| 20 | + @ExcelProperty("garden_oldtrees 的主键") | |
| 21 | + private String oldtreeid; | |
| 22 | + | |
| 23 | + @Schema(description = "编号") | |
| 24 | + @ExcelProperty("编号") | |
| 25 | + private String famoustreenumber; | |
| 26 | + | |
| 27 | + @Schema(description = "级别--数据字典:一级、两级") | |
| 28 | + @ExcelProperty("级别--数据字典:一级、两级") | |
| 29 | + private String treelevel; | |
| 30 | + | |
| 31 | + @Schema(description = "树种", example = "2") | |
| 32 | + @ExcelProperty("树种") | |
| 33 | + private String treetype; | |
| 34 | + | |
| 35 | + @Schema(description = "所在地") | |
| 36 | + @ExcelProperty("所在地") | |
| 37 | + private String location; | |
| 38 | + | |
| 39 | + @Schema(description = "养护单位") | |
| 40 | + @ExcelProperty("养护单位") | |
| 41 | + private String maintainunit; | |
| 42 | + | |
| 43 | + @Schema(description = "权属分类--数据字典:专业绿地和单位(居住区)") | |
| 44 | + @ExcelProperty("权属分类--数据字典:专业绿地和单位(居住区)") | |
| 45 | + private String oldtreeownership; | |
| 46 | + | |
| 47 | + @Schema(description = "生长地点") | |
| 48 | + @ExcelProperty("生长地点") | |
| 49 | + private String growlocation; | |
| 50 | + | |
| 51 | + @Schema(description = "拉丁名", example = "张三") | |
| 52 | + @ExcelProperty("拉丁名") | |
| 53 | + private String latinname; | |
| 54 | + | |
| 55 | + @Schema(description = "树高") | |
| 56 | + @ExcelProperty("树高") | |
| 57 | + private String treeheight; | |
| 58 | + | |
| 59 | + @Schema(description = "估测树龄") | |
| 60 | + @ExcelProperty("估测树龄") | |
| 61 | + private String estimationtreeage; | |
| 62 | + | |
| 63 | + @Schema(description = "胸径") | |
| 64 | + @ExcelProperty("胸径") | |
| 65 | + private String dbh; | |
| 66 | + | |
| 67 | + @Schema(description = "经度") | |
| 68 | + @ExcelProperty("经度") | |
| 69 | + private String longitude; | |
| 70 | + | |
| 71 | + @Schema(description = "纬度") | |
| 72 | + @ExcelProperty("纬度") | |
| 73 | + private String latitude; | |
| 74 | + | |
| 75 | + @Schema(description = "冠幅东西") | |
| 76 | + @ExcelProperty("冠幅东西") | |
| 77 | + private String canopyeastwest; | |
| 78 | + | |
| 79 | + @Schema(description = "冠幅南北") | |
| 80 | + @ExcelProperty("冠幅南北") | |
| 81 | + private String canopysouthnorth; | |
| 82 | + | |
| 83 | + @Schema(description = "管护责任单位") | |
| 84 | + @ExcelProperty("管护责任单位") | |
| 85 | + private String managedutyunit; | |
| 86 | + | |
| 87 | + @Schema(description = "干周") | |
| 88 | + @ExcelProperty("干周") | |
| 89 | + private String weekday; | |
| 90 | + | |
| 91 | + @Schema(description = "生长势--数据字典:正常,衰弱,濒危,死亡") | |
| 92 | + @ExcelProperty("生长势--数据字典:正常,衰弱,濒危,死亡") | |
| 93 | + private String growthvigor; | |
| 94 | + | |
| 95 | + @Schema(description = "生长环境") | |
| 96 | + @ExcelProperty("生长环境") | |
| 97 | + private String growthenvironment; | |
| 98 | + | |
| 99 | + @Schema(description = "古树照片一") | |
| 100 | + @ExcelProperty("古树照片一") | |
| 101 | + private String treephotoone; | |
| 102 | + | |
| 103 | + @Schema(description = "春季养护管理措施") | |
| 104 | + @ExcelProperty("春季养护管理措施") | |
| 105 | + private String springmaintenance; | |
| 106 | + | |
| 107 | + @Schema(description = "夏季养护管理措施") | |
| 108 | + @ExcelProperty("夏季养护管理措施") | |
| 109 | + private String summermaintenance; | |
| 110 | + | |
| 111 | + @Schema(description = "秋季养护管理措施") | |
| 112 | + @ExcelProperty("秋季养护管理措施") | |
| 113 | + private String autumnmaintenance; | |
| 114 | + | |
| 115 | + @Schema(description = "冬季养护管理措施") | |
| 116 | + @ExcelProperty("冬季养护管理措施") | |
| 117 | + private String wintermaintenance; | |
| 118 | + | |
| 119 | + @Schema(description = "年度") | |
| 120 | + @ExcelProperty("年度") | |
| 121 | + private String annual; | |
| 122 | + | |
| 123 | + @Schema(description = "养护记录备注", example = "你说的对") | |
| 124 | + @ExcelProperty("养护记录备注") | |
| 125 | + private String curingremark; | |
| 126 | + | |
| 127 | + @Schema(description = "古树照片二") | |
| 128 | + @ExcelProperty("古树照片二") | |
| 129 | + private String treephototwo; | |
| 130 | + | |
| 131 | + @Schema(description = "古树照片三") | |
| 132 | + @ExcelProperty("古树照片三") | |
| 133 | + private String treephotothree; | |
| 134 | + | |
| 135 | + @Schema(description = "古树铭牌照片") | |
| 136 | + @ExcelProperty("古树铭牌照片") | |
| 137 | + private String nameplatephoto; | |
| 138 | + | |
| 139 | + @Schema(description = "数据状态(已更新、未更新)") | |
| 140 | + @ExcelProperty("数据状态(已更新、未更新)") | |
| 141 | + private String datastate; | |
| 142 | + | |
| 143 | + @Schema(description = "养护员工--作业队下派古树时选择的派发员工") | |
| 144 | + @ExcelProperty("养护员工--作业队下派古树时选择的派发员工") | |
| 145 | + private String curingstaff; | |
| 146 | + | |
| 147 | + @Schema(description = "状态(驳回/确认)") | |
| 148 | + @ExcelProperty("状态(驳回/确认)") | |
| 149 | + private String state; | |
| 150 | + | |
| 151 | + @Schema(description = "平台驳回状态(平台驳回)") | |
| 152 | + @ExcelProperty("平台驳回状态(平台驳回)") | |
| 153 | + private String platformstate; | |
| 154 | + | |
| 155 | + @Schema(description = "所属街道") | |
| 156 | + @ExcelProperty("所属街道") | |
| 157 | + private String street; | |
| 158 | + | |
| 159 | + @Schema(description = "负责人姓名", example = "芋艿") | |
| 160 | + @ExcelProperty("负责人姓名") | |
| 161 | + private String responsibleusername; | |
| 162 | + | |
| 163 | + @Schema(description = "负责人电话") | |
| 164 | + @ExcelProperty("负责人电话") | |
| 165 | + private String responsibleuserphone; | |
| 166 | + | |
| 167 | + @Schema(description = "创建者") | |
| 168 | + @ExcelProperty("创建者") | |
| 169 | + private String createby; | |
| 170 | + | |
| 171 | + @Schema(description = "创建时间") | |
| 172 | + @ExcelProperty("创建时间") | |
| 173 | + private LocalDateTime createtime; | |
| 174 | + | |
| 175 | + @Schema(description = "更新者") | |
| 176 | + @ExcelProperty("更新者") | |
| 177 | + private String updateby; | |
| 178 | + | |
| 179 | + @Schema(description = "更新时间") | |
| 180 | + @ExcelProperty("更新时间") | |
| 181 | + private String updatetime; | |
| 182 | + | |
| 183 | +} | |
| 0 | 184 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/oldtreeschangelog/vo/OldtreesChangeLogSaveReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.oldtreeschangelog.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.*; | |
| 5 | +import java.util.*; | |
| 6 | +import jakarta.validation.constraints.*; | |
| 7 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 8 | +import java.time.LocalDateTime; | |
| 9 | + | |
| 10 | +@Schema(description = "管理后台 - 古树名木修改记录新增/修改 Request VO") | |
| 11 | +@Data | |
| 12 | +public class OldtreesChangeLogSaveReqVO { | |
| 13 | + | |
| 14 | + @Schema(description = "id", example = "148") | |
| 15 | + private String id; | |
| 16 | + | |
| 17 | + @Schema(description = "garden_oldtrees 的主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "32596") | |
| 18 | + @NotEmpty(message = "garden_oldtrees 的主键不能为空") | |
| 19 | + private String oldtreeid; | |
| 20 | + | |
| 21 | + @Schema(description = "编号") | |
| 22 | + private String famoustreenumber; | |
| 23 | + | |
| 24 | + @Schema(description = "级别--数据字典:一级、两级") | |
| 25 | + private String treelevel; | |
| 26 | + | |
| 27 | + @Schema(description = "树种", example = "2") | |
| 28 | + private String treetype; | |
| 29 | + | |
| 30 | + @Schema(description = "所在地") | |
| 31 | + private String location; | |
| 32 | + | |
| 33 | + @Schema(description = "养护单位") | |
| 34 | + private String maintainunit; | |
| 35 | + | |
| 36 | + @Schema(description = "权属分类--数据字典:专业绿地和单位(居住区)") | |
| 37 | + private String oldtreeownership; | |
| 38 | + | |
| 39 | + @Schema(description = "生长地点") | |
| 40 | + private String growlocation; | |
| 41 | + | |
| 42 | + @Schema(description = "拉丁名", example = "张三") | |
| 43 | + private String latinname; | |
| 44 | + | |
| 45 | + @Schema(description = "树高") | |
| 46 | + private String treeheight; | |
| 47 | + | |
| 48 | + @Schema(description = "估测树龄") | |
| 49 | + private String estimationtreeage; | |
| 50 | + | |
| 51 | + @Schema(description = "胸径") | |
| 52 | + private String dbh; | |
| 53 | + | |
| 54 | + @Schema(description = "经度") | |
| 55 | + private String longitude; | |
| 56 | + | |
| 57 | + @Schema(description = "纬度") | |
| 58 | + private String latitude; | |
| 59 | + | |
| 60 | + @Schema(description = "冠幅东西") | |
| 61 | + private String canopyeastwest; | |
| 62 | + | |
| 63 | + @Schema(description = "冠幅南北") | |
| 64 | + private String canopysouthnorth; | |
| 65 | + | |
| 66 | + @Schema(description = "管护责任单位") | |
| 67 | + private String managedutyunit; | |
| 68 | + | |
| 69 | + @Schema(description = "干周") | |
| 70 | + private String weekday; | |
| 71 | + | |
| 72 | + @Schema(description = "生长势--数据字典:正常,衰弱,濒危,死亡") | |
| 73 | + private String growthvigor; | |
| 74 | + | |
| 75 | + @Schema(description = "生长环境") | |
| 76 | + private String growthenvironment; | |
| 77 | + | |
| 78 | + @Schema(description = "古树照片一") | |
| 79 | + private String treephotoone; | |
| 80 | + | |
| 81 | + @Schema(description = "春季养护管理措施") | |
| 82 | + private String springmaintenance; | |
| 83 | + | |
| 84 | + @Schema(description = "夏季养护管理措施") | |
| 85 | + private String summermaintenance; | |
| 86 | + | |
| 87 | + @Schema(description = "秋季养护管理措施") | |
| 88 | + private String autumnmaintenance; | |
| 89 | + | |
| 90 | + @Schema(description = "冬季养护管理措施") | |
| 91 | + private String wintermaintenance; | |
| 92 | + | |
| 93 | + @Schema(description = "年度") | |
| 94 | + private String annual; | |
| 95 | + | |
| 96 | + @Schema(description = "养护记录备注", example = "你说的对") | |
| 97 | + private String curingremark; | |
| 98 | + | |
| 99 | + @Schema(description = "古树照片二") | |
| 100 | + private String treephototwo; | |
| 101 | + | |
| 102 | + @Schema(description = "古树照片三") | |
| 103 | + private String treephotothree; | |
| 104 | + | |
| 105 | + @Schema(description = "古树铭牌照片") | |
| 106 | + private String nameplatephoto; | |
| 107 | + | |
| 108 | + @Schema(description = "数据状态(已更新、未更新)") | |
| 109 | + private String datastate; | |
| 110 | + | |
| 111 | + @Schema(description = "养护员工--作业队下派古树时选择的派发员工") | |
| 112 | + private String curingstaff; | |
| 113 | + | |
| 114 | + @Schema(description = "状态(驳回/确认)") | |
| 115 | + private String state; | |
| 116 | + | |
| 117 | + @Schema(description = "平台驳回状态(平台驳回)") | |
| 118 | + private String platformstate; | |
| 119 | + | |
| 120 | + @Schema(description = "所属街道") | |
| 121 | + private String street; | |
| 122 | + | |
| 123 | + @Schema(description = "负责人姓名", example = "芋艿") | |
| 124 | + private String responsibleusername; | |
| 125 | + | |
| 126 | + @Schema(description = "负责人电话") | |
| 127 | + private String responsibleuserphone; | |
| 128 | + | |
| 129 | + @Schema(description = "创建者") | |
| 130 | + private String createby; | |
| 131 | + | |
| 132 | + @Schema(description = "创建时间") | |
| 133 | + private LocalDateTime createtime; | |
| 134 | + | |
| 135 | + @Schema(description = "更新者") | |
| 136 | + private String updateby; | |
| 137 | + | |
| 138 | + @Schema(description = "更新时间") | |
| 139 | + private String updatetime; | |
| 140 | + | |
| 141 | +} | |
| 0 | 142 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/tree/TreeController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.tree; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.dict.core.DictFrameworkUtils; | |
| 4 | +import com.zteits.urbanops.framework.security.core.LoginUser; | |
| 5 | +import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; | |
| 6 | +import org.springframework.web.bind.annotation.*; | |
| 7 | +import jakarta.annotation.Resource; | |
| 8 | +import org.springframework.validation.annotation.Validated; | |
| 9 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 10 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 11 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 12 | +import io.swagger.v3.oas.annotations.Operation; | |
| 13 | + | |
| 14 | +import jakarta.validation.constraints.*; | |
| 15 | +import jakarta.validation.*; | |
| 16 | +import jakarta.servlet.http.*; | |
| 17 | + | |
| 18 | +import java.time.LocalDateTime; | |
| 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 | +import com.zteits.urbanops.module.garden.controller.admin.tree.vo.*; | |
| 34 | +import com.zteits.urbanops.module.garden.dal.dataobject.tree.TreeDO; | |
| 35 | +import com.zteits.urbanops.module.garden.service.tree.TreeService; | |
| 36 | + | |
| 37 | +@Tag(name = "管理后台 - 一树一档案") | |
| 38 | +@RestController | |
| 39 | +@RequestMapping({"/garden/tree","/business/tree"}) | |
| 40 | +@Validated | |
| 41 | +public class TreeController { | |
| 42 | + | |
| 43 | + @Resource | |
| 44 | + private TreeService treeService; | |
| 45 | + | |
| 46 | + @PostMapping({"/create",""}) | |
| 47 | + @Operation(summary = "创建一树一档案") | |
| 48 | + @PreAuthorize("@ss.hasPermission('garden:tree:create')") | |
| 49 | + public CommonResult<Long> createTree(@Valid @RequestBody TreeSaveReqVO createReqVO) { | |
| 50 | + Long userId = SecurityFrameworkUtils.getLoginUserId(); | |
| 51 | + Long loginUserDeptId = SecurityFrameworkUtils.getLoginUserDeptId(); | |
| 52 | + createReqVO.setCreateby(String.valueOf(userId)); | |
| 53 | + createReqVO.setCreatetime(LocalDateTime.now()); | |
| 54 | + createReqVO.setUpdateby(String.valueOf(userId)); | |
| 55 | + createReqVO.setUpdatetime(LocalDateTime.now()); | |
| 56 | + createReqVO.setDeptId(loginUserDeptId); | |
| 57 | + return success(treeService.createTree(createReqVO)); | |
| 58 | + } | |
| 59 | + | |
| 60 | + @PutMapping({"/update",""}) | |
| 61 | + @Operation(summary = "更新一树一档案") | |
| 62 | + @PreAuthorize("@ss.hasPermission('garden:tree:update')") | |
| 63 | + public CommonResult<Boolean> updateTree(@Valid @RequestBody TreeSaveReqVO updateReqVO) { | |
| 64 | + updateReqVO.setUpdateby(String.valueOf(SecurityFrameworkUtils.getLoginUserId())); | |
| 65 | + updateReqVO.setUpdatetime(LocalDateTime.now()); | |
| 66 | + treeService.updateTree(updateReqVO); | |
| 67 | + return success(true); | |
| 68 | + } | |
| 69 | + | |
| 70 | + @DeleteMapping("/delete") | |
| 71 | + @Operation(summary = "删除一树一档案") | |
| 72 | + @Parameter(name = "id", description = "编号", required = true) | |
| 73 | + @PreAuthorize("@ss.hasPermission('garden:tree:delete')") | |
| 74 | + public CommonResult<Boolean> deleteTree(@RequestParam("id") Long id) { | |
| 75 | + treeService.deleteTree(id); | |
| 76 | + return success(true); | |
| 77 | + } | |
| 78 | + | |
| 79 | + @DeleteMapping("/delete-list") | |
| 80 | + @Parameter(name = "ids", description = "编号", required = true) | |
| 81 | + @Operation(summary = "批量删除一树一档案") | |
| 82 | + @PreAuthorize("@ss.hasPermission('garden:tree:delete')") | |
| 83 | + public CommonResult<Boolean> deleteTreeList(@RequestParam("ids") List<Long> ids) { | |
| 84 | + treeService.deleteTreeListByIds(ids); | |
| 85 | + return success(true); | |
| 86 | + } | |
| 87 | + | |
| 88 | + @GetMapping("/get") | |
| 89 | + @Operation(summary = "获得一树一档案") | |
| 90 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | |
| 91 | + @PreAuthorize("@ss.hasPermission('garden:tree:query')") | |
| 92 | + public CommonResult<TreeRespVO> getTree(@RequestParam("id") Long id) { | |
| 93 | + TreeDO tree = treeService.getTree(id); | |
| 94 | + return success(BeanUtils.toBean(tree, TreeRespVO.class)); | |
| 95 | + } | |
| 96 | + | |
| 97 | + @GetMapping({"/page","/list"}) | |
| 98 | + @Operation(summary = "获得一树一档案分页") | |
| 99 | + @PreAuthorize("@ss.hasPermission('garden:tree:query')") | |
| 100 | + public CommonResult<PageResult<TreeRespVO>> getTreePage(@Valid TreePageReqVO pageReqVO) { | |
| 101 | + PageResult<TreeDO> pageResult = treeService.getTreePage(pageReqVO); | |
| 102 | + return success(BeanUtils.toBean(pageResult, TreeRespVO.class)); | |
| 103 | + } | |
| 104 | + | |
| 105 | + @GetMapping({"/export-excel","export"}) | |
| 106 | + @Operation(summary = "导出一树一档案 Excel") | |
| 107 | + @PreAuthorize("@ss.hasPermission('garden:tree:export')") | |
| 108 | + @ApiAccessLog(operateType = EXPORT) | |
| 109 | + public void exportTreeExcel(@Valid TreePageReqVO pageReqVO, | |
| 110 | + HttpServletResponse response) throws IOException { | |
| 111 | + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 112 | + List<TreeDO> list = treeService.getTreePage(pageReqVO).getList(); | |
| 113 | + fillDictData(list); | |
| 114 | + // 导出 Excel | |
| 115 | + ExcelUtils.write(response, "一树一档案.xls", "数据", TreeRespVO.class, | |
| 116 | + BeanUtils.toBean(list, TreeRespVO.class)); | |
| 117 | + } | |
| 118 | + | |
| 119 | + @GetMapping("/dept/list") | |
| 120 | + @PreAuthorize("@ss.hasPermission('garden:tree:list')") | |
| 121 | + public CommonResult<List<CompanyDeptRoadVO>> list(@RequestParam Long companyId,@RequestParam(required = false) String roadName) { | |
| 122 | + LoginUser user = SecurityFrameworkUtils.getLoginUser(); | |
| 123 | + if (null == user) { | |
| 124 | + return null; | |
| 125 | + } | |
| 126 | + TreeVO tree = new TreeVO(); | |
| 127 | + tree.setBelongCompanyId(companyId); | |
| 128 | + tree.setRoadName(roadName); | |
| 129 | + tree.setDeptId(null); | |
| 130 | + return success(treeService.getCompanyDeptRoadTreeData(tree)); | |
| 131 | + } | |
| 132 | + | |
| 133 | + @GetMapping("/road/list") | |
| 134 | + @PreAuthorize("@ss.hasPermission('garden:tree:list')") | |
| 135 | + public CommonResult<PageResult<RoadTreeVO>> listTreesByRoad(@RequestParam(required = false) Long road) { | |
| 136 | + TreePageReqVO pageReqVO = new TreePageReqVO(); | |
| 137 | + pageReqVO.setRoad(road); | |
| 138 | + PageResult<RoadTreeVO> pageResult = treeService.getTreesByRoadId(pageReqVO); | |
| 139 | + return success(pageResult); | |
| 140 | + } | |
| 141 | + | |
| 142 | + | |
| 143 | + private void fillDictData(List<TreeDO> list) { | |
| 144 | + for (TreeDO gardenTree : list) { | |
| 145 | + String maintainUnit = DictFrameworkUtils.parseDictDataValue("maintain_unit", gardenTree.getMaintainunit()); | |
| 146 | + gardenTree.setMaintainunit(maintainUnit); | |
| 147 | + | |
| 148 | + String street = DictFrameworkUtils.parseDictDataValue("street_belong", gardenTree.getStreet()); | |
| 149 | + gardenTree.setStreet(street); | |
| 150 | + | |
| 151 | + String ownership = DictFrameworkUtils.parseDictDataValue("tree_ownership", gardenTree.getOldtreeownership()); | |
| 152 | + gardenTree.setOldtreeownership(ownership); | |
| 153 | + | |
| 154 | + String growthVigor = DictFrameworkUtils.parseDictDataValue("growth_vigor", gardenTree.getGrowthvigor()); | |
| 155 | + gardenTree.setGrowthvigor(growthVigor); | |
| 156 | + String treeLevel = DictFrameworkUtils.parseDictDataValue("tree_level", gardenTree.getTreelevel()); | |
| 157 | + gardenTree.setTreelevel(treeLevel); | |
| 158 | + String dataState = DictFrameworkUtils.parseDictDataValue("data_state", gardenTree.getDatastate()); | |
| 159 | + gardenTree.setDatastate(dataState); | |
| 160 | + } | |
| 161 | + } | |
| 162 | + | |
| 163 | +} | |
| 0 | 164 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/treerecord/vo/CompanyDeptRoadVO.java renamed to urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/tree/vo/CompanyDeptRoadVO.java
| 1 | -package com.zteits.urbanops.module.garden.controller.admin.treerecord.vo; | |
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.tree.vo; | |
| 2 | 2 | |
| 3 | 3 | import lombok.Data; |
| 4 | 4 | |
| 5 | 5 | import java.util.List; |
| 6 | 6 | |
| 7 | +/** | |
| 8 | + * Description: <p></p> | |
| 9 | + * <p> | |
| 10 | + * Author: gelinghu | |
| 11 | + * Date: 2025年8月23 16:07 | |
| 12 | + */ | |
| 7 | 13 | @Data |
| 8 | 14 | public class CompanyDeptRoadVO { |
| 9 | - private String companyId; | |
| 15 | + private Long companyId; | |
| 10 | 16 | private String companyName; |
| 17 | + | |
| 11 | 18 | private List<DeptVO> depts; |
| 12 | 19 | |
| 13 | 20 | @Data |
| ... | ... | @@ -21,9 +28,11 @@ public class CompanyDeptRoadVO { |
| 21 | 28 | public static class RoadVO { |
| 22 | 29 | private Long roadId; |
| 23 | 30 | private String roadName; |
| 24 | - private Long treeCount; | |
| 25 | - private Long recordedCount; | |
| 26 | - private String startRemark; | |
| 27 | - private String endRemark; | |
| 31 | + private Integer treeCount; // 总树木数 | |
| 32 | + private Integer recordedCount; // 已录入行道树数 | |
| 33 | + private String startRemark; // 起点 | |
| 34 | + private String endRemark; // 终点 | |
| 28 | 35 | } |
| 29 | -} | |
| 30 | 36 | \ No newline at end of file |
| 37 | +} | |
| 38 | + | |
| 39 | + | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/tree/vo/RoadTreeVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.tree.vo; | |
| 2 | + | |
| 3 | +import lombok.Data; | |
| 4 | + | |
| 5 | +import java.util.Date; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * Description: <p></p> | |
| 9 | + * <p> | |
| 10 | + * Author: gelinghu | |
| 11 | + * Date: 2025年8月23 16:07 | |
| 12 | + */ | |
| 13 | +@Data | |
| 14 | +public class RoadTreeVO { | |
| 15 | + private Long id; | |
| 16 | + private String treetype; // 树种 | |
| 17 | + private String treeheight; // 高度 | |
| 18 | + private String dbh; // 胸径 | |
| 19 | + private String treenumber; // 编号 | |
| 20 | + private Date updatetime; // 最后修改时间 | |
| 21 | + private String treephoto; // 图片 | |
| 22 | +} | |
| 23 | + | |
| 24 | + | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/treerecord/GardenTreeDO.java renamed to urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/tree/vo/TreePageReqVO.java
| 1 | -package com.zteits.urbanops.module.garden.dal.dataobject.treerecord; | |
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.tree.vo; | |
| 2 | 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 | -import lombok.experimental.Accessors; | |
| 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 | 9 | |
| 10 | -@TableName("garden_tree") | |
| 11 | -@KeySequence("garden_tree_seq") | |
| 10 | +import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | |
| 11 | + | |
| 12 | +@Schema(description = "管理后台 - 一树一档案分页 Request VO") | |
| 12 | 13 | @Data |
| 13 | -@Accessors(chain = false) | |
| 14 | -public class GardenTreeDO extends BaseDO { | |
| 15 | - @TableId | |
| 16 | - private Long id; | |
| 14 | +public class TreePageReqVO extends PageParam { | |
| 15 | + | |
| 16 | + @Schema(description = "编号") | |
| 17 | 17 | private String treenumber; |
| 18 | + | |
| 19 | + @Schema(description = "拉丁名", example = "李四") | |
| 18 | 20 | private String latinname; |
| 21 | + | |
| 22 | + @Schema(description = "树种", example = "2") | |
| 19 | 23 | private String treetype; |
| 24 | + | |
| 25 | + @Schema(description = "树高") | |
| 20 | 26 | private String treeheight; |
| 27 | + | |
| 28 | + @Schema(description = "冠幅") | |
| 21 | 29 | private String canopy; |
| 30 | + | |
| 31 | + @Schema(description = "胸径") | |
| 22 | 32 | private String dbh; |
| 33 | + | |
| 34 | + @Schema(description = "生长势--数据字典:正常,衰弱,濒危,死亡") | |
| 23 | 35 | private String growthvigor; |
| 36 | + | |
| 37 | + @Schema(description = "级别--数据字典:一级、两级") | |
| 24 | 38 | private String treelevel; |
| 39 | + | |
| 40 | + @Schema(description = "经度") | |
| 25 | 41 | private String longitude; |
| 42 | + | |
| 43 | + @Schema(description = "纬度") | |
| 26 | 44 | private String latitude; |
| 45 | + | |
| 46 | + @Schema(description = "所在地") | |
| 27 | 47 | private String location; |
| 48 | + | |
| 49 | + @Schema(description = "养护单位") | |
| 28 | 50 | private String maintainunit; |
| 51 | + | |
| 52 | + @Schema(description = "管护单位") | |
| 29 | 53 | private String managedutyunit; |
| 54 | + | |
| 55 | + @Schema(description = "道路id") | |
| 30 | 56 | private Long road; |
| 57 | + | |
| 58 | + @Schema(description = "所属街道") | |
| 31 | 59 | private String street; |
| 60 | + | |
| 61 | + @Schema(description = "权属分类--数据字典:专业绿地和单位(居住区)") | |
| 32 | 62 | private String oldtreeownership; |
| 63 | + | |
| 64 | + @Schema(description = "数据状态(已更新、未更新)") | |
| 33 | 65 | private String datastate; |
| 66 | + | |
| 67 | + @Schema(description = "估测树龄") | |
| 34 | 68 | private String estimationtreeage; |
| 69 | + | |
| 70 | + @Schema(description = "冠幅东西") | |
| 35 | 71 | private String canopyeastwest; |
| 72 | + | |
| 73 | + @Schema(description = "冠幅南北") | |
| 36 | 74 | private String canopysouthnorth; |
| 75 | + | |
| 76 | + @Schema(description = "干周") | |
| 37 | 77 | private String weekday; |
| 78 | + | |
| 79 | + @Schema(description = "生长地点") | |
| 38 | 80 | private String growlocation; |
| 81 | + | |
| 82 | + @Schema(description = "生长环境") | |
| 39 | 83 | private String growthenvironment; |
| 84 | + | |
| 85 | + @Schema(description = "树木照片一") | |
| 40 | 86 | private String treephotoone; |
| 87 | + | |
| 88 | + @Schema(description = "古树照片二") | |
| 41 | 89 | private String treephototwo; |
| 90 | + | |
| 91 | + @Schema(description = "古树照片三") | |
| 42 | 92 | private String treephotothree; |
| 93 | + | |
| 94 | + @Schema(description = "古树照片四") | |
| 43 | 95 | private String treephotofour; |
| 96 | + | |
| 97 | + @Schema(description = "古树照片五") | |
| 44 | 98 | private String treephotofive; |
| 99 | + | |
| 100 | + @Schema(description = "创建者") | |
| 45 | 101 | private String createby; |
| 102 | + | |
| 103 | + @Schema(description = "创建时间") | |
| 104 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 105 | + private LocalDateTime[] createtime; | |
| 106 | + | |
| 107 | + @Schema(description = "更新者") | |
| 46 | 108 | private String updateby; |
| 47 | - private Long deptId; | |
| 109 | + | |
| 110 | + @Schema(description = "更新时间") | |
| 111 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 112 | + private LocalDateTime[] updatetime; | |
| 113 | + | |
| 114 | + @Schema(description = "备注", example = "你说的对") | |
| 48 | 115 | private String remark; |
| 116 | + | |
| 117 | + @Schema(description = "部门id", example = "17101") | |
| 118 | + private Long deptId; | |
| 119 | + | |
| 49 | 120 | } |
| 50 | 121 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/tree/vo/TreeRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.tree.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 TreeRespVO { | |
| 14 | + | |
| 15 | + @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28236") | |
| 16 | + @ExcelProperty("id") | |
| 17 | + private Long id; | |
| 18 | + | |
| 19 | + @Schema(description = "编号") | |
| 20 | + @ExcelProperty("编号") | |
| 21 | + private String treenumber; | |
| 22 | + | |
| 23 | + @Schema(description = "拉丁名", example = "李四") | |
| 24 | + @ExcelProperty("拉丁名") | |
| 25 | + private String latinname; | |
| 26 | + | |
| 27 | + @Schema(description = "树种", example = "2") | |
| 28 | + @ExcelProperty("树种") | |
| 29 | + private String treetype; | |
| 30 | + | |
| 31 | + @Schema(description = "树高") | |
| 32 | + @ExcelProperty("树高") | |
| 33 | + private String treeheight; | |
| 34 | + | |
| 35 | + @Schema(description = "冠幅") | |
| 36 | + @ExcelProperty("冠幅") | |
| 37 | + private String canopy; | |
| 38 | + | |
| 39 | + @Schema(description = "胸径") | |
| 40 | + @ExcelProperty("胸径") | |
| 41 | + private String dbh; | |
| 42 | + | |
| 43 | + @Schema(description = "生长势--数据字典:正常,衰弱,濒危,死亡") | |
| 44 | + @ExcelProperty("生长势--数据字典:正常,衰弱,濒危,死亡") | |
| 45 | + private String growthvigor; | |
| 46 | + | |
| 47 | + @Schema(description = "级别--数据字典:一级、两级") | |
| 48 | + @ExcelProperty("级别--数据字典:一级、两级") | |
| 49 | + private String treelevel; | |
| 50 | + | |
| 51 | + @Schema(description = "经度") | |
| 52 | + @ExcelProperty("经度") | |
| 53 | + private String longitude; | |
| 54 | + | |
| 55 | + @Schema(description = "纬度") | |
| 56 | + @ExcelProperty("纬度") | |
| 57 | + private String latitude; | |
| 58 | + | |
| 59 | + @Schema(description = "所在地") | |
| 60 | + @ExcelProperty("所在地") | |
| 61 | + private String location; | |
| 62 | + | |
| 63 | + @Schema(description = "养护单位") | |
| 64 | + @ExcelProperty("养护单位") | |
| 65 | + private String maintainunit; | |
| 66 | + | |
| 67 | + @Schema(description = "管护单位") | |
| 68 | + @ExcelProperty("管护单位") | |
| 69 | + private String managedutyunit; | |
| 70 | + | |
| 71 | + @Schema(description = "道路id") | |
| 72 | + @ExcelProperty("道路id") | |
| 73 | + private Long road; | |
| 74 | + | |
| 75 | + @Schema(description = "所属街道") | |
| 76 | + @ExcelProperty("所属街道") | |
| 77 | + private String street; | |
| 78 | + | |
| 79 | + @Schema(description = "权属分类--数据字典:专业绿地和单位(居住区)") | |
| 80 | + @ExcelProperty("权属分类--数据字典:专业绿地和单位(居住区)") | |
| 81 | + private String oldtreeownership; | |
| 82 | + | |
| 83 | + @Schema(description = "数据状态(已更新、未更新)") | |
| 84 | + @ExcelProperty("数据状态(已更新、未更新)") | |
| 85 | + private String datastate; | |
| 86 | + | |
| 87 | + @Schema(description = "估测树龄") | |
| 88 | + @ExcelProperty("估测树龄") | |
| 89 | + private String estimationtreeage; | |
| 90 | + | |
| 91 | + @Schema(description = "冠幅东西") | |
| 92 | + @ExcelProperty("冠幅东西") | |
| 93 | + private String canopyeastwest; | |
| 94 | + | |
| 95 | + @Schema(description = "冠幅南北") | |
| 96 | + @ExcelProperty("冠幅南北") | |
| 97 | + private String canopysouthnorth; | |
| 98 | + | |
| 99 | + @Schema(description = "干周") | |
| 100 | + @ExcelProperty("干周") | |
| 101 | + private String weekday; | |
| 102 | + | |
| 103 | + @Schema(description = "生长地点") | |
| 104 | + @ExcelProperty("生长地点") | |
| 105 | + private String growlocation; | |
| 106 | + | |
| 107 | + @Schema(description = "生长环境") | |
| 108 | + @ExcelProperty("生长环境") | |
| 109 | + private String growthenvironment; | |
| 110 | + | |
| 111 | + @Schema(description = "树木照片一") | |
| 112 | + @ExcelProperty("树木照片一") | |
| 113 | + private String treephotoone; | |
| 114 | + | |
| 115 | + @Schema(description = "古树照片二") | |
| 116 | + @ExcelProperty("古树照片二") | |
| 117 | + private String treephototwo; | |
| 118 | + | |
| 119 | + @Schema(description = "古树照片三") | |
| 120 | + @ExcelProperty("古树照片三") | |
| 121 | + private String treephotothree; | |
| 122 | + | |
| 123 | + @Schema(description = "古树照片四") | |
| 124 | + @ExcelProperty("古树照片四") | |
| 125 | + private String treephotofour; | |
| 126 | + | |
| 127 | + @Schema(description = "古树照片五") | |
| 128 | + @ExcelProperty("古树照片五") | |
| 129 | + private String treephotofive; | |
| 130 | + | |
| 131 | + @Schema(description = "创建者") | |
| 132 | + @ExcelProperty("创建者") | |
| 133 | + private String createby; | |
| 134 | + | |
| 135 | + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 136 | + @ExcelProperty("创建时间") | |
| 137 | + private LocalDateTime createtime; | |
| 138 | + | |
| 139 | + @Schema(description = "更新者") | |
| 140 | + @ExcelProperty("更新者") | |
| 141 | + private String updateby; | |
| 142 | + | |
| 143 | + @Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 144 | + @ExcelProperty("更新时间") | |
| 145 | + private LocalDateTime updatetime; | |
| 146 | + | |
| 147 | + @Schema(description = "备注", example = "你说的对") | |
| 148 | + @ExcelProperty("备注") | |
| 149 | + private String remark; | |
| 150 | + | |
| 151 | + @Schema(description = "部门id", requiredMode = Schema.RequiredMode.REQUIRED, example = "17101") | |
| 152 | + @ExcelProperty("部门id") | |
| 153 | + private Long deptId; | |
| 154 | + | |
| 155 | +} | |
| 0 | 156 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/tree/vo/TreeSaveReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.tree.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.*; | |
| 5 | +import java.util.*; | |
| 6 | +import jakarta.validation.constraints.*; | |
| 7 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 8 | +import java.time.LocalDateTime; | |
| 9 | + | |
| 10 | +@Schema(description = "管理后台 - 一树一档案新增/修改 Request VO") | |
| 11 | +@Data | |
| 12 | +public class TreeSaveReqVO { | |
| 13 | + | |
| 14 | + @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28236") | |
| 15 | + private Long id; | |
| 16 | + | |
| 17 | + @Schema(description = "编号") | |
| 18 | + private String treenumber; | |
| 19 | + | |
| 20 | + @Schema(description = "拉丁名", example = "李四") | |
| 21 | + private String latinname; | |
| 22 | + | |
| 23 | + @Schema(description = "树种", example = "2") | |
| 24 | + private String treetype; | |
| 25 | + | |
| 26 | + @Schema(description = "树高") | |
| 27 | + private String treeheight; | |
| 28 | + | |
| 29 | + @Schema(description = "冠幅") | |
| 30 | + private String canopy; | |
| 31 | + | |
| 32 | + @Schema(description = "胸径") | |
| 33 | + private String dbh; | |
| 34 | + | |
| 35 | + @Schema(description = "生长势--数据字典:正常,衰弱,濒危,死亡") | |
| 36 | + private String growthvigor; | |
| 37 | + | |
| 38 | + @Schema(description = "级别--数据字典:一级、两级") | |
| 39 | + private String treelevel; | |
| 40 | + | |
| 41 | + @Schema(description = "经度") | |
| 42 | + private String longitude; | |
| 43 | + | |
| 44 | + @Schema(description = "纬度") | |
| 45 | + private String latitude; | |
| 46 | + | |
| 47 | + @Schema(description = "所在地") | |
| 48 | + private String location; | |
| 49 | + | |
| 50 | + @Schema(description = "养护单位") | |
| 51 | + private String maintainunit; | |
| 52 | + | |
| 53 | + @Schema(description = "管护单位") | |
| 54 | + private String managedutyunit; | |
| 55 | + | |
| 56 | + @Schema(description = "道路id") | |
| 57 | + private Long road; | |
| 58 | + | |
| 59 | + @Schema(description = "所属街道") | |
| 60 | + private String street; | |
| 61 | + | |
| 62 | + @Schema(description = "权属分类--数据字典:专业绿地和单位(居住区)") | |
| 63 | + private String oldtreeownership; | |
| 64 | + | |
| 65 | + @Schema(description = "数据状态(已更新、未更新)") | |
| 66 | + private String datastate; | |
| 67 | + | |
| 68 | + @Schema(description = "估测树龄") | |
| 69 | + private String estimationtreeage; | |
| 70 | + | |
| 71 | + @Schema(description = "冠幅东西") | |
| 72 | + private String canopyeastwest; | |
| 73 | + | |
| 74 | + @Schema(description = "冠幅南北") | |
| 75 | + private String canopysouthnorth; | |
| 76 | + | |
| 77 | + @Schema(description = "干周") | |
| 78 | + private String weekday; | |
| 79 | + | |
| 80 | + @Schema(description = "生长地点") | |
| 81 | + private String growlocation; | |
| 82 | + | |
| 83 | + @Schema(description = "生长环境") | |
| 84 | + private String growthenvironment; | |
| 85 | + | |
| 86 | + @Schema(description = "树木照片一") | |
| 87 | + private String treephotoone; | |
| 88 | + | |
| 89 | + @Schema(description = "古树照片二") | |
| 90 | + private String treephototwo; | |
| 91 | + | |
| 92 | + @Schema(description = "古树照片三") | |
| 93 | + private String treephotothree; | |
| 94 | + | |
| 95 | + @Schema(description = "古树照片四") | |
| 96 | + private String treephotofour; | |
| 97 | + | |
| 98 | + @Schema(description = "古树照片五") | |
| 99 | + private String treephotofive; | |
| 100 | + | |
| 101 | + @Schema(description = "创建者") | |
| 102 | + private String createby; | |
| 103 | + | |
| 104 | + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 105 | + @NotNull(message = "创建时间不能为空") | |
| 106 | + private LocalDateTime createtime; | |
| 107 | + | |
| 108 | + @Schema(description = "更新者") | |
| 109 | + private String updateby; | |
| 110 | + | |
| 111 | + @Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 112 | + @NotNull(message = "更新时间不能为空") | |
| 113 | + private LocalDateTime updatetime; | |
| 114 | + | |
| 115 | + @Schema(description = "备注", example = "你说的对") | |
| 116 | + private String remark; | |
| 117 | + | |
| 118 | + @Schema(description = "部门id", requiredMode = Schema.RequiredMode.REQUIRED, example = "17101") | |
| 119 | + @NotNull(message = "部门id不能为空") | |
| 120 | + private Long deptId; | |
| 121 | + | |
| 122 | + private List<String> treeImgList; | |
| 123 | + | |
| 124 | + | |
| 125 | +} | |
| 0 | 126 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/tree/vo/TreeVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.tree.vo; | |
| 2 | + | |
| 3 | +import lombok.Data; | |
| 4 | + | |
| 5 | +/** | |
| 6 | + * Description: <p></p> | |
| 7 | + * <p> | |
| 8 | + * Author: gelinghu | |
| 9 | + * Date: 2025年8月23 16:07 | |
| 10 | + */ | |
| 11 | +@Data | |
| 12 | +public class TreeVO { | |
| 13 | + | |
| 14 | + /** 部门ID */ | |
| 15 | + private Long deptId; | |
| 16 | + | |
| 17 | + /** 归属单位ID */ | |
| 18 | + private Long belongCompanyId; | |
| 19 | + | |
| 20 | + private String roadName; | |
| 21 | + | |
| 22 | +} | |
| 23 | + | |
| 24 | + | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/treechangelog/TreeChangeLogController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.treechangelog; | |
| 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.treechangelog.vo.*; | |
| 29 | +import com.zteits.urbanops.module.garden.dal.dataobject.treechangelog.TreeChangeLogDO; | |
| 30 | +import com.zteits.urbanops.module.garden.service.treechangelog.TreeChangeLogService; | |
| 31 | + | |
| 32 | +@Tag(name = "管理后台 - 一树一档案修改记录") | |
| 33 | +@RestController | |
| 34 | +@RequestMapping({"/garden/tree-change-log","/gardentree/logs"}) | |
| 35 | +@Validated | |
| 36 | +public class TreeChangeLogController { | |
| 37 | + | |
| 38 | + @Resource | |
| 39 | + private TreeChangeLogService treeChangeLogService; | |
| 40 | + | |
| 41 | + @PostMapping("/create") | |
| 42 | + @Operation(summary = "创建一树一档案修改记录") | |
| 43 | + @PreAuthorize("@ss.hasPermission('garden:tree-change-log:create')") | |
| 44 | + public CommonResult<Long> createTreeChangeLog(@Valid @RequestBody TreeChangeLogSaveReqVO createReqVO) { | |
| 45 | + return success(treeChangeLogService.createTreeChangeLog(createReqVO)); | |
| 46 | + } | |
| 47 | + | |
| 48 | + @PutMapping("/update") | |
| 49 | + @Operation(summary = "更新一树一档案修改记录") | |
| 50 | + @PreAuthorize("@ss.hasPermission('garden:tree-change-log:update')") | |
| 51 | + public CommonResult<Boolean> updateTreeChangeLog(@Valid @RequestBody TreeChangeLogSaveReqVO updateReqVO) { | |
| 52 | + treeChangeLogService.updateTreeChangeLog(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:tree-change-log:delete')") | |
| 60 | + public CommonResult<Boolean> deleteTreeChangeLog(@RequestParam("id") Long id) { | |
| 61 | + treeChangeLogService.deleteTreeChangeLog(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:tree-change-log:delete')") | |
| 69 | + public CommonResult<Boolean> deleteTreeChangeLogList(@RequestParam("ids") List<Long> ids) { | |
| 70 | + treeChangeLogService.deleteTreeChangeLogListByIds(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:tree-change-log:query')") | |
| 78 | + public CommonResult<TreeChangeLogRespVO> getTreeChangeLog(@RequestParam("id") Long id) { | |
| 79 | + TreeChangeLogDO treeChangeLog = treeChangeLogService.getTreeChangeLog(id); | |
| 80 | + return success(BeanUtils.toBean(treeChangeLog, TreeChangeLogRespVO.class)); | |
| 81 | + } | |
| 82 | + | |
| 83 | + @GetMapping({"/page","/list"}) | |
| 84 | + @Operation(summary = "查询一树一档案修改记录列表") | |
| 85 | + @PreAuthorize("@ss.hasPermission('garden:tree-change-log:query')") | |
| 86 | + public CommonResult<PageResult<TreeChangeLogRespVO>> getTreeChangeLogPage(@Valid TreeChangeLogPageReqVO pageReqVO) { | |
| 87 | + PageResult<TreeChangeLogDO> pageResult = treeChangeLogService.getTreeChangeLogPage(pageReqVO); | |
| 88 | + return success(BeanUtils.toBean(pageResult, TreeChangeLogRespVO.class)); | |
| 89 | + } | |
| 90 | + | |
| 91 | + @GetMapping("/export-excel") | |
| 92 | + @Operation(summary = "导出一树一档案修改记录 Excel") | |
| 93 | + @PreAuthorize("@ss.hasPermission('garden:tree-change-log:export')") | |
| 94 | + @ApiAccessLog(operateType = EXPORT) | |
| 95 | + public void exportTreeChangeLogExcel(@Valid TreeChangeLogPageReqVO pageReqVO, | |
| 96 | + HttpServletResponse response) throws IOException { | |
| 97 | + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 98 | + List<TreeChangeLogDO> list = treeChangeLogService.getTreeChangeLogPage(pageReqVO).getList(); | |
| 99 | + // 导出 Excel | |
| 100 | + ExcelUtils.write(response, "一树一档案修改记录.xls", "数据", TreeChangeLogRespVO.class, | |
| 101 | + BeanUtils.toBean(list, TreeChangeLogRespVO.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/treechangelog/vo/TreeChangeLogPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.treechangelog.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 TreeChangeLogPageReqVO extends PageParam { | |
| 15 | + | |
| 16 | + @Schema(description = "garden_tree 的主键", example = "26527") | |
| 17 | + private Long treeid; | |
| 18 | + | |
| 19 | + @Schema(description = "编号") | |
| 20 | + private String treenumber; | |
| 21 | + | |
| 22 | + @Schema(description = "拉丁名", example = "赵六") | |
| 23 | + private String latinname; | |
| 24 | + | |
| 25 | + @Schema(description = "树种", example = "1") | |
| 26 | + private String treetype; | |
| 27 | + | |
| 28 | + @Schema(description = "树高") | |
| 29 | + private String treeheight; | |
| 30 | + | |
| 31 | + @Schema(description = "冠幅") | |
| 32 | + private String canopy; | |
| 33 | + | |
| 34 | + @Schema(description = "胸径") | |
| 35 | + private String dbh; | |
| 36 | + | |
| 37 | + @Schema(description = "生长势--数据字典:正常,衰弱,濒危,死亡") | |
| 38 | + private String growthvigor; | |
| 39 | + | |
| 40 | + @Schema(description = "级别--数据字典:一级、两级") | |
| 41 | + private String treelevel; | |
| 42 | + | |
| 43 | + @Schema(description = "经度") | |
| 44 | + private String longitude; | |
| 45 | + | |
| 46 | + @Schema(description = "纬度") | |
| 47 | + private String latitude; | |
| 48 | + | |
| 49 | + @Schema(description = "所在地") | |
| 50 | + private String location; | |
| 51 | + | |
| 52 | + @Schema(description = "养护单位") | |
| 53 | + private String maintainunit; | |
| 54 | + | |
| 55 | + @Schema(description = "管护单位") | |
| 56 | + private String managedutyunit; | |
| 57 | + | |
| 58 | + @Schema(description = "道路id") | |
| 59 | + private Long road; | |
| 60 | + | |
| 61 | + @Schema(description = "所属街道") | |
| 62 | + private String street; | |
| 63 | + | |
| 64 | + @Schema(description = "权属分类--数据字典:专业绿地和单位(居住区)") | |
| 65 | + private String oldtreeownership; | |
| 66 | + | |
| 67 | + @Schema(description = "数据状态(已更新、未更新)") | |
| 68 | + private String datastate; | |
| 69 | + | |
| 70 | + @Schema(description = "估测树龄") | |
| 71 | + private String estimationtreeage; | |
| 72 | + | |
| 73 | + @Schema(description = "冠幅东西") | |
| 74 | + private String canopyeastwest; | |
| 75 | + | |
| 76 | + @Schema(description = "冠幅南北") | |
| 77 | + private String canopysouthnorth; | |
| 78 | + | |
| 79 | + @Schema(description = "干周") | |
| 80 | + private String weekday; | |
| 81 | + | |
| 82 | + @Schema(description = "生长地点") | |
| 83 | + private String growlocation; | |
| 84 | + | |
| 85 | + @Schema(description = "生长环境") | |
| 86 | + private String growthenvironment; | |
| 87 | + | |
| 88 | + @Schema(description = "树木照片一") | |
| 89 | + private String treephotoone; | |
| 90 | + | |
| 91 | + @Schema(description = "古树照片二") | |
| 92 | + private String treephototwo; | |
| 93 | + | |
| 94 | + @Schema(description = "古树照片三") | |
| 95 | + private String treephotothree; | |
| 96 | + | |
| 97 | + @Schema(description = "古树照片四") | |
| 98 | + private String treephotofour; | |
| 99 | + | |
| 100 | + @Schema(description = "古树照片五") | |
| 101 | + private String treephotofive; | |
| 102 | + | |
| 103 | + @Schema(description = "创建者") | |
| 104 | + private String createby; | |
| 105 | + | |
| 106 | + @Schema(description = "创建时间") | |
| 107 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 108 | + private LocalDateTime[] createtime; | |
| 109 | + | |
| 110 | + @Schema(description = "更新者") | |
| 111 | + private String updateby; | |
| 112 | + | |
| 113 | + @Schema(description = "更新时间") | |
| 114 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 115 | + private LocalDateTime[] updatetime; | |
| 116 | + | |
| 117 | + @Schema(description = "备注", example = "你猜") | |
| 118 | + private String remark; | |
| 119 | + | |
| 120 | +} | |
| 0 | 121 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/treechangelog/vo/TreeChangeLogRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.treechangelog.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 TreeChangeLogRespVO { | |
| 14 | + | |
| 15 | + @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "3528") | |
| 16 | + @ExcelProperty("id") | |
| 17 | + private Long id; | |
| 18 | + | |
| 19 | + @Schema(description = "garden_tree 的主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "26527") | |
| 20 | + @ExcelProperty("garden_tree 的主键") | |
| 21 | + private Long treeid; | |
| 22 | + | |
| 23 | + @Schema(description = "编号") | |
| 24 | + @ExcelProperty("编号") | |
| 25 | + private String treenumber; | |
| 26 | + | |
| 27 | + @Schema(description = "拉丁名", example = "赵六") | |
| 28 | + @ExcelProperty("拉丁名") | |
| 29 | + private String latinname; | |
| 30 | + | |
| 31 | + @Schema(description = "树种", example = "1") | |
| 32 | + @ExcelProperty("树种") | |
| 33 | + private String treetype; | |
| 34 | + | |
| 35 | + @Schema(description = "树高") | |
| 36 | + @ExcelProperty("树高") | |
| 37 | + private String treeheight; | |
| 38 | + | |
| 39 | + @Schema(description = "冠幅") | |
| 40 | + @ExcelProperty("冠幅") | |
| 41 | + private String canopy; | |
| 42 | + | |
| 43 | + @Schema(description = "胸径") | |
| 44 | + @ExcelProperty("胸径") | |
| 45 | + private String dbh; | |
| 46 | + | |
| 47 | + @Schema(description = "生长势--数据字典:正常,衰弱,濒危,死亡") | |
| 48 | + @ExcelProperty("生长势--数据字典:正常,衰弱,濒危,死亡") | |
| 49 | + private String growthvigor; | |
| 50 | + | |
| 51 | + @Schema(description = "级别--数据字典:一级、两级") | |
| 52 | + @ExcelProperty("级别--数据字典:一级、两级") | |
| 53 | + private String treelevel; | |
| 54 | + | |
| 55 | + @Schema(description = "经度") | |
| 56 | + @ExcelProperty("经度") | |
| 57 | + private String longitude; | |
| 58 | + | |
| 59 | + @Schema(description = "纬度") | |
| 60 | + @ExcelProperty("纬度") | |
| 61 | + private String latitude; | |
| 62 | + | |
| 63 | + @Schema(description = "所在地") | |
| 64 | + @ExcelProperty("所在地") | |
| 65 | + private String location; | |
| 66 | + | |
| 67 | + @Schema(description = "养护单位") | |
| 68 | + @ExcelProperty("养护单位") | |
| 69 | + private String maintainunit; | |
| 70 | + | |
| 71 | + @Schema(description = "管护单位") | |
| 72 | + @ExcelProperty("管护单位") | |
| 73 | + private String managedutyunit; | |
| 74 | + | |
| 75 | + @Schema(description = "道路id") | |
| 76 | + @ExcelProperty("道路id") | |
| 77 | + private Long road; | |
| 78 | + | |
| 79 | + @Schema(description = "所属街道") | |
| 80 | + @ExcelProperty("所属街道") | |
| 81 | + private String street; | |
| 82 | + | |
| 83 | + @Schema(description = "权属分类--数据字典:专业绿地和单位(居住区)") | |
| 84 | + @ExcelProperty("权属分类--数据字典:专业绿地和单位(居住区)") | |
| 85 | + private String oldtreeownership; | |
| 86 | + | |
| 87 | + @Schema(description = "数据状态(已更新、未更新)") | |
| 88 | + @ExcelProperty("数据状态(已更新、未更新)") | |
| 89 | + private String datastate; | |
| 90 | + | |
| 91 | + @Schema(description = "估测树龄") | |
| 92 | + @ExcelProperty("估测树龄") | |
| 93 | + private String estimationtreeage; | |
| 94 | + | |
| 95 | + @Schema(description = "冠幅东西") | |
| 96 | + @ExcelProperty("冠幅东西") | |
| 97 | + private String canopyeastwest; | |
| 98 | + | |
| 99 | + @Schema(description = "冠幅南北") | |
| 100 | + @ExcelProperty("冠幅南北") | |
| 101 | + private String canopysouthnorth; | |
| 102 | + | |
| 103 | + @Schema(description = "干周") | |
| 104 | + @ExcelProperty("干周") | |
| 105 | + private String weekday; | |
| 106 | + | |
| 107 | + @Schema(description = "生长地点") | |
| 108 | + @ExcelProperty("生长地点") | |
| 109 | + private String growlocation; | |
| 110 | + | |
| 111 | + @Schema(description = "生长环境") | |
| 112 | + @ExcelProperty("生长环境") | |
| 113 | + private String growthenvironment; | |
| 114 | + | |
| 115 | + @Schema(description = "树木照片一") | |
| 116 | + @ExcelProperty("树木照片一") | |
| 117 | + private String treephotoone; | |
| 118 | + | |
| 119 | + @Schema(description = "古树照片二") | |
| 120 | + @ExcelProperty("古树照片二") | |
| 121 | + private String treephototwo; | |
| 122 | + | |
| 123 | + @Schema(description = "古树照片三") | |
| 124 | + @ExcelProperty("古树照片三") | |
| 125 | + private String treephotothree; | |
| 126 | + | |
| 127 | + @Schema(description = "古树照片四") | |
| 128 | + @ExcelProperty("古树照片四") | |
| 129 | + private String treephotofour; | |
| 130 | + | |
| 131 | + @Schema(description = "古树照片五") | |
| 132 | + @ExcelProperty("古树照片五") | |
| 133 | + private String treephotofive; | |
| 134 | + | |
| 135 | + @Schema(description = "创建者") | |
| 136 | + @ExcelProperty("创建者") | |
| 137 | + private String createby; | |
| 138 | + | |
| 139 | + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 140 | + @ExcelProperty("创建时间") | |
| 141 | + private LocalDateTime createtime; | |
| 142 | + | |
| 143 | + @Schema(description = "更新者") | |
| 144 | + @ExcelProperty("更新者") | |
| 145 | + private String updateby; | |
| 146 | + | |
| 147 | + @Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 148 | + @ExcelProperty("更新时间") | |
| 149 | + private LocalDateTime updatetime; | |
| 150 | + | |
| 151 | + @Schema(description = "备注", example = "你猜") | |
| 152 | + @ExcelProperty("备注") | |
| 153 | + private String remark; | |
| 154 | + | |
| 155 | +} | |
| 0 | 156 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/treechangelog/vo/TreeChangeLogSaveReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.treechangelog.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.*; | |
| 5 | +import java.util.*; | |
| 6 | +import jakarta.validation.constraints.*; | |
| 7 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 8 | +import java.time.LocalDateTime; | |
| 9 | + | |
| 10 | +@Schema(description = "管理后台 - 一树一档案修改记录新增/修改 Request VO") | |
| 11 | +@Data | |
| 12 | +public class TreeChangeLogSaveReqVO { | |
| 13 | + | |
| 14 | + @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "3528") | |
| 15 | + private Long id; | |
| 16 | + | |
| 17 | + @Schema(description = "garden_tree 的主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "26527") | |
| 18 | + @NotNull(message = "garden_tree 的主键不能为空") | |
| 19 | + private Long treeid; | |
| 20 | + | |
| 21 | + @Schema(description = "编号") | |
| 22 | + private String treenumber; | |
| 23 | + | |
| 24 | + @Schema(description = "拉丁名", example = "赵六") | |
| 25 | + private String latinname; | |
| 26 | + | |
| 27 | + @Schema(description = "树种", example = "1") | |
| 28 | + private String treetype; | |
| 29 | + | |
| 30 | + @Schema(description = "树高") | |
| 31 | + private String treeheight; | |
| 32 | + | |
| 33 | + @Schema(description = "冠幅") | |
| 34 | + private String canopy; | |
| 35 | + | |
| 36 | + @Schema(description = "胸径") | |
| 37 | + private String dbh; | |
| 38 | + | |
| 39 | + @Schema(description = "生长势--数据字典:正常,衰弱,濒危,死亡") | |
| 40 | + private String growthvigor; | |
| 41 | + | |
| 42 | + @Schema(description = "级别--数据字典:一级、两级") | |
| 43 | + private String treelevel; | |
| 44 | + | |
| 45 | + @Schema(description = "经度") | |
| 46 | + private String longitude; | |
| 47 | + | |
| 48 | + @Schema(description = "纬度") | |
| 49 | + private String latitude; | |
| 50 | + | |
| 51 | + @Schema(description = "所在地") | |
| 52 | + private String location; | |
| 53 | + | |
| 54 | + @Schema(description = "养护单位") | |
| 55 | + private String maintainunit; | |
| 56 | + | |
| 57 | + @Schema(description = "管护单位") | |
| 58 | + private String managedutyunit; | |
| 59 | + | |
| 60 | + @Schema(description = "道路id") | |
| 61 | + private Long road; | |
| 62 | + | |
| 63 | + @Schema(description = "所属街道") | |
| 64 | + private String street; | |
| 65 | + | |
| 66 | + @Schema(description = "权属分类--数据字典:专业绿地和单位(居住区)") | |
| 67 | + private String oldtreeownership; | |
| 68 | + | |
| 69 | + @Schema(description = "数据状态(已更新、未更新)") | |
| 70 | + private String datastate; | |
| 71 | + | |
| 72 | + @Schema(description = "估测树龄") | |
| 73 | + private String estimationtreeage; | |
| 74 | + | |
| 75 | + @Schema(description = "冠幅东西") | |
| 76 | + private String canopyeastwest; | |
| 77 | + | |
| 78 | + @Schema(description = "冠幅南北") | |
| 79 | + private String canopysouthnorth; | |
| 80 | + | |
| 81 | + @Schema(description = "干周") | |
| 82 | + private String weekday; | |
| 83 | + | |
| 84 | + @Schema(description = "生长地点") | |
| 85 | + private String growlocation; | |
| 86 | + | |
| 87 | + @Schema(description = "生长环境") | |
| 88 | + private String growthenvironment; | |
| 89 | + | |
| 90 | + @Schema(description = "树木照片一") | |
| 91 | + private String treephotoone; | |
| 92 | + | |
| 93 | + @Schema(description = "古树照片二") | |
| 94 | + private String treephototwo; | |
| 95 | + | |
| 96 | + @Schema(description = "古树照片三") | |
| 97 | + private String treephotothree; | |
| 98 | + | |
| 99 | + @Schema(description = "古树照片四") | |
| 100 | + private String treephotofour; | |
| 101 | + | |
| 102 | + @Schema(description = "古树照片五") | |
| 103 | + private String treephotofive; | |
| 104 | + | |
| 105 | + @Schema(description = "创建者") | |
| 106 | + private String createby; | |
| 107 | + | |
| 108 | + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 109 | + @NotNull(message = "创建时间不能为空") | |
| 110 | + private LocalDateTime createtime; | |
| 111 | + | |
| 112 | + @Schema(description = "更新者") | |
| 113 | + private String updateby; | |
| 114 | + | |
| 115 | + @Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 116 | + @NotNull(message = "更新时间不能为空") | |
| 117 | + private LocalDateTime updatetime; | |
| 118 | + | |
| 119 | + @Schema(description = "备注", example = "你猜") | |
| 120 | + private String remark; | |
| 121 | + | |
| 122 | +} | |
| 0 | 123 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/treerecord/GardenTreeController.java deleted
| 1 | -package com.zteits.urbanops.module.garden.controller.admin.treerecord; | |
| 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.module.garden.dal.dataobject.treerecord.GardenTreeDO; | |
| 7 | -import com.zteits.urbanops.module.garden.service.treerecord.GardenTreeService; | |
| 8 | -import com.zteits.urbanops.module.garden.controller.admin.treerecord.vo.CompanyDeptRoadVO; | |
| 9 | -import com.zteits.urbanops.module.garden.controller.admin.treerecord.vo.RoadTreeVO; | |
| 10 | -import io.swagger.v3.oas.annotations.Operation; | |
| 11 | -import io.swagger.v3.oas.annotations.tags.Tag; | |
| 12 | -import jakarta.annotation.Resource; | |
| 13 | -import jakarta.servlet.http.HttpServletResponse; | |
| 14 | -import org.springframework.security.access.prepost.PreAuthorize; | |
| 15 | -import org.springframework.web.bind.annotation.*; | |
| 16 | - | |
| 17 | -import java.io.IOException; | |
| 18 | -import java.util.List; | |
| 19 | - | |
| 20 | -import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 21 | -import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 22 | -import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; | |
| 23 | - | |
| 24 | -@Tag(name = "管理后台 - 一树一档案") | |
| 25 | -@RestController | |
| 26 | -@RequestMapping("/business/tree") | |
| 27 | -public class GardenTreeController { | |
| 28 | - | |
| 29 | - @Resource | |
| 30 | - private GardenTreeService gardenTreeService; | |
| 31 | - | |
| 32 | - @GetMapping("/list") | |
| 33 | - @Operation(summary = "一树一档案-列表") | |
| 34 | - @PreAuthorize("@ss.hasPermission('business:tree:list')") | |
| 35 | - public CommonResult<PageResult<GardenTreeDO>> list(@RequestParam(required = false) Integer pageNum, | |
| 36 | - @RequestParam(required = false) Integer pageSize, | |
| 37 | - GardenTreeDO where) { | |
| 38 | - int pn = pageNum == null ? 1 : pageNum; | |
| 39 | - int ps = pageSize == null ? 10 : pageSize; | |
| 40 | - return success(gardenTreeService.selectPage(where, pn, ps)); | |
| 41 | - } | |
| 42 | - | |
| 43 | - @GetMapping("/export") | |
| 44 | - @Operation(summary = "一树一档案-导出") | |
| 45 | - @PreAuthorize("@ss.hasPermission('business:tree:export')") | |
| 46 | - @ApiAccessLog(operateType = EXPORT) | |
| 47 | - public void export(GardenTreeDO where, HttpServletResponse response) throws IOException { | |
| 48 | - List<GardenTreeDO> list = gardenTreeService.selectPage(where, 1, Integer.MAX_VALUE).getList(); | |
| 49 | - ExcelUtils.write(response, "树木信息.xls", "数据", GardenTreeDO.class, list); | |
| 50 | - } | |
| 51 | - | |
| 52 | - @GetMapping("/{id}") | |
| 53 | - @Operation(summary = "一树一档案-详情") | |
| 54 | - @PreAuthorize("@ss.hasPermission('business:tree:query')") | |
| 55 | - public CommonResult<GardenTreeDO> getInfo(@PathVariable("id") Long id) { | |
| 56 | - return success(gardenTreeService.selectById(id)); | |
| 57 | - } | |
| 58 | - | |
| 59 | - @PostMapping | |
| 60 | - @Operation(summary = "一树一档案-新增") | |
| 61 | - @PreAuthorize("@ss.hasPermission('business:tree:add')") | |
| 62 | - public CommonResult<Boolean> add(@RequestBody GardenTreeDO entity) { | |
| 63 | - entity.setDeleted(false); | |
| 64 | - return success(gardenTreeService.insert(entity)); | |
| 65 | - } | |
| 66 | - | |
| 67 | - @PutMapping | |
| 68 | - @Operation(summary = "一树一档案-修改") | |
| 69 | - @PreAuthorize("@ss.hasPermission('business:tree:edit')") | |
| 70 | - public CommonResult<Boolean> edit(@RequestBody GardenTreeDO entity) { | |
| 71 | - return success(gardenTreeService.update(entity)); | |
| 72 | - } | |
| 73 | - | |
| 74 | - @DeleteMapping("/{ids}") | |
| 75 | - @Operation(summary = "一树一档案-删除") | |
| 76 | - @PreAuthorize("@ss.hasPermission('business:tree:remove')") | |
| 77 | - public CommonResult<Boolean> remove(@PathVariable List<Long> ids) { | |
| 78 | - return success(gardenTreeService.deleteByIds(ids)); | |
| 79 | - } | |
| 80 | - | |
| 81 | - @GetMapping("/dept/list") | |
| 82 | - @Operation(summary = "一树一档案-公司部门道路树结构") | |
| 83 | - @PreAuthorize("@ss.hasPermission('business:tree:list')") | |
| 84 | - public CommonResult<List<CompanyDeptRoadVO>> deptList(@RequestParam Long companyId, | |
| 85 | - @RequestParam(required = false) String roadName, | |
| 86 | - @RequestParam(required = false) Long deptId) { | |
| 87 | - return success(gardenTreeService.getCompanyDeptRoadTreeData(companyId, roadName, deptId)); | |
| 88 | - } | |
| 89 | - | |
| 90 | - @GetMapping("/road/list") | |
| 91 | - @Operation(summary = "一树一档案-按道路查询树列表") | |
| 92 | - @PreAuthorize("@ss.hasPermission('business:tree:list')") | |
| 93 | - public CommonResult<List<RoadTreeVO>> listTreesByRoad(@RequestParam Long road) { | |
| 94 | - return success(gardenTreeService.getTreesByRoadId(road)); | |
| 95 | - } | |
| 96 | -} | |
| 97 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/treerecord/OldTreesController.java deleted
| 1 | -package com.zteits.urbanops.module.garden.controller.admin.treerecord; | |
| 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.framework.excel.core.util.ExcelUtils; | |
| 7 | -import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; | |
| 8 | -import com.zteits.urbanops.module.garden.dal.dataobject.treerecord.GardenOldtreesDO; | |
| 9 | -import com.zteits.urbanops.module.garden.service.treerecord.GardenOldtreesService; | |
| 10 | -import io.swagger.v3.oas.annotations.Operation; | |
| 11 | -import io.swagger.v3.oas.annotations.tags.Tag; | |
| 12 | -import jakarta.annotation.Resource; | |
| 13 | -import jakarta.servlet.http.HttpServletResponse; | |
| 14 | -import org.springframework.security.access.prepost.PreAuthorize; | |
| 15 | -import org.springframework.web.bind.annotation.*; | |
| 16 | - | |
| 17 | -import java.io.IOException; | |
| 18 | -import java.util.List; | |
| 19 | - | |
| 20 | -import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 21 | - | |
| 22 | -@Tag(name = "管理后台 - 古树名木") | |
| 23 | -@RestController | |
| 24 | -@RequestMapping("/treerecord/oldtrees") | |
| 25 | -public class OldTreesController { | |
| 26 | - | |
| 27 | - @Resource | |
| 28 | - private GardenOldtreesService service; | |
| 29 | - | |
| 30 | - @GetMapping("/list") | |
| 31 | - @Operation(summary = "古树台账-列表") | |
| 32 | - @PreAuthorize("@ss.hasPermission('treerecord:oldtrees:list')") | |
| 33 | - public CommonResult<PageResult<GardenOldtreesDO>> list(GardenOldtreesDO where, | |
| 34 | - @RequestParam(value = "pageNum", required = false) Integer pageNum, | |
| 35 | - @RequestParam(value = "pageSize", required = false) Integer pageSize) { | |
| 36 | - where.setDeptId(SecurityFrameworkUtils.getLoginUserDeptId()); | |
| 37 | - PageParam page = new PageParam(); | |
| 38 | - page.setPageNo(pageNum == null ? 1 : pageNum); | |
| 39 | - page.setPageSize(pageSize == null ? 10 : pageSize); | |
| 40 | - return success(service.selectPage(page, where)); | |
| 41 | - } | |
| 42 | - | |
| 43 | - @GetMapping("/export") | |
| 44 | - @Operation(summary = "古树台账-导出") | |
| 45 | - @PreAuthorize("@ss.hasPermission('treerecord:oldtrees:export')") | |
| 46 | - public void export(GardenOldtreesDO where, HttpServletResponse response) throws IOException { | |
| 47 | - where.setDeptId(SecurityFrameworkUtils.getLoginUserDeptId()); | |
| 48 | - List<GardenOldtreesDO> list = service.selectList(where); | |
| 49 | - ExcelUtils.write(response, "古树信息.xls", "数据", GardenOldtreesDO.class, list); | |
| 50 | - } | |
| 51 | - | |
| 52 | - @GetMapping("/{id}") | |
| 53 | - @Operation(summary = "古树台账-详情") | |
| 54 | - @PreAuthorize("@ss.hasPermission('treerecord:oldtrees:query')") | |
| 55 | - public CommonResult<GardenOldtreesDO> getInfo(@PathVariable("id") String id) { | |
| 56 | - return success(service.selectById(id)); | |
| 57 | - } | |
| 58 | - | |
| 59 | - @PostMapping | |
| 60 | - @Operation(summary = "古树台账-新增") | |
| 61 | - @PreAuthorize("@ss.hasPermission('treerecord:oldtrees:add')") | |
| 62 | - public CommonResult<Boolean> add(@RequestBody GardenOldtreesDO entity) { | |
| 63 | - entity.setCreator(String.valueOf(SecurityFrameworkUtils.getLoginUserId())); | |
| 64 | - entity.setUpdater(String.valueOf(SecurityFrameworkUtils.getLoginUserId())); | |
| 65 | - entity.setDeptId(SecurityFrameworkUtils.getLoginUserDeptId()); | |
| 66 | - return success(service.insert(entity)); | |
| 67 | - } | |
| 68 | - | |
| 69 | - @PutMapping | |
| 70 | - @Operation(summary = "古树台账-修改") | |
| 71 | - @PreAuthorize("@ss.hasPermission('treerecord:oldtrees:edit')") | |
| 72 | - public CommonResult<Boolean> edit(@RequestBody GardenOldtreesDO entity) { | |
| 73 | - entity.setUpdater(String.valueOf(SecurityFrameworkUtils.getLoginUserId())); | |
| 74 | - return success(service.update(entity)); | |
| 75 | - } | |
| 76 | - | |
| 77 | - @DeleteMapping("/{ids}") | |
| 78 | - @Operation(summary = "古树台账-删除") | |
| 79 | - @PreAuthorize("@ss.hasPermission('treerecord:oldtrees:remove')") | |
| 80 | - public CommonResult<Boolean> remove(@PathVariable List<String> ids) { | |
| 81 | - return success(service.deleteByIds(ids)); | |
| 82 | - } | |
| 83 | -} | |
| 84 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/treerecord/vo/RoadTreeVO.java deleted
| 1 | -package com.zteits.urbanops.module.garden.controller.admin.treerecord.vo; | |
| 2 | - | |
| 3 | -import lombok.Data; | |
| 4 | - | |
| 5 | -@Data | |
| 6 | -public class RoadTreeVO { | |
| 7 | - private Long id; | |
| 8 | - private String treetype; | |
| 9 | - private String treeheight; | |
| 10 | - private String dbh; | |
| 11 | - private String treenumber; | |
| 12 | - private String treephoto; | |
| 13 | -} | |
| 14 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/oldtrees/OldtreesDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.oldtrees; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import java.util.*; | |
| 5 | +import java.time.LocalDateTime; | |
| 6 | +import com.baomidou.mybatisplus.annotation.*; | |
| 7 | +import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | |
| 8 | +import org.springframework.util.CollectionUtils; | |
| 9 | +import org.springframework.util.StringUtils; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 古树名木 DO | |
| 13 | + * | |
| 14 | + * @author 超级管理员 | |
| 15 | + */ | |
| 16 | +@TableName("garden_oldtrees") | |
| 17 | +@KeySequence("garden_oldtrees_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 | |
| 18 | +@Data | |
| 19 | +@ToString(callSuper = true) | |
| 20 | +@Builder | |
| 21 | +@NoArgsConstructor | |
| 22 | +@AllArgsConstructor | |
| 23 | +public class OldtreesDO { | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * id | |
| 27 | + */ | |
| 28 | + @TableId(type = IdType.INPUT) | |
| 29 | + private String id; | |
| 30 | + /** | |
| 31 | + * 编号 | |
| 32 | + */ | |
| 33 | + private String famoustreenumber; | |
| 34 | + /** | |
| 35 | + * 级别--数据字典:一级、两级 | |
| 36 | + */ | |
| 37 | + private String treelevel; | |
| 38 | + /** | |
| 39 | + * 树种 | |
| 40 | + */ | |
| 41 | + private String treetype; | |
| 42 | + /** | |
| 43 | + * 所在地 | |
| 44 | + */ | |
| 45 | + private String location; | |
| 46 | + /** | |
| 47 | + * 养护单位 | |
| 48 | + */ | |
| 49 | + private String maintainunit; | |
| 50 | + /** | |
| 51 | + * 权属分类--数据字典:专业绿地和单位(居住区) | |
| 52 | + */ | |
| 53 | + private String oldtreeownership; | |
| 54 | + /** | |
| 55 | + * 生长地点 | |
| 56 | + */ | |
| 57 | + private String growlocation; | |
| 58 | + /** | |
| 59 | + * 拉丁名 | |
| 60 | + */ | |
| 61 | + private String latinname; | |
| 62 | + /** | |
| 63 | + * 树高 | |
| 64 | + */ | |
| 65 | + private String treeheight; | |
| 66 | + /** | |
| 67 | + * 估测树龄 | |
| 68 | + */ | |
| 69 | + private String estimationtreeage; | |
| 70 | + /** | |
| 71 | + * 胸径 | |
| 72 | + */ | |
| 73 | + private String dbh; | |
| 74 | + /** | |
| 75 | + * 经度 | |
| 76 | + */ | |
| 77 | + private String longitude; | |
| 78 | + /** | |
| 79 | + * 纬度 | |
| 80 | + */ | |
| 81 | + private String latitude; | |
| 82 | + /** | |
| 83 | + * 冠幅东西 | |
| 84 | + */ | |
| 85 | + private String canopyeastwest; | |
| 86 | + /** | |
| 87 | + * 冠幅南北 | |
| 88 | + */ | |
| 89 | + private String canopysouthnorth; | |
| 90 | + /** | |
| 91 | + * 管护责任单位 | |
| 92 | + */ | |
| 93 | + private String managedutyunit; | |
| 94 | + /** | |
| 95 | + * 干周 | |
| 96 | + */ | |
| 97 | + private String weekday; | |
| 98 | + /** | |
| 99 | + * 生长势--数据字典:正常,衰弱,濒危,死亡 | |
| 100 | + */ | |
| 101 | + private String growthvigor; | |
| 102 | + /** | |
| 103 | + * 生长环境 | |
| 104 | + */ | |
| 105 | + private String growthenvironment; | |
| 106 | + /** | |
| 107 | + * 古树照片一 | |
| 108 | + */ | |
| 109 | + private String treephotoone; | |
| 110 | + /** | |
| 111 | + * 春季养护管理措施 | |
| 112 | + */ | |
| 113 | + private String springmaintenance; | |
| 114 | + /** | |
| 115 | + * 夏季养护管理措施 | |
| 116 | + */ | |
| 117 | + private String summermaintenance; | |
| 118 | + /** | |
| 119 | + * 秋季养护管理措施 | |
| 120 | + */ | |
| 121 | + private String autumnmaintenance; | |
| 122 | + /** | |
| 123 | + * 冬季养护管理措施 | |
| 124 | + */ | |
| 125 | + private String wintermaintenance; | |
| 126 | + /** | |
| 127 | + * 年度 | |
| 128 | + */ | |
| 129 | + private String annual; | |
| 130 | + /** | |
| 131 | + * 养护记录备注 | |
| 132 | + */ | |
| 133 | + private String curingremark; | |
| 134 | + /** | |
| 135 | + * 古树照片二 | |
| 136 | + */ | |
| 137 | + private String treephototwo; | |
| 138 | + /** | |
| 139 | + * 古树照片三 | |
| 140 | + */ | |
| 141 | + private String treephotothree; | |
| 142 | + /** | |
| 143 | + * 古树铭牌照片 | |
| 144 | + */ | |
| 145 | + private String nameplatephoto; | |
| 146 | + /** | |
| 147 | + * 数据状态(已更新、未更新) | |
| 148 | + */ | |
| 149 | + private String datastate; | |
| 150 | + /** | |
| 151 | + * 养护员工--作业队下派古树时选择的派发员工 | |
| 152 | + */ | |
| 153 | + private String curingstaff; | |
| 154 | + /** | |
| 155 | + * 状态(驳回/确认) | |
| 156 | + */ | |
| 157 | + private String state; | |
| 158 | + /** | |
| 159 | + * 平台驳回状态(平台驳回) | |
| 160 | + */ | |
| 161 | + private String platformstate; | |
| 162 | + /** | |
| 163 | + * 所属街道 | |
| 164 | + */ | |
| 165 | + private String street; | |
| 166 | + /** | |
| 167 | + * 责任人姓名 | |
| 168 | + */ | |
| 169 | + private String responsibleusername; | |
| 170 | + /** | |
| 171 | + * 责任人电话 | |
| 172 | + */ | |
| 173 | + private String responsibleuserphone; | |
| 174 | + /** | |
| 175 | + * 创建者 | |
| 176 | + */ | |
| 177 | + private String createby; | |
| 178 | + /** | |
| 179 | + * 创建时间 | |
| 180 | + */ | |
| 181 | + private LocalDateTime createtime; | |
| 182 | + /** | |
| 183 | + * 更新者 | |
| 184 | + */ | |
| 185 | + private String updateby; | |
| 186 | + /** | |
| 187 | + * 更新时间 | |
| 188 | + */ | |
| 189 | + private String updatetime; | |
| 190 | + /** | |
| 191 | + * 部门id | |
| 192 | + */ | |
| 193 | + private Long deptId; | |
| 194 | + | |
| 195 | + @TableField(exist = false) | |
| 196 | + private List<String> treeImgList; | |
| 197 | + | |
| 198 | + @TableField(exist = false) | |
| 199 | + private List<String> nameplatephotoList; | |
| 200 | + | |
| 201 | + public OldtreesDO imgToDomain(){ | |
| 202 | + if (!CollectionUtils.isEmpty(treeImgList)) { | |
| 203 | + if (treeImgList.size() > 0) { | |
| 204 | + this.treephotoone = treeImgList.get(0); | |
| 205 | + } | |
| 206 | + if (treeImgList.size() > 1) { | |
| 207 | + this.treephototwo = treeImgList.get(1); | |
| 208 | + } | |
| 209 | + if (treeImgList.size() > 2) { | |
| 210 | + this.treephotothree = treeImgList.get(2); | |
| 211 | + } | |
| 212 | + } | |
| 213 | + if (!CollectionUtils.isEmpty(nameplatephotoList)) { | |
| 214 | + if (nameplatephotoList.size() > 0) { | |
| 215 | + this.nameplatephoto = nameplatephotoList.get(0); | |
| 216 | + } | |
| 217 | + } | |
| 218 | + return this; | |
| 219 | + } | |
| 220 | + public OldtreesDO domainToImg(){ | |
| 221 | + if (CollectionUtils.isEmpty(treeImgList)) { | |
| 222 | + treeImgList = new ArrayList<>(); | |
| 223 | + } | |
| 224 | + if (CollectionUtils.isEmpty(nameplatephotoList)) { | |
| 225 | + nameplatephotoList = new ArrayList<>(); | |
| 226 | + } | |
| 227 | + if (!StringUtils.isEmpty(treephotoone)) { | |
| 228 | + treeImgList.add(treephotoone); | |
| 229 | + } | |
| 230 | + if (!StringUtils.isEmpty(treephototwo)) { | |
| 231 | + treeImgList.add(treephototwo); | |
| 232 | + } | |
| 233 | + if (!StringUtils.isEmpty(treephotothree)) { | |
| 234 | + treeImgList.add(treephotothree); | |
| 235 | + } | |
| 236 | + if (!StringUtils.isEmpty(nameplatephoto)) { | |
| 237 | + nameplatephotoList.add(nameplatephoto); | |
| 238 | + } | |
| 239 | + return this; | |
| 240 | + } | |
| 241 | + | |
| 242 | +} | |
| 0 | 243 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/oldtreeschangelog/OldtreesChangeLogDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.oldtreeschangelog; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import java.util.*; | |
| 5 | +import java.time.LocalDateTime; | |
| 6 | +import com.baomidou.mybatisplus.annotation.*; | |
| 7 | +import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | |
| 8 | +import org.springframework.util.CollectionUtils; | |
| 9 | +import org.springframework.util.StringUtils; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 古树名木修改记录 DO | |
| 13 | + * | |
| 14 | + * @author 超级管理员 | |
| 15 | + */ | |
| 16 | +@TableName("garden_oldtrees_change_log") | |
| 17 | +@KeySequence("garden_oldtrees_change_log_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 | |
| 18 | +@Data | |
| 19 | +@EqualsAndHashCode(callSuper = true) | |
| 20 | +@ToString(callSuper = true) | |
| 21 | +@Builder | |
| 22 | +@NoArgsConstructor | |
| 23 | +@AllArgsConstructor | |
| 24 | +public class OldtreesChangeLogDO extends BaseDO { | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * id | |
| 28 | + */ | |
| 29 | + @TableId(type = IdType.INPUT) | |
| 30 | + private String id; | |
| 31 | + /** | |
| 32 | + * garden_oldtrees 的主键 | |
| 33 | + */ | |
| 34 | + private String oldtreeid; | |
| 35 | + /** | |
| 36 | + * 编号 | |
| 37 | + */ | |
| 38 | + private String famoustreenumber; | |
| 39 | + /** | |
| 40 | + * 级别--数据字典:一级、两级 | |
| 41 | + */ | |
| 42 | + private String treelevel; | |
| 43 | + /** | |
| 44 | + * 树种 | |
| 45 | + */ | |
| 46 | + private String treetype; | |
| 47 | + /** | |
| 48 | + * 所在地 | |
| 49 | + */ | |
| 50 | + private String location; | |
| 51 | + /** | |
| 52 | + * 养护单位 | |
| 53 | + */ | |
| 54 | + private String maintainunit; | |
| 55 | + /** | |
| 56 | + * 权属分类--数据字典:专业绿地和单位(居住区) | |
| 57 | + */ | |
| 58 | + private String oldtreeownership; | |
| 59 | + /** | |
| 60 | + * 生长地点 | |
| 61 | + */ | |
| 62 | + private String growlocation; | |
| 63 | + /** | |
| 64 | + * 拉丁名 | |
| 65 | + */ | |
| 66 | + private String latinname; | |
| 67 | + /** | |
| 68 | + * 树高 | |
| 69 | + */ | |
| 70 | + private String treeheight; | |
| 71 | + /** | |
| 72 | + * 估测树龄 | |
| 73 | + */ | |
| 74 | + private String estimationtreeage; | |
| 75 | + /** | |
| 76 | + * 胸径 | |
| 77 | + */ | |
| 78 | + private String dbh; | |
| 79 | + /** | |
| 80 | + * 经度 | |
| 81 | + */ | |
| 82 | + private String longitude; | |
| 83 | + /** | |
| 84 | + * 纬度 | |
| 85 | + */ | |
| 86 | + private String latitude; | |
| 87 | + /** | |
| 88 | + * 冠幅东西 | |
| 89 | + */ | |
| 90 | + private String canopyeastwest; | |
| 91 | + /** | |
| 92 | + * 冠幅南北 | |
| 93 | + */ | |
| 94 | + private String canopysouthnorth; | |
| 95 | + /** | |
| 96 | + * 管护责任单位 | |
| 97 | + */ | |
| 98 | + private String managedutyunit; | |
| 99 | + /** | |
| 100 | + * 干周 | |
| 101 | + */ | |
| 102 | + private String weekday; | |
| 103 | + /** | |
| 104 | + * 生长势--数据字典:正常,衰弱,濒危,死亡 | |
| 105 | + */ | |
| 106 | + private String growthvigor; | |
| 107 | + /** | |
| 108 | + * 生长环境 | |
| 109 | + */ | |
| 110 | + private String growthenvironment; | |
| 111 | + /** | |
| 112 | + * 古树照片一 | |
| 113 | + */ | |
| 114 | + private String treephotoone; | |
| 115 | + /** | |
| 116 | + * 春季养护管理措施 | |
| 117 | + */ | |
| 118 | + private String springmaintenance; | |
| 119 | + /** | |
| 120 | + * 夏季养护管理措施 | |
| 121 | + */ | |
| 122 | + private String summermaintenance; | |
| 123 | + /** | |
| 124 | + * 秋季养护管理措施 | |
| 125 | + */ | |
| 126 | + private String autumnmaintenance; | |
| 127 | + /** | |
| 128 | + * 冬季养护管理措施 | |
| 129 | + */ | |
| 130 | + private String wintermaintenance; | |
| 131 | + /** | |
| 132 | + * 年度 | |
| 133 | + */ | |
| 134 | + private String annual; | |
| 135 | + /** | |
| 136 | + * 养护记录备注 | |
| 137 | + */ | |
| 138 | + private String curingremark; | |
| 139 | + /** | |
| 140 | + * 古树照片二 | |
| 141 | + */ | |
| 142 | + private String treephototwo; | |
| 143 | + /** | |
| 144 | + * 古树照片三 | |
| 145 | + */ | |
| 146 | + private String treephotothree; | |
| 147 | + /** | |
| 148 | + * 古树铭牌照片 | |
| 149 | + */ | |
| 150 | + private String nameplatephoto; | |
| 151 | + /** | |
| 152 | + * 数据状态(已更新、未更新) | |
| 153 | + */ | |
| 154 | + private String datastate; | |
| 155 | + /** | |
| 156 | + * 养护员工--作业队下派古树时选择的派发员工 | |
| 157 | + */ | |
| 158 | + private String curingstaff; | |
| 159 | + /** | |
| 160 | + * 状态(驳回/确认) | |
| 161 | + */ | |
| 162 | + private String state; | |
| 163 | + /** | |
| 164 | + * 平台驳回状态(平台驳回) | |
| 165 | + */ | |
| 166 | + private String platformstate; | |
| 167 | + /** | |
| 168 | + * 所属街道 | |
| 169 | + */ | |
| 170 | + private String street; | |
| 171 | + /** | |
| 172 | + * 负责人姓名 | |
| 173 | + */ | |
| 174 | + private String responsibleusername; | |
| 175 | + /** | |
| 176 | + * 负责人电话 | |
| 177 | + */ | |
| 178 | + private String responsibleuserphone; | |
| 179 | + /** | |
| 180 | + * 创建者 | |
| 181 | + */ | |
| 182 | + private String createby; | |
| 183 | + /** | |
| 184 | + * 创建时间 | |
| 185 | + */ | |
| 186 | + private LocalDateTime createtime; | |
| 187 | + /** | |
| 188 | + * 更新者 | |
| 189 | + */ | |
| 190 | + private String updateby; | |
| 191 | + /** | |
| 192 | + * 更新时间 | |
| 193 | + */ | |
| 194 | + private LocalDateTime updatetime; | |
| 195 | + | |
| 196 | + @TableField(exist = false) | |
| 197 | + private List<String> treeImgList; | |
| 198 | + | |
| 199 | + @TableField(exist = false) | |
| 200 | + private List<String> nameplatephotoList; | |
| 201 | + | |
| 202 | + public OldtreesChangeLogDO imgToDomain(){ | |
| 203 | + if (!CollectionUtils.isEmpty(treeImgList)) { | |
| 204 | + if (treeImgList.size() > 0) { | |
| 205 | + this.treephotoone = treeImgList.get(0); | |
| 206 | + } | |
| 207 | + if (treeImgList.size() > 1) { | |
| 208 | + this.treephototwo = treeImgList.get(1); | |
| 209 | + } | |
| 210 | + if (treeImgList.size() > 2) { | |
| 211 | + this.treephotothree = treeImgList.get(2); | |
| 212 | + } | |
| 213 | + } | |
| 214 | + if (!CollectionUtils.isEmpty(nameplatephotoList)) { | |
| 215 | + if (nameplatephotoList.size() > 0) { | |
| 216 | + this.nameplatephoto = nameplatephotoList.get(0); | |
| 217 | + } | |
| 218 | + } | |
| 219 | + return this; | |
| 220 | + } | |
| 221 | + public OldtreesChangeLogDO domainToImg(){ | |
| 222 | + if (CollectionUtils.isEmpty(treeImgList)) { | |
| 223 | + treeImgList = new ArrayList<>(); | |
| 224 | + } | |
| 225 | + if (CollectionUtils.isEmpty(nameplatephotoList)) { | |
| 226 | + nameplatephotoList = new ArrayList<>(); | |
| 227 | + } | |
| 228 | + if (!StringUtils.isEmpty(treephotoone)) { | |
| 229 | + treeImgList.add(treephotoone); | |
| 230 | + } | |
| 231 | + if (!StringUtils.isEmpty(treephototwo)) { | |
| 232 | + treeImgList.add(treephototwo); | |
| 233 | + } | |
| 234 | + if (!StringUtils.isEmpty(treephotothree)) { | |
| 235 | + treeImgList.add(treephotothree); | |
| 236 | + } | |
| 237 | + if (!StringUtils.isEmpty(nameplatephoto)) { | |
| 238 | + nameplatephotoList.add(nameplatephoto); | |
| 239 | + } | |
| 240 | + return this; | |
| 241 | + } | |
| 242 | + | |
| 243 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/road/RoadDO.java
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/tree/TreeDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.tree; | |
| 2 | + | |
| 3 | +import cn.hutool.core.lang.tree.Tree; | |
| 4 | +import lombok.*; | |
| 5 | +import java.util.*; | |
| 6 | +import java.time.LocalDateTime; | |
| 7 | +import java.time.LocalDateTime; | |
| 8 | +import com.baomidou.mybatisplus.annotation.*; | |
| 9 | +import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | |
| 10 | +import org.springframework.util.CollectionUtils; | |
| 11 | +import org.springframework.util.StringUtils; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * 一树一档案 DO | |
| 15 | + * | |
| 16 | + * @author 超级管理员 | |
| 17 | + */ | |
| 18 | +@TableName("garden_tree") | |
| 19 | +@KeySequence("garden_tree_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 | |
| 20 | +@Data | |
| 21 | +@ToString(callSuper = true) | |
| 22 | +@Builder | |
| 23 | +@NoArgsConstructor | |
| 24 | +@AllArgsConstructor | |
| 25 | +public class TreeDO { | |
| 26 | + | |
| 27 | + /** | |
| 28 | + * id | |
| 29 | + */ | |
| 30 | + @TableId | |
| 31 | + private Long id; | |
| 32 | + /** | |
| 33 | + * 编号 | |
| 34 | + */ | |
| 35 | + private String treenumber; | |
| 36 | + /** | |
| 37 | + * 拉丁名 | |
| 38 | + */ | |
| 39 | + private String latinname; | |
| 40 | + /** | |
| 41 | + * 树种 | |
| 42 | + */ | |
| 43 | + private String treetype; | |
| 44 | + /** | |
| 45 | + * 树高 | |
| 46 | + */ | |
| 47 | + private String treeheight; | |
| 48 | + /** | |
| 49 | + * 冠幅 | |
| 50 | + */ | |
| 51 | + private String canopy; | |
| 52 | + /** | |
| 53 | + * 胸径 | |
| 54 | + */ | |
| 55 | + private String dbh; | |
| 56 | + /** | |
| 57 | + * 生长势--数据字典:正常,衰弱,濒危,死亡 | |
| 58 | + */ | |
| 59 | + private String growthvigor; | |
| 60 | + /** | |
| 61 | + * 级别--数据字典:一级、两级 | |
| 62 | + */ | |
| 63 | + private String treelevel; | |
| 64 | + /** | |
| 65 | + * 经度 | |
| 66 | + */ | |
| 67 | + private String longitude; | |
| 68 | + /** | |
| 69 | + * 纬度 | |
| 70 | + */ | |
| 71 | + private String latitude; | |
| 72 | + /** | |
| 73 | + * 所在地 | |
| 74 | + */ | |
| 75 | + private String location; | |
| 76 | + /** | |
| 77 | + * 养护单位 | |
| 78 | + */ | |
| 79 | + private String maintainunit; | |
| 80 | + /** | |
| 81 | + * 管护单位 | |
| 82 | + */ | |
| 83 | + private String managedutyunit; | |
| 84 | + /** | |
| 85 | + * 道路id | |
| 86 | + */ | |
| 87 | + private Long road; | |
| 88 | + /** | |
| 89 | + * 所属街道 | |
| 90 | + */ | |
| 91 | + private String street; | |
| 92 | + /** | |
| 93 | + * 权属分类--数据字典:专业绿地和单位(居住区) | |
| 94 | + */ | |
| 95 | + private String oldtreeownership; | |
| 96 | + /** | |
| 97 | + * 数据状态(已更新、未更新) | |
| 98 | + */ | |
| 99 | + private String datastate; | |
| 100 | + /** | |
| 101 | + * 估测树龄 | |
| 102 | + */ | |
| 103 | + private String estimationtreeage; | |
| 104 | + /** | |
| 105 | + * 冠幅东西 | |
| 106 | + */ | |
| 107 | + private String canopyeastwest; | |
| 108 | + /** | |
| 109 | + * 冠幅南北 | |
| 110 | + */ | |
| 111 | + private String canopysouthnorth; | |
| 112 | + /** | |
| 113 | + * 干周 | |
| 114 | + */ | |
| 115 | + private String weekday; | |
| 116 | + /** | |
| 117 | + * 生长地点 | |
| 118 | + */ | |
| 119 | + private String growlocation; | |
| 120 | + /** | |
| 121 | + * 生长环境 | |
| 122 | + */ | |
| 123 | + private String growthenvironment; | |
| 124 | + /** | |
| 125 | + * 树木照片一 | |
| 126 | + */ | |
| 127 | + private String treephotoone; | |
| 128 | + /** | |
| 129 | + * 古树照片二 | |
| 130 | + */ | |
| 131 | + private String treephototwo; | |
| 132 | + /** | |
| 133 | + * 古树照片三 | |
| 134 | + */ | |
| 135 | + private String treephotothree; | |
| 136 | + /** | |
| 137 | + * 古树照片四 | |
| 138 | + */ | |
| 139 | + private String treephotofour; | |
| 140 | + /** | |
| 141 | + * 古树照片五 | |
| 142 | + */ | |
| 143 | + private String treephotofive; | |
| 144 | + /** | |
| 145 | + * 创建者 | |
| 146 | + */ | |
| 147 | + private String createby; | |
| 148 | + /** | |
| 149 | + * 创建时间 | |
| 150 | + */ | |
| 151 | + private LocalDateTime createtime; | |
| 152 | + /** | |
| 153 | + * 更新者 | |
| 154 | + */ | |
| 155 | + private String updateby; | |
| 156 | + /** | |
| 157 | + * 更新时间 | |
| 158 | + */ | |
| 159 | + private LocalDateTime updatetime; | |
| 160 | + /** | |
| 161 | + * 备注 | |
| 162 | + */ | |
| 163 | + private String remark; | |
| 164 | + /** | |
| 165 | + * 部门id | |
| 166 | + */ | |
| 167 | + private Long deptId; | |
| 168 | + | |
| 169 | + /** | |
| 170 | + * 公司id | |
| 171 | + */ | |
| 172 | + private Long companyId; | |
| 173 | + | |
| 174 | + @TableField(exist = false) | |
| 175 | + private List<String> treeImgList; | |
| 176 | + | |
| 177 | + @TableField(exist = false) | |
| 178 | + private List<String> treeImgListFile; | |
| 179 | + | |
| 180 | + public TreeDO imgToDomain(){ | |
| 181 | + if (!CollectionUtils.isEmpty(treeImgList)) { | |
| 182 | + if (treeImgList.size() > 0) { | |
| 183 | + this.treephotoone = treeImgList.get(0); | |
| 184 | + } | |
| 185 | + if (treeImgList.size() > 1) { | |
| 186 | + this.treephototwo = treeImgList.get(1); | |
| 187 | + } | |
| 188 | + if (treeImgList.size() > 2) { | |
| 189 | + this.treephotothree = treeImgList.get(2); | |
| 190 | + } | |
| 191 | + if (treeImgList.size() > 3) { | |
| 192 | + this.treephotofour = treeImgList.get(3); | |
| 193 | + } | |
| 194 | + if (treeImgList.size() > 4) { | |
| 195 | + this.treephotofive = treeImgList.get(4); | |
| 196 | + } | |
| 197 | + } | |
| 198 | + return this; | |
| 199 | + } | |
| 200 | + public TreeDO domainToImg(){ | |
| 201 | + if (CollectionUtils.isEmpty(treeImgList)) { | |
| 202 | + treeImgList = new ArrayList<>(); | |
| 203 | + } | |
| 204 | + if (!StringUtils.isEmpty(treephotoone)) { | |
| 205 | + treeImgList.add(treephotoone); | |
| 206 | + } | |
| 207 | + if (!StringUtils.isEmpty(treephototwo)) { | |
| 208 | + treeImgList.add(treephototwo); | |
| 209 | + } | |
| 210 | + if (!StringUtils.isEmpty(treephotothree)) { | |
| 211 | + treeImgList.add(treephotothree); | |
| 212 | + } | |
| 213 | + if (!StringUtils.isEmpty(treephotofour)) { | |
| 214 | + treeImgList.add(treephotofour); | |
| 215 | + } | |
| 216 | + if (!StringUtils.isEmpty(treephotofive)) { | |
| 217 | + treeImgList.add(treephotofive); | |
| 218 | + } | |
| 219 | + return this; | |
| 220 | + } | |
| 221 | + | |
| 222 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/treechangelog/TreeChangeLogDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.treechangelog; | |
| 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 | +import org.springframework.util.CollectionUtils; | |
| 10 | +import org.springframework.util.StringUtils; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 一树一档案修改记录 DO | |
| 14 | + * | |
| 15 | + * @author 超级管理员 | |
| 16 | + */ | |
| 17 | +@TableName("garden_tree_change_log") | |
| 18 | +@KeySequence("garden_tree_change_log_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 TreeChangeLogDO extends BaseDO { | |
| 26 | + | |
| 27 | + /** | |
| 28 | + * id | |
| 29 | + */ | |
| 30 | + @TableId | |
| 31 | + private Long id; | |
| 32 | + /** | |
| 33 | + * garden_tree 的主键 | |
| 34 | + */ | |
| 35 | + private Long treeid; | |
| 36 | + /** | |
| 37 | + * 编号 | |
| 38 | + */ | |
| 39 | + private String treenumber; | |
| 40 | + /** | |
| 41 | + * 拉丁名 | |
| 42 | + */ | |
| 43 | + private String latinname; | |
| 44 | + /** | |
| 45 | + * 树种 | |
| 46 | + */ | |
| 47 | + private String treetype; | |
| 48 | + /** | |
| 49 | + * 树高 | |
| 50 | + */ | |
| 51 | + private String treeheight; | |
| 52 | + /** | |
| 53 | + * 冠幅 | |
| 54 | + */ | |
| 55 | + private String canopy; | |
| 56 | + /** | |
| 57 | + * 胸径 | |
| 58 | + */ | |
| 59 | + private String dbh; | |
| 60 | + /** | |
| 61 | + * 生长势--数据字典:正常,衰弱,濒危,死亡 | |
| 62 | + */ | |
| 63 | + private String growthvigor; | |
| 64 | + /** | |
| 65 | + * 级别--数据字典:一级、两级 | |
| 66 | + */ | |
| 67 | + private String treelevel; | |
| 68 | + /** | |
| 69 | + * 经度 | |
| 70 | + */ | |
| 71 | + private String longitude; | |
| 72 | + /** | |
| 73 | + * 纬度 | |
| 74 | + */ | |
| 75 | + private String latitude; | |
| 76 | + /** | |
| 77 | + * 所在地 | |
| 78 | + */ | |
| 79 | + private String location; | |
| 80 | + /** | |
| 81 | + * 养护单位 | |
| 82 | + */ | |
| 83 | + private String maintainunit; | |
| 84 | + /** | |
| 85 | + * 管护单位 | |
| 86 | + */ | |
| 87 | + private String managedutyunit; | |
| 88 | + /** | |
| 89 | + * 道路id | |
| 90 | + */ | |
| 91 | + private Long road; | |
| 92 | + /** | |
| 93 | + * 所属街道 | |
| 94 | + */ | |
| 95 | + private String street; | |
| 96 | + /** | |
| 97 | + * 权属分类--数据字典:专业绿地和单位(居住区) | |
| 98 | + */ | |
| 99 | + private String oldtreeownership; | |
| 100 | + /** | |
| 101 | + * 数据状态(已更新、未更新) | |
| 102 | + */ | |
| 103 | + private String datastate; | |
| 104 | + /** | |
| 105 | + * 估测树龄 | |
| 106 | + */ | |
| 107 | + private String estimationtreeage; | |
| 108 | + /** | |
| 109 | + * 冠幅东西 | |
| 110 | + */ | |
| 111 | + private String canopyeastwest; | |
| 112 | + /** | |
| 113 | + * 冠幅南北 | |
| 114 | + */ | |
| 115 | + private String canopysouthnorth; | |
| 116 | + /** | |
| 117 | + * 干周 | |
| 118 | + */ | |
| 119 | + private String weekday; | |
| 120 | + /** | |
| 121 | + * 生长地点 | |
| 122 | + */ | |
| 123 | + private String growlocation; | |
| 124 | + /** | |
| 125 | + * 生长环境 | |
| 126 | + */ | |
| 127 | + private String growthenvironment; | |
| 128 | + /** | |
| 129 | + * 树木照片一 | |
| 130 | + */ | |
| 131 | + private String treephotoone; | |
| 132 | + /** | |
| 133 | + * 古树照片二 | |
| 134 | + */ | |
| 135 | + private String treephototwo; | |
| 136 | + /** | |
| 137 | + * 古树照片三 | |
| 138 | + */ | |
| 139 | + private String treephotothree; | |
| 140 | + /** | |
| 141 | + * 古树照片四 | |
| 142 | + */ | |
| 143 | + private String treephotofour; | |
| 144 | + /** | |
| 145 | + * 古树照片五 | |
| 146 | + */ | |
| 147 | + private String treephotofive; | |
| 148 | + /** | |
| 149 | + * 创建者 | |
| 150 | + */ | |
| 151 | + private String createby; | |
| 152 | + /** | |
| 153 | + * 创建时间 | |
| 154 | + */ | |
| 155 | + private LocalDateTime createtime; | |
| 156 | + /** | |
| 157 | + * 更新者 | |
| 158 | + */ | |
| 159 | + private String updateby; | |
| 160 | + /** | |
| 161 | + * 更新时间 | |
| 162 | + */ | |
| 163 | + private LocalDateTime updatetime; | |
| 164 | + /** | |
| 165 | + * 备注 | |
| 166 | + */ | |
| 167 | + private String remark; | |
| 168 | + | |
| 169 | + @TableField(exist = false) | |
| 170 | + private List<String> treeImgList; | |
| 171 | + | |
| 172 | + public TreeChangeLogDO imgToDomain(){ | |
| 173 | + if (!CollectionUtils.isEmpty(treeImgList)) { | |
| 174 | + if (treeImgList.size() > 0) { | |
| 175 | + this.treephotoone = treeImgList.get(0); | |
| 176 | + } | |
| 177 | + if (treeImgList.size() > 1) { | |
| 178 | + this.treephototwo = treeImgList.get(1); | |
| 179 | + } | |
| 180 | + if (treeImgList.size() > 2) { | |
| 181 | + this.treephotothree = treeImgList.get(2); | |
| 182 | + } | |
| 183 | + if (treeImgList.size() > 3) { | |
| 184 | + this.treephotofour = treeImgList.get(3); | |
| 185 | + } | |
| 186 | + if (treeImgList.size() > 4) { | |
| 187 | + this.treephotofive = treeImgList.get(4); | |
| 188 | + } | |
| 189 | + } | |
| 190 | + return this; | |
| 191 | + } | |
| 192 | + public TreeChangeLogDO domainToImg(){ | |
| 193 | + if (CollectionUtils.isEmpty(treeImgList)) { | |
| 194 | + treeImgList = new ArrayList<>(); | |
| 195 | + } | |
| 196 | + if (!StringUtils.isEmpty(treephotoone)) { | |
| 197 | + treeImgList.add(treephotoone); | |
| 198 | + } | |
| 199 | + if (!StringUtils.isEmpty(treephototwo)) { | |
| 200 | + treeImgList.add(treephototwo); | |
| 201 | + } | |
| 202 | + if (!StringUtils.isEmpty(treephotothree)) { | |
| 203 | + treeImgList.add(treephotothree); | |
| 204 | + } | |
| 205 | + if (!StringUtils.isEmpty(treephotofour)) { | |
| 206 | + treeImgList.add(treephotofour); | |
| 207 | + } | |
| 208 | + if (!StringUtils.isEmpty(treephotofive)) { | |
| 209 | + treeImgList.add(treephotofive); | |
| 210 | + } | |
| 211 | + return this; | |
| 212 | + } | |
| 213 | + | |
| 214 | + | |
| 215 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/treerecord/GardenOldtreesDO.java deleted
| 1 | -package com.zteits.urbanops.module.garden.dal.dataobject.treerecord; | |
| 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_oldtrees") | |
| 9 | -@Data | |
| 10 | -public class GardenOldtreesDO extends BaseDO { | |
| 11 | - @TableId | |
| 12 | - private String id; | |
| 13 | - private String treenumber; | |
| 14 | - private String latinname; | |
| 15 | - private String treetype; | |
| 16 | - private String treeheight; | |
| 17 | - private String canopy; | |
| 18 | - private String dbh; | |
| 19 | - private String growthvigor; | |
| 20 | - private String treelevel; | |
| 21 | - private String longitude; | |
| 22 | - private String latitude; | |
| 23 | - private String location; | |
| 24 | - private String maintainunit; | |
| 25 | - private String managedutyunit; | |
| 26 | - private Long road; | |
| 27 | - private String street; | |
| 28 | - private String oldtreeownership; | |
| 29 | - private String datastate; | |
| 30 | - private String estimationtreeage; | |
| 31 | - private String canopyeastwest; | |
| 32 | - private String canopysouthnorth; | |
| 33 | - private String weekday; | |
| 34 | - private String growlocation; | |
| 35 | - private String growthenvironment; | |
| 36 | - private String treephotoone; | |
| 37 | - private String treephototwo; | |
| 38 | - private String treephotothree; | |
| 39 | - private String treephotofour; | |
| 40 | - private String treephotofive; | |
| 41 | - private Long deptId; | |
| 42 | -} | |
| 43 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/oldtrees/OldtreesMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.oldtrees; | |
| 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.oldtrees.OldtreesDO; | |
| 9 | +import org.apache.ibatis.annotations.Mapper; | |
| 10 | +import com.zteits.urbanops.module.garden.controller.admin.oldtrees.vo.*; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 古树名木 Mapper | |
| 14 | + * | |
| 15 | + * @author 超级管理员 | |
| 16 | + */ | |
| 17 | +@Mapper | |
| 18 | +public interface OldtreesMapper extends BaseMapperX<OldtreesDO> { | |
| 19 | + | |
| 20 | + default PageResult<OldtreesDO> selectPage(OldtreesPageReqVO reqVO) { | |
| 21 | + return selectPage(reqVO, new LambdaQueryWrapperX<OldtreesDO>() | |
| 22 | + .eqIfPresent(OldtreesDO::getFamoustreenumber, reqVO.getFamoustreenumber()) | |
| 23 | + .eqIfPresent(OldtreesDO::getTreelevel, reqVO.getTreelevel()) | |
| 24 | + .eqIfPresent(OldtreesDO::getTreetype, reqVO.getTreetype()) | |
| 25 | + .eqIfPresent(OldtreesDO::getLocation, reqVO.getLocation()) | |
| 26 | + .eqIfPresent(OldtreesDO::getMaintainunit, reqVO.getMaintainunit()) | |
| 27 | + .eqIfPresent(OldtreesDO::getOldtreeownership, reqVO.getOldtreeownership()) | |
| 28 | + .eqIfPresent(OldtreesDO::getGrowlocation, reqVO.getGrowlocation()) | |
| 29 | + .likeIfPresent(OldtreesDO::getLatinname, reqVO.getLatinname()) | |
| 30 | + .eqIfPresent(OldtreesDO::getTreeheight, reqVO.getTreeheight()) | |
| 31 | + .eqIfPresent(OldtreesDO::getEstimationtreeage, reqVO.getEstimationtreeage()) | |
| 32 | + .eqIfPresent(OldtreesDO::getDbh, reqVO.getDbh()) | |
| 33 | + .eqIfPresent(OldtreesDO::getLongitude, reqVO.getLongitude()) | |
| 34 | + .eqIfPresent(OldtreesDO::getLatitude, reqVO.getLatitude()) | |
| 35 | + .eqIfPresent(OldtreesDO::getCanopyeastwest, reqVO.getCanopyeastwest()) | |
| 36 | + .eqIfPresent(OldtreesDO::getCanopysouthnorth, reqVO.getCanopysouthnorth()) | |
| 37 | + .eqIfPresent(OldtreesDO::getManagedutyunit, reqVO.getManagedutyunit()) | |
| 38 | + .eqIfPresent(OldtreesDO::getWeekday, reqVO.getWeekday()) | |
| 39 | + .eqIfPresent(OldtreesDO::getGrowthvigor, reqVO.getGrowthvigor()) | |
| 40 | + .eqIfPresent(OldtreesDO::getGrowthenvironment, reqVO.getGrowthenvironment()) | |
| 41 | + .eqIfPresent(OldtreesDO::getTreephotoone, reqVO.getTreephotoone()) | |
| 42 | + .eqIfPresent(OldtreesDO::getSpringmaintenance, reqVO.getSpringmaintenance()) | |
| 43 | + .eqIfPresent(OldtreesDO::getSummermaintenance, reqVO.getSummermaintenance()) | |
| 44 | + .eqIfPresent(OldtreesDO::getAutumnmaintenance, reqVO.getAutumnmaintenance()) | |
| 45 | + .eqIfPresent(OldtreesDO::getWintermaintenance, reqVO.getWintermaintenance()) | |
| 46 | + .eqIfPresent(OldtreesDO::getAnnual, reqVO.getAnnual()) | |
| 47 | + .eqIfPresent(OldtreesDO::getCuringremark, reqVO.getCuringremark()) | |
| 48 | + .eqIfPresent(OldtreesDO::getTreephototwo, reqVO.getTreephototwo()) | |
| 49 | + .eqIfPresent(OldtreesDO::getTreephotothree, reqVO.getTreephotothree()) | |
| 50 | + .eqIfPresent(OldtreesDO::getNameplatephoto, reqVO.getNameplatephoto()) | |
| 51 | + .eqIfPresent(OldtreesDO::getDatastate, reqVO.getDatastate()) | |
| 52 | + .eqIfPresent(OldtreesDO::getCuringstaff, reqVO.getCuringstaff()) | |
| 53 | + .eqIfPresent(OldtreesDO::getState, reqVO.getState()) | |
| 54 | + .eqIfPresent(OldtreesDO::getPlatformstate, reqVO.getPlatformstate()) | |
| 55 | + .eqIfPresent(OldtreesDO::getStreet, reqVO.getStreet()) | |
| 56 | + .likeIfPresent(OldtreesDO::getResponsibleusername, reqVO.getResponsibleusername()) | |
| 57 | + .eqIfPresent(OldtreesDO::getResponsibleuserphone, reqVO.getResponsibleuserphone()) | |
| 58 | + .eqIfPresent(OldtreesDO::getCreateby, reqVO.getCreateby()) | |
| 59 | + .betweenIfPresent(OldtreesDO::getCreatetime, reqVO.getCreatetime()) | |
| 60 | + .eqIfPresent(OldtreesDO::getUpdateby, reqVO.getUpdateby()) | |
| 61 | + .betweenIfPresent(OldtreesDO::getUpdatetime, reqVO.getUpdatetime()) | |
| 62 | + .eqIfPresent(OldtreesDO::getDeptId, reqVO.getDeptId()) | |
| 63 | + .orderByDesc(OldtreesDO::getId)); | |
| 64 | + } | |
| 65 | + | |
| 66 | + default OldtreesDO selectByFamoustreenumber(String famoustreenumber) { | |
| 67 | + return selectOne(new LambdaQueryWrapperX<OldtreesDO>() | |
| 68 | + .eqIfPresent(OldtreesDO::getFamoustreenumber, famoustreenumber)); | |
| 69 | + } | |
| 70 | + | |
| 71 | +} | |
| 0 | 72 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/oldtreeschangelog/OldtreesChangeLogMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.oldtreeschangelog; | |
| 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.oldtreeschangelog.OldtreesChangeLogDO; | |
| 9 | +import org.apache.ibatis.annotations.Mapper; | |
| 10 | +import com.zteits.urbanops.module.garden.controller.admin.oldtreeschangelog.vo.*; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 古树名木修改记录 Mapper | |
| 14 | + * | |
| 15 | + * @author 超级管理员 | |
| 16 | + */ | |
| 17 | +@Mapper | |
| 18 | +public interface OldtreesChangeLogMapper extends BaseMapperX<OldtreesChangeLogDO> { | |
| 19 | + | |
| 20 | + default PageResult<OldtreesChangeLogDO> selectPage(OldtreesChangeLogPageReqVO reqVO) { | |
| 21 | + return selectPage(reqVO, new LambdaQueryWrapperX<OldtreesChangeLogDO>() | |
| 22 | + .eqIfPresent(OldtreesChangeLogDO::getOldtreeid, reqVO.getOldtreeid()) | |
| 23 | + .eqIfPresent(OldtreesChangeLogDO::getFamoustreenumber, reqVO.getFamoustreenumber()) | |
| 24 | + .eqIfPresent(OldtreesChangeLogDO::getTreelevel, reqVO.getTreelevel()) | |
| 25 | + .eqIfPresent(OldtreesChangeLogDO::getTreetype, reqVO.getTreetype()) | |
| 26 | + .eqIfPresent(OldtreesChangeLogDO::getLocation, reqVO.getLocation()) | |
| 27 | + .eqIfPresent(OldtreesChangeLogDO::getMaintainunit, reqVO.getMaintainunit()) | |
| 28 | + .eqIfPresent(OldtreesChangeLogDO::getOldtreeownership, reqVO.getOldtreeownership()) | |
| 29 | + .eqIfPresent(OldtreesChangeLogDO::getGrowlocation, reqVO.getGrowlocation()) | |
| 30 | + .likeIfPresent(OldtreesChangeLogDO::getLatinname, reqVO.getLatinname()) | |
| 31 | + .eqIfPresent(OldtreesChangeLogDO::getTreeheight, reqVO.getTreeheight()) | |
| 32 | + .eqIfPresent(OldtreesChangeLogDO::getEstimationtreeage, reqVO.getEstimationtreeage()) | |
| 33 | + .eqIfPresent(OldtreesChangeLogDO::getDbh, reqVO.getDbh()) | |
| 34 | + .eqIfPresent(OldtreesChangeLogDO::getLongitude, reqVO.getLongitude()) | |
| 35 | + .eqIfPresent(OldtreesChangeLogDO::getLatitude, reqVO.getLatitude()) | |
| 36 | + .eqIfPresent(OldtreesChangeLogDO::getCanopyeastwest, reqVO.getCanopyeastwest()) | |
| 37 | + .eqIfPresent(OldtreesChangeLogDO::getCanopysouthnorth, reqVO.getCanopysouthnorth()) | |
| 38 | + .eqIfPresent(OldtreesChangeLogDO::getManagedutyunit, reqVO.getManagedutyunit()) | |
| 39 | + .eqIfPresent(OldtreesChangeLogDO::getWeekday, reqVO.getWeekday()) | |
| 40 | + .eqIfPresent(OldtreesChangeLogDO::getGrowthvigor, reqVO.getGrowthvigor()) | |
| 41 | + .eqIfPresent(OldtreesChangeLogDO::getGrowthenvironment, reqVO.getGrowthenvironment()) | |
| 42 | + .eqIfPresent(OldtreesChangeLogDO::getTreephotoone, reqVO.getTreephotoone()) | |
| 43 | + .eqIfPresent(OldtreesChangeLogDO::getSpringmaintenance, reqVO.getSpringmaintenance()) | |
| 44 | + .eqIfPresent(OldtreesChangeLogDO::getSummermaintenance, reqVO.getSummermaintenance()) | |
| 45 | + .eqIfPresent(OldtreesChangeLogDO::getAutumnmaintenance, reqVO.getAutumnmaintenance()) | |
| 46 | + .eqIfPresent(OldtreesChangeLogDO::getWintermaintenance, reqVO.getWintermaintenance()) | |
| 47 | + .eqIfPresent(OldtreesChangeLogDO::getAnnual, reqVO.getAnnual()) | |
| 48 | + .eqIfPresent(OldtreesChangeLogDO::getCuringremark, reqVO.getCuringremark()) | |
| 49 | + .eqIfPresent(OldtreesChangeLogDO::getTreephototwo, reqVO.getTreephototwo()) | |
| 50 | + .eqIfPresent(OldtreesChangeLogDO::getTreephotothree, reqVO.getTreephotothree()) | |
| 51 | + .eqIfPresent(OldtreesChangeLogDO::getNameplatephoto, reqVO.getNameplatephoto()) | |
| 52 | + .eqIfPresent(OldtreesChangeLogDO::getDatastate, reqVO.getDatastate()) | |
| 53 | + .eqIfPresent(OldtreesChangeLogDO::getCuringstaff, reqVO.getCuringstaff()) | |
| 54 | + .eqIfPresent(OldtreesChangeLogDO::getState, reqVO.getState()) | |
| 55 | + .eqIfPresent(OldtreesChangeLogDO::getPlatformstate, reqVO.getPlatformstate()) | |
| 56 | + .eqIfPresent(OldtreesChangeLogDO::getStreet, reqVO.getStreet()) | |
| 57 | + .likeIfPresent(OldtreesChangeLogDO::getResponsibleusername, reqVO.getResponsibleusername()) | |
| 58 | + .eqIfPresent(OldtreesChangeLogDO::getResponsibleuserphone, reqVO.getResponsibleuserphone()) | |
| 59 | + .eqIfPresent(OldtreesChangeLogDO::getCreateby, reqVO.getCreateby()) | |
| 60 | + .betweenIfPresent(OldtreesChangeLogDO::getCreatetime, reqVO.getCreatetime()) | |
| 61 | + .eqIfPresent(OldtreesChangeLogDO::getUpdateby, reqVO.getUpdateby()) | |
| 62 | + .betweenIfPresent(OldtreesChangeLogDO::getUpdatetime, reqVO.getUpdatetime()) | |
| 63 | + .orderByDesc(OldtreesChangeLogDO::getId)); | |
| 64 | + } | |
| 65 | + | |
| 66 | +} | |
| 0 | 67 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/tree/TreeMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.tree; | |
| 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.tree.TreeDO; | |
| 9 | +import org.apache.ibatis.annotations.Mapper; | |
| 10 | +import com.zteits.urbanops.module.garden.controller.admin.tree.vo.*; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 一树一档案 Mapper | |
| 14 | + * | |
| 15 | + * @author 超级管理员 | |
| 16 | + */ | |
| 17 | +@Mapper | |
| 18 | +public interface TreeMapper extends BaseMapperX<TreeDO> { | |
| 19 | + | |
| 20 | + default PageResult<TreeDO> selectPage(TreePageReqVO reqVO) { | |
| 21 | + return selectPage(reqVO, new LambdaQueryWrapperX<TreeDO>() | |
| 22 | + .eqIfPresent(TreeDO::getTreenumber, reqVO.getTreenumber()) | |
| 23 | + .likeIfPresent(TreeDO::getLatinname, reqVO.getLatinname()) | |
| 24 | + .eqIfPresent(TreeDO::getTreetype, reqVO.getTreetype()) | |
| 25 | + .eqIfPresent(TreeDO::getTreeheight, reqVO.getTreeheight()) | |
| 26 | + .eqIfPresent(TreeDO::getCanopy, reqVO.getCanopy()) | |
| 27 | + .eqIfPresent(TreeDO::getDbh, reqVO.getDbh()) | |
| 28 | + .eqIfPresent(TreeDO::getGrowthvigor, reqVO.getGrowthvigor()) | |
| 29 | + .eqIfPresent(TreeDO::getTreelevel, reqVO.getTreelevel()) | |
| 30 | + .eqIfPresent(TreeDO::getLongitude, reqVO.getLongitude()) | |
| 31 | + .eqIfPresent(TreeDO::getLatitude, reqVO.getLatitude()) | |
| 32 | + .eqIfPresent(TreeDO::getLocation, reqVO.getLocation()) | |
| 33 | + .eqIfPresent(TreeDO::getMaintainunit, reqVO.getMaintainunit()) | |
| 34 | + .eqIfPresent(TreeDO::getManagedutyunit, reqVO.getManagedutyunit()) | |
| 35 | + .eqIfPresent(TreeDO::getRoad, reqVO.getRoad()) | |
| 36 | + .eqIfPresent(TreeDO::getStreet, reqVO.getStreet()) | |
| 37 | + .eqIfPresent(TreeDO::getOldtreeownership, reqVO.getOldtreeownership()) | |
| 38 | + .eqIfPresent(TreeDO::getDatastate, reqVO.getDatastate()) | |
| 39 | + .eqIfPresent(TreeDO::getEstimationtreeage, reqVO.getEstimationtreeage()) | |
| 40 | + .eqIfPresent(TreeDO::getCanopyeastwest, reqVO.getCanopyeastwest()) | |
| 41 | + .eqIfPresent(TreeDO::getCanopysouthnorth, reqVO.getCanopysouthnorth()) | |
| 42 | + .eqIfPresent(TreeDO::getWeekday, reqVO.getWeekday()) | |
| 43 | + .eqIfPresent(TreeDO::getGrowlocation, reqVO.getGrowlocation()) | |
| 44 | + .eqIfPresent(TreeDO::getGrowthenvironment, reqVO.getGrowthenvironment()) | |
| 45 | + .eqIfPresent(TreeDO::getTreephotoone, reqVO.getTreephotoone()) | |
| 46 | + .eqIfPresent(TreeDO::getTreephototwo, reqVO.getTreephototwo()) | |
| 47 | + .eqIfPresent(TreeDO::getTreephotothree, reqVO.getTreephotothree()) | |
| 48 | + .eqIfPresent(TreeDO::getTreephotofour, reqVO.getTreephotofour()) | |
| 49 | + .eqIfPresent(TreeDO::getTreephotofive, reqVO.getTreephotofive()) | |
| 50 | + .eqIfPresent(TreeDO::getCreateby, reqVO.getCreateby()) | |
| 51 | + .betweenIfPresent(TreeDO::getCreatetime, reqVO.getCreatetime()) | |
| 52 | + .eqIfPresent(TreeDO::getUpdateby, reqVO.getUpdateby()) | |
| 53 | + .betweenIfPresent(TreeDO::getUpdatetime, reqVO.getUpdatetime()) | |
| 54 | + .eqIfPresent(TreeDO::getRemark, reqVO.getRemark()) | |
| 55 | + .eqIfPresent(TreeDO::getDeptId, reqVO.getDeptId()) | |
| 56 | + .orderByDesc(TreeDO::getId)); | |
| 57 | + } | |
| 58 | + | |
| 59 | + default TreeDO selectByTreeNumber(String treeNumber) { | |
| 60 | + return selectOne(new LambdaQueryWrapperX<TreeDO>() | |
| 61 | + .eqIfPresent(TreeDO::getTreenumber, treeNumber) | |
| 62 | + ); | |
| 63 | + } | |
| 64 | + | |
| 65 | + List<CompanyDeptRoadVO> selectCompanyDeptRoadTreeData(TreeVO tree); | |
| 66 | +} | |
| 0 | 67 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/treechangelog/TreeChangeLogMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.treechangelog; | |
| 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.treechangelog.TreeChangeLogDO; | |
| 9 | +import org.apache.ibatis.annotations.Mapper; | |
| 10 | +import com.zteits.urbanops.module.garden.controller.admin.treechangelog.vo.*; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 一树一档案修改记录 Mapper | |
| 14 | + * | |
| 15 | + * @author 超级管理员 | |
| 16 | + */ | |
| 17 | +@Mapper | |
| 18 | +public interface TreeChangeLogMapper extends BaseMapperX<TreeChangeLogDO> { | |
| 19 | + | |
| 20 | + default PageResult<TreeChangeLogDO> selectPage(TreeChangeLogPageReqVO reqVO) { | |
| 21 | + return selectPage(reqVO, new LambdaQueryWrapperX<TreeChangeLogDO>() | |
| 22 | + .eqIfPresent(TreeChangeLogDO::getTreeid, reqVO.getTreeid()) | |
| 23 | + .eqIfPresent(TreeChangeLogDO::getTreenumber, reqVO.getTreenumber()) | |
| 24 | + .likeIfPresent(TreeChangeLogDO::getLatinname, reqVO.getLatinname()) | |
| 25 | + .eqIfPresent(TreeChangeLogDO::getTreetype, reqVO.getTreetype()) | |
| 26 | + .eqIfPresent(TreeChangeLogDO::getTreeheight, reqVO.getTreeheight()) | |
| 27 | + .eqIfPresent(TreeChangeLogDO::getCanopy, reqVO.getCanopy()) | |
| 28 | + .eqIfPresent(TreeChangeLogDO::getDbh, reqVO.getDbh()) | |
| 29 | + .eqIfPresent(TreeChangeLogDO::getGrowthvigor, reqVO.getGrowthvigor()) | |
| 30 | + .eqIfPresent(TreeChangeLogDO::getTreelevel, reqVO.getTreelevel()) | |
| 31 | + .eqIfPresent(TreeChangeLogDO::getLongitude, reqVO.getLongitude()) | |
| 32 | + .eqIfPresent(TreeChangeLogDO::getLatitude, reqVO.getLatitude()) | |
| 33 | + .eqIfPresent(TreeChangeLogDO::getLocation, reqVO.getLocation()) | |
| 34 | + .eqIfPresent(TreeChangeLogDO::getMaintainunit, reqVO.getMaintainunit()) | |
| 35 | + .eqIfPresent(TreeChangeLogDO::getManagedutyunit, reqVO.getManagedutyunit()) | |
| 36 | + .eqIfPresent(TreeChangeLogDO::getRoad, reqVO.getRoad()) | |
| 37 | + .eqIfPresent(TreeChangeLogDO::getStreet, reqVO.getStreet()) | |
| 38 | + .eqIfPresent(TreeChangeLogDO::getOldtreeownership, reqVO.getOldtreeownership()) | |
| 39 | + .eqIfPresent(TreeChangeLogDO::getDatastate, reqVO.getDatastate()) | |
| 40 | + .eqIfPresent(TreeChangeLogDO::getEstimationtreeage, reqVO.getEstimationtreeage()) | |
| 41 | + .eqIfPresent(TreeChangeLogDO::getCanopyeastwest, reqVO.getCanopyeastwest()) | |
| 42 | + .eqIfPresent(TreeChangeLogDO::getCanopysouthnorth, reqVO.getCanopysouthnorth()) | |
| 43 | + .eqIfPresent(TreeChangeLogDO::getWeekday, reqVO.getWeekday()) | |
| 44 | + .eqIfPresent(TreeChangeLogDO::getGrowlocation, reqVO.getGrowlocation()) | |
| 45 | + .eqIfPresent(TreeChangeLogDO::getGrowthenvironment, reqVO.getGrowthenvironment()) | |
| 46 | + .eqIfPresent(TreeChangeLogDO::getTreephotoone, reqVO.getTreephotoone()) | |
| 47 | + .eqIfPresent(TreeChangeLogDO::getTreephototwo, reqVO.getTreephototwo()) | |
| 48 | + .eqIfPresent(TreeChangeLogDO::getTreephotothree, reqVO.getTreephotothree()) | |
| 49 | + .eqIfPresent(TreeChangeLogDO::getTreephotofour, reqVO.getTreephotofour()) | |
| 50 | + .eqIfPresent(TreeChangeLogDO::getTreephotofive, reqVO.getTreephotofive()) | |
| 51 | + .eqIfPresent(TreeChangeLogDO::getCreateby, reqVO.getCreateby()) | |
| 52 | + .betweenIfPresent(TreeChangeLogDO::getCreatetime, reqVO.getCreatetime()) | |
| 53 | + .eqIfPresent(TreeChangeLogDO::getUpdateby, reqVO.getUpdateby()) | |
| 54 | + .betweenIfPresent(TreeChangeLogDO::getUpdatetime, reqVO.getUpdatetime()) | |
| 55 | + .eqIfPresent(TreeChangeLogDO::getRemark, reqVO.getRemark()) | |
| 56 | + .orderByDesc(TreeChangeLogDO::getId)); | |
| 57 | + } | |
| 58 | + | |
| 59 | +} | |
| 0 | 60 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/treerecord/GardenOldtreesMapper.java deleted
| 1 | -package com.zteits.urbanops.module.garden.dal.mysql.treerecord; | |
| 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.treerecord.GardenOldtreesDO; | |
| 7 | -import org.apache.ibatis.annotations.Mapper; | |
| 8 | - | |
| 9 | -@Mapper | |
| 10 | -public interface GardenOldtreesMapper extends BaseMapperX<GardenOldtreesDO> { | |
| 11 | - default PageResult<GardenOldtreesDO> selectPage(com.zteits.urbanops.framework.common.pojo.PageParam pageParam, GardenOldtreesDO where) { | |
| 12 | - return selectPage(pageParam, null, new LambdaQueryWrapperX<GardenOldtreesDO>() | |
| 13 | - .likeIfPresent(GardenOldtreesDO::getTreenumber, where.getTreenumber()) | |
| 14 | - .likeIfPresent(GardenOldtreesDO::getLatinname, where.getLatinname()) | |
| 15 | - .eqIfPresent(GardenOldtreesDO::getStreet, where.getStreet()) | |
| 16 | - .eqIfPresent(GardenOldtreesDO::getMaintainunit, where.getMaintainunit()) | |
| 17 | - .eqIfPresent(GardenOldtreesDO::getDeptId, where.getDeptId()) | |
| 18 | - .orderByDesc(GardenOldtreesDO::getUpdateTime)); | |
| 19 | - } | |
| 20 | -} | |
| 21 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/treerecord/GardenTreeMapper.java deleted
| 1 | -package com.zteits.urbanops.module.garden.dal.mysql.treerecord; | |
| 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.treerecord.GardenTreeDO; | |
| 7 | -import org.apache.ibatis.annotations.Mapper; | |
| 8 | - | |
| 9 | -@Mapper | |
| 10 | -public interface GardenTreeMapper extends BaseMapperX<GardenTreeDO> { | |
| 11 | - default PageResult<GardenTreeDO> selectPage(com.zteits.urbanops.framework.common.pojo.PageParam pageParam, GardenTreeDO where) { | |
| 12 | - return selectPage(pageParam, null, new LambdaQueryWrapperX<GardenTreeDO>() | |
| 13 | - .likeIfPresent(GardenTreeDO::getTreenumber, where.getTreenumber()) | |
| 14 | - .likeIfPresent(GardenTreeDO::getLatinname, where.getLatinname()) | |
| 15 | - .likeIfPresent(GardenTreeDO::getTreetype, where.getTreetype()) | |
| 16 | - .eqIfPresent(GardenTreeDO::getTreeheight, where.getTreeheight()) | |
| 17 | - .eqIfPresent(GardenTreeDO::getCanopy, where.getCanopy()) | |
| 18 | - .eqIfPresent(GardenTreeDO::getDbh, where.getDbh()) | |
| 19 | - .eqIfPresent(GardenTreeDO::getGrowthvigor, where.getGrowthvigor()) | |
| 20 | - .eqIfPresent(GardenTreeDO::getTreelevel, where.getTreelevel()) | |
| 21 | - .eqIfPresent(GardenTreeDO::getLongitude, where.getLongitude()) | |
| 22 | - .eqIfPresent(GardenTreeDO::getLatitude, where.getLatitude()) | |
| 23 | - .eqIfPresent(GardenTreeDO::getLocation, where.getLocation()) | |
| 24 | - .eqIfPresent(GardenTreeDO::getMaintainunit, where.getMaintainunit()) | |
| 25 | - .eqIfPresent(GardenTreeDO::getManagedutyunit, where.getManagedutyunit()) | |
| 26 | - .eqIfPresent(GardenTreeDO::getStreet, where.getStreet()) | |
| 27 | - .eqIfPresent(GardenTreeDO::getOldtreeownership, where.getOldtreeownership()) | |
| 28 | - .eqIfPresent(GardenTreeDO::getDatastate, where.getDatastate()) | |
| 29 | - .eqIfPresent(GardenTreeDO::getEstimationtreeage, where.getEstimationtreeage()) | |
| 30 | - .eqIfPresent(GardenTreeDO::getCanopyeastwest, where.getCanopyeastwest()) | |
| 31 | - .eqIfPresent(GardenTreeDO::getCanopysouthnorth, where.getCanopysouthnorth()) | |
| 32 | - .eqIfPresent(GardenTreeDO::getWeekday, where.getWeekday()) | |
| 33 | - .eqIfPresent(GardenTreeDO::getGrowlocation, where.getGrowlocation()) | |
| 34 | - .eqIfPresent(GardenTreeDO::getGrowthenvironment, where.getGrowthenvironment()) | |
| 35 | - .eqIfPresent(GardenTreeDO::getDeleted, where.getDeleted()) | |
| 36 | - .orderByDesc(GardenTreeDO::getUpdateTime)); | |
| 37 | - } | |
| 38 | - | |
| 39 | - class CompanyDeptRoadRow { | |
| 40 | - public String companyId; | |
| 41 | - public String companyName; | |
| 42 | - public Long deptId; | |
| 43 | - public String deptName; | |
| 44 | - public Long roadId; | |
| 45 | - public String roadName; | |
| 46 | - public String startRemark; | |
| 47 | - public String endRemark; | |
| 48 | - public Long treeCount; | |
| 49 | - public Long recordedCount; | |
| 50 | - } | |
| 51 | - | |
| 52 | - @org.apache.ibatis.annotations.Select("SELECT c.dict_value AS companyId, c.dict_label AS companyName, d.dept_id AS deptId, d.dept_name AS deptName, r.id AS roadId, r.road_name AS roadName, r.starting_remark AS startRemark, r.end_remark AS endRemark, COALESCE(r.tree_area, 0) AS treeCount, COUNT(t.id) AS recordedCount FROM sys_dict_data c JOIN sys_dept d ON d.belong_company_id = c.dict_value AND d.del_flag = '0' LEFT JOIN td_road_manager r ON d.dept_id = r.dept_id LEFT JOIN garden_tree t ON r.id = t.road AND t.deleted = 0 WHERE c.dict_type = 'belongCompanyId' AND d.dept_id NOT IN (SELECT DISTINCT parent_id FROM sys_dept WHERE parent_id IS NOT NULL) GROUP BY c.dict_value, c.dict_label, d.dept_id, d.dept_name, r.id, r.road_name, r.starting_remark, r.end_remark, r.tree_area ORDER BY treeCount DESC, recordedCount DESC") | |
| 53 | - java.util.List<CompanyDeptRoadRow> selectCompanyDeptRoadRows(); | |
| 54 | - | |
| 55 | - @org.apache.ibatis.annotations.Select("SELECT t.id, t.treetype, t.treeheight, t.dbh, t.treenumber, t.treephotoone AS treephoto FROM garden_tree t WHERE t.deleted = 0 AND t.road = #{road} ORDER BY t.update_time DESC") | |
| 56 | - java.util.List<com.zteits.urbanops.module.garden.controller.admin.treerecord.vo.RoadTreeVO> selectTreesByRoadId(@org.apache.ibatis.annotations.Param("road") Long road); | |
| 57 | -} | |
| 58 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/enums/ErrorCodeConstants.java
| ... | ... | @@ -109,4 +109,21 @@ public interface ErrorCodeConstants { |
| 109 | 109 | |
| 110 | 110 | ErrorCode MATERIAL_INVENTORY_OUT_NOT_EXISTS = new ErrorCode(1-100-004-005, "物料出库不存在"); |
| 111 | 111 | ErrorCode MATERIAL_INVENTORY_NOT_EXISTS = new ErrorCode(1-100-004-006, "物料库存不存在"); |
| 112 | + | |
| 113 | + ErrorCode OLDTREES_NOT_EXISTS = new ErrorCode(1-100-005-001, "古树名木不存在"); | |
| 114 | + | |
| 115 | + ErrorCode OLDTREES_CHANGE_LOG_NOT_EXISTS = new ErrorCode(1-100-005-002, "古树名木修改记录不存在"); | |
| 116 | + | |
| 117 | + ErrorCode TREE_CHANGE_LOG_NOT_EXISTS = new ErrorCode(1-100-005-003, "一树一档案修改记录不存在"); | |
| 118 | + | |
| 119 | + ErrorCode TREE_NOT_EXISTS = new ErrorCode(1-100-005-004, "一树一档案不存在"); | |
| 120 | + ErrorCode OLDTREES_FAMOUSTREENUMBER_EXISTS = new ErrorCode(1-100-005-006, "古树编号已存在"); | |
| 121 | + ErrorCode TREE_ROAD_NOT_EXISTS = new ErrorCode(1-100-005-007, "所属道路不能为空"); | |
| 122 | + ErrorCode TREE_NUMBER_EXISTS = new ErrorCode(1-100-005-010, "树木编码已存在"); | |
| 123 | + | |
| 124 | + | |
| 125 | + ErrorCode ROAD_MANAGER_NOT_EXISTS = new ErrorCode(1-100-006-001, "道路管理不存在"); | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 112 | 129 | } | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/oldtrees/OldtreesService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.oldtrees; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | +import jakarta.validation.*; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.oldtrees.vo.*; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.oldtrees.OldtreesDO; | |
| 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 OldtreesService { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 创建古树名木 | |
| 19 | + * | |
| 20 | + * @param createReqVO 创建信息 | |
| 21 | + * @return 编号 | |
| 22 | + */ | |
| 23 | + String createOldtrees(@Valid OldtreesSaveReqVO createReqVO); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 更新古树名木 | |
| 27 | + * | |
| 28 | + * @param updateReqVO 更新信息 | |
| 29 | + */ | |
| 30 | + void updateOldtrees(@Valid OldtreesSaveReqVO updateReqVO); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 删除古树名木 | |
| 34 | + * | |
| 35 | + * @param id 编号 | |
| 36 | + */ | |
| 37 | + void deleteOldtrees(String id); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 批量删除古树名木 | |
| 41 | + * | |
| 42 | + * @param ids 编号 | |
| 43 | + */ | |
| 44 | + void deleteOldtreesListByIds(List<String> ids); | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 获得古树名木 | |
| 48 | + * | |
| 49 | + * @param id 编号 | |
| 50 | + * @return 古树名木 | |
| 51 | + */ | |
| 52 | + OldtreesDO getOldtrees(String id); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 获得古树名木分页 | |
| 56 | + * | |
| 57 | + * @param pageReqVO 分页查询 | |
| 58 | + * @return 古树名木分页 | |
| 59 | + */ | |
| 60 | + PageResult<OldtreesDO> getOldtreesPage(OldtreesPageReqVO pageReqVO); | |
| 61 | + | |
| 62 | +} | |
| 0 | 63 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/oldtrees/OldtreesServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.oldtrees; | |
| 2 | + | |
| 3 | +import cn.hutool.core.collection.CollUtil; | |
| 4 | +import com.zteits.urbanops.framework.common.exception.ServiceException; | |
| 5 | +import com.zteits.urbanops.module.garden.dal.dataobject.oldtreeschangelog.OldtreesChangeLogDO; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.mysql.oldtreeschangelog.OldtreesChangeLogMapper; | |
| 7 | +import org.springframework.stereotype.Service; | |
| 8 | +import jakarta.annotation.Resource; | |
| 9 | +import org.springframework.util.CollectionUtils; | |
| 10 | +import org.springframework.util.ObjectUtils; | |
| 11 | +import org.springframework.util.StringUtils; | |
| 12 | +import org.springframework.validation.annotation.Validated; | |
| 13 | +import org.springframework.transaction.annotation.Transactional; | |
| 14 | + | |
| 15 | +import java.time.LocalDateTime; | |
| 16 | +import java.util.*; | |
| 17 | +import com.zteits.urbanops.module.garden.controller.admin.oldtrees.vo.*; | |
| 18 | +import com.zteits.urbanops.module.garden.dal.dataobject.oldtrees.OldtreesDO; | |
| 19 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 20 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 21 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 22 | + | |
| 23 | +import com.zteits.urbanops.module.garden.dal.mysql.oldtrees.OldtreesMapper; | |
| 24 | + | |
| 25 | +import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 26 | +import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.convertList; | |
| 27 | +import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.diffList; | |
| 28 | +import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.*; | |
| 29 | + | |
| 30 | +/** | |
| 31 | + * 古树名木 Service 实现类 | |
| 32 | + * | |
| 33 | + * @author 超级管理员 | |
| 34 | + */ | |
| 35 | +@Service | |
| 36 | +@Validated | |
| 37 | +public class OldtreesServiceImpl implements OldtreesService { | |
| 38 | + | |
| 39 | + @Resource | |
| 40 | + private OldtreesMapper oldtreesMapper; | |
| 41 | + | |
| 42 | + @Resource | |
| 43 | + private OldtreesChangeLogMapper oldtreesChangeLogMapper; | |
| 44 | + | |
| 45 | + @Override | |
| 46 | + public String createOldtrees(OldtreesSaveReqVO createReqVO) { | |
| 47 | + // 插入 | |
| 48 | + OldtreesDO oldtrees = BeanUtils.toBean(createReqVO, OldtreesDO.class); | |
| 49 | + | |
| 50 | + if (!ObjectUtils.isEmpty(oldtrees)) { | |
| 51 | + oldtrees.imgToDomain(); | |
| 52 | + } | |
| 53 | + | |
| 54 | + String id = oldtrees.getId(); | |
| 55 | + if (!StringUtils.hasText(id)) { | |
| 56 | + id = UUID.randomUUID().toString().replace("-", ""); | |
| 57 | + oldtrees.setId(id); | |
| 58 | + } | |
| 59 | + | |
| 60 | + OldtreesDO exists = oldtreesMapper.selectByFamoustreenumber(oldtrees.getFamoustreenumber()); | |
| 61 | + if (!ObjectUtils.isEmpty(exists)) { | |
| 62 | + throw new ServiceException(OLDTREES_FAMOUSTREENUMBER_EXISTS); | |
| 63 | + } | |
| 64 | + | |
| 65 | + int insert = oldtreesMapper.insert(oldtrees); | |
| 66 | + | |
| 67 | + OldtreesChangeLogDO changeLog = new OldtreesChangeLogDO(); | |
| 68 | + BeanUtils.copyProperties(createReqVO, changeLog); | |
| 69 | + changeLog.setOldtreeid(id); | |
| 70 | + changeLog.setCreateby(createReqVO.getCreateby()); | |
| 71 | + changeLog.setCreatetime(createReqVO.getCreatetime()); | |
| 72 | + changeLog.setUpdateby(createReqVO.getCreateby()); | |
| 73 | + changeLog.setUpdatetime(createReqVO.getUpdatetime()); | |
| 74 | + oldtreesChangeLogMapper.insert(changeLog); | |
| 75 | + | |
| 76 | + // 返回 | |
| 77 | + return oldtrees.getId(); | |
| 78 | + } | |
| 79 | + | |
| 80 | + @Override | |
| 81 | + public void updateOldtrees(OldtreesSaveReqVO updateReqVO) { | |
| 82 | + // 校验存在 | |
| 83 | + OldtreesDO dbOlderTree = validateOldtreesExists(updateReqVO.getId()); | |
| 84 | + | |
| 85 | + if (!ObjectUtils.isEmpty(dbOlderTree) && !dbOlderTree.getFamoustreenumber().equals(updateReqVO.getFamoustreenumber())) { | |
| 86 | + | |
| 87 | + OldtreesDO exists = oldtreesMapper.selectByFamoustreenumber(updateReqVO.getFamoustreenumber()); | |
| 88 | + if (!ObjectUtils.isEmpty(exists)) { | |
| 89 | + throw new ServiceException(OLDTREES_FAMOUSTREENUMBER_EXISTS); | |
| 90 | + } | |
| 91 | + } | |
| 92 | + | |
| 93 | + // 更新 | |
| 94 | + OldtreesDO updateObj = BeanUtils.toBean(updateReqVO, OldtreesDO.class); | |
| 95 | + | |
| 96 | + updateObj.imgToDomain(); | |
| 97 | + | |
| 98 | + OldtreesChangeLogDO changeLog = new OldtreesChangeLogDO(); | |
| 99 | + org.springframework.beans.BeanUtils.copyProperties(updateReqVO, changeLog); | |
| 100 | + changeLog.setOldtreeid(updateReqVO.getId()); | |
| 101 | + changeLog.setCreateby(updateReqVO.getUpdateby()); | |
| 102 | + changeLog.setCreatetime(LocalDateTime.now()); | |
| 103 | + changeLog.setUpdateby(updateReqVO.getUpdateby()); | |
| 104 | + changeLog.setUpdatetime(LocalDateTime.now()); | |
| 105 | + oldtreesChangeLogMapper.insert(changeLog); | |
| 106 | + | |
| 107 | + oldtreesMapper.updateById(updateObj); | |
| 108 | + } | |
| 109 | + | |
| 110 | + @Override | |
| 111 | + public void deleteOldtrees(String id) { | |
| 112 | + // 校验存在 | |
| 113 | + validateOldtreesExists(id); | |
| 114 | + // 删除 | |
| 115 | + oldtreesMapper.deleteById(id); | |
| 116 | + } | |
| 117 | + | |
| 118 | + @Override | |
| 119 | + public void deleteOldtreesListByIds(List<String> ids) { | |
| 120 | + // 删除 | |
| 121 | + oldtreesMapper.deleteByIds(ids); | |
| 122 | + } | |
| 123 | + | |
| 124 | + | |
| 125 | + private OldtreesDO validateOldtreesExists(String id) { | |
| 126 | + OldtreesDO oldtreesDO = oldtreesMapper.selectById(id); | |
| 127 | + if (oldtreesDO == null) { | |
| 128 | + throw exception(OLDTREES_NOT_EXISTS); | |
| 129 | + } | |
| 130 | + return oldtreesDO; | |
| 131 | + } | |
| 132 | + | |
| 133 | + @Override | |
| 134 | + public OldtreesDO getOldtrees(String id) { | |
| 135 | + OldtreesDO oldtreesDO = oldtreesMapper.selectById(id); | |
| 136 | + if (!ObjectUtils.isEmpty(oldtreesDO)) { | |
| 137 | + oldtreesDO.domainToImg(); | |
| 138 | + } | |
| 139 | + return oldtreesDO; | |
| 140 | + } | |
| 141 | + | |
| 142 | + @Override | |
| 143 | + public PageResult<OldtreesDO> getOldtreesPage(OldtreesPageReqVO pageReqVO) { | |
| 144 | + return oldtreesMapper.selectPage(pageReqVO); | |
| 145 | + } | |
| 146 | + | |
| 147 | +} | |
| 0 | 148 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/oldtreeschangelog/OldtreesChangeLogService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.oldtreeschangelog; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | +import jakarta.validation.*; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.oldtreeschangelog.vo.*; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.oldtreeschangelog.OldtreesChangeLogDO; | |
| 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 OldtreesChangeLogService { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 创建古树名木修改记录 | |
| 19 | + * | |
| 20 | + * @param createReqVO 创建信息 | |
| 21 | + * @return 编号 | |
| 22 | + */ | |
| 23 | + String createOldtreesChangeLog(@Valid OldtreesChangeLogSaveReqVO createReqVO); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 更新古树名木修改记录 | |
| 27 | + * | |
| 28 | + * @param updateReqVO 更新信息 | |
| 29 | + */ | |
| 30 | + void updateOldtreesChangeLog(@Valid OldtreesChangeLogSaveReqVO updateReqVO); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 删除古树名木修改记录 | |
| 34 | + * | |
| 35 | + * @param id 编号 | |
| 36 | + */ | |
| 37 | + void deleteOldtreesChangeLog(String id); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 批量删除古树名木修改记录 | |
| 41 | + * | |
| 42 | + * @param ids 编号 | |
| 43 | + */ | |
| 44 | + void deleteOldtreesChangeLogListByIds(List<String> ids); | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 获得古树名木修改记录 | |
| 48 | + * | |
| 49 | + * @param id 编号 | |
| 50 | + * @return 古树名木修改记录 | |
| 51 | + */ | |
| 52 | + OldtreesChangeLogDO getOldtreesChangeLog(String id); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 获得古树名木修改记录分页 | |
| 56 | + * | |
| 57 | + * @param pageReqVO 分页查询 | |
| 58 | + * @return 古树名木修改记录分页 | |
| 59 | + */ | |
| 60 | + PageResult<OldtreesChangeLogDO> getOldtreesChangeLogPage(OldtreesChangeLogPageReqVO pageReqVO); | |
| 61 | + | |
| 62 | +} | |
| 0 | 63 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/oldtreeschangelog/OldtreesChangeLogServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.oldtreeschangelog; | |
| 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.oldtreeschangelog.vo.*; | |
| 11 | +import com.zteits.urbanops.module.garden.dal.dataobject.oldtreeschangelog.OldtreesChangeLogDO; | |
| 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.oldtreeschangelog.OldtreesChangeLogMapper; | |
| 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 OldtreesChangeLogServiceImpl implements OldtreesChangeLogService { | |
| 31 | + | |
| 32 | + @Resource | |
| 33 | + private OldtreesChangeLogMapper oldtreesChangeLogMapper; | |
| 34 | + | |
| 35 | + @Override | |
| 36 | + public String createOldtreesChangeLog(OldtreesChangeLogSaveReqVO createReqVO) { | |
| 37 | + // 插入 | |
| 38 | + OldtreesChangeLogDO oldtreesChangeLog = BeanUtils.toBean(createReqVO, OldtreesChangeLogDO.class); | |
| 39 | + oldtreesChangeLogMapper.insert(oldtreesChangeLog); | |
| 40 | + | |
| 41 | + // 返回 | |
| 42 | + return oldtreesChangeLog.getId(); | |
| 43 | + } | |
| 44 | + | |
| 45 | + @Override | |
| 46 | + public void updateOldtreesChangeLog(OldtreesChangeLogSaveReqVO updateReqVO) { | |
| 47 | + // 校验存在 | |
| 48 | + validateOldtreesChangeLogExists(updateReqVO.getId()); | |
| 49 | + // 更新 | |
| 50 | + OldtreesChangeLogDO updateObj = BeanUtils.toBean(updateReqVO, OldtreesChangeLogDO.class); | |
| 51 | + oldtreesChangeLogMapper.updateById(updateObj); | |
| 52 | + } | |
| 53 | + | |
| 54 | + @Override | |
| 55 | + public void deleteOldtreesChangeLog(String id) { | |
| 56 | + // 校验存在 | |
| 57 | + validateOldtreesChangeLogExists(id); | |
| 58 | + // 删除 | |
| 59 | + oldtreesChangeLogMapper.deleteById(id); | |
| 60 | + } | |
| 61 | + | |
| 62 | + @Override | |
| 63 | + public void deleteOldtreesChangeLogListByIds(List<String> ids) { | |
| 64 | + // 删除 | |
| 65 | + oldtreesChangeLogMapper.deleteByIds(ids); | |
| 66 | + } | |
| 67 | + | |
| 68 | + | |
| 69 | + private void validateOldtreesChangeLogExists(String id) { | |
| 70 | + if (oldtreesChangeLogMapper.selectById(id) == null) { | |
| 71 | + throw exception(OLDTREES_CHANGE_LOG_NOT_EXISTS); | |
| 72 | + } | |
| 73 | + } | |
| 74 | + | |
| 75 | + @Override | |
| 76 | + public OldtreesChangeLogDO getOldtreesChangeLog(String id) { | |
| 77 | + return oldtreesChangeLogMapper.selectById(id); | |
| 78 | + } | |
| 79 | + | |
| 80 | + @Override | |
| 81 | + public PageResult<OldtreesChangeLogDO> getOldtreesChangeLogPage(OldtreesChangeLogPageReqVO pageReqVO) { | |
| 82 | + PageResult<OldtreesChangeLogDO> pageResult = oldtreesChangeLogMapper.selectPage(pageReqVO); | |
| 83 | + pageResult.getList().forEach(OldtreesChangeLogDO::domainToImg); | |
| 84 | + return pageResult; | |
| 85 | + } | |
| 86 | + | |
| 87 | +} | |
| 0 | 88 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/tree/TreeService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.tree; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | +import jakarta.validation.*; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.tree.vo.*; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.tree.TreeDO; | |
| 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 TreeService { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 创建一树一档案 | |
| 19 | + * | |
| 20 | + * @param createReqVO 创建信息 | |
| 21 | + * @return 编号 | |
| 22 | + */ | |
| 23 | + Long createTree(@Valid TreeSaveReqVO createReqVO); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 更新一树一档案 | |
| 27 | + * | |
| 28 | + * @param updateReqVO 更新信息 | |
| 29 | + */ | |
| 30 | + void updateTree(@Valid TreeSaveReqVO updateReqVO); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 删除一树一档案 | |
| 34 | + * | |
| 35 | + * @param id 编号 | |
| 36 | + */ | |
| 37 | + void deleteTree(Long id); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 批量删除一树一档案 | |
| 41 | + * | |
| 42 | + * @param ids 编号 | |
| 43 | + */ | |
| 44 | + void deleteTreeListByIds(List<Long> ids); | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 获得一树一档案 | |
| 48 | + * | |
| 49 | + * @param id 编号 | |
| 50 | + * @return 一树一档案 | |
| 51 | + */ | |
| 52 | + TreeDO getTree(Long id); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 获得一树一档案分页 | |
| 56 | + * | |
| 57 | + * @param pageReqVO 分页查询 | |
| 58 | + * @return 一树一档案分页 | |
| 59 | + */ | |
| 60 | + PageResult<TreeDO> getTreePage(TreePageReqVO pageReqVO); | |
| 61 | + | |
| 62 | + List<CompanyDeptRoadVO> getCompanyDeptRoadTreeData(TreeVO tree); | |
| 63 | + | |
| 64 | + PageResult<RoadTreeVO> getTreesByRoadId(TreePageReqVO pageReqVO); | |
| 65 | +} | |
| 0 | 66 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/tree/TreeServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.tree; | |
| 2 | + | |
| 3 | +import cn.hutool.core.collection.CollUtil; | |
| 4 | +import com.zteits.urbanops.framework.common.exception.ServiceException; | |
| 5 | +import com.zteits.urbanops.framework.common.util.cache.CacheUtils; | |
| 6 | +import com.zteits.urbanops.framework.dict.core.DictFrameworkUtils; | |
| 7 | +import com.zteits.urbanops.module.garden.dal.dataobject.road.RoadDO; | |
| 8 | +import com.zteits.urbanops.module.garden.dal.dataobject.treechangelog.TreeChangeLogDO; | |
| 9 | +import com.zteits.urbanops.module.garden.dal.mysql.road.RoadMapper; | |
| 10 | +import com.zteits.urbanops.module.garden.dal.mysql.treechangelog.TreeChangeLogMapper; | |
| 11 | +import com.zteits.urbanops.module.garden.service.road.RoadService; | |
| 12 | +import com.zteits.urbanops.module.system.dal.dataobject.dept.DeptDO; | |
| 13 | +import com.zteits.urbanops.module.system.dal.mysql.dept.DeptMapper; | |
| 14 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 15 | +import org.springframework.data.redis.core.RedisTemplate; | |
| 16 | +import org.springframework.data.redis.core.StringRedisTemplate; | |
| 17 | +import org.springframework.stereotype.Service; | |
| 18 | +import jakarta.annotation.Resource; | |
| 19 | +import org.springframework.util.CollectionUtils; | |
| 20 | +import org.springframework.util.ObjectUtils; | |
| 21 | +import org.springframework.util.StringUtils; | |
| 22 | +import org.springframework.validation.annotation.Validated; | |
| 23 | +import org.springframework.transaction.annotation.Transactional; | |
| 24 | + | |
| 25 | +import java.time.LocalDateTime; | |
| 26 | +import java.util.*; | |
| 27 | +import java.util.stream.Collectors; | |
| 28 | + | |
| 29 | +import com.zteits.urbanops.module.garden.controller.admin.tree.vo.*; | |
| 30 | +import com.zteits.urbanops.module.garden.dal.dataobject.tree.TreeDO; | |
| 31 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 32 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 33 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 34 | + | |
| 35 | +import com.zteits.urbanops.module.garden.dal.mysql.tree.TreeMapper; | |
| 36 | + | |
| 37 | +import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 38 | +import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.convertList; | |
| 39 | +import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.diffList; | |
| 40 | +import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.*; | |
| 41 | + | |
| 42 | +/** | |
| 43 | + * 一树一档案 Service 实现类 | |
| 44 | + * | |
| 45 | + * @author 超级管理员 | |
| 46 | + */ | |
| 47 | +@Service | |
| 48 | +@Validated | |
| 49 | +public class TreeServiceImpl implements TreeService { | |
| 50 | + | |
| 51 | + @Resource | |
| 52 | + private TreeMapper treeMapper; | |
| 53 | + | |
| 54 | + @Resource | |
| 55 | + private TreeChangeLogMapper gardenTreeChangeLogMapper; | |
| 56 | + | |
| 57 | + @Resource | |
| 58 | + private RoadMapper roadMapper; | |
| 59 | + | |
| 60 | + @Resource | |
| 61 | + private RedisTemplate redisTemplate; | |
| 62 | + | |
| 63 | + @Resource | |
| 64 | + private DeptMapper deptMapper; | |
| 65 | + | |
| 66 | + public static final String CACHE_REPEAT_KEY = "gardenTree:repeat:"; | |
| 67 | + | |
| 68 | + @Override | |
| 69 | + public Long createTree(TreeSaveReqVO createReqVO) { | |
| 70 | + // 插入 | |
| 71 | + TreeDO tree = BeanUtils.toBean(createReqVO, TreeDO.class); | |
| 72 | + | |
| 73 | + if (!ObjectUtils.isEmpty(tree)) { | |
| 74 | + tree.imgToDomain(); | |
| 75 | + } | |
| 76 | + | |
| 77 | + TreeDO treeDO = treeMapper.selectByTreeNumber(createReqVO.getTreenumber()); | |
| 78 | + if (!ObjectUtils.isEmpty(treeDO)) { | |
| 79 | + throw exception(TREE_NUMBER_EXISTS); | |
| 80 | + } | |
| 81 | + | |
| 82 | + if (!StringUtils.hasText(tree.getTreenumber())) { | |
| 83 | + Long road = tree.getRoad(); | |
| 84 | + if (ObjectUtils.isEmpty(road)) { | |
| 85 | + throw new ServiceException(TREE_ROAD_NOT_EXISTS); | |
| 86 | + } | |
| 87 | + RoadDO roadDO = roadMapper.selectById(road); | |
| 88 | + String prefix = roadDO.getStreetId() + "-" + roadDO.getId() + "-" + roadDO.getDirection() + "-"; | |
| 89 | + Long sequence = redisTemplate.opsForValue().increment(CACHE_REPEAT_KEY + prefix); | |
| 90 | + String treeNum = prefix + String.format("%0" + 3 + "d", sequence); | |
| 91 | + tree.setStreet(roadDO.getStreetId()); | |
| 92 | + tree.setTreenumber(treeNum); | |
| 93 | + } | |
| 94 | + | |
| 95 | + TreeChangeLogDO changeLog = new TreeChangeLogDO(); | |
| 96 | + org.springframework.beans.BeanUtils.copyProperties(createReqVO, changeLog); | |
| 97 | + changeLog.setTreeid(createReqVO.getId()); | |
| 98 | + changeLog.setCreateby(createReqVO.getCreateby()); | |
| 99 | + changeLog.setCreatetime(LocalDateTime.now()); | |
| 100 | + changeLog.setUpdateby(createReqVO.getCreateby()); | |
| 101 | + changeLog.setUpdatetime(LocalDateTime.now()); | |
| 102 | + gardenTreeChangeLogMapper.insert(changeLog); | |
| 103 | + | |
| 104 | + treeMapper.insert(tree); | |
| 105 | + | |
| 106 | + // 返回 | |
| 107 | + return tree.getId(); | |
| 108 | + } | |
| 109 | + | |
| 110 | + @Override | |
| 111 | + public void updateTree(TreeSaveReqVO updateReqVO) { | |
| 112 | + // 校验存在 | |
| 113 | + TreeDO dbTree = validateTreeExists(updateReqVO.getId()); | |
| 114 | + if (!ObjectUtils.isEmpty(dbTree) && !dbTree.getTreenumber().equals(updateReqVO.getTreenumber())) { | |
| 115 | + TreeDO treeDO = treeMapper.selectByTreeNumber(updateReqVO.getTreenumber()); | |
| 116 | + if (!ObjectUtils.isEmpty(treeDO)) { | |
| 117 | + throw exception(TREE_NUMBER_EXISTS); | |
| 118 | + } | |
| 119 | + } | |
| 120 | + | |
| 121 | + // 更新 | |
| 122 | + TreeDO updateObj = BeanUtils.toBean(updateReqVO, TreeDO.class); | |
| 123 | + updateObj.imgToDomain(); | |
| 124 | + | |
| 125 | + if (ObjectUtils.isEmpty(updateReqVO.getStreet())) { | |
| 126 | + Long road = updateReqVO.getRoad(); | |
| 127 | + RoadDO roadDO = roadMapper.selectById(road); | |
| 128 | + updateObj.setStreet(roadDO.getStreetId()); | |
| 129 | + } | |
| 130 | + | |
| 131 | + treeMapper.updateById(updateObj); | |
| 132 | + | |
| 133 | + TreeChangeLogDO changeLog = new TreeChangeLogDO(); | |
| 134 | + org.springframework.beans.BeanUtils.copyProperties(updateObj, changeLog); | |
| 135 | + changeLog.setTreeid(updateObj.getId()); | |
| 136 | + changeLog.setCreateby(updateReqVO.getUpdateby()); | |
| 137 | + changeLog.setCreatetime(LocalDateTime.now()); | |
| 138 | + changeLog.setUpdateby(updateReqVO.getUpdateby()); | |
| 139 | + changeLog.setUpdatetime(LocalDateTime.now()); | |
| 140 | + gardenTreeChangeLogMapper.insert(changeLog); | |
| 141 | + } | |
| 142 | + | |
| 143 | + @Override | |
| 144 | + public void deleteTree(Long id) { | |
| 145 | + // 校验存在 | |
| 146 | + validateTreeExists(id); | |
| 147 | + // 删除 | |
| 148 | + treeMapper.deleteById(id); | |
| 149 | + } | |
| 150 | + | |
| 151 | + @Override | |
| 152 | + public void deleteTreeListByIds(List<Long> ids) { | |
| 153 | + // 删除 | |
| 154 | + treeMapper.deleteByIds(ids); | |
| 155 | + } | |
| 156 | + | |
| 157 | + | |
| 158 | + private TreeDO validateTreeExists(Long id) { | |
| 159 | + TreeDO treeDO = treeMapper.selectById(id); | |
| 160 | + if (treeDO == null) { | |
| 161 | + throw exception(TREE_NOT_EXISTS); | |
| 162 | + } | |
| 163 | + return treeDO; | |
| 164 | + } | |
| 165 | + | |
| 166 | + @Override | |
| 167 | + public TreeDO getTree(Long id) { | |
| 168 | + TreeDO treeDO = treeMapper.selectById(id); | |
| 169 | + if (!ObjectUtils.isEmpty(treeDO)) { | |
| 170 | + treeDO.domainToImg(); | |
| 171 | + } | |
| 172 | + return treeDO; | |
| 173 | + } | |
| 174 | + | |
| 175 | + @Override | |
| 176 | + public PageResult<TreeDO> getTreePage(TreePageReqVO pageReqVO) { | |
| 177 | + return treeMapper.selectPage(pageReqVO); | |
| 178 | + } | |
| 179 | + | |
| 180 | + @Override | |
| 181 | + public List<CompanyDeptRoadVO> getCompanyDeptRoadTreeData(TreeVO tree) { | |
| 182 | + List<DeptDO> sysDepts = deptMapper.selectList(); | |
| 183 | + | |
| 184 | + List<CompanyDeptRoadVO> companyDeptRoadVOS = treeMapper.selectCompanyDeptRoadTreeData(tree); | |
| 185 | + | |
| 186 | + | |
| 187 | + // 按公司分组所有部门 | |
| 188 | + Map<Long, List<DeptDO>> companyDeptsMap = sysDepts.stream() | |
| 189 | + .filter(d -> d.getParentId() != null) | |
| 190 | + .collect(Collectors.groupingBy(DeptDO::getParentId)); | |
| 191 | + | |
| 192 | + // 过滤出叶子部门(没有子部门的部门) | |
| 193 | + Map<Long, List<DeptDO>> companyLeafDeptsMap = new HashMap<>(); | |
| 194 | + for (Map.Entry<Long, List<DeptDO>> entry : companyDeptsMap.entrySet()) { | |
| 195 | + Long companyId = entry.getKey(); | |
| 196 | + List<DeptDO> depts = entry.getValue(); | |
| 197 | + | |
| 198 | + // 构建部门ID到部门的映射 | |
| 199 | + Map<Long, DeptDO> deptMap = depts.stream() | |
| 200 | + .collect(Collectors.toMap(DeptDO::getId, d -> d)); | |
| 201 | + | |
| 202 | + // 找出叶子部门(其parentId不在deptMap中的部门,或者其parentId为0的部门) | |
| 203 | + List<DeptDO> leafDepts = depts.stream() | |
| 204 | + .filter(d -> d.getParentId() == 0 || !deptMap.containsKey(d.getParentId())) | |
| 205 | + .collect(Collectors.toList()); | |
| 206 | + | |
| 207 | + companyLeafDeptsMap.put(companyId, leafDepts); | |
| 208 | + } | |
| 209 | + | |
| 210 | + // 建立现有结果的映射: 公司ID -> CompanyDeptRoadVO | |
| 211 | + Map<Long, CompanyDeptRoadVO> existingCompanyMap = companyDeptRoadVOS.stream() | |
| 212 | + .collect(Collectors.toMap( | |
| 213 | + CompanyDeptRoadVO::getCompanyId, | |
| 214 | + vo -> vo, | |
| 215 | + (existing, replacement) -> existing | |
| 216 | + )); | |
| 217 | + | |
| 218 | + // 遍历所有公司,补充缺失的公司和部门 | |
| 219 | + for (Map.Entry<Long, List<DeptDO>> entry : companyLeafDeptsMap.entrySet()) { | |
| 220 | + Long companyId = entry.getKey(); | |
| 221 | + List<DeptDO> depts = entry.getValue(); | |
| 222 | + | |
| 223 | + CompanyDeptRoadVO companyVO; | |
| 224 | + if (!existingCompanyMap.containsKey(companyId)) { | |
| 225 | + // 如果公司不存在,创建新的公司对象 | |
| 226 | + companyVO = new CompanyDeptRoadVO(); | |
| 227 | + companyVO.setCompanyId(companyId); | |
| 228 | + companyVO.setCompanyName(DictFrameworkUtils.parseDictDataValue("belongCompanyId", companyId + "")); | |
| 229 | + companyVO.setDepts(new ArrayList<>()); | |
| 230 | + companyDeptRoadVOS.add(companyVO); | |
| 231 | + } else { | |
| 232 | + companyVO = existingCompanyMap.get(companyId); | |
| 233 | + } | |
| 234 | + | |
| 235 | + // 建立该公司下已存在的部门映射: 部门ID -> DeptVO | |
| 236 | + Map<Long, CompanyDeptRoadVO.DeptVO> existingDeptMap = companyVO.getDepts().stream() | |
| 237 | + .collect(Collectors.toMap( | |
| 238 | + deptVO -> Long.valueOf(deptVO.getDeptId()), | |
| 239 | + deptVO -> deptVO, | |
| 240 | + (existing, replacement) -> existing | |
| 241 | + )); | |
| 242 | + | |
| 243 | + // 补充缺失的部门(仅叶子部门) | |
| 244 | + for (DeptDO sysDept : depts) { | |
| 245 | + Long deptId = sysDept.getId(); | |
| 246 | + if (!existingDeptMap.containsKey(deptId)) { | |
| 247 | + // 创建缺失的部门对象 | |
| 248 | + CompanyDeptRoadVO.DeptVO missingDept = new CompanyDeptRoadVO.DeptVO(); | |
| 249 | + missingDept.setDeptId(deptId); | |
| 250 | + missingDept.setDeptName(sysDept.getName()); | |
| 251 | + missingDept.setRoads(new ArrayList<>()); | |
| 252 | + companyVO.getDepts().add(missingDept); | |
| 253 | + } | |
| 254 | + } | |
| 255 | + } | |
| 256 | + return companyDeptRoadVOS; | |
| 257 | + } | |
| 258 | + | |
| 259 | + @Override | |
| 260 | + public PageResult<RoadTreeVO> getTreesByRoadId(TreePageReqVO pageReqVO) { | |
| 261 | + PageResult<TreeDO> treePage = this.getTreePage(pageReqVO); | |
| 262 | + List<RoadTreeVO> roadTreeVOS = treePage.getList().stream() | |
| 263 | + .map(treeDO -> { | |
| 264 | + RoadTreeVO roadTreeVO = new RoadTreeVO(); | |
| 265 | + BeanUtils.copyProperties(treeDO, roadTreeVO); | |
| 266 | + return roadTreeVO; | |
| 267 | + }) | |
| 268 | + .collect(Collectors.toList()); | |
| 269 | + return new PageResult<>(roadTreeVOS, treePage.getTotal()); | |
| 270 | + } | |
| 271 | + | |
| 272 | +} | |
| 0 | 273 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/treechangelog/TreeChangeLogService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.treechangelog; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | +import jakarta.validation.*; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.treechangelog.vo.*; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.treechangelog.TreeChangeLogDO; | |
| 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 TreeChangeLogService { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 创建一树一档案修改记录 | |
| 19 | + * | |
| 20 | + * @param createReqVO 创建信息 | |
| 21 | + * @return 编号 | |
| 22 | + */ | |
| 23 | + Long createTreeChangeLog(@Valid TreeChangeLogSaveReqVO createReqVO); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 更新一树一档案修改记录 | |
| 27 | + * | |
| 28 | + * @param updateReqVO 更新信息 | |
| 29 | + */ | |
| 30 | + void updateTreeChangeLog(@Valid TreeChangeLogSaveReqVO updateReqVO); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 删除一树一档案修改记录 | |
| 34 | + * | |
| 35 | + * @param id 编号 | |
| 36 | + */ | |
| 37 | + void deleteTreeChangeLog(Long id); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 批量删除一树一档案修改记录 | |
| 41 | + * | |
| 42 | + * @param ids 编号 | |
| 43 | + */ | |
| 44 | + void deleteTreeChangeLogListByIds(List<Long> ids); | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 获得一树一档案修改记录 | |
| 48 | + * | |
| 49 | + * @param id 编号 | |
| 50 | + * @return 一树一档案修改记录 | |
| 51 | + */ | |
| 52 | + TreeChangeLogDO getTreeChangeLog(Long id); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 获得一树一档案修改记录分页 | |
| 56 | + * | |
| 57 | + * @param pageReqVO 分页查询 | |
| 58 | + * @return 一树一档案修改记录分页 | |
| 59 | + */ | |
| 60 | + PageResult<TreeChangeLogDO> getTreeChangeLogPage(TreeChangeLogPageReqVO pageReqVO); | |
| 61 | + | |
| 62 | +} | |
| 0 | 63 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/treechangelog/TreeChangeLogServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.treechangelog; | |
| 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.treechangelog.vo.*; | |
| 11 | +import com.zteits.urbanops.module.garden.dal.dataobject.treechangelog.TreeChangeLogDO; | |
| 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.treechangelog.TreeChangeLogMapper; | |
| 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 TreeChangeLogServiceImpl implements TreeChangeLogService { | |
| 31 | + | |
| 32 | + @Resource | |
| 33 | + private TreeChangeLogMapper treeChangeLogMapper; | |
| 34 | + | |
| 35 | + @Override | |
| 36 | + public Long createTreeChangeLog(TreeChangeLogSaveReqVO createReqVO) { | |
| 37 | + // 插入 | |
| 38 | + TreeChangeLogDO treeChangeLog = BeanUtils.toBean(createReqVO, TreeChangeLogDO.class); | |
| 39 | + treeChangeLogMapper.insert(treeChangeLog); | |
| 40 | + | |
| 41 | + // 返回 | |
| 42 | + return treeChangeLog.getId(); | |
| 43 | + } | |
| 44 | + | |
| 45 | + @Override | |
| 46 | + public void updateTreeChangeLog(TreeChangeLogSaveReqVO updateReqVO) { | |
| 47 | + // 校验存在 | |
| 48 | + validateTreeChangeLogExists(updateReqVO.getId()); | |
| 49 | + // 更新 | |
| 50 | + TreeChangeLogDO updateObj = BeanUtils.toBean(updateReqVO, TreeChangeLogDO.class); | |
| 51 | + treeChangeLogMapper.updateById(updateObj); | |
| 52 | + } | |
| 53 | + | |
| 54 | + @Override | |
| 55 | + public void deleteTreeChangeLog(Long id) { | |
| 56 | + // 校验存在 | |
| 57 | + validateTreeChangeLogExists(id); | |
| 58 | + // 删除 | |
| 59 | + treeChangeLogMapper.deleteById(id); | |
| 60 | + } | |
| 61 | + | |
| 62 | + @Override | |
| 63 | + public void deleteTreeChangeLogListByIds(List<Long> ids) { | |
| 64 | + // 删除 | |
| 65 | + treeChangeLogMapper.deleteByIds(ids); | |
| 66 | + } | |
| 67 | + | |
| 68 | + | |
| 69 | + private void validateTreeChangeLogExists(Long id) { | |
| 70 | + if (treeChangeLogMapper.selectById(id) == null) { | |
| 71 | + throw exception(TREE_CHANGE_LOG_NOT_EXISTS); | |
| 72 | + } | |
| 73 | + } | |
| 74 | + | |
| 75 | + @Override | |
| 76 | + public TreeChangeLogDO getTreeChangeLog(Long id) { | |
| 77 | + return treeChangeLogMapper.selectById(id); | |
| 78 | + } | |
| 79 | + | |
| 80 | + @Override | |
| 81 | + public PageResult<TreeChangeLogDO> getTreeChangeLogPage(TreeChangeLogPageReqVO pageReqVO) { | |
| 82 | + PageResult<TreeChangeLogDO> pageResult = treeChangeLogMapper.selectPage(pageReqVO); | |
| 83 | + pageResult.getList().forEach(TreeChangeLogDO::domainToImg); | |
| 84 | + return pageResult; | |
| 85 | + } | |
| 86 | + | |
| 87 | +} | |
| 0 | 88 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/treerecord/GardenOldtreesService.java deleted
| 1 | -package com.zteits.urbanops.module.garden.service.treerecord; | |
| 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.dal.dataobject.treerecord.GardenOldtreesDO; | |
| 6 | - | |
| 7 | -import java.util.List; | |
| 8 | - | |
| 9 | -public interface GardenOldtreesService { | |
| 10 | - PageResult<GardenOldtreesDO> selectPage(PageParam pageParam, GardenOldtreesDO where); | |
| 11 | - List<GardenOldtreesDO> selectList(GardenOldtreesDO where); | |
| 12 | - GardenOldtreesDO selectById(String id); | |
| 13 | - Boolean insert(GardenOldtreesDO entity); | |
| 14 | - Boolean update(GardenOldtreesDO entity); | |
| 15 | - Boolean deleteByIds(List<String> ids); | |
| 16 | -} | |
| 17 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/treerecord/GardenOldtreesServiceImpl.java deleted
| 1 | -package com.zteits.urbanops.module.garden.service.treerecord; | |
| 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.dal.dataobject.treerecord.GardenOldtreesDO; | |
| 6 | -import com.zteits.urbanops.module.garden.dal.mysql.treerecord.GardenOldtreesMapper; | |
| 7 | -import jakarta.annotation.Resource; | |
| 8 | -import org.springframework.stereotype.Service; | |
| 9 | - | |
| 10 | -import java.util.List; | |
| 11 | - | |
| 12 | -@Service | |
| 13 | -public class GardenOldtreesServiceImpl implements GardenOldtreesService { | |
| 14 | - | |
| 15 | - @Resource | |
| 16 | - private GardenOldtreesMapper mapper; | |
| 17 | - | |
| 18 | - @Override | |
| 19 | - public PageResult<GardenOldtreesDO> selectPage(PageParam pageParam, GardenOldtreesDO where) { | |
| 20 | - return mapper.selectPage(pageParam, where); | |
| 21 | - } | |
| 22 | - | |
| 23 | - @Override | |
| 24 | - public List<GardenOldtreesDO> selectList(GardenOldtreesDO where) { | |
| 25 | - return mapper.selectList(new com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX<GardenOldtreesDO>() | |
| 26 | - .likeIfPresent(GardenOldtreesDO::getTreenumber, where.getTreenumber()) | |
| 27 | - .likeIfPresent(GardenOldtreesDO::getLatinname, where.getLatinname()) | |
| 28 | - .eqIfPresent(GardenOldtreesDO::getStreet, where.getStreet()) | |
| 29 | - .eqIfPresent(GardenOldtreesDO::getMaintainunit, where.getMaintainunit()) | |
| 30 | - .eqIfPresent(GardenOldtreesDO::getDeptId, where.getDeptId()) | |
| 31 | - .orderByDesc(GardenOldtreesDO::getUpdateTime)); | |
| 32 | - } | |
| 33 | - | |
| 34 | - @Override | |
| 35 | - public GardenOldtreesDO selectById(String id) { | |
| 36 | - return mapper.selectById(id); | |
| 37 | - } | |
| 38 | - | |
| 39 | - @Override | |
| 40 | - public Boolean insert(GardenOldtreesDO entity) { | |
| 41 | - return mapper.insert(entity) > 0; | |
| 42 | - } | |
| 43 | - | |
| 44 | - @Override | |
| 45 | - public Boolean update(GardenOldtreesDO entity) { | |
| 46 | - return mapper.updateById(entity) > 0; | |
| 47 | - } | |
| 48 | - | |
| 49 | - @Override | |
| 50 | - public Boolean deleteByIds(List<String> ids) { | |
| 51 | - return mapper.deleteBatchIds(ids) > 0; | |
| 52 | - } | |
| 53 | -} | |
| 54 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/treerecord/GardenTreeService.java deleted
| 1 | -package com.zteits.urbanops.module.garden.service.treerecord; | |
| 2 | - | |
| 3 | -import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 4 | -import com.zteits.urbanops.module.garden.dal.dataobject.treerecord.GardenTreeDO; | |
| 5 | - | |
| 6 | -import java.util.List; | |
| 7 | - | |
| 8 | -public interface GardenTreeService { | |
| 9 | - PageResult<GardenTreeDO> selectPage(GardenTreeDO where, Integer pageNo, Integer pageSize); | |
| 10 | - GardenTreeDO selectById(Long id); | |
| 11 | - Boolean insert(GardenTreeDO entity); | |
| 12 | - Boolean update(GardenTreeDO entity); | |
| 13 | - Boolean deleteById(Long id); | |
| 14 | - Boolean deleteByIds(List<Long> ids); | |
| 15 | - | |
| 16 | - java.util.List<com.zteits.urbanops.module.garden.controller.admin.treerecord.vo.CompanyDeptRoadVO> getCompanyDeptRoadTreeData(Long belongCompanyId, String roadName, Long deptId); | |
| 17 | - | |
| 18 | - java.util.List<com.zteits.urbanops.module.garden.controller.admin.treerecord.vo.RoadTreeVO> getTreesByRoadId(Long road); | |
| 19 | -} | |
| 20 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/treerecord/GardenTreeServiceImpl.java deleted
| 1 | -package com.zteits.urbanops.module.garden.service.treerecord; | |
| 2 | - | |
| 3 | -import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 4 | -import com.zteits.urbanops.module.garden.dal.dataobject.treerecord.GardenTreeDO; | |
| 5 | -import com.zteits.urbanops.module.garden.dal.mysql.treerecord.GardenTreeMapper; | |
| 6 | -import com.zteits.urbanops.module.garden.controller.admin.treerecord.vo.CompanyDeptRoadVO; | |
| 7 | -import com.zteits.urbanops.module.garden.controller.admin.treerecord.vo.RoadTreeVO; | |
| 8 | -import jakarta.annotation.Resource; | |
| 9 | -import org.springframework.stereotype.Service; | |
| 10 | - | |
| 11 | -import java.util.List; | |
| 12 | -import java.util.ArrayList; | |
| 13 | -import java.util.Map; | |
| 14 | -import java.util.stream.Collectors; | |
| 15 | - | |
| 16 | -@Service | |
| 17 | -public class GardenTreeServiceImpl implements GardenTreeService { | |
| 18 | - | |
| 19 | - @Resource | |
| 20 | - private GardenTreeMapper gardenTreeMapper; | |
| 21 | - | |
| 22 | - @Override | |
| 23 | - public PageResult<GardenTreeDO> selectPage(GardenTreeDO where, Integer pageNo, Integer pageSize) { | |
| 24 | - com.zteits.urbanops.framework.common.pojo.PageParam pageParam = new com.zteits.urbanops.framework.common.pojo.PageParam(); | |
| 25 | - pageParam.setPageNo(pageNo); | |
| 26 | - pageParam.setPageSize(pageSize); | |
| 27 | - return gardenTreeMapper.selectPage(pageParam, where); | |
| 28 | - } | |
| 29 | - | |
| 30 | - @Override | |
| 31 | - public GardenTreeDO selectById(Long id) { | |
| 32 | - return gardenTreeMapper.selectById(id); | |
| 33 | - } | |
| 34 | - | |
| 35 | - @Override | |
| 36 | - public Boolean insert(GardenTreeDO entity) { | |
| 37 | - return gardenTreeMapper.insert(entity) > 0; | |
| 38 | - } | |
| 39 | - | |
| 40 | - @Override | |
| 41 | - public Boolean update(GardenTreeDO entity) { | |
| 42 | - return gardenTreeMapper.updateById(entity) > 0; | |
| 43 | - } | |
| 44 | - | |
| 45 | - @Override | |
| 46 | - public Boolean deleteById(Long id) { | |
| 47 | - return gardenTreeMapper.deleteById(id) > 0; | |
| 48 | - } | |
| 49 | - | |
| 50 | - @Override | |
| 51 | - public Boolean deleteByIds(List<Long> ids) { | |
| 52 | - return gardenTreeMapper.deleteBatchIds(ids) > 0; | |
| 53 | - } | |
| 54 | - | |
| 55 | - @Override | |
| 56 | - public List<CompanyDeptRoadVO> getCompanyDeptRoadTreeData(Long belongCompanyId, String roadName, Long deptId) { | |
| 57 | - List<GardenTreeMapper.CompanyDeptRoadRow> rows = gardenTreeMapper.selectCompanyDeptRoadRows(); | |
| 58 | - Map<String, List<GardenTreeMapper.CompanyDeptRoadRow>> byCompany = rows.stream().collect(Collectors.groupingBy(r -> r.companyId)); | |
| 59 | - List<CompanyDeptRoadVO> result = new ArrayList<>(); | |
| 60 | - for (Map.Entry<String, List<GardenTreeMapper.CompanyDeptRoadRow>> entry : byCompany.entrySet()) { | |
| 61 | - CompanyDeptRoadVO company = new CompanyDeptRoadVO(); | |
| 62 | - company.setCompanyId(entry.getKey()); | |
| 63 | - company.setCompanyName(entry.getValue().get(0).companyName); | |
| 64 | - Map<Long, List<GardenTreeMapper.CompanyDeptRoadRow>> byDept = entry.getValue().stream().collect(Collectors.groupingBy(r -> r.deptId)); | |
| 65 | - List<CompanyDeptRoadVO.DeptVO> deptList = new ArrayList<>(); | |
| 66 | - for (Map.Entry<Long, List<GardenTreeMapper.CompanyDeptRoadRow>> d : byDept.entrySet()) { | |
| 67 | - CompanyDeptRoadVO.DeptVO dept = new CompanyDeptRoadVO.DeptVO(); | |
| 68 | - dept.setDeptId(d.getKey()); | |
| 69 | - dept.setDeptName(d.getValue().get(0).deptName); | |
| 70 | - List<CompanyDeptRoadVO.RoadVO> roads = new ArrayList<>(); | |
| 71 | - for (GardenTreeMapper.CompanyDeptRoadRow r : d.getValue()) { | |
| 72 | - CompanyDeptRoadVO.RoadVO roadVO = new CompanyDeptRoadVO.RoadVO(); | |
| 73 | - roadVO.setRoadId(r.roadId); | |
| 74 | - roadVO.setRoadName(r.roadName); | |
| 75 | - roadVO.setTreeCount(r.treeCount); | |
| 76 | - roadVO.setRecordedCount(r.recordedCount); | |
| 77 | - roadVO.setStartRemark(r.startRemark); | |
| 78 | - roadVO.setEndRemark(r.endRemark); | |
| 79 | - roads.add(roadVO); | |
| 80 | - } | |
| 81 | - dept.setRoads(roads); | |
| 82 | - deptList.add(dept); | |
| 83 | - } | |
| 84 | - company.setDepts(deptList); | |
| 85 | - result.add(company); | |
| 86 | - } | |
| 87 | - return result; | |
| 88 | - } | |
| 89 | - | |
| 90 | - @Override | |
| 91 | - public List<RoadTreeVO> getTreesByRoadId(Long road) { | |
| 92 | - return gardenTreeMapper.selectTreesByRoadId(road); | |
| 93 | - } | |
| 94 | -} | |
| 95 | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/resources/mapper/oldtrees/OldtreesMapper.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.oldtrees.OldtreesMapper"> | |
| 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/oldtreeschangelog/OldtreesChangeLogMapper.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.oldtreeschangelog.OldtreesChangeLogMapper"> | |
| 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/tree/TreeMapper.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.tree.TreeMapper"> | |
| 4 | + | |
| 5 | + <!-- | |
| 6 | + 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 | |
| 7 | + 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 | |
| 8 | + 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 | |
| 9 | + 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ | |
| 10 | + --> | |
| 11 | + | |
| 12 | + <resultMap id="CompanyDeptRoadMap" type="com.zteits.urbanops.module.garden.controller.admin.tree.vo.CompanyDeptRoadVO"> | |
| 13 | + <id property="companyId" column="companyId"/> | |
| 14 | + <result property="companyName" column="companyName"/> | |
| 15 | + <collection property="depts" ofType="com.zteits.urbanops.module.garden.controller.admin.tree.vo.CompanyDeptRoadVO$DeptVO"> | |
| 16 | + <id property="deptId" column="deptId"/> | |
| 17 | + <result property="deptName" column="deptName"/> | |
| 18 | + <collection property="roads" ofType="com.zteits.urbanops.module.garden.controller.admin.tree.vo.CompanyDeptRoadVO$RoadVO"> | |
| 19 | + <id property="roadId" column="roadId"/> | |
| 20 | + <result property="roadName" column="roadName"/> | |
| 21 | + <result property="treeCount" column="treeCount"/> | |
| 22 | + <result property="recordedCount" column="recordedCount"/> | |
| 23 | + <result property="startRemark" column="startRemark"/> | |
| 24 | + <result property="endRemark" column="endRemark"/> | |
| 25 | + </collection> | |
| 26 | + </collection> | |
| 27 | + </resultMap> | |
| 28 | + | |
| 29 | + <select id="selectCompanyDeptRoadTreeData" resultMap="CompanyDeptRoadMap"> | |
| 30 | + SELECT | |
| 31 | + c.id AS companyId, | |
| 32 | + c.name AS companyName, | |
| 33 | + d.id AS deptId, | |
| 34 | + d.name AS deptName, | |
| 35 | + r.id AS roadId, | |
| 36 | + r.road_name AS roadName, | |
| 37 | + r.starting_remark AS startRemark, | |
| 38 | + r.end_remark AS endRemark, | |
| 39 | + COALESCE(r.tree_area, 0) AS treeCount, | |
| 40 | + COUNT(t.id) AS recordedCount | |
| 41 | + FROM system_dept c | |
| 42 | + JOIN system_dept d ON d.parent_id = c.id AND d.status = 0 | |
| 43 | + LEFT JOIN garden_road r ON d.id = r.dept_id | |
| 44 | + LEFT JOIN garden_tree t ON r.id = t.road AND t.deleted = 0 | |
| 45 | + WHERE | |
| 46 | + c.status = 0 | |
| 47 | + AND d.id NOT IN (SELECT DISTINCT parent_id FROM system_dept WHERE parent_id IS NOT NULL) | |
| 48 | + <if test="belongCompanyId != null"> | |
| 49 | + AND d.parent_id = #{belongCompanyId} | |
| 50 | + </if> | |
| 51 | + <if test="roadName != null and roadName != ''"> | |
| 52 | + AND r.road_name LIKE CONCAT('%', #{roadName}, '%') | |
| 53 | + </if> | |
| 54 | + <if test="deptId != null"> | |
| 55 | + AND d.id = #{deptId} | |
| 56 | + </if> | |
| 57 | + GROUP BY c.id, d.id, | |
| 58 | + r.id, r.road_name, r.starting_remark, r.end_remark, r.tree_area | |
| 59 | + ORDER BY treeCount DESC, recordedCount DESC; | |
| 60 | + </select> | |
| 61 | +</mapper> | |
| 0 | 62 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/resources/mapper/treechangelog/TreeChangeLogMapper.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.treechangelog.TreeChangeLogMapper"> | |
| 4 | + | |
| 5 | + <!-- | |
| 6 | + 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 | |
| 7 | + 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 | |
| 8 | + 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 | |
| 9 | + 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ | |
| 10 | + --> | |
| 11 | + | |
| 12 | +</mapper> | |
| 0 | 13 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/pom.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" | |
| 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 4 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| 5 | + <modelVersion>4.0.0</modelVersion> | |
| 6 | + <parent> | |
| 7 | + <groupId>com.zteits.boot</groupId> | |
| 8 | + <artifactId>urbanops</artifactId> | |
| 9 | + <version>${revision}</version> <!-- 1. 修改 version 为 ${revision} --> | |
| 10 | + </parent> | |
| 11 | + | |
| 12 | + <artifactId>urbanops-module-workorder</artifactId> | |
| 13 | + <packaging>jar</packaging> <!-- 2. 新增 packaging 为 jar --> | |
| 14 | + <name>${project.artifactId}</name> <!-- 3. 新增 name 为 ${project.artifactId} --> | |
| 15 | + | |
| 16 | + <description> | |
| 17 | + 工单管理模块 园林 市政 物业 | |
| 18 | + </description> | |
| 19 | + | |
| 20 | + <dependencies> | |
| 21 | + <!-- 业务组件 --> | |
| 22 | + <dependency> | |
| 23 | + <groupId>com.zteits.boot</groupId> | |
| 24 | + <artifactId>urbanops-spring-boot-starter-biz-tenant</artifactId> | |
| 25 | + </dependency> | |
| 26 | + | |
| 27 | + <!-- Web 相关 --> | |
| 28 | + <dependency> | |
| 29 | + <groupId>com.zteits.boot</groupId> | |
| 30 | + <artifactId>urbanops-spring-boot-starter-security</artifactId> | |
| 31 | + </dependency> | |
| 32 | + | |
| 33 | + <dependency> | |
| 34 | + <groupId>com.zteits.boot</groupId> | |
| 35 | + <artifactId>urbanops-spring-boot-starter-websocket</artifactId> | |
| 36 | + </dependency> | |
| 37 | + | |
| 38 | + <!-- DB 相关 --> | |
| 39 | + <dependency> | |
| 40 | + <groupId>com.zteits.boot</groupId> | |
| 41 | + <artifactId>urbanops-spring-boot-starter-mybatis</artifactId> | |
| 42 | + </dependency> | |
| 43 | + <dependency> | |
| 44 | + <groupId>com.baomidou</groupId> | |
| 45 | + <artifactId>mybatis-plus-generator</artifactId> <!-- 代码生成器,使用它解析表结构 --> | |
| 46 | + </dependency> | |
| 47 | + | |
| 48 | + <dependency> | |
| 49 | + <groupId>com.zteits.boot</groupId> | |
| 50 | + <artifactId>urbanops-spring-boot-starter-redis</artifactId> | |
| 51 | + </dependency> | |
| 52 | + | |
| 53 | + <!-- Config 配置中心相关 --> | |
| 54 | + | |
| 55 | + <!-- Job 定时任务相关 --> | |
| 56 | + <dependency> | |
| 57 | + <groupId>com.zteits.boot</groupId> | |
| 58 | + <artifactId>urbanops-spring-boot-starter-job</artifactId> | |
| 59 | + </dependency> | |
| 60 | + | |
| 61 | + <!-- 消息队列相关 --> | |
| 62 | + <dependency> | |
| 63 | + <groupId>com.zteits.boot</groupId> | |
| 64 | + <artifactId>urbanops-spring-boot-starter-mq</artifactId> | |
| 65 | + </dependency> | |
| 66 | + | |
| 67 | + <!-- Test 测试相关 --> | |
| 68 | + <dependency> | |
| 69 | + <groupId>com.zteits.boot</groupId> | |
| 70 | + <artifactId>urbanops-spring-boot-starter-test</artifactId> | |
| 71 | + <scope>test</scope> | |
| 72 | + </dependency> | |
| 73 | + | |
| 74 | + <!-- 工具类相关 --> | |
| 75 | + <dependency> | |
| 76 | + <groupId>com.zteits.boot</groupId> | |
| 77 | + <artifactId>urbanops-spring-boot-starter-excel</artifactId> | |
| 78 | + </dependency> | |
| 79 | + | |
| 80 | + <dependency> | |
| 81 | + <groupId>org.apache.velocity</groupId> | |
| 82 | + <artifactId>velocity-engine-core</artifactId> <!-- 实现代码生成 --> | |
| 83 | + </dependency> | |
| 84 | + | |
| 85 | + <!-- OkHttp 用于设备接口对接 --> | |
| 86 | + <dependency> | |
| 87 | + <groupId>com.squareup.okhttp3</groupId> | |
| 88 | + <artifactId>okhttp</artifactId> | |
| 89 | + <version>3.14.9</version> | |
| 90 | + </dependency> | |
| 91 | + | |
| 92 | + <!-- 监控相关 --> | |
| 93 | + <dependency> | |
| 94 | + <groupId>com.zteits.boot</groupId> | |
| 95 | + <artifactId>urbanops-spring-boot-starter-monitor</artifactId> | |
| 96 | + </dependency> | |
| 97 | + | |
| 98 | + <dependency> | |
| 99 | + <groupId>de.codecentric</groupId> | |
| 100 | + <artifactId>spring-boot-admin-starter-server</artifactId> <!-- 实现 Spring Boot Admin Server 服务端 --> | |
| 101 | + <optional>true</optional> | |
| 102 | + </dependency> | |
| 103 | + | |
| 104 | + <!-- 三方云服务相关 --> | |
| 105 | + <dependency> | |
| 106 | + <groupId>commons-net</groupId> | |
| 107 | + <artifactId>commons-net</artifactId> <!-- 文件客户端:解决 ftp 连接 --> | |
| 108 | + </dependency> | |
| 109 | + <dependency> | |
| 110 | + <groupId>com.github.mwiede</groupId> | |
| 111 | + <artifactId>jsch</artifactId> <!-- 文件客户端:解决 sftp 连接 --> | |
| 112 | + </dependency> | |
| 113 | + <!-- 文件客户端:解决阿里云、腾讯云、minio 等 S3 连接 --> | |
| 114 | + <dependency> | |
| 115 | + <groupId>software.amazon.awssdk</groupId> | |
| 116 | + <artifactId>s3</artifactId> | |
| 117 | + </dependency> | |
| 118 | + | |
| 119 | + <dependency> | |
| 120 | + <groupId>org.apache.tika</groupId> | |
| 121 | + <artifactId>tika-core</artifactId> <!-- 文件客户端:文件类型的识别 --> | |
| 122 | + </dependency> | |
| 123 | + | |
| 124 | + <dependency> | |
| 125 | + <groupId>com.zteits.boot</groupId> | |
| 126 | + <artifactId>urbanops-module-system</artifactId> | |
| 127 | + <version>${revision}</version> | |
| 128 | + </dependency> | |
| 129 | + </dependencies> | |
| 130 | + | |
| 131 | +</project> | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/attachment/AttachmentController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.attachment; | |
| 2 | + | |
| 3 | +import org.springframework.web.bind.annotation.*; | |
| 4 | +import jakarta.annotation.Resource; | |
| 5 | +import org.springframework.validation.annotation.Validated; | |
| 6 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 7 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 8 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 9 | +import io.swagger.v3.oas.annotations.Operation; | |
| 10 | + | |
| 11 | +import jakarta.validation.constraints.*; | |
| 12 | +import jakarta.validation.*; | |
| 13 | +import jakarta.servlet.http.*; | |
| 14 | +import java.util.*; | |
| 15 | +import java.io.IOException; | |
| 16 | + | |
| 17 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 18 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 19 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 20 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 21 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 22 | + | |
| 23 | +import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; | |
| 24 | + | |
| 25 | +import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; | |
| 26 | +import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.*; | |
| 27 | + | |
| 28 | +import com.zteits.urbanops.module.workorder.controller.admin.attachment.vo.*; | |
| 29 | +import com.zteits.urbanops.module.workorder.dal.dataobject.attachment.AttachmentDO; | |
| 30 | +import com.zteits.urbanops.module.workorder.service.attachment.AttachmentService; | |
| 31 | + | |
| 32 | +@Tag(name = "管理后台 - 工单附件信息") | |
| 33 | +@RestController | |
| 34 | +@RequestMapping("/workorder/attachment") | |
| 35 | +@Validated | |
| 36 | +public class AttachmentController { | |
| 37 | + | |
| 38 | + @Resource | |
| 39 | + private AttachmentService attachmentService; | |
| 40 | + | |
| 41 | + @PostMapping("/create") | |
| 42 | + @Operation(summary = "创建工单附件信息") | |
| 43 | + @PreAuthorize("@ss.hasPermission('workorder:attachment:create')") | |
| 44 | + public CommonResult<Long> createAttachment(@Valid @RequestBody AttachmentSaveReqVO createReqVO) { | |
| 45 | + return success(attachmentService.createAttachment(createReqVO)); | |
| 46 | + } | |
| 47 | + | |
| 48 | + @PutMapping("/update") | |
| 49 | + @Operation(summary = "更新工单附件信息") | |
| 50 | + @PreAuthorize("@ss.hasPermission('workorder:attachment:update')") | |
| 51 | + public CommonResult<Boolean> updateAttachment(@Valid @RequestBody AttachmentSaveReqVO updateReqVO) { | |
| 52 | + attachmentService.updateAttachment(updateReqVO); | |
| 53 | + return success(true); | |
| 54 | + } | |
| 55 | + | |
| 56 | + @DeleteMapping("/delete") | |
| 57 | + @Operation(summary = "删除工单附件信息") | |
| 58 | + @Parameter(name = "id", description = "编号", required = true) | |
| 59 | + @PreAuthorize("@ss.hasPermission('workorder:attachment:delete')") | |
| 60 | + public CommonResult<Boolean> deleteAttachment(@RequestParam("id") Long id) { | |
| 61 | + attachmentService.deleteAttachment(id); | |
| 62 | + return success(true); | |
| 63 | + } | |
| 64 | + | |
| 65 | + @DeleteMapping("/delete-list") | |
| 66 | + @Parameter(name = "ids", description = "编号", required = true) | |
| 67 | + @Operation(summary = "批量删除工单附件信息") | |
| 68 | + @PreAuthorize("@ss.hasPermission('workorder:attachment:delete')") | |
| 69 | + public CommonResult<Boolean> deleteAttachmentList(@RequestParam("ids") List<Long> ids) { | |
| 70 | + attachmentService.deleteAttachmentListByIds(ids); | |
| 71 | + return success(true); | |
| 72 | + } | |
| 73 | + | |
| 74 | + @GetMapping("/get") | |
| 75 | + @Operation(summary = "获得工单附件信息") | |
| 76 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | |
| 77 | + @PreAuthorize("@ss.hasPermission('workorder:attachment:query')") | |
| 78 | + public CommonResult<AttachmentRespVO> getAttachment(@RequestParam("id") Long id) { | |
| 79 | + AttachmentDO attachment = attachmentService.getAttachment(id); | |
| 80 | + return success(BeanUtils.toBean(attachment, AttachmentRespVO.class)); | |
| 81 | + } | |
| 82 | + | |
| 83 | + @GetMapping("/page") | |
| 84 | + @Operation(summary = "获得工单附件信息分页") | |
| 85 | + @PreAuthorize("@ss.hasPermission('workorder:attachment:query')") | |
| 86 | + public CommonResult<PageResult<AttachmentRespVO>> getAttachmentPage(@Valid AttachmentPageReqVO pageReqVO) { | |
| 87 | + PageResult<AttachmentDO> pageResult = attachmentService.getAttachmentPage(pageReqVO); | |
| 88 | + return success(BeanUtils.toBean(pageResult, AttachmentRespVO.class)); | |
| 89 | + } | |
| 90 | + | |
| 91 | + @GetMapping("/export-excel") | |
| 92 | + @Operation(summary = "导出工单附件信息 Excel") | |
| 93 | + @PreAuthorize("@ss.hasPermission('workorder:attachment:export')") | |
| 94 | + @ApiAccessLog(operateType = EXPORT) | |
| 95 | + public void exportAttachmentExcel(@Valid AttachmentPageReqVO pageReqVO, | |
| 96 | + HttpServletResponse response) throws IOException { | |
| 97 | + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 98 | + List<AttachmentDO> list = attachmentService.getAttachmentPage(pageReqVO).getList(); | |
| 99 | + // 导出 Excel | |
| 100 | + ExcelUtils.write(response, "工单附件信息.xls", "数据", AttachmentRespVO.class, | |
| 101 | + BeanUtils.toBean(list, AttachmentRespVO.class)); | |
| 102 | + } | |
| 103 | + | |
| 104 | +} | |
| 0 | 105 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/attachment/vo/AttachmentPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.attachment.vo; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import java.util.*; | |
| 5 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 6 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 7 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 8 | +import java.time.LocalDateTime; | |
| 9 | + | |
| 10 | +import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | |
| 11 | + | |
| 12 | +@Schema(description = "管理后台 - 工单附件信息分页 Request VO") | |
| 13 | +@Data | |
| 14 | +public class AttachmentPageReqVO extends PageParam { | |
| 15 | + | |
| 16 | + @Schema(description = "工单号") | |
| 17 | + private String orderNo; | |
| 18 | + | |
| 19 | + @Schema(description = "业务线:yl 园林,wy 物业,sz 市政 ") | |
| 20 | + private String busiLine; | |
| 21 | + | |
| 22 | + @Schema(description = "业务类型:01 问题图片,02 街道图片,03 选景图片", example = "1") | |
| 23 | + private String busiType; | |
| 24 | + | |
| 25 | + @Schema(description = "文件名称") | |
| 26 | + private String fileNames; | |
| 27 | + | |
| 28 | + @Schema(description = "路径", example = "https://www.iocoder.cn") | |
| 29 | + private String hostUrl; | |
| 30 | + | |
| 31 | + @Schema(description = "文件大小") | |
| 32 | + private String fileSize; | |
| 33 | + | |
| 34 | + @Schema(description = "文件类型", example = "2") | |
| 35 | + private String contentType; | |
| 36 | + | |
| 37 | + @Schema(description = "描述", example = "你说的对") | |
| 38 | + private String remark; | |
| 39 | + | |
| 40 | + @Schema(description = "创建时间") | |
| 41 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 42 | + private LocalDateTime[] createTime; | |
| 43 | + | |
| 44 | +} | |
| 0 | 45 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/attachment/vo/AttachmentRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.attachment.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.*; | |
| 5 | +import java.util.*; | |
| 6 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 7 | +import java.time.LocalDateTime; | |
| 8 | +import cn.idev.excel.annotation.*; | |
| 9 | + | |
| 10 | +@Schema(description = "管理后台 - 工单附件信息 Response VO") | |
| 11 | +@Data | |
| 12 | +@ExcelIgnoreUnannotated | |
| 13 | +public class AttachmentRespVO { | |
| 14 | + | |
| 15 | + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "4728") | |
| 16 | + @ExcelProperty("ID") | |
| 17 | + private Long id; | |
| 18 | + | |
| 19 | + @Schema(description = "工单号", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 20 | + @ExcelProperty("工单号") | |
| 21 | + private String orderNo; | |
| 22 | + | |
| 23 | + @Schema(description = "业务线:yl 园林,wy 物业,sz 市政 ", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 24 | + @ExcelProperty("业务线:yl 园林,wy 物业,sz 市政 ") | |
| 25 | + private String busiLine; | |
| 26 | + | |
| 27 | + @Schema(description = "业务类型:01 问题图片,02 街道图片,03 选景图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | |
| 28 | + @ExcelProperty("业务类型:01 问题图片,02 街道图片,03 选景图片") | |
| 29 | + private String busiType; | |
| 30 | + | |
| 31 | + @Schema(description = "文件名称") | |
| 32 | + @ExcelProperty("文件名称") | |
| 33 | + private String fileNames; | |
| 34 | + | |
| 35 | + @Schema(description = "路径", example = "https://www.iocoder.cn") | |
| 36 | + @ExcelProperty("路径") | |
| 37 | + private String hostUrl; | |
| 38 | + | |
| 39 | + @Schema(description = "文件大小") | |
| 40 | + @ExcelProperty("文件大小") | |
| 41 | + private String fileSize; | |
| 42 | + | |
| 43 | + @Schema(description = "文件类型", example = "2") | |
| 44 | + @ExcelProperty("文件类型") | |
| 45 | + private String contentType; | |
| 46 | + | |
| 47 | + @Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对") | |
| 48 | + @ExcelProperty("描述") | |
| 49 | + private String remark; | |
| 50 | + | |
| 51 | + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 52 | + @ExcelProperty("创建时间") | |
| 53 | + private LocalDateTime createTime; | |
| 54 | + | |
| 55 | +} | |
| 0 | 56 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/attachment/vo/AttachmentSaveReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.attachment.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.*; | |
| 5 | +import java.util.*; | |
| 6 | +import jakarta.validation.constraints.*; | |
| 7 | + | |
| 8 | +@Schema(description = "管理后台 - 工单附件信息新增/修改 Request VO") | |
| 9 | +@Data | |
| 10 | +public class AttachmentSaveReqVO { | |
| 11 | + | |
| 12 | + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "4728") | |
| 13 | + private Long id; | |
| 14 | + | |
| 15 | + @Schema(description = "工单号", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 16 | + @NotEmpty(message = "工单号不能为空") | |
| 17 | + private String orderNo; | |
| 18 | + | |
| 19 | + @Schema(description = "业务线:yl 园林,wy 物业,sz 市政 ", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 20 | + @NotEmpty(message = "业务线:yl 园林,wy 物业,sz 市政 不能为空") | |
| 21 | + private String busiLine; | |
| 22 | + | |
| 23 | + @Schema(description = "业务类型:01 问题图片,02 街道图片,03 选景图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | |
| 24 | + @NotEmpty(message = "业务类型:01 问题图片,02 街道图片,03 选景图片不能为空") | |
| 25 | + private String busiType; | |
| 26 | + | |
| 27 | + @Schema(description = "文件名称") | |
| 28 | + private String fileNames; | |
| 29 | + | |
| 30 | + @Schema(description = "路径", example = "https://www.iocoder.cn") | |
| 31 | + private String hostUrl; | |
| 32 | + | |
| 33 | + @Schema(description = "文件大小") | |
| 34 | + private String fileSize; | |
| 35 | + | |
| 36 | + @Schema(description = "文件类型", example = "2") | |
| 37 | + private String contentType; | |
| 38 | + | |
| 39 | + @Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对") | |
| 40 | + @NotEmpty(message = "描述不能为空") | |
| 41 | + private String remark; | |
| 42 | + | |
| 43 | +} | |
| 0 | 44 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/maininfo/MainInfoController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.maininfo; | |
| 2 | + | |
| 3 | +import org.springframework.web.bind.annotation.*; | |
| 4 | +import jakarta.annotation.Resource; | |
| 5 | +import org.springframework.validation.annotation.Validated; | |
| 6 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 7 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 8 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 9 | +import io.swagger.v3.oas.annotations.Operation; | |
| 10 | + | |
| 11 | +import jakarta.validation.constraints.*; | |
| 12 | +import jakarta.validation.*; | |
| 13 | +import jakarta.servlet.http.*; | |
| 14 | +import java.util.*; | |
| 15 | +import java.io.IOException; | |
| 16 | + | |
| 17 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 18 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 19 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 20 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 21 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 22 | + | |
| 23 | +import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; | |
| 24 | + | |
| 25 | +import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; | |
| 26 | +import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.*; | |
| 27 | + | |
| 28 | +import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.*; | |
| 29 | +import com.zteits.urbanops.module.workorder.dal.dataobject.maininfo.MainInfoDO; | |
| 30 | +import com.zteits.urbanops.module.workorder.service.maininfo.MainInfoService; | |
| 31 | + | |
| 32 | +@Tag(name = "管理后台 - 工单信息") | |
| 33 | +@RestController | |
| 34 | +@RequestMapping("/workorder/main-info") | |
| 35 | +@Validated | |
| 36 | +public class MainInfoController { | |
| 37 | + | |
| 38 | + @Resource | |
| 39 | + private MainInfoService mainInfoService; | |
| 40 | + | |
| 41 | + @PostMapping("/create") | |
| 42 | + @Operation(summary = "创建工单信息") | |
| 43 | + @PreAuthorize("@ss.hasPermission('workorder:main-info:create')") | |
| 44 | + public CommonResult<Long> createMainInfo(@Valid @RequestBody MainInfoSaveReqVO createReqVO) { | |
| 45 | + return success(mainInfoService.createMainInfo(createReqVO)); | |
| 46 | + } | |
| 47 | + | |
| 48 | + @PutMapping("/update") | |
| 49 | + @Operation(summary = "更新工单信息") | |
| 50 | + @PreAuthorize("@ss.hasPermission('workorder:main-info:update')") | |
| 51 | + public CommonResult<Boolean> updateMainInfo(@Valid @RequestBody MainInfoSaveReqVO updateReqVO) { | |
| 52 | + mainInfoService.updateMainInfo(updateReqVO); | |
| 53 | + return success(true); | |
| 54 | + } | |
| 55 | + | |
| 56 | + @DeleteMapping("/delete") | |
| 57 | + @Operation(summary = "删除工单信息") | |
| 58 | + @Parameter(name = "id", description = "编号", required = true) | |
| 59 | + @PreAuthorize("@ss.hasPermission('workorder:main-info:delete')") | |
| 60 | + public CommonResult<Boolean> deleteMainInfo(@RequestParam("id") Long id) { | |
| 61 | + mainInfoService.deleteMainInfo(id); | |
| 62 | + return success(true); | |
| 63 | + } | |
| 64 | + | |
| 65 | + @DeleteMapping("/delete-list") | |
| 66 | + @Parameter(name = "ids", description = "编号", required = true) | |
| 67 | + @Operation(summary = "批量删除工单信息") | |
| 68 | + @PreAuthorize("@ss.hasPermission('workorder:main-info:delete')") | |
| 69 | + public CommonResult<Boolean> deleteMainInfoList(@RequestParam("ids") List<Long> ids) { | |
| 70 | + mainInfoService.deleteMainInfoListByIds(ids); | |
| 71 | + return success(true); | |
| 72 | + } | |
| 73 | + | |
| 74 | + @GetMapping("/get") | |
| 75 | + @Operation(summary = "获得工单信息") | |
| 76 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | |
| 77 | + @PreAuthorize("@ss.hasPermission('workorder:main-info:query')") | |
| 78 | + public CommonResult<MainInfoRespVO> getMainInfo(@RequestParam("id") Long id) { | |
| 79 | + MainInfoDO mainInfo = mainInfoService.getMainInfo(id); | |
| 80 | + return success(BeanUtils.toBean(mainInfo, MainInfoRespVO.class)); | |
| 81 | + } | |
| 82 | + | |
| 83 | + @GetMapping("/page") | |
| 84 | + @Operation(summary = "获得工单信息分页") | |
| 85 | + @PreAuthorize("@ss.hasPermission('workorder:main-info:query')") | |
| 86 | + public CommonResult<PageResult<MainInfoRespVO>> getMainInfoPage(@Valid MainInfoPageReqVO pageReqVO) { | |
| 87 | + PageResult<MainInfoDO> pageResult = mainInfoService.getMainInfoPage(pageReqVO); | |
| 88 | + return success(BeanUtils.toBean(pageResult, MainInfoRespVO.class)); | |
| 89 | + } | |
| 90 | + | |
| 91 | + @GetMapping("/export-excel") | |
| 92 | + @Operation(summary = "导出工单信息 Excel") | |
| 93 | + @PreAuthorize("@ss.hasPermission('workorder:main-info:export')") | |
| 94 | + @ApiAccessLog(operateType = EXPORT) | |
| 95 | + public void exportMainInfoExcel(@Valid MainInfoPageReqVO pageReqVO, | |
| 96 | + HttpServletResponse response) throws IOException { | |
| 97 | + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 98 | + List<MainInfoDO> list = mainInfoService.getMainInfoPage(pageReqVO).getList(); | |
| 99 | + // 导出 Excel | |
| 100 | + ExcelUtils.write(response, "工单信息.xls", "数据", MainInfoRespVO.class, | |
| 101 | + BeanUtils.toBean(list, MainInfoRespVO.class)); | |
| 102 | + } | |
| 103 | + | |
| 104 | +} | |
| 0 | 105 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/maininfo/vo/MainInfoPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import java.util.*; | |
| 5 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 6 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 7 | +import java.math.BigDecimal; | |
| 8 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 9 | +import java.time.LocalDateTime; | |
| 10 | + | |
| 11 | +import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | |
| 12 | + | |
| 13 | +@Schema(description = "管理后台 - 工单信息分页 Request VO") | |
| 14 | +@Data | |
| 15 | +public class MainInfoPageReqVO extends PageParam { | |
| 16 | + | |
| 17 | + @Schema(description = "业务线:yl 园林,wy 物业,sz 市政 ") | |
| 18 | + private String busiLine; | |
| 19 | + | |
| 20 | + @Schema(description = "工单号") | |
| 21 | + private String orderNo; | |
| 22 | + | |
| 23 | + @Schema(description = "工单名称", example = "张三") | |
| 24 | + private String orderName; | |
| 25 | + | |
| 26 | + @Schema(description = "来源ID", example = "1828") | |
| 27 | + private Integer sourceId; | |
| 28 | + | |
| 29 | + @Schema(description = "来源名称", example = "芋艿") | |
| 30 | + private String sourceName; | |
| 31 | + | |
| 32 | + @Schema(description = "道路ID", example = "21128") | |
| 33 | + private Long roadId; | |
| 34 | + | |
| 35 | + @Schema(description = "道路名称", example = "王五") | |
| 36 | + private String roadName; | |
| 37 | + | |
| 38 | + @Schema(description = "街道ID", example = "27852") | |
| 39 | + private String streetId; | |
| 40 | + | |
| 41 | + @Schema(description = "街道名称", example = "芋艿") | |
| 42 | + private String streetName; | |
| 43 | + | |
| 44 | + @Schema(description = "养护级别ID", example = "28278") | |
| 45 | + private Integer curingLevelId; | |
| 46 | + | |
| 47 | + @Schema(description = "养护级别", example = "王五") | |
| 48 | + private String curingLevelName; | |
| 49 | + | |
| 50 | + @Schema(description = "提交日期") | |
| 51 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 52 | + private LocalDateTime[] commitDate; | |
| 53 | + | |
| 54 | + @Schema(description = "紧急程度:1:特急;2:紧急;3:一般", example = "2") | |
| 55 | + private Integer pressingType; | |
| 56 | + | |
| 57 | + @Schema(description = "提交用户ID", example = "12757") | |
| 58 | + private Long userId; | |
| 59 | + | |
| 60 | + @Schema(description = "提交用户名称", example = "王五") | |
| 61 | + private String userName; | |
| 62 | + | |
| 63 | + @Schema(description = "部门id", example = "26936") | |
| 64 | + private Long companyId; | |
| 65 | + | |
| 66 | + @Schema(description = "经纬度类型: 1:国标; 2:百度;3:高德;4:腾讯", example = "2") | |
| 67 | + private Integer latLonType; | |
| 68 | + | |
| 69 | + @Schema(description = "经度") | |
| 70 | + private BigDecimal lat; | |
| 71 | + | |
| 72 | + @Schema(description = "维度") | |
| 73 | + private BigDecimal lon; | |
| 74 | + | |
| 75 | + @Schema(description = "经纬度地址") | |
| 76 | + private String lonLatAddress; | |
| 77 | + | |
| 78 | + @Schema(description = "三方工单ID") | |
| 79 | + private String thirdWorkNo; | |
| 80 | + | |
| 81 | + @Schema(description = "三方工单结果上报状态:1:待推送;2:推送成功;3:推送失败") | |
| 82 | + private Integer thirdPushState; | |
| 83 | + | |
| 84 | + @Schema(description = "业务状态", example = "1") | |
| 85 | + private String buzStatus; | |
| 86 | + | |
| 87 | + @Schema(description = "审批状态", example = "2") | |
| 88 | + private Integer status; | |
| 89 | + | |
| 90 | + @Schema(description = "流程实例的编号", example = "9184") | |
| 91 | + private String processInstanceId; | |
| 92 | + | |
| 93 | + @Schema(description = "工单描述", example = "你说的对") | |
| 94 | + private String remark; | |
| 95 | + | |
| 96 | + @Schema(description = "创建时间") | |
| 97 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 98 | + private LocalDateTime[] createTime; | |
| 99 | + | |
| 100 | +} | |
| 0 | 101 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/maininfo/vo/MainInfoRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.*; | |
| 5 | +import java.util.*; | |
| 6 | +import java.math.BigDecimal; | |
| 7 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 8 | +import java.time.LocalDateTime; | |
| 9 | +import cn.idev.excel.annotation.*; | |
| 10 | + | |
| 11 | +@Schema(description = "管理后台 - 工单信息 Response VO") | |
| 12 | +@Data | |
| 13 | +@ExcelIgnoreUnannotated | |
| 14 | +public class MainInfoRespVO { | |
| 15 | + | |
| 16 | + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7114") | |
| 17 | + @ExcelProperty("ID") | |
| 18 | + private Long id; | |
| 19 | + | |
| 20 | + @Schema(description = "业务线:yl 园林,wy 物业,sz 市政 ", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 21 | + @ExcelProperty("业务线:yl 园林,wy 物业,sz 市政 ") | |
| 22 | + private String busiLine; | |
| 23 | + | |
| 24 | + @Schema(description = "工单号", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 25 | + @ExcelProperty("工单号") | |
| 26 | + private String orderNo; | |
| 27 | + | |
| 28 | + @Schema(description = "工单名称", example = "张三") | |
| 29 | + @ExcelProperty("工单名称") | |
| 30 | + private String orderName; | |
| 31 | + | |
| 32 | + @Schema(description = "来源ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1828") | |
| 33 | + @ExcelProperty("来源ID") | |
| 34 | + private Integer sourceId; | |
| 35 | + | |
| 36 | + @Schema(description = "来源名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") | |
| 37 | + @ExcelProperty("来源名称") | |
| 38 | + private String sourceName; | |
| 39 | + | |
| 40 | + @Schema(description = "道路ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21128") | |
| 41 | + @ExcelProperty("道路ID") | |
| 42 | + private Long roadId; | |
| 43 | + | |
| 44 | + @Schema(description = "道路名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") | |
| 45 | + @ExcelProperty("道路名称") | |
| 46 | + private String roadName; | |
| 47 | + | |
| 48 | + @Schema(description = "街道ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27852") | |
| 49 | + @ExcelProperty("街道ID") | |
| 50 | + private String streetId; | |
| 51 | + | |
| 52 | + @Schema(description = "街道名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") | |
| 53 | + @ExcelProperty("街道名称") | |
| 54 | + private String streetName; | |
| 55 | + | |
| 56 | + @Schema(description = "养护级别ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28278") | |
| 57 | + @ExcelProperty("养护级别ID") | |
| 58 | + private Integer curingLevelId; | |
| 59 | + | |
| 60 | + @Schema(description = "养护级别", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") | |
| 61 | + @ExcelProperty("养护级别") | |
| 62 | + private String curingLevelName; | |
| 63 | + | |
| 64 | + @Schema(description = "提交日期", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 65 | + @ExcelProperty("提交日期") | |
| 66 | + private LocalDateTime commitDate; | |
| 67 | + | |
| 68 | + @Schema(description = "紧急程度:1:特急;2:紧急;3:一般", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") | |
| 69 | + @ExcelProperty("紧急程度:1:特急;2:紧急;3:一般") | |
| 70 | + private Integer pressingType; | |
| 71 | + | |
| 72 | + @Schema(description = "提交用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12757") | |
| 73 | + @ExcelProperty("提交用户ID") | |
| 74 | + private Long userId; | |
| 75 | + | |
| 76 | + @Schema(description = "提交用户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") | |
| 77 | + @ExcelProperty("提交用户名称") | |
| 78 | + private String userName; | |
| 79 | + | |
| 80 | + @Schema(description = "部门id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26936") | |
| 81 | + @ExcelProperty("部门id") | |
| 82 | + private Long companyId; | |
| 83 | + | |
| 84 | + @Schema(description = "经纬度类型: 1:国标; 2:百度;3:高德;4:腾讯", example = "2") | |
| 85 | + @ExcelProperty("经纬度类型: 1:国标; 2:百度;3:高德;4:腾讯") | |
| 86 | + private Integer latLonType; | |
| 87 | + | |
| 88 | + @Schema(description = "经度", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 89 | + @ExcelProperty("经度") | |
| 90 | + private BigDecimal lat; | |
| 91 | + | |
| 92 | + @Schema(description = "维度", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 93 | + @ExcelProperty("维度") | |
| 94 | + private BigDecimal lon; | |
| 95 | + | |
| 96 | + @Schema(description = "经纬度地址", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 97 | + @ExcelProperty("经纬度地址") | |
| 98 | + private String lonLatAddress; | |
| 99 | + | |
| 100 | + @Schema(description = "三方工单ID") | |
| 101 | + @ExcelProperty("三方工单ID") | |
| 102 | + private String thirdWorkNo; | |
| 103 | + | |
| 104 | + @Schema(description = "三方工单结果上报状态:1:待推送;2:推送成功;3:推送失败") | |
| 105 | + @ExcelProperty("三方工单结果上报状态:1:待推送;2:推送成功;3:推送失败") | |
| 106 | + private Integer thirdPushState; | |
| 107 | + | |
| 108 | + @Schema(description = "业务状态", example = "1") | |
| 109 | + @ExcelProperty("业务状态") | |
| 110 | + private String buzStatus; | |
| 111 | + | |
| 112 | + @Schema(description = "审批状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") | |
| 113 | + @ExcelProperty("审批状态") | |
| 114 | + private Integer status; | |
| 115 | + | |
| 116 | + @Schema(description = "流程实例的编号", example = "9184") | |
| 117 | + @ExcelProperty("流程实例的编号") | |
| 118 | + private String processInstanceId; | |
| 119 | + | |
| 120 | + @Schema(description = "工单描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对") | |
| 121 | + @ExcelProperty("工单描述") | |
| 122 | + private String remark; | |
| 123 | + | |
| 124 | + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 125 | + @ExcelProperty("创建时间") | |
| 126 | + private LocalDateTime createTime; | |
| 127 | + | |
| 128 | +} | |
| 0 | 129 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/maininfo/vo/MainInfoSaveReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.*; | |
| 5 | +import java.util.*; | |
| 6 | +import jakarta.validation.constraints.*; | |
| 7 | +import java.math.BigDecimal; | |
| 8 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 9 | +import java.time.LocalDateTime; | |
| 10 | + | |
| 11 | +@Schema(description = "管理后台 - 工单信息新增/修改 Request VO") | |
| 12 | +@Data | |
| 13 | +public class MainInfoSaveReqVO { | |
| 14 | + | |
| 15 | + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7114") | |
| 16 | + private Long id; | |
| 17 | + | |
| 18 | + @Schema(description = "业务线:yl 园林,wy 物业,sz 市政 ", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 19 | + @NotEmpty(message = "业务线:yl 园林,wy 物业,sz 市政 不能为空") | |
| 20 | + private String busiLine; | |
| 21 | + | |
| 22 | + @Schema(description = "工单号", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 23 | + @NotEmpty(message = "工单号不能为空") | |
| 24 | + private String orderNo; | |
| 25 | + | |
| 26 | + @Schema(description = "工单名称", example = "张三") | |
| 27 | + private String orderName; | |
| 28 | + | |
| 29 | + @Schema(description = "来源ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1828") | |
| 30 | + @NotNull(message = "来源ID不能为空") | |
| 31 | + private Integer sourceId; | |
| 32 | + | |
| 33 | + @Schema(description = "来源名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") | |
| 34 | + @NotEmpty(message = "来源名称不能为空") | |
| 35 | + private String sourceName; | |
| 36 | + | |
| 37 | + @Schema(description = "道路ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21128") | |
| 38 | + @NotNull(message = "道路ID不能为空") | |
| 39 | + private Long roadId; | |
| 40 | + | |
| 41 | + @Schema(description = "道路名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") | |
| 42 | + @NotEmpty(message = "道路名称不能为空") | |
| 43 | + private String roadName; | |
| 44 | + | |
| 45 | + @Schema(description = "街道ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27852") | |
| 46 | + @NotEmpty(message = "街道ID不能为空") | |
| 47 | + private String streetId; | |
| 48 | + | |
| 49 | + @Schema(description = "街道名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") | |
| 50 | + @NotEmpty(message = "街道名称不能为空") | |
| 51 | + private String streetName; | |
| 52 | + | |
| 53 | + @Schema(description = "养护级别ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28278") | |
| 54 | + @NotNull(message = "养护级别ID不能为空") | |
| 55 | + private Integer curingLevelId; | |
| 56 | + | |
| 57 | + @Schema(description = "养护级别", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") | |
| 58 | + @NotEmpty(message = "养护级别不能为空") | |
| 59 | + private String curingLevelName; | |
| 60 | + | |
| 61 | + @Schema(description = "提交日期", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 62 | + @NotNull(message = "提交日期不能为空") | |
| 63 | + private LocalDateTime commitDate; | |
| 64 | + | |
| 65 | + @Schema(description = "紧急程度:1:特急;2:紧急;3:一般", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") | |
| 66 | + @NotNull(message = "紧急程度:1:特急;2:紧急;3:一般不能为空") | |
| 67 | + private Integer pressingType; | |
| 68 | + | |
| 69 | + @Schema(description = "提交用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12757") | |
| 70 | + @NotNull(message = "提交用户ID不能为空") | |
| 71 | + private Long userId; | |
| 72 | + | |
| 73 | + @Schema(description = "提交用户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") | |
| 74 | + @NotEmpty(message = "提交用户名称不能为空") | |
| 75 | + private String userName; | |
| 76 | + | |
| 77 | + @Schema(description = "部门id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26936") | |
| 78 | + @NotNull(message = "部门id不能为空") | |
| 79 | + private Long companyId; | |
| 80 | + | |
| 81 | + @Schema(description = "经纬度类型: 1:国标; 2:百度;3:高德;4:腾讯", example = "2") | |
| 82 | + private Integer latLonType; | |
| 83 | + | |
| 84 | + @Schema(description = "经度", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 85 | + @NotNull(message = "经度不能为空") | |
| 86 | + private BigDecimal lat; | |
| 87 | + | |
| 88 | + @Schema(description = "维度", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 89 | + @NotNull(message = "维度不能为空") | |
| 90 | + private BigDecimal lon; | |
| 91 | + | |
| 92 | + @Schema(description = "经纬度地址", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 93 | + @NotEmpty(message = "经纬度地址不能为空") | |
| 94 | + private String lonLatAddress; | |
| 95 | + | |
| 96 | + @Schema(description = "三方工单ID") | |
| 97 | + private String thirdWorkNo; | |
| 98 | + | |
| 99 | + @Schema(description = "三方工单结果上报状态:1:待推送;2:推送成功;3:推送失败") | |
| 100 | + private Integer thirdPushState; | |
| 101 | + | |
| 102 | + @Schema(description = "业务状态", example = "1") | |
| 103 | + private String buzStatus; | |
| 104 | + | |
| 105 | + @Schema(description = "审批状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") | |
| 106 | + @NotNull(message = "审批状态不能为空") | |
| 107 | + private Integer status; | |
| 108 | + | |
| 109 | + @Schema(description = "流程实例的编号", example = "9184") | |
| 110 | + private String processInstanceId; | |
| 111 | + | |
| 112 | + @Schema(description = "工单描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对") | |
| 113 | + @NotEmpty(message = "工单描述不能为空") | |
| 114 | + private String remark; | |
| 115 | + | |
| 116 | +} | |
| 0 | 117 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/materialdetail/MaterialDetailController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.materialdetail; | |
| 2 | + | |
| 3 | +import org.springframework.web.bind.annotation.*; | |
| 4 | +import jakarta.annotation.Resource; | |
| 5 | +import org.springframework.validation.annotation.Validated; | |
| 6 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 7 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 8 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 9 | +import io.swagger.v3.oas.annotations.Operation; | |
| 10 | + | |
| 11 | +import jakarta.validation.constraints.*; | |
| 12 | +import jakarta.validation.*; | |
| 13 | +import jakarta.servlet.http.*; | |
| 14 | +import java.util.*; | |
| 15 | +import java.io.IOException; | |
| 16 | + | |
| 17 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 18 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 19 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 20 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 21 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 22 | + | |
| 23 | +import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; | |
| 24 | + | |
| 25 | +import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; | |
| 26 | +import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.*; | |
| 27 | + | |
| 28 | +import com.zteits.urbanops.module.workorder.controller.admin.materialdetail.vo.*; | |
| 29 | +import com.zteits.urbanops.module.workorder.dal.dataobject.materialdetail.MaterialDetailDO; | |
| 30 | +import com.zteits.urbanops.module.workorder.service.materialdetail.MaterialDetailService; | |
| 31 | + | |
| 32 | +@Tag(name = "管理后台 - 工单耗材明细") | |
| 33 | +@RestController | |
| 34 | +@RequestMapping("/workorder/material-detail") | |
| 35 | +@Validated | |
| 36 | +public class MaterialDetailController { | |
| 37 | + | |
| 38 | + @Resource | |
| 39 | + private MaterialDetailService materialDetailService; | |
| 40 | + | |
| 41 | + @PostMapping("/create") | |
| 42 | + @Operation(summary = "创建工单耗材明细") | |
| 43 | + @PreAuthorize("@ss.hasPermission('workorder:material-detail:create')") | |
| 44 | + public CommonResult<Long> createMaterialDetail(@Valid @RequestBody MaterialDetailSaveReqVO createReqVO) { | |
| 45 | + return success(materialDetailService.createMaterialDetail(createReqVO)); | |
| 46 | + } | |
| 47 | + | |
| 48 | + @PutMapping("/update") | |
| 49 | + @Operation(summary = "更新工单耗材明细") | |
| 50 | + @PreAuthorize("@ss.hasPermission('workorder:material-detail:update')") | |
| 51 | + public CommonResult<Boolean> updateMaterialDetail(@Valid @RequestBody MaterialDetailSaveReqVO updateReqVO) { | |
| 52 | + materialDetailService.updateMaterialDetail(updateReqVO); | |
| 53 | + return success(true); | |
| 54 | + } | |
| 55 | + | |
| 56 | + @DeleteMapping("/delete") | |
| 57 | + @Operation(summary = "删除工单耗材明细") | |
| 58 | + @Parameter(name = "id", description = "编号", required = true) | |
| 59 | + @PreAuthorize("@ss.hasPermission('workorder:material-detail:delete')") | |
| 60 | + public CommonResult<Boolean> deleteMaterialDetail(@RequestParam("id") Long id) { | |
| 61 | + materialDetailService.deleteMaterialDetail(id); | |
| 62 | + return success(true); | |
| 63 | + } | |
| 64 | + | |
| 65 | + @DeleteMapping("/delete-list") | |
| 66 | + @Parameter(name = "ids", description = "编号", required = true) | |
| 67 | + @Operation(summary = "批量删除工单耗材明细") | |
| 68 | + @PreAuthorize("@ss.hasPermission('workorder:material-detail:delete')") | |
| 69 | + public CommonResult<Boolean> deleteMaterialDetailList(@RequestParam("ids") List<Long> ids) { | |
| 70 | + materialDetailService.deleteMaterialDetailListByIds(ids); | |
| 71 | + return success(true); | |
| 72 | + } | |
| 73 | + | |
| 74 | + @GetMapping("/get") | |
| 75 | + @Operation(summary = "获得工单耗材明细") | |
| 76 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | |
| 77 | + @PreAuthorize("@ss.hasPermission('workorder:material-detail:query')") | |
| 78 | + public CommonResult<MaterialDetailRespVO> getMaterialDetail(@RequestParam("id") Long id) { | |
| 79 | + MaterialDetailDO materialDetail = materialDetailService.getMaterialDetail(id); | |
| 80 | + return success(BeanUtils.toBean(materialDetail, MaterialDetailRespVO.class)); | |
| 81 | + } | |
| 82 | + | |
| 83 | + @GetMapping("/page") | |
| 84 | + @Operation(summary = "获得工单耗材明细分页") | |
| 85 | + @PreAuthorize("@ss.hasPermission('workorder:material-detail:query')") | |
| 86 | + public CommonResult<PageResult<MaterialDetailRespVO>> getMaterialDetailPage(@Valid MaterialDetailPageReqVO pageReqVO) { | |
| 87 | + PageResult<MaterialDetailDO> pageResult = materialDetailService.getMaterialDetailPage(pageReqVO); | |
| 88 | + return success(BeanUtils.toBean(pageResult, MaterialDetailRespVO.class)); | |
| 89 | + } | |
| 90 | + | |
| 91 | + @GetMapping("/export-excel") | |
| 92 | + @Operation(summary = "导出工单耗材明细 Excel") | |
| 93 | + @PreAuthorize("@ss.hasPermission('workorder:material-detail:export')") | |
| 94 | + @ApiAccessLog(operateType = EXPORT) | |
| 95 | + public void exportMaterialDetailExcel(@Valid MaterialDetailPageReqVO pageReqVO, | |
| 96 | + HttpServletResponse response) throws IOException { | |
| 97 | + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | |
| 98 | + List<MaterialDetailDO> list = materialDetailService.getMaterialDetailPage(pageReqVO).getList(); | |
| 99 | + // 导出 Excel | |
| 100 | + ExcelUtils.write(response, "工单耗材明细.xls", "数据", MaterialDetailRespVO.class, | |
| 101 | + BeanUtils.toBean(list, MaterialDetailRespVO.class)); | |
| 102 | + } | |
| 103 | + | |
| 104 | +} | |
| 0 | 105 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/materialdetail/vo/MaterialDetailPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.materialdetail.vo; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import java.util.*; | |
| 5 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 6 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 7 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 8 | +import java.time.LocalDateTime; | |
| 9 | + | |
| 10 | +import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | |
| 11 | + | |
| 12 | +@Schema(description = "管理后台 - 工单耗材明细分页 Request VO") | |
| 13 | +@Data | |
| 14 | +public class MaterialDetailPageReqVO extends PageParam { | |
| 15 | + | |
| 16 | + @Schema(description = "工单号") | |
| 17 | + private String orderNo; | |
| 18 | + | |
| 19 | + @Schema(description = "提交用户ID", example = "10300") | |
| 20 | + private Long userId; | |
| 21 | + | |
| 22 | + @Schema(description = "提交用户名称", example = "赵六") | |
| 23 | + private String userName; | |
| 24 | + | |
| 25 | + @Schema(description = "种类ID", example = "27821") | |
| 26 | + private Long classifyId; | |
| 27 | + | |
| 28 | + @Schema(description = "种类名称", example = "张三") | |
| 29 | + private String classifyName; | |
| 30 | + | |
| 31 | + @Schema(description = "类别ID", example = "23969") | |
| 32 | + private Long typeId; | |
| 33 | + | |
| 34 | + @Schema(description = "类别名称", example = "李四") | |
| 35 | + private String typeName; | |
| 36 | + | |
| 37 | + @Schema(description = "类别明细ID", example = "11240") | |
| 38 | + private Long typeDetailId; | |
| 39 | + | |
| 40 | + @Schema(description = "类别明细名称", example = "赵六") | |
| 41 | + private String typeDetailName; | |
| 42 | + | |
| 43 | + @Schema(description = "使用数量", example = "20141") | |
| 44 | + private Double userCount; | |
| 45 | + | |
| 46 | + @Schema(description = "单位", example = "李四") | |
| 47 | + private String unitName; | |
| 48 | + | |
| 49 | + @Schema(description = "状态(0正常 1停用)", example = "1") | |
| 50 | + private String status; | |
| 51 | + | |
| 52 | + @Schema(description = "描述", example = "你说的对") | |
| 53 | + private String remark; | |
| 54 | + | |
| 55 | + @Schema(description = "创建时间") | |
| 56 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | |
| 57 | + private LocalDateTime[] createTime; | |
| 58 | + | |
| 59 | +} | |
| 0 | 60 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/materialdetail/vo/MaterialDetailRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.materialdetail.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.*; | |
| 5 | +import java.util.*; | |
| 6 | +import org.springframework.format.annotation.DateTimeFormat; | |
| 7 | +import java.time.LocalDateTime; | |
| 8 | +import cn.idev.excel.annotation.*; | |
| 9 | + | |
| 10 | +@Schema(description = "管理后台 - 工单耗材明细 Response VO") | |
| 11 | +@Data | |
| 12 | +@ExcelIgnoreUnannotated | |
| 13 | +public class MaterialDetailRespVO { | |
| 14 | + | |
| 15 | + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "234") | |
| 16 | + @ExcelProperty("ID") | |
| 17 | + private Long id; | |
| 18 | + | |
| 19 | + @Schema(description = "工单号", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 20 | + @ExcelProperty("工单号") | |
| 21 | + private String orderNo; | |
| 22 | + | |
| 23 | + @Schema(description = "提交用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10300") | |
| 24 | + @ExcelProperty("提交用户ID") | |
| 25 | + private Long userId; | |
| 26 | + | |
| 27 | + @Schema(description = "提交用户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") | |
| 28 | + @ExcelProperty("提交用户名称") | |
| 29 | + private String userName; | |
| 30 | + | |
| 31 | + @Schema(description = "种类ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27821") | |
| 32 | + @ExcelProperty("种类ID") | |
| 33 | + private Long classifyId; | |
| 34 | + | |
| 35 | + @Schema(description = "种类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") | |
| 36 | + @ExcelProperty("种类名称") | |
| 37 | + private String classifyName; | |
| 38 | + | |
| 39 | + @Schema(description = "类别ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23969") | |
| 40 | + @ExcelProperty("类别ID") | |
| 41 | + private Long typeId; | |
| 42 | + | |
| 43 | + @Schema(description = "类别名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") | |
| 44 | + @ExcelProperty("类别名称") | |
| 45 | + private String typeName; | |
| 46 | + | |
| 47 | + @Schema(description = "类别明细ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11240") | |
| 48 | + @ExcelProperty("类别明细ID") | |
| 49 | + private Long typeDetailId; | |
| 50 | + | |
| 51 | + @Schema(description = "类别明细名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") | |
| 52 | + @ExcelProperty("类别明细名称") | |
| 53 | + private String typeDetailName; | |
| 54 | + | |
| 55 | + @Schema(description = "使用数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "20141") | |
| 56 | + @ExcelProperty("使用数量") | |
| 57 | + private Double userCount; | |
| 58 | + | |
| 59 | + @Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") | |
| 60 | + @ExcelProperty("单位") | |
| 61 | + private String unitName; | |
| 62 | + | |
| 63 | + @Schema(description = "状态(0正常 1停用)", example = "1") | |
| 64 | + @ExcelProperty("状态(0正常 1停用)") | |
| 65 | + private String status; | |
| 66 | + | |
| 67 | + @Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对") | |
| 68 | + @ExcelProperty("描述") | |
| 69 | + private String remark; | |
| 70 | + | |
| 71 | + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 72 | + @ExcelProperty("创建时间") | |
| 73 | + private LocalDateTime createTime; | |
| 74 | + | |
| 75 | +} | |
| 0 | 76 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/materialdetail/vo/MaterialDetailSaveReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.controller.admin.materialdetail.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.*; | |
| 5 | +import java.util.*; | |
| 6 | +import jakarta.validation.constraints.*; | |
| 7 | + | |
| 8 | +@Schema(description = "管理后台 - 工单耗材明细新增/修改 Request VO") | |
| 9 | +@Data | |
| 10 | +public class MaterialDetailSaveReqVO { | |
| 11 | + | |
| 12 | + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "234") | |
| 13 | + private Long id; | |
| 14 | + | |
| 15 | + @Schema(description = "工单号", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 16 | + @NotEmpty(message = "工单号不能为空") | |
| 17 | + private String orderNo; | |
| 18 | + | |
| 19 | + @Schema(description = "提交用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10300") | |
| 20 | + @NotNull(message = "提交用户ID不能为空") | |
| 21 | + private Long userId; | |
| 22 | + | |
| 23 | + @Schema(description = "提交用户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") | |
| 24 | + @NotEmpty(message = "提交用户名称不能为空") | |
| 25 | + private String userName; | |
| 26 | + | |
| 27 | + @Schema(description = "种类ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27821") | |
| 28 | + @NotNull(message = "种类ID不能为空") | |
| 29 | + private Long classifyId; | |
| 30 | + | |
| 31 | + @Schema(description = "种类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") | |
| 32 | + @NotEmpty(message = "种类名称不能为空") | |
| 33 | + private String classifyName; | |
| 34 | + | |
| 35 | + @Schema(description = "类别ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23969") | |
| 36 | + @NotNull(message = "类别ID不能为空") | |
| 37 | + private Long typeId; | |
| 38 | + | |
| 39 | + @Schema(description = "类别名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") | |
| 40 | + @NotEmpty(message = "类别名称不能为空") | |
| 41 | + private String typeName; | |
| 42 | + | |
| 43 | + @Schema(description = "类别明细ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11240") | |
| 44 | + @NotNull(message = "类别明细ID不能为空") | |
| 45 | + private Long typeDetailId; | |
| 46 | + | |
| 47 | + @Schema(description = "类别明细名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") | |
| 48 | + @NotEmpty(message = "类别明细名称不能为空") | |
| 49 | + private String typeDetailName; | |
| 50 | + | |
| 51 | + @Schema(description = "使用数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "20141") | |
| 52 | + @NotNull(message = "使用数量不能为空") | |
| 53 | + private Double userCount; | |
| 54 | + | |
| 55 | + @Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") | |
| 56 | + @NotEmpty(message = "单位不能为空") | |
| 57 | + private String unitName; | |
| 58 | + | |
| 59 | + @Schema(description = "状态(0正常 1停用)", example = "1") | |
| 60 | + private String status; | |
| 61 | + | |
| 62 | + @Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对") | |
| 63 | + @NotEmpty(message = "描述不能为空") | |
| 64 | + private String remark; | |
| 65 | + | |
| 66 | +} | |
| 0 | 67 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/dal/dataobject/attachment/AttachmentDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.dal.dataobject.attachment; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import java.util.*; | |
| 5 | +import java.time.LocalDateTime; | |
| 6 | +import java.time.LocalDateTime; | |
| 7 | +import com.baomidou.mybatisplus.annotation.*; | |
| 8 | +import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 工单附件信息 DO | |
| 12 | + * | |
| 13 | + * @author 超级管理员 | |
| 14 | + */ | |
| 15 | +@TableName("workorder_attachment") | |
| 16 | +@KeySequence("workorder_attachment_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 | |
| 17 | +@Data | |
| 18 | +@EqualsAndHashCode(callSuper = true) | |
| 19 | +@ToString(callSuper = true) | |
| 20 | +@Builder | |
| 21 | +@NoArgsConstructor | |
| 22 | +@AllArgsConstructor | |
| 23 | +public class AttachmentDO extends BaseDO { | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * ID | |
| 27 | + */ | |
| 28 | + @TableId | |
| 29 | + private Long id; | |
| 30 | + /** | |
| 31 | + * 工单号 | |
| 32 | + */ | |
| 33 | + private String orderNo; | |
| 34 | + /** | |
| 35 | + * 业务线:yl 园林,wy 物业,sz 市政 | |
| 36 | + */ | |
| 37 | + private String busiLine; | |
| 38 | + /** | |
| 39 | + * 业务类型:01 问题图片,02 街道图片,03 选景图片 | |
| 40 | + */ | |
| 41 | + private String busiType; | |
| 42 | + /** | |
| 43 | + * 文件名称 | |
| 44 | + */ | |
| 45 | + private String fileNames; | |
| 46 | + /** | |
| 47 | + * 路径 | |
| 48 | + */ | |
| 49 | + private String hostUrl; | |
| 50 | + /** | |
| 51 | + * 文件大小 | |
| 52 | + */ | |
| 53 | + private String fileSize; | |
| 54 | + /** | |
| 55 | + * 文件类型 | |
| 56 | + */ | |
| 57 | + private String contentType; | |
| 58 | + /** | |
| 59 | + * 描述 | |
| 60 | + */ | |
| 61 | + private String remark; | |
| 62 | + | |
| 63 | + | |
| 64 | +} | |
| 0 | 65 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/dal/dataobject/maininfo/MainInfoDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.dal.dataobject.maininfo; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import java.util.*; | |
| 5 | +import java.time.LocalDateTime; | |
| 6 | +import java.math.BigDecimal; | |
| 7 | +import java.math.BigDecimal; | |
| 8 | +import java.time.LocalDateTime; | |
| 9 | +import java.time.LocalDateTime; | |
| 10 | +import com.baomidou.mybatisplus.annotation.*; | |
| 11 | +import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * 工单信息 DO | |
| 15 | + * | |
| 16 | + * @author 超级管理员 | |
| 17 | + */ | |
| 18 | +@TableName("workorder_main_info") | |
| 19 | +@KeySequence("workorder_main_info_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 | |
| 20 | +@Data | |
| 21 | +@EqualsAndHashCode(callSuper = true) | |
| 22 | +@ToString(callSuper = true) | |
| 23 | +@Builder | |
| 24 | +@NoArgsConstructor | |
| 25 | +@AllArgsConstructor | |
| 26 | +public class MainInfoDO extends BaseDO { | |
| 27 | + | |
| 28 | + /** | |
| 29 | + * ID | |
| 30 | + */ | |
| 31 | + @TableId | |
| 32 | + private Long id; | |
| 33 | + /** | |
| 34 | + * 业务线:yl 园林,wy 物业,sz 市政 | |
| 35 | + */ | |
| 36 | + private String busiLine; | |
| 37 | + /** | |
| 38 | + * 工单号 | |
| 39 | + */ | |
| 40 | + private String orderNo; | |
| 41 | + /** | |
| 42 | + * 工单名称 | |
| 43 | + */ | |
| 44 | + private String orderName; | |
| 45 | + /** | |
| 46 | + * 来源ID | |
| 47 | + */ | |
| 48 | + private Integer sourceId; | |
| 49 | + /** | |
| 50 | + * 来源名称 | |
| 51 | + */ | |
| 52 | + private String sourceName; | |
| 53 | + /** | |
| 54 | + * 道路ID | |
| 55 | + */ | |
| 56 | + private Long roadId; | |
| 57 | + /** | |
| 58 | + * 道路名称 | |
| 59 | + */ | |
| 60 | + private String roadName; | |
| 61 | + /** | |
| 62 | + * 街道ID | |
| 63 | + */ | |
| 64 | + private String streetId; | |
| 65 | + /** | |
| 66 | + * 街道名称 | |
| 67 | + */ | |
| 68 | + private String streetName; | |
| 69 | + /** | |
| 70 | + * 养护级别ID | |
| 71 | + */ | |
| 72 | + private Integer curingLevelId; | |
| 73 | + /** | |
| 74 | + * 养护级别 | |
| 75 | + */ | |
| 76 | + private String curingLevelName; | |
| 77 | + /** | |
| 78 | + * 提交日期 | |
| 79 | + */ | |
| 80 | + private LocalDateTime commitDate; | |
| 81 | + /** | |
| 82 | + * 紧急程度:1:特急;2:紧急;3:一般 | |
| 83 | + */ | |
| 84 | + private Integer pressingType; | |
| 85 | + /** | |
| 86 | + * 提交用户ID | |
| 87 | + */ | |
| 88 | + private Long userId; | |
| 89 | + /** | |
| 90 | + * 提交用户名称 | |
| 91 | + */ | |
| 92 | + private String userName; | |
| 93 | + /** | |
| 94 | + * 部门id | |
| 95 | + */ | |
| 96 | + private Long companyId; | |
| 97 | + /** | |
| 98 | + * 经纬度类型: 1:国标; 2:百度;3:高德;4:腾讯 | |
| 99 | + */ | |
| 100 | + private Integer latLonType; | |
| 101 | + /** | |
| 102 | + * 经度 | |
| 103 | + */ | |
| 104 | + private BigDecimal lat; | |
| 105 | + /** | |
| 106 | + * 维度 | |
| 107 | + */ | |
| 108 | + private BigDecimal lon; | |
| 109 | + /** | |
| 110 | + * 经纬度地址 | |
| 111 | + */ | |
| 112 | + private String lonLatAddress; | |
| 113 | + /** | |
| 114 | + * 三方工单ID | |
| 115 | + */ | |
| 116 | + private String thirdWorkNo; | |
| 117 | + /** | |
| 118 | + * 三方工单结果上报状态:1:待推送;2:推送成功;3:推送失败 | |
| 119 | + */ | |
| 120 | + private Integer thirdPushState; | |
| 121 | + /** | |
| 122 | + * 业务状态 | |
| 123 | + */ | |
| 124 | + private String buzStatus; | |
| 125 | + /** | |
| 126 | + * 审批状态 | |
| 127 | + */ | |
| 128 | + private Integer status; | |
| 129 | + /** | |
| 130 | + * 流程实例的编号 | |
| 131 | + */ | |
| 132 | + private String processInstanceId; | |
| 133 | + /** | |
| 134 | + * 工单描述 | |
| 135 | + */ | |
| 136 | + private String remark; | |
| 137 | + | |
| 138 | + | |
| 139 | +} | |
| 0 | 140 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/dal/dataobject/materialdetail/MaterialDetailDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.dal.dataobject.materialdetail; | |
| 2 | + | |
| 3 | +import lombok.*; | |
| 4 | +import java.util.*; | |
| 5 | +import java.time.LocalDateTime; | |
| 6 | +import java.time.LocalDateTime; | |
| 7 | +import com.baomidou.mybatisplus.annotation.*; | |
| 8 | +import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 工单耗材明细 DO | |
| 12 | + * | |
| 13 | + * @author 超级管理员 | |
| 14 | + */ | |
| 15 | +@TableName("workorder_material_detail") | |
| 16 | +@KeySequence("workorder_material_detail_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 | |
| 17 | +@Data | |
| 18 | +@EqualsAndHashCode(callSuper = true) | |
| 19 | +@ToString(callSuper = true) | |
| 20 | +@Builder | |
| 21 | +@NoArgsConstructor | |
| 22 | +@AllArgsConstructor | |
| 23 | +public class MaterialDetailDO extends BaseDO { | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * ID | |
| 27 | + */ | |
| 28 | + @TableId | |
| 29 | + private Long id; | |
| 30 | + /** | |
| 31 | + * 工单号 | |
| 32 | + */ | |
| 33 | + private String orderNo; | |
| 34 | + /** | |
| 35 | + * 提交用户ID | |
| 36 | + */ | |
| 37 | + private Long userId; | |
| 38 | + /** | |
| 39 | + * 提交用户名称 | |
| 40 | + */ | |
| 41 | + private String userName; | |
| 42 | + /** | |
| 43 | + * 种类ID | |
| 44 | + */ | |
| 45 | + private Long classifyId; | |
| 46 | + /** | |
| 47 | + * 种类名称 | |
| 48 | + */ | |
| 49 | + private String classifyName; | |
| 50 | + /** | |
| 51 | + * 类别ID | |
| 52 | + */ | |
| 53 | + private Long typeId; | |
| 54 | + /** | |
| 55 | + * 类别名称 | |
| 56 | + */ | |
| 57 | + private String typeName; | |
| 58 | + /** | |
| 59 | + * 类别明细ID | |
| 60 | + */ | |
| 61 | + private Long typeDetailId; | |
| 62 | + /** | |
| 63 | + * 类别明细名称 | |
| 64 | + */ | |
| 65 | + private String typeDetailName; | |
| 66 | + /** | |
| 67 | + * 使用数量 | |
| 68 | + */ | |
| 69 | + private Double userCount; | |
| 70 | + /** | |
| 71 | + * 单位 | |
| 72 | + */ | |
| 73 | + private String unitName; | |
| 74 | + /** | |
| 75 | + * 状态(0正常 1停用) | |
| 76 | + */ | |
| 77 | + private String status; | |
| 78 | + /** | |
| 79 | + * 描述 | |
| 80 | + */ | |
| 81 | + private String remark; | |
| 82 | + | |
| 83 | + | |
| 84 | +} | |
| 0 | 85 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/dal/mysql/attachment/AttachmentMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.dal.mysql.attachment; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | + | |
| 5 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 6 | +import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 7 | +import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | |
| 8 | +import com.zteits.urbanops.module.workorder.dal.dataobject.attachment.AttachmentDO; | |
| 9 | +import org.apache.ibatis.annotations.Mapper; | |
| 10 | +import com.zteits.urbanops.module.workorder.controller.admin.attachment.vo.*; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 工单附件信息 Mapper | |
| 14 | + * | |
| 15 | + * @author 超级管理员 | |
| 16 | + */ | |
| 17 | +@Mapper | |
| 18 | +public interface AttachmentMapper extends BaseMapperX<AttachmentDO> { | |
| 19 | + | |
| 20 | + default PageResult<AttachmentDO> selectPage(AttachmentPageReqVO reqVO) { | |
| 21 | + return selectPage(reqVO, new LambdaQueryWrapperX<AttachmentDO>() | |
| 22 | + .eqIfPresent(AttachmentDO::getOrderNo, reqVO.getOrderNo()) | |
| 23 | + .eqIfPresent(AttachmentDO::getBusiLine, reqVO.getBusiLine()) | |
| 24 | + .eqIfPresent(AttachmentDO::getBusiType, reqVO.getBusiType()) | |
| 25 | + .eqIfPresent(AttachmentDO::getFileNames, reqVO.getFileNames()) | |
| 26 | + .eqIfPresent(AttachmentDO::getHostUrl, reqVO.getHostUrl()) | |
| 27 | + .eqIfPresent(AttachmentDO::getFileSize, reqVO.getFileSize()) | |
| 28 | + .eqIfPresent(AttachmentDO::getContentType, reqVO.getContentType()) | |
| 29 | + .eqIfPresent(AttachmentDO::getRemark, reqVO.getRemark()) | |
| 30 | + .betweenIfPresent(AttachmentDO::getCreateTime, reqVO.getCreateTime()) | |
| 31 | + .orderByDesc(AttachmentDO::getId)); | |
| 32 | + } | |
| 33 | + | |
| 34 | +} | |
| 0 | 35 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/dal/mysql/maininfo/MainInfoMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.dal.mysql.maininfo; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | + | |
| 5 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 6 | +import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 7 | +import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | |
| 8 | +import com.zteits.urbanops.module.workorder.dal.dataobject.maininfo.MainInfoDO; | |
| 9 | +import org.apache.ibatis.annotations.Mapper; | |
| 10 | +import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.*; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 工单信息 Mapper | |
| 14 | + * | |
| 15 | + * @author 超级管理员 | |
| 16 | + */ | |
| 17 | +@Mapper | |
| 18 | +public interface MainInfoMapper extends BaseMapperX<MainInfoDO> { | |
| 19 | + | |
| 20 | + default PageResult<MainInfoDO> selectPage(MainInfoPageReqVO reqVO) { | |
| 21 | + return selectPage(reqVO, new LambdaQueryWrapperX<MainInfoDO>() | |
| 22 | + .eqIfPresent(MainInfoDO::getBusiLine, reqVO.getBusiLine()) | |
| 23 | + .eqIfPresent(MainInfoDO::getOrderNo, reqVO.getOrderNo()) | |
| 24 | + .likeIfPresent(MainInfoDO::getOrderName, reqVO.getOrderName()) | |
| 25 | + .eqIfPresent(MainInfoDO::getSourceId, reqVO.getSourceId()) | |
| 26 | + .likeIfPresent(MainInfoDO::getSourceName, reqVO.getSourceName()) | |
| 27 | + .eqIfPresent(MainInfoDO::getRoadId, reqVO.getRoadId()) | |
| 28 | + .likeIfPresent(MainInfoDO::getRoadName, reqVO.getRoadName()) | |
| 29 | + .eqIfPresent(MainInfoDO::getStreetId, reqVO.getStreetId()) | |
| 30 | + .likeIfPresent(MainInfoDO::getStreetName, reqVO.getStreetName()) | |
| 31 | + .eqIfPresent(MainInfoDO::getCuringLevelId, reqVO.getCuringLevelId()) | |
| 32 | + .likeIfPresent(MainInfoDO::getCuringLevelName, reqVO.getCuringLevelName()) | |
| 33 | + .betweenIfPresent(MainInfoDO::getCommitDate, reqVO.getCommitDate()) | |
| 34 | + .eqIfPresent(MainInfoDO::getPressingType, reqVO.getPressingType()) | |
| 35 | + .eqIfPresent(MainInfoDO::getUserId, reqVO.getUserId()) | |
| 36 | + .likeIfPresent(MainInfoDO::getUserName, reqVO.getUserName()) | |
| 37 | + .eqIfPresent(MainInfoDO::getCompanyId, reqVO.getCompanyId()) | |
| 38 | + .eqIfPresent(MainInfoDO::getLatLonType, reqVO.getLatLonType()) | |
| 39 | + .eqIfPresent(MainInfoDO::getLat, reqVO.getLat()) | |
| 40 | + .eqIfPresent(MainInfoDO::getLon, reqVO.getLon()) | |
| 41 | + .eqIfPresent(MainInfoDO::getLonLatAddress, reqVO.getLonLatAddress()) | |
| 42 | + .eqIfPresent(MainInfoDO::getThirdWorkNo, reqVO.getThirdWorkNo()) | |
| 43 | + .eqIfPresent(MainInfoDO::getThirdPushState, reqVO.getThirdPushState()) | |
| 44 | + .eqIfPresent(MainInfoDO::getBuzStatus, reqVO.getBuzStatus()) | |
| 45 | + .eqIfPresent(MainInfoDO::getStatus, reqVO.getStatus()) | |
| 46 | + .eqIfPresent(MainInfoDO::getProcessInstanceId, reqVO.getProcessInstanceId()) | |
| 47 | + .eqIfPresent(MainInfoDO::getRemark, reqVO.getRemark()) | |
| 48 | + .betweenIfPresent(MainInfoDO::getCreateTime, reqVO.getCreateTime()) | |
| 49 | + .orderByDesc(MainInfoDO::getId)); | |
| 50 | + } | |
| 51 | + | |
| 52 | +} | |
| 0 | 53 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/dal/mysql/materialdetail/MaterialDetailMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.dal.mysql.materialdetail; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | + | |
| 5 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 6 | +import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 7 | +import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | |
| 8 | +import com.zteits.urbanops.module.workorder.dal.dataobject.materialdetail.MaterialDetailDO; | |
| 9 | +import org.apache.ibatis.annotations.Mapper; | |
| 10 | +import com.zteits.urbanops.module.workorder.controller.admin.materialdetail.vo.*; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 工单耗材明细 Mapper | |
| 14 | + * | |
| 15 | + * @author 超级管理员 | |
| 16 | + */ | |
| 17 | +@Mapper | |
| 18 | +public interface MaterialDetailMapper extends BaseMapperX<MaterialDetailDO> { | |
| 19 | + | |
| 20 | + default PageResult<MaterialDetailDO> selectPage(MaterialDetailPageReqVO reqVO) { | |
| 21 | + return selectPage(reqVO, new LambdaQueryWrapperX<MaterialDetailDO>() | |
| 22 | + .eqIfPresent(MaterialDetailDO::getOrderNo, reqVO.getOrderNo()) | |
| 23 | + .eqIfPresent(MaterialDetailDO::getUserId, reqVO.getUserId()) | |
| 24 | + .likeIfPresent(MaterialDetailDO::getUserName, reqVO.getUserName()) | |
| 25 | + .eqIfPresent(MaterialDetailDO::getClassifyId, reqVO.getClassifyId()) | |
| 26 | + .likeIfPresent(MaterialDetailDO::getClassifyName, reqVO.getClassifyName()) | |
| 27 | + .eqIfPresent(MaterialDetailDO::getTypeId, reqVO.getTypeId()) | |
| 28 | + .likeIfPresent(MaterialDetailDO::getTypeName, reqVO.getTypeName()) | |
| 29 | + .eqIfPresent(MaterialDetailDO::getTypeDetailId, reqVO.getTypeDetailId()) | |
| 30 | + .likeIfPresent(MaterialDetailDO::getTypeDetailName, reqVO.getTypeDetailName()) | |
| 31 | + .eqIfPresent(MaterialDetailDO::getUserCount, reqVO.getUserCount()) | |
| 32 | + .likeIfPresent(MaterialDetailDO::getUnitName, reqVO.getUnitName()) | |
| 33 | + .eqIfPresent(MaterialDetailDO::getStatus, reqVO.getStatus()) | |
| 34 | + .eqIfPresent(MaterialDetailDO::getRemark, reqVO.getRemark()) | |
| 35 | + .betweenIfPresent(MaterialDetailDO::getCreateTime, reqVO.getCreateTime()) | |
| 36 | + .orderByDesc(MaterialDetailDO::getId)); | |
| 37 | + } | |
| 38 | + | |
| 39 | +} | |
| 0 | 40 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/enums/ErrorCodeConstants.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.enums; | |
| 2 | + | |
| 3 | + | |
| 4 | +import com.zteits.urbanops.framework.common.exception.ErrorCode; | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * workorder 错误码枚举类 | |
| 8 | + * <p> | |
| 9 | + * workorder 系统,使用 1-100-000-000 段 | |
| 10 | + */ | |
| 11 | +public interface ErrorCodeConstants { | |
| 12 | + | |
| 13 | + // ========== server 工单 1-100-001-000 ========== | |
| 14 | + ErrorCode MAIN_INFO_NOT_EXISTS = new ErrorCode(1-100-001-000, "工单信息不存在"); | |
| 15 | + | |
| 16 | + ErrorCode ATTACHMENT_NOT_EXISTS = new ErrorCode(1-100-002-000, "工单附件信息不存在"); | |
| 17 | + | |
| 18 | + ErrorCode MATERIAL_DETAIL_NOT_EXISTS = new ErrorCode(1-100-003-000, "工单耗材明细不存在"); | |
| 19 | +} | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/attachment/AttachmentService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.service.attachment; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | +import jakarta.validation.*; | |
| 5 | +import com.zteits.urbanops.module.workorder.controller.admin.attachment.vo.*; | |
| 6 | +import com.zteits.urbanops.module.workorder.dal.dataobject.attachment.AttachmentDO; | |
| 7 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 8 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 工单附件信息 Service 接口 | |
| 12 | + * | |
| 13 | + * @author 超级管理员 | |
| 14 | + */ | |
| 15 | +public interface AttachmentService { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 创建工单附件信息 | |
| 19 | + * | |
| 20 | + * @param createReqVO 创建信息 | |
| 21 | + * @return 编号 | |
| 22 | + */ | |
| 23 | + Long createAttachment(@Valid AttachmentSaveReqVO createReqVO); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 更新工单附件信息 | |
| 27 | + * | |
| 28 | + * @param updateReqVO 更新信息 | |
| 29 | + */ | |
| 30 | + void updateAttachment(@Valid AttachmentSaveReqVO updateReqVO); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 删除工单附件信息 | |
| 34 | + * | |
| 35 | + * @param id 编号 | |
| 36 | + */ | |
| 37 | + void deleteAttachment(Long id); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 批量删除工单附件信息 | |
| 41 | + * | |
| 42 | + * @param ids 编号 | |
| 43 | + */ | |
| 44 | + void deleteAttachmentListByIds(List<Long> ids); | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 获得工单附件信息 | |
| 48 | + * | |
| 49 | + * @param id 编号 | |
| 50 | + * @return 工单附件信息 | |
| 51 | + */ | |
| 52 | + AttachmentDO getAttachment(Long id); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 获得工单附件信息分页 | |
| 56 | + * | |
| 57 | + * @param pageReqVO 分页查询 | |
| 58 | + * @return 工单附件信息分页 | |
| 59 | + */ | |
| 60 | + PageResult<AttachmentDO> getAttachmentPage(AttachmentPageReqVO pageReqVO); | |
| 61 | + | |
| 62 | +} | |
| 0 | 63 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/attachment/AttachmentServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.service.attachment; | |
| 2 | + | |
| 3 | +import cn.hutool.core.collection.CollUtil; | |
| 4 | +import org.springframework.stereotype.Service; | |
| 5 | +import jakarta.annotation.Resource; | |
| 6 | +import org.springframework.validation.annotation.Validated; | |
| 7 | +import org.springframework.transaction.annotation.Transactional; | |
| 8 | + | |
| 9 | +import java.util.*; | |
| 10 | +import com.zteits.urbanops.module.workorder.controller.admin.attachment.vo.*; | |
| 11 | +import com.zteits.urbanops.module.workorder.dal.dataobject.attachment.AttachmentDO; | |
| 12 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 13 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 14 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 15 | + | |
| 16 | +import com.zteits.urbanops.module.workorder.dal.mysql.attachment.AttachmentMapper; | |
| 17 | + | |
| 18 | +import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 19 | +import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.convertList; | |
| 20 | +import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.diffList; | |
| 21 | +import static com.zteits.urbanops.module.workorder.enums.ErrorCodeConstants.*; | |
| 22 | + | |
| 23 | +/** | |
| 24 | + * 工单附件信息 Service 实现类 | |
| 25 | + * | |
| 26 | + * @author 超级管理员 | |
| 27 | + */ | |
| 28 | +@Service | |
| 29 | +@Validated | |
| 30 | +public class AttachmentServiceImpl implements AttachmentService { | |
| 31 | + | |
| 32 | + @Resource | |
| 33 | + private AttachmentMapper attachmentMapper; | |
| 34 | + | |
| 35 | + @Override | |
| 36 | + public Long createAttachment(AttachmentSaveReqVO createReqVO) { | |
| 37 | + // 插入 | |
| 38 | + AttachmentDO attachment = BeanUtils.toBean(createReqVO, AttachmentDO.class); | |
| 39 | + attachmentMapper.insert(attachment); | |
| 40 | + | |
| 41 | + // 返回 | |
| 42 | + return attachment.getId(); | |
| 43 | + } | |
| 44 | + | |
| 45 | + @Override | |
| 46 | + public void updateAttachment(AttachmentSaveReqVO updateReqVO) { | |
| 47 | + // 校验存在 | |
| 48 | + validateAttachmentExists(updateReqVO.getId()); | |
| 49 | + // 更新 | |
| 50 | + AttachmentDO updateObj = BeanUtils.toBean(updateReqVO, AttachmentDO.class); | |
| 51 | + attachmentMapper.updateById(updateObj); | |
| 52 | + } | |
| 53 | + | |
| 54 | + @Override | |
| 55 | + public void deleteAttachment(Long id) { | |
| 56 | + // 校验存在 | |
| 57 | + validateAttachmentExists(id); | |
| 58 | + // 删除 | |
| 59 | + attachmentMapper.deleteById(id); | |
| 60 | + } | |
| 61 | + | |
| 62 | + @Override | |
| 63 | + public void deleteAttachmentListByIds(List<Long> ids) { | |
| 64 | + // 删除 | |
| 65 | + attachmentMapper.deleteByIds(ids); | |
| 66 | + } | |
| 67 | + | |
| 68 | + | |
| 69 | + private void validateAttachmentExists(Long id) { | |
| 70 | + if (attachmentMapper.selectById(id) == null) { | |
| 71 | + throw exception(ATTACHMENT_NOT_EXISTS); | |
| 72 | + } | |
| 73 | + } | |
| 74 | + | |
| 75 | + @Override | |
| 76 | + public AttachmentDO getAttachment(Long id) { | |
| 77 | + return attachmentMapper.selectById(id); | |
| 78 | + } | |
| 79 | + | |
| 80 | + @Override | |
| 81 | + public PageResult<AttachmentDO> getAttachmentPage(AttachmentPageReqVO pageReqVO) { | |
| 82 | + return attachmentMapper.selectPage(pageReqVO); | |
| 83 | + } | |
| 84 | + | |
| 85 | +} | |
| 0 | 86 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/maininfo/MainInfoService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.service.maininfo; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | +import jakarta.validation.*; | |
| 5 | +import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.*; | |
| 6 | +import com.zteits.urbanops.module.workorder.dal.dataobject.maininfo.MainInfoDO; | |
| 7 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 8 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 工单信息 Service 接口 | |
| 12 | + * | |
| 13 | + * @author 超级管理员 | |
| 14 | + */ | |
| 15 | +public interface MainInfoService { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 创建工单信息 | |
| 19 | + * | |
| 20 | + * @param createReqVO 创建信息 | |
| 21 | + * @return 编号 | |
| 22 | + */ | |
| 23 | + Long createMainInfo(@Valid MainInfoSaveReqVO createReqVO); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 更新工单信息 | |
| 27 | + * | |
| 28 | + * @param updateReqVO 更新信息 | |
| 29 | + */ | |
| 30 | + void updateMainInfo(@Valid MainInfoSaveReqVO updateReqVO); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 删除工单信息 | |
| 34 | + * | |
| 35 | + * @param id 编号 | |
| 36 | + */ | |
| 37 | + void deleteMainInfo(Long id); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 批量删除工单信息 | |
| 41 | + * | |
| 42 | + * @param ids 编号 | |
| 43 | + */ | |
| 44 | + void deleteMainInfoListByIds(List<Long> ids); | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 获得工单信息 | |
| 48 | + * | |
| 49 | + * @param id 编号 | |
| 50 | + * @return 工单信息 | |
| 51 | + */ | |
| 52 | + MainInfoDO getMainInfo(Long id); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 获得工单信息分页 | |
| 56 | + * | |
| 57 | + * @param pageReqVO 分页查询 | |
| 58 | + * @return 工单信息分页 | |
| 59 | + */ | |
| 60 | + PageResult<MainInfoDO> getMainInfoPage(MainInfoPageReqVO pageReqVO); | |
| 61 | + | |
| 62 | +} | |
| 0 | 63 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/maininfo/MainInfoServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.service.maininfo; | |
| 2 | + | |
| 3 | +import cn.hutool.core.collection.CollUtil; | |
| 4 | +import org.springframework.stereotype.Service; | |
| 5 | +import jakarta.annotation.Resource; | |
| 6 | +import org.springframework.validation.annotation.Validated; | |
| 7 | +import org.springframework.transaction.annotation.Transactional; | |
| 8 | + | |
| 9 | +import java.util.*; | |
| 10 | +import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.*; | |
| 11 | +import com.zteits.urbanops.module.workorder.dal.dataobject.maininfo.MainInfoDO; | |
| 12 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 13 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 14 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 15 | + | |
| 16 | +import com.zteits.urbanops.module.workorder.dal.mysql.maininfo.MainInfoMapper; | |
| 17 | + | |
| 18 | +import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 19 | +import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.convertList; | |
| 20 | +import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.diffList; | |
| 21 | +import static com.zteits.urbanops.module.workorder.enums.ErrorCodeConstants.*; | |
| 22 | + | |
| 23 | +/** | |
| 24 | + * 工单信息 Service 实现类 | |
| 25 | + * | |
| 26 | + * @author 超级管理员 | |
| 27 | + */ | |
| 28 | +@Service | |
| 29 | +@Validated | |
| 30 | +public class MainInfoServiceImpl implements MainInfoService { | |
| 31 | + | |
| 32 | + @Resource | |
| 33 | + private MainInfoMapper mainInfoMapper; | |
| 34 | + | |
| 35 | + @Override | |
| 36 | + public Long createMainInfo(MainInfoSaveReqVO createReqVO) { | |
| 37 | + // 插入 | |
| 38 | + MainInfoDO mainInfo = BeanUtils.toBean(createReqVO, MainInfoDO.class); | |
| 39 | + mainInfoMapper.insert(mainInfo); | |
| 40 | + | |
| 41 | + // 返回 | |
| 42 | + return mainInfo.getId(); | |
| 43 | + } | |
| 44 | + | |
| 45 | + @Override | |
| 46 | + public void updateMainInfo(MainInfoSaveReqVO updateReqVO) { | |
| 47 | + // 校验存在 | |
| 48 | + validateMainInfoExists(updateReqVO.getId()); | |
| 49 | + // 更新 | |
| 50 | + MainInfoDO updateObj = BeanUtils.toBean(updateReqVO, MainInfoDO.class); | |
| 51 | + mainInfoMapper.updateById(updateObj); | |
| 52 | + } | |
| 53 | + | |
| 54 | + @Override | |
| 55 | + public void deleteMainInfo(Long id) { | |
| 56 | + // 校验存在 | |
| 57 | + validateMainInfoExists(id); | |
| 58 | + // 删除 | |
| 59 | + mainInfoMapper.deleteById(id); | |
| 60 | + } | |
| 61 | + | |
| 62 | + @Override | |
| 63 | + public void deleteMainInfoListByIds(List<Long> ids) { | |
| 64 | + // 删除 | |
| 65 | + mainInfoMapper.deleteByIds(ids); | |
| 66 | + } | |
| 67 | + | |
| 68 | + | |
| 69 | + private void validateMainInfoExists(Long id) { | |
| 70 | + if (mainInfoMapper.selectById(id) == null) { | |
| 71 | + throw exception(MAIN_INFO_NOT_EXISTS); | |
| 72 | + } | |
| 73 | + } | |
| 74 | + | |
| 75 | + @Override | |
| 76 | + public MainInfoDO getMainInfo(Long id) { | |
| 77 | + return mainInfoMapper.selectById(id); | |
| 78 | + } | |
| 79 | + | |
| 80 | + @Override | |
| 81 | + public PageResult<MainInfoDO> getMainInfoPage(MainInfoPageReqVO pageReqVO) { | |
| 82 | + return mainInfoMapper.selectPage(pageReqVO); | |
| 83 | + } | |
| 84 | + | |
| 85 | +} | |
| 0 | 86 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/materialdetail/MaterialDetailService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.service.materialdetail; | |
| 2 | + | |
| 3 | +import java.util.*; | |
| 4 | +import jakarta.validation.*; | |
| 5 | +import com.zteits.urbanops.module.workorder.controller.admin.materialdetail.vo.*; | |
| 6 | +import com.zteits.urbanops.module.workorder.dal.dataobject.materialdetail.MaterialDetailDO; | |
| 7 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 8 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 工单耗材明细 Service 接口 | |
| 12 | + * | |
| 13 | + * @author 超级管理员 | |
| 14 | + */ | |
| 15 | +public interface MaterialDetailService { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * 创建工单耗材明细 | |
| 19 | + * | |
| 20 | + * @param createReqVO 创建信息 | |
| 21 | + * @return 编号 | |
| 22 | + */ | |
| 23 | + Long createMaterialDetail(@Valid MaterialDetailSaveReqVO createReqVO); | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 更新工单耗材明细 | |
| 27 | + * | |
| 28 | + * @param updateReqVO 更新信息 | |
| 29 | + */ | |
| 30 | + void updateMaterialDetail(@Valid MaterialDetailSaveReqVO updateReqVO); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 删除工单耗材明细 | |
| 34 | + * | |
| 35 | + * @param id 编号 | |
| 36 | + */ | |
| 37 | + void deleteMaterialDetail(Long id); | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 批量删除工单耗材明细 | |
| 41 | + * | |
| 42 | + * @param ids 编号 | |
| 43 | + */ | |
| 44 | + void deleteMaterialDetailListByIds(List<Long> ids); | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 获得工单耗材明细 | |
| 48 | + * | |
| 49 | + * @param id 编号 | |
| 50 | + * @return 工单耗材明细 | |
| 51 | + */ | |
| 52 | + MaterialDetailDO getMaterialDetail(Long id); | |
| 53 | + | |
| 54 | + /** | |
| 55 | + * 获得工单耗材明细分页 | |
| 56 | + * | |
| 57 | + * @param pageReqVO 分页查询 | |
| 58 | + * @return 工单耗材明细分页 | |
| 59 | + */ | |
| 60 | + PageResult<MaterialDetailDO> getMaterialDetailPage(MaterialDetailPageReqVO pageReqVO); | |
| 61 | + | |
| 62 | +} | |
| 0 | 63 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/materialdetail/MaterialDetailServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.service.materialdetail; | |
| 2 | + | |
| 3 | +import cn.hutool.core.collection.CollUtil; | |
| 4 | +import org.springframework.stereotype.Service; | |
| 5 | +import jakarta.annotation.Resource; | |
| 6 | +import org.springframework.validation.annotation.Validated; | |
| 7 | +import org.springframework.transaction.annotation.Transactional; | |
| 8 | + | |
| 9 | +import java.util.*; | |
| 10 | +import com.zteits.urbanops.module.workorder.controller.admin.materialdetail.vo.*; | |
| 11 | +import com.zteits.urbanops.module.workorder.dal.dataobject.materialdetail.MaterialDetailDO; | |
| 12 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 13 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 14 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 15 | + | |
| 16 | +import com.zteits.urbanops.module.workorder.dal.mysql.materialdetail.MaterialDetailMapper; | |
| 17 | + | |
| 18 | +import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | |
| 19 | +import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.convertList; | |
| 20 | +import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.diffList; | |
| 21 | +import static com.zteits.urbanops.module.workorder.enums.ErrorCodeConstants.*; | |
| 22 | + | |
| 23 | +/** | |
| 24 | + * 工单耗材明细 Service 实现类 | |
| 25 | + * | |
| 26 | + * @author 超级管理员 | |
| 27 | + */ | |
| 28 | +@Service | |
| 29 | +@Validated | |
| 30 | +public class MaterialDetailServiceImpl implements MaterialDetailService { | |
| 31 | + | |
| 32 | + @Resource | |
| 33 | + private MaterialDetailMapper materialDetailMapper; | |
| 34 | + | |
| 35 | + @Override | |
| 36 | + public Long createMaterialDetail(MaterialDetailSaveReqVO createReqVO) { | |
| 37 | + // 插入 | |
| 38 | + MaterialDetailDO materialDetail = BeanUtils.toBean(createReqVO, MaterialDetailDO.class); | |
| 39 | + materialDetailMapper.insert(materialDetail); | |
| 40 | + | |
| 41 | + // 返回 | |
| 42 | + return materialDetail.getId(); | |
| 43 | + } | |
| 44 | + | |
| 45 | + @Override | |
| 46 | + public void updateMaterialDetail(MaterialDetailSaveReqVO updateReqVO) { | |
| 47 | + // 校验存在 | |
| 48 | + validateMaterialDetailExists(updateReqVO.getId()); | |
| 49 | + // 更新 | |
| 50 | + MaterialDetailDO updateObj = BeanUtils.toBean(updateReqVO, MaterialDetailDO.class); | |
| 51 | + materialDetailMapper.updateById(updateObj); | |
| 52 | + } | |
| 53 | + | |
| 54 | + @Override | |
| 55 | + public void deleteMaterialDetail(Long id) { | |
| 56 | + // 校验存在 | |
| 57 | + validateMaterialDetailExists(id); | |
| 58 | + // 删除 | |
| 59 | + materialDetailMapper.deleteById(id); | |
| 60 | + } | |
| 61 | + | |
| 62 | + @Override | |
| 63 | + public void deleteMaterialDetailListByIds(List<Long> ids) { | |
| 64 | + // 删除 | |
| 65 | + materialDetailMapper.deleteByIds(ids); | |
| 66 | + } | |
| 67 | + | |
| 68 | + | |
| 69 | + private void validateMaterialDetailExists(Long id) { | |
| 70 | + if (materialDetailMapper.selectById(id) == null) { | |
| 71 | + throw exception(MATERIAL_DETAIL_NOT_EXISTS); | |
| 72 | + } | |
| 73 | + } | |
| 74 | + | |
| 75 | + @Override | |
| 76 | + public MaterialDetailDO getMaterialDetail(Long id) { | |
| 77 | + return materialDetailMapper.selectById(id); | |
| 78 | + } | |
| 79 | + | |
| 80 | + @Override | |
| 81 | + public PageResult<MaterialDetailDO> getMaterialDetailPage(MaterialDetailPageReqVO pageReqVO) { | |
| 82 | + return materialDetailMapper.selectPage(pageReqVO); | |
| 83 | + } | |
| 84 | + | |
| 85 | +} | |
| 0 | 86 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/resources/mapper/maininfo/MainInfoMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | +<mapper namespace="com.zteits.urbanops.module.workorder.dal.mysql.maininfo.MainInfoMapper"> | |
| 4 | + | |
| 5 | + <!-- | |
| 6 | + 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 | |
| 7 | + 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 | |
| 8 | + 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 | |
| 9 | + 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ | |
| 10 | + --> | |
| 11 | + | |
| 12 | +</mapper> | |
| 0 | 13 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/resources/mapper/mapper/attachment/AttachmentMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | +<mapper namespace="com.zteits.urbanops.module.workorder.dal.mysql.attachment.AttachmentMapper"> | |
| 4 | + | |
| 5 | + <!-- | |
| 6 | + 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 | |
| 7 | + 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 | |
| 8 | + 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 | |
| 9 | + 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ | |
| 10 | + --> | |
| 11 | + | |
| 12 | +</mapper> | |
| 0 | 13 | \ No newline at end of file | ... | ... |
urbanops-module-workorder/src/main/resources/mapper/materialdetail/MaterialDetailMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | +<mapper namespace="com.zteits.urbanops.module.workorder.dal.mysql.materialdetail.MaterialDetailMapper"> | |
| 4 | + | |
| 5 | + <!-- | |
| 6 | + 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 | |
| 7 | + 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 | |
| 8 | + 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 | |
| 9 | + 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ | |
| 10 | + --> | |
| 11 | + | |
| 12 | +</mapper> | |
| 0 | 13 | \ No newline at end of file | ... | ... |
urbanops-server/pom.xml
| ... | ... | @@ -43,6 +43,13 @@ |
| 43 | 43 | <artifactId>urbanops-module-garden</artifactId> |
| 44 | 44 | <version>${revision}</version> |
| 45 | 45 | </dependency> |
| 46 | + | |
| 47 | + <!-- 工单管理 --> | |
| 48 | + <dependency> | |
| 49 | + <groupId>com.zteits.boot</groupId> | |
| 50 | + <artifactId>urbanops-module-workorder</artifactId> | |
| 51 | + <version>${revision}</version> | |
| 52 | + </dependency> | |
| 46 | 53 | <!-- 会员中心。默认注释,保证编译速度 --> |
| 47 | 54 | <!-- <dependency>--> |
| 48 | 55 | <!-- <groupId>com.zteits.boot</groupId>--> | ... | ... |