Commit cfeb92d3f7c318ca89d9ce03049df163ea21e281
1 parent
48e696b0
新增两个api工程+优化养护计划+更改workorder工程
Showing
39 changed files
with
336 additions
and
172 deletions
pom.xml
| ... | ... | @@ -21,6 +21,7 @@ |
| 21 | 21 | <!-- <module>urbanops-module-member</module>--> |
| 22 | 22 | <module>urbanops-module-bpm</module> |
| 23 | 23 | <module>urbanops-module-report</module> |
| 24 | + <module>urbanops-module-api</module> | |
| 24 | 25 | <!-- <module>urbanops-module-mp</module>--> |
| 25 | 26 | <!-- <module>urbanops-module-pay</module>--> |
| 26 | 27 | <!-- <module>urbanops-module-mall</module>--> | ... | ... |
urbanops-module-api/pom.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" | |
| 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 4 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| 5 | + <modelVersion>4.0.0</modelVersion> | |
| 6 | + <parent> | |
| 7 | + <artifactId>urbanops</artifactId> | |
| 8 | + <groupId>com.zteits.boot</groupId> | |
| 9 | + <version>${revision}</version> | |
| 10 | + </parent> | |
| 11 | + <packaging>pom</packaging> | |
| 12 | + <modules> | |
| 13 | + <module>urbanops-module-workorder-api</module> | |
| 14 | + </modules> | |
| 15 | + | |
| 16 | + <artifactId>urbanops-module-api</artifactId> | |
| 17 | + <description> | |
| 18 | + 该包是技术组件,每个子包,代表一个组件。每个组件包括两部分: | |
| 19 | + 1. core 包:是该组件的核心封装 | |
| 20 | + 2. config 包:是该组件基于 Spring 的配置 | |
| 21 | + | |
| 22 | + 技术组件,也分成两类: | |
| 23 | + 1. 框架组件:和我们熟悉的 MyBatis、Redis 等等的拓展 | |
| 24 | + 2. 业务组件:和业务相关的组件的封装,例如说数据字典、操作日志等等。 | |
| 25 | + 如果是业务组件,Maven 名字会包含 biz | |
| 26 | + </description> | |
| 27 | + <url>https://github.com/YunaiV/ruoyi-vue-pro</url> | |
| 28 | + | |
| 29 | +</project> | ... | ... |
urbanops-module-api/urbanops-module-garden-api/pom.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" | |
| 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 4 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| 5 | + | |
| 6 | + <parent> | |
| 7 | + <artifactId>urbanops-module-api</artifactId> | |
| 8 | + <groupId>com.zteits.boot</groupId> | |
| 9 | + <version>${revision}</version> | |
| 10 | + </parent> | |
| 11 | + <modelVersion>4.0.0</modelVersion> | |
| 12 | + <artifactId>urbanops-module-garden-api</artifactId> | |
| 13 | + <packaging>jar</packaging> | |
| 14 | + | |
| 15 | + <name>${project.artifactId}</name> | |
| 16 | + <description> | |
| 17 | + bpm 包下,业务流程管理(Business Process Management),我们放工作流的功能。 | |
| 18 | + 例如说:流程定义、表单配置、审核中心(我的申请、我的待办、我的已办)等等 | |
| 19 | + bpm 解释:https://baike.baidu.com/item/BPM/1933 | |
| 20 | + | |
| 21 | + 工作流基于 Flowable 6 实现,分成流程定义、流程表单、流程实例、流程任务等功能模块。 | |
| 22 | + </description> | |
| 23 | + <dependencies> | |
| 24 | + <!-- Web 相关 --> | |
| 25 | + <dependency> | |
| 26 | + <groupId>com.zteits.boot</groupId> | |
| 27 | + <artifactId>urbanops-spring-boot-starter-web</artifactId> | |
| 28 | + </dependency> | |
| 29 | + <!-- Test 测试相关 --> | |
| 30 | + <dependency> | |
| 31 | + <groupId>com.zteits.boot</groupId> | |
| 32 | + <artifactId>urbanops-spring-boot-starter-test</artifactId> | |
| 33 | + </dependency> | |
| 34 | + </dependencies> | |
| 35 | +</project> | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/api/material/MaterialApi.java renamed to urbanops-module-api/urbanops-module-garden-api/src/main/java/com/zteits/urbanops/module/garden/api/material/MaterialApi.java
urbanops-module-api/urbanops-module-garden-api/src/main/java/com/zteits/urbanops/module/garden/api/road/RoadApi.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.api.road; | |
| 2 | + | |
| 3 | + | |
| 4 | +import com.zteits.urbanops.module.garden.dto.road.RoadReqDTO; | |
| 5 | +import com.zteits.urbanops.module.garden.dto.road.RoadRespDTO; | |
| 6 | +import com.zteits.urbanops.module.garden.dto.road.RoadStreetRespDTO; | |
| 7 | + | |
| 8 | +import java.util.List; | |
| 9 | + | |
| 10 | +public interface RoadApi { | |
| 11 | + List<RoadRespDTO> getRoadInfoBy(RoadReqDTO reqDTO); | |
| 12 | + | |
| 13 | + RoadStreetRespDTO getRoadInfoById(Long id); | |
| 14 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/api/material/dto/MaterialInventoryOutDto.java renamed to urbanops-module-api/urbanops-module-garden-api/src/main/java/com/zteits/urbanops/module/garden/dto/material/MaterialInventoryOutDto.java
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/api/road/dto/RoadReqDTO.java renamed to urbanops-module-api/urbanops-module-garden-api/src/main/java/com/zteits/urbanops/module/garden/dto/road/RoadReqDTO.java
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/api/road/dto/RoadRespDTO.java renamed to urbanops-module-api/urbanops-module-garden-api/src/main/java/com/zteits/urbanops/module/garden/dto/road/RoadRespDTO.java
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/api/road/dto/RoadStreetRespDTO.java renamed to urbanops-module-api/urbanops-module-garden-api/src/main/java/com/zteits/urbanops/module/garden/dto/road/RoadStreetRespDTO.java
urbanops-module-api/urbanops-module-workorder-api/pom.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" | |
| 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 4 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| 5 | + | |
| 6 | + <parent> | |
| 7 | + <artifactId>urbanops-module-api</artifactId> | |
| 8 | + <groupId>com.zteits.boot</groupId> | |
| 9 | + <version>${revision}</version> | |
| 10 | + </parent> | |
| 11 | + <modelVersion>4.0.0</modelVersion> | |
| 12 | + <artifactId>urbanops-module-workorder-api</artifactId> | |
| 13 | + <packaging>jar</packaging> | |
| 14 | + | |
| 15 | + <name>${project.artifactId}</name> | |
| 16 | + <description> | |
| 17 | + bpm 包下,业务流程管理(Business Process Management),我们放工作流的功能。 | |
| 18 | + 例如说:流程定义、表单配置、审核中心(我的申请、我的待办、我的已办)等等 | |
| 19 | + bpm 解释:https://baike.baidu.com/item/BPM/1933 | |
| 20 | + | |
| 21 | + 工作流基于 Flowable 6 实现,分成流程定义、流程表单、流程实例、流程任务等功能模块。 | |
| 22 | + </description> | |
| 23 | + <dependencies> | |
| 24 | + <!-- Web 相关 --> | |
| 25 | + <dependency> | |
| 26 | + <groupId>com.zteits.boot</groupId> | |
| 27 | + <artifactId>urbanops-spring-boot-starter-web</artifactId> | |
| 28 | + </dependency> | |
| 29 | + <!-- Test 测试相关 --> | |
| 30 | + <dependency> | |
| 31 | + <groupId>com.zteits.boot</groupId> | |
| 32 | + <artifactId>urbanops-spring-boot-starter-test</artifactId> | |
| 33 | + </dependency> | |
| 34 | + <dependency> | |
| 35 | + <groupId>com.zteits.boot</groupId> | |
| 36 | + <artifactId>urbanops-spring-boot-starter-excel</artifactId> | |
| 37 | + </dependency> | |
| 38 | + </dependencies> | |
| 39 | +</project> | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/api/workorder/WorkOrderApi.java renamed to urbanops-module-api/urbanops-module-workorder-api/src/main/java/com/zteits/urbanops/module/workorder/api/WorkOrderApi.java
| 1 | -package com.zteits.urbanops.module.workorder.api.workorder; | |
| 1 | +package com.zteits.urbanops.module.workorder.api; | |
| 2 | 2 | |
| 3 | -import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 4 | -import com.zteits.urbanops.module.system.api.user.dto.AdminUserRespDTO; | |
| 5 | -import com.zteits.urbanops.module.workorder.controller.app.garden.vo.AppGardenWorkOrderReqVO; | |
| 6 | -import com.zteits.urbanops.module.workorder.controller.app.garden.vo.AppGardenWorkOrderRespVO; | |
| 3 | +import com.zteits.urbanops.module.workorder.dto.AdminUserRespVO; | |
| 4 | +import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderReqVO; | |
| 5 | +import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderRespVO; | |
| 7 | 6 | |
| 8 | 7 | import java.util.List; |
| 9 | 8 | |
| ... | ... | @@ -25,7 +24,7 @@ public interface WorkOrderApi { |
| 25 | 24 | * @param notHas false 不包含loginUserId |
| 26 | 25 | * @return |
| 27 | 26 | */ |
| 28 | - public List<AdminUserRespDTO> getUserByLoginIdAndRoleCode(Long loginUserId, String roleCode, String busiLine, boolean notHas); | |
| 27 | + public List<AdminUserRespVO> getUserByLoginIdAndRoleCode(Long loginUserId, String roleCode, String busiLine, boolean notHas); | |
| 29 | 28 | |
| 30 | 29 | /** |
| 31 | 30 | * 通过道路 roadId 获取 当前人所在部门的 且对应的用户角色为roleCode的人员,按业务线busiLine 筛选 |
| ... | ... | @@ -34,7 +33,7 @@ public interface WorkOrderApi { |
| 34 | 33 | * @param busiLine |
| 35 | 34 | * @return |
| 36 | 35 | */ |
| 37 | - public List<AdminUserRespDTO> getUserByRoadIdAndRoleCode(Long roadId,String roleCode,String busiLine); | |
| 36 | + public List<AdminUserRespVO> getUserByRoadIdAndRoleCode(Long roadId, String roleCode, String busiLine); | |
| 38 | 37 | |
| 39 | 38 | /** |
| 40 | 39 | * 创建工单API | ... | ... |
urbanops-module-api/urbanops-module-workorder-api/src/main/java/com/zteits/urbanops/module/workorder/dto/AdminUserRespVO.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.workorder.dto; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.framework.common.enums.CommonStatusEnum; | |
| 4 | +import lombok.Data; | |
| 5 | + | |
| 6 | +import java.util.Set; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * Admin 用户 Response DTO | |
| 10 | + * | |
| 11 | + * @author ZIEITS | |
| 12 | + */ | |
| 13 | +@Data | |
| 14 | +public class AdminUserRespVO { | |
| 15 | + | |
| 16 | + /** | |
| 17 | + * 用户ID | |
| 18 | + */ | |
| 19 | + private Long id; | |
| 20 | + /** | |
| 21 | + * 用户昵称 | |
| 22 | + */ | |
| 23 | + private String nickname; | |
| 24 | + /** | |
| 25 | + * 帐号状态 | |
| 26 | + * | |
| 27 | + * 枚举 {@link CommonStatusEnum} | |
| 28 | + */ | |
| 29 | + private Integer status; | |
| 30 | + | |
| 31 | + /** | |
| 32 | + * 部门ID | |
| 33 | + */ | |
| 34 | + private Long deptId; | |
| 35 | + /** | |
| 36 | + * 岗位编号数组 | |
| 37 | + */ | |
| 38 | + private Set<Long> postIds; | |
| 39 | + /** | |
| 40 | + * 手机号码 | |
| 41 | + */ | |
| 42 | + private String mobile; | |
| 43 | + /** | |
| 44 | + * 用户头像 | |
| 45 | + */ | |
| 46 | + private String avatar; | |
| 47 | + | |
| 48 | +} | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/vo/AppGardenWorkOrderReqVO.java renamed to urbanops-module-api/urbanops-module-workorder-api/src/main/java/com/zteits/urbanops/module/workorder/dto/AppGardenWorkOrderReqVO.java
| 1 | -package com.zteits.urbanops.module.workorder.controller.app.garden.vo; | |
| 1 | +package com.zteits.urbanops.module.workorder.dto; | |
| 2 | 2 | |
| 3 | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | 4 | import jakarta.validation.constraints.NotEmpty; |
| ... | ... | @@ -9,7 +9,6 @@ import org.hibernate.validator.constraints.Length; |
| 9 | 9 | import java.math.BigDecimal; |
| 10 | 10 | import java.time.LocalDateTime; |
| 11 | 11 | import java.util.List; |
| 12 | -import java.util.Map; | |
| 13 | 12 | |
| 14 | 13 | /** |
| 15 | 14 | * @author yanhuiqing |
| ... | ... | @@ -93,3 +92,4 @@ public class AppGardenWorkOrderReqVO { |
| 93 | 92 | |
| 94 | 93 | |
| 95 | 94 | } |
| 95 | + | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/vo/AppGardenWorkOrderRespVO.java renamed to urbanops-module-api/urbanops-module-workorder-api/src/main/java/com/zteits/urbanops/module/workorder/dto/AppGardenWorkOrderRespVO.java
| 1 | -package com.zteits.urbanops.module.workorder.controller.app.garden.vo; | |
| 1 | +package com.zteits.urbanops.module.workorder.dto; | |
| 2 | 2 | |
| 3 | -import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.MainInfoRespVO; | |
| 4 | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | 4 | import lombok.Data; |
| 6 | 5 | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/maininfo/vo/MainInfoRespVO.java renamed to urbanops-module-api/urbanops-module-workorder-api/src/main/java/com/zteits/urbanops/module/workorder/dto/MainInfoRespVO.java
| 1 | -package com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo; | |
| 1 | +package com.zteits.urbanops.module.workorder.dto; | |
| 2 | 2 | |
| 3 | +import cn.idev.excel.annotation.ExcelIgnoreUnannotated; | |
| 4 | +import cn.idev.excel.annotation.ExcelProperty; | |
| 3 | 5 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | -import lombok.*; | |
| 5 | -import java.util.*; | |
| 6 | -import java.math.BigDecimal; | |
| 6 | +import lombok.Data; | |
| 7 | 7 | |
| 8 | -import org.hibernate.validator.constraints.Length; | |
| 9 | -import org.springframework.format.annotation.DateTimeFormat; | |
| 8 | +import java.math.BigDecimal; | |
| 10 | 9 | import java.time.LocalDateTime; |
| 11 | -import cn.idev.excel.annotation.*; | |
| 10 | +import java.util.List; | |
| 11 | +import java.util.Set; | |
| 12 | 12 | |
| 13 | 13 | @Schema(description = "管理后台 - 工单信息 Response VO") |
| 14 | 14 | @Data | ... | ... |
urbanops-module-garden/pom.xml
| ... | ... | @@ -129,7 +129,19 @@ |
| 129 | 129 | <dependency> |
| 130 | 130 | <groupId>com.zteits.boot</groupId> |
| 131 | 131 | <artifactId>urbanops-module-bpm</artifactId> |
| 132 | - <version>2025.10-SNAPSHOT</version> | |
| 132 | + <version>${revision}</version> | |
| 133 | + <scope>compile</scope> | |
| 134 | + </dependency> | |
| 135 | + <dependency> | |
| 136 | + <groupId>com.zteits.boot</groupId> | |
| 137 | + <artifactId>urbanops-module-workorder-api</artifactId> | |
| 138 | + <version>${revision}</version> | |
| 139 | + <scope>compile</scope> | |
| 140 | + </dependency> | |
| 141 | + <dependency> | |
| 142 | + <groupId>com.zteits.boot</groupId> | |
| 143 | + <artifactId>urbanops-module-garden-api</artifactId> | |
| 144 | + <version>${revision}</version> | |
| 133 | 145 | <scope>compile</scope> |
| 134 | 146 | </dependency> |
| 135 | 147 | </dependencies> | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/api/material/MaterialApiImpl.java
| 1 | 1 | package com.zteits.urbanops.module.garden.api.material; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.bean.BeanUtil; |
| 4 | -import com.zteits.urbanops.module.garden.api.material.dto.MaterialInventoryOutDto; | |
| 5 | 4 | import com.zteits.urbanops.module.garden.controller.admin.materialinventoryout.vo.MaterialInventoryOutSaveReqVO; |
| 5 | +import com.zteits.urbanops.module.garden.dto.material.MaterialInventoryOutDto; | |
| 6 | 6 | import com.zteits.urbanops.module.garden.service.materialinventoryout.MaterialInventoryOutService; |
| 7 | 7 | import jakarta.annotation.Resource; |
| 8 | 8 | import org.springframework.stereotype.Service; |
| ... | ... | @@ -16,7 +16,7 @@ import org.springframework.validation.annotation.Validated; |
| 16 | 16 | */ |
| 17 | 17 | @Service |
| 18 | 18 | @Validated |
| 19 | -public class MaterialApiImpl implements MaterialApi{ | |
| 19 | +public class MaterialApiImpl implements MaterialApi { | |
| 20 | 20 | |
| 21 | 21 | @Resource |
| 22 | 22 | private MaterialInventoryOutService materialInventoryOutService; | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/api/road/RoadApi.java deleted
| 1 | -package com.zteits.urbanops.module.garden.api.road; | |
| 2 | - | |
| 3 | -import com.zteits.urbanops.module.garden.api.road.dto.RoadReqDTO; | |
| 4 | -import com.zteits.urbanops.module.garden.api.road.dto.RoadRespDTO; | |
| 5 | -import com.zteits.urbanops.module.garden.api.road.dto.RoadStreetRespDTO; | |
| 6 | - | |
| 7 | -import java.util.List; | |
| 8 | - | |
| 9 | -/** | |
| 10 | - * @author yanhuiqing | |
| 11 | - * @version 1.0 | |
| 12 | - * @description: 道路api 通过经纬度 系统编码获取道路信息 | |
| 13 | - * @date 2025/12/9 22:12 | |
| 14 | - */ | |
| 15 | -public interface RoadApi { | |
| 16 | - public List<RoadRespDTO> getRoadInfoBy(RoadReqDTO reqDTO); | |
| 17 | - | |
| 18 | - public RoadStreetRespDTO getRoadInfoById(Long id); | |
| 19 | -} |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/api/road/RoadApiImpl.java
| ... | ... | @@ -5,10 +5,10 @@ import cn.hutool.json.JSONUtil; |
| 5 | 5 | import com.alibaba.fastjson.JSON; |
| 6 | 6 | import com.zteits.urbanops.framework.common.util.http.HttpUtils; |
| 7 | 7 | import com.zteits.urbanops.framework.common.util.object.BeanUtils; |
| 8 | -import com.zteits.urbanops.module.garden.api.road.dto.RoadReqDTO; | |
| 9 | -import com.zteits.urbanops.module.garden.api.road.dto.RoadRespDTO; | |
| 10 | -import com.zteits.urbanops.module.garden.api.road.dto.RoadStreetRespDTO; | |
| 11 | 8 | import com.zteits.urbanops.module.garden.controller.admin.road.vo.RoadRespVO; |
| 9 | +import com.zteits.urbanops.module.garden.dto.road.RoadReqDTO; | |
| 10 | +import com.zteits.urbanops.module.garden.dto.road.RoadRespDTO; | |
| 11 | +import com.zteits.urbanops.module.garden.dto.road.RoadStreetRespDTO; | |
| 12 | 12 | import com.zteits.urbanops.module.garden.service.road.RoadService; |
| 13 | 13 | import jakarta.annotation.Resource; |
| 14 | 14 | import lombok.extern.slf4j.Slf4j; |
| ... | ... | @@ -29,7 +29,7 @@ import java.util.stream.Collectors; |
| 29 | 29 | */ |
| 30 | 30 | @Slf4j |
| 31 | 31 | @Service |
| 32 | -public class RoadApiImpl implements RoadApi{ | |
| 32 | +public class RoadApiImpl implements RoadApi { | |
| 33 | 33 | |
| 34 | 34 | @Value("${siot.roadUrl}") |
| 35 | 35 | private String roadInfoUrl; | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/maintainplan/vo/MaintainPlanCommitDetailRespVO.java
| ... | ... | @@ -40,13 +40,6 @@ public class MaintainPlanCommitDetailRespVO { |
| 40 | 40 | @ExcelProperty("备注") |
| 41 | 41 | private String remark; |
| 42 | 42 | |
| 43 | - @Schema(description = "总完成百分比", example = "98.00") | |
| 44 | - private Integer totalFinishNum; | |
| 45 | - | |
| 46 | - @Schema(description = "本次完成百分比", example = "98.00") | |
| 47 | - @ExcelProperty("本次完成百分比") | |
| 48 | - private Integer finishPercent; | |
| 49 | - | |
| 50 | 43 | @Schema(description = "照片host", example = "aaa") |
| 51 | 44 | @ExcelProperty("照片host") |
| 52 | 45 | private String imgHost; | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/maintainplan/vo/MaintainPlanCommitRespVO.java
| ... | ... | @@ -67,10 +67,6 @@ public class MaintainPlanCommitRespVO { |
| 67 | 67 | @ExcelProperty("养护类型") |
| 68 | 68 | private Integer planTypeId; |
| 69 | 69 | |
| 70 | - @Schema(description = "本次完成百分比") | |
| 71 | - @ExcelProperty("本次完成百分比") | |
| 72 | - private Integer finishPercent; | |
| 73 | - | |
| 74 | 70 | @Schema(description = "完成次数") |
| 75 | 71 | @ExcelProperty("完成次数") |
| 76 | 72 | private Integer planFinishNum; | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/vo/AppMaintainPlanCommitDetailPageRespVO.java
| ... | ... | @@ -42,9 +42,6 @@ public class AppMaintainPlanCommitDetailPageRespVO { |
| 42 | 42 | private String imgHost; |
| 43 | 43 | |
| 44 | 44 | @Schema(description = "开始照片") |
| 45 | - private String beginImg; | |
| 46 | - | |
| 47 | - @Schema(description = "开始照片") | |
| 48 | 45 | private List<String> beginImgList; |
| 49 | 46 | |
| 50 | 47 | /** |
| ... | ... | @@ -56,9 +53,6 @@ public class AppMaintainPlanCommitDetailPageRespVO { |
| 56 | 53 | */ |
| 57 | 54 | private Double opTime; |
| 58 | 55 | |
| 59 | - @Schema(description = "完成百分比", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 60 | - private Integer finishPercent; | |
| 61 | - | |
| 62 | 56 | @Schema(description = "完成状态 1:未完成;2:进行中;3:已完成", requiredMode = Schema.RequiredMode.REQUIRED) |
| 63 | 57 | private Integer finishState; |
| 64 | 58 | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/maintainplan/vo/AppMaintainPlanCommitSaveReqVO.java
| ... | ... | @@ -16,10 +16,6 @@ public class AppMaintainPlanCommitSaveReqVO { |
| 16 | 16 | @NotEmpty(message = "计划编码不能为空") |
| 17 | 17 | private String planNo; |
| 18 | 18 | |
| 19 | - @Schema(description = "本次总完成百分比", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 20 | - @NotNull(message = "本次总完成百分比不能为空") | |
| 21 | - private Integer totalFinishPercent; | |
| 22 | - | |
| 23 | 19 | @Schema(description = "照片host", requiredMode = Schema.RequiredMode.REQUIRED) |
| 24 | 20 | @NotEmpty(message = "照片host不能为空") |
| 25 | 21 | private String imgHost; | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/convert/AppGardenWorkOrderConvert.java
0 → 100644
| 1 | +package com.zteits.urbanops.module.garden.convert; | |
| 2 | + | |
| 3 | +import com.zteits.urbanops.module.garden.controller.app.inspectionplan.vo.AppInspectionPlanCommitSaveReqVO; | |
| 4 | +import com.zteits.urbanops.module.garden.dal.dataobject.inspectionplan.InspectionPlanDO; | |
| 5 | +import com.zteits.urbanops.module.garden.dal.dataobject.road.RoadDO; | |
| 6 | +import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderReqVO; | |
| 7 | +import org.mapstruct.factory.Mappers; | |
| 8 | + | |
| 9 | +import java.math.BigDecimal; | |
| 10 | +import java.time.LocalDateTime; | |
| 11 | + | |
| 12 | +public interface AppGardenWorkOrderConvert { | |
| 13 | + | |
| 14 | + AppGardenWorkOrderConvert INSTANCE = Mappers.getMapper(AppGardenWorkOrderConvert.class); | |
| 15 | + | |
| 16 | + default AppGardenWorkOrderReqVO buildAppGardenWorkOrderReqVO(AppInspectionPlanCommitSaveReqVO createReqVO, InspectionPlanDO inspectionPlanDO, RoadDO roadDO, String planNo ) { | |
| 17 | + AppGardenWorkOrderReqVO orderReqVO = new AppGardenWorkOrderReqVO(); | |
| 18 | + orderReqVO.setRoadId(inspectionPlanDO.getRoadId()); | |
| 19 | + orderReqVO.setRoadName(inspectionPlanDO.getRoadName()); | |
| 20 | + orderReqVO.setImgs(createReqVO.getImgList()); | |
| 21 | + orderReqVO.setRemark(createReqVO.getRemark()); | |
| 22 | + orderReqVO.setPressingType(2);//紧急 | |
| 23 | + orderReqVO.setOrderName(inspectionPlanDO.getPlanName()); | |
| 24 | + orderReqVO.setSourceId(1);//来源ID 工单来源 1、巡查 | |
| 25 | + orderReqVO.setSourceName("园林巡查上报"); | |
| 26 | + orderReqVO.setThirdWorkNo(planNo); | |
| 27 | + orderReqVO.setFinishDate(LocalDateTime.now()); | |
| 28 | + orderReqVO.setBusiLine(inspectionPlanDO.getBusiLine()); | |
| 29 | + orderReqVO.setLatLonType(3); | |
| 30 | + orderReqVO.setLat(new BigDecimal(roadDO.getStartingLatitude())); | |
| 31 | + orderReqVO.setLon(new BigDecimal(roadDO.getStartingLongitude())); | |
| 32 | + orderReqVO.setLonLatAddress(roadDO.getStartingRemark()); | |
| 33 | + return orderReqVO; | |
| 34 | + } | |
| 35 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/maintainplan/MaintainPlanCommitDO.java
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/maintainplan/MaintainPlanCommitMapper.java
| ... | ... | @@ -36,10 +36,4 @@ public interface MaintainPlanCommitMapper extends BaseMapperX<MaintainPlanCommit |
| 36 | 36 | */ |
| 37 | 37 | IPage<AppMaintainPlanCommitDetailPageRespVO> appMaintainPlanCommitDetailPage(@Param("page") IPage<AppMaintainPlanCommitDetailPageRespVO> page, @Param("req") AppMaintainPlanCommitPageReqVO pageReqVO); |
| 38 | 38 | |
| 39 | - /** | |
| 40 | - * 获取所有已完成比例 | |
| 41 | - * | |
| 42 | - * @return | |
| 43 | - */ | |
| 44 | - int selectFinishPercent(@Param("planNo") String planNo, @Param("sortNum") Integer sortNum); | |
| 45 | 39 | } |
| 46 | 40 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/inspectionplan/InspectionPlanCommitServiceImpl.java
| ... | ... | @@ -14,16 +14,22 @@ import com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo.Insp |
| 14 | 14 | import com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo.InspectionPlanCommitSaveReqVO; |
| 15 | 15 | import com.zteits.urbanops.module.garden.controller.app.inspectionplan.vo.AppInspectionPlanCommitRespVO; |
| 16 | 16 | import com.zteits.urbanops.module.garden.controller.app.inspectionplan.vo.AppInspectionPlanCommitSaveReqVO; |
| 17 | +import com.zteits.urbanops.module.garden.convert.AppGardenWorkOrderConvert; | |
| 17 | 18 | import com.zteits.urbanops.module.garden.dal.dataobject.inspectionplan.InspectionPlanCommitDO; |
| 18 | 19 | import com.zteits.urbanops.module.garden.dal.dataobject.inspectionplan.InspectionPlanDO; |
| 19 | 20 | import com.zteits.urbanops.module.garden.dal.dataobject.inspectionplan.InspectionPlanDetailDO; |
| 21 | +import com.zteits.urbanops.module.garden.dal.dataobject.road.RoadDO; | |
| 20 | 22 | import com.zteits.urbanops.module.garden.dal.mysql.inspectionplan.InspectionPlanCommitMapper; |
| 21 | 23 | import com.zteits.urbanops.module.garden.dal.mysql.inspectionplan.InspectionPlanDetailMapper; |
| 22 | 24 | import com.zteits.urbanops.module.garden.dal.mysql.inspectionplan.InspectionPlanMapper; |
| 25 | +import com.zteits.urbanops.module.garden.dal.mysql.road.RoadMapper; | |
| 23 | 26 | import com.zteits.urbanops.module.system.api.dept.DeptApi; |
| 24 | 27 | import com.zteits.urbanops.module.system.api.dept.dto.DeptRespDTO; |
| 25 | 28 | import com.zteits.urbanops.module.system.api.permission.RoleApi; |
| 29 | +import com.zteits.urbanops.module.workorder.api.WorkOrderApi; | |
| 30 | +import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderRespVO; | |
| 26 | 31 | import jakarta.annotation.Resource; |
| 32 | +import lombok.extern.slf4j.Slf4j; | |
| 27 | 33 | import org.apache.commons.lang3.StringUtils; |
| 28 | 34 | import org.springframework.stereotype.Service; |
| 29 | 35 | import org.springframework.transaction.annotation.Transactional; |
| ... | ... | @@ -45,6 +51,7 @@ import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.INSPECT |
| 45 | 51 | */ |
| 46 | 52 | @Service |
| 47 | 53 | @Validated |
| 54 | +@Slf4j | |
| 48 | 55 | public class InspectionPlanCommitServiceImpl implements InspectionPlanCommitService { |
| 49 | 56 | |
| 50 | 57 | @Resource |
| ... | ... | @@ -57,10 +64,13 @@ public class InspectionPlanCommitServiceImpl implements InspectionPlanCommitServ |
| 57 | 64 | private InspectionPlanDetailMapper inspectionPlanDetailMapper; |
| 58 | 65 | |
| 59 | 66 | @Resource |
| 67 | + private RoadMapper roadMapper; | |
| 68 | + | |
| 69 | + @Resource | |
| 60 | 70 | private DeptApi deptApi; |
| 61 | 71 | |
| 62 | 72 | @Resource |
| 63 | - private RoleApi roleApi; | |
| 73 | + private WorkOrderApi workOrderApi; | |
| 64 | 74 | |
| 65 | 75 | @Override |
| 66 | 76 | public Long createInspectionPlanCommit(InspectionPlanCommitSaveReqVO createReqVO) { |
| ... | ... | @@ -86,15 +96,17 @@ public class InspectionPlanCommitServiceImpl implements InspectionPlanCommitServ |
| 86 | 96 | if(null == inspectionPlanDO){ |
| 87 | 97 | throw exception(INSPECTION_PLAN_NOT_EXISTS); |
| 88 | 98 | } |
| 99 | + /*3.转工单*/ | |
| 100 | + String taskId = addWorkOrder(createReqVO, inspectionPlanDO); | |
| 89 | 101 | |
| 90 | 102 | InspectionPlanCommitDO inspectionPlanCommit = getInspectionPlanCommitDO(createReqVO, inspectionPlanDO); |
| 91 | - | |
| 92 | - /*3.查询计划明细最大次数*/ | |
| 103 | + inspectionPlanCommit.setTransWorkNo(taskId); | |
| 104 | + /*4.查询计划明细最大次数*/ | |
| 93 | 105 | Long countNum = inspectionPlanCommitMapper.selectCount(new QueryWrapper<InspectionPlanCommitDO>().lambda() |
| 94 | 106 | .eq(InspectionPlanCommitDO::getPlanNo, createReqVO.getPlanNo())); |
| 95 | 107 | |
| 96 | 108 | inspectionPlanCommit.setSortNum(countNum.intValue() + 1); |
| 97 | - /*4.插入明细*/ | |
| 109 | + /*5.插入明细*/ | |
| 98 | 110 | inspectionPlanCommitMapper.insert(inspectionPlanCommit); |
| 99 | 111 | |
| 100 | 112 | Integer detailFinishNum = inspectionPlanDetailDO.getPlanFinishNum() + 1; |
| ... | ... | @@ -124,6 +136,24 @@ public class InspectionPlanCommitServiceImpl implements InspectionPlanCommitServ |
| 124 | 136 | return 1L; |
| 125 | 137 | } |
| 126 | 138 | |
| 139 | + /** | |
| 140 | + * 转工单 | |
| 141 | + * @param createReqVO | |
| 142 | + * @param inspectionPlanDO | |
| 143 | + * @return | |
| 144 | + */ | |
| 145 | + private String addWorkOrder(AppInspectionPlanCommitSaveReqVO createReqVO, InspectionPlanDO inspectionPlanDO) { | |
| 146 | + //转交状态: 1:未转交;2:已转交 | |
| 147 | + if (createReqVO.getTransState().equals(1)) { | |
| 148 | + return null; | |
| 149 | + } | |
| 150 | + //查询道路信息 | |
| 151 | + RoadDO roadDO = roadMapper.selectOne(RoadDO::getId, inspectionPlanDO.getRoadId()); | |
| 152 | + AppGardenWorkOrderRespVO workOrder = workOrderApi.createWorkOrder(AppGardenWorkOrderConvert.INSTANCE.buildAppGardenWorkOrderReqVO(createReqVO, inspectionPlanDO, roadDO, createReqVO.getPlanNo())); | |
| 153 | + log.info("创建工单结果:{}", JSONObject.toJSONString(workOrder)); | |
| 154 | + return workOrder.getTaskId(); | |
| 155 | + } | |
| 156 | + | |
| 127 | 157 | private static InspectionPlanCommitDO getInspectionPlanCommitDO(AppInspectionPlanCommitSaveReqVO createReqVO, InspectionPlanDO inspectionPlanDO) { |
| 128 | 158 | LocalDateTime now = LocalDateTime.now(); |
| 129 | 159 | Long userId = SecurityFrameworkUtils.getLoginUserId(); | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/maintainplan/MaintainPlanCommitServiceImpl.java
| ... | ... | @@ -94,9 +94,8 @@ public class MaintainPlanCommitServiceImpl implements MaintainPlanCommitService |
| 94 | 94 | throw exception(MAINTAIN_PLAN_NOT_EXISTS); |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | + //排序号 | |
| 97 | 98 | int sortNum = maintainPlanDetailDO.getPlanFinishNum() +1; |
| 98 | - /*3.查询已完成比例*/ | |
| 99 | -// int finishPercent = maintainPlanCommitMapper.selectFinishPercent(createReqVO.getPlanNo(), sortNum); | |
| 100 | 99 | |
| 101 | 100 | MaintainPlanCommitDO commitDO = new MaintainPlanCommitDO(); |
| 102 | 101 | commitDO.setBatchNo(maintainPlanDO.getBatchNo()); |
| ... | ... | @@ -108,7 +107,6 @@ public class MaintainPlanCommitServiceImpl implements MaintainPlanCommitService |
| 108 | 107 | commitDO.setCompanyId(maintainPlanDO.getCompanyId()); |
| 109 | 108 | commitDO.setDeptId(maintainPlanDO.getDeptId()); |
| 110 | 109 | commitDO.setRoadId(maintainPlanDO.getRoadId()); |
| 111 | - commitDO.setFinishPercent(createReqVO.getTotalFinishPercent()); | |
| 112 | 110 | commitDO.setImgHost(createReqVO.getImgHost()); |
| 113 | 111 | commitDO.setBeginImg(JSONObject.toJSONString(createReqVO.getBeginImg())); |
| 114 | 112 | commitDO.setProcessImg("[]"); |
| ... | ... | @@ -145,40 +143,34 @@ public class MaintainPlanCommitServiceImpl implements MaintainPlanCommitService |
| 145 | 143 | } |
| 146 | 144 | |
| 147 | 145 | |
| 148 | - int detailFinishNum = maintainPlanDetailDO.getPlanFinishNum(); | |
| 149 | - if(createReqVO.getTotalFinishPercent().equals(100)){ | |
| 150 | - detailFinishNum = detailFinishNum + 1; | |
| 151 | - } | |
| 152 | - | |
| 146 | + int detailFinishNum = maintainPlanDetailDO.getPlanFinishNum() + 1; | |
| 153 | 147 | //完成状态 1:未完成;2:已完成 |
| 154 | 148 | int detailFinishState = FinishStateEnum.NOT_FINISHED.getStatus(); |
| 155 | 149 | if(detailFinishNum == maintainPlanDetailDO.getPlanNum()){ |
| 156 | 150 | detailFinishState = FinishStateEnum.FINISHED.getStatus(); |
| 157 | 151 | } |
| 158 | 152 | |
| 159 | - //完成状态 1:未完成;2:已完成 | |
| 160 | - if(detailFinishState == FinishStateEnum.FINISHED.getStatus()){ | |
| 161 | - //更新明细 | |
| 162 | - LambdaUpdateWrapper<MaintainPlanDetailDO> detailUpdateSql = new LambdaUpdateWrapper<MaintainPlanDetailDO>() | |
| 163 | - .set(MaintainPlanDetailDO::getPlanFinishNum, detailFinishNum) | |
| 164 | - .set(MaintainPlanDetailDO::getFinishState, detailFinishState) | |
| 165 | - .set(MaintainPlanDetailDO::getUpdateTime, LocalDateTime.now()) | |
| 166 | - .eq(MaintainPlanDetailDO::getPlanNo, createReqVO.getPlanNo()); | |
| 167 | - maintainPlanDetailMapper.update(detailUpdateSql); | |
| 168 | - | |
| 169 | - int finishState = FinishStateEnum.NOT_FINISHED.getStatus(); | |
| 170 | - if(maintainPlanDO.getPlanNum().equals(maintainPlanDO.getPlanFinishNum()+1)){ | |
| 171 | - finishState = FinishStateEnum.FINISHED.getStatus(); | |
| 172 | - } | |
| 173 | - LambdaUpdateWrapper<MaintainPlanDO> maintainPlanDOSql = new LambdaUpdateWrapper<MaintainPlanDO>() | |
| 174 | - .set(MaintainPlanDO::getPlanFinishNum, maintainPlanDO.getPlanFinishNum()+1) | |
| 175 | - .set(MaintainPlanDO::getFinishState, finishState) | |
| 176 | - .set(MaintainPlanDO::getUpdateTime, LocalDateTime.now()) | |
| 177 | - .eq(MaintainPlanDO::getBatchNo, maintainPlanDO.getBatchNo()); | |
| 178 | - //更新计划汇总 | |
| 179 | - maintainPlanMapper.update(maintainPlanDOSql); | |
| 180 | - } | |
| 153 | + //更新明细 | |
| 154 | + LambdaUpdateWrapper<MaintainPlanDetailDO> detailUpdateSql = new LambdaUpdateWrapper<MaintainPlanDetailDO>() | |
| 155 | + .set(MaintainPlanDetailDO::getPlanFinishNum, detailFinishNum) | |
| 156 | + .set(MaintainPlanDetailDO::getFinishState, detailFinishState) | |
| 157 | + .set(MaintainPlanDetailDO::getUpdateTime, LocalDateTime.now()) | |
| 158 | + .eq(MaintainPlanDetailDO::getPlanNo, createReqVO.getPlanNo()); | |
| 159 | + maintainPlanDetailMapper.update(detailUpdateSql); | |
| 181 | 160 | |
| 161 | + | |
| 162 | + Integer planFinishNum = maintainPlanDO.getPlanFinishNum()+1; | |
| 163 | + int finishState = FinishStateEnum.NOT_FINISHED.getStatus(); | |
| 164 | + if(maintainPlanDO.getPlanNum().equals(planFinishNum)){ | |
| 165 | + finishState = FinishStateEnum.FINISHED.getStatus(); | |
| 166 | + } | |
| 167 | + LambdaUpdateWrapper<MaintainPlanDO> maintainPlanDOSql = new LambdaUpdateWrapper<MaintainPlanDO>() | |
| 168 | + .set(MaintainPlanDO::getPlanFinishNum, planFinishNum) | |
| 169 | + .set(MaintainPlanDO::getFinishState, finishState) | |
| 170 | + .set(MaintainPlanDO::getUpdateTime, LocalDateTime.now()) | |
| 171 | + .eq(MaintainPlanDO::getBatchNo, maintainPlanDO.getBatchNo()); | |
| 172 | + //更新计划汇总 | |
| 173 | + maintainPlanMapper.update(maintainPlanDOSql); | |
| 182 | 174 | return commitDO.getId(); |
| 183 | 175 | } |
| 184 | 176 | |
| ... | ... | @@ -222,11 +214,6 @@ public class MaintainPlanCommitServiceImpl implements MaintainPlanCommitService |
| 222 | 214 | //分页 |
| 223 | 215 | IPage<AppMaintainPlanCommitDetailPageRespVO> mpPage = MyBatisUtils.buildPage(pageReqVO); |
| 224 | 216 | IPage<AppMaintainPlanCommitDetailPageRespVO> page = maintainPlanCommitMapper.appMaintainPlanCommitDetailPage(mpPage, pageReqVO); |
| 225 | - | |
| 226 | - page.getRecords().forEach(respVO -> { | |
| 227 | - respVO.setBeginImgList(StrUtils.imgProcess(respVO.getBeginImg(), "")); | |
| 228 | - }); | |
| 229 | - | |
| 230 | 217 | // 转换返回 |
| 231 | 218 | return new PageResult<>(page.getRecords(), page.getTotal()); |
| 232 | 219 | } |
| ... | ... | @@ -250,7 +237,6 @@ public class MaintainPlanCommitServiceImpl implements MaintainPlanCommitService |
| 250 | 237 | respVO.setBeginImgList(StrUtils.imgProcess(e.getBeginImg(), "")); |
| 251 | 238 | respVO.setProcessImgList(StrUtils.imgProcess(e.getProcessImg(), "")); |
| 252 | 239 | respVO.setEndImgList(StrUtils.imgProcess(e.getEndImg(), "")); |
| 253 | - respVO.setTotalFinishNum(maintainPlanDetailDO.getPlanFinishNum()); | |
| 254 | 240 | List<MaintainPlanCommonUserVO> commonUsers = new ArrayList<>(); |
| 255 | 241 | List<MaintainPlanCommonUserDO> maintainPlanCommonUserList = maintainPlanCommonUserMapper.selectList(new QueryWrapper<MaintainPlanCommonUserDO>().lambda() |
| 256 | 242 | .eq(MaintainPlanCommonUserDO::getParentId, maintainPlanDetailDO.getId()) | ... | ... |
urbanops-module-garden/src/main/resources/mapper/maintainplan/MaintainPlanCommitMapper.xml
| ... | ... | @@ -9,6 +9,10 @@ |
| 9 | 9 | 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ |
| 10 | 10 | --> |
| 11 | 11 | |
| 12 | + <resultMap id="BaseResultMap" type="com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanCommitDetailPageRespVO"> | |
| 13 | + <result property="beginImgList" column="begin_img" typeHandler="com.zteits.urbanops.framework.mybatis.core.type.StringArrayToListTypeHandler"/> | |
| 14 | + </resultMap> | |
| 15 | + | |
| 12 | 16 | <select id="selectForPage" resultType="com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.MaintainPlanCommitRespVO"> |
| 13 | 17 | SELECT |
| 14 | 18 | a.batch_no, |
| ... | ... | @@ -28,8 +32,7 @@ |
| 28 | 32 | a.company_id, |
| 29 | 33 | a.dept_id, |
| 30 | 34 | c.finish_time, |
| 31 | - c.user_name, | |
| 32 | - c.finish_percent | |
| 35 | + c.user_name | |
| 33 | 36 | FROM |
| 34 | 37 | garden_maintain_plan_detail a, |
| 35 | 38 | garden_maintain_plan b, |
| ... | ... | @@ -109,7 +112,6 @@ |
| 109 | 112 | a.company_id, |
| 110 | 113 | a.finish_state, |
| 111 | 114 | a.dept_id, |
| 112 | -<!-- c.finish_percent,--> | |
| 113 | 115 | c.begin_img, |
| 114 | 116 | c.img_host, |
| 115 | 117 | c.finish_time, |
| ... | ... | @@ -125,14 +127,4 @@ |
| 125 | 127 | AND a.plan_no = c.plan_no |
| 126 | 128 | AND c.plan_no = #{req.planNo} |
| 127 | 129 | </select> |
| 128 | - | |
| 129 | - <select id="selectFinishPercent" resultType="java.lang.Integer"> | |
| 130 | - SELECT | |
| 131 | - sum(a.finish_percent) as finishPercent | |
| 132 | - FROM | |
| 133 | - garden_maintain_plan_commit a | |
| 134 | - WHERE | |
| 135 | - a.plan_no = #{planNo} | |
| 136 | - AND a.sort_num = #{sortNum} | |
| 137 | - </select> | |
| 138 | 130 | </mapper> | ... | ... |
urbanops-module-garden/src/main/resources/mapper/maintainplan/MaintainPlanDetailMapper.xml
urbanops-module-workorder/pom.xml
| ... | ... | @@ -133,7 +133,13 @@ |
| 133 | 133 | </dependency> |
| 134 | 134 | <dependency> |
| 135 | 135 | <groupId>com.zteits.boot</groupId> |
| 136 | - <artifactId>urbanops-module-garden</artifactId> | |
| 136 | + <artifactId>urbanops-module-garden-api</artifactId> | |
| 137 | + <version>${revision}</version> | |
| 138 | + <scope>compile</scope> | |
| 139 | + </dependency> | |
| 140 | + <dependency> | |
| 141 | + <groupId>com.zteits.boot</groupId> | |
| 142 | + <artifactId>urbanops-module-workorder-api</artifactId> | |
| 137 | 143 | <version>${revision}</version> |
| 138 | 144 | <scope>compile</scope> |
| 139 | 145 | </dependency> | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/api/workorder/WorkOrderApiImpl.java
| 1 | 1 | package com.zteits.urbanops.module.workorder.api.workorder; |
| 2 | 2 | |
| 3 | -import com.zteits.urbanops.framework.common.pojo.PageResult; | |
| 4 | 3 | import com.zteits.urbanops.framework.common.util.object.BeanUtils; |
| 5 | 4 | import com.zteits.urbanops.module.system.api.user.dto.AdminUserRespDTO; |
| 5 | +import com.zteits.urbanops.module.workorder.api.WorkOrderApi; | |
| 6 | 6 | import com.zteits.urbanops.module.workorder.api.constant.BpmCommonConstant; |
| 7 | -import com.zteits.urbanops.module.workorder.controller.app.garden.vo.AppGardenWorkOrderReqVO; | |
| 8 | -import com.zteits.urbanops.module.workorder.controller.app.garden.vo.AppGardenWorkOrderRespVO; | |
| 9 | 7 | import com.zteits.urbanops.module.workorder.dal.dataobject.garden.BpmGardenWorkOrderDO; |
| 10 | 8 | import com.zteits.urbanops.module.workorder.dal.mysql.maininfo.MainInfoExtMapper; |
| 9 | +import com.zteits.urbanops.module.workorder.dto.AdminUserRespVO; | |
| 10 | +import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderReqVO; | |
| 11 | +import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderRespVO; | |
| 11 | 12 | import com.zteits.urbanops.module.workorder.service.garden.BpmGardenService; |
| 12 | 13 | import jakarta.annotation.Resource; |
| 13 | 14 | import org.springframework.stereotype.Service; |
| ... | ... | @@ -28,7 +29,7 @@ import static com.zteits.urbanops.framework.common.exception.util.ServiceExcepti |
| 28 | 29 | * @date 2025/12/5 17:21 |
| 29 | 30 | */ |
| 30 | 31 | @Service |
| 31 | -public class WorkOrderApiImpl implements WorkOrderApi{ | |
| 32 | +public class WorkOrderApiImpl implements WorkOrderApi { | |
| 32 | 33 | |
| 33 | 34 | @Resource |
| 34 | 35 | private MainInfoExtMapper workOrderExtMapper; |
| ... | ... | @@ -57,19 +58,21 @@ public class WorkOrderApiImpl implements WorkOrderApi{ |
| 57 | 58 | } |
| 58 | 59 | |
| 59 | 60 | @Override |
| 60 | - public List<AdminUserRespDTO> getUserByLoginIdAndRoleCode(Long loginUserId, String roleCode, String busiLine, boolean notHas) { | |
| 61 | + public List<AdminUserRespVO> getUserByLoginIdAndRoleCode(Long loginUserId, String roleCode, String busiLine, boolean notHas) { | |
| 61 | 62 | if(ObjectUtils.isEmpty(loginUserId) || ObjectUtils.isEmpty(roleCode) || ObjectUtils.isEmpty(busiLine)){ |
| 62 | 63 | throw exception0(BAD_REQUEST.getCode(),"param:loginUserId,roleCode,busiLine 不能为空!"); |
| 63 | 64 | } |
| 64 | - return workOrderExtMapper.getUserByLoginIdAndRoleCode(loginUserId,roleCode,busiLine,notHas); | |
| 65 | + List<AdminUserRespDTO> list = workOrderExtMapper.getUserByLoginIdAndRoleCode(loginUserId, roleCode, busiLine, notHas); | |
| 66 | + return BeanUtils.toBean(list, AdminUserRespVO.class); | |
| 65 | 67 | } |
| 66 | 68 | |
| 67 | 69 | @Override |
| 68 | - public List<AdminUserRespDTO> getUserByRoadIdAndRoleCode(Long roadId, String roleCode, String busiLine) { | |
| 70 | + public List<AdminUserRespVO> getUserByRoadIdAndRoleCode(Long roadId, String roleCode, String busiLine) { | |
| 69 | 71 | if(ObjectUtils.isEmpty(roadId) || ObjectUtils.isEmpty(roleCode) || ObjectUtils.isEmpty(busiLine)){ |
| 70 | 72 | throw exception0(BAD_REQUEST.getCode(),"param:roadId,roleCode,busiLine 不能为空!"); |
| 71 | 73 | } |
| 72 | - return workOrderExtMapper.getUserByRoadIdAndRoleCode(roadId,roleCode,busiLine); | |
| 74 | + List<AdminUserRespDTO> list = workOrderExtMapper.getUserByRoadIdAndRoleCode(roadId, roleCode, busiLine); | |
| 75 | + return BeanUtils.toBean(list, AdminUserRespVO.class); | |
| 73 | 76 | } |
| 74 | 77 | |
| 75 | 78 | @Override | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/admin/maininfo/MainInfoController.java
| ... | ... | @@ -11,11 +11,11 @@ import com.zteits.urbanops.module.system.api.user.dto.AdminUserRespDTO; |
| 11 | 11 | import com.zteits.urbanops.module.system.dal.dataobject.dept.DeptDO; |
| 12 | 12 | import com.zteits.urbanops.module.system.service.dept.DeptService; |
| 13 | 13 | import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.MainInfoPageReqVO; |
| 14 | -import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.MainInfoRespVO; | |
| 15 | 14 | import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.MainInfoSaveReqVO; |
| 16 | 15 | import com.zteits.urbanops.module.workorder.convert.maininfo.MainInfoConvert; |
| 17 | 16 | import com.zteits.urbanops.module.workorder.dal.dataobject.attachment.AttachmentDO; |
| 18 | 17 | import com.zteits.urbanops.module.workorder.dal.dataobject.maininfo.MainInfoDO; |
| 18 | +import com.zteits.urbanops.module.workorder.dto.MainInfoRespVO; | |
| 19 | 19 | import com.zteits.urbanops.module.workorder.service.attachment.AttachmentService; |
| 20 | 20 | import com.zteits.urbanops.module.workorder.service.maininfo.MainInfoService; |
| 21 | 21 | import io.swagger.v3.oas.annotations.Operation; | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/controller/app/garden/AppGardenWorkOrderController.java
| 1 | 1 | package com.zteits.urbanops.module.workorder.controller.app.garden; |
| 2 | 2 | |
| 3 | -import cn.hutool.core.util.StrUtil; | |
| 4 | 3 | import com.zteits.urbanops.framework.common.pojo.CommonResult; |
| 5 | -import com.zteits.urbanops.framework.common.pojo.PageParam; | |
| 6 | 4 | import com.zteits.urbanops.framework.common.pojo.PageResult; |
| 7 | -import com.zteits.urbanops.framework.common.util.json.JsonUtils; | |
| 8 | 5 | import com.zteits.urbanops.framework.common.util.object.BeanUtils; |
| 9 | 6 | import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; |
| 10 | -import com.zteits.urbanops.framework.web.core.util.WebFrameworkUtils; | |
| 11 | -import com.zteits.urbanops.module.bpm.controller.admin.task.vo.instance.BpmApprovalDetailReqVO; | |
| 12 | -import com.zteits.urbanops.module.bpm.controller.admin.task.vo.instance.BpmApprovalDetailRespVO; | |
| 13 | -import com.zteits.urbanops.module.bpm.controller.admin.task.vo.task.BpmTaskDelegateReqVO; | |
| 14 | -import com.zteits.urbanops.module.bpm.controller.admin.task.vo.task.BpmTaskTransferReqVO; | |
| 15 | 7 | import com.zteits.urbanops.module.garden.api.road.RoadApi; |
| 16 | -import com.zteits.urbanops.module.garden.api.road.dto.RoadReqDTO; | |
| 17 | -import com.zteits.urbanops.module.garden.api.road.dto.RoadRespDTO; | |
| 8 | +import com.zteits.urbanops.module.garden.dto.road.RoadReqDTO; | |
| 9 | +import com.zteits.urbanops.module.garden.dto.road.RoadRespDTO; | |
| 18 | 10 | import com.zteits.urbanops.module.system.api.user.dto.AdminUserRespDTO; |
| 19 | -import com.zteits.urbanops.module.workorder.api.constant.BpmCommonConstant; | |
| 20 | 11 | import com.zteits.urbanops.module.workorder.controller.app.garden.vo.*; |
| 21 | 12 | import com.zteits.urbanops.module.workorder.controller.app.garden.vo.common.UserInfoPageReqVO; |
| 22 | 13 | import com.zteits.urbanops.module.workorder.controller.app.garden.vo.operator.AppGardenTaskReturnExtReqVO; |
| ... | ... | @@ -26,17 +17,17 @@ import com.zteits.urbanops.module.workorder.controller.app.garden.vo.process.App |
| 26 | 17 | import com.zteits.urbanops.module.workorder.controller.app.garden.vo.process.AppGardenApprovalDetailRespVO; |
| 27 | 18 | import com.zteits.urbanops.module.workorder.controller.app.garden.vo.task.*; |
| 28 | 19 | import com.zteits.urbanops.module.workorder.dal.dataobject.garden.BpmGardenWorkOrderDO; |
| 20 | +import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderReqVO; | |
| 21 | +import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderRespVO; | |
| 29 | 22 | import com.zteits.urbanops.module.workorder.service.garden.BpmGardenService; |
| 30 | 23 | import io.swagger.v3.oas.annotations.Operation; |
| 31 | 24 | import io.swagger.v3.oas.annotations.Parameter; |
| 32 | 25 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 33 | 26 | import jakarta.annotation.Resource; |
| 34 | 27 | import jakarta.validation.Valid; |
| 35 | -import org.springframework.security.access.prepost.PreAuthorize; | |
| 36 | 28 | import org.springframework.web.bind.annotation.*; |
| 37 | 29 | |
| 38 | 30 | import java.util.List; |
| 39 | -import java.util.Map; | |
| 40 | 31 | |
| 41 | 32 | import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; |
| 42 | 33 | import static com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/convert/garden/AppGardenTaskConvert.java
| ... | ... | @@ -13,11 +13,11 @@ import com.zteits.urbanops.module.bpm.framework.flowable.core.util.FlowableUtils |
| 13 | 13 | import com.zteits.urbanops.module.system.api.dept.dto.DeptRespDTO; |
| 14 | 14 | import com.zteits.urbanops.module.system.api.user.dto.AdminUserRespDTO; |
| 15 | 15 | import com.zteits.urbanops.module.workorder.api.constant.BpmCommonConstant; |
| 16 | -import com.zteits.urbanops.module.workorder.controller.app.garden.vo.AppGardenWorkOrderRespVO; | |
| 17 | 16 | import com.zteits.urbanops.module.workorder.controller.app.garden.vo.task.AppGardenTaskRespVO; |
| 18 | 17 | import com.zteits.urbanops.module.workorder.dal.dataobject.attachment.AttachmentDO; |
| 19 | 18 | import com.zteits.urbanops.module.workorder.dal.dataobject.maininfo.MainInfoExtDO; |
| 20 | 19 | import com.zteits.urbanops.module.workorder.dal.mysql.attachment.AttachmentMapper; |
| 20 | +import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderRespVO; | |
| 21 | 21 | import org.flowable.engine.history.HistoricProcessInstance; |
| 22 | 22 | import org.flowable.engine.runtime.ProcessInstance; |
| 23 | 23 | import org.flowable.task.api.Task; | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/convert/maininfo/MainInfoConvert.java
| ... | ... | @@ -4,9 +4,9 @@ import com.zteits.urbanops.framework.common.pojo.PageResult; |
| 4 | 4 | import com.zteits.urbanops.framework.common.util.collection.CollectionUtils; |
| 5 | 5 | import com.zteits.urbanops.framework.common.util.object.BeanUtils; |
| 6 | 6 | import com.zteits.urbanops.module.system.api.user.dto.AdminUserRespDTO; |
| 7 | -import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.MainInfoRespVO; | |
| 8 | 7 | import com.zteits.urbanops.module.workorder.dal.dataobject.attachment.AttachmentDO; |
| 9 | 8 | import com.zteits.urbanops.module.workorder.dal.dataobject.maininfo.MainInfoDO; |
| 9 | +import com.zteits.urbanops.module.workorder.dto.MainInfoRespVO; | |
| 10 | 10 | import org.mapstruct.Mapper; |
| 11 | 11 | import org.mapstruct.factory.Mappers; |
| 12 | 12 | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmGardenService.java
| ... | ... | @@ -3,9 +3,8 @@ package com.zteits.urbanops.module.workorder.service.garden; |
| 3 | 3 | import com.zteits.urbanops.framework.common.pojo.PageParam; |
| 4 | 4 | import com.zteits.urbanops.framework.common.pojo.PageResult; |
| 5 | 5 | import com.zteits.urbanops.module.system.api.user.dto.AdminUserRespDTO; |
| 6 | -import com.zteits.urbanops.module.workorder.controller.admin.garden.vo.BpmGardenWorkOrderCreateReqVO; | |
| 7 | 6 | import com.zteits.urbanops.module.workorder.controller.admin.garden.vo.BpmGardenWorkOrderPageReqVO; |
| 8 | -import com.zteits.urbanops.module.workorder.controller.app.garden.vo.*; | |
| 7 | +import com.zteits.urbanops.module.workorder.controller.app.garden.vo.AppGardenWorkOrderPageReqVO; | |
| 9 | 8 | import com.zteits.urbanops.module.workorder.controller.app.garden.vo.operator.AppGardenTaskReturnExtReqVO; |
| 10 | 9 | import com.zteits.urbanops.module.workorder.controller.app.garden.vo.operator.AppGardenTaskTeamLeaderAssignReqVO; |
| 11 | 10 | import com.zteits.urbanops.module.workorder.controller.app.garden.vo.operator.AppGardenTaskWorkerExcuteReqVO; |
| ... | ... | @@ -13,6 +12,8 @@ import com.zteits.urbanops.module.workorder.controller.app.garden.vo.process.App |
| 13 | 12 | import com.zteits.urbanops.module.workorder.controller.app.garden.vo.process.AppGardenApprovalDetailRespVO; |
| 14 | 13 | import com.zteits.urbanops.module.workorder.controller.app.garden.vo.task.*; |
| 15 | 14 | import com.zteits.urbanops.module.workorder.dal.dataobject.garden.BpmGardenWorkOrderDO; |
| 15 | +import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderReqVO; | |
| 16 | +import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderRespVO; | |
| 16 | 17 | import jakarta.validation.Valid; |
| 17 | 18 | /** |
| 18 | 19 | * @author yanhuiqing | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmGardenServiceImpl.java
| ... | ... | @@ -2,12 +2,10 @@ package com.zteits.urbanops.module.workorder.service.garden; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | 4 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| 5 | -import com.baomidou.mybatisplus.core.metadata.IPage; | |
| 6 | 5 | import com.zteits.urbanops.framework.common.pojo.PageParam; |
| 7 | 6 | import com.zteits.urbanops.framework.common.pojo.PageResult; |
| 8 | 7 | import com.zteits.urbanops.framework.common.util.object.BeanUtils; |
| 9 | 8 | import com.zteits.urbanops.framework.common.util.object.ObjectUtils; |
| 10 | -import com.zteits.urbanops.framework.mybatis.core.util.MyBatisUtils; | |
| 11 | 9 | import com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils; |
| 12 | 10 | import com.zteits.urbanops.module.bpm.api.task.BpmProcessInstanceApi; |
| 13 | 11 | import com.zteits.urbanops.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; |
| ... | ... | @@ -21,12 +19,11 @@ import com.zteits.urbanops.module.bpm.service.definition.BpmProcessDefinitionSer |
| 21 | 19 | import com.zteits.urbanops.module.bpm.service.task.BpmProcessInstanceService; |
| 22 | 20 | import com.zteits.urbanops.module.bpm.service.task.BpmTaskService; |
| 23 | 21 | import com.zteits.urbanops.module.garden.api.road.RoadApi; |
| 24 | -import com.zteits.urbanops.module.garden.api.road.dto.RoadStreetRespDTO; | |
| 22 | +import com.zteits.urbanops.module.garden.dto.road.RoadStreetRespDTO; | |
| 25 | 23 | import com.zteits.urbanops.module.system.api.user.AdminUserApi; |
| 26 | 24 | import com.zteits.urbanops.module.system.api.user.dto.AdminUserRespDTO; |
| 25 | +import com.zteits.urbanops.module.workorder.api.WorkOrderApi; | |
| 27 | 26 | import com.zteits.urbanops.module.workorder.api.constant.BpmCommonConstant; |
| 28 | -import com.zteits.urbanops.module.workorder.api.workorder.WorkOrderApi; | |
| 29 | -import com.zteits.urbanops.module.workorder.controller.admin.garden.vo.BpmGardenWorkOrderCreateReqVO; | |
| 30 | 27 | import com.zteits.urbanops.module.workorder.controller.admin.garden.vo.BpmGardenWorkOrderPageReqVO; |
| 31 | 28 | import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.MainInfoHasTaskPageReqVO; |
| 32 | 29 | import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.MainInfoPageReqVO; |
| ... | ... | @@ -46,6 +43,8 @@ import com.zteits.urbanops.module.workorder.dal.dataobject.maininfo.MainInfoExtD |
| 46 | 43 | import com.zteits.urbanops.module.workorder.dal.mysql.attachment.AttachmentMapper; |
| 47 | 44 | import com.zteits.urbanops.module.workorder.dal.mysql.maininfo.MainInfoExtMapper; |
| 48 | 45 | import com.zteits.urbanops.module.workorder.dal.mysql.maininfo.MainInfoMapper; |
| 46 | +import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderReqVO; | |
| 47 | +import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderRespVO; | |
| 49 | 48 | import com.zteits.urbanops.module.workorder.util.TaskNodeUtils; |
| 50 | 49 | import jakarta.annotation.Resource; |
| 51 | 50 | import org.flowable.engine.RuntimeService; |
| ... | ... | @@ -61,7 +60,6 @@ import java.time.LocalDateTime; |
| 61 | 60 | import java.util.HashMap; |
| 62 | 61 | import java.util.List; |
| 63 | 62 | import java.util.Map; |
| 64 | -import java.util.Set; | |
| 65 | 63 | import java.util.stream.Collectors; |
| 66 | 64 | |
| 67 | 65 | import static com.zteits.urbanops.framework.common.exception.enums.GlobalErrorCodeConstants.BAD_REQUEST; | ... | ... |
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/materialdetail/MaterialDetailServiceImpl.java
| ... | ... | @@ -3,9 +3,7 @@ package com.zteits.urbanops.module.workorder.service.materialdetail; |
| 3 | 3 | import com.zteits.urbanops.framework.common.pojo.PageResult; |
| 4 | 4 | import com.zteits.urbanops.framework.common.util.object.BeanUtils; |
| 5 | 5 | import com.zteits.urbanops.module.garden.api.material.MaterialApi; |
| 6 | -import com.zteits.urbanops.module.garden.api.material.dto.MaterialInventoryOutDto; | |
| 7 | -import com.zteits.urbanops.module.garden.controller.admin.materialinventoryout.vo.MaterialInventoryOutSaveReqVO; | |
| 8 | -import com.zteits.urbanops.module.garden.service.materialinventoryout.MaterialInventoryOutService; | |
| 6 | +import com.zteits.urbanops.module.garden.dto.material.MaterialInventoryOutDto; | |
| 9 | 7 | import com.zteits.urbanops.module.workorder.controller.admin.materialdetail.vo.MaterialDetailPageReqVO; |
| 10 | 8 | import com.zteits.urbanops.module.workorder.controller.admin.materialdetail.vo.MaterialDetailSaveReqVO; |
| 11 | 9 | import com.zteits.urbanops.module.workorder.dal.dataobject.maininfo.MainInfoDO; | ... | ... |