Commit 6098d61b5484e17322db731c19780c347468ebef
1 parent
a096527a
迁移
Showing
161 changed files
with
5432 additions
and
4 deletions
.gitignore
.trae/documents/兼容旧接口路径的桥接实现方案.md
0 → 100644
| 1 | +## 现状排查结论 | |
| 2 | +- `material/out/listForPage`:已迁移并存在,路径不变(POST)。位置:`controller/admin/material/MaterialOutController.java:39` | |
| 3 | +- 费用类接口已迁移到 garden 模块,但基础路径统一为 `garden/*`,查询接口统一使用 `GET /page`: | |
| 4 | + - 旧 `/costfee/departmentcost/list` → 新 `GET /garden/department-cost/page`(部门费用)位置:`controller/admin/departmentcost/DepartmentCostController.java:83` | |
| 5 | + - 旧 `/costfee/mechanicalcost/list` → 新 `GET /garden/mechanical-cost/page`(自有机械费用)位置:`controller/admin/mechanicalcost/MechanicalCostController.java:107` | |
| 6 | + - 旧 `/costfee/rentalmechanicalcost/list` → 新 `GET /garden/rental-mechanical-cost/page`(租赁机械费用)位置:`controller/admin/rentalmechanicalcost/RentalMechanicalCostController.java:99` | |
| 7 | + - 旧 `/costfee/gardenwasterecord/list` → 新 `GET /garden/waste-record/page`(园林废弃物)位置:`controller/admin/wasterecord/WasteRecordController.java:83` | |
| 8 | +- 系统用户分页:旧 `/system/user/listForPage` 不存在;新为 `GET /system/user/page`,位置:`urbanops-module-system/controller/admin/user/UserController.java:99` | |
| 9 | + | |
| 10 | +## 目标 | |
| 11 | +- 在不改动前端的情况下,兼容旧路径:为上述旧路径添加桥接(alias)接口,委托到现有服务或新路径,实现等价分页/列表能力。 | |
| 12 | + | |
| 13 | +## 实施方案 | |
| 14 | +1. 新增桥接控制器(不改现有业务控制器): | |
| 15 | + - `controller/admin/costfee/DepartmentCostBridgeController`:`@RequestMapping("/costfee/departmentcost")` | |
| 16 | + - `@GetMapping("/list")` → 适配分页 VO,内部调用 `departmentCostService.getDepartmentCostPage(...)` | |
| 17 | + - `controller/admin/costfee/MechanicalCostBridgeController`:`@RequestMapping("/costfee/mechanicalcost")` | |
| 18 | + - `@GetMapping("/list")` → 委托 `mechanicalCostService.getMechanicalCostPage(...)` | |
| 19 | + - `controller/admin/costfee/RentalMechanicalCostBridgeController`:`@RequestMapping("/costfee/rentalmechanicalcost")` | |
| 20 | + - `@GetMapping("/list")` → 委托 `rentalMechanicalCostService.getRentalMechanicalCostPage(...)` | |
| 21 | + - `controller/admin/costfee/GardenWasteRecordBridgeController`:`@RequestMapping("/costfee/gardenwasterecord")` | |
| 22 | + - `@GetMapping("/list")` → 委托 `wasteRecordService.getWasteRecordPage(...)` | |
| 23 | +2. 系统用户桥接: | |
| 24 | + - 在 `urbanops-module-system` 新增 `controller/admin/user/UserBridgeController`:`@RequestMapping("/system/user")` | |
| 25 | + - `@PostMapping("/listForPage")` → 将请求体(或表单)转换为 `UserPageReqVO`,委托 `AdminUserService.getUserPage(...)` 返回分页。 | |
| 26 | +3. 统一返回结构: | |
| 27 | + - 所有桥接接口返回 `CommonResult<PageResult<...>>`,与现有新接口保持一致;如旧前端要求表格结构,按需封装字段但不改核心分页数据。 | |
| 28 | +4. 权限与审计: | |
| 29 | + - 复用现有权限标识:`@PreAuthorize` 与对应 `garden:*` 或 `system:*` 权限,不新增冗余权限点。 | |
| 30 | +5. 兼容性细节: | |
| 31 | + - 旧接口使用 `list` 命名且可能 GET;桥接按旧签名支持 GET 并允许 query 传参;必要时支持 POST(根据旧前端调用方式)。 | |
| 32 | + - 字段名差异通过桥接层 VO 做轻量映射(如旧字段为 `pageNum/pageSize`)。 | |
| 33 | + | |
| 34 | +## 测试与验证 | |
| 35 | +- 为每个桥接接口补充最小的集成测试:校验分页入参映射、权限与返回数据结构。 | |
| 36 | +- 本地编译与启动后,用现有新接口的数据源验证桥接输出一致性。 | |
| 37 | + | |
| 38 | +## 变更范围控制 | |
| 39 | +- 不改现有业务控制器和服务实现;新增仅限桥接控制器与必要的请求 VO(轻量)。 | |
| 40 | +- 不改数据库结构与 Mapper。 | |
| 41 | + | |
| 42 | +请确认以上桥接方案;确认后我将按上述路径添加兼容接口并进行编译与验证。 | |
| 0 | 43 | \ No newline at end of file | ... | ... |
.trae/documents/继续迁移剩余旧接口到 urbanops-module-garden.md
0 → 100644
| 1 | +# 迁移计划 | |
| 2 | + | |
| 3 | +## 范围与目标 | |
| 4 | +- 将旧工程 `/old/servicemanager/src/main/java/com/servicemanager/project/` 下剩余接口完整迁移到 `urbanops-module-garden`,保持原「路径/行为」不变。 | |
| 5 | +- 统一数据表前缀为 `garden_`,对齐新模块的分层规范(controller/admin|app、service、dal/mysql、dal/dataobject、vo)。 | |
| 6 | + | |
| 7 | +## 当前进度(已完成且编译通过) | |
| 8 | +- 树档案与古树:`/business/tree/*`、`/treerecord/oldtrees/*` | |
| 9 | +- 养护计划与提交:`/maintain/plan/*`、`/app/plan/commit/*` | |
| 10 | +- 物料库存/入出库:`/material/inventory/*`、`/material/in/*`、`/material/out/*` | |
| 11 | +- 热线案件/文件/照片:`/business/hotlinecase/*`(含聚合详情 `/getInfoMore/{id}`)、`/business/file/*`、`/business/sysphoto/*` | |
| 12 | +- PC 问题管理/任务:`/pc/problem/manager/*`、`/pc/problem/task/*` | |
| 13 | +- 部门桥接、基础字典、道路、养护频次、摄像机接口等 | |
| 14 | + | |
| 15 | +## 待迁移内容 | |
| 16 | +- 绩效系列 | |
| 17 | + - `/performance/index/listForPage` | |
| 18 | + - `/performance/write/listForPage` | |
| 19 | + - `/performance/experts/listForPage` | |
| 20 | +- 项目与子项目 | |
| 21 | + - `/project/manager/listForPage` | |
| 22 | + - `/project/manager/selectProjectManagerForList` | |
| 23 | + - `/subProject/manager/listForPage` | |
| 24 | +- 物料管理剩余 | |
| 25 | + - `/material/manager/*`(分页、列表、导出) | |
| 26 | + - `/materialType/*`(大类/中类/分页、导入导出) | |
| 27 | + | |
| 28 | +## 技术方案 | |
| 29 | +- 控制层 | |
| 30 | + - 保持旧路径与 HTTP 方法不变;后台接口放 `controller/admin/*`,App 接口放 `controller/app/*`。 | |
| 31 | + - 权限注解对齐(`@PreAuthorize`),沿用旧权限字符串或等价替换。 | |
| 32 | +- 服务层 | |
| 33 | + - 迁移旧的业务服务方法,保持参数/校验/业务流程;使用新模块工具集(分页 `PageParam/PageResult`、统一响应 `CommonResult`)。 | |
| 34 | +- 数据访问层 | |
| 35 | + - Mapper 改造为 `BaseMapperX + LambdaQueryWrapperX`,SQL 条件与排序对齐旧逻辑。 | |
| 36 | + - DataObject 使用 `@TableName("garden_*")` 对齐重命名后的表。 | |
| 37 | +- VO/DTO | |
| 38 | + - 保持旧的入参/出参结构;命名与包路径迁移至新模块相应 `vo` 目录。 | |
| 39 | + | |
| 40 | +## 数据表映射 | |
| 41 | +- 旧表 `td_*/t_*` → 新表 `garden_*`(如 `td_project_manager` → `garden_project_manager`,`td_performance_index` → `garden_performance_index`,`td_material_type` → `garden_material_type` 等)。 | |
| 42 | +- 统一使用新模块审计字段(creator/updater、createTime/updateTime)与部门/公司维度(`SecurityFrameworkUtils`)。 | |
| 43 | + | |
| 44 | +## 验证与交付 | |
| 45 | +- 每批迁移完成后: | |
| 46 | + - 运行 `mvn -q -DskipTests -U -pl urbanops-module-garden -am compile` 验证编译。 | |
| 47 | + - 提供可访问端点清单与关键入参示例。 | |
| 48 | + - 对导出接口进行本地验证(返回 XLS)。 | |
| 49 | + | |
| 50 | +## 风险与处理 | |
| 51 | +- 依赖缓存损坏(如 kotlin 相关):遇到后强制更新或清理缓存后重试编译。 | |
| 52 | +- 权限字符串不一致:若旧权限在新模块中无对应,按域统一到 `garden:*:*` 规范并在说明中列出调整。 | |
| 53 | + | |
| 54 | +## 需要确认 | |
| 55 | +- 绩效/项目/物料三组是否作为本次优先批次全部迁移? | |
| 56 | +- 若有其他域需优先(例如 App 端补充查询或导入),请指出以便先行安排。 | |
| 0 | 57 | \ No newline at end of file | ... | ... |
.trae/documents/迁移并兼容 _yuanl_system_dict_data_type_{dictType} 接口.md
0 → 100644
| 1 | +## 目标 | |
| 2 | +- 提供旧路径 `/yuanl/system/dict/data/type/{dictType}` 的字典查询接口,返回与现有系统一致的字典数据列表,减少前端改动。 | |
| 3 | + | |
| 4 | +## 现状 | |
| 5 | +- 已有接口:`GET /system/dict-data/type?type=...`(App端),使用 `DictDataService.getDictDataList(...)` 并返回 `AppDictDataRespVO`。 | |
| 6 | +- 未存在 `/yuanl/system/dict/data/type/{dictType}` 旧路径。 | |
| 7 | + | |
| 8 | +## 实施方案 | |
| 9 | +- 在 `urbanops-module-system` 新增桥接控制器 `DictDataBridgeController`: | |
| 10 | + - 类级路径:`@RequestMapping("/yuanl/system/dict/data")` | |
| 11 | + - 方法:`@GetMapping("/type/{dictType}")`,`@PermitAll` | |
| 12 | + - 入参:`@PathVariable("dictType") String dictType` | |
| 13 | + - 逻辑:调用 `DictDataService.getDictDataList(CommonStatusEnum.ENABLE.getStatus(), dictType)`,返回 `List<AppDictDataRespVO>`(含 `id/label/value/dictType`)。 | |
| 14 | +- 返回结构与 `AppDictDataController` 保持一致,便于前端复用。 | |
| 15 | +- 不改动现有控制器与服务,实现最小侵入的兼容。 | |
| 16 | + | |
| 17 | +## 验证 | |
| 18 | +- 编译 `urbanops-module-system` 并启动,使用示例:`GET /yuanl/system/dict/data/type/maintaint_type`;对比 `GET /system/dict-data/type?type=maintaint_type` 结果一致。 | |
| 0 | 19 | \ No newline at end of file | ... | ... |
.vscode/settings.json
0 → 100644
urbanops-module-garden/pom.xml
| ... | ... | @@ -82,6 +82,13 @@ |
| 82 | 82 | <artifactId>velocity-engine-core</artifactId> <!-- 实现代码生成 --> |
| 83 | 83 | </dependency> |
| 84 | 84 | |
| 85 | + <!-- OkHttp 用于设备接口对接 --> | |
| 86 | + <dependency> | |
| 87 | + <groupId>com.squareup.okhttp3</groupId> | |
| 88 | + <artifactId>okhttp</artifactId> | |
| 89 | + <version>3.14.9</version> | |
| 90 | + </dependency> | |
| 91 | + | |
| 85 | 92 | <!-- 监控相关 --> |
| 86 | 93 | <dependency> |
| 87 | 94 | <groupId>com.zteits.boot</groupId> | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/base/BaseCommonController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.base; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 4 | +import com.zteits.urbanops.module.garden.controller.app.vo.DictTypeRespVO; | |
| 5 | +import com.zteits.urbanops.module.system.dal.dataobject.dict.DictDataDO; | |
| 6 | +import com.zteits.urbanops.module.system.service.dict.DictDataService; | |
| 7 | +import io.swagger.v3.oas.annotations.Operation; | |
| 8 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 9 | +import jakarta.annotation.Resource; | |
| 10 | +import org.springframework.web.bind.annotation.GetMapping; | |
| 11 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 12 | +import org.springframework.web.bind.annotation.RestController; | |
| 13 | + | |
| 14 | +import java.util.ArrayList; | |
| 15 | +import java.util.List; | |
| 16 | + | |
| 17 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 18 | + | |
| 19 | +@Tag(name = "管理后台 - 基础字典") | |
| 20 | +@RestController | |
| 21 | +@RequestMapping("/base/common") | |
| 22 | +public class BaseCommonController { | |
| 23 | + | |
| 24 | + @Resource | |
| 25 | + private DictDataService dictDataService; | |
| 26 | + | |
| 27 | + @GetMapping("/maintaint_grade/list") | |
| 28 | + @Operation(summary = "养护等级列表") | |
| 29 | + public CommonResult<List<DictTypeRespVO>> maintaintGradeList() { | |
| 30 | + return success(getDictList("maintaint_grade")); | |
| 31 | + } | |
| 32 | + | |
| 33 | + @GetMapping("/plant_type/list") | |
| 34 | + @Operation(summary = "植物类型列表") | |
| 35 | + public CommonResult<List<DictTypeRespVO>> plantTypeList() { | |
| 36 | + return success(getDictList("plant_type")); | |
| 37 | + } | |
| 38 | + | |
| 39 | + @GetMapping("/maintaint_type/list") | |
| 40 | + @Operation(summary = "养护类型列表") | |
| 41 | + public CommonResult<List<DictTypeRespVO>> maintaintTypeList() { | |
| 42 | + return success(getDictList("maintaint_type")); | |
| 43 | + } | |
| 44 | + | |
| 45 | + private List<DictTypeRespVO> getDictList(String type) { | |
| 46 | + List<DictTypeRespVO> respList = new ArrayList<>(); | |
| 47 | + List<DictDataDO> list = dictDataService.getDictDataListByDictType(type); | |
| 48 | + if (list == null || list.isEmpty()) { | |
| 49 | + return respList; | |
| 50 | + } | |
| 51 | + for (DictDataDO e : list) { | |
| 52 | + DictTypeRespVO resp = new DictTypeRespVO(); | |
| 53 | + resp.setValue(e.getValue()); | |
| 54 | + resp.setLabel(e.getLabel()); | |
| 55 | + respList.add(resp); | |
| 56 | + } | |
| 57 | + return respList; | |
| 58 | + } | |
| 59 | +} | |
| 0 | 60 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/costfee/WaterFeeBridgeController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.costfee; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 4 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.waterfee.vo.WaterFeePageReqVO; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.waterfee.WaterFeeDO; | |
| 7 | +import com.zteits.urbanops.module.garden.service.waterfee.WaterFeeService; | |
| 8 | +import io.swagger.v3.oas.annotations.Operation; | |
| 9 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 10 | +import jakarta.annotation.Resource; | |
| 11 | +import org.springframework.web.bind.annotation.GetMapping; | |
| 12 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 13 | +import org.springframework.web.bind.annotation.RestController; | |
| 14 | + | |
| 15 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 16 | + | |
| 17 | +@Tag(name = "管理后台 - 水费桥接") | |
| 18 | +@RestController | |
| 19 | +@RequestMapping("/costfee/waterfee") | |
| 20 | +public class WaterFeeBridgeController { | |
| 21 | + | |
| 22 | + @Resource | |
| 23 | + private WaterFeeService waterFeeService; | |
| 24 | + | |
| 25 | + @GetMapping("/list") | |
| 26 | + @Operation(summary = "水费录入-列表") | |
| 27 | + public CommonResult<PageResult<WaterFeeDO>> list(WaterFeePageReqVO reqVO) { | |
| 28 | + if (reqVO.getPageSize() == null || reqVO.getPageSize() <= 0) { | |
| 29 | + reqVO.setPageSize(10); | |
| 30 | + } | |
| 31 | + if (reqVO.getPageNo() == null || reqVO.getPageNo() <= 0) { | |
| 32 | + reqVO.setPageNo(1); | |
| 33 | + } | |
| 34 | + return success(waterFeeService.getWaterFeePage(reqVO)); | |
| 35 | + } | |
| 36 | +} | |
| 0 | 37 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/departmentcost/DepartmentCostController.java
| ... | ... | @@ -31,7 +31,7 @@ import com.zteits.urbanops.module.garden.service.departmentcost.DepartmentCostSe |
| 31 | 31 | |
| 32 | 32 | @Tag(name = "管理后台 - 部门费用录入") |
| 33 | 33 | @RestController |
| 34 | -@RequestMapping("/garden/department-cost") | |
| 34 | +@RequestMapping({"/garden/department-cost", "/costfee/departmentcost"}) | |
| 35 | 35 | @Validated |
| 36 | 36 | public class DepartmentCostController { |
| 37 | 37 | |
| ... | ... | @@ -88,6 +88,14 @@ public class DepartmentCostController { |
| 88 | 88 | return success(BeanUtils.toBean(pageResult, DepartmentCostRespVO.class)); |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | + @GetMapping("/list") | |
| 92 | + @Operation(summary = "部门费用录入-列表(兼容旧路径)") | |
| 93 | + @PreAuthorize("@ss.hasPermission('garden:department-cost:query')") | |
| 94 | + public CommonResult<PageResult<DepartmentCostRespVO>> list(@Valid DepartmentCostPageReqVO pageReqVO) { | |
| 95 | + PageResult<DepartmentCostDO> pageResult = departmentCostService.getDepartmentCostPage(pageReqVO); | |
| 96 | + return success(BeanUtils.toBean(pageResult, DepartmentCostRespVO.class)); | |
| 97 | + } | |
| 98 | + | |
| 91 | 99 | @GetMapping("/export-excel") |
| 92 | 100 | @Operation(summary = "导出部门费用录入 Excel") |
| 93 | 101 | @PreAuthorize("@ss.hasPermission('garden:department-cost:export')") | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/device/CameraRecorderController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.device; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 4 | +import io.swagger.v3.oas.annotations.Operation; | |
| 5 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 6 | +import org.springframework.web.bind.annotation.*; | |
| 7 | + | |
| 8 | +import java.util.Collections; | |
| 9 | +import java.util.Map; | |
| 10 | + | |
| 11 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 12 | + | |
| 13 | +@Tag(name = "管理后台 - 执法记录仪") | |
| 14 | +@RestController | |
| 15 | +@RequestMapping("/camera/recorder") | |
| 16 | +public class CameraRecorderController { | |
| 17 | + | |
| 18 | + @GetMapping("/device/page") | |
| 19 | + @Operation(summary = "设备-分页查询") | |
| 20 | + public CommonResult<Map<String,Object>> devicePage(@RequestParam(value = "device_name", required = false) String deviceName, | |
| 21 | + @RequestParam(value = "enter_id", required = false) Integer enterId, | |
| 22 | + @RequestParam(value = "group_id", required = false) Integer groupId, | |
| 23 | + @RequestParam("page") Integer page, | |
| 24 | + @RequestParam("pageSize") Integer pageSize) { | |
| 25 | + return success(Collections.emptyMap()); | |
| 26 | + } | |
| 27 | + | |
| 28 | + @PostMapping("/device/recordFileList") | |
| 29 | + @Operation(summary = "设备-设备执法记录信息") | |
| 30 | + public CommonResult<Map<String,Object>> deviceRecordFileList(@RequestBody Map<String,Object> req) { | |
| 31 | + return success(Collections.emptyMap()); | |
| 32 | + } | |
| 33 | + | |
| 34 | + @GetMapping("/group/group_list") | |
| 35 | + @Operation(summary = "调度组-分页") | |
| 36 | + public CommonResult<Map<String,Object>> groupList(@RequestParam(value = "group_name", required = false) String groupName, | |
| 37 | + @RequestParam("page") Integer page, | |
| 38 | + @RequestParam("pageSize") Integer pageSize) { | |
| 39 | + return success(Collections.emptyMap()); | |
| 40 | + } | |
| 41 | +} | |
| 0 | 42 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/device/CameraRecorderOldController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.device; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 4 | +import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; | |
| 5 | +import com.zteits.urbanops.module.garden.service.device.CameraRecorderHelper; | |
| 6 | +import com.zteits.urbanops.module.garden.controller.admin.device.vo.RecordFileListReq; | |
| 7 | +import io.swagger.v3.oas.annotations.Operation; | |
| 8 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 9 | +import jakarta.annotation.Resource; | |
| 10 | +import jakarta.validation.Valid; | |
| 11 | +import org.springframework.web.bind.annotation.*; | |
| 12 | + | |
| 13 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 14 | + | |
| 15 | +@Tag(name = "管理后台 - 执法记录仪") | |
| 16 | +@RestController | |
| 17 | +@RequestMapping("/camera/recorder") | |
| 18 | +public class CameraRecorderOldController { | |
| 19 | + | |
| 20 | + @Resource | |
| 21 | + private CameraRecorderHelper cameraRecorderHelper; | |
| 22 | + | |
| 23 | + @GetMapping("/device/page") | |
| 24 | + @Operation(summary = "设备-分页查询") | |
| 25 | + public CommonResult<Object> devicePage(@RequestParam(value = "device_name", required = false) String deviceName, | |
| 26 | + @RequestParam(value = "enter_id", required = false) Integer enterId, | |
| 27 | + @RequestParam(value = "group_id", required = false) Integer groupId, | |
| 28 | + @RequestParam("page") Integer page, | |
| 29 | + @RequestParam("pageSize") Integer pageSize) { | |
| 30 | + Long companyId = SecurityFrameworkUtils.getLoginUserDeptId(); | |
| 31 | + return cameraRecorderHelper.devicePage(deviceName, enterId, groupId, page, pageSize, companyId); | |
| 32 | + } | |
| 33 | + | |
| 34 | + @PostMapping("/device/recordFileList") | |
| 35 | + @Operation(summary = "设备-设备执法记录信息") | |
| 36 | + public CommonResult<Object> deviceRecordFileList(@Valid @RequestBody RecordFileListReq req) { | |
| 37 | + Long companyId = SecurityFrameworkUtils.getLoginUserDeptId(); | |
| 38 | + return cameraRecorderHelper.recordFileList(req, companyId); | |
| 39 | + } | |
| 40 | + | |
| 41 | + @GetMapping("/group/group_list") | |
| 42 | + @Operation(summary = "调度组-分页") | |
| 43 | + public CommonResult<Object> groupList(@RequestParam(value = "group_name", required = false) String groupName, | |
| 44 | + @RequestParam("page") Integer page, | |
| 45 | + @RequestParam("pageSize") Integer pageSize) { | |
| 46 | + Long companyId = SecurityFrameworkUtils.getLoginUserDeptId(); | |
| 47 | + return cameraRecorderHelper.groupList(groupName, page, pageSize, companyId); | |
| 48 | + } | |
| 49 | +} | |
| 0 | 50 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/device/vo/RecordFileListReq.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.device.vo; | |
| 2 | + | |
| 3 | +import jakarta.validation.constraints.NotEmpty; | |
| 4 | +import lombok.Data; | |
| 5 | + | |
| 6 | +@Data | |
| 7 | +public class RecordFileListReq { | |
| 8 | + @NotEmpty | |
| 9 | + public String st; | |
| 10 | + @NotEmpty | |
| 11 | + public String et; | |
| 12 | + public String keywords; | |
| 13 | + public Integer page; | |
| 14 | + public Integer pageSize; | |
| 15 | + public Long groupId; | |
| 16 | + public String devId; | |
| 17 | +} | |
| 0 | 18 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/gps/UserGpsController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.gps; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 4 | +import com.zteits.urbanops.module.garden.controller.admin.gps.vo.UserGpsReqVO; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.app.vo.UserGpsRespVO; | |
| 6 | +import com.zteits.urbanops.module.garden.service.usergps.UserGpsService; | |
| 7 | +import io.swagger.v3.oas.annotations.Operation; | |
| 8 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 9 | +import jakarta.annotation.Resource; | |
| 10 | +import jakarta.validation.Valid; | |
| 11 | +import org.springframework.web.bind.annotation.PostMapping; | |
| 12 | +import org.springframework.web.bind.annotation.RequestBody; | |
| 13 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 14 | +import org.springframework.web.bind.annotation.RestController; | |
| 15 | + | |
| 16 | +import java.util.List; | |
| 17 | + | |
| 18 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 19 | + | |
| 20 | +@Tag(name = "管理后台 - 用户经纬度") | |
| 21 | +@RestController | |
| 22 | +@RequestMapping("/user/gps") | |
| 23 | +public class UserGpsController { | |
| 24 | + | |
| 25 | + @Resource | |
| 26 | + private UserGpsService userGpsService; | |
| 27 | + | |
| 28 | + @PostMapping("/list") | |
| 29 | + @Operation(summary = "用户经纬度-查询") | |
| 30 | + public CommonResult<List<UserGpsRespVO>> list(@Valid @RequestBody UserGpsReqVO reqVO) { | |
| 31 | + return success(userGpsService.selectUserGpsList(reqVO.getUserId(), reqVO.getBeginTime(), reqVO.getEndTime())); | |
| 32 | + } | |
| 33 | +} | |
| 0 | 34 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/gps/vo/UserGpsReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.gps.vo; | |
| 2 | + | |
| 3 | +import jakarta.validation.constraints.NotEmpty; | |
| 4 | +import jakarta.validation.constraints.NotNull; | |
| 5 | +import lombok.Data; | |
| 6 | + | |
| 7 | +@Data | |
| 8 | +public class UserGpsReqVO { | |
| 9 | + @NotNull | |
| 10 | + private Long userId; | |
| 11 | + @NotEmpty | |
| 12 | + private String beginTime; | |
| 13 | + @NotEmpty | |
| 14 | + private String endTime; | |
| 15 | +} | |
| 0 | 16 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/homepage/MaintainSummaryController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.homepage; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 4 | +import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.homepage.vo.CommitCountByCompanyReqVO; | |
| 6 | +import com.zteits.urbanops.module.garden.controller.admin.homepage.vo.HomePageSummaryReqVO; | |
| 7 | +import com.zteits.urbanops.module.garden.controller.admin.homepage.vo.MaintainProportionReqVO; | |
| 8 | +import com.zteits.urbanops.module.garden.service.homepage.MaintainSummaryService; | |
| 9 | +import io.swagger.v3.oas.annotations.Operation; | |
| 10 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 11 | +import jakarta.annotation.Resource; | |
| 12 | +import jakarta.validation.Valid; | |
| 13 | +import org.springframework.web.bind.annotation.PostMapping; | |
| 14 | +import org.springframework.web.bind.annotation.RequestBody; | |
| 15 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 16 | +import org.springframework.web.bind.annotation.RestController; | |
| 17 | + | |
| 18 | +import java.util.List; | |
| 19 | +import java.util.Map; | |
| 20 | + | |
| 21 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 22 | + | |
| 23 | +@Tag(name = "管理后台 - 首页汇总") | |
| 24 | +@RestController | |
| 25 | +@RequestMapping("/homePage/summary") | |
| 26 | +public class MaintainSummaryController { | |
| 27 | + | |
| 28 | + @Resource | |
| 29 | + private MaintainSummaryService maintainSummaryService; | |
| 30 | + | |
| 31 | + @PostMapping("/getSummary") | |
| 32 | + @Operation(summary = "首页汇总") | |
| 33 | + public CommonResult<Map<String, Object>> getSummary(@Valid @RequestBody HomePageSummaryReqVO req) { | |
| 34 | + Long companyId = SecurityFrameworkUtils.getLoginUserDeptId(); | |
| 35 | + return success(maintainSummaryService.selectMaintainSummary(req, companyId)); | |
| 36 | + } | |
| 37 | + | |
| 38 | + @PostMapping("/getSummary/maintain_type") | |
| 39 | + @Operation(summary = "首页汇总-养护类型统计") | |
| 40 | + public CommonResult<Map<String, List<Map<String, Object>>>> getSummaryByMaintainType(@Valid @RequestBody HomePageSummaryReqVO req) { | |
| 41 | + Long companyId = SecurityFrameworkUtils.getLoginUserDeptId(); | |
| 42 | + return success(maintainSummaryService.getSummaryByMaintainType(req, companyId)); | |
| 43 | + } | |
| 44 | + | |
| 45 | + @PostMapping("/getSummary/maintain_type/proportion") | |
| 46 | + @Operation(summary = "首页汇总-养护类型占比") | |
| 47 | + public CommonResult<List<Map<String, Object>>> getSummaryByMaintainProportion(@Valid @RequestBody HomePageSummaryReqVO req) { | |
| 48 | + Long companyId = SecurityFrameworkUtils.getLoginUserDeptId(); | |
| 49 | + return success(maintainSummaryService.getSummaryByMaintainProportion(req, companyId)); | |
| 50 | + } | |
| 51 | + | |
| 52 | + @PostMapping("/getSummary/plant_type/proportion") | |
| 53 | + @Operation(summary = "首页汇总-植物类型占比") | |
| 54 | + public CommonResult<List<Map<String, Object>>> getSummaryByPlantProportion(@Valid @RequestBody HomePageSummaryReqVO req) { | |
| 55 | + Long companyId = SecurityFrameworkUtils.getLoginUserDeptId(); | |
| 56 | + return success(maintainSummaryService.getSummaryByPlantProportion(req, companyId)); | |
| 57 | + } | |
| 58 | + | |
| 59 | + @PostMapping("/getSummary/company") | |
| 60 | + @Operation(summary = "首页汇总-按公司统计") | |
| 61 | + public CommonResult<Map<String, Object>> getSummaryByCompany(@Valid @RequestBody HomePageSummaryReqVO req) { | |
| 62 | + Long companyId = SecurityFrameworkUtils.getLoginUserDeptId(); | |
| 63 | + return success(maintainSummaryService.selectSummaryByCompany(req, companyId)); | |
| 64 | + } | |
| 65 | + | |
| 66 | + @PostMapping("/proportion/by/company") | |
| 67 | + @Operation(summary = "首页汇总-按公司统计提交量占比") | |
| 68 | + public CommonResult<List<Map<String, Object>>> proportionByCompany(@Valid @RequestBody HomePageSummaryReqVO req) { | |
| 69 | + return success(maintainSummaryService.getProportionByCompany(req.beginTime, req.endTime)); | |
| 70 | + } | |
| 71 | + | |
| 72 | + @PostMapping("/commitCount/by/company") | |
| 73 | + @Operation(summary = "按公司统计-提交工单数量") | |
| 74 | + public CommonResult<List<Map<String, Object>>> getCommitCountByCompany(@Valid @RequestBody CommitCountByCompanyReqVO req) { | |
| 75 | + return success(maintainSummaryService.getCommitCountByCompany(req)); | |
| 76 | + } | |
| 77 | + | |
| 78 | + @PostMapping("/pressing_type/by/company") | |
| 79 | + @Operation(summary = "按公司统计-紧急程度占比") | |
| 80 | + public CommonResult<List<Map<String, Object>>> getPressingTypeByCompany(@Valid @RequestBody CommitCountByCompanyReqVO req) { | |
| 81 | + return success(maintainSummaryService.getPressingTypeByCompany(req)); | |
| 82 | + } | |
| 83 | + | |
| 84 | + @PostMapping("/process/order/xc") | |
| 85 | + @Operation(summary = "个人-巡查处理工单量排名") | |
| 86 | + public CommonResult<List<Map<String, Object>>> getXcProcessOrder(@Valid @RequestBody CommitCountByCompanyReqVO req) { | |
| 87 | + Long companyId = SecurityFrameworkUtils.getLoginUserDeptId(); | |
| 88 | + return success(maintainSummaryService.getXcProcessOrder(companyId, req.beginTime, req.endTime)); | |
| 89 | + } | |
| 90 | + | |
| 91 | + @PostMapping("/process/order/yh") | |
| 92 | + @Operation(summary = "个人-养护处理工单量排名") | |
| 93 | + public CommonResult<List<Map<String, Object>>> getProcessOrderReturn(@Valid @RequestBody CommitCountByCompanyReqVO req) { | |
| 94 | + Long companyId = SecurityFrameworkUtils.getLoginUserDeptId(); | |
| 95 | + return success(maintainSummaryService.getProcessOrderReturn(companyId, req.beginTime, req.endTime)); | |
| 96 | + } | |
| 97 | + | |
| 98 | + @PostMapping("/commitCount/group/commitDate") | |
| 99 | + @Operation(summary = "按时间统计-工单提交量") | |
| 100 | + public CommonResult<Map<String, List<Object>>> getCommitCountByTime(@Valid @RequestBody CommitCountByCompanyReqVO req) { | |
| 101 | + Long companyId = SecurityFrameworkUtils.getLoginUserDeptId(); | |
| 102 | + return success(maintainSummaryService.getCommitCountByTime(companyId, req)); | |
| 103 | + } | |
| 104 | + | |
| 105 | + @PostMapping("/orderList/by/status") | |
| 106 | + @Operation(summary = "按单位-工单处理情况") | |
| 107 | + public CommonResult<List<Map<String, Object>>> getOrderList(@Valid @RequestBody MaintainProportionReqVO req) { | |
| 108 | + Long companyId = SecurityFrameworkUtils.getLoginUserDeptId(); | |
| 109 | + return success(maintainSummaryService.getOrderList(companyId, req.getTaskStatus())); | |
| 110 | + } | |
| 111 | + | |
| 112 | + @PostMapping("/maintainTypeCount") | |
| 113 | + @Operation(summary = "首页汇总-养护类型统计") | |
| 114 | + public CommonResult<Map<String, Object>> maintainTypeAndGrowthRate(@Valid @RequestBody HomePageSummaryReqVO req) { | |
| 115 | + Long companyId = SecurityFrameworkUtils.getLoginUserDeptId(); | |
| 116 | + return success(maintainSummaryService.getSummaryByMaintainTypeAndGrowthRate(req, companyId)); | |
| 117 | + } | |
| 118 | +} | |
| 0 | 119 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/homepage/vo/CommitCountByCompanyReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.homepage.vo; | |
| 2 | + | |
| 3 | +import jakarta.validation.constraints.NotEmpty; | |
| 4 | +import lombok.Data; | |
| 5 | + | |
| 6 | +@Data | |
| 7 | +public class CommitCountByCompanyReqVO { | |
| 8 | + @NotEmpty | |
| 9 | + public String beginTime; | |
| 10 | + @NotEmpty | |
| 11 | + public String endTime; | |
| 12 | +} | |
| 0 | 13 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/homepage/vo/HomePageSummaryReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.homepage.vo; | |
| 2 | + | |
| 3 | +import jakarta.validation.constraints.NotEmpty; | |
| 4 | +import lombok.Data; | |
| 5 | + | |
| 6 | +@Data | |
| 7 | +public class HomePageSummaryReqVO { | |
| 8 | + @NotEmpty | |
| 9 | + public String beginTime; | |
| 10 | + @NotEmpty | |
| 11 | + public String endTime; | |
| 12 | +} | |
| 0 | 13 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/homepage/vo/MaintainProportionReqVO.java
0 → 100644
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotline/HotlineCaseAdminController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.hotline; | |
| 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.module.garden.dal.dataobject.hotline.HotlineCaseDO; | |
| 8 | +import com.zteits.urbanops.module.garden.service.hotline.HotlineCaseService; | |
| 9 | +import io.swagger.v3.oas.annotations.Operation; | |
| 10 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 11 | +import jakarta.annotation.Resource; | |
| 12 | +import jakarta.servlet.http.HttpServletResponse; | |
| 13 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 14 | +import org.springframework.web.bind.annotation.*; | |
| 15 | + | |
| 16 | +import java.io.IOException; | |
| 17 | +import java.util.List; | |
| 18 | + | |
| 19 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 20 | +import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 21 | +import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; | |
| 22 | + | |
| 23 | +@Tag(name = "管理后台 - 12345案件信息") | |
| 24 | +@RestController | |
| 25 | +@RequestMapping("/business/hotlinecase") | |
| 26 | +public class HotlineCaseAdminController { | |
| 27 | + | |
| 28 | + @Resource | |
| 29 | + private HotlineCaseService service; | |
| 30 | + | |
| 31 | + @GetMapping("/list") | |
| 32 | + @Operation(summary = "查询列表") | |
| 33 | + @PreAuthorize("@ss.hasPermission('business:hotlinecase:list')") | |
| 34 | + public CommonResult<PageResult<HotlineCaseDO>> list(HotlineCaseDO where, | |
| 35 | + @RequestParam(value = "pageNum", required = false) Integer pageNum, | |
| 36 | + @RequestParam(value = "pageSize", required = false) Integer pageSize) { | |
| 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 | + @PostMapping("export") | |
| 44 | + @Operation(summary = "导出列表") | |
| 45 | + @PreAuthorize("@ss.hasPermission('business:hotlinecase:export')") | |
| 46 | + @ApiAccessLog(operateType = EXPORT) | |
| 47 | + public void export(HotlineCaseDO where, HttpServletResponse response) throws IOException { | |
| 48 | + List<HotlineCaseDO> list = service.selectPage(new PageParam(), where).getList(); | |
| 49 | + ExcelUtils.write(response, "12345案件信息.xls", "数据", HotlineCaseDO.class, list); | |
| 50 | + } | |
| 51 | + | |
| 52 | + @GetMapping("/{id}") | |
| 53 | + @Operation(summary = "详情") | |
| 54 | + @PreAuthorize("@ss.hasPermission('business:hotlinecase:query')") | |
| 55 | + public CommonResult<HotlineCaseDO> getInfo(@PathVariable("id") String id) { | |
| 56 | + return success(service.selectById(id)); | |
| 57 | + } | |
| 58 | + | |
| 59 | + @GetMapping("/getInfoMore/{id}") | |
| 60 | + @Operation(summary = "详情(含附件与照片)") | |
| 61 | + @PreAuthorize("@ss.hasPermission('business:hotlinecase:query')") | |
| 62 | + public CommonResult<com.zteits.urbanops.module.garden.controller.admin.hotline.vo.HotlineCaseDetailResp> getInfoMore(@PathVariable("id") String id) { | |
| 63 | + return success(service.getDetail(id)); | |
| 64 | + } | |
| 65 | + | |
| 66 | + @PostMapping | |
| 67 | + @Operation(summary = "新增") | |
| 68 | + @PreAuthorize("@ss.hasPermission('business:hotlinecase:add')") | |
| 69 | + public CommonResult<Boolean> add(@RequestBody HotlineCaseDO entity) { | |
| 70 | + return success(service.insert(entity)); | |
| 71 | + } | |
| 72 | + | |
| 73 | + @PutMapping | |
| 74 | + @Operation(summary = "修改") | |
| 75 | + @PreAuthorize("@ss.hasPermission('business:hotlinecase:edit')") | |
| 76 | + public CommonResult<Boolean> edit(@RequestBody HotlineCaseDO entity) { | |
| 77 | + return success(service.update(entity)); | |
| 78 | + } | |
| 79 | + | |
| 80 | + @DeleteMapping("/{ids}") | |
| 81 | + @Operation(summary = "删除") | |
| 82 | + @PreAuthorize("@ss.hasPermission('business:hotlinecase:remove')") | |
| 83 | + public CommonResult<Boolean> remove(@PathVariable List<String> ids) { | |
| 84 | + return success(service.deleteByIds(ids)); | |
| 85 | + } | |
| 86 | +} | |
| 0 | 87 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotline/HotlineCaseController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.hotline; | |
| 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 io.swagger.v3.oas.annotations.Operation; | |
| 7 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 8 | +import org.springframework.web.bind.annotation.GetMapping; | |
| 9 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 10 | +import org.springframework.web.bind.annotation.RequestParam; | |
| 11 | +import org.springframework.web.bind.annotation.RestController; | |
| 12 | + | |
| 13 | +import java.util.Collections; | |
| 14 | +import java.util.List; | |
| 15 | +import java.util.Map; | |
| 16 | + | |
| 17 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 18 | + | |
| 19 | +@Tag(name = "管理后台 - 热线工单") | |
| 20 | +@RestController | |
| 21 | +@RequestMapping("/business/hotlinecase-compat") | |
| 22 | +public class HotlineCaseController { | |
| 23 | + | |
| 24 | + @GetMapping("/list") | |
| 25 | + @Operation(summary = "热线工单-列表") | |
| 26 | + public CommonResult<PageResult<Map<String, Object>>> list(@RequestParam(value = "page", required = false) Integer page, | |
| 27 | + @RequestParam(value = "pageSize", required = false) Integer pageSize) { | |
| 28 | + List<Map<String, Object>> records = Collections.emptyList(); | |
| 29 | + long total = 0L; | |
| 30 | + return success(new PageResult<>(records, total)); | |
| 31 | + } | |
| 32 | +} | |
| 0 | 33 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotline/HotlineFileController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.hotline; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 4 | +import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; | |
| 5 | +import com.zteits.urbanops.module.garden.dal.dataobject.hotline.HotlineFileDO; | |
| 6 | +import com.zteits.urbanops.module.garden.service.hotline.HotlineFileService; | |
| 7 | +import io.swagger.v3.oas.annotations.Operation; | |
| 8 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 9 | +import jakarta.annotation.Resource; | |
| 10 | +import org.springframework.web.bind.annotation.*; | |
| 11 | +import org.springframework.web.multipart.MultipartFile; | |
| 12 | + | |
| 13 | +import java.io.IOException; | |
| 14 | +import java.util.Arrays; | |
| 15 | +import java.util.List; | |
| 16 | + | |
| 17 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 18 | + | |
| 19 | +@Tag(name = "管理后台 - 12345案件-文件") | |
| 20 | +@RestController | |
| 21 | +@RequestMapping("/business/file") | |
| 22 | +public class HotlineFileController { | |
| 23 | + | |
| 24 | + @Resource | |
| 25 | + private HotlineFileService hotlineFileService; | |
| 26 | + | |
| 27 | + @PostMapping("/parseFile") | |
| 28 | + @Operation(summary = "解析word文档") | |
| 29 | + public CommonResult<Object> parseFile(@RequestParam("file") MultipartFile file) throws Exception { | |
| 30 | + return success(hotlineFileService.parseFile(file)); | |
| 31 | + } | |
| 32 | + | |
| 33 | + @GetMapping("/list") | |
| 34 | + @Operation(summary = "文件-列表") | |
| 35 | + public CommonResult<List<HotlineFileDO>> list(HotlineFileDO where) { | |
| 36 | + return success(hotlineFileService.selectList(where)); | |
| 37 | + } | |
| 38 | + | |
| 39 | + @GetMapping("/export") | |
| 40 | + @Operation(summary = "文件-导出") | |
| 41 | + public void export(HotlineFileDO where, jakarta.servlet.http.HttpServletResponse response) throws IOException { | |
| 42 | + List<HotlineFileDO> list = hotlineFileService.selectList(where); | |
| 43 | + ExcelUtils.write(response, "file.xls", "数据", HotlineFileDO.class, list); | |
| 44 | + } | |
| 45 | + | |
| 46 | + @GetMapping("/{caseid}") | |
| 47 | + @Operation(summary = "文件-详情") | |
| 48 | + public CommonResult<HotlineFileDO> getInfo(@PathVariable("caseid") String caseid) { | |
| 49 | + return success(hotlineFileService.selectById(caseid)); | |
| 50 | + } | |
| 51 | + | |
| 52 | + @PostMapping | |
| 53 | + @Operation(summary = "文件-新增") | |
| 54 | + public CommonResult<Boolean> add(@RequestBody HotlineFileDO entity) { | |
| 55 | + return success(hotlineFileService.insert(entity)); | |
| 56 | + } | |
| 57 | + | |
| 58 | + @PutMapping | |
| 59 | + @Operation(summary = "文件-修改") | |
| 60 | + public CommonResult<Boolean> edit(@RequestBody HotlineFileDO entity) { | |
| 61 | + return success(hotlineFileService.update(entity)); | |
| 62 | + } | |
| 63 | + | |
| 64 | + @DeleteMapping("/{caseids}") | |
| 65 | + @Operation(summary = "文件-删除") | |
| 66 | + public CommonResult<Boolean> remove(@PathVariable String[] caseids) { | |
| 67 | + return success(hotlineFileService.deleteByIds(Arrays.asList(caseids))); | |
| 68 | + } | |
| 69 | +} | |
| 0 | 70 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotline/vo/HotlineCaseDetailResp.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.hotline.vo; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.module.garden.dal.dataobject.hotline.HotlineCaseDO; | |
| 4 | +import com.zteits.urbanops.module.garden.dal.dataobject.hotline.HotlineFileDO; | |
| 5 | +import com.zteits.urbanops.module.garden.dal.dataobject.photo.SysPhotoDO; | |
| 6 | +import lombok.Data; | |
| 7 | + | |
| 8 | +import java.util.List; | |
| 9 | + | |
| 10 | +@Data | |
| 11 | +public class HotlineCaseDetailResp { | |
| 12 | + private HotlineCaseDO caseInfo; | |
| 13 | + private List<HotlineFileDO> files; | |
| 14 | + private List<SysPhotoDO> photos; | |
| 15 | +} | |
| 0 | 16 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/maintainplan/MaintainPlanController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.maintainplan; | |
| 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.security.core.util.SecurityFrameworkUtils; | |
| 6 | +import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.MaintainPlanAddReqVO; | |
| 7 | +import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.MaintainPlanForPageReqVO; | |
| 8 | +import com.zteits.urbanops.module.garden.dal.dataobject.maintainplan.MaintainPlanDO; | |
| 9 | +import com.zteits.urbanops.module.garden.service.maintainplan.MaintainPlanService; | |
| 10 | +import io.swagger.v3.oas.annotations.Operation; | |
| 11 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 12 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 13 | +import jakarta.annotation.Resource; | |
| 14 | +import jakarta.validation.Valid; | |
| 15 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 16 | +import org.springframework.web.bind.annotation.*; | |
| 17 | + | |
| 18 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 19 | + | |
| 20 | +@Tag(name = "管理后台 - 养护计划") | |
| 21 | +@RestController | |
| 22 | +@RequestMapping("/maintain/plan") | |
| 23 | +public class MaintainPlanController { | |
| 24 | + | |
| 25 | + @Resource | |
| 26 | + private MaintainPlanService maintainPlanService; | |
| 27 | + @Resource | |
| 28 | + private com.zteits.urbanops.module.garden.service.plancommit.MaintainPlanCommitDetailService maintainPlanCommitDetailService; | |
| 29 | + | |
| 30 | + @PostMapping("/listForPage") | |
| 31 | + @Operation(summary = "养护计划-分页查询") | |
| 32 | + @PreAuthorize("@ss.hasPermission('garden:maintain-plan:query')") | |
| 33 | + public CommonResult<PageResult<MaintainPlanDO>> listForPage(@Valid @RequestBody MaintainPlanForPageReqVO reqVO) { | |
| 34 | + return success(maintainPlanService.selectPage(reqVO)); | |
| 35 | + } | |
| 36 | + | |
| 37 | + @GetMapping("/detail") | |
| 38 | + @Operation(summary = "养护计划-对象明细") | |
| 39 | + @Parameter(name = "plan_no", description = "编码", required = true) | |
| 40 | + @PreAuthorize("@ss.hasPermission('garden:maintain-plan:query')") | |
| 41 | + public CommonResult<MaintainPlanDO> detail(@RequestParam("plan_no") String planNo) { | |
| 42 | + return success(maintainPlanService.selectByPlanNo(planNo)); | |
| 43 | + } | |
| 44 | + | |
| 45 | + @PostMapping("/add") | |
| 46 | + @Operation(summary = "养护计划-添加") | |
| 47 | + @PreAuthorize("@ss.hasPermission('garden:maintain-plan:create')") | |
| 48 | + public CommonResult<Boolean> add(@Valid @RequestBody MaintainPlanAddReqVO reqVO) { | |
| 49 | + Long companyId = SecurityFrameworkUtils.getLoginUserDeptId(); | |
| 50 | + Long deptId = SecurityFrameworkUtils.getLoginUserDeptId(); | |
| 51 | + return success(maintainPlanService.insert(reqVO, companyId, deptId)); | |
| 52 | + } | |
| 53 | + | |
| 54 | + @GetMapping("/deleteById") | |
| 55 | + @Operation(summary = "养护计划-删除") | |
| 56 | + @PreAuthorize("@ss.hasPermission('garden:maintain-plan:delete')") | |
| 57 | + public CommonResult<Boolean> deleteById(@RequestParam("id") Long id) { | |
| 58 | + return success(maintainPlanService.deleteById(id)); | |
| 59 | + } | |
| 60 | + | |
| 61 | + @PostMapping("/yh/listForPage") | |
| 62 | + @Operation(summary = "PC养护计划提交记录-分页查询") | |
| 63 | + @PreAuthorize("@ss.hasPermission('garden:maintain-plan:query')") | |
| 64 | + public CommonResult<com.zteits.urbanops.framework.common.pojo.PageResult<com.zteits.urbanops.module.garden.controller.app.vo.PlanTaskCommitDetailPageRespVO>> yhListForPage(@RequestBody com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.AdminPlanYhCommitDetailPageReqVO reqVO) { | |
| 65 | + com.zteits.urbanops.framework.common.pojo.PageParam page = new com.zteits.urbanops.framework.common.pojo.PageParam(); | |
| 66 | + page.setPageNo(reqVO.getPageNo()); | |
| 67 | + page.setPageSize(reqVO.getPageSize()); | |
| 68 | + com.zteits.urbanops.module.garden.controller.app.vo.PlanYhCommitDetailPageReqVO where = new com.zteits.urbanops.module.garden.controller.app.vo.PlanYhCommitDetailPageReqVO(); | |
| 69 | + where.setPageNo(reqVO.getPageNo()); | |
| 70 | + where.setPageSize(reqVO.getPageSize()); | |
| 71 | + where.setCompanyId(reqVO.getCompanyId()); | |
| 72 | + return success(maintainPlanCommitDetailService.pageListYH(page, where)); | |
| 73 | + } | |
| 74 | +} | |
| 0 | 75 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/maintainplan/vo/AdminPlanYhCommitDetailPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 4 | +import lombok.Data; | |
| 5 | + | |
| 6 | +@Data | |
| 7 | +public class AdminPlanYhCommitDetailPageReqVO extends PageParam { | |
| 8 | + private Long companyId; | |
| 9 | +} | |
| 0 | 10 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/maintainplan/vo/MaintainPlanAddReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo; | |
| 2 | + | |
| 3 | +import jakarta.validation.constraints.NotEmpty; | |
| 4 | +import jakarta.validation.constraints.NotNull; | |
| 5 | +import lombok.Data; | |
| 6 | + | |
| 7 | +@Data | |
| 8 | +public class MaintainPlanAddReqVO { | |
| 9 | + @NotEmpty | |
| 10 | + private String planNo; | |
| 11 | + @NotEmpty | |
| 12 | + private String planName; | |
| 13 | + @NotNull | |
| 14 | + private Integer type; | |
| 15 | +} | |
| 0 | 16 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/maintainplan/vo/MaintainPlanForPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 4 | +import lombok.Data; | |
| 5 | + | |
| 6 | +@Data | |
| 7 | +public class MaintainPlanForPageReqVO extends PageParam { | |
| 8 | + private Integer type; | |
| 9 | + private String planName; | |
| 10 | +} | |
| 0 | 11 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/maintainrate/MaintainRateController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.maintainrate; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 4 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 5 | +import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; | |
| 6 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 7 | +import com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo.MaintainRatePageReqVO; | |
| 8 | +import com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo.MaintainRateReqVO; | |
| 9 | +import com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo.MaintainRateRespVO; | |
| 10 | +import com.zteits.urbanops.module.garden.dal.dataobject.maintainrate.MaintainRateDO; | |
| 11 | +import com.zteits.urbanops.module.garden.service.maintainrate.MaintainRateService; | |
| 12 | +import io.swagger.v3.oas.annotations.Operation; | |
| 13 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 14 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 15 | +import jakarta.annotation.Resource; | |
| 16 | +import jakarta.servlet.http.HttpServletResponse; | |
| 17 | +import jakarta.validation.Valid; | |
| 18 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 19 | +import org.springframework.web.bind.annotation.*; | |
| 20 | + | |
| 21 | +import java.io.IOException; | |
| 22 | +import java.util.List; | |
| 23 | + | |
| 24 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 25 | +import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 26 | +import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; | |
| 27 | + | |
| 28 | +@Tag(name = "管理后台 - 养护频次") | |
| 29 | +@RestController | |
| 30 | +@RequestMapping("/maintain/rate") | |
| 31 | +public class MaintainRateController { | |
| 32 | + | |
| 33 | + @Resource | |
| 34 | + private MaintainRateService maintainRateService; | |
| 35 | + | |
| 36 | + @PostMapping("/listForPage") | |
| 37 | + @Operation(summary = "养护频次-分页查询") | |
| 38 | + @PreAuthorize("@ss.hasPermission('garden:maintain-rate:query')") | |
| 39 | + public CommonResult<PageResult<MaintainRateDO>> listForPage(@Valid @RequestBody MaintainRatePageReqVO reqVO) { | |
| 40 | + return success(maintainRateService.selectPage(reqVO)); | |
| 41 | + } | |
| 42 | + | |
| 43 | + @PostMapping("/getMaintainRateValue") | |
| 44 | + @Operation(summary = "养护频次-获取养护频次值") | |
| 45 | + @PreAuthorize("@ss.hasPermission('garden:maintain-rate:query')") | |
| 46 | + public CommonResult<MaintainRateRespVO> getMaintainRateValue(@Valid @RequestBody MaintainRateReqVO reqVO) { | |
| 47 | + return success(maintainRateService.getMaintainRateValue(reqVO)); | |
| 48 | + } | |
| 49 | + | |
| 50 | + @GetMapping("/selectMaintainRateByLevel") | |
| 51 | + @Operation(summary = "通过植物类型获取养护频次值") | |
| 52 | + @PreAuthorize("@ss.hasPermission('garden:maintain-rate:query')") | |
| 53 | + public CommonResult<MaintainRateRespVO> selectMaintainRateByLevel(@RequestParam("maintain_type_id") Integer maintainTypeId, | |
| 54 | + @RequestParam("level") Integer level) { | |
| 55 | + return success(maintainRateService.selectMaintainRateByLevel(maintainTypeId, level)); | |
| 56 | + } | |
| 57 | + | |
| 58 | + @GetMapping("/export") | |
| 59 | + @Operation(summary = "导出养护频次列表") | |
| 60 | + @PreAuthorize("@ss.hasPermission('garden:maintain-rate:export')") | |
| 61 | + @ApiAccessLog(operateType = EXPORT) | |
| 62 | + public void exportExcel(@Valid MaintainRatePageReqVO reqVO, HttpServletResponse response) throws IOException { | |
| 63 | + List<MaintainRateDO> list = maintainRateService.selectPage(reqVO).getList(); | |
| 64 | + ExcelUtils.write(response, "养护频次.xls", "数据", MaintainRateDO.class, | |
| 65 | + BeanUtils.toBean(list, MaintainRateDO.class)); | |
| 66 | + } | |
| 67 | + | |
| 68 | + @GetMapping("/{id}") | |
| 69 | + @Operation(summary = "养护频次-详情") | |
| 70 | + @Parameter(name = "id", description = "编号", required = true) | |
| 71 | + @PreAuthorize("@ss.hasPermission('garden:maintain-rate:query')") | |
| 72 | + public CommonResult<MaintainRateDO> getInfo(@PathVariable("id") Long id) { | |
| 73 | + return success(maintainRateService.selectById(id)); | |
| 74 | + } | |
| 75 | + | |
| 76 | + @PostMapping("/add") | |
| 77 | + @Operation(summary = "养护频次-添加") | |
| 78 | + @PreAuthorize("@ss.hasPermission('garden:maintain-rate:create')") | |
| 79 | + public CommonResult<Boolean> add(@Valid @RequestBody MaintainRateDO entity) { | |
| 80 | + entity.setStatus("0"); | |
| 81 | + return success(maintainRateService.insert(entity)); | |
| 82 | + } | |
| 83 | + | |
| 84 | + @PostMapping("/edit") | |
| 85 | + @Operation(summary = "养护频次-修改") | |
| 86 | + @PreAuthorize("@ss.hasPermission('garden:maintain-rate:update')") | |
| 87 | + public CommonResult<Boolean> edit(@Valid @RequestBody MaintainRateDO entity) { | |
| 88 | + return success(maintainRateService.update(entity)); | |
| 89 | + } | |
| 90 | + | |
| 91 | + @GetMapping("/delete/byId") | |
| 92 | + @Operation(summary = "养护频次-删除") | |
| 93 | + @PreAuthorize("@ss.hasPermission('garden:maintain-rate:delete')") | |
| 94 | + public CommonResult<Boolean> deleteById(@RequestParam("id") Long id) { | |
| 95 | + return success(maintainRateService.deleteById(id)); | |
| 96 | + } | |
| 97 | +} | |
| 0 | 98 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/maintainrate/vo/MaintainRatePageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 4 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 5 | +import lombok.Data; | |
| 6 | + | |
| 7 | +@Data | |
| 8 | +public class MaintainRatePageReqVO extends PageParam { | |
| 9 | + @Schema(description = "类型:1巡查;2养护") | |
| 10 | + private Integer type; | |
| 11 | + | |
| 12 | + @Schema(description = "科目ID") | |
| 13 | + private Integer maintainSubjectId; | |
| 14 | + | |
| 15 | + @Schema(description = "科目名称") | |
| 16 | + private String maintainSubjectName; | |
| 17 | + | |
| 18 | + @Schema(description = "养护类型ID") | |
| 19 | + private Integer maintainTypeId; | |
| 20 | + | |
| 21 | + @Schema(description = "养护类型名称") | |
| 22 | + private String maintainTypeName; | |
| 23 | + | |
| 24 | + @Schema(description = "周期ID") | |
| 25 | + private Integer cycleId; | |
| 26 | + | |
| 27 | + @Schema(description = "周期名称") | |
| 28 | + private String cycleName; | |
| 29 | + | |
| 30 | + @Schema(description = "状态") | |
| 31 | + private String status; | |
| 32 | +} | |
| 0 | 33 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/maintainrate/vo/MaintainRateReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import jakarta.validation.constraints.NotNull; | |
| 5 | +import lombok.Data; | |
| 6 | + | |
| 7 | +@Data | |
| 8 | +public class MaintainRateReqVO { | |
| 9 | + @NotNull | |
| 10 | + @Schema(description = "科目ID") | |
| 11 | + private Integer maintainSubjectId; | |
| 12 | + | |
| 13 | + @NotNull | |
| 14 | + @Schema(description = "养护类型ID") | |
| 15 | + private Integer maintainTypeId; | |
| 16 | +} | |
| 0 | 17 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/maintainrate/vo/MaintainRateRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.Data; | |
| 5 | + | |
| 6 | +@Data | |
| 7 | +public class MaintainRateRespVO { | |
| 8 | + @Schema(description = "养护类型ID") | |
| 9 | + private Integer maintainTypeId; | |
| 10 | + @Schema(description = "养护类型名称") | |
| 11 | + private String maintainTypeName; | |
| 12 | + | |
| 13 | + @Schema(description = "周期ID") | |
| 14 | + private Integer cycleId; | |
| 15 | + @Schema(description = "周期名称") | |
| 16 | + private String cycleName; | |
| 17 | + | |
| 18 | + @Schema(description = "特级频次") | |
| 19 | + private String levelTop; | |
| 20 | + @Schema(description = "一级频次") | |
| 21 | + private String levelOne; | |
| 22 | + @Schema(description = "二级频次") | |
| 23 | + private String levelTwo; | |
| 24 | + @Schema(description = "三级频次") | |
| 25 | + private String levelThree; | |
| 26 | + | |
| 27 | + @Schema(description = "根据等级选择的频次值") | |
| 28 | + private String value; | |
| 29 | +} | |
| 0 | 30 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/material/MaterialInController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.material; | |
| 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.material.MaterialDO; | |
| 9 | +import com.zteits.urbanops.module.garden.dal.dataobject.material.MaterialInventoryDO; | |
| 10 | +import com.zteits.urbanops.module.garden.dal.dataobject.material.MaterialInventoryInDO; | |
| 11 | +import com.zteits.urbanops.module.garden.dal.mysql.material.MaterialInventoryInMapper; | |
| 12 | +import com.zteits.urbanops.module.garden.dal.mysql.material.MaterialInventoryMapper; | |
| 13 | +import com.zteits.urbanops.module.garden.service.material.MaterialService; | |
| 14 | +import io.swagger.v3.oas.annotations.Operation; | |
| 15 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 16 | +import jakarta.annotation.Resource; | |
| 17 | +import jakarta.servlet.http.HttpServletResponse; | |
| 18 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 19 | +import org.springframework.transaction.annotation.Transactional; | |
| 20 | +import org.springframework.web.bind.annotation.*; | |
| 21 | + | |
| 22 | +import java.io.IOException; | |
| 23 | +import java.util.List; | |
| 24 | + | |
| 25 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 26 | + | |
| 27 | +@Tag(name = "管理后台 - 物料入库") | |
| 28 | +@RestController | |
| 29 | +@RequestMapping("/material/in") | |
| 30 | +public class MaterialInController { | |
| 31 | + | |
| 32 | + @Resource | |
| 33 | + private MaterialInventoryInMapper inMapper; | |
| 34 | + @Resource | |
| 35 | + private MaterialInventoryMapper inventoryMapper; | |
| 36 | + @Resource | |
| 37 | + private MaterialService materialService; | |
| 38 | + | |
| 39 | + @PostMapping("/listForPage") | |
| 40 | + @Operation(summary = "物料入库-分页") | |
| 41 | + @PreAuthorize("@ss.hasPermission('material:material/in:list')") | |
| 42 | + public CommonResult<PageResult<MaterialInventoryInDO>> listForPage(@RequestBody MaterialInventoryInDO where, | |
| 43 | + @RequestParam(value = "pageNum", required = false) Integer pageNum, | |
| 44 | + @RequestParam(value = "pageSize", required = false) Integer pageSize) { | |
| 45 | + PageParam page = new PageParam(); | |
| 46 | + page.setPageNo(pageNum == null ? 1 : pageNum); | |
| 47 | + page.setPageSize(pageSize == null ? 10 : pageSize); | |
| 48 | + PageResult<MaterialInventoryInDO> result = inMapper.selectPage(page, null, | |
| 49 | + new com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX<MaterialInventoryInDO>() | |
| 50 | + .eqIfPresent(MaterialInventoryInDO::getMaterialId, where.getMaterialId()) | |
| 51 | + .likeIfPresent(MaterialInventoryInDO::getMaterialName, where.getMaterialName()) | |
| 52 | + .eqIfPresent(MaterialInventoryInDO::getBelongCompanyId, where.getBelongCompanyId()) | |
| 53 | + .orderByDesc(MaterialInventoryInDO::getCreateTime)); | |
| 54 | + return success(result); | |
| 55 | + } | |
| 56 | + | |
| 57 | + @GetMapping("/export") | |
| 58 | + @Operation(summary = "物料入库-导出") | |
| 59 | + @PreAuthorize("@ss.hasPermission('material:material/in:export')") | |
| 60 | + public void export(MaterialInventoryInDO where, HttpServletResponse response) throws IOException { | |
| 61 | + List<MaterialInventoryInDO> list = inMapper.selectList(new com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX<MaterialInventoryInDO>() | |
| 62 | + .eqIfPresent(MaterialInventoryInDO::getMaterialId, where.getMaterialId())); | |
| 63 | + ExcelUtils.write(response, "物料入库.xls", "数据", MaterialInventoryInDO.class, list); | |
| 64 | + } | |
| 65 | + | |
| 66 | + @GetMapping("/select/by/inventoryInNo") | |
| 67 | + @Operation(summary = "物料入库-详情") | |
| 68 | + @PreAuthorize("@ss.hasPermission('material:material/in:query')") | |
| 69 | + public CommonResult<MaterialInventoryInDO> getInfo(@RequestParam("inventoryIn_no") String inventoryInNo) { | |
| 70 | + return success(inMapper.selectByNo(inventoryInNo)); | |
| 71 | + } | |
| 72 | + | |
| 73 | + @PostMapping("/add") | |
| 74 | + @Operation(summary = "物料入库-添加") | |
| 75 | + @PreAuthorize("@ss.hasPermission('material:material/in:add')") | |
| 76 | + @Transactional(rollbackFor = Throwable.class) | |
| 77 | + public CommonResult<Boolean> add(@RequestBody MaterialInventoryInDO req) { | |
| 78 | + Long userId = SecurityFrameworkUtils.getLoginUserId(); | |
| 79 | + MaterialDO material = materialService.selectById(req.getMaterialId()); | |
| 80 | + if (material == null) { | |
| 81 | + return com.zteits.urbanops.framework.common.pojo.CommonResult.error(400, "无效参数-materialId"); | |
| 82 | + } | |
| 83 | + req.setCreator(String.valueOf(userId)); | |
| 84 | + req.setUpdater(String.valueOf(userId)); | |
| 85 | + boolean inserted = inMapper.insert(req) > 0; | |
| 86 | + | |
| 87 | + MaterialInventoryDO inventory = new MaterialInventoryDO(); | |
| 88 | + inventory.setMaterialId(req.getMaterialId()); | |
| 89 | + inventory.setMaterialName(req.getMaterialName()); | |
| 90 | + inventory.setMaterialTypeId(req.getMaterialTypeId()); | |
| 91 | + inventory.setMaterialTypeName(req.getMaterialTypeName()); | |
| 92 | + inventory.setTypeId(material.getTypeId()); | |
| 93 | + inventory.setTypeName(material.getTypeName()); | |
| 94 | + inventory.setTypeDetailId(material.getTypeDetailId()); | |
| 95 | + inventory.setTypeDetailName(material.getTypeDetailName()); | |
| 96 | + inventory.setSpecifications(req.getSpecifications()); | |
| 97 | + inventory.setBelongCompanyId(req.getBelongCompanyId()); | |
| 98 | + inventory.setBelongCompanyName(req.getBelongCompanyName()); | |
| 99 | + inventory.setUnitId(req.getUnitId()); | |
| 100 | + inventory.setUnitName(req.getUnitName()); | |
| 101 | + inventory.setCurrentNum(req.getInInventoryNum()); | |
| 102 | + inventory.setOutTotalNum(0L); | |
| 103 | + inventory.setInventoryTotalNum(req.getInInventoryNum()); | |
| 104 | + inventory.setStatus("0"); | |
| 105 | + inventory.setDeptId(SecurityFrameworkUtils.getLoginUserDeptId()); | |
| 106 | + | |
| 107 | + MaterialInventoryDO existed = inventoryMapper.selectByTypeDetailId(inventory.getTypeDetailId(), inventory.getBelongCompanyId()); | |
| 108 | + if (existed != null) { | |
| 109 | + MaterialInventoryDO upd = new MaterialInventoryDO(); | |
| 110 | + upd.setInventoryId(existed.getInventoryId()); | |
| 111 | + upd.setInventoryTotalNum((existed.getInventoryTotalNum() == null ? 0 : existed.getInventoryTotalNum()) + inventory.getCurrentNum()); | |
| 112 | + upd.setCurrentNum((existed.getCurrentNum() == null ? 0 : existed.getCurrentNum()) + inventory.getCurrentNum()); | |
| 113 | + inventoryMapper.updateById(upd); | |
| 114 | + } else { | |
| 115 | + inventoryMapper.insert(inventory); | |
| 116 | + } | |
| 117 | + | |
| 118 | + return success(inserted); | |
| 119 | + } | |
| 120 | + | |
| 121 | + @PostMapping("/edit") | |
| 122 | + @Operation(summary = "物料入库-修改") | |
| 123 | + @PreAuthorize("@ss.hasPermission('material:material/in:edit')") | |
| 124 | + public CommonResult<Boolean> edit(@RequestBody MaterialInventoryInDO req) { | |
| 125 | + return success(inMapper.updateById(req) > 0); | |
| 126 | + } | |
| 127 | + | |
| 128 | + @GetMapping("/delete/by/id") | |
| 129 | + @Operation(summary = "物料入库-删除") | |
| 130 | + @PreAuthorize("@ss.hasPermission('material:material/in:remove')") | |
| 131 | + @Transactional(rollbackFor = Throwable.class) | |
| 132 | + public CommonResult<Boolean> remove(@RequestParam("id") Long id) { | |
| 133 | + MaterialInventoryInDO in = inMapper.selectById(id); | |
| 134 | + if (in == null) { | |
| 135 | + return com.zteits.urbanops.framework.common.pojo.CommonResult.error(400, "参数错误"); | |
| 136 | + } | |
| 137 | + MaterialInventoryDO inv = inventoryMapper.selectByMaterialId(in.getMaterialId()); | |
| 138 | + if (inv == null) { | |
| 139 | + return com.zteits.urbanops.framework.common.pojo.CommonResult.error(400, "参数错误"); | |
| 140 | + } | |
| 141 | + if (inv.getCurrentNum() < in.getInInventoryNum()) { | |
| 142 | + return com.zteits.urbanops.framework.common.pojo.CommonResult.error(409, "库存已使用"); | |
| 143 | + } | |
| 144 | + MaterialInventoryDO upd = new MaterialInventoryDO(); | |
| 145 | + upd.setInventoryId(inv.getInventoryId()); | |
| 146 | + upd.setCurrentNum(inv.getCurrentNum() - in.getInInventoryNum()); | |
| 147 | + upd.setInventoryTotalNum(inv.getInventoryTotalNum() - in.getInInventoryNum()); | |
| 148 | + inventoryMapper.updateById(upd); | |
| 149 | + return success(inMapper.deleteById(id) > 0); | |
| 150 | + } | |
| 151 | +} | |
| 0 | 152 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/material/MaterialInventoryController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.material; | |
| 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.module.garden.dal.dataobject.material.MaterialInventoryDO; | |
| 8 | +import com.zteits.urbanops.module.garden.service.material.MaterialInventoryService; | |
| 9 | +import io.swagger.v3.oas.annotations.Operation; | |
| 10 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 11 | +import jakarta.annotation.Resource; | |
| 12 | +import jakarta.servlet.http.HttpServletResponse; | |
| 13 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 14 | +import org.springframework.web.bind.annotation.*; | |
| 15 | + | |
| 16 | +import java.io.IOException; | |
| 17 | +import java.util.List; | |
| 18 | + | |
| 19 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 20 | + | |
| 21 | +@Tag(name = "管理后台 - 物料库存") | |
| 22 | +@RestController | |
| 23 | +@RequestMapping("/material/inventory") | |
| 24 | +public class MaterialInventoryController { | |
| 25 | + | |
| 26 | + @Resource | |
| 27 | + private MaterialInventoryService inventoryService; | |
| 28 | + | |
| 29 | + @PostMapping("/listForPage") | |
| 30 | + @Operation(summary = "物料库存-分页查询") | |
| 31 | + @PreAuthorize("@ss.hasPermission('material:inventory:list')") | |
| 32 | + public CommonResult<PageResult<MaterialInventoryDO>> listForPage(@RequestBody MaterialInventoryDO where, | |
| 33 | + @RequestParam(value = "pageNum", required = false) Integer pageNum, | |
| 34 | + @RequestParam(value = "pageSize", required = false) Integer pageSize) { | |
| 35 | + PageParam page = new PageParam(); | |
| 36 | + page.setPageNo(pageNum == null ? 1 : pageNum); | |
| 37 | + page.setPageSize(pageSize == null ? 10 : pageSize); | |
| 38 | + return success(inventoryService.selectPage(page, where)); | |
| 39 | + } | |
| 40 | + | |
| 41 | + @GetMapping("/export") | |
| 42 | + @Operation(summary = "物料库存-导出") | |
| 43 | + @PreAuthorize("@ss.hasPermission('material:inventory:export')") | |
| 44 | + public void export(MaterialInventoryDO where, HttpServletResponse response) throws IOException { | |
| 45 | + List<MaterialInventoryDO> list = inventoryService.selectPage(new PageParam(), where).getList(); | |
| 46 | + ExcelUtils.write(response, "物料库存.xls", "数据", MaterialInventoryDO.class, list); | |
| 47 | + } | |
| 48 | + | |
| 49 | + @GetMapping("/updateByAlermNum") | |
| 50 | + @Operation(summary = "物料库存-阈值更新") | |
| 51 | + @PreAuthorize("@ss.hasPermission('material:inventory:export')") | |
| 52 | + public CommonResult<Boolean> updateInventoryAlermNum(@RequestParam("material_id") Long materialId, | |
| 53 | + @RequestParam("alerm_num") Long alermNum) { | |
| 54 | + return success(inventoryService.updateInventoryAlarmNum(materialId, alermNum)); | |
| 55 | + } | |
| 56 | +} | |
| 0 | 57 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/material/MaterialManagerController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.material; | |
| 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.security.core.util.SecurityFrameworkUtils; | |
| 7 | +import com.zteits.urbanops.module.garden.dal.dataobject.material.MaterialManagerDO; | |
| 8 | +import com.zteits.urbanops.module.garden.dal.mysql.material.MaterialManagerMapper; | |
| 9 | +import io.swagger.v3.oas.annotations.Operation; | |
| 10 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 11 | +import jakarta.annotation.Resource; | |
| 12 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 13 | +import org.springframework.web.bind.annotation.*; | |
| 14 | + | |
| 15 | +import java.util.List; | |
| 16 | + | |
| 17 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 18 | + | |
| 19 | +@Tag(name = "管理后台 - 物料管理") | |
| 20 | +@RestController | |
| 21 | +@RequestMapping("/material/manager") | |
| 22 | +public class MaterialManagerController { | |
| 23 | + | |
| 24 | + @Resource | |
| 25 | + private MaterialManagerMapper mapper; | |
| 26 | + | |
| 27 | + @PostMapping("/listForPage") | |
| 28 | + @Operation(summary = "物料管理-分页") | |
| 29 | + @PreAuthorize("@ss.hasPermission('material:manager:list')") | |
| 30 | + public CommonResult<PageResult<MaterialManagerDO>> listForPage(@RequestBody MaterialManagerDO where, | |
| 31 | + @RequestParam(value = "pageNum", required = false) Integer pageNum, | |
| 32 | + @RequestParam(value = "pageSize", required = false) Integer pageSize) { | |
| 33 | + PageParam page = new PageParam(); | |
| 34 | + page.setPageNo(pageNum == null ? 1 : pageNum); | |
| 35 | + page.setPageSize(pageSize == null ? 10 : pageSize); | |
| 36 | + where.setDeptId(SecurityFrameworkUtils.getLoginUserDeptId()); | |
| 37 | + return success(mapper.selectPage(page, where)); | |
| 38 | + } | |
| 39 | + | |
| 40 | + @GetMapping("/list") | |
| 41 | + @Operation(summary = "物料管理-列表") | |
| 42 | + @PreAuthorize("@ss.hasPermission('material:manager:list')") | |
| 43 | + public CommonResult<List<MaterialManagerDO>> list() { | |
| 44 | + MaterialManagerDO where = new MaterialManagerDO(); | |
| 45 | + where.setDeptId(SecurityFrameworkUtils.getLoginUserDeptId()); | |
| 46 | + return success(mapper.selectList(where)); | |
| 47 | + } | |
| 48 | + | |
| 49 | + @PostMapping("/add") | |
| 50 | + @Operation(summary = "物料管理-添加") | |
| 51 | + @PreAuthorize("@ss.hasPermission('material:manager:add')") | |
| 52 | + public CommonResult<Boolean> add(@RequestBody MaterialManagerDO entity) { | |
| 53 | + entity.setDeptId(SecurityFrameworkUtils.getLoginUserDeptId()); | |
| 54 | + entity.setCreator(String.valueOf(SecurityFrameworkUtils.getLoginUserId())); | |
| 55 | + entity.setUpdater(entity.getCreator()); | |
| 56 | + entity.clean(); | |
| 57 | + return success(mapper.insert(entity) > 0); | |
| 58 | + } | |
| 59 | + | |
| 60 | + @PostMapping("/edit") | |
| 61 | + @Operation(summary = "物料管理-修改") | |
| 62 | + @PreAuthorize("@ss.hasPermission('material:manager:edit')") | |
| 63 | + public CommonResult<Boolean> edit(@RequestBody MaterialManagerDO entity) { | |
| 64 | + entity.setUpdater(String.valueOf(SecurityFrameworkUtils.getLoginUserId())); | |
| 65 | + entity.clean(); | |
| 66 | + return success(mapper.updateById(entity) > 0); | |
| 67 | + } | |
| 68 | + | |
| 69 | + @GetMapping("/deleteById") | |
| 70 | + @Operation(summary = "物料管理-删除") | |
| 71 | + @PreAuthorize("@ss.hasPermission('material:manager:delete')") | |
| 72 | + public CommonResult<Boolean> deleteById(@RequestParam("id") Long id) { | |
| 73 | + return success(mapper.deleteById(id) > 0); | |
| 74 | + } | |
| 75 | +} | |
| 0 | 76 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/material/MaterialOutController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.material; | |
| 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.material.MaterialDO; | |
| 9 | +import com.zteits.urbanops.module.garden.dal.dataobject.material.MaterialInventoryDO; | |
| 10 | +import com.zteits.urbanops.module.garden.dal.dataobject.material.MaterialInventoryOutDO; | |
| 11 | +import com.zteits.urbanops.module.garden.dal.mysql.material.MaterialInventoryMapper; | |
| 12 | +import com.zteits.urbanops.module.garden.dal.mysql.material.MaterialInventoryOutMapper; | |
| 13 | +import com.zteits.urbanops.module.garden.service.material.MaterialService; | |
| 14 | +import io.swagger.v3.oas.annotations.Operation; | |
| 15 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 16 | +import jakarta.annotation.Resource; | |
| 17 | +import jakarta.servlet.http.HttpServletResponse; | |
| 18 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 19 | +import org.springframework.transaction.annotation.Transactional; | |
| 20 | +import org.springframework.web.bind.annotation.*; | |
| 21 | + | |
| 22 | +import java.io.IOException; | |
| 23 | +import java.util.List; | |
| 24 | + | |
| 25 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 26 | + | |
| 27 | +@Tag(name = "管理后台 - 物料出库") | |
| 28 | +@RestController | |
| 29 | +@RequestMapping("/material/out") | |
| 30 | +public class MaterialOutController { | |
| 31 | + | |
| 32 | + @Resource | |
| 33 | + private MaterialInventoryOutMapper outMapper; | |
| 34 | + @Resource | |
| 35 | + private MaterialInventoryMapper inventoryMapper; | |
| 36 | + @Resource | |
| 37 | + private MaterialService materialService; | |
| 38 | + | |
| 39 | + @PostMapping("/listForPage") | |
| 40 | + @Operation(summary = "物料出库-分页") | |
| 41 | + @PreAuthorize("@ss.hasPermission('material:out:list')") | |
| 42 | + public CommonResult<PageResult<MaterialInventoryOutDO>> listForPage(@RequestBody MaterialInventoryOutDO where, | |
| 43 | + @RequestParam(value = "pageNum", required = false) Integer pageNum, | |
| 44 | + @RequestParam(value = "pageSize", required = false) Integer pageSize) { | |
| 45 | + PageParam page = new PageParam(); | |
| 46 | + page.setPageNo(pageNum == null ? 1 : pageNum); | |
| 47 | + page.setPageSize(pageSize == null ? 10 : pageSize); | |
| 48 | + PageResult<MaterialInventoryOutDO> result = outMapper.selectPage(page, null, | |
| 49 | + new com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX<MaterialInventoryOutDO>() | |
| 50 | + .eqIfPresent(MaterialInventoryOutDO::getMaterialId, where.getMaterialId()) | |
| 51 | + .likeIfPresent(MaterialInventoryOutDO::getMaterialName, where.getMaterialName()) | |
| 52 | + .eqIfPresent(MaterialInventoryOutDO::getBelongCompanyId, where.getBelongCompanyId()) | |
| 53 | + .orderByDesc(MaterialInventoryOutDO::getCreateTime)); | |
| 54 | + return success(result); | |
| 55 | + } | |
| 56 | + | |
| 57 | + @GetMapping("/export") | |
| 58 | + @Operation(summary = "物料出库-导出") | |
| 59 | + @PreAuthorize("@ss.hasPermission('material:out:export')") | |
| 60 | + public void export(MaterialInventoryOutDO where, HttpServletResponse response) throws IOException { | |
| 61 | + List<MaterialInventoryOutDO> list = outMapper.selectList(new com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX<MaterialInventoryOutDO>() | |
| 62 | + .eqIfPresent(MaterialInventoryOutDO::getMaterialId, where.getMaterialId())); | |
| 63 | + ExcelUtils.write(response, "物料出库.xls", "数据", MaterialInventoryOutDO.class, list); | |
| 64 | + } | |
| 65 | + | |
| 66 | + @GetMapping("/{id}") | |
| 67 | + @Operation(summary = "物料出库-详情") | |
| 68 | + @PreAuthorize("@ss.hasPermission('material:out:query')") | |
| 69 | + public CommonResult<MaterialInventoryOutDO> getInfo(@RequestParam("id") Long id) { | |
| 70 | + return success(outMapper.selectById(id)); | |
| 71 | + } | |
| 72 | + | |
| 73 | + @PostMapping("/add") | |
| 74 | + @Operation(summary = "物料出库-添加") | |
| 75 | + @PreAuthorize("@ss.hasPermission('material:out:add')") | |
| 76 | + @Transactional(rollbackFor = Throwable.class) | |
| 77 | + public CommonResult<Boolean> add(@RequestBody MaterialInventoryOutDO req) { | |
| 78 | + Long userId = SecurityFrameworkUtils.getLoginUserId(); | |
| 79 | + MaterialDO material = materialService.selectById(req.getMaterialId()); | |
| 80 | + if (material == null) { | |
| 81 | + return com.zteits.urbanops.framework.common.pojo.CommonResult.error(400, "无效参数"); | |
| 82 | + } | |
| 83 | + MaterialInventoryDO inventory = inventoryMapper.selectByTypeDetailId(material.getTypeDetailId(), SecurityFrameworkUtils.getLoginUserDeptId()); | |
| 84 | + if (inventory == null) { | |
| 85 | + return com.zteits.urbanops.framework.common.pojo.CommonResult.error(400, req.getMaterialName() + "没有库存"); | |
| 86 | + } | |
| 87 | + if (inventory.getCurrentNum() < req.getOutInventoryNum()) { | |
| 88 | + return com.zteits.urbanops.framework.common.pojo.CommonResult.error(409, "当前库存不足,无法出库"); | |
| 89 | + } | |
| 90 | + req.setCreator(String.valueOf(userId)); | |
| 91 | + boolean inserted = outMapper.insert(req) > 0; | |
| 92 | + inventoryMapper.updateInventoryByMaterialId(inventory.getInventoryId(), req.getOutInventoryNum()); | |
| 93 | + return success(inserted); | |
| 94 | + } | |
| 95 | + | |
| 96 | + @PostMapping("/edit") | |
| 97 | + @Operation(summary = "物料出库-修改") | |
| 98 | + @PreAuthorize("@ss.hasPermission('material:out:edit')") | |
| 99 | + public CommonResult<Boolean> edit(@RequestBody MaterialInventoryOutDO req) { | |
| 100 | + return success(outMapper.updateById(req) > 0); | |
| 101 | + } | |
| 102 | + | |
| 103 | + @GetMapping("/delete/ById") | |
| 104 | + @Operation(summary = "物料出库-删除") | |
| 105 | + @PreAuthorize("@ss.hasPermission('material:out:remove')") | |
| 106 | + public CommonResult<Boolean> remove(@RequestParam("id") Long id) { | |
| 107 | + MaterialInventoryOutDO out = outMapper.selectById(id); | |
| 108 | + if (out == null) { | |
| 109 | + return com.zteits.urbanops.framework.common.pojo.CommonResult.error(400, "参数错误"); | |
| 110 | + } | |
| 111 | + MaterialInventoryDO inv = inventoryMapper.selectByMaterialId(out.getMaterialId()); | |
| 112 | + if (inv == null) { | |
| 113 | + return com.zteits.urbanops.framework.common.pojo.CommonResult.error(400, "参数错误"); | |
| 114 | + } | |
| 115 | + if (inv.getCurrentNum() < out.getOutInventoryNum()) { | |
| 116 | + return com.zteits.urbanops.framework.common.pojo.CommonResult.error(409, "库存已使用"); | |
| 117 | + } | |
| 118 | + MaterialInventoryDO upd = new MaterialInventoryDO(); | |
| 119 | + upd.setInventoryId(inv.getInventoryId()); | |
| 120 | + upd.setCurrentNum(inv.getCurrentNum() + out.getOutInventoryNum()); | |
| 121 | + upd.setInventoryTotalNum(inv.getInventoryTotalNum() + out.getOutInventoryNum()); | |
| 122 | + upd.setOutTotalNum(inv.getOutTotalNum() - out.getOutInventoryNum()); | |
| 123 | + inventoryMapper.updateById(upd); | |
| 124 | + return success(outMapper.deleteById(id) > 0); | |
| 125 | + } | |
| 126 | +} | |
| 0 | 127 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/materialtype/MaterialTypeAdminController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.materialtype; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 4 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 5 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.material.MaterialTypeDO; | |
| 7 | +import com.zteits.urbanops.module.garden.dal.mysql.material.MaterialTypeMapper; | |
| 8 | +import io.swagger.v3.oas.annotations.Operation; | |
| 9 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 10 | +import jakarta.annotation.Resource; | |
| 11 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 12 | +import org.springframework.web.bind.annotation.*; | |
| 13 | + | |
| 14 | +import java.util.List; | |
| 15 | + | |
| 16 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 17 | + | |
| 18 | +@Tag(name = "管理后台 - 物料类型") | |
| 19 | +@RestController | |
| 20 | +@RequestMapping("/materialType/type") | |
| 21 | +public class MaterialTypeAdminController { | |
| 22 | + | |
| 23 | + @Resource | |
| 24 | + private MaterialTypeMapper mapper; | |
| 25 | + | |
| 26 | + @GetMapping("/getMaterialBigTypeList") | |
| 27 | + @Operation(summary = "物料类型-大类列表") | |
| 28 | + @PreAuthorize("@ss.hasPermission('material:type:list')") | |
| 29 | + public CommonResult<List<MaterialTypeDO>> getMaterialBigTypeList() { | |
| 30 | + return success(mapper.selectBigTypeList()); | |
| 31 | + } | |
| 32 | + | |
| 33 | + @PostMapping("/listForPage") | |
| 34 | + @Operation(summary = "物料类型-分页") | |
| 35 | + @PreAuthorize("@ss.hasPermission('material:type:list')") | |
| 36 | + public CommonResult<PageResult<MaterialTypeDO>> listForPage(@RequestBody MaterialTypeDO where, | |
| 37 | + @RequestParam(value = "pageNum", required = false) Integer pageNum, | |
| 38 | + @RequestParam(value = "pageSize", required = false) Integer pageSize) { | |
| 39 | + PageParam page = new PageParam(); | |
| 40 | + page.setPageNo(pageNum == null ? 1 : pageNum); | |
| 41 | + page.setPageSize(pageSize == null ? 10 : pageSize); | |
| 42 | + return success(mapper.selectPage(page, where)); | |
| 43 | + } | |
| 44 | +} | |
| 0 | 45 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/mechanicalcost/MechanicalCostController.java
| ... | ... | @@ -36,7 +36,7 @@ import com.zteits.urbanops.module.garden.service.mechanicalcost.MechanicalCostSe |
| 36 | 36 | |
| 37 | 37 | @Tag(name = "管理后台 - 自有机械费用录入") |
| 38 | 38 | @RestController |
| 39 | -@RequestMapping("/garden/mechanical-cost") | |
| 39 | +@RequestMapping({"/garden/mechanical-cost", "/costfee/mechanicalcost"}) | |
| 40 | 40 | @Validated |
| 41 | 41 | public class MechanicalCostController { |
| 42 | 42 | |
| ... | ... | @@ -112,6 +112,14 @@ public class MechanicalCostController { |
| 112 | 112 | return success(BeanUtils.toBean(pageResult, MechanicalCostRespVO.class)); |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | + @GetMapping("/list") | |
| 116 | + @Operation(summary = "自有机械费用录入-列表(兼容旧路径)") | |
| 117 | + @PreAuthorize("@ss.hasPermission('garden:mechanical-cost:query')") | |
| 118 | + public CommonResult<PageResult<MechanicalCostRespVO>> list(@Valid MechanicalCostPageReqVO pageReqVO) { | |
| 119 | + PageResult<MechanicalCostDO> pageResult = mechanicalCostService.getMechanicalCostPage(pageReqVO); | |
| 120 | + return success(BeanUtils.toBean(pageResult, MechanicalCostRespVO.class)); | |
| 121 | + } | |
| 122 | + | |
| 115 | 123 | @GetMapping("/export-excel") |
| 116 | 124 | @Operation(summary = "导出自有机械费用录入 Excel") |
| 117 | 125 | @PreAuthorize("@ss.hasPermission('garden:mechanical-cost:export')") | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/pc/PcProblemManagerController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.pc; | |
| 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.security.core.util.SecurityFrameworkUtils; | |
| 7 | +import com.zteits.urbanops.module.garden.dal.dataobject.problem.MaintainProblemManagerDO; | |
| 8 | +import com.zteits.urbanops.module.garden.service.problem.MaintainProblemManagerService; | |
| 9 | +import io.swagger.v3.oas.annotations.Operation; | |
| 10 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 11 | +import jakarta.annotation.Resource; | |
| 12 | +import org.springframework.web.bind.annotation.*; | |
| 13 | + | |
| 14 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 15 | + | |
| 16 | +@Tag(name = "管理后台 - 问题管理") | |
| 17 | +@RestController | |
| 18 | +@RequestMapping("/pc/problem/manager") | |
| 19 | +public class PcProblemManagerController { | |
| 20 | + | |
| 21 | + @Resource | |
| 22 | + private MaintainProblemManagerService service; | |
| 23 | + | |
| 24 | + @PostMapping("/listForPage") | |
| 25 | + @Operation(summary = "问题管理-分页查询") | |
| 26 | + public CommonResult<PageResult<MaintainProblemManagerDO>> listForPage(@RequestBody MaintainProblemManagerDO where, | |
| 27 | + @RequestParam(value = "pageNum", required = false) Integer pageNum, | |
| 28 | + @RequestParam(value = "pageSize", required = false) Integer pageSize) { | |
| 29 | + PageParam page = new PageParam(); | |
| 30 | + page.setPageNo(pageNum == null ? 1 : pageNum); | |
| 31 | + page.setPageSize(pageSize == null ? 10 : pageSize); | |
| 32 | + where.setDeptId(SecurityFrameworkUtils.getLoginUserDeptId()); | |
| 33 | + return success(service.selectPage(page, where)); | |
| 34 | + } | |
| 35 | + | |
| 36 | + @GetMapping("/queryById") | |
| 37 | + @Operation(summary = "问题管理-详情") | |
| 38 | + public CommonResult<MaintainProblemManagerDO> queryById(@RequestParam("id") Long id) { | |
| 39 | + return success(service.selectById(id)); | |
| 40 | + } | |
| 41 | +} | |
| 0 | 42 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/pc/PcProblemTaskController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.pc; | |
| 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.security.core.util.SecurityFrameworkUtils; | |
| 7 | +import com.zteits.urbanops.module.garden.dal.dataobject.problem.MaintainTaskManagerDO; | |
| 8 | +import com.zteits.urbanops.module.garden.dal.mysql.problem.MaintainTaskManagerMapper; | |
| 9 | +import io.swagger.v3.oas.annotations.Operation; | |
| 10 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 11 | +import jakarta.annotation.Resource; | |
| 12 | +import org.springframework.web.bind.annotation.*; | |
| 13 | + | |
| 14 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 15 | + | |
| 16 | +@Tag(name = "管理后台 - 问题任务") | |
| 17 | +@RestController | |
| 18 | +@RequestMapping("/pc/problem/task") | |
| 19 | +public class PcProblemTaskController { | |
| 20 | + | |
| 21 | + @Resource | |
| 22 | + private MaintainTaskManagerMapper mapper; | |
| 23 | + | |
| 24 | + @PostMapping("/listForPage") | |
| 25 | + @Operation(summary = "养护任务管理-分页") | |
| 26 | + public CommonResult<PageResult<MaintainTaskManagerDO>> listForPage(@RequestBody MaintainTaskManagerDO where, | |
| 27 | + @RequestParam(value = "pageNum", required = false) Integer pageNum, | |
| 28 | + @RequestParam(value = "pageSize", required = false) Integer pageSize) { | |
| 29 | + PageParam page = new PageParam(); | |
| 30 | + page.setPageNo(pageNum == null ? 1 : pageNum); | |
| 31 | + page.setPageSize(pageSize == null ? 10 : pageSize); | |
| 32 | + where.setDeptId(SecurityFrameworkUtils.getLoginUserDeptId()); | |
| 33 | + return success(mapper.selectPage(page, where)); | |
| 34 | + } | |
| 35 | + | |
| 36 | + @GetMapping("/queryByProblemNo") | |
| 37 | + @Operation(summary = "养护任务处理-详情") | |
| 38 | + public CommonResult<MaintainTaskManagerDO> queryByProblemNo(@RequestParam("problem_no") String problemNo) { | |
| 39 | + MaintainTaskManagerDO where = new MaintainTaskManagerDO(); | |
| 40 | + where.setProblemNo(problemNo); | |
| 41 | + PageResult<MaintainTaskManagerDO> result = mapper.selectPage(new PageParam(), where); | |
| 42 | + return success(result.getList().isEmpty() ? null : result.getList().get(0)); | |
| 43 | + } | |
| 44 | +} | |
| 0 | 45 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/performance/PerformanceExpertsController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.performance; | |
| 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.security.core.util.SecurityFrameworkUtils; | |
| 7 | +import com.zteits.urbanops.module.garden.dal.dataobject.performance.PerformanceExpertsDO; | |
| 8 | +import com.zteits.urbanops.module.garden.dal.mysql.performance.PerformanceExpertsMapper; | |
| 9 | +import io.swagger.v3.oas.annotations.Operation; | |
| 10 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 11 | +import jakarta.annotation.Resource; | |
| 12 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 13 | +import org.springframework.web.bind.annotation.*; | |
| 14 | + | |
| 15 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 16 | + | |
| 17 | +@Tag(name = "管理后台 - 绩效专家") | |
| 18 | +@RestController | |
| 19 | +@RequestMapping("/performance/experts") | |
| 20 | +public class PerformanceExpertsController { | |
| 21 | + | |
| 22 | + @Resource | |
| 23 | + private PerformanceExpertsMapper mapper; | |
| 24 | + | |
| 25 | + @PostMapping("/listForPage") | |
| 26 | + @Operation(summary = "绩效专家-分页") | |
| 27 | + @PreAuthorize("@ss.hasPermission('performance:experts:list')") | |
| 28 | + public CommonResult<PageResult<PerformanceExpertsDO>> listForPage(@RequestBody PerformanceExpertsDO where, | |
| 29 | + @RequestParam(value = "pageNum", required = false) Integer pageNum, | |
| 30 | + @RequestParam(value = "pageSize", required = false) Integer pageSize) { | |
| 31 | + PageParam page = new PageParam(); | |
| 32 | + page.setPageNo(pageNum == null ? 1 : pageNum); | |
| 33 | + page.setPageSize(pageSize == null ? 10 : pageSize); | |
| 34 | + where.setDeptId(SecurityFrameworkUtils.getLoginUserDeptId()); | |
| 35 | + return success(mapper.selectPage(page, where)); | |
| 36 | + } | |
| 37 | +} | |
| 0 | 38 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/performance/PerformanceIndexController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.performance; | |
| 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.security.core.util.SecurityFrameworkUtils; | |
| 7 | +import com.zteits.urbanops.module.garden.dal.dataobject.performance.PerformanceIndexDO; | |
| 8 | +import com.zteits.urbanops.module.garden.dal.mysql.performance.PerformanceIndexMapper; | |
| 9 | +import io.swagger.v3.oas.annotations.Operation; | |
| 10 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 11 | +import jakarta.annotation.Resource; | |
| 12 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 13 | +import org.springframework.web.bind.annotation.*; | |
| 14 | + | |
| 15 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 16 | + | |
| 17 | +@Tag(name = "管理后台 - 绩效指标") | |
| 18 | +@RestController | |
| 19 | +@RequestMapping("/performance/index") | |
| 20 | +public class PerformanceIndexController { | |
| 21 | + | |
| 22 | + @Resource | |
| 23 | + private PerformanceIndexMapper mapper; | |
| 24 | + | |
| 25 | + @PostMapping("/listForPage") | |
| 26 | + @Operation(summary = "绩效指标-分页") | |
| 27 | + @PreAuthorize("@ss.hasPermission('performance:index:list')") | |
| 28 | + public CommonResult<PageResult<PerformanceIndexDO>> listForPage(@RequestBody PerformanceIndexDO where, | |
| 29 | + @RequestParam(value = "pageNum", required = false) Integer pageNum, | |
| 30 | + @RequestParam(value = "pageSize", required = false) Integer pageSize) { | |
| 31 | + PageParam page = new PageParam(); | |
| 32 | + page.setPageNo(pageNum == null ? 1 : pageNum); | |
| 33 | + page.setPageSize(pageSize == null ? 10 : pageSize); | |
| 34 | + where.setDeptId(SecurityFrameworkUtils.getLoginUserDeptId()); | |
| 35 | + return success(mapper.selectPage(page, where)); | |
| 36 | + } | |
| 37 | +} | |
| 0 | 38 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/performance/PerformanceWriteController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.performance; | |
| 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.security.core.util.SecurityFrameworkUtils; | |
| 7 | +import com.zteits.urbanops.module.garden.dal.dataobject.performance.PerformanceWriteDO; | |
| 8 | +import com.zteits.urbanops.module.garden.dal.mysql.performance.PerformanceWriteMapper; | |
| 9 | +import io.swagger.v3.oas.annotations.Operation; | |
| 10 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 11 | +import jakarta.annotation.Resource; | |
| 12 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 13 | +import org.springframework.web.bind.annotation.*; | |
| 14 | + | |
| 15 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 16 | + | |
| 17 | +@Tag(name = "管理后台 - 绩效填报") | |
| 18 | +@RestController | |
| 19 | +@RequestMapping("/performance/write") | |
| 20 | +public class PerformanceWriteController { | |
| 21 | + | |
| 22 | + @Resource | |
| 23 | + private PerformanceWriteMapper mapper; | |
| 24 | + | |
| 25 | + @PostMapping("/listForPage") | |
| 26 | + @Operation(summary = "绩效填报-分页") | |
| 27 | + @PreAuthorize("@ss.hasPermission('performance:write:list')") | |
| 28 | + public CommonResult<PageResult<PerformanceWriteDO>> listForPage(@RequestBody PerformanceWriteDO where, | |
| 29 | + @RequestParam(value = "pageNum", required = false) Integer pageNum, | |
| 30 | + @RequestParam(value = "pageSize", required = false) Integer pageSize) { | |
| 31 | + PageParam page = new PageParam(); | |
| 32 | + page.setPageNo(pageNum == null ? 1 : pageNum); | |
| 33 | + page.setPageSize(pageSize == null ? 10 : pageSize); | |
| 34 | + where.setDeptId(SecurityFrameworkUtils.getLoginUserDeptId()); | |
| 35 | + return success(mapper.selectPage(page, where)); | |
| 36 | + } | |
| 37 | +} | |
| 0 | 38 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/photo/SysPhotoController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.photo; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 4 | +import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; | |
| 5 | +import com.zteits.urbanops.module.garden.dal.dataobject.photo.SysPhotoDO; | |
| 6 | +import com.zteits.urbanops.module.garden.service.photo.SysPhotoService; | |
| 7 | +import io.swagger.v3.oas.annotations.Operation; | |
| 8 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 9 | +import jakarta.annotation.Resource; | |
| 10 | +import org.springframework.web.bind.annotation.*; | |
| 11 | + | |
| 12 | +import java.io.IOException; | |
| 13 | +import java.util.Arrays; | |
| 14 | +import java.util.List; | |
| 15 | + | |
| 16 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 17 | + | |
| 18 | +@Tag(name = "管理后台 - 所有照片信息") | |
| 19 | +@RestController | |
| 20 | +@RequestMapping("/business/sysphoto") | |
| 21 | +public class SysPhotoController { | |
| 22 | + | |
| 23 | + @Resource | |
| 24 | + private SysPhotoService sysPhotoService; | |
| 25 | + | |
| 26 | + @GetMapping("/list") | |
| 27 | + @Operation(summary = "照片-列表") | |
| 28 | + public CommonResult<List<SysPhotoDO>> list(SysPhotoDO where) { | |
| 29 | + return success(sysPhotoService.selectList(where)); | |
| 30 | + } | |
| 31 | + | |
| 32 | + @GetMapping("/export") | |
| 33 | + @Operation(summary = "照片-导出") | |
| 34 | + public void export(SysPhotoDO where, jakarta.servlet.http.HttpServletResponse response) throws IOException { | |
| 35 | + List<SysPhotoDO> list = sysPhotoService.selectList(where); | |
| 36 | + ExcelUtils.write(response, "photo.xls", "数据", SysPhotoDO.class, list); | |
| 37 | + } | |
| 38 | + | |
| 39 | + @GetMapping("/{id}") | |
| 40 | + @Operation(summary = "照片-详情") | |
| 41 | + public CommonResult<SysPhotoDO> getInfo(@PathVariable("id") String id) { | |
| 42 | + return success(sysPhotoService.selectById(id)); | |
| 43 | + } | |
| 44 | + | |
| 45 | + @PostMapping | |
| 46 | + @Operation(summary = "照片-新增") | |
| 47 | + public CommonResult<Boolean> add(@RequestBody SysPhotoDO entity) { | |
| 48 | + return success(sysPhotoService.insert(entity)); | |
| 49 | + } | |
| 50 | + | |
| 51 | + @PutMapping | |
| 52 | + @Operation(summary = "照片-修改") | |
| 53 | + public CommonResult<Boolean> edit(@RequestBody SysPhotoDO entity) { | |
| 54 | + return success(sysPhotoService.update(entity)); | |
| 55 | + } | |
| 56 | + | |
| 57 | + @DeleteMapping("/{ids}") | |
| 58 | + @Operation(summary = "照片-删除") | |
| 59 | + public CommonResult<Boolean> remove(@PathVariable String[] ids) { | |
| 60 | + return success(sysPhotoService.deleteByIds(Arrays.asList(ids))); | |
| 61 | + } | |
| 62 | +} | |
| 0 | 63 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/project/ProjectManagerController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.project; | |
| 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.security.core.util.SecurityFrameworkUtils; | |
| 7 | +import com.zteits.urbanops.module.garden.dal.dataobject.project.ProjectManagerDO; | |
| 8 | +import com.zteits.urbanops.module.garden.dal.mysql.project.ProjectManagerMapper; | |
| 9 | +import io.swagger.v3.oas.annotations.Operation; | |
| 10 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 11 | +import jakarta.annotation.Resource; | |
| 12 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 13 | +import org.springframework.web.bind.annotation.*; | |
| 14 | + | |
| 15 | +import java.util.List; | |
| 16 | + | |
| 17 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 18 | + | |
| 19 | +@Tag(name = "管理后台 - 项目管理") | |
| 20 | +@RestController | |
| 21 | +@RequestMapping("/project/manager") | |
| 22 | +public class ProjectManagerController { | |
| 23 | + | |
| 24 | + @Resource | |
| 25 | + private ProjectManagerMapper mapper; | |
| 26 | + | |
| 27 | + @PostMapping("/listForPage") | |
| 28 | + @Operation(summary = "项目管理-分页") | |
| 29 | + @PreAuthorize("@ss.hasPermission('project:manager:list')") | |
| 30 | + public CommonResult<PageResult<ProjectManagerDO>> listForPage(@RequestBody ProjectManagerDO where, | |
| 31 | + @RequestParam(value = "pageNum", required = false) Integer pageNum, | |
| 32 | + @RequestParam(value = "pageSize", required = false) Integer pageSize) { | |
| 33 | + PageParam page = new PageParam(); | |
| 34 | + page.setPageNo(pageNum == null ? 1 : pageNum); | |
| 35 | + page.setPageSize(pageSize == null ? 10 : pageSize); | |
| 36 | + where.setDeptId(SecurityFrameworkUtils.getLoginUserDeptId()); | |
| 37 | + return success(mapper.selectPage(page, where)); | |
| 38 | + } | |
| 39 | + | |
| 40 | + @GetMapping("/selectProjectManagerForList") | |
| 41 | + @Operation(summary = "项目管理-列表") | |
| 42 | + @PreAuthorize("@ss.hasPermission('project:manager:list')") | |
| 43 | + public CommonResult<List<ProjectManagerDO>> selectProjectManagerForList() { | |
| 44 | + ProjectManagerDO where = new ProjectManagerDO(); | |
| 45 | + where.setDeptId(SecurityFrameworkUtils.getLoginUserDeptId()); | |
| 46 | + return success(mapper.selectList(where)); | |
| 47 | + } | |
| 48 | + | |
| 49 | + @PostMapping("/add") | |
| 50 | + @Operation(summary = "项目管理-添加") | |
| 51 | + @PreAuthorize("@ss.hasPermission('project:manager:add')") | |
| 52 | + public CommonResult<Boolean> add(@RequestBody ProjectManagerDO entity) { | |
| 53 | + entity.setDeptId(SecurityFrameworkUtils.getLoginUserDeptId()); | |
| 54 | + entity.setCreator(String.valueOf(SecurityFrameworkUtils.getLoginUserId())); | |
| 55 | + entity.setUpdater(entity.getCreator()); | |
| 56 | + entity.clean(); | |
| 57 | + return success(mapper.insert(entity) > 0); | |
| 58 | + } | |
| 59 | + | |
| 60 | + @PostMapping("/edit") | |
| 61 | + @Operation(summary = "项目管理-修改") | |
| 62 | + @PreAuthorize("@ss.hasPermission('project:manager:edit')") | |
| 63 | + public CommonResult<Boolean> edit(@RequestBody ProjectManagerDO entity) { | |
| 64 | + entity.setUpdater(String.valueOf(SecurityFrameworkUtils.getLoginUserId())); | |
| 65 | + entity.clean(); | |
| 66 | + return success(mapper.updateById(entity) > 0); | |
| 67 | + } | |
| 68 | + | |
| 69 | + @GetMapping("/deleteById") | |
| 70 | + @Operation(summary = "项目管理-删除") | |
| 71 | + @PreAuthorize("@ss.hasPermission('project:manager:delete')") | |
| 72 | + public CommonResult<Boolean> deleteById(@RequestParam("id") Long id) { | |
| 73 | + return success(mapper.deleteById(id) > 0); | |
| 74 | + } | |
| 75 | +} | |
| 0 | 76 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/project/SubProjectManagerController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.project; | |
| 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.security.core.util.SecurityFrameworkUtils; | |
| 7 | +import com.zteits.urbanops.module.garden.dal.dataobject.project.SubProjectManagerDO; | |
| 8 | +import com.zteits.urbanops.module.garden.dal.mysql.project.SubProjectManagerMapper; | |
| 9 | +import io.swagger.v3.oas.annotations.Operation; | |
| 10 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 11 | +import jakarta.annotation.Resource; | |
| 12 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 13 | +import org.springframework.web.bind.annotation.*; | |
| 14 | + | |
| 15 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 16 | + | |
| 17 | +@Tag(name = "管理后台 - 子项目管理") | |
| 18 | +@RestController | |
| 19 | +@RequestMapping("/subProject/manager") | |
| 20 | +public class SubProjectManagerController { | |
| 21 | + | |
| 22 | + @Resource | |
| 23 | + private SubProjectManagerMapper mapper; | |
| 24 | + | |
| 25 | + @PostMapping("/listForPage") | |
| 26 | + @Operation(summary = "子项目管理-分页") | |
| 27 | + @PreAuthorize("@ss.hasPermission('project:subproject:list')") | |
| 28 | + public CommonResult<PageResult<SubProjectManagerDO>> listForPage(@RequestBody SubProjectManagerDO where, | |
| 29 | + @RequestParam(value = "pageNum", required = false) Integer pageNum, | |
| 30 | + @RequestParam(value = "pageSize", required = false) Integer pageSize) { | |
| 31 | + PageParam page = new PageParam(); | |
| 32 | + page.setPageNo(pageNum == null ? 1 : pageNum); | |
| 33 | + page.setPageSize(pageSize == null ? 10 : pageSize); | |
| 34 | + where.setDeptId(SecurityFrameworkUtils.getLoginUserDeptId()); | |
| 35 | + return success(mapper.selectPage(page, where)); | |
| 36 | + } | |
| 37 | + | |
| 38 | + @PostMapping("/add") | |
| 39 | + @Operation(summary = "子项目管理-添加") | |
| 40 | + @PreAuthorize("@ss.hasPermission('project:subproject:add')") | |
| 41 | + public CommonResult<Boolean> add(@RequestBody SubProjectManagerDO entity) { | |
| 42 | + entity.setDeptId(SecurityFrameworkUtils.getLoginUserDeptId()); | |
| 43 | + entity.setCreator(String.valueOf(SecurityFrameworkUtils.getLoginUserId())); | |
| 44 | + entity.setUpdater(entity.getCreator()); | |
| 45 | + entity.clean(); | |
| 46 | + return success(mapper.insert(entity) > 0); | |
| 47 | + } | |
| 48 | + | |
| 49 | + @PostMapping("/edit") | |
| 50 | + @Operation(summary = "子项目管理-修改") | |
| 51 | + @PreAuthorize("@ss.hasPermission('project:subproject:edit')") | |
| 52 | + public CommonResult<Boolean> edit(@RequestBody SubProjectManagerDO entity) { | |
| 53 | + entity.setUpdater(String.valueOf(SecurityFrameworkUtils.getLoginUserId())); | |
| 54 | + entity.clean(); | |
| 55 | + return success(mapper.updateById(entity) > 0); | |
| 56 | + } | |
| 57 | + | |
| 58 | + @GetMapping("/deleteById") | |
| 59 | + @Operation(summary = "子项目管理-删除") | |
| 60 | + @PreAuthorize("@ss.hasPermission('project:subproject:delete')") | |
| 61 | + public CommonResult<Boolean> deleteById(@RequestParam("id") Long id) { | |
| 62 | + return success(mapper.deleteById(id) > 0); | |
| 63 | + } | |
| 64 | +} | |
| 0 | 65 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/rentalmechanicalcost/RentalMechanicalCostController.java
| ... | ... | @@ -36,7 +36,7 @@ import com.zteits.urbanops.module.garden.service.rentalmechanicalcost.RentalMech |
| 36 | 36 | |
| 37 | 37 | @Tag(name = "管理后台 - 租赁机械费用录入") |
| 38 | 38 | @RestController |
| 39 | -@RequestMapping("/garden/rental-mechanical-cost") | |
| 39 | +@RequestMapping({"/garden/rental-mechanical-cost", "/costfee/rentalmechanicalcost"}) | |
| 40 | 40 | @Validated |
| 41 | 41 | public class RentalMechanicalCostController { |
| 42 | 42 | |
| ... | ... | @@ -104,6 +104,14 @@ public class RentalMechanicalCostController { |
| 104 | 104 | return success(BeanUtils.toBean(pageResult, RentalMechanicalCostRespVO.class)); |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | + @GetMapping("/list") | |
| 108 | + @Operation(summary = "租赁机械费用录入-列表(兼容旧路径)") | |
| 109 | + @PreAuthorize("@ss.hasPermission('garden:rental-mechanical-cost:query')") | |
| 110 | + public CommonResult<PageResult<RentalMechanicalCostRespVO>> list(@Valid RentalMechanicalCostPageReqVO pageReqVO) { | |
| 111 | + PageResult<RentalMechanicalCostDO> pageResult = rentalMechanicalCostService.getRentalMechanicalCostPage(pageReqVO); | |
| 112 | + return success(BeanUtils.toBean(pageResult, RentalMechanicalCostRespVO.class)); | |
| 113 | + } | |
| 114 | + | |
| 107 | 115 | @GetMapping("/export-excel") |
| 108 | 116 | @Operation(summary = "导出租赁机械费用录入 Excel") |
| 109 | 117 | @PreAuthorize("@ss.hasPermission('garden:rental-mechanical-cost:export')") | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/roadmanager/RoadManagerController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.roadmanager; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 4 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 5 | +import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; | |
| 6 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 7 | +import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; | |
| 8 | +import com.zteits.urbanops.module.garden.controller.admin.roadmanager.vo.RoadManagerPageReqVO; | |
| 9 | +import com.zteits.urbanops.module.garden.controller.admin.roadmanager.vo.RoadManagerSaveReqVO; | |
| 10 | +import com.zteits.urbanops.module.garden.dal.dataobject.road.RoadManagerDO; | |
| 11 | +import com.zteits.urbanops.module.garden.service.road.RoadManagerService; | |
| 12 | +import io.swagger.v3.oas.annotations.Operation; | |
| 13 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 14 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 15 | +import jakarta.annotation.Resource; | |
| 16 | +import jakarta.servlet.http.HttpServletResponse; | |
| 17 | +import jakarta.validation.Valid; | |
| 18 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 19 | +import org.springframework.web.bind.annotation.*; | |
| 20 | + | |
| 21 | +import java.io.IOException; | |
| 22 | +import java.util.List; | |
| 23 | + | |
| 24 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 25 | +import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | |
| 26 | +import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; | |
| 27 | + | |
| 28 | +@Tag(name = "管理后台 - 道路数据管理") | |
| 29 | +@RestController | |
| 30 | +@RequestMapping("/road/manager") | |
| 31 | +public class RoadManagerController { | |
| 32 | + | |
| 33 | + @Resource | |
| 34 | + private RoadManagerService roadManagerService; | |
| 35 | + | |
| 36 | + @PostMapping("/listForPage") | |
| 37 | + @Operation(summary = "道路数据管理-分页") | |
| 38 | + @PreAuthorize("@ss.hasPermission('garden:road-manager:query')") | |
| 39 | + public CommonResult<PageResult<RoadManagerDO>> listForPage(@Valid @RequestBody RoadManagerPageReqVO reqVO) { | |
| 40 | + return success(roadManagerService.selectPage(reqVO)); | |
| 41 | + } | |
| 42 | + | |
| 43 | + @GetMapping("/export") | |
| 44 | + @Operation(summary = "道路数据管理-导出") | |
| 45 | + @PreAuthorize("@ss.hasPermission('garden:road-manager:export')") | |
| 46 | + @ApiAccessLog(operateType = EXPORT) | |
| 47 | + public void exportExcel(RoadManagerPageReqVO reqVO, HttpServletResponse response) throws IOException { | |
| 48 | + List<RoadManagerDO> list = roadManagerService.selectPage(reqVO).getList(); | |
| 49 | + ExcelUtils.write(response, "道路数据.xls", "数据", RoadManagerDO.class, | |
| 50 | + BeanUtils.toBean(list, RoadManagerDO.class)); | |
| 51 | + } | |
| 52 | + | |
| 53 | + @GetMapping("/getById") | |
| 54 | + @Operation(summary = "道路数据管理-详情") | |
| 55 | + @Parameter(name = "id", description = "编号", required = true) | |
| 56 | + @PreAuthorize("@ss.hasPermission('garden:road-manager:query')") | |
| 57 | + public CommonResult<RoadManagerDO> getById(@RequestParam("id") Long id) { | |
| 58 | + return success(roadManagerService.selectById(id)); | |
| 59 | + } | |
| 60 | + | |
| 61 | + @PostMapping("/add") | |
| 62 | + @Operation(summary = "道路数据管理-添加") | |
| 63 | + @PreAuthorize("@ss.hasPermission('garden:road-manager:create')") | |
| 64 | + public CommonResult<Boolean> add(@Valid @RequestBody RoadManagerSaveReqVO reqVO) { | |
| 65 | + RoadManagerDO entity = BeanUtils.toBean(reqVO, RoadManagerDO.class); | |
| 66 | + entity.setStatus(0); | |
| 67 | + return success(roadManagerService.insert(entity)); | |
| 68 | + } | |
| 69 | + | |
| 70 | + @PostMapping("/edit") | |
| 71 | + @Operation(summary = "道路数据管理-修改") | |
| 72 | + @PreAuthorize("@ss.hasPermission('garden:road-manager:update')") | |
| 73 | + public CommonResult<Boolean> edit(@Valid @RequestBody RoadManagerSaveReqVO reqVO) { | |
| 74 | + RoadManagerDO entity = BeanUtils.toBean(reqVO, RoadManagerDO.class); | |
| 75 | + entity.setStatus(0); | |
| 76 | + return success(roadManagerService.update(entity)); | |
| 77 | + } | |
| 78 | + | |
| 79 | + @GetMapping("/deleteById") | |
| 80 | + @Operation(summary = "道路数据管理-删除") | |
| 81 | + @PreAuthorize("@ss.hasPermission('garden:road-manager:delete')") | |
| 82 | + public CommonResult<Boolean> deleteById(@RequestParam("id") Long id) { | |
| 83 | + return success(roadManagerService.deleteById(id)); | |
| 84 | + } | |
| 85 | + | |
| 86 | + @GetMapping("/list") | |
| 87 | + @Operation(summary = "道路数据管理-列表") | |
| 88 | + @PreAuthorize("@ss.hasPermission('garden:road-manager:query')") | |
| 89 | + public CommonResult<List<RoadManagerDO>> list(@RequestParam(value = "company_id", required = false) Long companyId) { | |
| 90 | + RoadManagerDO where = new RoadManagerDO(); | |
| 91 | + where.setCompanyId(companyId); | |
| 92 | + return success(roadManagerService.selectList(where)); | |
| 93 | + } | |
| 94 | + | |
| 95 | + @GetMapping("/tree") | |
| 96 | + @Operation(summary = "道路数据管理-树") | |
| 97 | + @PreAuthorize("@ss.hasPermission('garden:road-manager:query')") | |
| 98 | + public CommonResult<List<RoadManagerDO>> tree(@RequestParam(value = "company_id", required = false) Long companyId) { | |
| 99 | + RoadManagerDO where = new RoadManagerDO(); | |
| 100 | + where.setCompanyId(companyId); | |
| 101 | + return success(roadManagerService.selectList(where)); | |
| 102 | + } | |
| 103 | +} | |
| 0 | 104 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/roadmanager/vo/RoadManagerPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.roadmanager.vo; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 4 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 5 | +import lombok.Data; | |
| 6 | + | |
| 7 | +@Data | |
| 8 | +public class RoadManagerPageReqVO extends PageParam { | |
| 9 | + @Schema(description = "道路名称") | |
| 10 | + private String roadName; | |
| 11 | + @Schema(description = "街道ID") | |
| 12 | + private String streetId; | |
| 13 | + @Schema(description = "街道名称") | |
| 14 | + private String streetName; | |
| 15 | + @Schema(description = "养护级别ID") | |
| 16 | + private Integer curingLevelId; | |
| 17 | + @Schema(description = "养护级别") | |
| 18 | + private String curingLevelName; | |
| 19 | + @Schema(description = "公司ID") | |
| 20 | + private Long companyId; | |
| 21 | + @Schema(description = "部门ID") | |
| 22 | + private Long deptId; | |
| 23 | + @Schema(description = "状态") | |
| 24 | + private Integer status; | |
| 25 | +} | |
| 0 | 26 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/roadmanager/vo/RoadManagerSaveReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.roadmanager.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import jakarta.validation.constraints.NotEmpty; | |
| 5 | +import jakarta.validation.constraints.NotNull; | |
| 6 | +import lombok.Data; | |
| 7 | + | |
| 8 | +@Data | |
| 9 | +public class RoadManagerSaveReqVO { | |
| 10 | + private Long id; | |
| 11 | + @NotEmpty | |
| 12 | + @Schema(description = "道路名称") | |
| 13 | + private String roadName; | |
| 14 | + private String streetId; | |
| 15 | + private String streetName; | |
| 16 | + private Integer curingLevelId; | |
| 17 | + private String curingLevelName; | |
| 18 | + private String greenBeltTreeArea; | |
| 19 | + private String greenBeltArea; | |
| 20 | + private String totalArea; | |
| 21 | + private String treeArea; | |
| 22 | + private String startingLatitude; | |
| 23 | + private String startingLongitude; | |
| 24 | + private String startingRemark; | |
| 25 | + private String endLatitude; | |
| 26 | + private String endLongitude; | |
| 27 | + private String endRemark; | |
| 28 | + private Integer status; | |
| 29 | + private Long companyId; | |
| 30 | + private String companyName; | |
| 31 | + private Long deptId; | |
| 32 | + private String roadAttr; | |
| 33 | + private String direction; | |
| 34 | +} | |
| 0 | 35 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/standingbook/StandingBookController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.standingbook; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 4 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 5 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 6 | +import com.zteits.urbanops.module.garden.controller.admin.standingbook.vo.StandingBookPageReqVO; | |
| 7 | +import com.zteits.urbanops.module.garden.dal.dataobject.standingbook.StandingBookDO; | |
| 8 | +import com.zteits.urbanops.module.garden.service.standingbook.StandingBookService; | |
| 9 | +import io.swagger.v3.oas.annotations.Operation; | |
| 10 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 11 | +import jakarta.annotation.Resource; | |
| 12 | +import org.springframework.web.bind.annotation.PostMapping; | |
| 13 | +import org.springframework.web.bind.annotation.RequestBody; | |
| 14 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 15 | +import org.springframework.web.bind.annotation.RestController; | |
| 16 | + | |
| 17 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 18 | + | |
| 19 | +@Tag(name = "管理后台 - 年度基础台账") | |
| 20 | +@RestController | |
| 21 | +@RequestMapping("/standing/book") | |
| 22 | +public class StandingBookController { | |
| 23 | + | |
| 24 | + @Resource | |
| 25 | + private StandingBookService standingBookService; | |
| 26 | + | |
| 27 | + @PostMapping("/listForPage") | |
| 28 | + @Operation(summary = "年度基础台账-分页") | |
| 29 | + public CommonResult<PageResult<StandingBookDO>> listForPage(@RequestBody StandingBookPageReqVO reqVO) { | |
| 30 | + PageParam page = new PageParam(); | |
| 31 | + page.setPageNo(reqVO.getPageNo()); | |
| 32 | + page.setPageSize(reqVO.getPageSize()); | |
| 33 | + return success(standingBookService.selectPage(page, reqVO)); | |
| 34 | + } | |
| 35 | +} | |
| 0 | 36 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/standingbook/vo/StandingBookPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.standingbook.vo; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 4 | +import lombok.Data; | |
| 5 | + | |
| 6 | +@Data | |
| 7 | +public class StandingBookPageReqVO extends PageParam { | |
| 8 | + private String standingBookYear; | |
| 9 | +} | |
| 0 | 10 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/system/SystemDeptBridgeController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.system; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 4 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 5 | +import com.zteits.urbanops.module.system.controller.admin.dept.vo.dept.DeptListReqVO; | |
| 6 | +import com.zteits.urbanops.module.system.controller.admin.dept.vo.dept.DeptRespVO; | |
| 7 | +import com.zteits.urbanops.module.system.controller.admin.dept.vo.dept.DeptSimpleRespVO; | |
| 8 | +import com.zteits.urbanops.module.system.dal.dataobject.dept.DeptDO; | |
| 9 | +import com.zteits.urbanops.module.system.service.dept.DeptService; | |
| 10 | +import io.swagger.v3.oas.annotations.Operation; | |
| 11 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 12 | +import jakarta.annotation.Resource; | |
| 13 | +import org.springframework.web.bind.annotation.GetMapping; | |
| 14 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 15 | +import org.springframework.web.bind.annotation.RequestParam; | |
| 16 | +import org.springframework.web.bind.annotation.RestController; | |
| 17 | + | |
| 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("/bridge/system/dept") | |
| 25 | +public class SystemDeptBridgeController { | |
| 26 | + | |
| 27 | + @Resource | |
| 28 | + private DeptService deptService; | |
| 29 | + | |
| 30 | + @GetMapping("/list") | |
| 31 | + @Operation(summary = "获取部门列表") | |
| 32 | + public CommonResult<List<DeptRespVO>> list() { | |
| 33 | + List<DeptDO> list = deptService.getDeptList(new DeptListReqVO()); | |
| 34 | + return success(BeanUtils.toBean(list, DeptRespVO.class)); | |
| 35 | + } | |
| 36 | + | |
| 37 | + @GetMapping("/treeselect") | |
| 38 | + @Operation(summary = "部门树精简列表") | |
| 39 | + public CommonResult<List<DeptSimpleRespVO>> treeSelect() { | |
| 40 | + List<DeptDO> list = deptService.getDeptList(new DeptListReqVO()); | |
| 41 | + return success(BeanUtils.toBean(list, DeptSimpleRespVO.class)); | |
| 42 | + } | |
| 43 | + | |
| 44 | + @GetMapping("/treeselectBycompanyId") | |
| 45 | + @Operation(summary = "部门树精简列表(按公司)") | |
| 46 | + public CommonResult<List<DeptSimpleRespVO>> treeSelectByCompany(@RequestParam("belong_company_id") Long companyId) { | |
| 47 | + List<DeptDO> list = deptService.getDeptList(new DeptListReqVO()); | |
| 48 | + return success(BeanUtils.toBean(list, DeptSimpleRespVO.class)); | |
| 49 | + } | |
| 50 | + | |
| 51 | + @GetMapping("/selectPatrolUsersByDeptId") | |
| 52 | + @Operation(summary = "按部门选择巡查用户") | |
| 53 | + public CommonResult<List<DeptSimpleRespVO>> selectPatrolUsersByDeptId(@RequestParam("dept_id") Long deptId) { | |
| 54 | + List<DeptDO> list = deptService.getDeptList(new DeptListReqVO()); | |
| 55 | + return success(BeanUtils.toBean(list, DeptSimpleRespVO.class)); | |
| 56 | + } | |
| 57 | +} | |
| 0 | 58 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/system/SystemUserBridgeController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.system; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 4 | +import com.zteits.urbanops.module.system.controller.admin.user.vo.profile.UserProfileRespVO; | |
| 5 | +import com.zteits.urbanops.module.system.controller.admin.user.UserProfileController; | |
| 6 | +import io.swagger.v3.oas.annotations.Operation; | |
| 7 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 8 | +import jakarta.annotation.Resource; | |
| 9 | +import org.springframework.web.bind.annotation.GetMapping; | |
| 10 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 11 | +import org.springframework.web.bind.annotation.RestController; | |
| 12 | + | |
| 13 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 14 | + | |
| 15 | +@Tag(name = "管理后台 - 系统用户桥接") | |
| 16 | +@RestController | |
| 17 | +@RequestMapping("/bridge/system/user/profile") | |
| 18 | +public class SystemUserBridgeController { | |
| 19 | + | |
| 20 | + @Resource | |
| 21 | + private UserProfileController userProfileController; | |
| 22 | + | |
| 23 | + @GetMapping("/get") | |
| 24 | + @Operation(summary = "获得登录用户信息") | |
| 25 | + public CommonResult<UserProfileRespVO> getUserProfile() { | |
| 26 | + return userProfileController.getUserProfile(); | |
| 27 | + } | |
| 28 | +} | |
| 0 | 29 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/treerecord/GardenTreeController.java
0 → 100644
| 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 | +} | |
| 0 | 97 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/treerecord/OldTreesController.java
0 → 100644
| 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 | +} | |
| 0 | 84 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/treerecord/vo/CompanyDeptRoadVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.admin.treerecord.vo; | |
| 2 | + | |
| 3 | +import lombok.Data; | |
| 4 | + | |
| 5 | +import java.util.List; | |
| 6 | + | |
| 7 | +@Data | |
| 8 | +public class CompanyDeptRoadVO { | |
| 9 | + private String companyId; | |
| 10 | + private String companyName; | |
| 11 | + private List<DeptVO> depts; | |
| 12 | + | |
| 13 | + @Data | |
| 14 | + public static class DeptVO { | |
| 15 | + private Long deptId; | |
| 16 | + private String deptName; | |
| 17 | + private List<RoadVO> roads; | |
| 18 | + } | |
| 19 | + | |
| 20 | + @Data | |
| 21 | + public static class RoadVO { | |
| 22 | + private Long roadId; | |
| 23 | + private String roadName; | |
| 24 | + private Long treeCount; | |
| 25 | + private Long recordedCount; | |
| 26 | + private String startRemark; | |
| 27 | + private String endRemark; | |
| 28 | + } | |
| 29 | +} | |
| 0 | 30 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/treerecord/vo/RoadTreeVO.java
0 → 100644
| 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 | +} | |
| 0 | 14 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/wasterecord/WasteRecordController.java
| ... | ... | @@ -31,7 +31,7 @@ import com.zteits.urbanops.module.garden.service.wasterecord.WasteRecordService; |
| 31 | 31 | |
| 32 | 32 | @Tag(name = "管理后台 - 园林废弃物录入") |
| 33 | 33 | @RestController |
| 34 | -@RequestMapping("/garden/waste-record") | |
| 34 | +@RequestMapping({"/garden/waste-record", "/costfee/gardenwasterecord"}) | |
| 35 | 35 | @Validated |
| 36 | 36 | public class WasteRecordController { |
| 37 | 37 | |
| ... | ... | @@ -88,6 +88,14 @@ public class WasteRecordController { |
| 88 | 88 | return success(BeanUtils.toBean(pageResult, WasteRecordRespVO.class)); |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | + @GetMapping("/list") | |
| 92 | + @Operation(summary = "园林废弃物录入-列表(兼容旧路径)") | |
| 93 | + @PreAuthorize("@ss.hasPermission('garden:waste-record:query')") | |
| 94 | + public CommonResult<PageResult<WasteRecordRespVO>> list(@Valid WasteRecordPageReqVO pageReqVO) { | |
| 95 | + PageResult<WasteRecordDO> pageResult = wasteRecordService.getWasteRecordPage(pageReqVO); | |
| 96 | + return success(BeanUtils.toBean(pageResult, WasteRecordRespVO.class)); | |
| 97 | + } | |
| 98 | + | |
| 91 | 99 | @GetMapping("/export-excel") |
| 92 | 100 | @Operation(summary = "导出园林废弃物录入 Excel") |
| 93 | 101 | @PreAuthorize("@ss.hasPermission('garden:waste-record:export')") | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/AppCommonController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.app; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 4 | +import com.zteits.urbanops.module.garden.controller.app.vo.DictTypeRespVO; | |
| 5 | +import com.zteits.urbanops.module.system.dal.dataobject.dict.DictDataDO; | |
| 6 | +import com.zteits.urbanops.module.system.service.dict.DictDataService; | |
| 7 | +import io.swagger.v3.oas.annotations.Operation; | |
| 8 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 9 | +import jakarta.annotation.Resource; | |
| 10 | +import org.springframework.web.bind.annotation.GetMapping; | |
| 11 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 12 | +import org.springframework.web.bind.annotation.RequestParam; | |
| 13 | +import org.springframework.web.bind.annotation.RestController; | |
| 14 | + | |
| 15 | +import java.util.ArrayList; | |
| 16 | +import java.util.List; | |
| 17 | + | |
| 18 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 19 | + | |
| 20 | +@Tag(name = "APP - 公共查询") | |
| 21 | +@RestController | |
| 22 | +@RequestMapping("/app/common") | |
| 23 | +public class AppCommonController { | |
| 24 | + | |
| 25 | + @Resource | |
| 26 | + private DictDataService dictDataService; | |
| 27 | + | |
| 28 | + @GetMapping("/type") | |
| 29 | + @Operation(summary = "根据字典类型查询字典数据信息") | |
| 30 | + public CommonResult<List<DictTypeRespVO>> dictType(@RequestParam("dict_type") String dictType) { | |
| 31 | + List<DictTypeRespVO> respList = new ArrayList<>(); | |
| 32 | + List<DictDataDO> list = dictDataService.getDictDataListByDictType(dictType); | |
| 33 | + if (list == null || list.isEmpty()) { | |
| 34 | + return success(respList); | |
| 35 | + } | |
| 36 | + for (DictDataDO e : list) { | |
| 37 | + DictTypeRespVO resp = new DictTypeRespVO(); | |
| 38 | + resp.setValue(e.getValue()); | |
| 39 | + resp.setLabel(e.getLabel()); | |
| 40 | + respList.add(resp); | |
| 41 | + } | |
| 42 | + return success(respList); | |
| 43 | + } | |
| 44 | +} | |
| 0 | 45 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/AppMaterialTypeController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.app; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 4 | +import com.zteits.urbanops.module.garden.controller.business.vo.MaterialTypeManagerRespVO; | |
| 5 | +import com.zteits.urbanops.module.garden.service.material.MaterialTypeService; | |
| 6 | +import io.swagger.v3.oas.annotations.Operation; | |
| 7 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 8 | +import jakarta.annotation.Resource; | |
| 9 | +import org.springframework.web.bind.annotation.GetMapping; | |
| 10 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 11 | +import org.springframework.web.bind.annotation.RequestParam; | |
| 12 | +import org.springframework.web.bind.annotation.RestController; | |
| 13 | + | |
| 14 | +import java.util.List; | |
| 15 | + | |
| 16 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 17 | + | |
| 18 | +@Tag(name = "APP - 物料类型") | |
| 19 | +@RestController | |
| 20 | +@RequestMapping("/app/materialType/type") | |
| 21 | +public class AppMaterialTypeController { | |
| 22 | + | |
| 23 | + @Resource | |
| 24 | + private MaterialTypeService materialTypeService; | |
| 25 | + | |
| 26 | + @GetMapping("/getMaterialBigTypeList") | |
| 27 | + @Operation(summary = "物料类型基础表-耗材类型List") | |
| 28 | + public CommonResult<List<MaterialTypeManagerRespVO>> getMaterialBigTypeList() { | |
| 29 | + return success(materialTypeService.queryMaterialBigType(30000L)); | |
| 30 | + } | |
| 31 | + | |
| 32 | + @GetMapping("/getMaterialMidTypeList") | |
| 33 | + @Operation(summary = "物料类型基础表-类别List") | |
| 34 | + public CommonResult<List<MaterialTypeManagerRespVO>> getMaterialMidTypeList(@RequestParam("material_type_id") Long materialTypeId) { | |
| 35 | + return success(materialTypeService.queryMaterialMidType(materialTypeId)); | |
| 36 | + } | |
| 37 | + | |
| 38 | + @GetMapping("/getMaterialDetailTypeList") | |
| 39 | + @Operation(summary = "物料类型基础表-类别明细List") | |
| 40 | + public CommonResult<List<MaterialTypeManagerRespVO>> getMaterialDetailTypeList(@RequestParam("parent_type_id") Long parentTypeId) { | |
| 41 | + return success(materialTypeService.queryMaterialDetailType(parentTypeId)); | |
| 42 | + } | |
| 43 | +} | |
| 0 | 44 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/AppUserGpsController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.app; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 4 | +import com.zteits.urbanops.module.garden.controller.app.vo.UserGpsAddReqVO; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.app.vo.UserGpsRespVO; | |
| 6 | +import com.zteits.urbanops.module.garden.service.usergps.UserGpsService; | |
| 7 | +import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; | |
| 8 | +import io.swagger.v3.oas.annotations.Operation; | |
| 9 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 10 | +import jakarta.annotation.Resource; | |
| 11 | +import jakarta.validation.Valid; | |
| 12 | +import org.springframework.web.bind.annotation.*; | |
| 13 | + | |
| 14 | +import java.util.List; | |
| 15 | + | |
| 16 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 17 | + | |
| 18 | +@Tag(name = "APP - 用户经纬度") | |
| 19 | +@RestController | |
| 20 | +@RequestMapping("/app/user/gps") | |
| 21 | +public class AppUserGpsController { | |
| 22 | + | |
| 23 | + @Resource | |
| 24 | + private UserGpsService userGpsService; | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + @GetMapping("/list") | |
| 29 | + @Operation(summary = "用户经纬度-查询列表") | |
| 30 | + public CommonResult<List<UserGpsRespVO>> list(@RequestParam("user_id") Long userId, | |
| 31 | + @RequestParam("commit_time") String commitTime) { | |
| 32 | + return success(userGpsService.selectUserGpsList(userId, commitTime)); | |
| 33 | + } | |
| 34 | + | |
| 35 | + @PostMapping("/add") | |
| 36 | + @Operation(summary = "用户经纬度-添加") | |
| 37 | + public CommonResult<Boolean> add(@Valid @RequestBody UserGpsAddReqVO reqVO) { | |
| 38 | + Long userId = SecurityFrameworkUtils.getLoginUserId(); | |
| 39 | + String nickname = SecurityFrameworkUtils.getLoginUserNickname(); | |
| 40 | + return success(userGpsService.insertUserGps(userId, nickname, reqVO)); | |
| 41 | + } | |
| 42 | +} | |
| 0 | 43 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/plan/AppMaintainPlanCommitController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.app.plan; | |
| 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.common.pojo.PageParam; | |
| 6 | +import com.zteits.urbanops.module.garden.controller.app.vo.PlanCommitDetailPageReqVO; | |
| 7 | +import com.zteits.urbanops.module.garden.controller.app.vo.PlanTaskCommitDetailPageRespVO; | |
| 8 | +import com.zteits.urbanops.module.garden.service.plancommit.MaintainPlanCommitDetailService; | |
| 9 | +import io.swagger.v3.oas.annotations.Operation; | |
| 10 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 11 | +import jakarta.annotation.Resource; | |
| 12 | +import org.springframework.web.bind.annotation.PostMapping; | |
| 13 | +import org.springframework.web.bind.annotation.RequestBody; | |
| 14 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 15 | +import org.springframework.web.bind.annotation.RestController; | |
| 16 | + | |
| 17 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 18 | + | |
| 19 | +@Tag(name = "APP - 养护、巡检计划提交记录") | |
| 20 | +@RestController | |
| 21 | +@RequestMapping("/app/plan/commit") | |
| 22 | +public class AppMaintainPlanCommitController { | |
| 23 | + | |
| 24 | + @Resource | |
| 25 | + private MaintainPlanCommitDetailService service; | |
| 26 | + | |
| 27 | + @PostMapping("/xc/listForPage") | |
| 28 | + @Operation(summary = "巡检计划提交记录-分页查询") | |
| 29 | + public CommonResult<PageResult<PlanTaskCommitDetailPageRespVO>> listForPage(@RequestBody PlanCommitDetailPageReqVO reqVO) { | |
| 30 | + PageParam page = new PageParam(); | |
| 31 | + page.setPageNo(reqVO.getPageNo()); | |
| 32 | + page.setPageSize(reqVO.getPageSize()); | |
| 33 | + return success(service.pageListXC(page, reqVO)); | |
| 34 | + } | |
| 35 | + | |
| 36 | + @PostMapping("/add") | |
| 37 | + @Operation(summary = "巡检计划-add") | |
| 38 | + public CommonResult<Boolean> add(@RequestBody com.zteits.urbanops.module.garden.controller.app.vo.PlanCommitDetailAddReqVO reqVO) { | |
| 39 | + Long userId = com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId(); | |
| 40 | + String nickname = com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils.getLoginUserNickname(); | |
| 41 | + java.time.LocalDate today = java.time.LocalDate.now(); | |
| 42 | + Integer count = service.selectByPlanNoAndCommitDate(reqVO.planNo, today); | |
| 43 | + if (count != null && count > 0) { | |
| 44 | + return com.zteits.urbanops.framework.common.pojo.CommonResult.error(409, "记录已存在,请勿重复提交"); | |
| 45 | + } | |
| 46 | + return success(service.insertXC(userId, nickname, reqVO)); | |
| 47 | + } | |
| 48 | + | |
| 49 | + @PostMapping("/yh/listForPage") | |
| 50 | + @Operation(summary = "养护计划提交记录-分页查询") | |
| 51 | + public CommonResult<PageResult<PlanTaskCommitDetailPageRespVO>> yhListForPage(@RequestBody com.zteits.urbanops.module.garden.controller.app.vo.PlanYhCommitDetailPageReqVO reqVO) { | |
| 52 | + PageParam page = new PageParam(); | |
| 53 | + page.setPageNo(reqVO.getPageNo()); | |
| 54 | + page.setPageSize(reqVO.getPageSize()); | |
| 55 | + return success(service.pageListYH(page, reqVO)); | |
| 56 | + } | |
| 57 | + | |
| 58 | + @PostMapping("/yh/add") | |
| 59 | + @Operation(summary = "养护计划-add") | |
| 60 | + public CommonResult<Boolean> yhAdd(@RequestBody com.zteits.urbanops.module.garden.controller.app.vo.PlanCommitDetailYhAddReqVO reqVO) { | |
| 61 | + Long userId = com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId(); | |
| 62 | + String nickname = com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils.getLoginUserNickname(); | |
| 63 | + return success(service.insertYH(userId, nickname, reqVO)); | |
| 64 | + } | |
| 65 | + | |
| 66 | + @RequestMapping(value = "/yh/getById", method = org.springframework.web.bind.annotation.RequestMethod.GET) | |
| 67 | + @Operation(summary = "养护计划提交记录-提交明细") | |
| 68 | + public CommonResult<PlanTaskCommitDetailPageRespVO> yhGetById(@org.springframework.web.bind.annotation.RequestParam("id") Long id, | |
| 69 | + @org.springframework.web.bind.annotation.RequestParam(value = "is_add_url", required = false) Boolean isAddUrl) { | |
| 70 | + return success(service.getById(id)); | |
| 71 | + } | |
| 72 | + | |
| 73 | + @RequestMapping(value = "/yh/getMaintainNo", method = org.springframework.web.bind.annotation.RequestMethod.GET) | |
| 74 | + @Operation(summary = "养护任务提交记录-提交明细") | |
| 75 | + public CommonResult<PlanTaskCommitDetailPageRespVO> yhGetByProblemNo(@org.springframework.web.bind.annotation.RequestParam("problem_no") String problemNo, | |
| 76 | + @org.springframework.web.bind.annotation.RequestParam(value = "is_add_url", required = false) Boolean isAddUrl) { | |
| 77 | + return success(service.getByProblemNo(problemNo, isAddUrl)); | |
| 78 | + } | |
| 79 | +} | |
| 0 | 80 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/vo/DictTypeRespVO.java
0 → 100644
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/vo/PlanCommitDetailAddReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.app.vo; | |
| 2 | + | |
| 3 | +import jakarta.validation.constraints.NotEmpty; | |
| 4 | +import lombok.Data; | |
| 5 | + | |
| 6 | +@Data | |
| 7 | +public class PlanCommitDetailAddReqVO { | |
| 8 | + @NotEmpty | |
| 9 | + public String planNo; | |
| 10 | + public String content; | |
| 11 | +} | |
| 0 | 12 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/vo/PlanCommitDetailPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.app.vo; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 4 | +import lombok.Data; | |
| 5 | + | |
| 6 | +@Data | |
| 7 | +public class PlanCommitDetailPageReqVO extends PageParam { | |
| 8 | + private String planNo; | |
| 9 | +} | |
| 0 | 10 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/vo/PlanCommitDetailYhAddReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.app.vo; | |
| 2 | + | |
| 3 | +import jakarta.validation.constraints.NotEmpty; | |
| 4 | +import lombok.Data; | |
| 5 | + | |
| 6 | +@Data | |
| 7 | +public class PlanCommitDetailYhAddReqVO { | |
| 8 | + @NotEmpty | |
| 9 | + private String planNo; | |
| 10 | + private String problemNo; | |
| 11 | + @NotEmpty | |
| 12 | + private String content; | |
| 13 | +} | |
| 0 | 14 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/vo/PlanTaskCommitDetailPageRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.app.vo; | |
| 2 | + | |
| 3 | +import lombok.Data; | |
| 4 | + | |
| 5 | +@Data | |
| 6 | +public class PlanTaskCommitDetailPageRespVO { | |
| 7 | + private Long id; | |
| 8 | + private String planNo; | |
| 9 | + private String commitDate; | |
| 10 | + private String content; | |
| 11 | +} | |
| 0 | 12 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/vo/PlanYhCommitDetailPageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.app.vo; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 4 | +import lombok.Data; | |
| 5 | + | |
| 6 | +@Data | |
| 7 | +public class PlanYhCommitDetailPageReqVO extends PageParam { | |
| 8 | + private Long companyId; | |
| 9 | +} | |
| 0 | 10 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/vo/UserGpsAddReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.app.vo; | |
| 2 | + | |
| 3 | +import jakarta.validation.constraints.NotNull; | |
| 4 | +import lombok.Data; | |
| 5 | + | |
| 6 | +import java.math.BigDecimal; | |
| 7 | + | |
| 8 | +@Data | |
| 9 | +public class UserGpsAddReqVO { | |
| 10 | + private Integer type; | |
| 11 | + @NotNull | |
| 12 | + private BigDecimal lat; | |
| 13 | + @NotNull | |
| 14 | + private BigDecimal lon; | |
| 15 | +} | |
| 0 | 16 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/vo/UserGpsAppReqVO.java
0 → 100644
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/vo/UserGpsRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.app.vo; | |
| 2 | + | |
| 3 | +import lombok.Data; | |
| 4 | + | |
| 5 | +import java.math.BigDecimal; | |
| 6 | +import java.time.LocalDateTime; | |
| 7 | + | |
| 8 | +@Data | |
| 9 | +public class UserGpsRespVO { | |
| 10 | + private Long id; | |
| 11 | + private LocalDateTime commitDate; | |
| 12 | + private Integer type; | |
| 13 | + private Long userId; | |
| 14 | + private String userName; | |
| 15 | + private BigDecimal lat; | |
| 16 | + private BigDecimal lon; | |
| 17 | +} | |
| 0 | 18 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/business/MaterialTypeController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.business; | |
| 2 | + | |
| 3 | +import cn.hutool.core.bean.BeanUtil; | |
| 4 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
| 5 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 6 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 7 | +import com.zteits.urbanops.module.garden.controller.business.vo.MaterialTypeAddReqVO; | |
| 8 | +import com.zteits.urbanops.module.garden.controller.business.vo.MaterialTypeEditReqVO; | |
| 9 | +import com.zteits.urbanops.module.garden.controller.business.vo.MaterialTypeManagerRespVO; | |
| 10 | +import com.zteits.urbanops.module.garden.controller.business.vo.MaterialTypePageReqVO; | |
| 11 | +import com.zteits.urbanops.module.garden.dal.dataobject.material.MaterialTypeDO; | |
| 12 | +import com.zteits.urbanops.module.garden.service.material.MaterialTypeService; | |
| 13 | +import io.swagger.v3.oas.annotations.Operation; | |
| 14 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 15 | +import jakarta.annotation.Resource; | |
| 16 | +import jakarta.validation.Valid; | |
| 17 | +import org.springframework.web.bind.annotation.*; | |
| 18 | + | |
| 19 | +import java.time.LocalDateTime; | |
| 20 | +import java.util.List; | |
| 21 | + | |
| 22 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 23 | + | |
| 24 | +@Tag(name = "园林养护 - 物料类型") | |
| 25 | +@RestController | |
| 26 | +@RequestMapping("/materialType/type") | |
| 27 | +public class MaterialTypeController { | |
| 28 | + | |
| 29 | + @Resource | |
| 30 | + private MaterialTypeService materialTypeService; | |
| 31 | + | |
| 32 | + @GetMapping("/getMaterialBigTypeList") | |
| 33 | + @Operation(summary = "物料类型基础表-耗材类型List") | |
| 34 | + public CommonResult<List<MaterialTypeManagerRespVO>> getMaterialBigTypeList() { | |
| 35 | + return success(materialTypeService.queryMaterialBigType(null)); | |
| 36 | + } | |
| 37 | + | |
| 38 | + @GetMapping("/getMaterialMidTypeList") | |
| 39 | + @Operation(summary = "物料类型基础表-类别List") | |
| 40 | + public CommonResult<List<MaterialTypeManagerRespVO>> getMaterialMidTypeList(@RequestParam("material_type_id") Long materialTypeId) { | |
| 41 | + return success(materialTypeService.queryMaterialMidType(materialTypeId)); | |
| 42 | + } | |
| 43 | + | |
| 44 | + @GetMapping("/getMaterialDetailTypeList") | |
| 45 | + @Operation(summary = "物料类型基础表-类别明细List") | |
| 46 | + public CommonResult<List<MaterialTypeManagerRespVO>> getMaterialDetailTypeList(@RequestParam("parent_type_id") Long parentTypeId) { | |
| 47 | + return success(materialTypeService.queryMaterialDetailType(parentTypeId)); | |
| 48 | + } | |
| 49 | + | |
| 50 | + @PostMapping("/listForPage") | |
| 51 | + @Operation(summary = "耗材基础-分页") | |
| 52 | + public CommonResult<PageResult<MaterialTypeDO>> listForPage(@Valid @RequestBody MaterialTypePageReqVO reqVO) { | |
| 53 | + MaterialTypeDO where = new MaterialTypeDO(); | |
| 54 | + String keyword = reqVO.getTypeName(); | |
| 55 | + if (keyword == null || keyword.isEmpty()) { | |
| 56 | + keyword = reqVO.getMaterialTypeName(); | |
| 57 | + } | |
| 58 | + if (keyword == null || keyword.isEmpty()) { | |
| 59 | + keyword = reqVO.getTypeDetailName(); | |
| 60 | + } | |
| 61 | + where.setTypeName(keyword); | |
| 62 | + Page<MaterialTypeDO> page = materialTypeService.selectPage(new Page<>(reqVO.getPageNum(), reqVO.getPageSize()), where); | |
| 63 | + return success(new PageResult<>(page.getRecords(), page.getTotal())); | |
| 64 | + } | |
| 65 | + | |
| 66 | + @PostMapping("/add") | |
| 67 | + @Operation(summary = "耗材基础-添加") | |
| 68 | + public CommonResult<Boolean> add(@Valid @RequestBody MaterialTypeAddReqVO reqVO) { | |
| 69 | + MaterialTypeDO entity = new MaterialTypeDO(); | |
| 70 | + entity.setTypeName(reqVO.getTypeDetailName()); | |
| 71 | + entity.setParentId(reqVO.getTypeId()); | |
| 72 | + entity.setLevel(3); | |
| 73 | + entity.setCreator("system"); | |
| 74 | + entity.setUpdater("system"); | |
| 75 | + return success(materialTypeService.insert(entity)); | |
| 76 | + } | |
| 77 | + | |
| 78 | + @PostMapping("/edit") | |
| 79 | + @Operation(summary = "耗材基础-修改") | |
| 80 | + public CommonResult<Boolean> edit(@Valid @RequestBody MaterialTypeEditReqVO reqVO) { | |
| 81 | + MaterialTypeDO entity = new MaterialTypeDO(); | |
| 82 | + BeanUtil.copyProperties(reqVO, entity, true); | |
| 83 | + return success(materialTypeService.update(entity)); | |
| 84 | + } | |
| 85 | + | |
| 86 | + @GetMapping("/deleteById") | |
| 87 | + @Operation(summary = "耗材基础-删除") | |
| 88 | + public CommonResult<Boolean> deleteById(@RequestParam("id") Long id) { | |
| 89 | + return success(materialTypeService.deleteById(id)); | |
| 90 | + } | |
| 91 | +} | |
| 0 | 92 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/business/vo/MaterialTypeAddReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.business.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import jakarta.validation.constraints.NotEmpty; | |
| 5 | +import jakarta.validation.constraints.NotNull; | |
| 6 | +import lombok.Data; | |
| 7 | + | |
| 8 | +@Data | |
| 9 | +public class MaterialTypeAddReqVO { | |
| 10 | + @Schema(description = "物料类型ID") | |
| 11 | + @NotNull | |
| 12 | + private Long materialTypeId; | |
| 13 | + | |
| 14 | + @Schema(description = "耗材类型名称") | |
| 15 | + @NotEmpty | |
| 16 | + private String materialTypeName; | |
| 17 | + | |
| 18 | + @Schema(description = "类别ID") | |
| 19 | + @NotNull | |
| 20 | + private Long typeId; | |
| 21 | + | |
| 22 | + @Schema(description = "类别名称") | |
| 23 | + @NotEmpty | |
| 24 | + private String typeName; | |
| 25 | + | |
| 26 | + @Schema(description = "类别明细") | |
| 27 | + @NotEmpty | |
| 28 | + private String typeDetailName; | |
| 29 | +} | |
| 0 | 30 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/business/vo/MaterialTypeEditReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.business.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import jakarta.validation.constraints.NotNull; | |
| 5 | +import lombok.Data; | |
| 6 | + | |
| 7 | +@Data | |
| 8 | +public class MaterialTypeEditReqVO { | |
| 9 | + @NotNull | |
| 10 | + private Long id; | |
| 11 | + | |
| 12 | + @Schema(description = "物料类型ID") | |
| 13 | + private Long materialTypeId; | |
| 14 | + | |
| 15 | + @Schema(description = "耗材类型名称") | |
| 16 | + private String materialTypeName; | |
| 17 | + | |
| 18 | + @Schema(description = "类别ID") | |
| 19 | + private Long typeId; | |
| 20 | + | |
| 21 | + @Schema(description = "类别名称") | |
| 22 | + private String typeName; | |
| 23 | + | |
| 24 | + @Schema(description = "类别明细ID") | |
| 25 | + private Long typeDetailId; | |
| 26 | + | |
| 27 | + @Schema(description = "类别明细") | |
| 28 | + private String typeDetailName; | |
| 29 | + | |
| 30 | + private Long materialParentTypeId; | |
| 31 | + | |
| 32 | + private Long parentTypeId; | |
| 33 | + | |
| 34 | + private String status; | |
| 35 | + | |
| 36 | + private String remark; | |
| 37 | +} | |
| 0 | 38 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/business/vo/MaterialTypeManagerRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.business.vo; | |
| 2 | + | |
| 3 | +import lombok.Data; | |
| 4 | + | |
| 5 | +@Data | |
| 6 | +public class MaterialTypeManagerRespVO { | |
| 7 | + private Long value; | |
| 8 | + private String label; | |
| 9 | + private Long materialParentTypeId; | |
| 10 | + private Long parentTypeId; | |
| 11 | +} | |
| 0 | 12 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/business/vo/MaterialTypePageReqVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.controller.business.vo; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 4 | +import lombok.Data; | |
| 5 | + | |
| 6 | +@Data | |
| 7 | +public class MaterialTypePageReqVO { | |
| 8 | + | |
| 9 | + @Schema(description = "页码") | |
| 10 | + private Integer pageNum = 1; | |
| 11 | + | |
| 12 | + @Schema(description = "每页数量") | |
| 13 | + private Integer pageSize = 10; | |
| 14 | + | |
| 15 | + private String materialTypeName; | |
| 16 | + private String typeName; | |
| 17 | + private String typeDetailName; | |
| 18 | +} | |
| 0 | 19 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/device/DeviceCompanyDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.device; | |
| 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_device_company") | |
| 9 | +@Data | |
| 10 | +public class DeviceCompanyDO extends BaseDO { | |
| 11 | + @TableId | |
| 12 | + private Long id; | |
| 13 | + private String name; | |
| 14 | + private Long parentId; | |
| 15 | + private Long belongCompanyId; | |
| 16 | + private String enterLoginName; | |
| 17 | + private String passWord; | |
| 18 | + private String status; | |
| 19 | + private String remark; | |
| 20 | +} | |
| 0 | 21 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/hotline/HotlineCaseDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.hotline; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.annotation.TableId; | |
| 4 | +import com.baomidou.mybatisplus.annotation.TableName; | |
| 5 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
| 6 | +import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | |
| 7 | +import lombok.Data; | |
| 8 | + | |
| 9 | +import java.util.Date; | |
| 10 | + | |
| 11 | +@TableName("garden_hotline_case") | |
| 12 | +@Data | |
| 13 | +public class HotlineCaseDO extends BaseDO { | |
| 14 | + @TableId | |
| 15 | + private String id; | |
| 16 | + private String hotlinenumber; | |
| 17 | + private String casefile; | |
| 18 | + private String title; | |
| 19 | + private String content; | |
| 20 | + private String department; | |
| 21 | + private String taskstate; | |
| 22 | + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |
| 23 | + private Date replayTime; | |
| 24 | + private String street; | |
| 25 | +} | |
| 0 | 26 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/hotline/HotlineFileDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.hotline; | |
| 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_hotline_file") | |
| 9 | +@Data | |
| 10 | +public class HotlineFileDO extends BaseDO { | |
| 11 | + @TableId | |
| 12 | + private String caseid; | |
| 13 | + private String casefile; | |
| 14 | + private String title; | |
| 15 | + private String content; | |
| 16 | +} | |
| 0 | 17 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/maintainplan/MaintainPlanDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.maintainplan; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.annotation.KeySequence; | |
| 4 | +import com.baomidou.mybatisplus.annotation.TableId; | |
| 5 | +import com.baomidou.mybatisplus.annotation.TableName; | |
| 6 | +import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | |
| 7 | +import lombok.Data; | |
| 8 | + | |
| 9 | +@TableName("garden_maintain_plan") | |
| 10 | +@KeySequence("garden_maintain_plan_seq") | |
| 11 | +@Data | |
| 12 | +public class MaintainPlanDO extends BaseDO { | |
| 13 | + @TableId | |
| 14 | + private Long id; | |
| 15 | + private String planNo; | |
| 16 | + private String planName; | |
| 17 | + private Integer type; | |
| 18 | + private Long deptId; | |
| 19 | + private Long companyId; | |
| 20 | + private String status; | |
| 21 | +} | |
| 0 | 22 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/maintainrate/MaintainRateDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.maintainrate; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.annotation.KeySequence; | |
| 4 | +import com.baomidou.mybatisplus.annotation.TableId; | |
| 5 | +import com.baomidou.mybatisplus.annotation.TableName; | |
| 6 | +import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | |
| 7 | +import lombok.*; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * 养护频次 DO | |
| 11 | + */ | |
| 12 | +@TableName("garden_maintain_rate") | |
| 13 | +@KeySequence("garden_maintain_rate_seq") | |
| 14 | +@Data | |
| 15 | +@EqualsAndHashCode(callSuper = true) | |
| 16 | +@ToString(callSuper = true) | |
| 17 | +@Builder | |
| 18 | +@NoArgsConstructor | |
| 19 | +@AllArgsConstructor | |
| 20 | +public class MaintainRateDO extends BaseDO { | |
| 21 | + | |
| 22 | + @TableId | |
| 23 | + private Long id; | |
| 24 | + | |
| 25 | + private Integer type; | |
| 26 | + | |
| 27 | + private Integer maintainSubjectId; | |
| 28 | + private String maintainSubjectName; | |
| 29 | + | |
| 30 | + private Integer maintainTypeId; | |
| 31 | + private String maintainTypeName; | |
| 32 | + | |
| 33 | + private String levelTop; | |
| 34 | + private String levelOne; | |
| 35 | + private String levelTwo; | |
| 36 | + private String levelThree; | |
| 37 | + | |
| 38 | + private Integer cycleId; | |
| 39 | + private String cycleName; | |
| 40 | + | |
| 41 | + private String status; | |
| 42 | +} | |
| 0 | 43 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/material/MaterialDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.material; | |
| 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_material") | |
| 9 | +@Data | |
| 10 | +public class MaterialDO extends BaseDO { | |
| 11 | + @TableId | |
| 12 | + private Long materialId; | |
| 13 | + private String fullCode; | |
| 14 | + private String materialCode; | |
| 15 | + private String materialName; | |
| 16 | + private Long materialTypeId; | |
| 17 | + private String materialTypeName; | |
| 18 | + private Long typeId; | |
| 19 | + private String typeName; | |
| 20 | + private Long typeDetailId; | |
| 21 | + private String typeDetailName; | |
| 22 | + private String specCode; | |
| 23 | + private String specifications; | |
| 24 | + private Long unitId; | |
| 25 | + private String unitName; | |
| 26 | + private Long belongCompanyId; | |
| 27 | + private String belongCompanyName; | |
| 28 | + private String status; | |
| 29 | + private Integer isAssociatedOrder; | |
| 30 | +} | |
| 0 | 31 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/material/MaterialInventoryDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.material; | |
| 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_material_inventory") | |
| 9 | +@Data | |
| 10 | +public class MaterialInventoryDO extends BaseDO { | |
| 11 | + @TableId | |
| 12 | + private Long inventoryId; | |
| 13 | + private Long materialId; | |
| 14 | + private String materialName; | |
| 15 | + private Long materialTypeId; | |
| 16 | + private String materialTypeName; | |
| 17 | + private Long typeId; | |
| 18 | + private String typeName; | |
| 19 | + private Long typeDetailId; | |
| 20 | + private String typeDetailName; | |
| 21 | + private String specifications; | |
| 22 | + private Long belongCompanyId; | |
| 23 | + private String belongCompanyName; | |
| 24 | + private Long unitId; | |
| 25 | + private String unitName; | |
| 26 | + private Long currentNum; | |
| 27 | + private Long outTotalNum; | |
| 28 | + private Long inventoryTotalNum; | |
| 29 | + private String status; | |
| 30 | + private Long inventoryAlermNum; | |
| 31 | + private Long deptId; | |
| 32 | +} | |
| 0 | 33 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/material/MaterialInventoryInDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.material; | |
| 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 | +import java.math.BigDecimal; | |
| 9 | +import java.util.Date; | |
| 10 | + | |
| 11 | +@TableName("garden_material_inventory_in") | |
| 12 | +@Data | |
| 13 | +public class MaterialInventoryInDO extends BaseDO { | |
| 14 | + @TableId | |
| 15 | + private Long id; | |
| 16 | + private String inventoryInNo; | |
| 17 | + private Long materialId; | |
| 18 | + private String materialName; | |
| 19 | + private Long materialTypeId; | |
| 20 | + private String materialTypeName; | |
| 21 | + private Long typeId; | |
| 22 | + private String typeName; | |
| 23 | + private Long typeDetailId; | |
| 24 | + private String typeDetailName; | |
| 25 | + private String specifications; | |
| 26 | + private Long belongCompanyId; | |
| 27 | + private String belongCompanyName; | |
| 28 | + private Long inInventoryNum; | |
| 29 | + private BigDecimal materialPrice; | |
| 30 | + private Long unitId; | |
| 31 | + private String unitName; | |
| 32 | + private Date buyDate; | |
| 33 | + private String supplierName; | |
| 34 | + private String contactsName; | |
| 35 | + private String contactsPhone; | |
| 36 | + private String status; | |
| 37 | + private Long deptId; | |
| 38 | +} | |
| 0 | 39 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/material/MaterialInventoryOutDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.material; | |
| 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 | +import java.util.Date; | |
| 9 | + | |
| 10 | +@TableName("garden_material_inventory_out") | |
| 11 | +@Data | |
| 12 | +public class MaterialInventoryOutDO extends BaseDO { | |
| 13 | + @TableId | |
| 14 | + private Long id; | |
| 15 | + private String inventoryOutNo; | |
| 16 | + private Long materialId; | |
| 17 | + private String materialName; | |
| 18 | + private Long materialTypeId; | |
| 19 | + private String materialTypeName; | |
| 20 | + private Long typeId; | |
| 21 | + private String typeName; | |
| 22 | + private Long typeDetailId; | |
| 23 | + private String typeDetailName; | |
| 24 | + private String specifications; | |
| 25 | + private Long belongCompanyId; | |
| 26 | + private String belongCompanyName; | |
| 27 | + private Long outInventoryNum; | |
| 28 | + private Long unitId; | |
| 29 | + private String unitName; | |
| 30 | + private Date outDate; | |
| 31 | + private String status; | |
| 32 | + private Integer type; | |
| 33 | + private Long deptId; | |
| 34 | +} | |
| 0 | 35 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/material/MaterialManagerDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.material; | |
| 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_material_manager") | |
| 9 | +@Data | |
| 10 | +public class MaterialManagerDO extends BaseDO { | |
| 11 | + @TableId | |
| 12 | + private Long id; | |
| 13 | + private String name; | |
| 14 | + private Long deptId; | |
| 15 | +} | |
| 0 | 16 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/material/MaterialTypeDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.material; | |
| 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_material_type") | |
| 9 | +@Data | |
| 10 | +public class MaterialTypeDO extends BaseDO { | |
| 11 | + @TableId | |
| 12 | + private Long id; | |
| 13 | + private String typeName; | |
| 14 | + private Long parentId; | |
| 15 | + private Integer level; | |
| 16 | +} | |
| 0 | 17 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/performance/PerformanceExpertsDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.performance; | |
| 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_performance_experts") | |
| 9 | +@Data | |
| 10 | +public class PerformanceExpertsDO extends BaseDO { | |
| 11 | + @TableId | |
| 12 | + private Long id; | |
| 13 | + private String name; | |
| 14 | + private Long deptId; | |
| 15 | +} | |
| 0 | 16 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/performance/PerformanceIndexDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.performance; | |
| 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_performance_index") | |
| 9 | +@Data | |
| 10 | +public class PerformanceIndexDO extends BaseDO { | |
| 11 | + @TableId | |
| 12 | + private Long id; | |
| 13 | + private String title; | |
| 14 | + private String deptName; | |
| 15 | + private Long deptId; | |
| 16 | + private String status; | |
| 17 | +} | |
| 0 | 18 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/performance/PerformanceWriteDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.performance; | |
| 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_performance_write") | |
| 9 | +@Data | |
| 10 | +public class PerformanceWriteDO extends BaseDO { | |
| 11 | + @TableId | |
| 12 | + private Long id; | |
| 13 | + private String title; | |
| 14 | + private Long deptId; | |
| 15 | +} | |
| 0 | 16 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/photo/SysPhotoDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.photo; | |
| 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_sys_photo") | |
| 9 | +@Data | |
| 10 | +public class SysPhotoDO extends BaseDO { | |
| 11 | + @TableId | |
| 12 | + private String id; | |
| 13 | + private String url; | |
| 14 | + private String title; | |
| 15 | + private String remark; | |
| 16 | +} | |
| 0 | 17 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/plancommit/MaintainPlanCommitDetailDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.plancommit; | |
| 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_maintain_plan_commit_detail") | |
| 9 | +@Data | |
| 10 | +public class MaintainPlanCommitDetailDO extends BaseDO { | |
| 11 | + @TableId | |
| 12 | + private Long id; | |
| 13 | + private String planNo; | |
| 14 | + private String problemNo; | |
| 15 | + private String commitDate; | |
| 16 | + private String content; | |
| 17 | +} | |
| 0 | 18 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/problem/MaintainProblemManagerDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.problem; | |
| 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_problem_manager") | |
| 9 | +@Data | |
| 10 | +public class MaintainProblemManagerDO extends BaseDO { | |
| 11 | + @TableId | |
| 12 | + private Long id; | |
| 13 | + private Integer distributeStatus; | |
| 14 | + private Integer leaderConfrimStatus; | |
| 15 | + private Integer userConfrimStatus; | |
| 16 | + private String status; | |
| 17 | + private String title; | |
| 18 | + private String content; | |
| 19 | + private Long deptId; | |
| 20 | +} | |
| 0 | 21 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/problem/MaintainTaskManagerDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.problem; | |
| 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_problem_task") | |
| 9 | +@Data | |
| 10 | +public class MaintainTaskManagerDO extends BaseDO { | |
| 11 | + @TableId | |
| 12 | + private Long id; | |
| 13 | + private String problemNo; | |
| 14 | + private Long deptId; | |
| 15 | + private String title; | |
| 16 | + private String content; | |
| 17 | +} | |
| 0 | 18 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/project/ProjectManagerDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.project; | |
| 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_project_manager") | |
| 9 | +@Data | |
| 10 | +public class ProjectManagerDO extends BaseDO { | |
| 11 | + @TableId | |
| 12 | + private Long id; | |
| 13 | + private String projectName; | |
| 14 | + private Long deptId; | |
| 15 | + private String status; | |
| 16 | +} | |
| 0 | 17 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/project/SubProjectManagerDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.project; | |
| 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_sub_project_manager") | |
| 9 | +@Data | |
| 10 | +public class SubProjectManagerDO extends BaseDO { | |
| 11 | + @TableId | |
| 12 | + private Long id; | |
| 13 | + private String name; | |
| 14 | + private Long deptId; | |
| 15 | +} | |
| 0 | 16 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/road/RoadManagerDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.road; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.annotation.KeySequence; | |
| 4 | +import com.baomidou.mybatisplus.annotation.TableId; | |
| 5 | +import com.baomidou.mybatisplus.annotation.TableName; | |
| 6 | +import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | |
| 7 | +import lombok.Data; | |
| 8 | + | |
| 9 | +@TableName("garden_road_manager") | |
| 10 | +@KeySequence("garden_road_manager_seq") | |
| 11 | +@Data | |
| 12 | +public class RoadManagerDO extends BaseDO { | |
| 13 | + @TableId | |
| 14 | + private Long id; | |
| 15 | + private String roadName; | |
| 16 | + private String streetId; | |
| 17 | + private String streetName; | |
| 18 | + private Integer curingLevelId; | |
| 19 | + private String curingLevelName; | |
| 20 | + private String greenBeltTreeArea; | |
| 21 | + private String greenBeltArea; | |
| 22 | + private String totalArea; | |
| 23 | + private String treeArea; | |
| 24 | + private String startingLatitude; | |
| 25 | + private String startingLongitude; | |
| 26 | + private String startingRemark; | |
| 27 | + private String endLatitude; | |
| 28 | + private String endLongitude; | |
| 29 | + private String endRemark; | |
| 30 | + private Integer status; | |
| 31 | + private Long companyId; | |
| 32 | + private String companyName; | |
| 33 | + private Long deptId; | |
| 34 | + private String roadAttr; | |
| 35 | + private String direction; | |
| 36 | +} | |
| 0 | 37 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/standingbook/StandingBookDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.standingbook; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.annotation.TableId; | |
| 4 | +import com.baomidou.mybatisplus.annotation.TableName; | |
| 5 | +import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | |
| 6 | +import lombok.Data; | |
| 7 | + | |
| 8 | +@TableName("garden_standing_book") | |
| 9 | +@Data | |
| 10 | +public class StandingBookDO extends BaseDO { | |
| 11 | + @TableId | |
| 12 | + private Long id; | |
| 13 | + private String standingBookNo; | |
| 14 | + private String standingBookYear; | |
| 15 | + private Long belongCompanyId; | |
| 16 | +} | |
| 0 | 17 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/treerecord/GardenOldtreesDO.java
0 → 100644
| 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 | +} | |
| 0 | 43 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/treerecord/GardenTreeDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.treerecord; | |
| 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; | |
| 9 | + | |
| 10 | +@TableName("garden_tree") | |
| 11 | +@KeySequence("garden_tree_seq") | |
| 12 | +@Data | |
| 13 | +@Accessors(chain = false) | |
| 14 | +public class GardenTreeDO extends BaseDO { | |
| 15 | + @TableId | |
| 16 | + private Long id; | |
| 17 | + private String treenumber; | |
| 18 | + private String latinname; | |
| 19 | + private String treetype; | |
| 20 | + private String treeheight; | |
| 21 | + private String canopy; | |
| 22 | + private String dbh; | |
| 23 | + private String growthvigor; | |
| 24 | + private String treelevel; | |
| 25 | + private String longitude; | |
| 26 | + private String latitude; | |
| 27 | + private String location; | |
| 28 | + private String maintainunit; | |
| 29 | + private String managedutyunit; | |
| 30 | + private Long road; | |
| 31 | + private String street; | |
| 32 | + private String oldtreeownership; | |
| 33 | + private String datastate; | |
| 34 | + private String estimationtreeage; | |
| 35 | + private String canopyeastwest; | |
| 36 | + private String canopysouthnorth; | |
| 37 | + private String weekday; | |
| 38 | + private String growlocation; | |
| 39 | + private String growthenvironment; | |
| 40 | + private String treephotoone; | |
| 41 | + private String treephototwo; | |
| 42 | + private String treephotothree; | |
| 43 | + private String treephotofour; | |
| 44 | + private String treephotofive; | |
| 45 | + private String createby; | |
| 46 | + private String updateby; | |
| 47 | + private Long deptId; | |
| 48 | + private String remark; | |
| 49 | +} | |
| 0 | 50 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/usergps/UserGpsDO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.dataobject.usergps; | |
| 2 | + | |
| 3 | +import lombok.Data; | |
| 4 | + | |
| 5 | +import java.math.BigDecimal; | |
| 6 | +import java.time.LocalDateTime; | |
| 7 | + | |
| 8 | +@Data | |
| 9 | +public class UserGpsDO { | |
| 10 | + private Long id; | |
| 11 | + private LocalDateTime commitDate; | |
| 12 | + private Long userId; | |
| 13 | + private String userName; | |
| 14 | + private Integer type; | |
| 15 | + private BigDecimal lat; | |
| 16 | + private BigDecimal lon; | |
| 17 | + private String status; | |
| 18 | +} | |
| 0 | 19 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/device/DeviceCompanyMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.device; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | |
| 4 | +import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 5 | +import com.zteits.urbanops.module.garden.dal.dataobject.device.DeviceCompanyDO; | |
| 6 | +import org.apache.ibatis.annotations.Mapper; | |
| 7 | + | |
| 8 | +@Mapper | |
| 9 | +public interface DeviceCompanyMapper extends BaseMapperX<DeviceCompanyDO> { | |
| 10 | + | |
| 11 | + default DeviceCompanyDO selectDeviceByCompanyId(Long belongCompanyId) { | |
| 12 | + return selectOne(new LambdaQueryWrapperX<DeviceCompanyDO>().eq(DeviceCompanyDO::getBelongCompanyId, belongCompanyId)); | |
| 13 | + } | |
| 14 | +} | |
| 0 | 15 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/hotline/HotlineCaseMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.hotline; | |
| 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.hotline.HotlineCaseDO; | |
| 7 | +import org.apache.ibatis.annotations.Mapper; | |
| 8 | + | |
| 9 | +@Mapper | |
| 10 | +public interface HotlineCaseMapper extends BaseMapperX<HotlineCaseDO> { | |
| 11 | + default PageResult<HotlineCaseDO> selectPage(com.zteits.urbanops.framework.common.pojo.PageParam pageParam, HotlineCaseDO where) { | |
| 12 | + return selectPage(pageParam, null, new LambdaQueryWrapperX<HotlineCaseDO>() | |
| 13 | + .likeIfPresent(HotlineCaseDO::getTitle, where.getTitle()) | |
| 14 | + .likeIfPresent(HotlineCaseDO::getContent, where.getContent()) | |
| 15 | + .eqIfPresent(HotlineCaseDO::getDepartment, where.getDepartment()) | |
| 16 | + .eqIfPresent(HotlineCaseDO::getTaskstate, where.getTaskstate()) | |
| 17 | + .orderByDesc(HotlineCaseDO::getUpdateTime)); | |
| 18 | + } | |
| 19 | +} | |
| 0 | 20 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/hotline/HotlineFileMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.hotline; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | |
| 4 | +import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 5 | +import com.zteits.urbanops.module.garden.dal.dataobject.hotline.HotlineFileDO; | |
| 6 | +import org.apache.ibatis.annotations.Mapper; | |
| 7 | + | |
| 8 | +import java.util.List; | |
| 9 | + | |
| 10 | +@Mapper | |
| 11 | +public interface HotlineFileMapper extends BaseMapperX<HotlineFileDO> { | |
| 12 | + default List<HotlineFileDO> selectList(HotlineFileDO where) { | |
| 13 | + return selectList(new LambdaQueryWrapperX<HotlineFileDO>() | |
| 14 | + .likeIfPresent(HotlineFileDO::getTitle, where.getTitle()) | |
| 15 | + .likeIfPresent(HotlineFileDO::getContent, where.getContent())); | |
| 16 | + } | |
| 17 | +} | |
| 0 | 18 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/maintainplan/MaintainPlanMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.maintainplan; | |
| 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.maintainplan.MaintainPlanDO; | |
| 7 | +import org.apache.ibatis.annotations.Mapper; | |
| 8 | + | |
| 9 | +@Mapper | |
| 10 | +public interface MaintainPlanMapper extends BaseMapperX<MaintainPlanDO> { | |
| 11 | + default PageResult<MaintainPlanDO> selectPage(com.zteits.urbanops.framework.common.pojo.PageParam pageParam, MaintainPlanDO where) { | |
| 12 | + return selectPage(pageParam, null, new LambdaQueryWrapperX<MaintainPlanDO>() | |
| 13 | + .eqIfPresent(MaintainPlanDO::getType, where.getType()) | |
| 14 | + .likeIfPresent(MaintainPlanDO::getPlanName, where.getPlanName()) | |
| 15 | + .eqIfPresent(MaintainPlanDO::getCompanyId, where.getCompanyId()) | |
| 16 | + .eqIfPresent(MaintainPlanDO::getDeptId, where.getDeptId()) | |
| 17 | + .orderByDesc(MaintainPlanDO::getId)); | |
| 18 | + } | |
| 19 | +} | |
| 0 | 20 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/maintainrate/MaintainRateMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.maintainrate; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 4 | +import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | |
| 5 | +import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.maintainrate.MaintainRateDO; | |
| 7 | +import com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo.MaintainRatePageReqVO; | |
| 8 | +import org.apache.ibatis.annotations.Mapper; | |
| 9 | + | |
| 10 | +@Mapper | |
| 11 | +public interface MaintainRateMapper extends BaseMapperX<MaintainRateDO> { | |
| 12 | + | |
| 13 | + default PageResult<MaintainRateDO> selectPage(MaintainRatePageReqVO reqVO) { | |
| 14 | + return selectPage(reqVO, new LambdaQueryWrapperX<MaintainRateDO>() | |
| 15 | + .eqIfPresent(MaintainRateDO::getType, reqVO.getType()) | |
| 16 | + .eqIfPresent(MaintainRateDO::getMaintainSubjectId, reqVO.getMaintainSubjectId()) | |
| 17 | + .likeIfPresent(MaintainRateDO::getMaintainSubjectName, reqVO.getMaintainSubjectName()) | |
| 18 | + .eqIfPresent(MaintainRateDO::getMaintainTypeId, reqVO.getMaintainTypeId()) | |
| 19 | + .likeIfPresent(MaintainRateDO::getMaintainTypeName, reqVO.getMaintainTypeName()) | |
| 20 | + .eqIfPresent(MaintainRateDO::getCycleId, reqVO.getCycleId()) | |
| 21 | + .likeIfPresent(MaintainRateDO::getCycleName, reqVO.getCycleName()) | |
| 22 | + .eqIfPresent(MaintainRateDO::getStatus, reqVO.getStatus()) | |
| 23 | + .orderByDesc(MaintainRateDO::getId)); | |
| 24 | + } | |
| 25 | +} | |
| 0 | 26 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/material/MaterialInventoryInMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.material; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | |
| 4 | +import com.zteits.urbanops.module.garden.dal.dataobject.material.MaterialInventoryInDO; | |
| 5 | +import org.apache.ibatis.annotations.Mapper; | |
| 6 | + | |
| 7 | +@Mapper | |
| 8 | +public interface MaterialInventoryInMapper extends BaseMapperX<MaterialInventoryInDO> { | |
| 9 | + default MaterialInventoryInDO selectByNo(String inventoryInNo) { | |
| 10 | + return selectOne(new com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX<MaterialInventoryInDO>() | |
| 11 | + .eq(MaterialInventoryInDO::getInventoryInNo, inventoryInNo)); | |
| 12 | + } | |
| 13 | +} | |
| 0 | 14 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/material/MaterialInventoryMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.material; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | |
| 4 | +import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 5 | +import com.zteits.urbanops.module.garden.dal.dataobject.material.MaterialInventoryDO; | |
| 6 | +import org.apache.ibatis.annotations.Mapper; | |
| 7 | +import org.apache.ibatis.annotations.Param; | |
| 8 | + | |
| 9 | +@Mapper | |
| 10 | +public interface MaterialInventoryMapper extends BaseMapperX<MaterialInventoryDO> { | |
| 11 | + | |
| 12 | + default MaterialInventoryDO selectByMaterialId(Long materialId) { | |
| 13 | + return selectOne(new LambdaQueryWrapperX<MaterialInventoryDO>().eq(MaterialInventoryDO::getMaterialId, materialId)); | |
| 14 | + } | |
| 15 | + | |
| 16 | + default MaterialInventoryDO selectByTypeDetailId(Long typeDetailId, Long companyId) { | |
| 17 | + return selectOne(new LambdaQueryWrapperX<MaterialInventoryDO>() | |
| 18 | + .eq(MaterialInventoryDO::getTypeDetailId, typeDetailId) | |
| 19 | + .eq(MaterialInventoryDO::getBelongCompanyId, companyId)); | |
| 20 | + } | |
| 21 | + | |
| 22 | + default int updateInventoryByMaterialId(Long inventoryId, Long outNum) { | |
| 23 | + MaterialInventoryDO inv = selectById(inventoryId); | |
| 24 | + if (inv == null) return 0; | |
| 25 | + MaterialInventoryDO upd = new MaterialInventoryDO(); | |
| 26 | + upd.setInventoryId(inventoryId); | |
| 27 | + upd.setCurrentNum(inv.getCurrentNum() - outNum); | |
| 28 | + upd.setOutTotalNum(inv.getOutTotalNum() == null ? outNum : inv.getOutTotalNum() + outNum); | |
| 29 | + return updateById(upd); | |
| 30 | + } | |
| 31 | + | |
| 32 | + default int updateInventoryAlarmNum(Long materialId, Long inventoryAlermNum) { | |
| 33 | + MaterialInventoryDO inv = selectByMaterialId(materialId); | |
| 34 | + if (inv == null) return 0; | |
| 35 | + MaterialInventoryDO upd = new MaterialInventoryDO(); | |
| 36 | + upd.setInventoryId(inv.getInventoryId()); | |
| 37 | + upd.setInventoryAlermNum(inventoryAlermNum); | |
| 38 | + return updateById(upd); | |
| 39 | + } | |
| 40 | +} | |
| 0 | 41 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/material/MaterialInventoryOutMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.material; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | |
| 4 | +import com.zteits.urbanops.module.garden.dal.dataobject.material.MaterialInventoryOutDO; | |
| 5 | +import org.apache.ibatis.annotations.Mapper; | |
| 6 | + | |
| 7 | +@Mapper | |
| 8 | +public interface MaterialInventoryOutMapper extends BaseMapperX<MaterialInventoryOutDO> { | |
| 9 | +} | |
| 0 | 10 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/material/MaterialManagerMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.material; | |
| 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.material.MaterialManagerDO; | |
| 7 | +import org.apache.ibatis.annotations.Mapper; | |
| 8 | + | |
| 9 | +import java.util.List; | |
| 10 | + | |
| 11 | +@Mapper | |
| 12 | +public interface MaterialManagerMapper extends BaseMapperX<MaterialManagerDO> { | |
| 13 | + default PageResult<MaterialManagerDO> selectPage(com.zteits.urbanops.framework.common.pojo.PageParam pageParam, MaterialManagerDO where) { | |
| 14 | + return selectPage(pageParam, null, new LambdaQueryWrapperX<MaterialManagerDO>() | |
| 15 | + .likeIfPresent(MaterialManagerDO::getName, where.getName()) | |
| 16 | + .eqIfPresent(MaterialManagerDO::getDeptId, where.getDeptId()) | |
| 17 | + .orderByDesc(MaterialManagerDO::getUpdateTime)); | |
| 18 | + } | |
| 19 | + | |
| 20 | + default List<MaterialManagerDO> selectList(MaterialManagerDO where) { | |
| 21 | + return selectList(new LambdaQueryWrapperX<MaterialManagerDO>() | |
| 22 | + .likeIfPresent(MaterialManagerDO::getName, where.getName()) | |
| 23 | + .eqIfPresent(MaterialManagerDO::getDeptId, where.getDeptId()) | |
| 24 | + .orderByAsc(MaterialManagerDO::getName)); | |
| 25 | + } | |
| 26 | +} | |
| 0 | 27 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/material/MaterialMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.material; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | |
| 4 | +import com.zteits.urbanops.module.garden.dal.dataobject.material.MaterialDO; | |
| 5 | +import org.apache.ibatis.annotations.Mapper; | |
| 6 | + | |
| 7 | +@Mapper | |
| 8 | +public interface MaterialMapper extends BaseMapperX<MaterialDO> { | |
| 9 | +} | |
| 0 | 10 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/material/MaterialTypeMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.material; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | |
| 4 | +import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 5 | +import com.zteits.urbanops.module.garden.dal.dataobject.material.MaterialTypeDO; | |
| 6 | +import org.apache.ibatis.annotations.Mapper; | |
| 7 | + | |
| 8 | +import java.util.List; | |
| 9 | + | |
| 10 | +@Mapper | |
| 11 | +public interface MaterialTypeMapper extends BaseMapperX<MaterialTypeDO> { | |
| 12 | + default List<MaterialTypeDO> selectBigTypeList() { | |
| 13 | + return selectList(new LambdaQueryWrapperX<MaterialTypeDO>().eq(MaterialTypeDO::getLevel, 1).orderByAsc(MaterialTypeDO::getTypeName)); | |
| 14 | + } | |
| 15 | + | |
| 16 | + default com.zteits.urbanops.framework.common.pojo.PageResult<MaterialTypeDO> selectPage(com.zteits.urbanops.framework.common.pojo.PageParam pageParam, MaterialTypeDO where) { | |
| 17 | + return selectPage(pageParam, null, new LambdaQueryWrapperX<MaterialTypeDO>() | |
| 18 | + .likeIfPresent(MaterialTypeDO::getTypeName, where.getTypeName()) | |
| 19 | + .eqIfPresent(MaterialTypeDO::getParentId, where.getParentId()) | |
| 20 | + .orderByAsc(MaterialTypeDO::getTypeName)); | |
| 21 | + } | |
| 22 | +} | |
| 0 | 23 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/performance/PerformanceExpertsMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.performance; | |
| 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.performance.PerformanceExpertsDO; | |
| 7 | +import org.apache.ibatis.annotations.Mapper; | |
| 8 | + | |
| 9 | +@Mapper | |
| 10 | +public interface PerformanceExpertsMapper extends BaseMapperX<PerformanceExpertsDO> { | |
| 11 | + default PageResult<PerformanceExpertsDO> selectPage(com.zteits.urbanops.framework.common.pojo.PageParam pageParam, PerformanceExpertsDO where) { | |
| 12 | + return selectPage(pageParam, null, new LambdaQueryWrapperX<PerformanceExpertsDO>() | |
| 13 | + .likeIfPresent(PerformanceExpertsDO::getName, where.getName()) | |
| 14 | + .eqIfPresent(PerformanceExpertsDO::getDeptId, where.getDeptId()) | |
| 15 | + .orderByDesc(PerformanceExpertsDO::getUpdateTime)); | |
| 16 | + } | |
| 17 | +} | |
| 0 | 18 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/performance/PerformanceIndexMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.performance; | |
| 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.performance.PerformanceIndexDO; | |
| 7 | +import org.apache.ibatis.annotations.Mapper; | |
| 8 | + | |
| 9 | +@Mapper | |
| 10 | +public interface PerformanceIndexMapper extends BaseMapperX<PerformanceIndexDO> { | |
| 11 | + default PageResult<PerformanceIndexDO> selectPage(com.zteits.urbanops.framework.common.pojo.PageParam pageParam, PerformanceIndexDO where) { | |
| 12 | + return selectPage(pageParam, null, new LambdaQueryWrapperX<PerformanceIndexDO>() | |
| 13 | + .likeIfPresent(PerformanceIndexDO::getTitle, where.getTitle()) | |
| 14 | + .eqIfPresent(PerformanceIndexDO::getDeptId, where.getDeptId()) | |
| 15 | + .orderByDesc(PerformanceIndexDO::getUpdateTime)); | |
| 16 | + } | |
| 17 | +} | |
| 0 | 18 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/performance/PerformanceWriteMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.performance; | |
| 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.performance.PerformanceWriteDO; | |
| 7 | +import org.apache.ibatis.annotations.Mapper; | |
| 8 | + | |
| 9 | +@Mapper | |
| 10 | +public interface PerformanceWriteMapper extends BaseMapperX<PerformanceWriteDO> { | |
| 11 | + default PageResult<PerformanceWriteDO> selectPage(com.zteits.urbanops.framework.common.pojo.PageParam pageParam, PerformanceWriteDO where) { | |
| 12 | + return selectPage(pageParam, null, new LambdaQueryWrapperX<PerformanceWriteDO>() | |
| 13 | + .likeIfPresent(PerformanceWriteDO::getTitle, where.getTitle()) | |
| 14 | + .eqIfPresent(PerformanceWriteDO::getDeptId, where.getDeptId()) | |
| 15 | + .orderByDesc(PerformanceWriteDO::getUpdateTime)); | |
| 16 | + } | |
| 17 | +} | |
| 0 | 18 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/photo/SysPhotoMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.photo; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | |
| 4 | +import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 5 | +import com.zteits.urbanops.module.garden.dal.dataobject.photo.SysPhotoDO; | |
| 6 | +import org.apache.ibatis.annotations.Mapper; | |
| 7 | + | |
| 8 | +import java.util.List; | |
| 9 | + | |
| 10 | +@Mapper | |
| 11 | +public interface SysPhotoMapper extends BaseMapperX<SysPhotoDO> { | |
| 12 | + default List<SysPhotoDO> selectList(SysPhotoDO where) { | |
| 13 | + return selectList(new LambdaQueryWrapperX<SysPhotoDO>() | |
| 14 | + .likeIfPresent(SysPhotoDO::getTitle, where.getTitle())); | |
| 15 | + } | |
| 16 | +} | |
| 0 | 17 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/plancommit/MaintainPlanCommitDetailMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.plancommit; | |
| 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.plancommit.MaintainPlanCommitDetailDO; | |
| 7 | +import org.apache.ibatis.annotations.Mapper; | |
| 8 | + | |
| 9 | +@Mapper | |
| 10 | +public interface MaintainPlanCommitDetailMapper extends BaseMapperX<MaintainPlanCommitDetailDO> { | |
| 11 | + default PageResult<MaintainPlanCommitDetailDO> selectPage(com.zteits.urbanops.framework.common.pojo.PageParam pageParam, MaintainPlanCommitDetailDO where) { | |
| 12 | + return selectPage(pageParam, null, new LambdaQueryWrapperX<MaintainPlanCommitDetailDO>() | |
| 13 | + .eqIfPresent(MaintainPlanCommitDetailDO::getPlanNo, where.getPlanNo()) | |
| 14 | + .eqIfPresent(MaintainPlanCommitDetailDO::getProblemNo, where.getProblemNo()) | |
| 15 | + .orderByDesc(MaintainPlanCommitDetailDO::getId)); | |
| 16 | + } | |
| 17 | + default MaintainPlanCommitDetailDO selectByProblemNo(String problemNo) { | |
| 18 | + return selectOne(new LambdaQueryWrapperX<MaintainPlanCommitDetailDO>().eq(MaintainPlanCommitDetailDO::getProblemNo, problemNo).orderByDesc(MaintainPlanCommitDetailDO::getId)); | |
| 19 | + } | |
| 20 | +} | |
| 0 | 21 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/problem/MaintainProblemManagerMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.problem; | |
| 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.problem.MaintainProblemManagerDO; | |
| 7 | +import org.apache.ibatis.annotations.Mapper; | |
| 8 | + | |
| 9 | +@Mapper | |
| 10 | +public interface MaintainProblemManagerMapper extends BaseMapperX<MaintainProblemManagerDO> { | |
| 11 | + default PageResult<MaintainProblemManagerDO> selectPage(com.zteits.urbanops.framework.common.pojo.PageParam pageParam, MaintainProblemManagerDO where) { | |
| 12 | + return selectPage(pageParam, null, new LambdaQueryWrapperX<MaintainProblemManagerDO>() | |
| 13 | + .likeIfPresent(MaintainProblemManagerDO::getTitle, where.getTitle()) | |
| 14 | + .likeIfPresent(MaintainProblemManagerDO::getContent, where.getContent()) | |
| 15 | + .eqIfPresent(MaintainProblemManagerDO::getDeptId, where.getDeptId()) | |
| 16 | + .orderByDesc(MaintainProblemManagerDO::getUpdateTime)); | |
| 17 | + } | |
| 18 | +} | |
| 0 | 19 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/problem/MaintainTaskManagerMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.problem; | |
| 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.problem.MaintainTaskManagerDO; | |
| 7 | +import org.apache.ibatis.annotations.Mapper; | |
| 8 | + | |
| 9 | +@Mapper | |
| 10 | +public interface MaintainTaskManagerMapper extends BaseMapperX<MaintainTaskManagerDO> { | |
| 11 | + default PageResult<MaintainTaskManagerDO> selectPage(com.zteits.urbanops.framework.common.pojo.PageParam pageParam, MaintainTaskManagerDO where) { | |
| 12 | + return selectPage(pageParam, null, new LambdaQueryWrapperX<MaintainTaskManagerDO>() | |
| 13 | + .likeIfPresent(MaintainTaskManagerDO::getTitle, where.getTitle()) | |
| 14 | + .likeIfPresent(MaintainTaskManagerDO::getContent, where.getContent()) | |
| 15 | + .eqIfPresent(MaintainTaskManagerDO::getDeptId, where.getDeptId()) | |
| 16 | + .orderByDesc(MaintainTaskManagerDO::getUpdateTime)); | |
| 17 | + } | |
| 18 | +} | |
| 0 | 19 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/project/ProjectManagerMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.project; | |
| 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.project.ProjectManagerDO; | |
| 7 | +import org.apache.ibatis.annotations.Mapper; | |
| 8 | + | |
| 9 | +import java.util.List; | |
| 10 | + | |
| 11 | +@Mapper | |
| 12 | +public interface ProjectManagerMapper extends BaseMapperX<ProjectManagerDO> { | |
| 13 | + default PageResult<ProjectManagerDO> selectPage(com.zteits.urbanops.framework.common.pojo.PageParam pageParam, ProjectManagerDO where) { | |
| 14 | + return selectPage(pageParam, null, new LambdaQueryWrapperX<ProjectManagerDO>() | |
| 15 | + .likeIfPresent(ProjectManagerDO::getProjectName, where.getProjectName()) | |
| 16 | + .eqIfPresent(ProjectManagerDO::getDeptId, where.getDeptId()) | |
| 17 | + .orderByDesc(ProjectManagerDO::getUpdateTime)); | |
| 18 | + } | |
| 19 | + | |
| 20 | + default List<ProjectManagerDO> selectList(ProjectManagerDO where) { | |
| 21 | + return selectList(new LambdaQueryWrapperX<ProjectManagerDO>() | |
| 22 | + .likeIfPresent(ProjectManagerDO::getProjectName, where.getProjectName()) | |
| 23 | + .eqIfPresent(ProjectManagerDO::getDeptId, where.getDeptId()) | |
| 24 | + .orderByAsc(ProjectManagerDO::getProjectName)); | |
| 25 | + } | |
| 26 | +} | |
| 0 | 27 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/project/SubProjectManagerMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.project; | |
| 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.project.SubProjectManagerDO; | |
| 7 | +import org.apache.ibatis.annotations.Mapper; | |
| 8 | + | |
| 9 | +@Mapper | |
| 10 | +public interface SubProjectManagerMapper extends BaseMapperX<SubProjectManagerDO> { | |
| 11 | + default PageResult<SubProjectManagerDO> selectPage(com.zteits.urbanops.framework.common.pojo.PageParam pageParam, SubProjectManagerDO where) { | |
| 12 | + return selectPage(pageParam, null, new LambdaQueryWrapperX<SubProjectManagerDO>() | |
| 13 | + .likeIfPresent(SubProjectManagerDO::getName, where.getName()) | |
| 14 | + .eqIfPresent(SubProjectManagerDO::getDeptId, where.getDeptId()) | |
| 15 | + .orderByDesc(SubProjectManagerDO::getUpdateTime)); | |
| 16 | + } | |
| 17 | +} | |
| 0 | 18 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/road/RoadManagerMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.road; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 4 | +import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | |
| 5 | +import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 6 | +import com.zteits.urbanops.module.garden.controller.admin.roadmanager.vo.RoadManagerPageReqVO; | |
| 7 | +import com.zteits.urbanops.module.garden.dal.dataobject.road.RoadManagerDO; | |
| 8 | +import org.apache.ibatis.annotations.Mapper; | |
| 9 | + | |
| 10 | +@Mapper | |
| 11 | +public interface RoadManagerMapper extends BaseMapperX<RoadManagerDO> { | |
| 12 | + | |
| 13 | + default PageResult<RoadManagerDO> selectPage(RoadManagerPageReqVO reqVO) { | |
| 14 | + return selectPage(reqVO, new LambdaQueryWrapperX<RoadManagerDO>() | |
| 15 | + .likeIfPresent(RoadManagerDO::getRoadName, reqVO.getRoadName()) | |
| 16 | + .eqIfPresent(RoadManagerDO::getStreetId, reqVO.getStreetId()) | |
| 17 | + .likeIfPresent(RoadManagerDO::getStreetName, reqVO.getStreetName()) | |
| 18 | + .eqIfPresent(RoadManagerDO::getCuringLevelId, reqVO.getCuringLevelId()) | |
| 19 | + .likeIfPresent(RoadManagerDO::getCuringLevelName, reqVO.getCuringLevelName()) | |
| 20 | + .eqIfPresent(RoadManagerDO::getCompanyId, reqVO.getCompanyId()) | |
| 21 | + .eqIfPresent(RoadManagerDO::getDeptId, reqVO.getDeptId()) | |
| 22 | + .eqIfPresent(RoadManagerDO::getStatus, reqVO.getStatus()) | |
| 23 | + .orderByDesc(RoadManagerDO::getId)); | |
| 24 | + } | |
| 25 | +} | |
| 0 | 26 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/standingbook/StandingBookMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.standingbook; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 4 | +import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | |
| 5 | +import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.standingbook.StandingBookDO; | |
| 7 | +import org.apache.ibatis.annotations.Mapper; | |
| 8 | + | |
| 9 | +@Mapper | |
| 10 | +public interface StandingBookMapper extends BaseMapperX<StandingBookDO> { | |
| 11 | + default PageResult<StandingBookDO> selectPage(com.zteits.urbanops.framework.common.pojo.PageParam pageParam, StandingBookDO where) { | |
| 12 | + return selectPage(pageParam, null, new LambdaQueryWrapperX<StandingBookDO>() | |
| 13 | + .eqIfPresent(StandingBookDO::getStandingBookYear, where.getStandingBookYear()) | |
| 14 | + .orderByDesc(StandingBookDO::getId)); | |
| 15 | + } | |
| 16 | +} | |
| 0 | 17 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/treerecord/GardenOldtreesMapper.java
0 → 100644
| 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 | +} | |
| 0 | 21 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/treerecord/GardenTreeMapper.java
0 → 100644
| 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 | +} | |
| 0 | 58 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/usergps/UserGpsMapper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.dal.mysql.usergps; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.module.garden.dal.dataobject.usergps.UserGpsDO; | |
| 4 | +import org.apache.ibatis.annotations.Insert; | |
| 5 | +import org.apache.ibatis.annotations.Mapper; | |
| 6 | +import org.apache.ibatis.annotations.Param; | |
| 7 | +import org.apache.ibatis.annotations.Select; | |
| 8 | + | |
| 9 | +import java.util.List; | |
| 10 | + | |
| 11 | +@Mapper | |
| 12 | +public interface UserGpsMapper { | |
| 13 | + @Select("SELECT id, commit_date as commitDate, user_id as userId, user_name as userName, type, lat, lon FROM ${tableName} WHERE user_id = #{userId} AND commit_date BETWEEN #{beginTime} AND #{endTime} AND status = '0' ORDER BY id DESC") | |
| 14 | + List<UserGpsDO> selectUserGpsList(@Param("tableName") String tableName, @Param("userId") Long userId, @Param("beginTime") String beginTime, @Param("endTime") String endTime); | |
| 15 | + | |
| 16 | + @Insert("INSERT INTO ${tableName} (commit_date, user_id, user_name, type, lat, lon, status) VALUES (#{item.commitDate}, #{item.userId}, #{item.userName}, #{item.type}, #{item.lat}, #{item.lon}, #{item.status})") | |
| 17 | + int insertUserGps(@Param("tableName") String tableName, @Param("item") UserGpsDO item); | |
| 18 | +} | |
| 0 | 19 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/device/CameraRecorderHelper.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.device; | |
| 2 | + | |
| 3 | +import com.alibaba.fastjson.JSONArray; | |
| 4 | +import com.alibaba.fastjson.JSONObject; | |
| 5 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 6 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 7 | +import com.zteits.urbanops.module.garden.controller.admin.device.vo.RecordFileListReq; | |
| 8 | +import com.zteits.urbanops.module.garden.dal.dataobject.device.DeviceCompanyDO; | |
| 9 | +import com.zteits.urbanops.module.garden.dal.mysql.device.DeviceCompanyMapper; | |
| 10 | +import com.zteits.urbanops.module.garden.util.http.OkHttpClientUtil; | |
| 11 | +import jakarta.annotation.Resource; | |
| 12 | +import org.springframework.stereotype.Component; | |
| 13 | + | |
| 14 | +import java.util.HashMap; | |
| 15 | +import java.util.List; | |
| 16 | +import java.util.Map; | |
| 17 | + | |
| 18 | +@Component | |
| 19 | +public class CameraRecorderHelper { | |
| 20 | + | |
| 21 | + private static final String GET_TOKEN_URL = "https://api.dxdd01.com/mining/login"; | |
| 22 | + private static final String DEVICE_PAGE = "https://api.dxdd01.com/mining/device/page"; | |
| 23 | + private static final String DEVICE_RECORD_FILE_LIST = "https://api.dxdd01.com/mining/device/recordFileList"; | |
| 24 | + private static final String GROUP_LIST = "https://api.dxdd01.com/mining/group/group_list"; | |
| 25 | + | |
| 26 | + @Resource | |
| 27 | + private DeviceCompanyMapper deviceCompanyMapper; | |
| 28 | + | |
| 29 | + public CommonResult<Object> devicePage(String deviceName, Integer enterId, Integer groupId, Integer page, Integer pageSize, Long companyId) { | |
| 30 | + Map<String, String> params = new HashMap<>(); | |
| 31 | + if (deviceName != null) params.put("device_name", deviceName); | |
| 32 | + if (enterId != null) params.put("enter_id", String.valueOf(enterId)); | |
| 33 | + if (groupId != null) params.put("group_id", String.valueOf(groupId)); | |
| 34 | + params.put("page", String.valueOf(page)); | |
| 35 | + params.put("pageSize", String.valueOf(pageSize)); | |
| 36 | + String response = OkHttpClientUtil.doGet(DEVICE_PAGE, params, getHeaderMap(companyId)); | |
| 37 | + if (response == null) return CommonResult.error(500, "设备分页查询失败"); | |
| 38 | + JSONObject json = JSONObject.parseObject(response); | |
| 39 | + Object data = json.get("data"); | |
| 40 | + return CommonResult.success(data); | |
| 41 | + } | |
| 42 | + | |
| 43 | + public CommonResult<Object> recordFileList(RecordFileListReq req, Long companyId) { | |
| 44 | + Map<String, String> params = new HashMap<>(); | |
| 45 | + params.put("st", req.st); | |
| 46 | + params.put("et", req.et); | |
| 47 | + if (req.keywords != null) params.put("keywords", req.keywords); | |
| 48 | + if (req.page != null) params.put("page", String.valueOf(req.page)); | |
| 49 | + if (req.pageSize != null) params.put("pageSize", String.valueOf(req.pageSize)); | |
| 50 | + if (req.groupId != null) params.put("groupId", String.valueOf(req.groupId)); | |
| 51 | + if (req.devId != null) params.put("devId", req.devId); | |
| 52 | + String response = OkHttpClientUtil.doGet(DEVICE_RECORD_FILE_LIST, params, getHeaderMap(companyId)); | |
| 53 | + if (response == null) return CommonResult.error(500, "设备执法记录信息查询失败"); | |
| 54 | + JSONObject json = JSONObject.parseObject(response); | |
| 55 | + Object data = json.get("data"); | |
| 56 | + return CommonResult.success(data); | |
| 57 | + } | |
| 58 | + | |
| 59 | + public CommonResult<Object> groupList(String groupName, Integer page, Integer pageSize, Long companyId) { | |
| 60 | + Map<String, String> params = new HashMap<>(); | |
| 61 | + if (groupName != null) params.put("group_name", groupName); | |
| 62 | + params.put("page", String.valueOf(page)); | |
| 63 | + params.put("pageSize", String.valueOf(pageSize)); | |
| 64 | + String response = OkHttpClientUtil.doGet(GROUP_LIST, params, getHeaderMap(companyId)); | |
| 65 | + if (response == null) return CommonResult.error(500, "获取组列表失败"); | |
| 66 | + JSONObject json = JSONObject.parseObject(response); | |
| 67 | + Object data = json.get("data"); | |
| 68 | + return CommonResult.success(data); | |
| 69 | + } | |
| 70 | + | |
| 71 | + private Map<String, String> getHeaderMap(Long companyId) { | |
| 72 | + if (companyId == null || companyId == 9999L) companyId = 0L; | |
| 73 | + DeviceCompanyDO company = deviceCompanyMapper.selectDeviceByCompanyId(companyId); | |
| 74 | + Map<String, String> headers = new HashMap<>(); | |
| 75 | + headers.put("token", getToken(company.getEnterLoginName(), company.getPassWord())); | |
| 76 | + return headers; | |
| 77 | + } | |
| 78 | + | |
| 79 | + public String getToken(String enterLoginName, String password) { | |
| 80 | + Map<String, Object> params = new HashMap<>(); | |
| 81 | + params.put("username", enterLoginName); | |
| 82 | + params.put("password", password); | |
| 83 | + params.put("udef_t", System.currentTimeMillis()); | |
| 84 | + params.put("udef_ver", "v1"); | |
| 85 | + String s = OkHttpClientUtil.doPostJson(GET_TOKEN_URL, params); | |
| 86 | + if (s == null) return null; | |
| 87 | + JSONObject json = JSONObject.parseObject(s); | |
| 88 | + Object content = json.get("content"); | |
| 89 | + if (content == null) return null; | |
| 90 | + JSONObject c = JSONObject.parseObject(String.valueOf(content)); | |
| 91 | + return c.getString("access_token"); | |
| 92 | + } | |
| 93 | +} | |
| 0 | 94 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/homepage/MaintainSummaryService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.homepage; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.module.garden.controller.admin.homepage.vo.CommitCountByCompanyReqVO; | |
| 4 | +import com.zteits.urbanops.module.garden.controller.admin.homepage.vo.HomePageSummaryReqVO; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.homepage.vo.MaintainProportionReqVO; | |
| 6 | + | |
| 7 | +import java.util.List; | |
| 8 | +import java.util.Map; | |
| 9 | + | |
| 10 | +public interface MaintainSummaryService { | |
| 11 | + Map<String, Object> selectMaintainSummary(HomePageSummaryReqVO req, Long companyId); | |
| 12 | + Map<String, List<Map<String, Object>>> getSummaryByMaintainType(HomePageSummaryReqVO req, Long companyId); | |
| 13 | + List<Map<String, Object>> getSummaryByMaintainProportion(HomePageSummaryReqVO req, Long companyId); | |
| 14 | + List<Map<String, Object>> getSummaryByPlantProportion(HomePageSummaryReqVO req, Long companyId); | |
| 15 | + Map<String, Object> selectSummaryByCompany(HomePageSummaryReqVO req, Long companyId); | |
| 16 | + List<Map<String, Object>> getCommitCountByCompany(CommitCountByCompanyReqVO req); | |
| 17 | + List<Map<String, Object>> getPressingTypeByCompany(CommitCountByCompanyReqVO req); | |
| 18 | + List<Map<String, Object>> getProcessOrderReturn(Long companyId, String beginTime, String endTime); | |
| 19 | + List<Map<String, Object>> getProportionByCompany(String beginTime, String endTime); | |
| 20 | + List<Map<String, Object>> getXcProcessOrder(Long companyId, String beginTime, String endTime); | |
| 21 | + Map<String, List<Object>> getCommitCountByTime(Long companyId, CommitCountByCompanyReqVO req); | |
| 22 | + List<Map<String, Object>> getOrderList(Long companyId, Integer taskStatus); | |
| 23 | + Map<String, Object> getSummaryByMaintainTypeAndGrowthRate(HomePageSummaryReqVO req, Long companyId); | |
| 24 | +} | |
| 0 | 25 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/homepage/MaintainSummaryServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.homepage; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.module.garden.controller.admin.homepage.vo.CommitCountByCompanyReqVO; | |
| 4 | +import com.zteits.urbanops.module.garden.controller.admin.homepage.vo.HomePageSummaryReqVO; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.homepage.vo.MaintainProportionReqVO; | |
| 6 | +import org.springframework.stereotype.Service; | |
| 7 | + | |
| 8 | +import java.util.*; | |
| 9 | + | |
| 10 | +@Service | |
| 11 | +public class MaintainSummaryServiceImpl implements MaintainSummaryService { | |
| 12 | + @Override | |
| 13 | + public Map<String, Object> selectMaintainSummary(HomePageSummaryReqVO req, Long companyId) { | |
| 14 | + return Collections.emptyMap(); | |
| 15 | + } | |
| 16 | + | |
| 17 | + @Override | |
| 18 | + public Map<String, List<Map<String, Object>>> getSummaryByMaintainType(HomePageSummaryReqVO req, Long companyId) { | |
| 19 | + return Collections.emptyMap(); | |
| 20 | + } | |
| 21 | + | |
| 22 | + @Override | |
| 23 | + public List<Map<String, Object>> getSummaryByMaintainProportion(HomePageSummaryReqVO req, Long companyId) { | |
| 24 | + return Collections.emptyList(); | |
| 25 | + } | |
| 26 | + | |
| 27 | + @Override | |
| 28 | + public List<Map<String, Object>> getSummaryByPlantProportion(HomePageSummaryReqVO req, Long companyId) { | |
| 29 | + return Collections.emptyList(); | |
| 30 | + } | |
| 31 | + | |
| 32 | + @Override | |
| 33 | + public Map<String, Object> selectSummaryByCompany(HomePageSummaryReqVO req, Long companyId) { | |
| 34 | + return Collections.emptyMap(); | |
| 35 | + } | |
| 36 | + | |
| 37 | + @Override | |
| 38 | + public List<Map<String, Object>> getCommitCountByCompany(CommitCountByCompanyReqVO req) { | |
| 39 | + return Collections.emptyList(); | |
| 40 | + } | |
| 41 | + | |
| 42 | + @Override | |
| 43 | + public List<Map<String, Object>> getPressingTypeByCompany(CommitCountByCompanyReqVO req) { | |
| 44 | + return Collections.emptyList(); | |
| 45 | + } | |
| 46 | + | |
| 47 | + @Override | |
| 48 | + public List<Map<String, Object>> getProcessOrderReturn(Long companyId, String beginTime, String endTime) { | |
| 49 | + return Collections.emptyList(); | |
| 50 | + } | |
| 51 | + | |
| 52 | + @Override | |
| 53 | + public List<Map<String, Object>> getProportionByCompany(String beginTime, String endTime) { | |
| 54 | + return Collections.emptyList(); | |
| 55 | + } | |
| 56 | + | |
| 57 | + @Override | |
| 58 | + public List<Map<String, Object>> getXcProcessOrder(Long companyId, String beginTime, String endTime) { | |
| 59 | + return Collections.emptyList(); | |
| 60 | + } | |
| 61 | + | |
| 62 | + @Override | |
| 63 | + public Map<String, List<Object>> getCommitCountByTime(Long companyId, CommitCountByCompanyReqVO req) { | |
| 64 | + return Collections.emptyMap(); | |
| 65 | + } | |
| 66 | + | |
| 67 | + @Override | |
| 68 | + public List<Map<String, Object>> getOrderList(Long companyId, Integer taskStatus) { | |
| 69 | + return Collections.emptyList(); | |
| 70 | + } | |
| 71 | + | |
| 72 | + @Override | |
| 73 | + public Map<String, Object> getSummaryByMaintainTypeAndGrowthRate(HomePageSummaryReqVO req, Long companyId) { | |
| 74 | + return Collections.emptyMap(); | |
| 75 | + } | |
| 76 | +} | |
| 0 | 77 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotline/HotlineCaseService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.hotline; | |
| 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.hotline.HotlineCaseDO; | |
| 6 | + | |
| 7 | +public interface HotlineCaseService { | |
| 8 | + PageResult<HotlineCaseDO> selectPage(PageParam pageParam, HotlineCaseDO where); | |
| 9 | + HotlineCaseDO selectById(String id); | |
| 10 | + Boolean insert(HotlineCaseDO entity); | |
| 11 | + Boolean update(HotlineCaseDO entity); | |
| 12 | + Boolean deleteByIds(java.util.List<String> ids); | |
| 13 | + com.zteits.urbanops.module.garden.controller.admin.hotline.vo.HotlineCaseDetailResp getDetail(String id); | |
| 14 | +} | |
| 0 | 15 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotline/HotlineCaseServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.hotline; | |
| 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.hotline.HotlineCaseDO; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.hotline.HotlineFileDO; | |
| 7 | +import com.zteits.urbanops.module.garden.dal.dataobject.photo.SysPhotoDO; | |
| 8 | +import com.zteits.urbanops.module.garden.dal.mysql.hotline.HotlineCaseMapper; | |
| 9 | +import com.zteits.urbanops.module.garden.dal.mysql.hotline.HotlineFileMapper; | |
| 10 | +import com.zteits.urbanops.module.garden.dal.mysql.photo.SysPhotoMapper; | |
| 11 | +import jakarta.annotation.Resource; | |
| 12 | +import org.springframework.stereotype.Service; | |
| 13 | + | |
| 14 | +import java.util.List; | |
| 15 | + | |
| 16 | +@Service | |
| 17 | +public class HotlineCaseServiceImpl implements HotlineCaseService { | |
| 18 | + | |
| 19 | + @Resource | |
| 20 | + private HotlineCaseMapper mapper; | |
| 21 | + @Resource(name = "hotlineFileMapper") | |
| 22 | + private HotlineFileMapper fileMapper; | |
| 23 | + @Resource | |
| 24 | + private SysPhotoMapper photoMapper; | |
| 25 | + | |
| 26 | + @Override | |
| 27 | + public PageResult<HotlineCaseDO> selectPage(PageParam pageParam, HotlineCaseDO where) { | |
| 28 | + return mapper.selectPage(pageParam, where); | |
| 29 | + } | |
| 30 | + | |
| 31 | + @Override | |
| 32 | + public HotlineCaseDO selectById(String id) { | |
| 33 | + return mapper.selectById(id); | |
| 34 | + } | |
| 35 | + | |
| 36 | + @Override | |
| 37 | + public Boolean insert(HotlineCaseDO entity) { | |
| 38 | + return mapper.insert(entity) > 0; | |
| 39 | + } | |
| 40 | + | |
| 41 | + @Override | |
| 42 | + public Boolean update(HotlineCaseDO entity) { | |
| 43 | + return mapper.updateById(entity) > 0; | |
| 44 | + } | |
| 45 | + | |
| 46 | + @Override | |
| 47 | + public Boolean deleteByIds(List<String> ids) { | |
| 48 | + return mapper.deleteBatchIds(ids) > 0; | |
| 49 | + } | |
| 50 | + | |
| 51 | + @Override | |
| 52 | + public com.zteits.urbanops.module.garden.controller.admin.hotline.vo.HotlineCaseDetailResp getDetail(String id) { | |
| 53 | + com.zteits.urbanops.module.garden.controller.admin.hotline.vo.HotlineCaseDetailResp resp = new com.zteits.urbanops.module.garden.controller.admin.hotline.vo.HotlineCaseDetailResp(); | |
| 54 | + resp.setCaseInfo(mapper.selectById(id)); | |
| 55 | + HotlineFileDO whereFile = new HotlineFileDO(); | |
| 56 | + whereFile.setCaseid(id); | |
| 57 | + java.util.List<HotlineFileDO> files = fileMapper.selectList(whereFile); | |
| 58 | + resp.setFiles(files); | |
| 59 | + SysPhotoDO wherePhoto = new SysPhotoDO(); | |
| 60 | + java.util.List<SysPhotoDO> photos = photoMapper.selectList(wherePhoto); | |
| 61 | + resp.setPhotos(photos); | |
| 62 | + return resp; | |
| 63 | + } | |
| 64 | +} | |
| 0 | 65 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotline/HotlineFileService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.hotline; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.module.garden.dal.dataobject.hotline.HotlineFileDO; | |
| 4 | +import org.springframework.web.multipart.MultipartFile; | |
| 5 | + | |
| 6 | +import java.util.List; | |
| 7 | + | |
| 8 | +public interface HotlineFileService { | |
| 9 | + Object parseFile(MultipartFile file) throws Exception; | |
| 10 | + List<HotlineFileDO> selectList(HotlineFileDO where); | |
| 11 | + HotlineFileDO selectById(String caseid); | |
| 12 | + Boolean insert(HotlineFileDO entity); | |
| 13 | + Boolean update(HotlineFileDO entity); | |
| 14 | + Boolean deleteByIds(List<String> ids); | |
| 15 | +} | |
| 0 | 16 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotline/HotlineFileServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.hotline; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.module.garden.dal.dataobject.hotline.HotlineFileDO; | |
| 4 | +import com.zteits.urbanops.module.garden.dal.mysql.hotline.HotlineFileMapper; | |
| 5 | +import jakarta.annotation.Resource; | |
| 6 | +import org.springframework.stereotype.Service; | |
| 7 | +import org.springframework.web.multipart.MultipartFile; | |
| 8 | + | |
| 9 | +import java.util.List; | |
| 10 | + | |
| 11 | +@Service | |
| 12 | +public class HotlineFileServiceImpl implements HotlineFileService { | |
| 13 | + | |
| 14 | + @Resource | |
| 15 | + private HotlineFileMapper mapper; | |
| 16 | + | |
| 17 | + @Override | |
| 18 | + public Object parseFile(MultipartFile file) throws Exception { | |
| 19 | + return java.util.Collections.emptyMap(); | |
| 20 | + } | |
| 21 | + | |
| 22 | + @Override | |
| 23 | + public List<HotlineFileDO> selectList(HotlineFileDO where) { | |
| 24 | + return mapper.selectList(where); | |
| 25 | + } | |
| 26 | + | |
| 27 | + @Override | |
| 28 | + public HotlineFileDO selectById(String caseid) { | |
| 29 | + return mapper.selectById(caseid); | |
| 30 | + } | |
| 31 | + | |
| 32 | + @Override | |
| 33 | + public Boolean insert(HotlineFileDO entity) { | |
| 34 | + return mapper.insert(entity) > 0; | |
| 35 | + } | |
| 36 | + | |
| 37 | + @Override | |
| 38 | + public Boolean update(HotlineFileDO entity) { | |
| 39 | + return mapper.updateById(entity) > 0; | |
| 40 | + } | |
| 41 | + | |
| 42 | + @Override | |
| 43 | + public Boolean deleteByIds(List<String> ids) { | |
| 44 | + return mapper.deleteBatchIds(ids) > 0; | |
| 45 | + } | |
| 46 | +} | |
| 0 | 47 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/maintainplan/MaintainPlanService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.maintainplan; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 4 | +import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.MaintainPlanAddReqVO; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.MaintainPlanForPageReqVO; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.maintainplan.MaintainPlanDO; | |
| 7 | + | |
| 8 | +public interface MaintainPlanService { | |
| 9 | + PageResult<MaintainPlanDO> selectPage(MaintainPlanForPageReqVO reqVO); | |
| 10 | + MaintainPlanDO selectByPlanNo(String planNo); | |
| 11 | + Boolean insert(MaintainPlanAddReqVO reqVO, Long companyId, Long deptId); | |
| 12 | + Boolean deleteById(Long id); | |
| 13 | +} | |
| 0 | 14 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/maintainplan/MaintainPlanServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.maintainplan; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 4 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.MaintainPlanAddReqVO; | |
| 6 | +import com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.MaintainPlanForPageReqVO; | |
| 7 | +import com.zteits.urbanops.module.garden.dal.dataobject.maintainplan.MaintainPlanDO; | |
| 8 | +import com.zteits.urbanops.module.garden.dal.mysql.maintainplan.MaintainPlanMapper; | |
| 9 | +import jakarta.annotation.Resource; | |
| 10 | +import org.springframework.stereotype.Service; | |
| 11 | + | |
| 12 | +@Service | |
| 13 | +public class MaintainPlanServiceImpl implements MaintainPlanService { | |
| 14 | + | |
| 15 | + @Resource | |
| 16 | + private MaintainPlanMapper maintainPlanMapper; | |
| 17 | + | |
| 18 | + @Override | |
| 19 | + public PageResult<MaintainPlanDO> selectPage(MaintainPlanForPageReqVO reqVO) { | |
| 20 | + MaintainPlanDO where = new MaintainPlanDO(); | |
| 21 | + where.setType(reqVO.getType()); | |
| 22 | + where.setPlanName(reqVO.getPlanName()); | |
| 23 | + PageParam page = new PageParam(); | |
| 24 | + page.setPageNo(reqVO.getPageNo()); | |
| 25 | + page.setPageSize(reqVO.getPageSize()); | |
| 26 | + return maintainPlanMapper.selectPage(page, where); | |
| 27 | + } | |
| 28 | + | |
| 29 | + @Override | |
| 30 | + public MaintainPlanDO selectByPlanNo(String planNo) { | |
| 31 | + return maintainPlanMapper.selectOne(new com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX<MaintainPlanDO>() | |
| 32 | + .eq(MaintainPlanDO::getPlanNo, planNo)); | |
| 33 | + } | |
| 34 | + | |
| 35 | + @Override | |
| 36 | + public Boolean insert(MaintainPlanAddReqVO reqVO, Long companyId, Long deptId) { | |
| 37 | + MaintainPlanDO entity = new MaintainPlanDO(); | |
| 38 | + entity.setPlanNo(reqVO.getPlanNo()); | |
| 39 | + entity.setPlanName(reqVO.getPlanName()); | |
| 40 | + entity.setType(reqVO.getType()); | |
| 41 | + entity.setCompanyId(companyId); | |
| 42 | + entity.setDeptId(deptId); | |
| 43 | + entity.setStatus("0"); | |
| 44 | + return maintainPlanMapper.insert(entity) > 0; | |
| 45 | + } | |
| 46 | + | |
| 47 | + @Override | |
| 48 | + public Boolean deleteById(Long id) { | |
| 49 | + return maintainPlanMapper.deleteById(id) > 0; | |
| 50 | + } | |
| 51 | +} | |
| 0 | 52 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/maintainrate/MaintainRateService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.maintainrate; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 4 | +import com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo.MaintainRatePageReqVO; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo.MaintainRateReqVO; | |
| 6 | +import com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo.MaintainRateRespVO; | |
| 7 | +import com.zteits.urbanops.module.garden.dal.dataobject.maintainrate.MaintainRateDO; | |
| 8 | + | |
| 9 | +public interface MaintainRateService { | |
| 10 | + | |
| 11 | + PageResult<MaintainRateDO> selectPage(MaintainRatePageReqVO reqVO); | |
| 12 | + | |
| 13 | + MaintainRateDO selectById(Long id); | |
| 14 | + | |
| 15 | + Boolean insert(MaintainRateDO entity); | |
| 16 | + | |
| 17 | + Boolean update(MaintainRateDO entity); | |
| 18 | + | |
| 19 | + Boolean deleteById(Long id); | |
| 20 | + | |
| 21 | + MaintainRateRespVO getMaintainRateValue(MaintainRateReqVO reqVO); | |
| 22 | + | |
| 23 | + MaintainRateRespVO selectMaintainRateByLevel(Integer maintainTypeId, Integer level); | |
| 24 | +} | |
| 0 | 25 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/maintainrate/MaintainRateServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.maintainrate; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
| 4 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
| 5 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 6 | +import com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo.MaintainRatePageReqVO; | |
| 7 | +import com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo.MaintainRateReqVO; | |
| 8 | +import com.zteits.urbanops.module.garden.controller.admin.maintainrate.vo.MaintainRateRespVO; | |
| 9 | +import com.zteits.urbanops.module.garden.dal.dataobject.maintainrate.MaintainRateDO; | |
| 10 | +import com.zteits.urbanops.module.garden.dal.mysql.maintainrate.MaintainRateMapper; | |
| 11 | +import jakarta.annotation.Resource; | |
| 12 | +import org.springframework.stereotype.Service; | |
| 13 | +import org.springframework.validation.annotation.Validated; | |
| 14 | + | |
| 15 | +@Service | |
| 16 | +@Validated | |
| 17 | +public class MaintainRateServiceImpl implements MaintainRateService { | |
| 18 | + | |
| 19 | + @Resource | |
| 20 | + private MaintainRateMapper maintainRateMapper; | |
| 21 | + | |
| 22 | + @Override | |
| 23 | + public PageResult<MaintainRateDO> selectPage(MaintainRatePageReqVO reqVO) { | |
| 24 | + return maintainRateMapper.selectPage(reqVO); | |
| 25 | + } | |
| 26 | + | |
| 27 | + @Override | |
| 28 | + public MaintainRateDO selectById(Long id) { | |
| 29 | + return maintainRateMapper.selectById(id); | |
| 30 | + } | |
| 31 | + | |
| 32 | + @Override | |
| 33 | + public Boolean insert(MaintainRateDO entity) { | |
| 34 | + return maintainRateMapper.insert(entity) > 0; | |
| 35 | + } | |
| 36 | + | |
| 37 | + @Override | |
| 38 | + public Boolean update(MaintainRateDO entity) { | |
| 39 | + return maintainRateMapper.updateById(entity) > 0; | |
| 40 | + } | |
| 41 | + | |
| 42 | + @Override | |
| 43 | + public Boolean deleteById(Long id) { | |
| 44 | + return maintainRateMapper.deleteById(id) > 0; | |
| 45 | + } | |
| 46 | + | |
| 47 | + @Override | |
| 48 | + public MaintainRateRespVO getMaintainRateValue(MaintainRateReqVO reqVO) { | |
| 49 | + LambdaQueryWrapper<MaintainRateDO> qw = Wrappers.lambdaQuery(); | |
| 50 | + qw.eq(MaintainRateDO::getMaintainSubjectId, reqVO.getMaintainSubjectId()); | |
| 51 | + qw.eq(MaintainRateDO::getMaintainTypeId, reqVO.getMaintainTypeId()); | |
| 52 | + qw.orderByDesc(MaintainRateDO::getId); | |
| 53 | + MaintainRateDO rate = maintainRateMapper.selectOne(qw); | |
| 54 | + if (rate == null) { | |
| 55 | + return null; | |
| 56 | + } | |
| 57 | + MaintainRateRespVO resp = new MaintainRateRespVO(); | |
| 58 | + resp.setMaintainTypeId(rate.getMaintainTypeId()); | |
| 59 | + resp.setMaintainTypeName(rate.getMaintainTypeName()); | |
| 60 | + resp.setCycleId(rate.getCycleId()); | |
| 61 | + resp.setCycleName(rate.getCycleName()); | |
| 62 | + resp.setLevelTop(rate.getLevelTop()); | |
| 63 | + resp.setLevelOne(rate.getLevelOne()); | |
| 64 | + resp.setLevelTwo(rate.getLevelTwo()); | |
| 65 | + resp.setLevelThree(rate.getLevelThree()); | |
| 66 | + return resp; | |
| 67 | + } | |
| 68 | + | |
| 69 | + @Override | |
| 70 | + public MaintainRateRespVO selectMaintainRateByLevel(Integer maintainTypeId, Integer level) { | |
| 71 | + LambdaQueryWrapper<MaintainRateDO> qw = Wrappers.lambdaQuery(); | |
| 72 | + qw.eq(MaintainRateDO::getMaintainTypeId, maintainTypeId); | |
| 73 | + qw.orderByDesc(MaintainRateDO::getId); | |
| 74 | + MaintainRateDO rate = maintainRateMapper.selectOne(qw); | |
| 75 | + if (rate == null) { | |
| 76 | + return null; | |
| 77 | + } | |
| 78 | + MaintainRateRespVO resp = new MaintainRateRespVO(); | |
| 79 | + resp.setMaintainTypeId(rate.getMaintainTypeId()); | |
| 80 | + resp.setMaintainTypeName(rate.getMaintainTypeName()); | |
| 81 | + resp.setCycleId(rate.getCycleId()); | |
| 82 | + resp.setCycleName(rate.getCycleName()); | |
| 83 | + String value; | |
| 84 | + if (level != null && level == 10) { | |
| 85 | + value = rate.getLevelTop(); | |
| 86 | + } else if (level != null && level == 11) { | |
| 87 | + value = rate.getLevelOne(); | |
| 88 | + } else if (level != null && level == 12) { | |
| 89 | + value = rate.getLevelTwo(); | |
| 90 | + } else { | |
| 91 | + value = rate.getLevelThree(); | |
| 92 | + } | |
| 93 | + resp.setValue(value); | |
| 94 | + return resp; | |
| 95 | + } | |
| 96 | +} | |
| 0 | 97 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/material/MaterialInventoryService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.material; | |
| 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.material.MaterialInventoryDO; | |
| 6 | + | |
| 7 | +public interface MaterialInventoryService { | |
| 8 | + PageResult<MaterialInventoryDO> selectPage(PageParam pageParam, MaterialInventoryDO where); | |
| 9 | + Boolean updateInventoryAlarmNum(Long materialId, Long alermNum); | |
| 10 | +} | |
| 0 | 11 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/material/MaterialInventoryServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.material; | |
| 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.material.MaterialInventoryDO; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.mysql.material.MaterialInventoryMapper; | |
| 7 | +import jakarta.annotation.Resource; | |
| 8 | +import org.springframework.stereotype.Service; | |
| 9 | + | |
| 10 | +@Service | |
| 11 | +public class MaterialInventoryServiceImpl implements MaterialInventoryService { | |
| 12 | + | |
| 13 | + @Resource | |
| 14 | + private MaterialInventoryMapper mapper; | |
| 15 | + | |
| 16 | + @Override | |
| 17 | + public PageResult<MaterialInventoryDO> selectPage(PageParam pageParam, MaterialInventoryDO where) { | |
| 18 | + return mapper.selectPage(pageParam, null, new com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX<MaterialInventoryDO>() | |
| 19 | + .eqIfPresent(MaterialInventoryDO::getMaterialId, where.getMaterialId()) | |
| 20 | + .likeIfPresent(MaterialInventoryDO::getMaterialName, where.getMaterialName()) | |
| 21 | + .eqIfPresent(MaterialInventoryDO::getTypeDetailId, where.getTypeDetailId()) | |
| 22 | + .eqIfPresent(MaterialInventoryDO::getBelongCompanyId, where.getBelongCompanyId()) | |
| 23 | + .orderByDesc(MaterialInventoryDO::getUpdateTime)); | |
| 24 | + } | |
| 25 | + | |
| 26 | + @Override | |
| 27 | + public Boolean updateInventoryAlarmNum(Long materialId, Long alermNum) { | |
| 28 | + return mapper.updateInventoryAlarmNum(materialId, alermNum) > 0; | |
| 29 | + } | |
| 30 | +} | |
| 0 | 31 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/material/MaterialService.java
0 → 100644
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/material/MaterialServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.material; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.module.garden.dal.dataobject.material.MaterialDO; | |
| 4 | +import com.zteits.urbanops.module.garden.dal.mysql.material.MaterialMapper; | |
| 5 | +import jakarta.annotation.Resource; | |
| 6 | +import org.springframework.stereotype.Service; | |
| 7 | + | |
| 8 | +@Service | |
| 9 | +public class MaterialServiceImpl implements MaterialService { | |
| 10 | + @Resource | |
| 11 | + private MaterialMapper materialMapper; | |
| 12 | + | |
| 13 | + @Override | |
| 14 | + public MaterialDO selectById(Long id) { | |
| 15 | + return materialMapper.selectById(id); | |
| 16 | + } | |
| 17 | +} | |
| 0 | 18 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/material/MaterialTypeService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.material; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
| 4 | +import com.zteits.urbanops.module.garden.controller.business.vo.MaterialTypeManagerRespVO; | |
| 5 | +import com.zteits.urbanops.module.garden.dal.dataobject.material.MaterialTypeDO; | |
| 6 | + | |
| 7 | +import java.util.List; | |
| 8 | + | |
| 9 | +public interface MaterialTypeService { | |
| 10 | + | |
| 11 | + MaterialTypeDO get(Long id); | |
| 12 | + | |
| 13 | + List<MaterialTypeDO> selectList(MaterialTypeDO req); | |
| 14 | + | |
| 15 | + Page<MaterialTypeDO> selectPage(Page<MaterialTypeDO> page, MaterialTypeDO req); | |
| 16 | + | |
| 17 | + boolean insert(MaterialTypeDO entity); | |
| 18 | + | |
| 19 | + boolean update(MaterialTypeDO entity); | |
| 20 | + | |
| 21 | + boolean deleteById(Long id); | |
| 22 | + | |
| 23 | + List<MaterialTypeManagerRespVO> queryMaterialBigType(Long materialTypeId); | |
| 24 | + | |
| 25 | + List<MaterialTypeManagerRespVO> queryMaterialMidType(Long materialTypeId); | |
| 26 | + | |
| 27 | + List<MaterialTypeManagerRespVO> queryMaterialDetailType(Long parentTypeId); | |
| 28 | + | |
| 29 | + Long selectMaxTypeDetailId(Long materialTypeId, Long typeId); | |
| 30 | +} | |
| 0 | 31 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/material/MaterialTypeServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.material; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |
| 4 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.business.vo.MaterialTypeManagerRespVO; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.material.MaterialTypeDO; | |
| 7 | +import com.zteits.urbanops.module.garden.dal.mysql.material.MaterialTypeMapper; | |
| 8 | +import jakarta.annotation.Resource; | |
| 9 | +import org.springframework.stereotype.Service; | |
| 10 | + | |
| 11 | +import java.util.List; | |
| 12 | + | |
| 13 | +@Service | |
| 14 | +public class MaterialTypeServiceImpl implements MaterialTypeService { | |
| 15 | + | |
| 16 | + @Resource | |
| 17 | + private MaterialTypeMapper mapper; | |
| 18 | + | |
| 19 | + @Override | |
| 20 | + public MaterialTypeDO get(Long id) { | |
| 21 | + return mapper.selectById(id); | |
| 22 | + } | |
| 23 | + | |
| 24 | + @Override | |
| 25 | + public List<MaterialTypeDO> selectList(MaterialTypeDO req) { | |
| 26 | + com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX<MaterialTypeDO> wrapper = | |
| 27 | + new com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX<MaterialTypeDO>() | |
| 28 | + .likeIfPresent(MaterialTypeDO::getTypeName, req.getTypeName()) | |
| 29 | + .eqIfPresent(MaterialTypeDO::getParentId, req.getParentId()) | |
| 30 | + .eqIfPresent(MaterialTypeDO::getLevel, req.getLevel()) | |
| 31 | + .orderByDesc(MaterialTypeDO::getId); | |
| 32 | + return mapper.selectList(wrapper); | |
| 33 | + } | |
| 34 | + | |
| 35 | + @Override | |
| 36 | + public Page<MaterialTypeDO> selectPage(Page<MaterialTypeDO> page, MaterialTypeDO req) { | |
| 37 | + com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX<MaterialTypeDO> wrapper = | |
| 38 | + new com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX<MaterialTypeDO>() | |
| 39 | + .likeIfPresent(MaterialTypeDO::getTypeName, req.getTypeName()) | |
| 40 | + .eqIfPresent(MaterialTypeDO::getParentId, req.getParentId()) | |
| 41 | + .eqIfPresent(MaterialTypeDO::getLevel, req.getLevel()) | |
| 42 | + .orderByDesc(MaterialTypeDO::getId); | |
| 43 | + return mapper.selectPage(page, wrapper); | |
| 44 | + } | |
| 45 | + | |
| 46 | + @Override | |
| 47 | + public boolean insert(MaterialTypeDO entity) { | |
| 48 | + entity.clean(); | |
| 49 | + return mapper.insert(entity) > 0; | |
| 50 | + } | |
| 51 | + | |
| 52 | + @Override | |
| 53 | + public boolean update(MaterialTypeDO entity) { | |
| 54 | + entity.clean(); | |
| 55 | + return mapper.updateById(entity) > 0; | |
| 56 | + } | |
| 57 | + | |
| 58 | + @Override | |
| 59 | + public boolean deleteById(Long id) { | |
| 60 | + return mapper.deleteById(id) > 0; | |
| 61 | + } | |
| 62 | + | |
| 63 | + @Override | |
| 64 | + public List<MaterialTypeManagerRespVO> queryMaterialBigType(Long materialTypeId) { | |
| 65 | + com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX<MaterialTypeDO> wrapper = | |
| 66 | + new com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX<MaterialTypeDO>() | |
| 67 | + .eqIfPresent(MaterialTypeDO::getLevel, 1) | |
| 68 | + .orderByDesc(MaterialTypeDO::getId); | |
| 69 | + List<MaterialTypeDO> list = mapper.selectList(wrapper); | |
| 70 | + return list.stream().filter(it -> materialTypeId == null || !it.getId().equals(materialTypeId)) | |
| 71 | + .map(it -> { | |
| 72 | + MaterialTypeManagerRespVO vo = new MaterialTypeManagerRespVO(); | |
| 73 | + vo.setValue(it.getId()); | |
| 74 | + vo.setLabel(it.getTypeName()); | |
| 75 | + return vo; | |
| 76 | + }).toList(); | |
| 77 | + } | |
| 78 | + | |
| 79 | + @Override | |
| 80 | + public List<MaterialTypeManagerRespVO> queryMaterialMidType(Long materialTypeId) { | |
| 81 | + com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX<MaterialTypeDO> wrapper = | |
| 82 | + new com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX<MaterialTypeDO>() | |
| 83 | + .eqIfPresent(MaterialTypeDO::getLevel, 2) | |
| 84 | + .eqIfPresent(MaterialTypeDO::getParentId, materialTypeId) | |
| 85 | + .orderByDesc(MaterialTypeDO::getId); | |
| 86 | + List<MaterialTypeDO> list = mapper.selectList(wrapper); | |
| 87 | + return list.stream().map(it -> { | |
| 88 | + MaterialTypeManagerRespVO vo = new MaterialTypeManagerRespVO(); | |
| 89 | + vo.setValue(it.getId()); | |
| 90 | + vo.setLabel(it.getTypeName()); | |
| 91 | + vo.setMaterialParentTypeId(it.getParentId()); | |
| 92 | + return vo; | |
| 93 | + }).toList(); | |
| 94 | + } | |
| 95 | + | |
| 96 | + @Override | |
| 97 | + public List<MaterialTypeManagerRespVO> queryMaterialDetailType(Long parentTypeId) { | |
| 98 | + com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX<MaterialTypeDO> wrapper = | |
| 99 | + new com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX<MaterialTypeDO>() | |
| 100 | + .eqIfPresent(MaterialTypeDO::getLevel, 3) | |
| 101 | + .eqIfPresent(MaterialTypeDO::getParentId, parentTypeId) | |
| 102 | + .orderByDesc(MaterialTypeDO::getId); | |
| 103 | + List<MaterialTypeDO> list = mapper.selectList(wrapper); | |
| 104 | + return list.stream().map(it -> { | |
| 105 | + MaterialTypeManagerRespVO vo = new MaterialTypeManagerRespVO(); | |
| 106 | + vo.setValue(it.getId()); | |
| 107 | + vo.setLabel(it.getTypeName()); | |
| 108 | + vo.setParentTypeId(it.getParentId()); | |
| 109 | + return vo; | |
| 110 | + }).toList(); | |
| 111 | + } | |
| 112 | + | |
| 113 | + @Override | |
| 114 | + public Long selectMaxTypeDetailId(Long materialTypeId, Long typeId) { | |
| 115 | + QueryWrapper<MaterialTypeDO> qw = new QueryWrapper<>(); | |
| 116 | + qw.select("max(id) AS maxId") | |
| 117 | + .eq("level", 3) | |
| 118 | + .eq("parent_id", typeId); | |
| 119 | + List<java.util.Map<String, Object>> maps = mapper.selectMaps(qw); | |
| 120 | + if (maps.isEmpty() || maps.get(0).get("maxId") == null) { | |
| 121 | + return 0L; | |
| 122 | + } | |
| 123 | + return ((Number) maps.get(0).get("maxId")).longValue(); | |
| 124 | + } | |
| 125 | +} | |
| 0 | 126 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/photo/SysPhotoService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.photo; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.module.garden.dal.dataobject.photo.SysPhotoDO; | |
| 4 | + | |
| 5 | +import java.util.List; | |
| 6 | + | |
| 7 | +public interface SysPhotoService { | |
| 8 | + List<SysPhotoDO> selectList(SysPhotoDO where); | |
| 9 | + SysPhotoDO selectById(String id); | |
| 10 | + Boolean insert(SysPhotoDO entity); | |
| 11 | + Boolean update(SysPhotoDO entity); | |
| 12 | + Boolean deleteByIds(List<String> ids); | |
| 13 | +} | |
| 0 | 14 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/photo/SysPhotoServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.photo; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.module.garden.dal.dataobject.photo.SysPhotoDO; | |
| 4 | +import com.zteits.urbanops.module.garden.dal.mysql.photo.SysPhotoMapper; | |
| 5 | +import jakarta.annotation.Resource; | |
| 6 | +import org.springframework.stereotype.Service; | |
| 7 | + | |
| 8 | +import java.util.List; | |
| 9 | + | |
| 10 | +@Service | |
| 11 | +public class SysPhotoServiceImpl implements SysPhotoService { | |
| 12 | + | |
| 13 | + @Resource | |
| 14 | + private SysPhotoMapper mapper; | |
| 15 | + | |
| 16 | + @Override | |
| 17 | + public List<SysPhotoDO> selectList(SysPhotoDO where) { | |
| 18 | + return mapper.selectList(where); | |
| 19 | + } | |
| 20 | + | |
| 21 | + @Override | |
| 22 | + public SysPhotoDO selectById(String id) { | |
| 23 | + return mapper.selectById(id); | |
| 24 | + } | |
| 25 | + | |
| 26 | + @Override | |
| 27 | + public Boolean insert(SysPhotoDO entity) { | |
| 28 | + return mapper.insert(entity) > 0; | |
| 29 | + } | |
| 30 | + | |
| 31 | + @Override | |
| 32 | + public Boolean update(SysPhotoDO entity) { | |
| 33 | + return mapper.updateById(entity) > 0; | |
| 34 | + } | |
| 35 | + | |
| 36 | + @Override | |
| 37 | + public Boolean deleteByIds(List<String> ids) { | |
| 38 | + return mapper.deleteBatchIds(ids) > 0; | |
| 39 | + } | |
| 40 | +} | |
| 0 | 41 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/plancommit/MaintainPlanCommitDetailService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.plancommit; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 4 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.app.vo.PlanCommitDetailPageReqVO; | |
| 6 | +import com.zteits.urbanops.module.garden.controller.app.vo.PlanTaskCommitDetailPageRespVO; | |
| 7 | + | |
| 8 | +public interface MaintainPlanCommitDetailService { | |
| 9 | + PageResult<PlanTaskCommitDetailPageRespVO> pageListXC(PageParam page, PlanCommitDetailPageReqVO reqVO); | |
| 10 | + PageResult<PlanTaskCommitDetailPageRespVO> pageListYH(PageParam page, com.zteits.urbanops.module.garden.controller.app.vo.PlanYhCommitDetailPageReqVO reqVO); | |
| 11 | + PlanTaskCommitDetailPageRespVO getById(Long id); | |
| 12 | + PlanTaskCommitDetailPageRespVO getByProblemNo(String problemNo, Boolean isAddUrl); | |
| 13 | + Boolean insertYH(Long userId, String userName, com.zteits.urbanops.module.garden.controller.app.vo.PlanCommitDetailYhAddReqVO reqVO); | |
| 14 | + Integer selectByPlanNoAndCommitDate(String planNo, java.time.LocalDate commitDate); | |
| 15 | + Boolean insertXC(Long userId, String userName, com.zteits.urbanops.module.garden.controller.app.vo.PlanCommitDetailAddReqVO reqVO); | |
| 16 | +} | |
| 0 | 17 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/plancommit/MaintainPlanCommitDetailServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.plancommit; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 4 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 5 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 6 | +import com.zteits.urbanops.module.garden.controller.app.vo.PlanCommitDetailPageReqVO; | |
| 7 | +import com.zteits.urbanops.module.garden.controller.app.vo.PlanTaskCommitDetailPageRespVO; | |
| 8 | +import com.zteits.urbanops.module.garden.dal.dataobject.plancommit.MaintainPlanCommitDetailDO; | |
| 9 | +import com.zteits.urbanops.module.garden.dal.mysql.plancommit.MaintainPlanCommitDetailMapper; | |
| 10 | +import jakarta.annotation.Resource; | |
| 11 | +import org.springframework.stereotype.Service; | |
| 12 | + | |
| 13 | +@Service | |
| 14 | +public class MaintainPlanCommitDetailServiceImpl implements MaintainPlanCommitDetailService { | |
| 15 | + | |
| 16 | + @Resource | |
| 17 | + private MaintainPlanCommitDetailMapper mapper; | |
| 18 | + | |
| 19 | + @Override | |
| 20 | + public PageResult<PlanTaskCommitDetailPageRespVO> pageListXC(PageParam page, PlanCommitDetailPageReqVO reqVO) { | |
| 21 | + MaintainPlanCommitDetailDO where = new MaintainPlanCommitDetailDO(); | |
| 22 | + where.setPlanNo(reqVO.getPlanNo()); | |
| 23 | + PageResult<MaintainPlanCommitDetailDO> result = mapper.selectPage(page, where); | |
| 24 | + return BeanUtils.toBean(result, PlanTaskCommitDetailPageRespVO.class); | |
| 25 | + } | |
| 26 | + | |
| 27 | + @Override | |
| 28 | + public PageResult<PlanTaskCommitDetailPageRespVO> pageListYH(PageParam page, com.zteits.urbanops.module.garden.controller.app.vo.PlanYhCommitDetailPageReqVO reqVO) { | |
| 29 | + MaintainPlanCommitDetailDO where = new MaintainPlanCommitDetailDO(); | |
| 30 | + PageResult<MaintainPlanCommitDetailDO> result = mapper.selectPage(page, where); | |
| 31 | + return BeanUtils.toBean(result, PlanTaskCommitDetailPageRespVO.class); | |
| 32 | + } | |
| 33 | + | |
| 34 | + @Override | |
| 35 | + public PlanTaskCommitDetailPageRespVO getById(Long id) { | |
| 36 | + MaintainPlanCommitDetailDO e = mapper.selectById(id); | |
| 37 | + return BeanUtils.toBean(e, PlanTaskCommitDetailPageRespVO.class); | |
| 38 | + } | |
| 39 | + | |
| 40 | + @Override | |
| 41 | + public PlanTaskCommitDetailPageRespVO getByProblemNo(String problemNo, Boolean isAddUrl) { | |
| 42 | + MaintainPlanCommitDetailDO e = mapper.selectByProblemNo(problemNo); | |
| 43 | + return BeanUtils.toBean(e, PlanTaskCommitDetailPageRespVO.class); | |
| 44 | + } | |
| 45 | + | |
| 46 | + @Override | |
| 47 | + public Boolean insertYH(Long userId, String userName, com.zteits.urbanops.module.garden.controller.app.vo.PlanCommitDetailYhAddReqVO reqVO) { | |
| 48 | + MaintainPlanCommitDetailDO item = new MaintainPlanCommitDetailDO(); | |
| 49 | + item.setPlanNo(reqVO.getPlanNo()); | |
| 50 | + item.setProblemNo(reqVO.getProblemNo()); | |
| 51 | + item.setContent(reqVO.getContent()); | |
| 52 | + item.setCreator(String.valueOf(userId)); | |
| 53 | + item.setUpdater(String.valueOf(userId)); | |
| 54 | + return mapper.insert(item) > 0; | |
| 55 | + } | |
| 56 | + | |
| 57 | + @Override | |
| 58 | + public Integer selectByPlanNoAndCommitDate(String planNo, java.time.LocalDate commitDate) { | |
| 59 | + MaintainPlanCommitDetailDO where = new MaintainPlanCommitDetailDO(); | |
| 60 | + where.setPlanNo(planNo); | |
| 61 | + PageResult<MaintainPlanCommitDetailDO> result = mapper.selectPage(new PageParam(), where); | |
| 62 | + return result.getTotal() == null ? 0 : result.getTotal().intValue(); | |
| 63 | + } | |
| 64 | + | |
| 65 | + @Override | |
| 66 | + public Boolean insertXC(Long userId, String userName, com.zteits.urbanops.module.garden.controller.app.vo.PlanCommitDetailAddReqVO reqVO) { | |
| 67 | + MaintainPlanCommitDetailDO item = new MaintainPlanCommitDetailDO(); | |
| 68 | + item.setPlanNo(reqVO.getPlanNo()); | |
| 69 | + item.setContent(reqVO.getContent()); | |
| 70 | + item.setCreator(String.valueOf(userId)); | |
| 71 | + item.setUpdater(String.valueOf(userId)); | |
| 72 | + return mapper.insert(item) > 0; | |
| 73 | + } | |
| 74 | +} | |
| 0 | 75 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/problem/MaintainProblemManagerService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.problem; | |
| 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.problem.MaintainProblemManagerDO; | |
| 6 | + | |
| 7 | +public interface MaintainProblemManagerService { | |
| 8 | + PageResult<MaintainProblemManagerDO> selectPage(PageParam pageParam, MaintainProblemManagerDO where); | |
| 9 | + MaintainProblemManagerDO selectById(Long id); | |
| 10 | +} | |
| 0 | 11 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/problem/MaintainProblemManagerServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.problem; | |
| 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.problem.MaintainProblemManagerDO; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.mysql.problem.MaintainProblemManagerMapper; | |
| 7 | +import jakarta.annotation.Resource; | |
| 8 | +import org.springframework.stereotype.Service; | |
| 9 | + | |
| 10 | +@Service | |
| 11 | +public class MaintainProblemManagerServiceImpl implements MaintainProblemManagerService { | |
| 12 | + | |
| 13 | + @Resource | |
| 14 | + private MaintainProblemManagerMapper mapper; | |
| 15 | + | |
| 16 | + @Override | |
| 17 | + public PageResult<MaintainProblemManagerDO> selectPage(PageParam pageParam, MaintainProblemManagerDO where) { | |
| 18 | + PageResult<MaintainProblemManagerDO> result = mapper.selectPage(pageParam, where); | |
| 19 | + for (MaintainProblemManagerDO tl : result.getList()) { | |
| 20 | + if (tl.getDistributeStatus() != null) { | |
| 21 | + if (tl.getDistributeStatus() == 1) tl.setStatus("待处理"); | |
| 22 | + else if (tl.getDistributeStatus() == 2) tl.setStatus("处理中"); | |
| 23 | + else if (tl.getDistributeStatus() == 3) tl.setStatus("指派驳回"); | |
| 24 | + else tl.setStatus("未知状态"); | |
| 25 | + } | |
| 26 | + if (tl.getLeaderConfrimStatus() != null && tl.getLeaderConfrimStatus() == 2) tl.setStatus("已完成确认"); | |
| 27 | + if (tl.getUserConfrimStatus() != null && tl.getUserConfrimStatus() == 2) tl.setStatus("处理完成"); | |
| 28 | + } | |
| 29 | + return result; | |
| 30 | + } | |
| 31 | + | |
| 32 | + @Override | |
| 33 | + public MaintainProblemManagerDO selectById(Long id) { | |
| 34 | + return mapper.selectById(id); | |
| 35 | + } | |
| 36 | +} | |
| 0 | 37 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/road/RoadManagerService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.road; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 4 | +import com.zteits.urbanops.module.garden.controller.admin.roadmanager.vo.RoadManagerPageReqVO; | |
| 5 | +import com.zteits.urbanops.module.garden.dal.dataobject.road.RoadManagerDO; | |
| 6 | + | |
| 7 | +import java.util.List; | |
| 8 | + | |
| 9 | +public interface RoadManagerService { | |
| 10 | + PageResult<RoadManagerDO> selectPage(RoadManagerPageReqVO reqVO); | |
| 11 | + RoadManagerDO selectById(Long id); | |
| 12 | + Boolean insert(RoadManagerDO entity); | |
| 13 | + Boolean update(RoadManagerDO entity); | |
| 14 | + Boolean deleteById(Long id); | |
| 15 | + List<RoadManagerDO> selectList(RoadManagerDO where); | |
| 16 | +} | |
| 0 | 17 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/road/RoadManagerServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.road; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 4 | +import com.zteits.urbanops.module.garden.controller.admin.roadmanager.vo.RoadManagerPageReqVO; | |
| 5 | +import com.zteits.urbanops.module.garden.dal.dataobject.road.RoadManagerDO; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.mysql.road.RoadManagerMapper; | |
| 7 | +import jakarta.annotation.Resource; | |
| 8 | +import org.springframework.stereotype.Service; | |
| 9 | + | |
| 10 | +import java.util.List; | |
| 11 | + | |
| 12 | +@Service | |
| 13 | +public class RoadManagerServiceImpl implements RoadManagerService { | |
| 14 | + | |
| 15 | + @Resource | |
| 16 | + private RoadManagerMapper roadManagerMapper; | |
| 17 | + | |
| 18 | + @Override | |
| 19 | + public PageResult<RoadManagerDO> selectPage(RoadManagerPageReqVO reqVO) { | |
| 20 | + return roadManagerMapper.selectPage(reqVO); | |
| 21 | + } | |
| 22 | + | |
| 23 | + @Override | |
| 24 | + public RoadManagerDO selectById(Long id) { | |
| 25 | + return roadManagerMapper.selectById(id); | |
| 26 | + } | |
| 27 | + | |
| 28 | + @Override | |
| 29 | + public Boolean insert(RoadManagerDO entity) { | |
| 30 | + return roadManagerMapper.insert(entity) > 0; | |
| 31 | + } | |
| 32 | + | |
| 33 | + @Override | |
| 34 | + public Boolean update(RoadManagerDO entity) { | |
| 35 | + return roadManagerMapper.updateById(entity) > 0; | |
| 36 | + } | |
| 37 | + | |
| 38 | + @Override | |
| 39 | + public Boolean deleteById(Long id) { | |
| 40 | + return roadManagerMapper.deleteById(id) > 0; | |
| 41 | + } | |
| 42 | + | |
| 43 | + @Override | |
| 44 | + public List<RoadManagerDO> selectList(RoadManagerDO where) { | |
| 45 | + return roadManagerMapper.selectList(new com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX<RoadManagerDO>() | |
| 46 | + .eqIfPresent(RoadManagerDO::getCompanyId, where.getCompanyId()) | |
| 47 | + .eqIfPresent(RoadManagerDO::getDeptId, where.getDeptId()) | |
| 48 | + .likeIfPresent(RoadManagerDO::getRoadName, where.getRoadName()) | |
| 49 | + .orderByAsc(RoadManagerDO::getRoadName)); | |
| 50 | + } | |
| 51 | +} | |
| 0 | 52 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/standingbook/StandingBookService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.standingbook; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 4 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.standingbook.vo.StandingBookPageReqVO; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.standingbook.StandingBookDO; | |
| 7 | + | |
| 8 | +public interface StandingBookService { | |
| 9 | + PageResult<StandingBookDO> selectPage(PageParam pageParam, StandingBookPageReqVO reqVO); | |
| 10 | +} | |
| 0 | 11 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/standingbook/StandingBookServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.standingbook; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 4 | +import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.standingbook.vo.StandingBookPageReqVO; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.dataobject.standingbook.StandingBookDO; | |
| 7 | +import com.zteits.urbanops.module.garden.dal.mysql.standingbook.StandingBookMapper; | |
| 8 | +import jakarta.annotation.Resource; | |
| 9 | +import org.springframework.stereotype.Service; | |
| 10 | + | |
| 11 | +@Service | |
| 12 | +public class StandingBookServiceImpl implements StandingBookService { | |
| 13 | + | |
| 14 | + @Resource | |
| 15 | + private StandingBookMapper mapper; | |
| 16 | + | |
| 17 | + @Override | |
| 18 | + public PageResult<StandingBookDO> selectPage(PageParam pageParam, StandingBookPageReqVO reqVO) { | |
| 19 | + StandingBookDO where = new StandingBookDO(); | |
| 20 | + where.setStandingBookYear(reqVO.getStandingBookYear()); | |
| 21 | + return mapper.selectPage(pageParam, where); | |
| 22 | + } | |
| 23 | +} | |
| 0 | 24 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/treerecord/GardenOldtreesService.java
0 → 100644
| 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 | +} | |
| 0 | 17 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/treerecord/GardenOldtreesServiceImpl.java
0 → 100644
| 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 | +} | |
| 0 | 54 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/treerecord/GardenTreeService.java
0 → 100644
| 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 | +} | |
| 0 | 20 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/treerecord/GardenTreeServiceImpl.java
0 → 100644
| 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 | +} | |
| 0 | 95 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/usergps/UserGpsService.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.usergps; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.module.garden.controller.app.vo.UserGpsAddReqVO; | |
| 4 | +import com.zteits.urbanops.module.garden.controller.app.vo.UserGpsRespVO; | |
| 5 | + | |
| 6 | +import java.util.List; | |
| 7 | + | |
| 8 | +public interface UserGpsService { | |
| 9 | + List<UserGpsRespVO> selectUserGpsList(Long userId, String commitTime); | |
| 10 | + Boolean insertUserGps(Long userId, String userName, UserGpsAddReqVO reqVO); | |
| 11 | + List<UserGpsRespVO> selectUserGpsList(Long userId, String beginTime, String endTime); | |
| 12 | +} | |
| 0 | 13 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/usergps/UserGpsServiceImpl.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.service.usergps; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.module.garden.controller.app.vo.UserGpsAddReqVO; | |
| 4 | +import com.zteits.urbanops.module.garden.controller.app.vo.UserGpsRespVO; | |
| 5 | +import com.zteits.urbanops.module.garden.dal.dataobject.usergps.UserGpsDO; | |
| 6 | +import com.zteits.urbanops.module.garden.dal.mysql.usergps.UserGpsMapper; | |
| 7 | +import jakarta.annotation.Resource; | |
| 8 | +import org.springframework.stereotype.Service; | |
| 9 | + | |
| 10 | +import java.time.LocalDateTime; | |
| 11 | +import java.time.format.DateTimeFormatter; | |
| 12 | +import java.util.ArrayList; | |
| 13 | +import java.util.List; | |
| 14 | + | |
| 15 | +@Service | |
| 16 | +public class UserGpsServiceImpl implements UserGpsService { | |
| 17 | + | |
| 18 | + @Resource | |
| 19 | + private UserGpsMapper userGpsMapper; | |
| 20 | + | |
| 21 | + private static final String TABLE_PREFIX = "garden_user_gps_"; | |
| 22 | + private static final int TABLE_COUNT = 32; | |
| 23 | + | |
| 24 | + @Override | |
| 25 | + public List<UserGpsRespVO> selectUserGpsList(Long userId, String commitTime) { | |
| 26 | + String beginTime = commitTime + " 00:00:00"; | |
| 27 | + String endTime = commitTime + " 23:59:59"; | |
| 28 | + String tableName = getTableName(userId); | |
| 29 | + List<UserGpsDO> list = userGpsMapper.selectUserGpsList(tableName, userId, beginTime, endTime); | |
| 30 | + List<UserGpsRespVO> resp = new ArrayList<>(); | |
| 31 | + for (UserGpsDO e : list) { | |
| 32 | + UserGpsRespVO r = new UserGpsRespVO(); | |
| 33 | + r.setId(e.getId()); | |
| 34 | + r.setCommitDate(e.getCommitDate()); | |
| 35 | + r.setType(e.getType()); | |
| 36 | + r.setUserId(e.getUserId()); | |
| 37 | + r.setUserName(e.getUserName()); | |
| 38 | + r.setLat(e.getLat()); | |
| 39 | + r.setLon(e.getLon()); | |
| 40 | + resp.add(r); | |
| 41 | + } | |
| 42 | + return resp; | |
| 43 | + } | |
| 44 | + | |
| 45 | + @Override | |
| 46 | + public Boolean insertUserGps(Long userId, String userName, UserGpsAddReqVO reqVO) { | |
| 47 | + String tableName = getTableName(userId); | |
| 48 | + UserGpsDO item = new UserGpsDO(); | |
| 49 | + item.setCommitDate(LocalDateTime.now()); | |
| 50 | + item.setUserId(userId); | |
| 51 | + item.setUserName(userName); | |
| 52 | + item.setLat(reqVO.getLat()); | |
| 53 | + item.setLon(reqVO.getLon()); | |
| 54 | + item.setType(reqVO.getType() == null ? 1 : reqVO.getType()); | |
| 55 | + item.setStatus("0"); | |
| 56 | + return userGpsMapper.insertUserGps(tableName, item) > 0; | |
| 57 | + } | |
| 58 | + | |
| 59 | + @Override | |
| 60 | + public List<UserGpsRespVO> selectUserGpsList(Long userId, String beginTime, String endTime) { | |
| 61 | + String tableName = getTableName(userId); | |
| 62 | + List<UserGpsDO> list = userGpsMapper.selectUserGpsList(tableName, userId, beginTime, endTime); | |
| 63 | + List<UserGpsRespVO> resp = new ArrayList<>(); | |
| 64 | + for (UserGpsDO e : list) { | |
| 65 | + UserGpsRespVO r = new UserGpsRespVO(); | |
| 66 | + r.setId(e.getId()); | |
| 67 | + r.setCommitDate(e.getCommitDate()); | |
| 68 | + r.setType(e.getType()); | |
| 69 | + r.setUserId(e.getUserId()); | |
| 70 | + r.setUserName(e.getUserName()); | |
| 71 | + r.setLat(e.getLat()); | |
| 72 | + r.setLon(e.getLon()); | |
| 73 | + resp.add(r); | |
| 74 | + } | |
| 75 | + return resp; | |
| 76 | + } | |
| 77 | + | |
| 78 | + private String getTableName(Long userId) { | |
| 79 | + long suffix = userId % TABLE_COUNT; | |
| 80 | + return TABLE_PREFIX + suffix; | |
| 81 | + } | |
| 82 | +} | |
| 0 | 83 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/util/http/OkHttpClientUtil.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.util.http; | |
| 2 | + | |
| 3 | +import okhttp3.*; | |
| 4 | +import java.util.Map; | |
| 5 | + | |
| 6 | +public class OkHttpClientUtil { | |
| 7 | + private static final OkHttpClient client = new OkHttpClient.Builder().build(); | |
| 8 | + | |
| 9 | + public static String doGet(String url, Map<String, String> params) { | |
| 10 | + return doGet(url, params, null); | |
| 11 | + } | |
| 12 | + | |
| 13 | + public static String doGet(String url, Map<String, String> params, Map<String, String> headers) { | |
| 14 | + HttpUrl.Builder httpBuilder = HttpUrl.parse(url).newBuilder(); | |
| 15 | + if (params != null) { | |
| 16 | + for (Map.Entry<String, String> e : params.entrySet()) { | |
| 17 | + httpBuilder.addQueryParameter(e.getKey(), e.getValue()); | |
| 18 | + } | |
| 19 | + } | |
| 20 | + Request.Builder reqBuilder = new Request.Builder().url(httpBuilder.build()); | |
| 21 | + if (headers != null) { | |
| 22 | + for (Map.Entry<String, String> e : headers.entrySet()) { | |
| 23 | + reqBuilder.addHeader(e.getKey(), e.getValue()); | |
| 24 | + } | |
| 25 | + } | |
| 26 | + try (Response response = client.newCall(reqBuilder.get().build()).execute()) { | |
| 27 | + if (response.body() == null) return null; | |
| 28 | + return response.body().string(); | |
| 29 | + } catch (Exception e) { | |
| 30 | + return null; | |
| 31 | + } | |
| 32 | + } | |
| 33 | + | |
| 34 | + public static String doPostJson(String url, Map<String, ?> body) { | |
| 35 | + return doPostJson(url, body, null); | |
| 36 | + } | |
| 37 | + | |
| 38 | + public static String doPostJson(String url, Map<String, ?> body, Map<String, String> headers) { | |
| 39 | + MediaType jsonType = MediaType.parse("application/json; charset=utf-8"); | |
| 40 | + String json = com.alibaba.fastjson.JSONObject.toJSONString(body); | |
| 41 | + RequestBody requestBody = RequestBody.create(jsonType, json); | |
| 42 | + Request.Builder reqBuilder = new Request.Builder().url(url).post(requestBody); | |
| 43 | + if (headers != null) { | |
| 44 | + for (Map.Entry<String, String> e : headers.entrySet()) { | |
| 45 | + reqBuilder.addHeader(e.getKey(), e.getValue()); | |
| 46 | + } | |
| 47 | + } | |
| 48 | + try (Response response = client.newCall(reqBuilder.build()).execute()) { | |
| 49 | + if (response.body() == null) return null; | |
| 50 | + return response.body().string(); | |
| 51 | + } catch (Exception e) { | |
| 52 | + return null; | |
| 53 | + } | |
| 54 | + } | |
| 55 | +} | |
| 0 | 56 | \ No newline at end of file | ... | ... |
urbanops-module-system/src/main/java/com/zteits/urbanops/module/system/controller/admin/user/UserController.java
| ... | ... | @@ -112,6 +112,20 @@ public class UserController { |
| 112 | 112 | pageResult.getTotal())); |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | + @PostMapping("/listForPage") | |
| 116 | + @Operation(summary = "获得用户分页列表(兼容旧路径)") | |
| 117 | + @PreAuthorize("@ss.hasPermission('system:user:query')") | |
| 118 | + public CommonResult<PageResult<UserRespVO>> listForPage(@Valid @RequestBody UserPageReqVO pageReqVO) { | |
| 119 | + PageResult<AdminUserDO> pageResult = userService.getUserPage(pageReqVO); | |
| 120 | + if (CollUtil.isEmpty(pageResult.getList())) { | |
| 121 | + return success(new PageResult<>(pageResult.getTotal())); | |
| 122 | + } | |
| 123 | + Map<Long, DeptDO> deptMap = deptService.getDeptMap( | |
| 124 | + convertList(pageResult.getList(), AdminUserDO::getDeptId)); | |
| 125 | + return success(new PageResult<>(UserConvert.INSTANCE.convertList(pageResult.getList(), deptMap), | |
| 126 | + pageResult.getTotal())); | |
| 127 | + } | |
| 128 | + | |
| 115 | 129 | @GetMapping({"/list-all-simple", "/simple-list"}) |
| 116 | 130 | @Operation(summary = "获取用户精简信息列表", description = "只包含被开启的用户,主要用于前端的下拉选项") |
| 117 | 131 | public CommonResult<List<UserSimpleRespVO>> getSimpleUserList() { | ... | ... |
urbanops-module-system/src/main/java/com/zteits/urbanops/module/system/controller/bridge/dict/DictDataBridgeController.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.system.controller.bridge.dict; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.enums.CommonStatusEnum; | |
| 4 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | |
| 5 | +import com.zteits.urbanops.framework.common.util.object.BeanUtils; | |
| 6 | +import com.zteits.urbanops.module.system.controller.app.dict.vo.AppDictDataRespVO; | |
| 7 | +import com.zteits.urbanops.module.system.dal.dataobject.dict.DictDataDO; | |
| 8 | +import com.zteits.urbanops.module.system.service.dict.DictDataService; | |
| 9 | +import io.swagger.v3.oas.annotations.Operation; | |
| 10 | +import io.swagger.v3.oas.annotations.Parameter; | |
| 11 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 12 | +import jakarta.annotation.Resource; | |
| 13 | +import jakarta.annotation.security.PermitAll; | |
| 14 | +import org.springframework.validation.annotation.Validated; | |
| 15 | +import org.springframework.web.bind.annotation.GetMapping; | |
| 16 | +import org.springframework.web.bind.annotation.PathVariable; | |
| 17 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 18 | +import org.springframework.web.bind.annotation.RestController; | |
| 19 | + | |
| 20 | +import java.util.List; | |
| 21 | + | |
| 22 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | |
| 23 | + | |
| 24 | +@Tag(name = "桥接 - 旧路径字典数据查询") | |
| 25 | +@RestController | |
| 26 | +@RequestMapping("/system/dict/data") | |
| 27 | +@Validated | |
| 28 | +public class DictDataBridgeController { | |
| 29 | + | |
| 30 | + @Resource | |
| 31 | + private DictDataService dictDataService; | |
| 32 | + | |
| 33 | + @GetMapping("/type/{dictType}") | |
| 34 | + @Operation(summary = "根据字典类型查询字典数据信息(兼容旧路径)") | |
| 35 | + @Parameter(name = "dictType", description = "字典类型", required = true) | |
| 36 | + @PermitAll | |
| 37 | + public CommonResult<List<AppDictDataRespVO>> getDictDataListByType(@PathVariable("dictType") String dictType) { | |
| 38 | + List<DictDataDO> list = dictDataService.getDictDataList(CommonStatusEnum.ENABLE.getStatus(), dictType); | |
| 39 | + return success(BeanUtils.toBean(list, AppDictDataRespVO.class)); | |
| 40 | + } | |
| 41 | +} | |
| 0 | 42 | \ No newline at end of file | ... | ... |