Showing
50 changed files
with
3274 additions
and
377 deletions
Too many changes to show.
To preserve performance only 50 of 53 files are displayed.
| 1 | package com.qgutech.qgyun.apaas.sync.cps.controller; | 1 | package com.qgutech.qgyun.apaas.sync.cps.controller; |
| 2 | 2 | ||
| 3 | +import com.qgutech.qgyun.apaas.sync.cps.dto.CImprovementDetailDTO; | ||
| 3 | import com.qgutech.qgyun.apaas.sync.cps.dto.CImprovementSummaryDTO; | 4 | import com.qgutech.qgyun.apaas.sync.cps.dto.CImprovementSummaryDTO; |
| 4 | import com.qgutech.qgyun.apaas.sync.cps.model.CImprovement; | 5 | import com.qgutech.qgyun.apaas.sync.cps.model.CImprovement; |
| 5 | import com.qgutech.qgyun.apaas.sync.cps.service.CImprovementService; | 6 | import com.qgutech.qgyun.apaas.sync.cps.service.CImprovementService; |
| @@ -50,4 +51,23 @@ public class CImprovementController { | @@ -50,4 +51,23 @@ public class CImprovementController { | ||
| 50 | List<CImprovementSummaryDTO> summaryList = cImprovementService.summaryByYearAndQuarter(year, quarter); | 51 | List<CImprovementSummaryDTO> summaryList = cImprovementService.summaryByYearAndQuarter(year, quarter); |
| 51 | return new JsonResult<>(true, "成功", summaryList); | 52 | return new JsonResult<>(true, "成功", summaryList); |
| 52 | } | 53 | } |
| 54 | + | ||
| 55 | + /** | ||
| 56 | + * 根据年份、季度、单位车间id查询C类改善记录详情列表 | ||
| 57 | + * <p> | ||
| 58 | + * 查询该年份季度时间范围内、由该单位车间下人员发起的C类改善记录, | ||
| 59 | + * 并将记录中涉及的单位、室组、区域、班组、发起人、部门等关联实体名称补充完整 | ||
| 60 | + * | ||
| 61 | + * @param year 年份,格式:yyyy,可为空(默认当前年) | ||
| 62 | + * @param quarter 季度枚举值(#1#-#4#),必传 | ||
| 63 | + * @param roomGroupId 室组id,必传 | ||
| 64 | + * @return C类改善记录详情列表(含关联实体名称) | ||
| 65 | + */ | ||
| 66 | + @GetMapping("/list/detail") | ||
| 67 | + public JsonResult listDetail(@RequestParam(required = false) String year, | ||
| 68 | + @RequestParam String quarter, | ||
| 69 | + @RequestParam String roomGroupId) { | ||
| 70 | + List<CImprovementDetailDTO> detailList = cImprovementService.listDetailByYearQuarterAndRoomGroup(year, quarter, roomGroupId); | ||
| 71 | + return new JsonResult<>(true, "成功", detailList); | ||
| 72 | + } | ||
| 53 | } | 73 | } |
| 1 | package com.qgutech.qgyun.apaas.sync.cps.controller; | 1 | package com.qgutech.qgyun.apaas.sync.cps.controller; |
| 2 | 2 | ||
| 3 | +import com.qgutech.qgyun.apaas.sync.cps.dto.CpsProblemDetailDTO; | ||
| 4 | +import com.qgutech.qgyun.apaas.sync.cps.dto.CpsProblemSourceSummaryDTO; | ||
| 5 | +import com.qgutech.qgyun.apaas.sync.cps.dto.CpsProblemSummaryDTO; | ||
| 3 | import com.qgutech.qgyun.apaas.sync.cps.model.CpsProblem; | 6 | import com.qgutech.qgyun.apaas.sync.cps.model.CpsProblem; |
| 4 | import com.qgutech.qgyun.apaas.sync.cps.service.CpsProblemService; | 7 | import com.qgutech.qgyun.apaas.sync.cps.service.CpsProblemService; |
| 5 | import com.qgutech.qgyun.framework.common.result.JsonResult; | 8 | import com.qgutech.qgyun.framework.common.result.JsonResult; |
| 6 | import lombok.extern.slf4j.Slf4j; | 9 | import lombok.extern.slf4j.Slf4j; |
| 7 | import org.springframework.web.bind.annotation.GetMapping; | 10 | import org.springframework.web.bind.annotation.GetMapping; |
| 8 | import org.springframework.web.bind.annotation.RequestMapping; | 11 | import org.springframework.web.bind.annotation.RequestMapping; |
| 12 | +import org.springframework.web.bind.annotation.RequestParam; | ||
| 9 | import org.springframework.web.bind.annotation.RestController; | 13 | import org.springframework.web.bind.annotation.RestController; |
| 10 | 14 | ||
| 11 | import javax.annotation.Resource; | 15 | import javax.annotation.Resource; |
| @@ -32,4 +36,78 @@ public class CpsProblemController { | @@ -32,4 +36,78 @@ public class CpsProblemController { | ||
| 32 | List<CpsProblem> cpsProblemList = cpsProblemService.listAll(); | 36 | List<CpsProblem> cpsProblemList = cpsProblemService.listAll(); |
| 33 | return new JsonResult<>(true, "成功", cpsProblemList); | 37 | return new JsonResult<>(true, "成功", cpsProblemList); |
| 34 | } | 38 | } |
| 39 | + | ||
| 40 | + /** | ||
| 41 | + * 根据计划解决时间范围汇总各责任单位下各处理状态的问题数 | ||
| 42 | + * <p> | ||
| 43 | + * 开始、结束时间为空时默认使用当前月的开始、结束时间 | ||
| 44 | + * | ||
| 45 | + * @param startTime 开始时间,格式:yyyy-MM-dd [HH:mm:ss],可为空(默认当前月 1 号 00:00:00) | ||
| 46 | + * @param endTime 结束时间,格式:yyyy-MM-dd [HH:mm:ss],可为空(默认当前月最后一天 23:59:59) | ||
| 47 | + * @return 责任单位 + 状态维度的问题数汇总列表 | ||
| 48 | + */ | ||
| 49 | + @GetMapping("/summary/status") | ||
| 50 | + public JsonResult summaryByStatus(@RequestParam(required = false) String startTime, | ||
| 51 | + @RequestParam(required = false) String endTime) { | ||
| 52 | + List<CpsProblemSummaryDTO> summaryList = cpsProblemService.summaryByPlanResolveTime(startTime, endTime); | ||
| 53 | + return new JsonResult<>(true, "成功", summaryList); | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + /** | ||
| 57 | + * 根据计划解决时间范围、责任单位id、问题处理状态查询问题记录明细 | ||
| 58 | + * <p> | ||
| 59 | + * 明细中包含工作单位、责任单位、室组、区域、班组、问题提出人、问题处理人等关联实体名称; | ||
| 60 | + * 开始、结束时间为空时默认使用当前月的开始、结束时间 | ||
| 61 | + * | ||
| 62 | + * @param startTime 开始时间,格式:yyyy-MM-dd [HH:mm:ss],可为空(默认当前月 1 号 00:00:00) | ||
| 63 | + * @param endTime 结束时间,格式:yyyy-MM-dd [HH:mm:ss],可为空(默认当前月最后一天 23:59:59) | ||
| 64 | + * @param wtzrdwId 责任单位id,必传 | ||
| 65 | + * @param status 问题处理状态编号(#1#-待处理;#2#-处理中;#3#-已关闭;#4#-已逾期),必传 | ||
| 66 | + * @return 问题记录明细列表 | ||
| 67 | + */ | ||
| 68 | + @GetMapping("/list/detail") | ||
| 69 | + public JsonResult listDetail(@RequestParam(required = false) String startTime, | ||
| 70 | + @RequestParam(required = false) String endTime, | ||
| 71 | + @RequestParam String wtzrdwId, | ||
| 72 | + @RequestParam String status) { | ||
| 73 | + List<CpsProblemDetailDTO> detailList = cpsProblemService.listDetailByPlanResolveTime( | ||
| 74 | + startTime, endTime, wtzrdwId, status); | ||
| 75 | + return new JsonResult<>(true, "成功", detailList); | ||
| 76 | + } | ||
| 77 | + | ||
| 78 | + /** | ||
| 79 | + * 根据创建时间范围汇总各问题来源对应的问题数 | ||
| 80 | + * <p> | ||
| 81 | + * 开始、结束时间为空时默认使用当前月的开始、结束时间 | ||
| 82 | + * | ||
| 83 | + * @param startTime 开始时间,格式:yyyy-MM-dd [HH:mm:ss],可为空(默认当前月 1 号 00:00:00) | ||
| 84 | + * @param endTime 结束时间,格式:yyyy-MM-dd [HH:mm:ss],可为空(默认当前月最后一天 23:59:59) | ||
| 85 | + * @return 问题来源 + 问题数汇总列表 | ||
| 86 | + */ | ||
| 87 | + @GetMapping("/summary/source") | ||
| 88 | + public JsonResult summaryBySource(@RequestParam(required = false) String startTime, | ||
| 89 | + @RequestParam(required = false) String endTime) { | ||
| 90 | + List<CpsProblemSourceSummaryDTO> summaryList = cpsProblemService.summaryByCreatedAtSource(startTime, endTime); | ||
| 91 | + return new JsonResult<>(true, "成功", summaryList); | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + /** | ||
| 95 | + * 根据创建时间范围、问题来源查询问题记录明细 | ||
| 96 | + * <p> | ||
| 97 | + * 明细中包含工作单位、责任单位、室组、区域、班组、问题提出人、问题处理人等关联实体名称; | ||
| 98 | + * 开始、结束时间为空时默认使用当前月的开始、结束时间 | ||
| 99 | + * | ||
| 100 | + * @param startTime 开始时间,格式:yyyy-MM-dd [HH:mm:ss],可为空(默认当前月 1 号 00:00:00) | ||
| 101 | + * @param endTime 结束时间,格式:yyyy-MM-dd [HH:mm:ss],可为空(默认当前月最后一天 23:59:59) | ||
| 102 | + * @param wtly 问题来源编号(#1#-开班;#2#-过程验证;#3#-过程确认;#4#-体系健康体检;#5#-单位自检),必传 | ||
| 103 | + * @return 问题记录明细列表 | ||
| 104 | + */ | ||
| 105 | + @GetMapping("/list/detail/source") | ||
| 106 | + public JsonResult listDetailBySource(@RequestParam(required = false) String startTime, | ||
| 107 | + @RequestParam(required = false) String endTime, | ||
| 108 | + @RequestParam String wtly) { | ||
| 109 | + List<CpsProblemDetailDTO> detailList = cpsProblemService.listDetailByCreatedAtAndSource( | ||
| 110 | + startTime, endTime, wtly); | ||
| 111 | + return new JsonResult<>(true, "成功", detailList); | ||
| 112 | + } | ||
| 35 | } | 113 | } |
| 1 | +package com.qgutech.qgyun.apaas.sync.cps.dto; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonFormat; | ||
| 4 | +import lombok.Getter; | ||
| 5 | +import lombok.Setter; | ||
| 6 | +import lombok.ToString; | ||
| 7 | +import org.springframework.format.annotation.DateTimeFormat; | ||
| 8 | + | ||
| 9 | +import java.io.Serializable; | ||
| 10 | +import java.util.Date; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * C类改善记录详情(含关联实体名称) | ||
| 14 | + */ | ||
| 15 | +@Getter | ||
| 16 | +@Setter | ||
| 17 | +@ToString | ||
| 18 | +public class CImprovementDetailDTO implements Serializable { | ||
| 19 | + | ||
| 20 | + private static final long serialVersionUID = 1L; | ||
| 21 | + | ||
| 22 | + /* | ||
| 23 | + * 记录ID | ||
| 24 | + */ | ||
| 25 | + private String id; | ||
| 26 | + | ||
| 27 | + /* | ||
| 28 | + * 创建时间 | ||
| 29 | + */ | ||
| 30 | + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||
| 31 | + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||
| 32 | + private Date createdAt; | ||
| 33 | + | ||
| 34 | + /* | ||
| 35 | + * 改善名称 | ||
| 36 | + */ | ||
| 37 | + private String gsmc; | ||
| 38 | + | ||
| 39 | + /* | ||
| 40 | + * 问题编号 | ||
| 41 | + */ | ||
| 42 | + private String wtbh; | ||
| 43 | + | ||
| 44 | + /* | ||
| 45 | + * 来源问题记录id | ||
| 46 | + */ | ||
| 47 | + private String lywt; | ||
| 48 | + | ||
| 49 | + /* | ||
| 50 | + * 问题说明 | ||
| 51 | + */ | ||
| 52 | + private String wtsm; | ||
| 53 | + | ||
| 54 | + /* | ||
| 55 | + * 改善后效果 | ||
| 56 | + */ | ||
| 57 | + private String gshxg; | ||
| 58 | + | ||
| 59 | + /* | ||
| 60 | + * 状态 #1#-草稿;#2#-已提交;#3#-已否决;#4#-已确认; | ||
| 61 | + */ | ||
| 62 | + private String zt; | ||
| 63 | + | ||
| 64 | + /* | ||
| 65 | + * 状态名称(枚举 CImprovementStatusEnum) | ||
| 66 | + */ | ||
| 67 | + private String ztDesc; | ||
| 68 | + | ||
| 69 | + /* | ||
| 70 | + * 是否问题类改善 | ||
| 71 | + */ | ||
| 72 | + private Boolean sfwtlg; | ||
| 73 | + | ||
| 74 | + /* | ||
| 75 | + * 是否是车间班组 | ||
| 76 | + */ | ||
| 77 | + private Boolean sfscjb; | ||
| 78 | + | ||
| 79 | + /* | ||
| 80 | + * 是否推送优秀案例 | ||
| 81 | + */ | ||
| 82 | + private Boolean sftsyxal; | ||
| 83 | + | ||
| 84 | + /* | ||
| 85 | + * 是否推送金点子 | ||
| 86 | + */ | ||
| 87 | + private Boolean sftsjdz; | ||
| 88 | + | ||
| 89 | + /* | ||
| 90 | + * 流程实例ID | ||
| 91 | + */ | ||
| 92 | + private String processInstanceId; | ||
| 93 | + | ||
| 94 | + /* | ||
| 95 | + * 审批状态 | ||
| 96 | + */ | ||
| 97 | + private String approvalStatus; | ||
| 98 | + | ||
| 99 | + /* | ||
| 100 | + * 室组区域名称(原始字段) | ||
| 101 | + */ | ||
| 102 | + private String szqymc; | ||
| 103 | + | ||
| 104 | + /* | ||
| 105 | + * 员工号 | ||
| 106 | + */ | ||
| 107 | + private String ygh; | ||
| 108 | + | ||
| 109 | + // ========== 关联实体ID及名称 ========== | ||
| 110 | + | ||
| 111 | + /* | ||
| 112 | + * 员工id(组织用户) | ||
| 113 | + */ | ||
| 114 | + private String yh; | ||
| 115 | + | ||
| 116 | + /* | ||
| 117 | + * 员工姓名(组织用户) | ||
| 118 | + */ | ||
| 119 | + private String yhName; | ||
| 120 | + | ||
| 121 | + /* | ||
| 122 | + * 发起人id/工号 | ||
| 123 | + */ | ||
| 124 | + private String fqr; | ||
| 125 | + | ||
| 126 | + /* | ||
| 127 | + * 发起人姓名 | ||
| 128 | + */ | ||
| 129 | + private String fqrName; | ||
| 130 | + | ||
| 131 | + /* | ||
| 132 | + * 部门id(组织结构) | ||
| 133 | + */ | ||
| 134 | + private String bm; | ||
| 135 | + | ||
| 136 | + /* | ||
| 137 | + * 部门名称(组织结构) | ||
| 138 | + */ | ||
| 139 | + private String bmName; | ||
| 140 | + | ||
| 141 | + /* | ||
| 142 | + * 室组信息id | ||
| 143 | + */ | ||
| 144 | + private String szmc; | ||
| 145 | + | ||
| 146 | + /* | ||
| 147 | + * 室组名称 | ||
| 148 | + */ | ||
| 149 | + private String szmcName; | ||
| 150 | + | ||
| 151 | + /* | ||
| 152 | + * 室组编号 | ||
| 153 | + */ | ||
| 154 | + private String szbh; | ||
| 155 | + | ||
| 156 | + /* | ||
| 157 | + * 班组信息id | ||
| 158 | + */ | ||
| 159 | + private String bz; | ||
| 160 | + | ||
| 161 | + /* | ||
| 162 | + * 班组名称 | ||
| 163 | + */ | ||
| 164 | + private String bzName; | ||
| 165 | + | ||
| 166 | + /* | ||
| 167 | + * 单位车间id | ||
| 168 | + */ | ||
| 169 | + private String dwcj; | ||
| 170 | + | ||
| 171 | + /* | ||
| 172 | + * 单位车间名称 | ||
| 173 | + */ | ||
| 174 | + private String dwcjName; | ||
| 175 | + | ||
| 176 | + /* | ||
| 177 | + * 单位车间编号 | ||
| 178 | + */ | ||
| 179 | + private String dwcjCode; | ||
| 180 | + | ||
| 181 | + /* | ||
| 182 | + * 区域id | ||
| 183 | + */ | ||
| 184 | + private String szqy; | ||
| 185 | + | ||
| 186 | + /* | ||
| 187 | + * 区域名称 | ||
| 188 | + */ | ||
| 189 | + private String szqyName; | ||
| 190 | + | ||
| 191 | + /* | ||
| 192 | + * 区长确认-组织用户id | ||
| 193 | + */ | ||
| 194 | + private String qzqr; | ||
| 195 | + | ||
| 196 | + /* | ||
| 197 | + * 区长确认-姓名 | ||
| 198 | + */ | ||
| 199 | + private String qzqrName; | ||
| 200 | + | ||
| 201 | + /* | ||
| 202 | + * 改善员确认-组织用户id | ||
| 203 | + */ | ||
| 204 | + private String gsyqr; | ||
| 205 | + | ||
| 206 | + /* | ||
| 207 | + * 改善员确认-姓名 | ||
| 208 | + */ | ||
| 209 | + private String gsyqrName; | ||
| 210 | +} |
| @@ -32,6 +32,12 @@ public class CImprovementSummaryDTO implements Serializable { | @@ -32,6 +32,12 @@ public class CImprovementSummaryDTO implements Serializable { | ||
| 32 | private String szmc; | 32 | private String szmc; |
| 33 | 33 | ||
| 34 | /** | 34 | /** |
| 35 | + * 室组编号 | ||
| 36 | + */ | ||
| 37 | + @ApiModelProperty(value = "室组编号") | ||
| 38 | + private String szbh; | ||
| 39 | + | ||
| 40 | + /** | ||
| 35 | * 所属单位车间编码 | 41 | * 所属单位车间编码 |
| 36 | */ | 42 | */ |
| 37 | @ApiModelProperty(value = "所属单位车间编码") | 43 | @ApiModelProperty(value = "所属单位车间编码") |
| @@ -44,6 +50,12 @@ public class CImprovementSummaryDTO implements Serializable { | @@ -44,6 +50,12 @@ public class CImprovementSummaryDTO implements Serializable { | ||
| 44 | private String dwcjName; | 50 | private String dwcjName; |
| 45 | 51 | ||
| 46 | /** | 52 | /** |
| 53 | + * 所属单位车间编号 | ||
| 54 | + */ | ||
| 55 | + @ApiModelProperty(value = "所属单位车间编号") | ||
| 56 | + private String dwcjCode; | ||
| 57 | + | ||
| 58 | + /** | ||
| 47 | * 年份 | 59 | * 年份 |
| 48 | */ | 60 | */ |
| 49 | @ApiModelProperty(value = "年份") | 61 | @ApiModelProperty(value = "年份") |
| 1 | +package com.qgutech.qgyun.apaas.sync.cps.dto; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonFormat; | ||
| 4 | +import lombok.Getter; | ||
| 5 | +import lombok.Setter; | ||
| 6 | +import lombok.ToString; | ||
| 7 | +import org.springframework.format.annotation.DateTimeFormat; | ||
| 8 | + | ||
| 9 | +import java.io.Serializable; | ||
| 10 | +import java.util.Date; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * CPS问题记录详情(含关联实体名称) | ||
| 14 | + */ | ||
| 15 | +@Getter | ||
| 16 | +@Setter | ||
| 17 | +@ToString | ||
| 18 | +public class CpsProblemDetailDTO implements Serializable { | ||
| 19 | + | ||
| 20 | + private static final long serialVersionUID = 1L; | ||
| 21 | + | ||
| 22 | + /* | ||
| 23 | + * 记录ID | ||
| 24 | + */ | ||
| 25 | + private String id; | ||
| 26 | + | ||
| 27 | + /* | ||
| 28 | + * 创建时间 | ||
| 29 | + */ | ||
| 30 | + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||
| 31 | + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||
| 32 | + private Date createdAt; | ||
| 33 | + | ||
| 34 | + /* | ||
| 35 | + * 问题编号 | ||
| 36 | + */ | ||
| 37 | + private String wtbh; | ||
| 38 | + | ||
| 39 | + /* | ||
| 40 | + * 问题描述 | ||
| 41 | + */ | ||
| 42 | + private String wtms; | ||
| 43 | + | ||
| 44 | + /* | ||
| 45 | + * 问题来源:#1#-开班;#2#-过程验证;#3#-过程确认;#4#-体系健康体检;#5#-单位自检(单位牵头) | ||
| 46 | + */ | ||
| 47 | + private String wtly; | ||
| 48 | + | ||
| 49 | + /* | ||
| 50 | + * 问题来源名称(枚举 WtlyEnum) | ||
| 51 | + */ | ||
| 52 | + private String wtlyDesc; | ||
| 53 | + | ||
| 54 | + /* | ||
| 55 | + * 问题所属板块 | ||
| 56 | + */ | ||
| 57 | + private String wtssbk; | ||
| 58 | + | ||
| 59 | + /* | ||
| 60 | + * 问题类别:#1#-方针展开;#2#-标准化作业;#3#-目视化;#4#-时间数据处理;#5#-过程确认;#6#-持续改善 | ||
| 61 | + */ | ||
| 62 | + private String wtlb; | ||
| 63 | + | ||
| 64 | + /* | ||
| 65 | + * 问题类别名称(枚举 WtlbEnum) | ||
| 66 | + */ | ||
| 67 | + private String wtlbDesc; | ||
| 68 | + | ||
| 69 | + /* | ||
| 70 | + * 问题性质:#1#-无标准;#2#-未执行标准;#3#-标准不足 | ||
| 71 | + */ | ||
| 72 | + private String wtxz; | ||
| 73 | + | ||
| 74 | + /* | ||
| 75 | + * 问题性质名称(枚举 WtxzEnum) | ||
| 76 | + */ | ||
| 77 | + private String wtxzDesc; | ||
| 78 | + | ||
| 79 | + /* | ||
| 80 | + * 6S分类:#1#-整理;#2#-整顿;#3#-清洁;#4#-清扫;#5#-素养;#6#-安全 | ||
| 81 | + */ | ||
| 82 | + private String sfl; | ||
| 83 | + | ||
| 84 | + /* | ||
| 85 | + * 6S分类名称(枚举 SflEnum) | ||
| 86 | + */ | ||
| 87 | + private String sflDesc; | ||
| 88 | + | ||
| 89 | + /* | ||
| 90 | + * 问题层级-#1#-1;#2#-2;#3#-3;#4#-4;#5#-5;#0#-0 | ||
| 91 | + */ | ||
| 92 | + private String mbghlk; | ||
| 93 | + | ||
| 94 | + /* | ||
| 95 | + * 问题层级名称(枚举 MbghlkEnum) | ||
| 96 | + */ | ||
| 97 | + private String mbghlkDesc; | ||
| 98 | + | ||
| 99 | + /* | ||
| 100 | + * 人员类别:#1#-区长;#2#-班长;#3#-高级经理;#4#-经理;#5#-主管;#6#-专家;#7#-一般员工 | ||
| 101 | + */ | ||
| 102 | + private String rylb; | ||
| 103 | + | ||
| 104 | + /* | ||
| 105 | + * 人员类别名称(枚举 RylbEnum) | ||
| 106 | + */ | ||
| 107 | + private String rylbDesc; | ||
| 108 | + | ||
| 109 | + /* | ||
| 110 | + * 问题是否关闭 | ||
| 111 | + */ | ||
| 112 | + private Boolean wtsfgb; | ||
| 113 | + | ||
| 114 | + /* | ||
| 115 | + * 问题附件 | ||
| 116 | + */ | ||
| 117 | + private String wtfj; | ||
| 118 | + | ||
| 119 | + /* | ||
| 120 | + * 问题整改后附件 | ||
| 121 | + */ | ||
| 122 | + private String wtzghfj; | ||
| 123 | + | ||
| 124 | + /* | ||
| 125 | + * 问题解决措施 | ||
| 126 | + */ | ||
| 127 | + private String wtjjcs; | ||
| 128 | + | ||
| 129 | + /* | ||
| 130 | + * 问题处理方式:#1#-自己解决;#2#-工作安排/同级支持;#3#-问题升级至 | ||
| 131 | + */ | ||
| 132 | + private String wtclfs; | ||
| 133 | + | ||
| 134 | + /* | ||
| 135 | + * 问题处理方式名称(枚举 WtclfsEnum) | ||
| 136 | + */ | ||
| 137 | + private String wtclfsDesc; | ||
| 138 | + | ||
| 139 | + /* | ||
| 140 | + * 工作安排/同级支持 | ||
| 141 | + */ | ||
| 142 | + private String gzap; | ||
| 143 | + | ||
| 144 | + /* | ||
| 145 | + * 问题升级至 | ||
| 146 | + */ | ||
| 147 | + private String wtsjz; | ||
| 148 | + | ||
| 149 | + /* | ||
| 150 | + * 问题处理方式2 | ||
| 151 | + */ | ||
| 152 | + private String wtclfs2; | ||
| 153 | + | ||
| 154 | + /* | ||
| 155 | + * 问题处理方式2名称(枚举 WtclfsEnum) | ||
| 156 | + */ | ||
| 157 | + private String wtclfs2Desc; | ||
| 158 | + | ||
| 159 | + /* | ||
| 160 | + * 工作安排/同级支持2 | ||
| 161 | + */ | ||
| 162 | + private String gzap2; | ||
| 163 | + | ||
| 164 | + /* | ||
| 165 | + * 问题升级至2 | ||
| 166 | + */ | ||
| 167 | + private String wtsjz2; | ||
| 168 | + | ||
| 169 | + /* | ||
| 170 | + * 问题处理方式3 | ||
| 171 | + */ | ||
| 172 | + private String wtclfs3; | ||
| 173 | + | ||
| 174 | + /* | ||
| 175 | + * 问题处理方式3名称(枚举 WtclfsEnum) | ||
| 176 | + */ | ||
| 177 | + private String wtclfs3Desc; | ||
| 178 | + | ||
| 179 | + /* | ||
| 180 | + * 工作安排/同级支持3 | ||
| 181 | + */ | ||
| 182 | + private String gzap3; | ||
| 183 | + | ||
| 184 | + /* | ||
| 185 | + * 问题升级至3 | ||
| 186 | + */ | ||
| 187 | + private String wtsjz3; | ||
| 188 | + | ||
| 189 | + /* | ||
| 190 | + * 计划解决时间 | ||
| 191 | + */ | ||
| 192 | + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||
| 193 | + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||
| 194 | + private Date jhjjsj; | ||
| 195 | + | ||
| 196 | + /* | ||
| 197 | + * 问题解决时间 | ||
| 198 | + */ | ||
| 199 | + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||
| 200 | + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||
| 201 | + private Date tntpvy; | ||
| 202 | + | ||
| 203 | + /* | ||
| 204 | + * 流程实例ID | ||
| 205 | + */ | ||
| 206 | + private String processInstanceId; | ||
| 207 | + | ||
| 208 | + /* | ||
| 209 | + * 审批状态 | ||
| 210 | + */ | ||
| 211 | + private String approvalStatus; | ||
| 212 | + | ||
| 213 | + // ========== 关联实体ID及名称 ========== | ||
| 214 | + | ||
| 215 | + /* | ||
| 216 | + * 工作单位id | ||
| 217 | + */ | ||
| 218 | + private String gzdw; | ||
| 219 | + | ||
| 220 | + /* | ||
| 221 | + * 工作单位名称 | ||
| 222 | + */ | ||
| 223 | + private String gzdwName; | ||
| 224 | + | ||
| 225 | + /* | ||
| 226 | + * 工作单位编号 | ||
| 227 | + */ | ||
| 228 | + private String gzdwCode; | ||
| 229 | + | ||
| 230 | + /* | ||
| 231 | + * 问题责任单位id | ||
| 232 | + */ | ||
| 233 | + private String wtzrdw; | ||
| 234 | + | ||
| 235 | + /* | ||
| 236 | + * 问题责任单位名称 | ||
| 237 | + */ | ||
| 238 | + private String wtzrdwName; | ||
| 239 | + | ||
| 240 | + /* | ||
| 241 | + * 问题责任单位编号 | ||
| 242 | + */ | ||
| 243 | + private String wtzrdwCode; | ||
| 244 | + | ||
| 245 | + /* | ||
| 246 | + * 室组id | ||
| 247 | + */ | ||
| 248 | + private String sz; | ||
| 249 | + | ||
| 250 | + /* | ||
| 251 | + * 室组名称 | ||
| 252 | + */ | ||
| 253 | + private String szName; | ||
| 254 | + | ||
| 255 | + /* | ||
| 256 | + * 室组编号 | ||
| 257 | + */ | ||
| 258 | + private String szCode; | ||
| 259 | + | ||
| 260 | + /* | ||
| 261 | + * 区域id | ||
| 262 | + */ | ||
| 263 | + private String qy; | ||
| 264 | + | ||
| 265 | + /* | ||
| 266 | + * 区域名称 | ||
| 267 | + */ | ||
| 268 | + private String qyName; | ||
| 269 | + | ||
| 270 | + /* | ||
| 271 | + * 区域编号 | ||
| 272 | + */ | ||
| 273 | + private String qyCode; | ||
| 274 | + | ||
| 275 | + /* | ||
| 276 | + * 班组id | ||
| 277 | + */ | ||
| 278 | + private String bz; | ||
| 279 | + | ||
| 280 | + /* | ||
| 281 | + * 班组名称 | ||
| 282 | + */ | ||
| 283 | + private String bzName; | ||
| 284 | + | ||
| 285 | + /* | ||
| 286 | + * 班组编号 | ||
| 287 | + */ | ||
| 288 | + private String bzCode; | ||
| 289 | + | ||
| 290 | + /* | ||
| 291 | + * 问题提出人id | ||
| 292 | + */ | ||
| 293 | + private String wttcr; | ||
| 294 | + | ||
| 295 | + /* | ||
| 296 | + * 问题提出人姓名 | ||
| 297 | + */ | ||
| 298 | + private String wttcrName; | ||
| 299 | + | ||
| 300 | + /* | ||
| 301 | + * 问题处理人id | ||
| 302 | + */ | ||
| 303 | + private String wtclr; | ||
| 304 | + | ||
| 305 | + /* | ||
| 306 | + * 问题处理人姓名 | ||
| 307 | + */ | ||
| 308 | + private String wtclrName; | ||
| 309 | + | ||
| 310 | + /* | ||
| 311 | + * 问题处理状态编号 | ||
| 312 | + */ | ||
| 313 | + private String wtclzt; | ||
| 314 | + | ||
| 315 | + /* | ||
| 316 | + * 问题处理状态中文描述 | ||
| 317 | + */ | ||
| 318 | + private String wtclztDesc; | ||
| 319 | +} |
| 1 | +package com.qgutech.qgyun.apaas.sync.cps.dto; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | +import lombok.Setter; | ||
| 5 | +import lombok.ToString; | ||
| 6 | + | ||
| 7 | +import java.io.Serializable; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * CPS问题按问题来源汇总结果 | ||
| 11 | + */ | ||
| 12 | +@Getter | ||
| 13 | +@Setter | ||
| 14 | +@ToString | ||
| 15 | +public class CpsProblemSourceSummaryDTO implements Serializable { | ||
| 16 | + | ||
| 17 | + private static final long serialVersionUID = 1L; | ||
| 18 | + | ||
| 19 | + /* | ||
| 20 | + * 问题来源编号(#1#-开班;#2#-过程验证;#3#-过程确认;#4#-体系健康体检;#5#-单位自检(单位牵头)) | ||
| 21 | + */ | ||
| 22 | + private String wtly; | ||
| 23 | + | ||
| 24 | + /* | ||
| 25 | + * 问题来源中文名称(枚举 WtlyEnum) | ||
| 26 | + */ | ||
| 27 | + private String wtlyDesc; | ||
| 28 | + | ||
| 29 | + /* | ||
| 30 | + * 该问题来源下的问题数 | ||
| 31 | + */ | ||
| 32 | + private Integer count; | ||
| 33 | + | ||
| 34 | + public CpsProblemSourceSummaryDTO() { | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + public CpsProblemSourceSummaryDTO(String wtly, String wtlyDesc, Integer count) { | ||
| 38 | + this.wtly = wtly; | ||
| 39 | + this.wtlyDesc = wtlyDesc; | ||
| 40 | + this.count = count; | ||
| 41 | + } | ||
| 42 | +} |
| 1 | +package com.qgutech.qgyun.apaas.sync.cps.dto; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | +import lombok.Setter; | ||
| 5 | +import lombok.ToString; | ||
| 6 | + | ||
| 7 | +import java.io.Serializable; | ||
| 8 | +import java.util.ArrayList; | ||
| 9 | +import java.util.List; | ||
| 10 | + | ||
| 11 | +/** | ||
| 12 | + * CPS问题汇总结果(按责任单位 + 处理状态维度) | ||
| 13 | + */ | ||
| 14 | +@Getter | ||
| 15 | +@Setter | ||
| 16 | +@ToString | ||
| 17 | +public class CpsProblemSummaryDTO implements Serializable { | ||
| 18 | + | ||
| 19 | + private static final long serialVersionUID = 1L; | ||
| 20 | + | ||
| 21 | + /* | ||
| 22 | + * 责任单位id | ||
| 23 | + */ | ||
| 24 | + private String wtzrdw; | ||
| 25 | + | ||
| 26 | + /* | ||
| 27 | + * 责任单位名称 | ||
| 28 | + */ | ||
| 29 | + private String wtzrdwName; | ||
| 30 | + | ||
| 31 | + /* | ||
| 32 | + * 责任单位编号 | ||
| 33 | + */ | ||
| 34 | + private String wtzrdwCode; | ||
| 35 | + | ||
| 36 | + /* | ||
| 37 | + * 该责任单位下问题总数 | ||
| 38 | + */ | ||
| 39 | + private Integer totalCount; | ||
| 40 | + | ||
| 41 | + /* | ||
| 42 | + * 各处理状态下的问题数明细 | ||
| 43 | + */ | ||
| 44 | + private List<StatusCount> statusCounts = new ArrayList<>(); | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * 状态计数明细 | ||
| 48 | + */ | ||
| 49 | + @Getter | ||
| 50 | + @Setter | ||
| 51 | + @ToString | ||
| 52 | + public static class StatusCount implements Serializable { | ||
| 53 | + | ||
| 54 | + private static final long serialVersionUID = 1L; | ||
| 55 | + | ||
| 56 | + /* | ||
| 57 | + * 状态编号(#1#-待处理;#2#-处理中;#3#-已关闭;#4#-已逾期) | ||
| 58 | + */ | ||
| 59 | + private String statusCode; | ||
| 60 | + | ||
| 61 | + /* | ||
| 62 | + * 状态中文描述 | ||
| 63 | + */ | ||
| 64 | + private String statusDesc; | ||
| 65 | + | ||
| 66 | + /* | ||
| 67 | + * 该状态下的问题数 | ||
| 68 | + */ | ||
| 69 | + private Integer count; | ||
| 70 | + | ||
| 71 | + public StatusCount() { | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + public StatusCount(String statusCode, String statusDesc, Integer count) { | ||
| 75 | + this.statusCode = statusCode; | ||
| 76 | + this.statusDesc = statusDesc; | ||
| 77 | + this.count = count; | ||
| 78 | + } | ||
| 79 | + } | ||
| 80 | +} |
| 1 | +package com.qgutech.qgyun.apaas.sync.cps.enums; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * C类改善状态枚举 | ||
| 7 | + * <p> | ||
| 8 | + * 数据库字段 zt 存储编号:#1#-草稿,#2#-已提交,#3#-已否决,#4#-已确认 | ||
| 9 | + */ | ||
| 10 | +@Getter | ||
| 11 | +public enum CImprovementStatusEnum { | ||
| 12 | + | ||
| 13 | + /** | ||
| 14 | + * 草稿 | ||
| 15 | + */ | ||
| 16 | + DRAFT("#1#", "草稿"), | ||
| 17 | + | ||
| 18 | + /** | ||
| 19 | + * 已提交 | ||
| 20 | + */ | ||
| 21 | + SUBMITTED("#2#", "已提交"), | ||
| 22 | + | ||
| 23 | + /** | ||
| 24 | + * 已否决 | ||
| 25 | + */ | ||
| 26 | + REJECTED("#3#", "已否决"), | ||
| 27 | + | ||
| 28 | + /** | ||
| 29 | + * 已确认 | ||
| 30 | + */ | ||
| 31 | + CONFIRMED("#4#", "已确认"); | ||
| 32 | + | ||
| 33 | + /** | ||
| 34 | + * 数据库中存储的编号 | ||
| 35 | + */ | ||
| 36 | + private final String code; | ||
| 37 | + | ||
| 38 | + /** | ||
| 39 | + * 中文描述 | ||
| 40 | + */ | ||
| 41 | + private final String desc; | ||
| 42 | + | ||
| 43 | + CImprovementStatusEnum(String code, String desc) { | ||
| 44 | + this.code = code; | ||
| 45 | + this.desc = desc; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + /** | ||
| 49 | + * 根据编号获取枚举 | ||
| 50 | + * | ||
| 51 | + * @param code 编号 | ||
| 52 | + * @return 枚举实例,未找到返回 null | ||
| 53 | + */ | ||
| 54 | + public static CImprovementStatusEnum fromCode(String code) { | ||
| 55 | + if (code == null) { | ||
| 56 | + return null; | ||
| 57 | + } | ||
| 58 | + for (CImprovementStatusEnum status : values()) { | ||
| 59 | + if (status.code.equals(code)) { | ||
| 60 | + return status; | ||
| 61 | + } | ||
| 62 | + } | ||
| 63 | + if (!code.startsWith("#")) { | ||
| 64 | + String wrapped = "#" + code + "#"; | ||
| 65 | + for (CImprovementStatusEnum status : values()) { | ||
| 66 | + if (status.code.equals(wrapped)) { | ||
| 67 | + return status; | ||
| 68 | + } | ||
| 69 | + } | ||
| 70 | + } | ||
| 71 | + return null; | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + /** | ||
| 75 | + * 根据编号获取中文描述 | ||
| 76 | + * | ||
| 77 | + * @param code 编号 | ||
| 78 | + * @return 中文描述,未找到返回原编号 | ||
| 79 | + */ | ||
| 80 | + public static String getDescByCode(String code) { | ||
| 81 | + CImprovementStatusEnum status = fromCode(code); | ||
| 82 | + return status != null ? status.getDesc() : code; | ||
| 83 | + } | ||
| 84 | +} |
| 1 | +package com.qgutech.qgyun.apaas.sync.cps.enums; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 问题层级枚举 | ||
| 7 | + * <p> | ||
| 8 | + * 数据库字段 mbghlk 存储编号: | ||
| 9 | + * #0#-0,#1#-1,#2#-2,#3#-3,#4#-4,#5#-5 | ||
| 10 | + */ | ||
| 11 | +@Getter | ||
| 12 | +public enum MbghlkEnum { | ||
| 13 | + | ||
| 14 | + LEVEL_0("#0#", "0"), | ||
| 15 | + LEVEL_1("#1#", "1"), | ||
| 16 | + LEVEL_2("#2#", "2"), | ||
| 17 | + LEVEL_3("#3#", "3"), | ||
| 18 | + LEVEL_4("#4#", "4"), | ||
| 19 | + LEVEL_5("#5#", "5"); | ||
| 20 | + | ||
| 21 | + private final String code; | ||
| 22 | + private final String desc; | ||
| 23 | + | ||
| 24 | + MbghlkEnum(String code, String desc) { | ||
| 25 | + this.code = code; | ||
| 26 | + this.desc = desc; | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + public static MbghlkEnum fromCode(String code) { | ||
| 30 | + if (code == null) { | ||
| 31 | + return null; | ||
| 32 | + } | ||
| 33 | + for (MbghlkEnum item : values()) { | ||
| 34 | + if (item.code.equals(code)) { | ||
| 35 | + return item; | ||
| 36 | + } | ||
| 37 | + } | ||
| 38 | + if (!code.startsWith("#")) { | ||
| 39 | + String wrapped = "#" + code + "#"; | ||
| 40 | + for (MbghlkEnum item : values()) { | ||
| 41 | + if (item.code.equals(wrapped)) { | ||
| 42 | + return item; | ||
| 43 | + } | ||
| 44 | + } | ||
| 45 | + } | ||
| 46 | + return null; | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + public static String getDescByCode(String code) { | ||
| 50 | + MbghlkEnum item = fromCode(code); | ||
| 51 | + return item != null ? item.getDesc() : code; | ||
| 52 | + } | ||
| 53 | +} |
| @@ -70,6 +70,15 @@ public enum QuarterEnum { | @@ -70,6 +70,15 @@ public enum QuarterEnum { | ||
| 70 | return quarter; | 70 | return quarter; |
| 71 | } | 71 | } |
| 72 | } | 72 | } |
| 73 | + if (!code.startsWith("#")) { | ||
| 74 | + code = "#" + code + "#"; | ||
| 75 | + for (QuarterEnum quarter : values()) { | ||
| 76 | + if (quarter.code.equals(code)) { | ||
| 77 | + return quarter; | ||
| 78 | + } | ||
| 79 | + } | ||
| 80 | + } | ||
| 81 | + | ||
| 73 | return null; | 82 | return null; |
| 74 | } | 83 | } |
| 75 | } | 84 | } |
| 1 | +package com.qgutech.qgyun.apaas.sync.cps.enums; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 人员类别枚举 | ||
| 7 | + * <p> | ||
| 8 | + * 数据库字段 rylb 存储编号: | ||
| 9 | + * #1#-区长,#2#-班长,#3#-高级经理,#4#-经理,#5#-主管,#6#-专家,#7#-一般员工 | ||
| 10 | + */ | ||
| 11 | +@Getter | ||
| 12 | +public enum RylbEnum { | ||
| 13 | + | ||
| 14 | + QUZHANG("#1#", "区长"), | ||
| 15 | + BANZHANG("#2#", "班长"), | ||
| 16 | + GAOJI_JINGLI("#3#", "高级经理"), | ||
| 17 | + JINGLI("#4#", "经理"), | ||
| 18 | + ZHUGUAN("#5#", "主管"), | ||
| 19 | + ZHUANJIA("#6#", "专家"), | ||
| 20 | + YIBAN_YUANGONG("#7#", "一般员工"); | ||
| 21 | + | ||
| 22 | + private final String code; | ||
| 23 | + private final String desc; | ||
| 24 | + | ||
| 25 | + RylbEnum(String code, String desc) { | ||
| 26 | + this.code = code; | ||
| 27 | + this.desc = desc; | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | + public static RylbEnum fromCode(String code) { | ||
| 31 | + if (code == null) { | ||
| 32 | + return null; | ||
| 33 | + } | ||
| 34 | + for (RylbEnum item : values()) { | ||
| 35 | + if (item.code.equals(code)) { | ||
| 36 | + return item; | ||
| 37 | + } | ||
| 38 | + } | ||
| 39 | + if (!code.startsWith("#")) { | ||
| 40 | + String wrapped = "#" + code + "#"; | ||
| 41 | + for (RylbEnum item : values()) { | ||
| 42 | + if (item.code.equals(wrapped)) { | ||
| 43 | + return item; | ||
| 44 | + } | ||
| 45 | + } | ||
| 46 | + } | ||
| 47 | + return null; | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + public static String getDescByCode(String code) { | ||
| 51 | + RylbEnum item = fromCode(code); | ||
| 52 | + return item != null ? item.getDesc() : code; | ||
| 53 | + } | ||
| 54 | +} |
| 1 | +package com.qgutech.qgyun.apaas.sync.cps.enums; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 6S分类枚举 | ||
| 7 | + * <p> | ||
| 8 | + * 数据库字段 sfl 存储编号: | ||
| 9 | + * #1#-整理,#2#-整顿,#3#-清洁,#4#-清扫,#5#-素养,#6#-安全 | ||
| 10 | + */ | ||
| 11 | +@Getter | ||
| 12 | +public enum SflEnum { | ||
| 13 | + | ||
| 14 | + ZHENGLI("#1#", "整理"), | ||
| 15 | + ZHENDUN("#2#", "整顿"), | ||
| 16 | + QINGJIE("#3#", "清洁"), | ||
| 17 | + QINGSAO("#4#", "清扫"), | ||
| 18 | + SUYANG("#5#", "素养"), | ||
| 19 | + ANQUAN("#6#", "安全"); | ||
| 20 | + | ||
| 21 | + private final String code; | ||
| 22 | + private final String desc; | ||
| 23 | + | ||
| 24 | + SflEnum(String code, String desc) { | ||
| 25 | + this.code = code; | ||
| 26 | + this.desc = desc; | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + public static SflEnum fromCode(String code) { | ||
| 30 | + if (code == null) { | ||
| 31 | + return null; | ||
| 32 | + } | ||
| 33 | + for (SflEnum item : values()) { | ||
| 34 | + if (item.code.equals(code)) { | ||
| 35 | + return item; | ||
| 36 | + } | ||
| 37 | + } | ||
| 38 | + if (!code.startsWith("#")) { | ||
| 39 | + String wrapped = "#" + code + "#"; | ||
| 40 | + for (SflEnum item : values()) { | ||
| 41 | + if (item.code.equals(wrapped)) { | ||
| 42 | + return item; | ||
| 43 | + } | ||
| 44 | + } | ||
| 45 | + } | ||
| 46 | + return null; | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + public static String getDescByCode(String code) { | ||
| 50 | + SflEnum item = fromCode(code); | ||
| 51 | + return item != null ? item.getDesc() : code; | ||
| 52 | + } | ||
| 53 | +} |
| @@ -58,6 +58,14 @@ public enum WorkshopStatusEnum { | @@ -58,6 +58,14 @@ public enum WorkshopStatusEnum { | ||
| 58 | return status; | 58 | return status; |
| 59 | } | 59 | } |
| 60 | } | 60 | } |
| 61 | + if (!code.startsWith("#")) { | ||
| 62 | + code = "#" + code + "#"; | ||
| 63 | + for (WorkshopStatusEnum status : values()) { | ||
| 64 | + if (status.code.equals(code)) { | ||
| 65 | + return status; | ||
| 66 | + } | ||
| 67 | + } | ||
| 68 | + } | ||
| 61 | return null; | 69 | return null; |
| 62 | } | 70 | } |
| 63 | 71 |
| 1 | +package com.qgutech.qgyun.apaas.sync.cps.enums; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 问题处理方式枚举 | ||
| 7 | + * <p> | ||
| 8 | + * 数据库字段 wtclfs / wtclfs2 / wtclfs3 存储编号: | ||
| 9 | + * #1#-自己解决,#2#-工作安排/同级支持,#3#-问题升级至 | ||
| 10 | + */ | ||
| 11 | +@Getter | ||
| 12 | +public enum WtclfsEnum { | ||
| 13 | + | ||
| 14 | + ZIJI_JIEJUE("#1#", "自己解决"), | ||
| 15 | + GONGZUO_ANPAI("#2#", "工作安排/同级支持"), | ||
| 16 | + WENTI_SHENGJI("#3#", "问题升级至"); | ||
| 17 | + | ||
| 18 | + private final String code; | ||
| 19 | + private final String desc; | ||
| 20 | + | ||
| 21 | + WtclfsEnum(String code, String desc) { | ||
| 22 | + this.code = code; | ||
| 23 | + this.desc = desc; | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + public static WtclfsEnum fromCode(String code) { | ||
| 27 | + if (code == null) { | ||
| 28 | + return null; | ||
| 29 | + } | ||
| 30 | + for (WtclfsEnum item : values()) { | ||
| 31 | + if (item.code.equals(code)) { | ||
| 32 | + return item; | ||
| 33 | + } | ||
| 34 | + } | ||
| 35 | + if (!code.startsWith("#")) { | ||
| 36 | + String wrapped = "#" + code + "#"; | ||
| 37 | + for (WtclfsEnum item : values()) { | ||
| 38 | + if (item.code.equals(wrapped)) { | ||
| 39 | + return item; | ||
| 40 | + } | ||
| 41 | + } | ||
| 42 | + } | ||
| 43 | + return null; | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + public static String getDescByCode(String code) { | ||
| 47 | + WtclfsEnum item = fromCode(code); | ||
| 48 | + return item != null ? item.getDesc() : code; | ||
| 49 | + } | ||
| 50 | +} |
| 1 | +package com.qgutech.qgyun.apaas.sync.cps.enums; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 问题处理状态枚举 | ||
| 7 | + * <p> | ||
| 8 | + * 数据库字段 wtclzt 存储编号:#1#-待处理,#2#-处理中,#3#-已关闭,#4#-已逾期 | ||
| 9 | + */ | ||
| 10 | +@Getter | ||
| 11 | +public enum WtclztEnum { | ||
| 12 | + | ||
| 13 | + /** | ||
| 14 | + * 待处理 | ||
| 15 | + */ | ||
| 16 | + PENDING("#1#", "待处理"), | ||
| 17 | + | ||
| 18 | + /** | ||
| 19 | + * 处理中 | ||
| 20 | + */ | ||
| 21 | + PROCESSING("#2#", "处理中"), | ||
| 22 | + | ||
| 23 | + /** | ||
| 24 | + * 已关闭 | ||
| 25 | + */ | ||
| 26 | + CLOSED("#3#", "已关闭"), | ||
| 27 | + | ||
| 28 | + /** | ||
| 29 | + * 已逾期 | ||
| 30 | + */ | ||
| 31 | + OVERDUE("#4#", "已逾期"); | ||
| 32 | + | ||
| 33 | + /** | ||
| 34 | + * 数据库中存储的编号 | ||
| 35 | + */ | ||
| 36 | + private final String code; | ||
| 37 | + | ||
| 38 | + /** | ||
| 39 | + * 中文描述 | ||
| 40 | + */ | ||
| 41 | + private final String desc; | ||
| 42 | + | ||
| 43 | + WtclztEnum(String code, String desc) { | ||
| 44 | + this.code = code; | ||
| 45 | + this.desc = desc; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + /** | ||
| 49 | + * 根据编号获取枚举 | ||
| 50 | + * | ||
| 51 | + * @param code 编号 | ||
| 52 | + * @return 枚举实例,未找到返回 null | ||
| 53 | + */ | ||
| 54 | + public static WtclztEnum fromCode(String code) { | ||
| 55 | + if (code == null) { | ||
| 56 | + return null; | ||
| 57 | + } | ||
| 58 | + for (WtclztEnum status : values()) { | ||
| 59 | + if (status.code.equals(code)) { | ||
| 60 | + return status; | ||
| 61 | + } | ||
| 62 | + } | ||
| 63 | + if (!code.startsWith("#")) { | ||
| 64 | + String wrapped = "#" + code + "#"; | ||
| 65 | + for (WtclztEnum status : values()) { | ||
| 66 | + if (status.code.equals(wrapped)) { | ||
| 67 | + return status; | ||
| 68 | + } | ||
| 69 | + } | ||
| 70 | + } | ||
| 71 | + return null; | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + /** | ||
| 75 | + * 根据编号获取中文描述 | ||
| 76 | + * | ||
| 77 | + * @param code 编号 | ||
| 78 | + * @return 中文描述,未找到返回原编号 | ||
| 79 | + */ | ||
| 80 | + public static String getDescByCode(String code) { | ||
| 81 | + WtclztEnum status = fromCode(code); | ||
| 82 | + return status != null ? status.getDesc() : code; | ||
| 83 | + } | ||
| 84 | +} |
| 1 | +package com.qgutech.qgyun.apaas.sync.cps.enums; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 问题类别枚举 | ||
| 7 | + * <p> | ||
| 8 | + * 数据库字段 wtlb 存储编号: | ||
| 9 | + * #1#-方针展开,#2#-标准化作业,#3#-目视化,#4#-时间数据处理,#5#-过程确认,#6#-持续改善 | ||
| 10 | + */ | ||
| 11 | +@Getter | ||
| 12 | +public enum WtlbEnum { | ||
| 13 | + | ||
| 14 | + FANGZHEN_ZHANKAI("#1#", "方针展开"), | ||
| 15 | + BIAOZHUNHUA_ZUOYE("#2#", "标准化作业"), | ||
| 16 | + MUSHIHUA("#3#", "目视化"), | ||
| 17 | + SHIJIAN_SHUJU_CHULI("#4#", "时间数据处理"), | ||
| 18 | + GUOCHENG_QUEREN("#5#", "过程确认"), | ||
| 19 | + CHIXU_GAISHAN("#6#", "持续改善"); | ||
| 20 | + | ||
| 21 | + private final String code; | ||
| 22 | + private final String desc; | ||
| 23 | + | ||
| 24 | + WtlbEnum(String code, String desc) { | ||
| 25 | + this.code = code; | ||
| 26 | + this.desc = desc; | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + public static WtlbEnum fromCode(String code) { | ||
| 30 | + if (code == null) { | ||
| 31 | + return null; | ||
| 32 | + } | ||
| 33 | + for (WtlbEnum item : values()) { | ||
| 34 | + if (item.code.equals(code)) { | ||
| 35 | + return item; | ||
| 36 | + } | ||
| 37 | + } | ||
| 38 | + if (!code.startsWith("#")) { | ||
| 39 | + String wrapped = "#" + code + "#"; | ||
| 40 | + for (WtlbEnum item : values()) { | ||
| 41 | + if (item.code.equals(wrapped)) { | ||
| 42 | + return item; | ||
| 43 | + } | ||
| 44 | + } | ||
| 45 | + } | ||
| 46 | + return null; | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + public static String getDescByCode(String code) { | ||
| 50 | + WtlbEnum item = fromCode(code); | ||
| 51 | + return item != null ? item.getDesc() : code; | ||
| 52 | + } | ||
| 53 | +} |
| 1 | +package com.qgutech.qgyun.apaas.sync.cps.enums; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 问题来源枚举 | ||
| 7 | + * <p> | ||
| 8 | + * 数据库字段 wtly 存储编号: | ||
| 9 | + * #1#-开班,#2#-过程验证,#3#-过程确认,#4#-体系健康体检,#5#-单位自检(单位牵头) | ||
| 10 | + */ | ||
| 11 | +@Getter | ||
| 12 | +public enum WtlyEnum { | ||
| 13 | + | ||
| 14 | + /** | ||
| 15 | + * 开班 | ||
| 16 | + */ | ||
| 17 | + KAIBAN("#1#", "开班"), | ||
| 18 | + | ||
| 19 | + /** | ||
| 20 | + * 过程验证 | ||
| 21 | + */ | ||
| 22 | + GUOCHENG_YANZHENG("#2#", "过程验证"), | ||
| 23 | + | ||
| 24 | + /** | ||
| 25 | + * 过程确认 | ||
| 26 | + */ | ||
| 27 | + GUOCHENG_QUEREN("#3#", "过程确认"), | ||
| 28 | + | ||
| 29 | + /** | ||
| 30 | + * 体系健康体检 | ||
| 31 | + */ | ||
| 32 | + TIXI_JIANKANG_TIJIAN("#4#", "体系健康体检"), | ||
| 33 | + | ||
| 34 | + /** | ||
| 35 | + * 单位自检(单位牵头) | ||
| 36 | + */ | ||
| 37 | + DANWEI_ZIJIAN("#5#", "单位自检(单位牵头)"); | ||
| 38 | + | ||
| 39 | + private final String code; | ||
| 40 | + private final String desc; | ||
| 41 | + | ||
| 42 | + WtlyEnum(String code, String desc) { | ||
| 43 | + this.code = code; | ||
| 44 | + this.desc = desc; | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + public static WtlyEnum fromCode(String code) { | ||
| 48 | + if (code == null) { | ||
| 49 | + return null; | ||
| 50 | + } | ||
| 51 | + for (WtlyEnum item : values()) { | ||
| 52 | + if (item.code.equals(code)) { | ||
| 53 | + return item; | ||
| 54 | + } | ||
| 55 | + } | ||
| 56 | + if (!code.startsWith("#")) { | ||
| 57 | + String wrapped = "#" + code + "#"; | ||
| 58 | + for (WtlyEnum item : values()) { | ||
| 59 | + if (item.code.equals(wrapped)) { | ||
| 60 | + return item; | ||
| 61 | + } | ||
| 62 | + } | ||
| 63 | + } | ||
| 64 | + return null; | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + public static String getDescByCode(String code) { | ||
| 68 | + WtlyEnum item = fromCode(code); | ||
| 69 | + return item != null ? item.getDesc() : code; | ||
| 70 | + } | ||
| 71 | +} |
| 1 | +package com.qgutech.qgyun.apaas.sync.cps.enums; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 问题性质枚举 | ||
| 7 | + * <p> | ||
| 8 | + * 数据库字段 wtxz 存储编号: | ||
| 9 | + * #1#-无标准,#2#-未执行标准,#3#-标准不足 | ||
| 10 | + */ | ||
| 11 | +@Getter | ||
| 12 | +public enum WtxzEnum { | ||
| 13 | + | ||
| 14 | + WU_BIAOZHUN("#1#", "无标准"), | ||
| 15 | + WEI_ZHIXING_BIAOZHUN("#2#", "未执行标准"), | ||
| 16 | + BIAOZHUN_BUZU("#3#", "标准不足"); | ||
| 17 | + | ||
| 18 | + private final String code; | ||
| 19 | + private final String desc; | ||
| 20 | + | ||
| 21 | + WtxzEnum(String code, String desc) { | ||
| 22 | + this.code = code; | ||
| 23 | + this.desc = desc; | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + public static WtxzEnum fromCode(String code) { | ||
| 27 | + if (code == null) { | ||
| 28 | + return null; | ||
| 29 | + } | ||
| 30 | + for (WtxzEnum item : values()) { | ||
| 31 | + if (item.code.equals(code)) { | ||
| 32 | + return item; | ||
| 33 | + } | ||
| 34 | + } | ||
| 35 | + if (!code.startsWith("#")) { | ||
| 36 | + String wrapped = "#" + code + "#"; | ||
| 37 | + for (WtxzEnum item : values()) { | ||
| 38 | + if (item.code.equals(wrapped)) { | ||
| 39 | + return item; | ||
| 40 | + } | ||
| 41 | + } | ||
| 42 | + } | ||
| 43 | + return null; | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + public static String getDescByCode(String code) { | ||
| 47 | + WtxzEnum item = fromCode(code); | ||
| 48 | + return item != null ? item.getDesc() : code; | ||
| 49 | + } | ||
| 50 | +} |
| 1 | package com.qgutech.qgyun.apaas.sync.cps.model; | 1 | package com.qgutech.qgyun.apaas.sync.cps.model; |
| 2 | 2 | ||
| 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | ||
| 6 | import lombok.Getter; | 4 | import lombok.Getter; |
| 7 | import lombok.Setter; | 5 | import lombok.Setter; |
| 8 | import lombok.ToString; | 6 | import lombok.ToString; |
| 1 | package com.qgutech.qgyun.apaas.sync.cps.model; | 1 | package com.qgutech.qgyun.apaas.sync.cps.model; |
| 2 | 2 | ||
| 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | ||
| 6 | import lombok.Getter; | 4 | import lombok.Getter; |
| 7 | import lombok.Setter; | 5 | import lombok.Setter; |
| 8 | import lombok.ToString; | 6 | import lombok.ToString; |
| @@ -15,28 +13,41 @@ import javax.persistence.Table; | @@ -15,28 +13,41 @@ import javax.persistence.Table; | ||
| 15 | @Getter | 13 | @Getter |
| 16 | @Setter | 14 | @Setter |
| 17 | @ToString | 15 | @ToString |
| 18 | -@ApiModel(value = "Area", description = "区域信息") | ||
| 19 | @Table(name = "t_auto_hfca_ixzvok_cnfeci") | 16 | @Table(name = "t_auto_hfca_ixzvok_cnfeci") |
| 20 | public class Area extends BaseCorpModel { | 17 | public class Area extends BaseCorpModel { |
| 21 | 18 | ||
| 22 | - @ApiModelProperty(value = "区域名称") | 19 | + /* |
| 20 | + * 区域名称 | ||
| 21 | + */ | ||
| 23 | private String qymc; | 22 | private String qymc; |
| 24 | 23 | ||
| 25 | - @ApiModelProperty(value = "区域编号") | 24 | + /* |
| 25 | + * 区域编号 | ||
| 26 | + */ | ||
| 26 | private String qybh; | 27 | private String qybh; |
| 27 | 28 | ||
| 28 | - @ApiModelProperty(value = "区域负责人") | 29 | + /* |
| 30 | + * 区域负责人 | ||
| 31 | + */ | ||
| 29 | private String qyfzr; | 32 | private String qyfzr; |
| 30 | 33 | ||
| 31 | - @ApiModelProperty(value = "所属车间") | 34 | + /* |
| 35 | + * 所属车间 | ||
| 36 | + */ | ||
| 32 | private String sscj; | 37 | private String sscj; |
| 33 | 38 | ||
| 34 | - @ApiModelProperty(value = "所属室组") | 39 | + /* |
| 40 | + * 所属室组 | ||
| 41 | + */ | ||
| 35 | private String sssz; | 42 | private String sssz; |
| 36 | 43 | ||
| 37 | - @ApiModelProperty(value = "所属组织") | 44 | + /* |
| 45 | + * 所属组织 | ||
| 46 | + */ | ||
| 38 | private String sszz; | 47 | private String sszz; |
| 39 | 48 | ||
| 40 | - @ApiModelProperty(value = "状态") | 49 | + /* |
| 50 | + * 状态 | ||
| 51 | + */ | ||
| 41 | private String zt; | 52 | private String zt; |
| 42 | } | 53 | } |
| 1 | package com.qgutech.qgyun.apaas.sync.cps.model; | 1 | package com.qgutech.qgyun.apaas.sync.cps.model; |
| 2 | 2 | ||
| 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | ||
| 6 | import lombok.Getter; | 4 | import lombok.Getter; |
| 7 | import lombok.Setter; | 5 | import lombok.Setter; |
| 8 | import lombok.ToString; | 6 | import lombok.ToString; |
| @@ -15,16 +13,14 @@ import javax.persistence.Table; | @@ -15,16 +13,14 @@ import javax.persistence.Table; | ||
| 15 | @Getter | 13 | @Getter |
| 16 | @Setter | 14 | @Setter |
| 17 | @ToString | 15 | @ToString |
| 18 | -@ApiModel(value = "CImprovement", description = "C类改善") | ||
| 19 | @Table(name = "t_auto_hfca_ixzvok_clgsgl") | 16 | @Table(name = "t_auto_hfca_ixzvok_clgsgl") |
| 20 | public class CImprovement extends BaseCorpModel { | 17 | public class CImprovement extends BaseCorpModel { |
| 21 | 18 | ||
| 22 | - @ApiModelProperty(value = "yh") | ||
| 23 | - private String yh; | 19 | + public static final String FQR = "fqr"; |
| 24 | 20 | ||
| 25 | - /* | ||
| 26 | - * 员工号 | ||
| 27 | - */ | 21 | + /* |
| 22 | + * 员工号 | ||
| 23 | + */ | ||
| 28 | private String ygh; | 24 | private String ygh; |
| 29 | 25 | ||
| 30 | /* | 26 | /* |
| @@ -42,11 +38,8 @@ public class CImprovement extends BaseCorpModel { | @@ -42,11 +38,8 @@ public class CImprovement extends BaseCorpModel { | ||
| 42 | */ | 38 | */ |
| 43 | private String bm; | 39 | private String bm; |
| 44 | 40 | ||
| 45 | - @ApiModelProperty(value = "szqymc") | ||
| 46 | - private String szqymc; | ||
| 47 | - | ||
| 48 | /* | 41 | /* |
| 49 | - *是否问题类改善 | 42 | + * 是否问题类改善 |
| 50 | */ | 43 | */ |
| 51 | private Boolean sfwtlg; | 44 | private Boolean sfwtlg; |
| 52 | 45 | ||
| @@ -71,7 +64,7 @@ public class CImprovement extends BaseCorpModel { | @@ -71,7 +64,7 @@ public class CImprovement extends BaseCorpModel { | ||
| 71 | private String qzqr; | 64 | private String qzqr; |
| 72 | 65 | ||
| 73 | /* | 66 | /* |
| 74 | - *改善员确认-组织用户id | 67 | + * 改善员确认-组织用户id |
| 75 | */ | 68 | */ |
| 76 | private String gsyqr; | 69 | private String gsyqr; |
| 77 | 70 | ||
| @@ -81,7 +74,7 @@ public class CImprovement extends BaseCorpModel { | @@ -81,7 +74,7 @@ public class CImprovement extends BaseCorpModel { | ||
| 81 | private Boolean sftsyxal; | 74 | private Boolean sftsyxal; |
| 82 | 75 | ||
| 83 | /* | 76 | /* |
| 84 | - * 状态 | 77 | + * 状态 #1#-草稿;#2#-已提交;#3#-已否决;#4#-已确认; |
| 85 | */ | 78 | */ |
| 86 | private String zt; | 79 | private String zt; |
| 87 | 80 | ||
| @@ -105,10 +98,14 @@ public class CImprovement extends BaseCorpModel { | @@ -105,10 +98,14 @@ public class CImprovement extends BaseCorpModel { | ||
| 105 | */ | 98 | */ |
| 106 | private String szmc; | 99 | private String szmc; |
| 107 | 100 | ||
| 108 | - @ApiModelProperty(value = "流程实例ID") | 101 | + /* |
| 102 | + * 流程实例ID | ||
| 103 | + */ | ||
| 109 | private String processInstanceId; | 104 | private String processInstanceId; |
| 110 | 105 | ||
| 111 | - @ApiModelProperty(value = "审批状态") | 106 | + /* |
| 107 | + * 审批状态 | ||
| 108 | + */ | ||
| 112 | private String approvalStatus; | 109 | private String approvalStatus; |
| 113 | 110 | ||
| 114 | /* | 111 | /* |
| 1 | package com.qgutech.qgyun.apaas.sync.cps.model; | 1 | package com.qgutech.qgyun.apaas.sync.cps.model; |
| 2 | 2 | ||
| 3 | - | ||
| 4 | import com.fasterxml.jackson.annotation.JsonFormat; | 3 | import com.fasterxml.jackson.annotation.JsonFormat; |
| 5 | -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
| 6 | -import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
| 7 | -import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; | ||
| 8 | -import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; | ||
| 9 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 4 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 10 | import lombok.Getter; | 5 | import lombok.Getter; |
| 11 | import lombok.Setter; | 6 | import lombok.Setter; |
| @@ -13,7 +8,6 @@ import lombok.ToString; | @@ -13,7 +8,6 @@ import lombok.ToString; | ||
| 13 | import org.springframework.format.annotation.DateTimeFormat; | 8 | import org.springframework.format.annotation.DateTimeFormat; |
| 14 | 9 | ||
| 15 | import javax.persistence.Table; | 10 | import javax.persistence.Table; |
| 16 | -import java.time.LocalDateTime; | ||
| 17 | import java.util.Date; | 11 | import java.util.Date; |
| 18 | 12 | ||
| 19 | /** | 13 | /** |
| @@ -25,6 +19,10 @@ import java.util.Date; | @@ -25,6 +19,10 @@ import java.util.Date; | ||
| 25 | @Table(name = "t_auto_hfca_ixzvok_jhzvno") | 19 | @Table(name = "t_auto_hfca_ixzvok_jhzvno") |
| 26 | public class CImprovementTarget extends BaseCorpModel { | 20 | public class CImprovementTarget extends BaseCorpModel { |
| 27 | 21 | ||
| 22 | + public static final String YEAR = "year"; | ||
| 23 | + public static final String DWCJ = "dwcj"; | ||
| 24 | + public static final String SZXX = "szxx"; | ||
| 25 | + | ||
| 28 | /* | 26 | /* |
| 29 | * 年份 | 27 | * 年份 |
| 30 | */ | 28 | */ |
| 1 | package com.qgutech.qgyun.apaas.sync.cps.model; | 1 | package com.qgutech.qgyun.apaas.sync.cps.model; |
| 2 | 2 | ||
| 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | ||
| 6 | import lombok.Getter; | 4 | import lombok.Getter; |
| 7 | import lombok.Setter; | 5 | import lombok.Setter; |
| 8 | import lombok.ToString; | 6 | import lombok.ToString; |
| @@ -16,121 +14,182 @@ import java.util.Date; | @@ -16,121 +14,182 @@ import java.util.Date; | ||
| 16 | @Getter | 14 | @Getter |
| 17 | @Setter | 15 | @Setter |
| 18 | @ToString | 16 | @ToString |
| 19 | -@ApiModel(value = "CpsProblem", description = "CPS体系问题记录信息") | ||
| 20 | @Table(name = "t_auto_hfca_ixzvok_cpstxw") | 17 | @Table(name = "t_auto_hfca_ixzvok_cpstxw") |
| 21 | public class CpsProblem extends BaseCorpModel { | 18 | public class CpsProblem extends BaseCorpModel { |
| 22 | 19 | ||
| 23 | - @ApiModelProperty(value = "问题编号") | 20 | + public static final String JHJJSJ = "jhjjsj"; |
| 21 | + public static final String GZDW = "gzdw"; | ||
| 22 | + public static final String WTZRDW = "wtzrdw"; | ||
| 23 | + public static final String WTCLZT = "wtclzt"; | ||
| 24 | + public static final String WTLY = "wtly"; | ||
| 25 | + | ||
| 26 | + /* | ||
| 27 | + * 问题编号 | ||
| 28 | + */ | ||
| 24 | private String wtbh; | 29 | private String wtbh; |
| 25 | 30 | ||
| 26 | - @ApiModelProperty(value = "问题来源") | 31 | + /* |
| 32 | + * 问题来源:#1#-开班;#2#-过程验证;#3#-过程确认;#4#-体系健康体检;#5#-单位自检(单位牵头); | ||
| 33 | + */ | ||
| 27 | private String wtly; | 34 | private String wtly; |
| 28 | 35 | ||
| 29 | - @ApiModelProperty(value = "问题提出人") | 36 | + /* |
| 37 | + * 问题提出人 | ||
| 38 | + */ | ||
| 30 | private String wttcr; | 39 | private String wttcr; |
| 31 | 40 | ||
| 32 | - @ApiModelProperty(value = "工作单位") | 41 | + /* |
| 42 | + * 工作单位 | ||
| 43 | + */ | ||
| 33 | private String gzdw; | 44 | private String gzdw; |
| 34 | 45 | ||
| 35 | - @ApiModelProperty(value = "所在区域名称") | ||
| 36 | - private String szqymc; | ||
| 37 | - | ||
| 38 | - @ApiModelProperty(value = "人员类别") | 46 | + /* |
| 47 | + * 人员类别:#1#-区长;#2#-班长;#3#-高级经理;#4#-经理;#5#-主管;#6#-专家;#7#-一般员工; | ||
| 48 | + */ | ||
| 39 | private String rylb; | 49 | private String rylb; |
| 40 | 50 | ||
| 41 | - @ApiModelProperty(value = "问题描述") | 51 | + /* |
| 52 | + * 问题描述 | ||
| 53 | + */ | ||
| 42 | private String wtms; | 54 | private String wtms; |
| 43 | 55 | ||
| 44 | - @ApiModelProperty(value = "问题单位") | ||
| 45 | - private String wtdw; | 56 | + /* |
| 57 | + * 问题责任单位 | ||
| 58 | + */ | ||
| 59 | + private String wtzrdw; | ||
| 46 | 60 | ||
| 47 | - @ApiModelProperty(value = "问题附件") | 61 | + /* |
| 62 | + * 问题附件 | ||
| 63 | + */ | ||
| 48 | private String wtfj; | 64 | private String wtfj; |
| 49 | 65 | ||
| 50 | - @ApiModelProperty(value = "问题所属板块") | 66 | + /* |
| 67 | + * 问题所属板块 | ||
| 68 | + */ | ||
| 51 | private String wtssbk; | 69 | private String wtssbk; |
| 52 | 70 | ||
| 53 | - @ApiModelProperty(value = "问题类别") | 71 | + /* |
| 72 | + * 问题类别:#1#-方针展开;#2#-标准化作业;#3#-目视化;#4#-时间数据处理;#5#-过程确认;#6#-持续改善; | ||
| 73 | + */ | ||
| 54 | private String wtlb; | 74 | private String wtlb; |
| 55 | 75 | ||
| 56 | - @ApiModelProperty(value = "问题性质") | 76 | + /* |
| 77 | + * 问题性质:#1#-无标准;#2#-未执行标准;#3#-标准不足; | ||
| 78 | + */ | ||
| 57 | private String wtxz; | 79 | private String wtxz; |
| 58 | 80 | ||
| 59 | - @ApiModelProperty(value = "sfl") | 81 | + /* |
| 82 | + * 6S分类:#1#-整理;#2#-整顿;#3#-清洁;#4#-清扫;#5#-素养;#6#-安全; | ||
| 83 | + */ | ||
| 60 | private String sfl; | 84 | private String sfl; |
| 61 | 85 | ||
| 62 | - @ApiModelProperty(value = "问题是否关闭") | 86 | + /* |
| 87 | + * 问题是否关闭 | ||
| 88 | + */ | ||
| 63 | private Boolean wtsfgb; | 89 | private Boolean wtsfgb; |
| 64 | 90 | ||
| 65 | - @ApiModelProperty(value = "室组") | 91 | + /* |
| 92 | + * 室组 | ||
| 93 | + */ | ||
| 66 | private String sz; | 94 | private String sz; |
| 67 | 95 | ||
| 68 | - @ApiModelProperty(value = "mbghlk") | 96 | + /* |
| 97 | + * 问题层级-#1#-1;#2#-2;#3#-3;#4#-4;#5#-5;#0#-0; | ||
| 98 | + */ | ||
| 69 | private String mbghlk; | 99 | private String mbghlk; |
| 70 | 100 | ||
| 71 | - @ApiModelProperty(value = "问题处理方式") | 101 | + /* |
| 102 | + * 问题处理方式:#1#-自己解决;#2#-工作安排\同级支持;#3#-问题升级至; | ||
| 103 | + */ | ||
| 72 | private String wtclfs; | 104 | private String wtclfs; |
| 73 | 105 | ||
| 74 | - @ApiModelProperty(value = "tntpvy") | 106 | + /* |
| 107 | + * 问题解决时间 | ||
| 108 | + */ | ||
| 75 | private Date tntpvy; | 109 | private Date tntpvy; |
| 76 | 110 | ||
| 77 | - @ApiModelProperty(value = "gzap") | 111 | + /* |
| 112 | + * 工作安排/同级支持 | ||
| 113 | + */ | ||
| 78 | private String gzap; | 114 | private String gzap; |
| 79 | 115 | ||
| 80 | - @ApiModelProperty(value = "wtsjz") | 116 | + /* |
| 117 | + * 问题升级至 | ||
| 118 | + */ | ||
| 81 | private String wtsjz; | 119 | private String wtsjz; |
| 82 | 120 | ||
| 83 | - @ApiModelProperty(value = "wtjjcs") | 121 | + /* |
| 122 | + * 问题解决措施 | ||
| 123 | + */ | ||
| 84 | private String wtjjcs; | 124 | private String wtjjcs; |
| 85 | 125 | ||
| 86 | - @ApiModelProperty(value = "wtzghfj") | 126 | + /* |
| 127 | + * 问题整改后附件 | ||
| 128 | + */ | ||
| 87 | private String wtzghfj; | 129 | private String wtzghfj; |
| 88 | 130 | ||
| 89 | - @ApiModelProperty(value = "wtclr") | 131 | + /* |
| 132 | + * 问题处理人 | ||
| 133 | + */ | ||
| 90 | private String wtclr; | 134 | private String wtclr; |
| 91 | 135 | ||
| 92 | - @ApiModelProperty(value = "wtclzt") | 136 | + /* |
| 137 | + * 问题处理状态, #1#-待处理;#2#-处理中;#3#-已关闭;#4#-已逾期; | ||
| 138 | + */ | ||
| 93 | private String wtclzt; | 139 | private String wtclzt; |
| 94 | 140 | ||
| 95 | - @ApiModelProperty(value = "lywt") | ||
| 96 | - private String lywt; | ||
| 97 | - | ||
| 98 | - @ApiModelProperty(value = "zcwt") | ||
| 99 | - private String zcwt; | ||
| 100 | - | ||
| 101 | - @ApiModelProperty(value = "区域") | 141 | + /* |
| 142 | + * 区域 | ||
| 143 | + */ | ||
| 102 | private String qy; | 144 | private String qy; |
| 103 | 145 | ||
| 104 | - @ApiModelProperty(value = "班组") | 146 | + /* |
| 147 | + * 班组 | ||
| 148 | + */ | ||
| 105 | private String bz; | 149 | private String bz; |
| 106 | 150 | ||
| 107 | - @ApiModelProperty(value = "lylx") | ||
| 108 | - private String lylx; | ||
| 109 | - | ||
| 110 | - @ApiModelProperty(value = "jhjjsj") | 151 | + /* |
| 152 | + * 计划解决时间 | ||
| 153 | + */ | ||
| 111 | private Date jhjjsj; | 154 | private Date jhjjsj; |
| 112 | 155 | ||
| 113 | - @ApiModelProperty(value = "wtclfs2") | 156 | + /* |
| 157 | + * 问题处理方式2 | ||
| 158 | + */ | ||
| 114 | private String wtclfs2; | 159 | private String wtclfs2; |
| 115 | 160 | ||
| 116 | - @ApiModelProperty(value = "gzap2") | 161 | + /* |
| 162 | + * 工作安排/同级支持2 | ||
| 163 | + */ | ||
| 117 | private String gzap2; | 164 | private String gzap2; |
| 118 | 165 | ||
| 119 | - @ApiModelProperty(value = "wtsjz2") | 166 | + /* |
| 167 | + * 问题升级至2 | ||
| 168 | + */ | ||
| 120 | private String wtsjz2; | 169 | private String wtsjz2; |
| 121 | 170 | ||
| 122 | - @ApiModelProperty(value = "wtclfs3") | 171 | + /* |
| 172 | + * 问题处理方式3 | ||
| 173 | + */ | ||
| 123 | private String wtclfs3; | 174 | private String wtclfs3; |
| 124 | 175 | ||
| 125 | - @ApiModelProperty(value = "gzap3") | 176 | + /* |
| 177 | + * 工作安排/同级支持3 | ||
| 178 | + */ | ||
| 126 | private String gzap3; | 179 | private String gzap3; |
| 127 | 180 | ||
| 128 | - @ApiModelProperty(value = "wtsjz3") | 181 | + /* |
| 182 | + * 问题升级至3 | ||
| 183 | + */ | ||
| 129 | private String wtsjz3; | 184 | private String wtsjz3; |
| 130 | 185 | ||
| 131 | - @ApiModelProperty(value = "流程实例ID") | 186 | + /* |
| 187 | + * 流程实例ID | ||
| 188 | + */ | ||
| 132 | private String processInstanceId; | 189 | private String processInstanceId; |
| 133 | 190 | ||
| 134 | - @ApiModelProperty(value = "审批状态") | 191 | + /* |
| 192 | + * 审批状态 | ||
| 193 | + */ | ||
| 135 | private String approvalStatus; | 194 | private String approvalStatus; |
| 136 | } | 195 | } |
| 1 | package com.qgutech.qgyun.apaas.sync.cps.model; | 1 | package com.qgutech.qgyun.apaas.sync.cps.model; |
| 2 | 2 | ||
| 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | ||
| 6 | import lombok.Getter; | 4 | import lombok.Getter; |
| 7 | import lombok.Setter; | 5 | import lombok.Setter; |
| 8 | import lombok.ToString; | 6 | import lombok.ToString; |
| @@ -15,31 +13,48 @@ import javax.persistence.Table; | @@ -15,31 +13,48 @@ import javax.persistence.Table; | ||
| 15 | @Getter | 13 | @Getter |
| 16 | @Setter | 14 | @Setter |
| 17 | @ToString | 15 | @ToString |
| 18 | -@ApiModel(value = "Personnel", description = "人员信息") | ||
| 19 | @Table(name = "t_auto_hfca_ixzvok_bzcygl") | 16 | @Table(name = "t_auto_hfca_ixzvok_bzcygl") |
| 20 | public class Personnel extends BaseCorpModel { | 17 | public class Personnel extends BaseCorpModel { |
| 21 | 18 | ||
| 22 | - @ApiModelProperty(value = "所属班组") | 19 | + public static final String GH = "gh"; |
| 20 | + | ||
| 21 | + /* | ||
| 22 | + * 所属班组 | ||
| 23 | + */ | ||
| 23 | private String ssbz; | 24 | private String ssbz; |
| 24 | 25 | ||
| 25 | - @ApiModelProperty(value = "姓名") | 26 | + /* |
| 27 | + * 姓名 | ||
| 28 | + */ | ||
| 26 | private String xm; | 29 | private String xm; |
| 27 | 30 | ||
| 28 | - @ApiModelProperty(value = "人员") | 31 | + /* |
| 32 | + * 人员 | ||
| 33 | + */ | ||
| 29 | private String ry; | 34 | private String ry; |
| 30 | 35 | ||
| 31 | - @ApiModelProperty(value = "所属部门") | 36 | + /* |
| 37 | + * 所属部门 | ||
| 38 | + */ | ||
| 32 | private String ssbm; | 39 | private String ssbm; |
| 33 | 40 | ||
| 34 | - @ApiModelProperty(value = "工号") | 41 | + /* |
| 42 | + * 工号 | ||
| 43 | + */ | ||
| 35 | private String gh; | 44 | private String gh; |
| 36 | 45 | ||
| 37 | - @ApiModelProperty(value = "所属单位") | 46 | + /* |
| 47 | + * 所属单位 | ||
| 48 | + */ | ||
| 38 | private String ssdw; | 49 | private String ssdw; |
| 39 | 50 | ||
| 40 | - @ApiModelProperty(value = "所属室组") | 51 | + /* |
| 52 | + * 所属室组 | ||
| 53 | + */ | ||
| 41 | private String sssz; | 54 | private String sssz; |
| 42 | 55 | ||
| 43 | - @ApiModelProperty(value = "所属区域") | 56 | + /* |
| 57 | + * 所属区域 | ||
| 58 | + */ | ||
| 44 | private String ssqy; | 59 | private String ssqy; |
| 45 | } | 60 | } |
| 1 | package com.qgutech.qgyun.apaas.sync.cps.model; | 1 | package com.qgutech.qgyun.apaas.sync.cps.model; |
| 2 | 2 | ||
| 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | ||
| 6 | import lombok.Getter; | 4 | import lombok.Getter; |
| 7 | import lombok.Setter; | 5 | import lombok.Setter; |
| 8 | import lombok.ToString; | 6 | import lombok.ToString; |
| @@ -16,28 +14,41 @@ import java.util.Date; | @@ -16,28 +14,41 @@ import java.util.Date; | ||
| 16 | @Getter | 14 | @Getter |
| 17 | @Setter | 15 | @Setter |
| 18 | @ToString | 16 | @ToString |
| 19 | -@ApiModel(value = "PjoBatch", description = "PJO计划批次信息") | ||
| 20 | @Table(name = "t_auto_hfca_ixzvok_ouziyg") | 17 | @Table(name = "t_auto_hfca_ixzvok_ouziyg") |
| 21 | public class PjoBatch extends BaseCorpModel { | 18 | public class PjoBatch extends BaseCorpModel { |
| 22 | 19 | ||
| 23 | - @ApiModelProperty(value = "批次编号") | 20 | + /* |
| 21 | + * 批次编号 | ||
| 22 | + */ | ||
| 24 | private String pcbh; | 23 | private String pcbh; |
| 25 | 24 | ||
| 26 | - @ApiModelProperty(value = "批次执行人") | 25 | + /* |
| 26 | + * 批次执行人 | ||
| 27 | + */ | ||
| 27 | private String pczxr; | 28 | private String pczxr; |
| 28 | 29 | ||
| 29 | - @ApiModelProperty(value = "批次执行开始日期") | 30 | + /* |
| 31 | + * 批次执行开始日期 | ||
| 32 | + */ | ||
| 30 | private Date pczxksrq; | 33 | private Date pczxksrq; |
| 31 | 34 | ||
| 32 | - @ApiModelProperty(value = "批次执行结束日期") | 35 | + /* |
| 36 | + * 批次执行结束日期 | ||
| 37 | + */ | ||
| 33 | private Date pczxjsrq; | 38 | private Date pczxjsrq; |
| 34 | 39 | ||
| 35 | - @ApiModelProperty(value = "执行区域") | 40 | + /* |
| 41 | + * 执行区域 | ||
| 42 | + */ | ||
| 36 | private String zxqy; | 43 | private String zxqy; |
| 37 | 44 | ||
| 38 | - @ApiModelProperty(value = "状态") | 45 | + /* |
| 46 | + * 状态 | ||
| 47 | + */ | ||
| 39 | private String zt; | 48 | private String zt; |
| 40 | 49 | ||
| 41 | - @ApiModelProperty(value = "批次名称") | 50 | + /* |
| 51 | + * 批次名称 | ||
| 52 | + */ | ||
| 42 | private String pcmc; | 53 | private String pcmc; |
| 43 | } | 54 | } |
| 1 | package com.qgutech.qgyun.apaas.sync.cps.model; | 1 | package com.qgutech.qgyun.apaas.sync.cps.model; |
| 2 | 2 | ||
| 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | ||
| 6 | import lombok.Getter; | 4 | import lombok.Getter; |
| 7 | import lombok.Setter; | 5 | import lombok.Setter; |
| 8 | import lombok.ToString; | 6 | import lombok.ToString; |
| @@ -16,103 +14,166 @@ import java.util.Date; | @@ -16,103 +14,166 @@ import java.util.Date; | ||
| 16 | @Getter | 14 | @Getter |
| 17 | @Setter | 15 | @Setter |
| 18 | @ToString | 16 | @ToString |
| 19 | -@ApiModel(value = "PjoExec", description = "PJO计划执行信息") | ||
| 20 | @Table(name = "t_auto_hfca_ixzvok_wmkgsv") | 17 | @Table(name = "t_auto_hfca_ixzvok_wmkgsv") |
| 21 | public class PjoExec extends BaseCorpModel { | 18 | public class PjoExec extends BaseCorpModel { |
| 22 | 19 | ||
| 23 | - @ApiModelProperty(value = "当日生产班次") | 20 | + /* |
| 21 | + * 当日生产班次 | ||
| 22 | + */ | ||
| 24 | private String drscbc; | 23 | private String drscbc; |
| 25 | 24 | ||
| 26 | - @ApiModelProperty(value = "qkxdwk") | 25 | + /* |
| 26 | + * qkxdwk | ||
| 27 | + */ | ||
| 27 | private Date qkxdwk; | 28 | private Date qkxdwk; |
| 28 | 29 | ||
| 29 | - @ApiModelProperty(value = "PJO执行人") | 30 | + /* |
| 31 | + * PJO执行人 | ||
| 32 | + */ | ||
| 30 | private String pjozxr; | 33 | private String pjozxr; |
| 31 | 34 | ||
| 32 | - @ApiModelProperty(value = "PJO批次") | 35 | + /* |
| 36 | + * PJO批次 | ||
| 37 | + */ | ||
| 33 | private String pjopc; | 38 | private String pjopc; |
| 34 | 39 | ||
| 35 | - @ApiModelProperty(value = "车间") | 40 | + /* |
| 41 | + * 车间 | ||
| 42 | + */ | ||
| 36 | private String cj; | 43 | private String cj; |
| 37 | 44 | ||
| 38 | - @ApiModelProperty(value = "产线") | 45 | + /* |
| 46 | + * 产线 | ||
| 47 | + */ | ||
| 39 | private String cx; | 48 | private String cx; |
| 40 | 49 | ||
| 41 | - @ApiModelProperty(value = "CPS区域") | 50 | + /* |
| 51 | + * CPS区域 | ||
| 52 | + */ | ||
| 42 | private String cpsqy; | 53 | private String cpsqy; |
| 43 | 54 | ||
| 44 | - @ApiModelProperty(value = "班组") | 55 | + /* |
| 56 | + * 班组 | ||
| 57 | + */ | ||
| 45 | private String bz; | 58 | private String bz; |
| 46 | 59 | ||
| 47 | - @ApiModelProperty(value = "PJO观察人姓名") | 60 | + /* |
| 61 | + * PJO观察人姓名 | ||
| 62 | + */ | ||
| 48 | private String pjogcrxm; | 63 | private String pjogcrxm; |
| 49 | 64 | ||
| 50 | - @ApiModelProperty(value = "工位信息") | 65 | + /* |
| 66 | + * 工位信息 | ||
| 67 | + */ | ||
| 51 | private String gwxx; | 68 | private String gwxx; |
| 52 | 69 | ||
| 53 | - @ApiModelProperty(value = "所属批次") | 70 | + /* |
| 71 | + * 所属批次 | ||
| 72 | + */ | ||
| 54 | private String sspc; | 73 | private String sspc; |
| 55 | 74 | ||
| 56 | - @ApiModelProperty(value = "工位性质") | 75 | + /* |
| 76 | + * 工位性质 | ||
| 77 | + */ | ||
| 57 | private String gwxz; | 78 | private String gwxz; |
| 58 | 79 | ||
| 59 | - @ApiModelProperty(value = "PJO是否正常开展") | 80 | + /* |
| 81 | + * PJO是否正常开展 | ||
| 82 | + */ | ||
| 60 | private Boolean pjosfzckz; | 83 | private Boolean pjosfzckz; |
| 61 | 84 | ||
| 62 | - @ApiModelProperty(value = "gchtxzyyc") | 85 | + /* |
| 86 | + * gchtxzyyc | ||
| 87 | + */ | ||
| 63 | private String gchtxzyyc; | 88 | private String gchtxzyyc; |
| 64 | 89 | ||
| 65 | - @ApiModelProperty(value = "gchtxcyyc") | 90 | + /* |
| 91 | + * gchtxcyyc | ||
| 92 | + */ | ||
| 66 | private String gchtxcyyc; | 93 | private String gchtxcyyc; |
| 67 | 94 | ||
| 68 | - @ApiModelProperty(value = "gcdwt") | 95 | + /* |
| 96 | + * gcdwt | ||
| 97 | + */ | ||
| 69 | private String gcdwt; | 98 | private String gcdwt; |
| 70 | 99 | ||
| 71 | - @ApiModelProperty(value = "gcgjjh") | 100 | + /* |
| 101 | + * gcgjjh | ||
| 102 | + */ | ||
| 72 | private String gcgjjh; | 103 | private String gcgjjh; |
| 73 | 104 | ||
| 74 | - @ApiModelProperty(value = "lfwkuc") | 105 | + /* |
| 106 | + * lfwkuc | ||
| 107 | + */ | ||
| 75 | private String lfwkuc; | 108 | private String lfwkuc; |
| 76 | 109 | ||
| 77 | - @ApiModelProperty(value = "zyczdwt") | 110 | + /* |
| 111 | + * zyczdwt | ||
| 112 | + */ | ||
| 78 | private String zyczdwt; | 113 | private String zyczdwt; |
| 79 | 114 | ||
| 80 | - @ApiModelProperty(value = "zdbgwdgsjy") | 115 | + /* |
| 116 | + * zdbgwdgsjy | ||
| 117 | + */ | ||
| 81 | private String zdbgwdgsjy; | 118 | private String zdbgwdgsjy; |
| 82 | 119 | ||
| 83 | - @ApiModelProperty(value = "lvqwyc") | 120 | + /* |
| 121 | + * lvqwyc | ||
| 122 | + */ | ||
| 84 | private String lvqwyc; | 123 | private String lvqwyc; |
| 85 | 124 | ||
| 86 | - @ApiModelProperty(value = "zyqm") | 125 | + /* |
| 126 | + * zyqm | ||
| 127 | + */ | ||
| 87 | private String zyqm; | 128 | private String zyqm; |
| 88 | 129 | ||
| 89 | - @ApiModelProperty(value = "zysfyjy") | 130 | + /* |
| 131 | + * zysfyjy | ||
| 132 | + */ | ||
| 90 | private Boolean zysfyjy; | 133 | private Boolean zysfyjy; |
| 91 | 134 | ||
| 92 | - @ApiModelProperty(value = "cyjy") | 135 | + /* |
| 136 | + * cyjy | ||
| 137 | + */ | ||
| 93 | private String cyjy; | 138 | private String cyjy; |
| 94 | 139 | ||
| 95 | - @ApiModelProperty(value = "zyjy") | 140 | + /* |
| 141 | + * zyjy | ||
| 142 | + */ | ||
| 96 | private String zyjy; | 143 | private String zyjy; |
| 97 | 144 | ||
| 98 | - @ApiModelProperty(value = "状态") | 145 | + /* |
| 146 | + * 状态 | ||
| 147 | + */ | ||
| 99 | private String zt; | 148 | private String zt; |
| 100 | 149 | ||
| 101 | - @ApiModelProperty(value = "区域") | 150 | + /* |
| 151 | + * 区域 | ||
| 152 | + */ | ||
| 102 | private String qy; | 153 | private String qy; |
| 103 | 154 | ||
| 104 | - @ApiModelProperty(value = "gwxx2") | 155 | + /* |
| 156 | + * gwxx2 | ||
| 157 | + */ | ||
| 105 | private String gwxx2; | 158 | private String gwxx2; |
| 106 | 159 | ||
| 107 | - @ApiModelProperty(value = "zyqmb") | 160 | + /* |
| 161 | + * zyqmb | ||
| 162 | + */ | ||
| 108 | private String zyqmb; | 163 | private String zyqmb; |
| 109 | 164 | ||
| 110 | - @ApiModelProperty(value = "gwzx1") | 165 | + /* |
| 166 | + * gwzx1 | ||
| 167 | + */ | ||
| 111 | private String gwzx1; | 168 | private String gwzx1; |
| 112 | 169 | ||
| 113 | - @ApiModelProperty(value = "gwzx2") | 170 | + /* |
| 171 | + * gwzx2 | ||
| 172 | + */ | ||
| 114 | private String gwzx2; | 173 | private String gwzx2; |
| 115 | 174 | ||
| 116 | - @ApiModelProperty(value = "线体") | 175 | + /* |
| 176 | + * 线体 | ||
| 177 | + */ | ||
| 117 | private String xt; | 178 | private String xt; |
| 118 | } | 179 | } |
| 1 | package com.qgutech.qgyun.apaas.sync.cps.model; | 1 | package com.qgutech.qgyun.apaas.sync.cps.model; |
| 2 | 2 | ||
| 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | ||
| 6 | import lombok.Getter; | 4 | import lombok.Getter; |
| 7 | import lombok.Setter; | 5 | import lombok.Setter; |
| 8 | import lombok.ToString; | 6 | import lombok.ToString; |
| @@ -15,34 +13,51 @@ import javax.persistence.Table; | @@ -15,34 +13,51 @@ import javax.persistence.Table; | ||
| 15 | @Getter | 13 | @Getter |
| 16 | @Setter | 14 | @Setter |
| 17 | @ToString | 15 | @ToString |
| 18 | -@ApiModel(value = "PjoWorkstationExec", description = "PJO计划工位执行情况信息") | ||
| 19 | @Table(name = "t_auto_hfca_ixzvok_kjpssd") | 16 | @Table(name = "t_auto_hfca_ixzvok_kjpssd") |
| 20 | public class PjoWorkstationExec extends BaseCorpModel { | 17 | public class PjoWorkstationExec extends BaseCorpModel { |
| 21 | 18 | ||
| 22 | - @ApiModelProperty(value = "工位状态") | 19 | + /* |
| 20 | + * 工位状态 | ||
| 21 | + */ | ||
| 23 | private String gwzt; | 22 | private String gwzt; |
| 24 | 23 | ||
| 25 | - @ApiModelProperty(value = "PJO批次") | 24 | + /* |
| 25 | + * PJO批次 | ||
| 26 | + */ | ||
| 26 | private String pjopc; | 27 | private String pjopc; |
| 27 | 28 | ||
| 28 | - @ApiModelProperty(value = "工位") | 29 | + /* |
| 30 | + * 工位 | ||
| 31 | + */ | ||
| 29 | private String gw; | 32 | private String gw; |
| 30 | 33 | ||
| 31 | - @ApiModelProperty(value = "clbcfl") | 34 | + /* |
| 35 | + * clbcfl | ||
| 36 | + */ | ||
| 32 | private Double clbcfl; | 37 | private Double clbcfl; |
| 33 | 38 | ||
| 34 | - @ApiModelProperty(value = "工位名称") | 39 | + /* |
| 40 | + * 工位名称 | ||
| 41 | + */ | ||
| 35 | private String gwmc; | 42 | private String gwmc; |
| 36 | 43 | ||
| 37 | - @ApiModelProperty(value = "工位编号") | 44 | + /* |
| 45 | + * 工位编号 | ||
| 46 | + */ | ||
| 38 | private String gwbh; | 47 | private String gwbh; |
| 39 | 48 | ||
| 40 | - @ApiModelProperty(value = "所属车间") | 49 | + /* |
| 50 | + * 所属车间 | ||
| 51 | + */ | ||
| 41 | private String sscj; | 52 | private String sscj; |
| 42 | 53 | ||
| 43 | - @ApiModelProperty(value = "所属区域") | 54 | + /* |
| 55 | + * 所属区域 | ||
| 56 | + */ | ||
| 44 | private String ssqy; | 57 | private String ssqy; |
| 45 | 58 | ||
| 46 | - @ApiModelProperty(value = "工位执行所属班组") | 59 | + /* |
| 60 | + * 工位执行所属班组 | ||
| 61 | + */ | ||
| 47 | private String gwzxssbz; | 62 | private String gwzxssbz; |
| 48 | } | 63 | } |
| @@ -2,8 +2,6 @@ package com.qgutech.qgyun.apaas.sync.cps.model; | @@ -2,8 +2,6 @@ package com.qgutech.qgyun.apaas.sync.cps.model; | ||
| 2 | 2 | ||
| 3 | import com.fasterxml.jackson.annotation.JsonFormat; | 3 | import com.fasterxml.jackson.annotation.JsonFormat; |
| 4 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 4 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 5 | -import io.swagger.annotations.ApiModel; | ||
| 6 | -import io.swagger.annotations.ApiModelProperty; | ||
| 7 | import lombok.Getter; | 5 | import lombok.Getter; |
| 8 | import lombok.Setter; | 6 | import lombok.Setter; |
| 9 | import lombok.ToString; | 7 | import lombok.ToString; |
| @@ -18,62 +16,95 @@ import java.util.Date; | @@ -18,62 +16,95 @@ import java.util.Date; | ||
| 18 | @Getter | 16 | @Getter |
| 19 | @Setter | 17 | @Setter |
| 20 | @ToString | 18 | @ToString |
| 21 | -@ApiModel(value = "ProcessConfirmExec", description = "过程确认计划执行记录信息") | ||
| 22 | @Table(name = "t_auto_hfca_ixzvok_gcqrjhzx") | 19 | @Table(name = "t_auto_hfca_ixzvok_gcqrjhzx") |
| 23 | public class ProcessConfirmExec extends BaseCorpModel { | 20 | public class ProcessConfirmExec extends BaseCorpModel { |
| 24 | 21 | ||
| 22 | + /* | ||
| 23 | + * 活动执行日期 | ||
| 24 | + */ | ||
| 25 | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | 25 | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| 26 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | 26 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| 27 | - @ApiModelProperty(value = "活动执行日期") | ||
| 28 | private Date hdzxrq; | 27 | private Date hdzxrq; |
| 29 | 28 | ||
| 30 | - @ApiModelProperty(value = "过程确认计划人员") | 29 | + /* |
| 30 | + * 过程确认计划人员 | ||
| 31 | + */ | ||
| 31 | private String gcqrjhry; | 32 | private String gcqrjhry; |
| 32 | 33 | ||
| 33 | - @ApiModelProperty(value = "执行人员") | 34 | + /* |
| 35 | + * 执行人员 | ||
| 36 | + */ | ||
| 34 | private String zxry; | 37 | private String zxry; |
| 35 | 38 | ||
| 36 | - @ApiModelProperty(value = "工号") | 39 | + /* |
| 40 | + * 工号 | ||
| 41 | + */ | ||
| 37 | private String gh; | 42 | private String gh; |
| 38 | 43 | ||
| 39 | - @ApiModelProperty(value = "人员类别") | 44 | + /* |
| 45 | + * 人员类别 | ||
| 46 | + */ | ||
| 40 | private String rylb; | 47 | private String rylb; |
| 41 | 48 | ||
| 42 | - @ApiModelProperty(value = "单位") | 49 | + /* |
| 50 | + * 单位 | ||
| 51 | + */ | ||
| 43 | private String dw; | 52 | private String dw; |
| 44 | 53 | ||
| 45 | - @ApiModelProperty(value = "室组") | 54 | + /* |
| 55 | + * 室组 | ||
| 56 | + */ | ||
| 46 | private String sz; | 57 | private String sz; |
| 47 | 58 | ||
| 48 | - @ApiModelProperty(value = "区域") | 59 | + /* |
| 60 | + * 区域 | ||
| 61 | + */ | ||
| 49 | private String qy; | 62 | private String qy; |
| 50 | 63 | ||
| 51 | - @ApiModelProperty(value = "班组") | 64 | + /* |
| 65 | + * 班组 | ||
| 66 | + */ | ||
| 52 | private String bz; | 67 | private String bz; |
| 53 | 68 | ||
| 54 | - @ApiModelProperty(value = "线体") | 69 | + /* |
| 70 | + * 线体 | ||
| 71 | + */ | ||
| 55 | private String xt; | 72 | private String xt; |
| 56 | 73 | ||
| 57 | - @ApiModelProperty(value = "班次") | 74 | + /* |
| 75 | + * 班次 | ||
| 76 | + */ | ||
| 58 | private String bc; | 77 | private String bc; |
| 59 | 78 | ||
| 79 | + /* | ||
| 80 | + * 过期时间 | ||
| 81 | + */ | ||
| 60 | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | 82 | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| 61 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | 83 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| 62 | - @ApiModelProperty(value = "过期时间") | ||
| 63 | private Date gqsj; | 84 | private Date gqsj; |
| 64 | 85 | ||
| 65 | - @ApiModelProperty(value = "状态") | 86 | + /* |
| 87 | + * 状态 | ||
| 88 | + */ | ||
| 66 | private String zt; | 89 | private String zt; |
| 67 | 90 | ||
| 68 | - @ApiModelProperty(value = "是否已执行") | 91 | + /* |
| 92 | + * 是否已执行 | ||
| 93 | + */ | ||
| 69 | private Boolean sfyzx; | 94 | private Boolean sfyzx; |
| 70 | 95 | ||
| 71 | - @ApiModelProperty(value = "未执行原因说明") | 96 | + /* |
| 97 | + * 未执行原因说明 | ||
| 98 | + */ | ||
| 72 | private String wzxyysm; | 99 | private String wzxyysm; |
| 73 | 100 | ||
| 74 | - @ApiModelProperty(value = "是否发现问题") | 101 | + /* |
| 102 | + * 是否发现问题 | ||
| 103 | + */ | ||
| 75 | private Boolean sffxwt; | 104 | private Boolean sffxwt; |
| 76 | 105 | ||
| 77 | - @ApiModelProperty(value = "未执行原因") | 106 | + /* |
| 107 | + * 未执行原因 | ||
| 108 | + */ | ||
| 78 | private String wzxyys; | 109 | private String wzxyys; |
| 79 | } | 110 | } |
| 1 | package com.qgutech.qgyun.apaas.sync.cps.model; | 1 | package com.qgutech.qgyun.apaas.sync.cps.model; |
| 2 | 2 | ||
| 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | ||
| 6 | import lombok.Getter; | 4 | import lombok.Getter; |
| 7 | import lombok.Setter; | 5 | import lombok.Setter; |
| 8 | import lombok.ToString; | 6 | import lombok.ToString; |
| @@ -16,103 +14,166 @@ import java.util.Date; | @@ -16,103 +14,166 @@ import java.util.Date; | ||
| 16 | @Getter | 14 | @Getter |
| 17 | @Setter | 15 | @Setter |
| 18 | @ToString | 16 | @ToString |
| 19 | -@ApiModel(value = "ProcessConfirmPersonnel", description = "过程确认维护人员信息") | ||
| 20 | @Table(name = "t_auto_hfca_ixzvok_gcjhrywh") | 17 | @Table(name = "t_auto_hfca_ixzvok_gcjhrywh") |
| 21 | public class ProcessConfirmPersonnel extends BaseCorpModel { | 18 | public class ProcessConfirmPersonnel extends BaseCorpModel { |
| 22 | 19 | ||
| 23 | - @ApiModelProperty(value = "活动执行日期") | 20 | + /* |
| 21 | + * 活动执行日期 | ||
| 22 | + */ | ||
| 24 | private Date hdzxrq; | 23 | private Date hdzxrq; |
| 25 | 24 | ||
| 26 | - @ApiModelProperty(value = "执行人员") | 25 | + /* |
| 26 | + * 执行人员 | ||
| 27 | + */ | ||
| 27 | private String zxry; | 28 | private String zxry; |
| 28 | 29 | ||
| 29 | - @ApiModelProperty(value = "活动执行人姓名") | 30 | + /* |
| 31 | + * 活动执行人姓名 | ||
| 32 | + */ | ||
| 30 | private String hdzxrxm; | 33 | private String hdzxrxm; |
| 31 | 34 | ||
| 32 | - @ApiModelProperty(value = "工号") | 35 | + /* |
| 36 | + * 工号 | ||
| 37 | + */ | ||
| 33 | private String gh; | 38 | private String gh; |
| 34 | 39 | ||
| 35 | - @ApiModelProperty(value = "工作单位") | 40 | + /* |
| 41 | + * 工作单位 | ||
| 42 | + */ | ||
| 36 | private String gzdw; | 43 | private String gzdw; |
| 37 | 44 | ||
| 38 | - @ApiModelProperty(value = "人员类别") | 45 | + /* |
| 46 | + * 人员类别 | ||
| 47 | + */ | ||
| 39 | private String rylb; | 48 | private String rylb; |
| 40 | 49 | ||
| 41 | - @ApiModelProperty(value = "所在区域名称") | 50 | + /* |
| 51 | + * 所在区域名称 | ||
| 52 | + */ | ||
| 42 | private String szqymc; | 53 | private String szqymc; |
| 43 | 54 | ||
| 44 | - @ApiModelProperty(value = "班组") | 55 | + /* |
| 56 | + * 班组 | ||
| 57 | + */ | ||
| 45 | private String bz; | 58 | private String bz; |
| 46 | 59 | ||
| 47 | - @ApiModelProperty(value = "线体") | 60 | + /* |
| 61 | + * 线体 | ||
| 62 | + */ | ||
| 48 | private String xt; | 63 | private String xt; |
| 49 | 64 | ||
| 50 | - @ApiModelProperty(value = "班次") | 65 | + /* |
| 66 | + * 班次 | ||
| 67 | + */ | ||
| 51 | private String bc; | 68 | private String bc; |
| 52 | 69 | ||
| 53 | - @ApiModelProperty(value = "过期时间") | 70 | + /* |
| 71 | + * 过期时间 | ||
| 72 | + */ | ||
| 54 | private Date gqsj; | 73 | private Date gqsj; |
| 55 | 74 | ||
| 56 | - @ApiModelProperty(value = "状态") | 75 | + /* |
| 76 | + * 状态 | ||
| 77 | + */ | ||
| 57 | private String zt; | 78 | private String zt; |
| 58 | 79 | ||
| 59 | - @ApiModelProperty(value = "过程执行") | 80 | + /* |
| 81 | + * 过程执行 | ||
| 82 | + */ | ||
| 60 | private String gczx; | 83 | private String gczx; |
| 61 | 84 | ||
| 62 | - @ApiModelProperty(value = "未执行原因") | 85 | + /* |
| 86 | + * 未执行原因 | ||
| 87 | + */ | ||
| 63 | private String wzxyy; | 88 | private String wzxyy; |
| 64 | 89 | ||
| 65 | - @ApiModelProperty(value = "是否发现问题") | 90 | + /* |
| 91 | + * 是否发现问题 | ||
| 92 | + */ | ||
| 66 | private Boolean sffxwt; | 93 | private Boolean sffxwt; |
| 67 | 94 | ||
| 68 | - @ApiModelProperty(value = "单位名称") | 95 | + /* |
| 96 | + * 单位名称 | ||
| 97 | + */ | ||
| 69 | private String dwmc; | 98 | private String dwmc; |
| 70 | 99 | ||
| 71 | - @ApiModelProperty(value = "单位编号") | 100 | + /* |
| 101 | + * 单位编号 | ||
| 102 | + */ | ||
| 72 | private String dwbh; | 103 | private String dwbh; |
| 73 | 104 | ||
| 74 | - @ApiModelProperty(value = "单位负责人") | 105 | + /* |
| 106 | + * 单位负责人 | ||
| 107 | + */ | ||
| 75 | private String dwfzr; | 108 | private String dwfzr; |
| 76 | 109 | ||
| 77 | - @ApiModelProperty(value = "人员") | 110 | + /* |
| 111 | + * 人员 | ||
| 112 | + */ | ||
| 78 | private String ry; | 113 | private String ry; |
| 79 | 114 | ||
| 80 | - @ApiModelProperty(value = "人员所属单位") | 115 | + /* |
| 116 | + * 人员所属单位 | ||
| 117 | + */ | ||
| 81 | private String ryssdw; | 118 | private String ryssdw; |
| 82 | 119 | ||
| 83 | - @ApiModelProperty(value = "所属室组") | 120 | + /* |
| 121 | + * 所属室组 | ||
| 122 | + */ | ||
| 84 | private String sssz; | 123 | private String sssz; |
| 85 | 124 | ||
| 86 | - @ApiModelProperty(value = "所属班组") | 125 | + /* |
| 126 | + * 所属班组 | ||
| 127 | + */ | ||
| 87 | private String ssbz; | 128 | private String ssbz; |
| 88 | 129 | ||
| 89 | - @ApiModelProperty(value = "室组") | 130 | + /* |
| 131 | + * 室组 | ||
| 132 | + */ | ||
| 90 | private String sz; | 133 | private String sz; |
| 91 | 134 | ||
| 92 | - @ApiModelProperty(value = "区域") | 135 | + /* |
| 136 | + * 区域 | ||
| 137 | + */ | ||
| 93 | private String qy; | 138 | private String qy; |
| 94 | 139 | ||
| 95 | - @ApiModelProperty(value = "所属区域") | 140 | + /* |
| 141 | + * 所属区域 | ||
| 142 | + */ | ||
| 96 | private String ssqy; | 143 | private String ssqy; |
| 97 | 144 | ||
| 98 | - @ApiModelProperty(value = "eaohkg") | 145 | + /* |
| 146 | + * eaohkg | ||
| 147 | + */ | ||
| 99 | private String eaohkg; | 148 | private String eaohkg; |
| 100 | 149 | ||
| 101 | - @ApiModelProperty(value = "过程确认计划人员") | 150 | + /* |
| 151 | + * 过程确认计划人员 | ||
| 152 | + */ | ||
| 102 | private String gcqrjhry; | 153 | private String gcqrjhry; |
| 103 | 154 | ||
| 104 | - @ApiModelProperty(value = "单位") | 155 | + /* |
| 156 | + * 单位 | ||
| 157 | + */ | ||
| 105 | private String dw; | 158 | private String dw; |
| 106 | 159 | ||
| 107 | - @ApiModelProperty(value = "所属单位") | 160 | + /* |
| 161 | + * 所属单位 | ||
| 162 | + */ | ||
| 108 | private String ssdw; | 163 | private String ssdw; |
| 109 | 164 | ||
| 110 | - @ApiModelProperty(value = "所属线体") | 165 | + /* |
| 166 | + * 所属线体 | ||
| 167 | + */ | ||
| 111 | private String ssxt; | 168 | private String ssxt; |
| 112 | 169 | ||
| 113 | - @ApiModelProperty(value = "人员姓名") | 170 | + /* |
| 171 | + * 人员姓名 | ||
| 172 | + */ | ||
| 114 | private String ryxm; | 173 | private String ryxm; |
| 115 | 174 | ||
| 116 | - @ApiModelProperty(value = "是否已执行") | 175 | + /* |
| 176 | + * 是否已执行 | ||
| 177 | + */ | ||
| 117 | private Boolean sfyzx; | 178 | private Boolean sfyzx; |
| 118 | } | 179 | } |
| 1 | package com.qgutech.qgyun.apaas.sync.cps.model; | 1 | package com.qgutech.qgyun.apaas.sync.cps.model; |
| 2 | 2 | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonFormat; | ||
| 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 4 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | ||
| 6 | import lombok.Getter; | 5 | import lombok.Getter; |
| 7 | import lombok.Setter; | 6 | import lombok.Setter; |
| 8 | import lombok.ToString; | 7 | import lombok.ToString; |
| 8 | +import org.springframework.format.annotation.DateTimeFormat; | ||
| 9 | 9 | ||
| 10 | import javax.persistence.Table; | 10 | import javax.persistence.Table; |
| 11 | +import java.util.Date; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * 季度人员信息 | 14 | * 季度人员信息 |
| @@ -15,28 +16,53 @@ import javax.persistence.Table; | @@ -15,28 +16,53 @@ import javax.persistence.Table; | ||
| 15 | @Getter | 16 | @Getter |
| 16 | @Setter | 17 | @Setter |
| 17 | @ToString | 18 | @ToString |
| 18 | -@ApiModel(value = "QuarterPersonnel", description = "季度人员信息") | ||
| 19 | @Table(name = "t_auto_hfca_ixzvok_wltctp") | 19 | @Table(name = "t_auto_hfca_ixzvok_wltctp") |
| 20 | public class QuarterPersonnel extends BaseCorpModel { | 20 | public class QuarterPersonnel extends BaseCorpModel { |
| 21 | 21 | ||
| 22 | - @ApiModelProperty(value = "季度信息") | 22 | + public static final String JDXX = "jdxx"; |
| 23 | + public static final String YEAR = "year"; | ||
| 24 | + public static final String SHDW = "shdw"; | ||
| 25 | + public static final String SHSZ = "shsz"; | ||
| 26 | + public static final String YHRY = "yhry"; | ||
| 27 | + /* | ||
| 28 | + * 年份 | ||
| 29 | + */ | ||
| 30 | + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||
| 31 | + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||
| 32 | + private Date year; | ||
| 33 | + | ||
| 34 | + /* | ||
| 35 | + * 季度枚举 #1#-第一季度 #2#-第二季度 #3#-第三季度 #4#-第四季度 | ||
| 36 | + */ | ||
| 23 | private String jdxx; | 37 | private String jdxx; |
| 24 | 38 | ||
| 25 | - @ApiModelProperty(value = "员工人员") | 39 | + /* |
| 40 | + * 员工人员 | ||
| 41 | + */ | ||
| 26 | private String yhry; | 42 | private String yhry; |
| 27 | 43 | ||
| 28 | - @ApiModelProperty(value = "人员工号") | 44 | + /* |
| 45 | + * 人员工号 | ||
| 46 | + */ | ||
| 29 | private String rygh; | 47 | private String rygh; |
| 30 | 48 | ||
| 31 | - @ApiModelProperty(value = "所在单位") | 49 | + /* |
| 50 | + * 所在单位 | ||
| 51 | + */ | ||
| 32 | private String shdw; | 52 | private String shdw; |
| 33 | 53 | ||
| 34 | - @ApiModelProperty(value = "所在室组") | 54 | + /* |
| 55 | + * 所在室组 | ||
| 56 | + */ | ||
| 35 | private String shsz; | 57 | private String shsz; |
| 36 | 58 | ||
| 37 | - @ApiModelProperty(value = "所属区域") | 59 | + /* |
| 60 | + * 所属区域 | ||
| 61 | + */ | ||
| 38 | private String ssqy; | 62 | private String ssqy; |
| 39 | 63 | ||
| 40 | - @ApiModelProperty(value = "所属班组") | 64 | + /* |
| 65 | + * 所属班组 | ||
| 66 | + */ | ||
| 41 | private String ssbz; | 67 | private String ssbz; |
| 42 | } | 68 | } |
| 1 | package com.qgutech.qgyun.apaas.sync.cps.model; | 1 | package com.qgutech.qgyun.apaas.sync.cps.model; |
| 2 | 2 | ||
| 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | ||
| 6 | import lombok.Getter; | 4 | import lombok.Getter; |
| 7 | import lombok.Setter; | 5 | import lombok.Setter; |
| 8 | import lombok.ToString; | 6 | import lombok.ToString; |
| @@ -15,25 +13,36 @@ import javax.persistence.Table; | @@ -15,25 +13,36 @@ import javax.persistence.Table; | ||
| 15 | @Getter | 13 | @Getter |
| 16 | @Setter | 14 | @Setter |
| 17 | @ToString | 15 | @ToString |
| 18 | -@ApiModel(value = "RoomGroup", description = "室组信息") | ||
| 19 | @Table(name = "t_auto_hfca_ixzvok_efawtt") | 16 | @Table(name = "t_auto_hfca_ixzvok_efawtt") |
| 20 | public class RoomGroup extends BaseCorpModel { | 17 | public class RoomGroup extends BaseCorpModel { |
| 21 | 18 | ||
| 22 | - @ApiModelProperty(value = "室组名称") | 19 | + /* |
| 20 | + * 室组名称 | ||
| 21 | + */ | ||
| 23 | private String szmc; | 22 | private String szmc; |
| 24 | 23 | ||
| 25 | - @ApiModelProperty(value = "室组编号") | 24 | + /* |
| 25 | + * 室组编号 | ||
| 26 | + */ | ||
| 26 | private String szbh; | 27 | private String szbh; |
| 27 | 28 | ||
| 28 | - @ApiModelProperty(value = "室组负责人") | 29 | + /* |
| 30 | + * 室组负责人 | ||
| 31 | + */ | ||
| 29 | private String szfzr; | 32 | private String szfzr; |
| 30 | 33 | ||
| 31 | - @ApiModelProperty(value = "所属单位") | 34 | + /* |
| 35 | + * 所属单位 | ||
| 36 | + */ | ||
| 32 | private String ssdw; | 37 | private String ssdw; |
| 33 | 38 | ||
| 34 | - @ApiModelProperty(value = "所属组织") | 39 | + /* |
| 40 | + * 所属组织 | ||
| 41 | + */ | ||
| 35 | private String sszz; | 42 | private String sszz; |
| 36 | 43 | ||
| 37 | - @ApiModelProperty(value = "状态") | 44 | + /* |
| 45 | + * 状态 | ||
| 46 | + */ | ||
| 38 | private String zt; | 47 | private String zt; |
| 39 | } | 48 | } |
| 1 | package com.qgutech.qgyun.apaas.sync.cps.model; | 1 | package com.qgutech.qgyun.apaas.sync.cps.model; |
| 2 | 2 | ||
| 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | ||
| 6 | import lombok.Getter; | 4 | import lombok.Getter; |
| 7 | import lombok.Setter; | 5 | import lombok.Setter; |
| 8 | import lombok.ToString; | 6 | import lombok.ToString; |
| @@ -15,19 +13,26 @@ import javax.persistence.Table; | @@ -15,19 +13,26 @@ import javax.persistence.Table; | ||
| 15 | @Getter | 13 | @Getter |
| 16 | @Setter | 14 | @Setter |
| 17 | @ToString | 15 | @ToString |
| 18 | -@ApiModel(value = "Shift", description = "班次信息") | ||
| 19 | @Table(name = "t_auto_hfca_ixzvok_usnoxx") | 16 | @Table(name = "t_auto_hfca_ixzvok_usnoxx") |
| 20 | public class Shift extends BaseCorpModel { | 17 | public class Shift extends BaseCorpModel { |
| 21 | 18 | ||
| 22 | - @ApiModelProperty(value = "班次名称") | 19 | + /* |
| 20 | + * 班次名称 | ||
| 21 | + */ | ||
| 23 | private String bcmc; | 22 | private String bcmc; |
| 24 | 23 | ||
| 25 | - @ApiModelProperty(value = "班次编号") | 24 | + /* |
| 25 | + * 班次编号 | ||
| 26 | + */ | ||
| 26 | private String bcbh; | 27 | private String bcbh; |
| 27 | 28 | ||
| 28 | - @ApiModelProperty(value = "班次类型") | 29 | + /* |
| 30 | + * 班次类型 | ||
| 31 | + */ | ||
| 29 | private String bclx; | 32 | private String bclx; |
| 30 | 33 | ||
| 31 | - @ApiModelProperty(value = "状态") | 34 | + /* |
| 35 | + * 状态 | ||
| 36 | + */ | ||
| 32 | private String zt; | 37 | private String zt; |
| 33 | } | 38 | } |
| 1 | package com.qgutech.qgyun.apaas.sync.cps.model; | 1 | package com.qgutech.qgyun.apaas.sync.cps.model; |
| 2 | 2 | ||
| 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | ||
| 6 | import lombok.Getter; | 4 | import lombok.Getter; |
| 7 | import lombok.Setter; | 5 | import lombok.Setter; |
| 8 | import lombok.ToString; | 6 | import lombok.ToString; |
| @@ -15,61 +13,96 @@ import javax.persistence.Table; | @@ -15,61 +13,96 @@ import javax.persistence.Table; | ||
| 15 | @Getter | 13 | @Getter |
| 16 | @Setter | 14 | @Setter |
| 17 | @ToString | 15 | @ToString |
| 18 | -@ApiModel(value = "StdActivityCase", description = "标准活动优秀案例") | ||
| 19 | @Table(name = "t_auto_hfca_ixzvok_bzhdyx") | 16 | @Table(name = "t_auto_hfca_ixzvok_bzhdyx") |
| 20 | public class StdActivityCase extends BaseCorpModel { | 17 | public class StdActivityCase extends BaseCorpModel { |
| 21 | 18 | ||
| 22 | - @ApiModelProperty(value = "hdzxr") | 19 | + /* |
| 20 | + * hdzxr | ||
| 21 | + */ | ||
| 23 | private String hdzxr; | 22 | private String hdzxr; |
| 24 | 23 | ||
| 25 | - @ApiModelProperty(value = "ygbh") | 24 | + /* |
| 25 | + * ygbh | ||
| 26 | + */ | ||
| 26 | private String ygbh; | 27 | private String ygbh; |
| 27 | 28 | ||
| 28 | - @ApiModelProperty(value = "gzdw") | 29 | + /* |
| 30 | + * gzdw | ||
| 31 | + */ | ||
| 29 | private String gzdw; | 32 | private String gzdw; |
| 30 | 33 | ||
| 31 | - @ApiModelProperty(value = "szqymc") | 34 | + /* |
| 35 | + * szqymc | ||
| 36 | + */ | ||
| 32 | private String szqymc; | 37 | private String szqymc; |
| 33 | 38 | ||
| 34 | - @ApiModelProperty(value = "xt") | 39 | + /* |
| 40 | + * xt | ||
| 41 | + */ | ||
| 35 | private String xt; | 42 | private String xt; |
| 36 | 43 | ||
| 37 | - @ApiModelProperty(value = "wtbm") | 44 | + /* |
| 45 | + * wtbm | ||
| 46 | + */ | ||
| 38 | private String wtbm; | 47 | private String wtbm; |
| 39 | 48 | ||
| 40 | - @ApiModelProperty(value = "tjalfj") | 49 | + /* |
| 50 | + * tjalfj | ||
| 51 | + */ | ||
| 41 | private String tjalfj; | 52 | private String tjalfj; |
| 42 | 53 | ||
| 43 | - @ApiModelProperty(value = "qz") | 54 | + /* |
| 55 | + * qz | ||
| 56 | + */ | ||
| 44 | private String qz; | 57 | private String qz; |
| 45 | 58 | ||
| 46 | - @ApiModelProperty(value = "bdwcps") | 59 | + /* |
| 60 | + * bdwcps | ||
| 61 | + */ | ||
| 47 | private String bdwcps; | 62 | private String bdwcps; |
| 48 | 63 | ||
| 49 | - @ApiModelProperty(value = "dwldsh") | 64 | + /* |
| 65 | + * dwldsh | ||
| 66 | + */ | ||
| 50 | private String dwldsh; | 67 | private String dwldsh; |
| 51 | 68 | ||
| 52 | - @ApiModelProperty(value = "_c_sftscp") | 69 | + /* |
| 70 | + * _c_sftscp | ||
| 71 | + */ | ||
| 53 | private String cSftscp; | 72 | private String cSftscp; |
| 54 | 73 | ||
| 55 | - @ApiModelProperty(value = "sftscp") | 74 | + /* |
| 75 | + * sftscp | ||
| 76 | + */ | ||
| 56 | private Boolean sftscp; | 77 | private Boolean sftscp; |
| 57 | 78 | ||
| 58 | - @ApiModelProperty(value = "sz") | 79 | + /* |
| 80 | + * sz | ||
| 81 | + */ | ||
| 59 | private String sz; | 82 | private String sz; |
| 60 | 83 | ||
| 61 | - @ApiModelProperty(value = "bdwcpstxy") | 84 | + /* |
| 85 | + * bdwcpstxy | ||
| 86 | + */ | ||
| 62 | private String bdwcpstxy; | 87 | private String bdwcpstxy; |
| 63 | 88 | ||
| 64 | - @ApiModelProperty(value = "sftscps") | 89 | + /* |
| 90 | + * sftscps | ||
| 91 | + */ | ||
| 65 | private String sftscps; | 92 | private String sftscps; |
| 66 | 93 | ||
| 67 | - @ApiModelProperty(value = "zt") | 94 | + /* |
| 95 | + * zt | ||
| 96 | + */ | ||
| 68 | private String zt; | 97 | private String zt; |
| 69 | 98 | ||
| 70 | - @ApiModelProperty(value = "流程实例ID") | 99 | + /* |
| 100 | + * 流程实例ID | ||
| 101 | + */ | ||
| 71 | private String processInstanceId; | 102 | private String processInstanceId; |
| 72 | 103 | ||
| 73 | - @ApiModelProperty(value = "审批状态") | 104 | + /* |
| 105 | + * 审批状态 | ||
| 106 | + */ | ||
| 74 | private String approvalStatus; | 107 | private String approvalStatus; |
| 75 | } | 108 | } |
| 1 | package com.qgutech.qgyun.apaas.sync.cps.model; | 1 | package com.qgutech.qgyun.apaas.sync.cps.model; |
| 2 | 2 | ||
| 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | ||
| 6 | import lombok.Getter; | 4 | import lombok.Getter; |
| 7 | import lombok.Setter; | 5 | import lombok.Setter; |
| 8 | import lombok.ToString; | 6 | import lombok.ToString; |
| @@ -15,34 +13,51 @@ import javax.persistence.Table; | @@ -15,34 +13,51 @@ import javax.persistence.Table; | ||
| 15 | @Getter | 13 | @Getter |
| 16 | @Setter | 14 | @Setter |
| 17 | @ToString | 15 | @ToString |
| 18 | -@ApiModel(value = "Team", description = "班组信息") | ||
| 19 | @Table(name = "t_auto_hfca_ixzvok_bzxxgl") | 16 | @Table(name = "t_auto_hfca_ixzvok_bzxxgl") |
| 20 | public class Team extends BaseCorpModel { | 17 | public class Team extends BaseCorpModel { |
| 21 | 18 | ||
| 22 | - @ApiModelProperty(value = "班组名称") | 19 | + /* |
| 20 | + * 班组名称 | ||
| 21 | + */ | ||
| 23 | private String bzmc; | 22 | private String bzmc; |
| 24 | 23 | ||
| 25 | - @ApiModelProperty(value = "班组编号") | 24 | + /* |
| 25 | + * 班组编号 | ||
| 26 | + */ | ||
| 26 | private String bzbh; | 27 | private String bzbh; |
| 27 | 28 | ||
| 28 | - @ApiModelProperty(value = "班组负责人") | 29 | + /* |
| 30 | + * 班组负责人 | ||
| 31 | + */ | ||
| 29 | private String bzfzr; | 32 | private String bzfzr; |
| 30 | 33 | ||
| 31 | - @ApiModelProperty(value = "所属区域") | 34 | + /* |
| 35 | + * 所属区域 | ||
| 36 | + */ | ||
| 32 | private String ssqy; | 37 | private String ssqy; |
| 33 | 38 | ||
| 34 | - @ApiModelProperty(value = "班次") | 39 | + /* |
| 40 | + * 班次 | ||
| 41 | + */ | ||
| 35 | private String bc; | 42 | private String bc; |
| 36 | 43 | ||
| 37 | - @ApiModelProperty(value = "iytfgx") | 44 | + /* |
| 45 | + * iytfgx | ||
| 46 | + */ | ||
| 38 | private String iytfgx; | 47 | private String iytfgx; |
| 39 | 48 | ||
| 40 | - @ApiModelProperty(value = "班组成员") | 49 | + /* |
| 50 | + * 班组成员 | ||
| 51 | + */ | ||
| 41 | private String bzcy; | 52 | private String bzcy; |
| 42 | 53 | ||
| 43 | - @ApiModelProperty(value = "所属组织") | 54 | + /* |
| 55 | + * 所属组织 | ||
| 56 | + */ | ||
| 44 | private String sszz; | 57 | private String sszz; |
| 45 | 58 | ||
| 46 | - @ApiModelProperty(value = "状态") | 59 | + /* |
| 60 | + * 状态 | ||
| 61 | + */ | ||
| 47 | private String zt; | 62 | private String zt; |
| 48 | } | 63 | } |
| @@ -2,7 +2,6 @@ package com.qgutech.qgyun.apaas.sync.cps.model; | @@ -2,7 +2,6 @@ package com.qgutech.qgyun.apaas.sync.cps.model; | ||
| 2 | 2 | ||
| 3 | import com.qgutech.qgyun.apaas.sync.cps.enums.WorkshopStatusEnum; | 3 | import com.qgutech.qgyun.apaas.sync.cps.enums.WorkshopStatusEnum; |
| 4 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 4 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 5 | -import io.swagger.annotations.ApiModelProperty; | ||
| 6 | import lombok.Getter; | 5 | import lombok.Getter; |
| 7 | import lombok.Setter; | 6 | import lombok.Setter; |
| 8 | import lombok.ToString; | 7 | import lombok.ToString; |
| @@ -19,34 +18,41 @@ import javax.persistence.Transient; | @@ -19,34 +18,41 @@ import javax.persistence.Transient; | ||
| 19 | @Table(name = "t_auto_hfca_ixzvok_phwifn") | 18 | @Table(name = "t_auto_hfca_ixzvok_phwifn") |
| 20 | public class Workshop extends BaseCorpModel { | 19 | public class Workshop extends BaseCorpModel { |
| 21 | 20 | ||
| 22 | - /** | 21 | + /* |
| 23 | * 单位名称 | 22 | * 单位名称 |
| 24 | */ | 23 | */ |
| 25 | private String dwmc; | 24 | private String dwmc; |
| 26 | 25 | ||
| 27 | - @ApiModelProperty(value = "单位编号") | 26 | + /* |
| 27 | + * 单位编号 | ||
| 28 | + */ | ||
| 28 | private String dwbh; | 29 | private String dwbh; |
| 29 | 30 | ||
| 30 | - @ApiModelProperty(value = "所属线体") | 31 | + /* |
| 32 | + * 所属线体 | ||
| 33 | + */ | ||
| 31 | private String ssxt; | 34 | private String ssxt; |
| 32 | 35 | ||
| 33 | - @ApiModelProperty(value = "单位负责人") | 36 | + /* |
| 37 | + * 单位负责人 | ||
| 38 | + */ | ||
| 34 | private String dwfzr; | 39 | private String dwfzr; |
| 35 | 40 | ||
| 36 | - @ApiModelProperty(value = "所属组织") | 41 | + /* |
| 42 | + * 所属组织 | ||
| 43 | + */ | ||
| 37 | private String sszz; | 44 | private String sszz; |
| 38 | 45 | ||
| 39 | - /** | 46 | + /* |
| 40 | * 状态-#1#:草稿;#2#:启用;#3#:停用; | 47 | * 状态-#1#:草稿;#2#:启用;#3#:停用; |
| 41 | */ | 48 | */ |
| 42 | - @ApiModelProperty(value = "状态", hidden = true) | ||
| 43 | private String ieiblp; | 49 | private String ieiblp; |
| 44 | 50 | ||
| 45 | - /** | 51 | + /**********非持久化字段*********/ |
| 52 | + /* | ||
| 46 | * 状态中文描述(非数据库字段,用于前端展示) | 53 | * 状态中文描述(非数据库字段,用于前端展示) |
| 47 | */ | 54 | */ |
| 48 | @Transient | 55 | @Transient |
| 49 | - @ApiModelProperty(value = "状态描述") | ||
| 50 | private String statusDesc; | 56 | private String statusDesc; |
| 51 | 57 | ||
| 52 | /** | 58 | /** |
| 1 | package com.qgutech.qgyun.apaas.sync.cps.model; | 1 | package com.qgutech.qgyun.apaas.sync.cps.model; |
| 2 | 2 | ||
| 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | ||
| 6 | import lombok.Getter; | 4 | import lombok.Getter; |
| 7 | import lombok.Setter; | 5 | import lombok.Setter; |
| 8 | import lombok.ToString; | 6 | import lombok.ToString; |
| @@ -15,37 +13,56 @@ import javax.persistence.Table; | @@ -15,37 +13,56 @@ import javax.persistence.Table; | ||
| 15 | @Getter | 13 | @Getter |
| 16 | @Setter | 14 | @Setter |
| 17 | @ToString | 15 | @ToString |
| 18 | -@ApiModel(value = "Workstation", description = "工位信息") | ||
| 19 | @Table(name = "t_auto_hfca_ixzvok_jtcffk") | 16 | @Table(name = "t_auto_hfca_ixzvok_jtcffk") |
| 20 | public class Workstation extends BaseCorpModel { | 17 | public class Workstation extends BaseCorpModel { |
| 21 | 18 | ||
| 22 | - @ApiModelProperty(value = "工位名称") | 19 | + /* |
| 20 | + * 工位名称 | ||
| 21 | + */ | ||
| 23 | private String gwmc; | 22 | private String gwmc; |
| 24 | 23 | ||
| 25 | - @ApiModelProperty(value = "工位编号") | 24 | + /* |
| 25 | + * 工位编号 | ||
| 26 | + */ | ||
| 26 | private String gwbh; | 27 | private String gwbh; |
| 27 | 28 | ||
| 28 | - @ApiModelProperty(value = "工位性质") | 29 | + /* |
| 30 | + * 工位性质 | ||
| 31 | + */ | ||
| 29 | private String gwxz; | 32 | private String gwxz; |
| 30 | 33 | ||
| 31 | - @ApiModelProperty(value = "所属区域") | 34 | + /* |
| 35 | + * 所属区域 | ||
| 36 | + */ | ||
| 32 | private String ssqy; | 37 | private String ssqy; |
| 33 | 38 | ||
| 34 | - @ApiModelProperty(value = "所属班组") | 39 | + /* |
| 40 | + * 所属班组 | ||
| 41 | + */ | ||
| 35 | private String ssbz; | 42 | private String ssbz; |
| 36 | 43 | ||
| 37 | - @ApiModelProperty(value = "所属车间") | 44 | + /* |
| 45 | + * 所属车间 | ||
| 46 | + */ | ||
| 38 | private String sscj; | 47 | private String sscj; |
| 39 | 48 | ||
| 40 | - @ApiModelProperty(value = "所属室组") | 49 | + /* |
| 50 | + * 所属室组 | ||
| 51 | + */ | ||
| 41 | private String ssqz; | 52 | private String ssqz; |
| 42 | 53 | ||
| 43 | - @ApiModelProperty(value = "状态") | 54 | + /* |
| 55 | + * 状态 | ||
| 56 | + */ | ||
| 44 | private String zt; | 57 | private String zt; |
| 45 | 58 | ||
| 46 | - @ApiModelProperty(value = "线体") | 59 | + /* |
| 60 | + * 线体 | ||
| 61 | + */ | ||
| 47 | private String xt; | 62 | private String xt; |
| 48 | 63 | ||
| 49 | - @ApiModelProperty(value = "byiwiz") | 64 | + /* |
| 65 | + * byiwiz | ||
| 66 | + */ | ||
| 50 | private String byiwiz; | 67 | private String byiwiz; |
| 51 | } | 68 | } |
| 1 | package com.qgutech.qgyun.apaas.sync.cps.model; | 1 | package com.qgutech.qgyun.apaas.sync.cps.model; |
| 2 | 2 | ||
| 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 4 | -import io.swagger.annotations.ApiModel; | ||
| 5 | -import io.swagger.annotations.ApiModelProperty; | ||
| 6 | import lombok.Getter; | 4 | import lombok.Getter; |
| 7 | import lombok.Setter; | 5 | import lombok.Setter; |
| 8 | import lombok.ToString; | 6 | import lombok.ToString; |
| @@ -15,19 +13,26 @@ import javax.persistence.Table; | @@ -15,19 +13,26 @@ import javax.persistence.Table; | ||
| 15 | @Getter | 13 | @Getter |
| 16 | @Setter | 14 | @Setter |
| 17 | @ToString | 15 | @ToString |
| 18 | -@ApiModel(value = "XtLine", description = "线体信息") | ||
| 19 | @Table(name = "t_auto_hfca_ixzvok_umsoxi") | 16 | @Table(name = "t_auto_hfca_ixzvok_umsoxi") |
| 20 | public class XtLine extends BaseCorpModel { | 17 | public class XtLine extends BaseCorpModel { |
| 21 | 18 | ||
| 22 | - @ApiModelProperty(value = "线体名称") | 19 | + /* |
| 20 | + * 线体名称 | ||
| 21 | + */ | ||
| 23 | private String xtmc; | 22 | private String xtmc; |
| 24 | 23 | ||
| 25 | - @ApiModelProperty(value = "线体编号") | 24 | + /* |
| 25 | + * 线体编号 | ||
| 26 | + */ | ||
| 26 | private String xtbh; | 27 | private String xtbh; |
| 27 | 28 | ||
| 28 | - @ApiModelProperty(value = "线体负责人") | 29 | + /* |
| 30 | + * 线体负责人 | ||
| 31 | + */ | ||
| 29 | private String xtfzr; | 32 | private String xtfzr; |
| 30 | 33 | ||
| 31 | - @ApiModelProperty(value = "amoigs") | 34 | + /* |
| 35 | + * amoigs | ||
| 36 | + */ | ||
| 32 | private String amoigs; | 37 | private String amoigs; |
| 33 | } | 38 | } |
| @@ -6,7 +6,6 @@ import com.qgutech.qgyun.apaas.sync.base.BoErrorCode; | @@ -6,7 +6,6 @@ import com.qgutech.qgyun.apaas.sync.base.BoErrorCode; | ||
| 6 | import com.qgutech.qgyun.apaas.sync.base.BoException; | 6 | import com.qgutech.qgyun.apaas.sync.base.BoException; |
| 7 | import com.qgutech.qgyun.apaas.sync.cps.dto.AbImprovementSummaryDTO; | 7 | import com.qgutech.qgyun.apaas.sync.cps.dto.AbImprovementSummaryDTO; |
| 8 | import com.qgutech.qgyun.apaas.sync.cps.mapper.AbImprovementMapper; | 8 | import com.qgutech.qgyun.apaas.sync.cps.mapper.AbImprovementMapper; |
| 9 | -import com.qgutech.qgyun.apaas.sync.cps.mapper.AbImprovementTargetMapper; | ||
| 10 | import com.qgutech.qgyun.apaas.sync.cps.model.AbImprovement; | 9 | import com.qgutech.qgyun.apaas.sync.cps.model.AbImprovement; |
| 11 | import com.qgutech.qgyun.apaas.sync.cps.model.AbImprovementTarget; | 10 | import com.qgutech.qgyun.apaas.sync.cps.model.AbImprovementTarget; |
| 12 | import com.qgutech.qgyun.apaas.sync.cps.model.Workshop; | 11 | import com.qgutech.qgyun.apaas.sync.cps.model.Workshop; |
| @@ -18,8 +17,6 @@ import org.springframework.util.Assert; | @@ -18,8 +17,6 @@ import org.springframework.util.Assert; | ||
| 18 | import tk.mybatis.mapper.entity.Example; | 17 | import tk.mybatis.mapper.entity.Example; |
| 19 | 18 | ||
| 20 | import javax.annotation.Resource; | 19 | import javax.annotation.Resource; |
| 21 | -import java.text.ParseException; | ||
| 22 | -import java.text.SimpleDateFormat; | ||
| 23 | import java.util.*; | 20 | import java.util.*; |
| 24 | import java.util.stream.Collectors; | 21 | import java.util.stream.Collectors; |
| 25 | 22 | ||
| @@ -143,7 +140,7 @@ public class AbImprovementService extends BaseServiceImpl<AbImprovement> { | @@ -143,7 +140,7 @@ public class AbImprovementService extends BaseServiceImpl<AbImprovement> { | ||
| 143 | 140 | ||
| 144 | // 7. 组装汇总结果(每个单位车间一条记录) | 141 | // 7. 组装汇总结果(每个单位车间一条记录) |
| 145 | Map<String, Double> finalTargetMap = targetMap; | 142 | Map<String, Double> finalTargetMap = targetMap; |
| 146 | - return dwcjSummaryMap.entrySet().stream() | 143 | + List<AbImprovementSummaryDTO> resultList = dwcjSummaryMap.entrySet().stream() |
| 147 | .map(entry -> { | 144 | .map(entry -> { |
| 148 | String dwcj = entry.getKey(); | 145 | String dwcj = entry.getKey(); |
| 149 | AbImprovementSummaryDTO dto = new AbImprovementSummaryDTO(); | 146 | AbImprovementSummaryDTO dto = new AbImprovementSummaryDTO(); |
| @@ -151,7 +148,7 @@ public class AbImprovementService extends BaseServiceImpl<AbImprovement> { | @@ -151,7 +148,7 @@ public class AbImprovementService extends BaseServiceImpl<AbImprovement> { | ||
| 151 | dto.setYear(queryYear); | 148 | dto.setYear(queryYear); |
| 152 | dto.setTotalQnjyjz(entry.getValue()); | 149 | dto.setTotalQnjyjz(entry.getValue()); |
| 153 | dto.setMb(finalTargetMap.get(dwcj)); | 150 | dto.setMb(finalTargetMap.get(dwcj)); |
| 154 | - // 设置单位车间名称 | 151 | + // 设置单位车间名称、编号 |
| 155 | Workshop workshop = workshopMap.get(dwcj); | 152 | Workshop workshop = workshopMap.get(dwcj); |
| 156 | if (workshop != null) { | 153 | if (workshop != null) { |
| 157 | dto.setDwcjName(workshop.getDwmc()); | 154 | dto.setDwcjName(workshop.getDwmc()); |
| @@ -164,5 +161,10 @@ public class AbImprovementService extends BaseServiceImpl<AbImprovement> { | @@ -164,5 +161,10 @@ public class AbImprovementService extends BaseServiceImpl<AbImprovement> { | ||
| 164 | return dto; | 161 | return dto; |
| 165 | }) | 162 | }) |
| 166 | .collect(Collectors.toList()); | 163 | .collect(Collectors.toList()); |
| 164 | + | ||
| 165 | + // 8. 按单位车间编号升序排序,编号为空的排在最后 | ||
| 166 | + resultList.sort(Comparator.comparing(AbImprovementSummaryDTO::getDwcjCode, | ||
| 167 | + Comparator.nullsLast(Comparator.naturalOrder()))); | ||
| 168 | + return resultList; | ||
| 167 | } | 169 | } |
| 168 | } | 170 | } |
| 1 | package com.qgutech.qgyun.apaas.sync.cps.service; | 1 | package com.qgutech.qgyun.apaas.sync.cps.service; |
| 2 | 2 | ||
| 3 | -import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl; | ||
| 4 | import com.qgutech.qgyun.apaas.sync.base.BoErrorCode; | 3 | import com.qgutech.qgyun.apaas.sync.base.BoErrorCode; |
| 5 | import com.qgutech.qgyun.apaas.sync.base.BoException; | 4 | import com.qgutech.qgyun.apaas.sync.base.BoException; |
| 5 | +import com.qgutech.qgyun.apaas.sync.cps.dto.CImprovementDetailDTO; | ||
| 6 | import com.qgutech.qgyun.apaas.sync.cps.dto.CImprovementSummaryDTO; | 6 | import com.qgutech.qgyun.apaas.sync.cps.dto.CImprovementSummaryDTO; |
| 7 | import com.qgutech.qgyun.apaas.sync.cps.enums.QuarterEnum; | 7 | import com.qgutech.qgyun.apaas.sync.cps.enums.QuarterEnum; |
| 8 | +import com.qgutech.qgyun.apaas.sync.cps.enums.CImprovementStatusEnum; | ||
| 8 | import com.qgutech.qgyun.apaas.sync.cps.mapper.CImprovementMapper; | 9 | import com.qgutech.qgyun.apaas.sync.cps.mapper.CImprovementMapper; |
| 9 | -import com.qgutech.qgyun.apaas.sync.cps.mapper.CImprovementTargetMapper; | 10 | +import com.qgutech.qgyun.apaas.sync.cps.model.Area; |
| 10 | import com.qgutech.qgyun.apaas.sync.cps.model.CImprovement; | 11 | import com.qgutech.qgyun.apaas.sync.cps.model.CImprovement; |
| 11 | import com.qgutech.qgyun.apaas.sync.cps.model.CImprovementTarget; | 12 | import com.qgutech.qgyun.apaas.sync.cps.model.CImprovementTarget; |
| 13 | +import com.qgutech.qgyun.apaas.sync.cps.model.Personnel; | ||
| 12 | import com.qgutech.qgyun.apaas.sync.cps.model.QuarterPersonnel; | 14 | import com.qgutech.qgyun.apaas.sync.cps.model.QuarterPersonnel; |
| 13 | import com.qgutech.qgyun.apaas.sync.cps.model.RoomGroup; | 15 | import com.qgutech.qgyun.apaas.sync.cps.model.RoomGroup; |
| 16 | +import com.qgutech.qgyun.apaas.sync.cps.model.Team; | ||
| 14 | import com.qgutech.qgyun.apaas.sync.cps.model.Workshop; | 17 | import com.qgutech.qgyun.apaas.sync.cps.model.Workshop; |
| 18 | +import com.qgutech.qgyun.apaas.sync.org.model.UcOrg; | ||
| 19 | +import com.qgutech.qgyun.apaas.sync.org.model.UcUser; | ||
| 20 | +import com.qgutech.qgyun.apaas.sync.org.service.UcOrgService; | ||
| 21 | +import com.qgutech.qgyun.apaas.sync.org.service.UcUserService; | ||
| 22 | +import com.qgutech.qgyun.apaas.sync.utils.DateDealUtils; | ||
| 23 | +import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl; | ||
| 15 | import org.apache.commons.collections4.CollectionUtils; | 24 | import org.apache.commons.collections4.CollectionUtils; |
| 16 | import org.apache.commons.lang3.StringUtils; | 25 | import org.apache.commons.lang3.StringUtils; |
| 26 | +import org.springframework.beans.BeanUtils; | ||
| 17 | import org.springframework.stereotype.Service; | 27 | import org.springframework.stereotype.Service; |
| 18 | import org.springframework.transaction.annotation.Transactional; | 28 | import org.springframework.transaction.annotation.Transactional; |
| 19 | import org.springframework.util.Assert; | 29 | import org.springframework.util.Assert; |
| 20 | import tk.mybatis.mapper.entity.Example; | 30 | import tk.mybatis.mapper.entity.Example; |
| 21 | 31 | ||
| 22 | import javax.annotation.Resource; | 32 | import javax.annotation.Resource; |
| 23 | -import java.text.ParseException; | ||
| 24 | -import java.text.SimpleDateFormat; | ||
| 25 | import java.util.*; | 33 | import java.util.*; |
| 26 | import java.util.stream.Collectors; | 34 | import java.util.stream.Collectors; |
| 27 | 35 | ||
| @@ -35,7 +43,7 @@ public class CImprovementService extends BaseServiceImpl<CImprovement> { | @@ -35,7 +43,7 @@ public class CImprovementService extends BaseServiceImpl<CImprovement> { | ||
| 35 | private CImprovementMapper cImprovementMapper; | 43 | private CImprovementMapper cImprovementMapper; |
| 36 | 44 | ||
| 37 | @Resource | 45 | @Resource |
| 38 | - private CImprovementTargetMapper cImprovementTargetMapper; | 46 | + private CImprovementTargetService cImprovementTargetService; |
| 39 | 47 | ||
| 40 | @Resource | 48 | @Resource |
| 41 | private QuarterPersonnelService quarterPersonnelService; | 49 | private QuarterPersonnelService quarterPersonnelService; |
| @@ -46,6 +54,21 @@ public class CImprovementService extends BaseServiceImpl<CImprovement> { | @@ -46,6 +54,21 @@ public class CImprovementService extends BaseServiceImpl<CImprovement> { | ||
| 46 | @Resource | 54 | @Resource |
| 47 | private WorkshopService workshopService; | 55 | private WorkshopService workshopService; |
| 48 | 56 | ||
| 57 | + @Resource | ||
| 58 | + private TeamService teamService; | ||
| 59 | + | ||
| 60 | + @Resource | ||
| 61 | + private AreaService areaService; | ||
| 62 | + | ||
| 63 | + @Resource | ||
| 64 | + private PersonnelService personnelService; | ||
| 65 | + | ||
| 66 | + @Resource | ||
| 67 | + private UcUserService ucUserService; | ||
| 68 | + | ||
| 69 | + @Resource | ||
| 70 | + private UcOrgService ucOrgService; | ||
| 71 | + | ||
| 49 | @Transactional(readOnly = true) | 72 | @Transactional(readOnly = true) |
| 50 | public CImprovement getById(String id) { | 73 | public CImprovement getById(String id) { |
| 51 | Assert.hasLength(id, "id is empty!"); | 74 | Assert.hasLength(id, "id is empty!"); |
| @@ -91,13 +114,13 @@ public class CImprovementService extends BaseServiceImpl<CImprovement> { | @@ -91,13 +114,13 @@ public class CImprovementService extends BaseServiceImpl<CImprovement> { | ||
| 91 | } | 114 | } |
| 92 | 115 | ||
| 93 | /** | 116 | /** |
| 94 | - * 根据年份和季度查询C类改善汇总(按单位车间分组) | 117 | + * 根据年份和季度查询C类改善汇总(按室组维度分组) |
| 95 | * <p> | 118 | * <p> |
| 96 | - * 年份为空时默认查询当前年,季度必传 | 119 | + * 年份为空时默认查询当前年,季度必传;返回列表按室组编号升序排序 |
| 97 | * | 120 | * |
| 98 | * @param year 年份,格式:yyyy,可为空 | 121 | * @param year 年份,格式:yyyy,可为空 |
| 99 | * @param quarter 季度枚举值(#1#-#4#),必传 | 122 | * @param quarter 季度枚举值(#1#-#4#),必传 |
| 100 | - * @return C类改善汇总列表 | 123 | + * @return C类改善汇总列表(按室组编号升序) |
| 101 | */ | 124 | */ |
| 102 | @Transactional(readOnly = true) | 125 | @Transactional(readOnly = true) |
| 103 | public List<CImprovementSummaryDTO> summaryByYearAndQuarter(String year, String quarter) { | 126 | public List<CImprovementSummaryDTO> summaryByYearAndQuarter(String year, String quarter) { |
| @@ -111,28 +134,27 @@ public class CImprovementService extends BaseServiceImpl<CImprovement> { | @@ -111,28 +134,27 @@ public class CImprovementService extends BaseServiceImpl<CImprovement> { | ||
| 111 | Assert.isTrue(queryYear.matches("\\d{4}"), "year format must be yyyy!"); | 134 | Assert.isTrue(queryYear.matches("\\d{4}"), "year format must be yyyy!"); |
| 112 | 135 | ||
| 113 | // 3. 计算季度的开始时间和结束时间 | 136 | // 3. 计算季度的开始时间和结束时间 |
| 114 | - Date startTime = parseQuarterStartTime(queryYear, quarterEnum); | ||
| 115 | - Date endTime = parseQuarterEndTime(queryYear, quarterEnum); | 137 | + Date startTime = DateDealUtils.parseQuarterStartTime(queryYear, quarterEnum); |
| 138 | + Date endTime = DateDealUtils.parseQuarterEndTime(queryYear, quarterEnum); | ||
| 116 | 139 | ||
| 117 | // 4. 查询该季度时间范围内的C类改善记录 | 140 | // 4. 查询该季度时间范围内的C类改善记录 |
| 118 | Example example = new Example(CImprovement.class); | 141 | Example example = new Example(CImprovement.class); |
| 119 | example.createCriteria() | 142 | example.createCriteria() |
| 120 | - .andBetween("createTime", startTime, endTime); | 143 | + .andBetween(CImprovement.CREATED_AT, startTime, endTime); |
| 121 | List<CImprovement> cImprovementList = cImprovementMapper.selectByExample(example); | 144 | List<CImprovement> cImprovementList = cImprovementMapper.selectByExample(example); |
| 122 | 145 | ||
| 123 | // 5. 查询该年份季度的季度人员信息 | 146 | // 5. 查询该年份季度的季度人员信息 |
| 124 | - Date yearStartTime = parseYearStartTime(queryYear); | ||
| 125 | - List<QuarterPersonnel> quarterPersonnelList = quarterPersonnelService.listByYearAndQuarter(yearStartTime, quarter); | 147 | + List<QuarterPersonnel> quarterPersonnelList = quarterPersonnelService.listByYearAndQuarter(queryYear, quarterEnum); |
| 126 | 148 | ||
| 127 | if (CollectionUtils.isEmpty(quarterPersonnelList)) { | 149 | if (CollectionUtils.isEmpty(quarterPersonnelList)) { |
| 128 | return new ArrayList<>(0); | 150 | return new ArrayList<>(0); |
| 129 | } | 151 | } |
| 130 | 152 | ||
| 131 | - // 6. 构建人员工号到季度人员信息的映射 | 153 | + // 6. 构建人员id到季度人员信息的映射 |
| 132 | Map<String, QuarterPersonnel> personnelMap = quarterPersonnelList.stream() | 154 | Map<String, QuarterPersonnel> personnelMap = quarterPersonnelList.stream() |
| 133 | .filter(item -> item.getRygh() != null) | 155 | .filter(item -> item.getRygh() != null) |
| 134 | .collect(Collectors.toMap( | 156 | .collect(Collectors.toMap( |
| 135 | - QuarterPersonnel::getRygh, | 157 | + QuarterPersonnel::getYhry, |
| 136 | item -> item, | 158 | item -> item, |
| 137 | (v1, v2) -> v1 | 159 | (v1, v2) -> v1 |
| 138 | )); | 160 | )); |
| @@ -146,13 +168,12 @@ public class CImprovementService extends BaseServiceImpl<CImprovement> { | @@ -146,13 +168,12 @@ public class CImprovementService extends BaseServiceImpl<CImprovement> { | ||
| 146 | )); | 168 | )); |
| 147 | 169 | ||
| 148 | // 8. 统计每个室组有C类改善记录的人数(同一人多条记录算一次) | 170 | // 8. 统计每个室组有C类改善记录的人数(同一人多条记录算一次) |
| 149 | - // 先获取有改善记录的发起人工号集合 | ||
| 150 | - Set<String> improvementFqrSet = cImprovementList.stream() | 171 | + Set<String> improvementFqrSet = CollectionUtils.isEmpty(cImprovementList) ? Collections.emptySet() |
| 172 | + : cImprovementList.stream() | ||
| 151 | .filter(item -> item.getFqr() != null) | 173 | .filter(item -> item.getFqr() != null) |
| 152 | .map(CImprovement::getFqr) | 174 | .map(CImprovement::getFqr) |
| 153 | .collect(Collectors.toSet()); | 175 | .collect(Collectors.toSet()); |
| 154 | 176 | ||
| 155 | - // 按室组统计有改善记录的人数 | ||
| 156 | Map<String, Set<String>> roomGroupImprovementPersonnelMap = new HashMap<>(); | 177 | Map<String, Set<String>> roomGroupImprovementPersonnelMap = new HashMap<>(); |
| 157 | for (String fqr : improvementFqrSet) { | 178 | for (String fqr : improvementFqrSet) { |
| 158 | QuarterPersonnel personnel = personnelMap.get(fqr); | 179 | QuarterPersonnel personnel = personnelMap.get(fqr); |
| @@ -161,13 +182,8 @@ public class CImprovementService extends BaseServiceImpl<CImprovement> { | @@ -161,13 +182,8 @@ public class CImprovementService extends BaseServiceImpl<CImprovement> { | ||
| 161 | } | 182 | } |
| 162 | } | 183 | } |
| 163 | 184 | ||
| 164 | - // 9. 查询该年份的C类目标信息(按室组维度) | ||
| 165 | - Example targetExample = new Example(CImprovementTarget.class); | ||
| 166 | - targetExample.createCriteria() | ||
| 167 | - .andEqualTo("year", yearStartTime); | ||
| 168 | - List<CImprovementTarget> targetList = cImprovementTargetMapper.selectByExample(targetExample); | ||
| 169 | - | ||
| 170 | - // 构建目标值映射Map:szxx(室组) -> mb | 185 | + // 9. 查询该年份的C类目标信息(按室组维度),走 CImprovementTargetService |
| 186 | + List<CImprovementTarget> targetList = cImprovementTargetService.listByYear(queryYear); | ||
| 171 | Map<String, Double> targetMap = new HashMap<>(); | 187 | Map<String, Double> targetMap = new HashMap<>(); |
| 172 | if (CollectionUtils.isNotEmpty(targetList)) { | 188 | if (CollectionUtils.isNotEmpty(targetList)) { |
| 173 | targetMap = targetList.stream() | 189 | targetMap = targetList.stream() |
| @@ -179,29 +195,26 @@ public class CImprovementService extends BaseServiceImpl<CImprovement> { | @@ -179,29 +195,26 @@ public class CImprovementService extends BaseServiceImpl<CImprovement> { | ||
| 179 | )); | 195 | )); |
| 180 | } | 196 | } |
| 181 | 197 | ||
| 182 | - // 10. 查询室组详细信息(室组名称、所属单位) | 198 | + // 10. 查询室组详细信息(室组名称、室组编号、所属单位) |
| 183 | Set<String> roomGroupIds = roomGroupPersonnelCountMap.keySet(); | 199 | Set<String> roomGroupIds = roomGroupPersonnelCountMap.keySet(); |
| 184 | - Map<String, RoomGroup> roomGroupMap = new HashMap<>(); | ||
| 185 | - if (CollectionUtils.isNotEmpty(roomGroupIds)) { | ||
| 186 | - roomGroupMap = roomGroupService.mapByIds(roomGroupIds); | ||
| 187 | - } | 200 | + Map<String, RoomGroup> roomGroupMap = CollectionUtils.isEmpty(roomGroupIds) |
| 201 | + ? new HashMap<>(0) | ||
| 202 | + : roomGroupService.mapByIds(roomGroupIds); | ||
| 188 | 203 | ||
| 189 | - // 11. 根据室组所属单位查询单位车间详细信息 | 204 | + // 11. 根据室组所属单位查询单位车间详细信息(含单位编号) |
| 190 | Set<String> dwcjIds = roomGroupMap.values().stream() | 205 | Set<String> dwcjIds = roomGroupMap.values().stream() |
| 191 | .map(RoomGroup::getSsdw) | 206 | .map(RoomGroup::getSsdw) |
| 192 | .filter(Objects::nonNull) | 207 | .filter(Objects::nonNull) |
| 193 | .collect(Collectors.toSet()); | 208 | .collect(Collectors.toSet()); |
| 194 | - Map<String, Workshop> workshopMap = new HashMap<>(); | ||
| 195 | - if (CollectionUtils.isNotEmpty(dwcjIds)) { | ||
| 196 | - workshopMap = workshopService.mapByIds(dwcjIds); | ||
| 197 | - } | 209 | + Map<String, Workshop> workshopMap = CollectionUtils.isEmpty(dwcjIds) |
| 210 | + ? new HashMap<>(0) | ||
| 211 | + : workshopService.mapByIds(dwcjIds); | ||
| 198 | 212 | ||
| 199 | // 12. 组装汇总结果(按室组维度) | 213 | // 12. 组装汇总结果(按室组维度) |
| 200 | Map<String, Double> finalTargetMap = targetMap; | 214 | Map<String, Double> finalTargetMap = targetMap; |
| 201 | Map<String, RoomGroup> finalRoomGroupMap = roomGroupMap; | 215 | Map<String, RoomGroup> finalRoomGroupMap = roomGroupMap; |
| 202 | Map<String, Workshop> finalWorkshopMap = workshopMap; | 216 | Map<String, Workshop> finalWorkshopMap = workshopMap; |
| 203 | - String finalQueryYear = queryYear; | ||
| 204 | - return roomGroupPersonnelCountMap.entrySet().stream() | 217 | + List<CImprovementSummaryDTO> resultList = roomGroupPersonnelCountMap.entrySet().stream() |
| 205 | .map(entry -> { | 218 | .map(entry -> { |
| 206 | String szxx = entry.getKey(); | 219 | String szxx = entry.getKey(); |
| 207 | int totalPersonnel = entry.getValue().intValue(); | 220 | int totalPersonnel = entry.getValue().intValue(); |
| @@ -209,7 +222,7 @@ public class CImprovementService extends BaseServiceImpl<CImprovement> { | @@ -209,7 +222,7 @@ public class CImprovementService extends BaseServiceImpl<CImprovement> { | ||
| 209 | 222 | ||
| 210 | CImprovementSummaryDTO dto = new CImprovementSummaryDTO(); | 223 | CImprovementSummaryDTO dto = new CImprovementSummaryDTO(); |
| 211 | dto.setSzxx(szxx); | 224 | dto.setSzxx(szxx); |
| 212 | - dto.setYear(finalQueryYear); | 225 | + dto.setYear(queryYear); |
| 213 | dto.setQuarter(quarter); | 226 | dto.setQuarter(quarter); |
| 214 | dto.setQuarterDesc(quarterEnum.getDesc()); | 227 | dto.setQuarterDesc(quarterEnum.getDesc()); |
| 215 | dto.setTotalPersonnel(totalPersonnel); | 228 | dto.setTotalPersonnel(totalPersonnel); |
| @@ -217,15 +230,17 @@ public class CImprovementService extends BaseServiceImpl<CImprovement> { | @@ -217,15 +230,17 @@ public class CImprovementService extends BaseServiceImpl<CImprovement> { | ||
| 217 | // 目标值按室组维度匹配 | 230 | // 目标值按室组维度匹配 |
| 218 | dto.setMb(finalTargetMap.get(szxx)); | 231 | dto.setMb(finalTargetMap.get(szxx)); |
| 219 | 232 | ||
| 220 | - // 设置室组名称及所属单位车间信息 | 233 | + // 设置室组名称、室组编号及所属单位车间信息 |
| 221 | RoomGroup roomGroup = finalRoomGroupMap.get(szxx); | 234 | RoomGroup roomGroup = finalRoomGroupMap.get(szxx); |
| 222 | if (roomGroup != null) { | 235 | if (roomGroup != null) { |
| 223 | dto.setSzmc(roomGroup.getSzmc()); | 236 | dto.setSzmc(roomGroup.getSzmc()); |
| 237 | + dto.setSzbh(roomGroup.getSzbh()); | ||
| 224 | String dwcj = roomGroup.getSsdw(); | 238 | String dwcj = roomGroup.getSsdw(); |
| 225 | dto.setDwcj(dwcj); | 239 | dto.setDwcj(dwcj); |
| 226 | Workshop workshop = finalWorkshopMap.get(dwcj); | 240 | Workshop workshop = finalWorkshopMap.get(dwcj); |
| 227 | if (workshop != null) { | 241 | if (workshop != null) { |
| 228 | dto.setDwcjName(workshop.getDwmc()); | 242 | dto.setDwcjName(workshop.getDwmc()); |
| 243 | + dto.setDwcjCode(workshop.getDwbh()); | ||
| 229 | } | 244 | } |
| 230 | } | 245 | } |
| 231 | 246 | ||
| @@ -237,41 +252,179 @@ public class CImprovementService extends BaseServiceImpl<CImprovement> { | @@ -237,41 +252,179 @@ public class CImprovementService extends BaseServiceImpl<CImprovement> { | ||
| 237 | return dto; | 252 | return dto; |
| 238 | }) | 253 | }) |
| 239 | .collect(Collectors.toList()); | 254 | .collect(Collectors.toList()); |
| 255 | + | ||
| 256 | + // 13. 按室组编号升序排序,编号为空的排在最后 | ||
| 257 | + resultList.sort(Comparator.comparing(CImprovementSummaryDTO::getSzbh, | ||
| 258 | + Comparator.nullsLast(Comparator.naturalOrder()))); | ||
| 259 | + return resultList; | ||
| 240 | } | 260 | } |
| 241 | 261 | ||
| 242 | /** | 262 | /** |
| 243 | - * 解析年份开始时间 | 263 | + * 根据年份、季度、单位车间id查询C类改善记录详情列表 |
| 264 | + * <p> | ||
| 265 | + * 查询该年份季度时间范围内、由该单位车间下人员发起的C类改善记录, | ||
| 266 | + * 并将记录中涉及的单位、室组、区域、班组、发起人、部门等关联实体名称补充完整 | ||
| 267 | + * | ||
| 268 | + * @param year 年份,格式:yyyy,可为空(默认当前年) | ||
| 269 | + * @param quarter 季度枚举值(#1#-#4#),必传 | ||
| 270 | + * @param roomGroupId 室组id,必传 | ||
| 271 | + * @return C类改善记录详情列表(含关联实体名称) | ||
| 244 | */ | 272 | */ |
| 245 | - private Date parseYearStartTime(String year) { | ||
| 246 | - try { | ||
| 247 | - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | ||
| 248 | - return sdf.parse(year + "-01-01 00:00:00"); | ||
| 249 | - } catch (ParseException e) { | ||
| 250 | - throw new BoException(BoErrorCode.PARAM_ERROR, "年份格式错误"); | 273 | + @Transactional(readOnly = true) |
| 274 | + public List<CImprovementDetailDTO> listDetailByYearQuarterAndRoomGroup(String year, String quarter, String roomGroupId) { | ||
| 275 | + // 1. 校验参数 | ||
| 276 | + Assert.hasLength(quarter, "quarter is empty!"); | ||
| 277 | + Assert.hasLength(roomGroupId, "roomGroupId is empty!"); | ||
| 278 | + QuarterEnum quarterEnum = QuarterEnum.fromCode(quarter); | ||
| 279 | + Assert.notNull(quarterEnum, "quarter format is invalid!"); | ||
| 280 | + | ||
| 281 | + String queryYear = StringUtils.isBlank(year) ? String.valueOf(Calendar.getInstance().get(Calendar.YEAR)) : year; | ||
| 282 | + Assert.isTrue(queryYear.matches("\\d{4}"), "year format must be yyyy!"); | ||
| 283 | + | ||
| 284 | + // 2. 计算季度时间范围 | ||
| 285 | + Date startTime = DateDealUtils.parseQuarterStartTime(queryYear, quarterEnum); | ||
| 286 | + Date endTime = DateDealUtils.parseQuarterEndTime(queryYear, quarterEnum); | ||
| 287 | + | ||
| 288 | + // 3. 查询该年份季度该室组下的季度人员信息 | ||
| 289 | + List<QuarterPersonnel> quarterPersonnelList = quarterPersonnelService.listByYearQuarterAndRoomGroup(queryYear, quarterEnum, roomGroupId); | ||
| 290 | + if (CollectionUtils.isEmpty(quarterPersonnelList)) { | ||
| 291 | + return new ArrayList<>(0); | ||
| 251 | } | 292 | } |
| 252 | - } | ||
| 253 | 293 | ||
| 254 | - /** | ||
| 255 | - * 解析季度开始时间 | ||
| 256 | - */ | ||
| 257 | - private Date parseQuarterStartTime(String year, QuarterEnum quarter) { | ||
| 258 | - try { | ||
| 259 | - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | ||
| 260 | - return sdf.parse(year + "-" + quarter.getStartDate() + " 00:00:00"); | ||
| 261 | - } catch (ParseException e) { | ||
| 262 | - throw new BoException(BoErrorCode.PARAM_ERROR, "季度日期格式错误"); | 294 | + // 4. 获取人员id集合(yhry),用于匹配C类改善记录的发起人 |
| 295 | + Set<String> personnelYhrySet = quarterPersonnelList.stream() | ||
| 296 | + .filter(item -> item.getYhry() != null) | ||
| 297 | + .map(QuarterPersonnel::getYhry) | ||
| 298 | + .collect(Collectors.toSet()); | ||
| 299 | + if (CollectionUtils.isEmpty(personnelYhrySet)) { | ||
| 300 | + return new ArrayList<>(0); | ||
| 263 | } | 301 | } |
| 264 | - } | ||
| 265 | 302 | ||
| 266 | - /** | ||
| 267 | - * 解析季度结束时间 | ||
| 268 | - */ | ||
| 269 | - private Date parseQuarterEndTime(String year, QuarterEnum quarter) { | ||
| 270 | - try { | ||
| 271 | - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | ||
| 272 | - return sdf.parse(year + "-" + quarter.getEndDate() + " 23:59:59"); | ||
| 273 | - } catch (ParseException e) { | ||
| 274 | - throw new BoException(BoErrorCode.PARAM_ERROR, "季度日期格式错误"); | 303 | + // 5. 查询该季度时间范围内、发起人属于该单位车间人员的C类改善记录 |
| 304 | + Example example = new Example(CImprovement.class); | ||
| 305 | + example.createCriteria() | ||
| 306 | + .andBetween(CImprovement.CREATED_AT, startTime, endTime) | ||
| 307 | + .andIn(CImprovement.FQR, personnelYhrySet); | ||
| 308 | + List<CImprovement> cImprovementList = cImprovementMapper.selectByExample(example); | ||
| 309 | + if (CollectionUtils.isEmpty(cImprovementList)) { | ||
| 310 | + return new ArrayList<>(0); | ||
| 311 | + } | ||
| 312 | + | ||
| 313 | + // 6. 收集所有关联实体ID | ||
| 314 | + Set<String> roomGroupIds = new HashSet<>(); | ||
| 315 | + Set<String> teamIds = new HashSet<>(); | ||
| 316 | + Set<String> orgIds = new HashSet<>(); | ||
| 317 | + Set<String> userIds = new HashSet<>(); | ||
| 318 | + Set<String> areaIds = new HashSet<>(); | ||
| 319 | + Set<String> workshopIds = new HashSet<>(); | ||
| 320 | + | ||
| 321 | + for (CImprovement item : cImprovementList) { | ||
| 322 | + if (item.getSzmc() != null) roomGroupIds.add(item.getSzmc()); | ||
| 323 | + if (item.getBz() != null) teamIds.add(item.getBz()); | ||
| 324 | + if (item.getBm() != null) orgIds.add(item.getBm()); | ||
| 325 | + if (item.getQzqr() != null) userIds.add(item.getQzqr()); | ||
| 326 | + if (item.getGsyqr() != null) userIds.add(item.getGsyqr()); | ||
| 327 | + if (item.getFqr() != null) userIds.add(item.getFqr()); | ||
| 275 | } | 328 | } |
| 329 | + | ||
| 330 | + // 从季度人员信息中收集区域id和单位车间id | ||
| 331 | + for (QuarterPersonnel qp : quarterPersonnelList) { | ||
| 332 | + if (qp.getSsqy() != null) areaIds.add(qp.getSsqy()); | ||
| 333 | + if (qp.getShdw() != null) workshopIds.add(qp.getShdw()); | ||
| 334 | + } | ||
| 335 | + | ||
| 336 | + // 7. 批量查询关联实体 | ||
| 337 | + Map<String, RoomGroup> roomGroupMap = CollectionUtils.isEmpty(roomGroupIds) | ||
| 338 | + ? new HashMap<>(0) : roomGroupService.mapByIds(roomGroupIds); | ||
| 339 | + Map<String, Team> teamMap = CollectionUtils.isEmpty(teamIds) | ||
| 340 | + ? new HashMap<>(0) : teamService.mapByIds(teamIds); | ||
| 341 | + Map<String, UcOrg> orgMap = CollectionUtils.isEmpty(orgIds) | ||
| 342 | + ? new HashMap<>(0) : ucOrgService.mapByIds(orgIds); | ||
| 343 | + Map<String, UcUser> userMap = CollectionUtils.isEmpty(userIds) | ||
| 344 | + ? new HashMap<>(0) : ucUserService.mapByIds(userIds); | ||
| 345 | + Map<String, Area> areaMap = CollectionUtils.isEmpty(areaIds) | ||
| 346 | + ? new HashMap<>(0) : areaService.mapByIds(areaIds); | ||
| 347 | + | ||
| 348 | + // 从室组中补充单位车间id | ||
| 349 | + for (RoomGroup rg : roomGroupMap.values()) { | ||
| 350 | + if (rg.getSsdw() != null) workshopIds.add(rg.getSsdw()); | ||
| 351 | + } | ||
| 352 | + Map<String, Workshop> workshopMap = CollectionUtils.isEmpty(workshopIds) | ||
| 353 | + ? new HashMap<>(0) : workshopService.mapByIds(workshopIds); | ||
| 354 | + | ||
| 355 | + List<CImprovementDetailDTO> resultList = cImprovementList.stream() | ||
| 356 | + .map(item -> { | ||
| 357 | + CImprovementDetailDTO dto = new CImprovementDetailDTO(); | ||
| 358 | + // 复制原始字段 | ||
| 359 | + BeanUtils.copyProperties(item, dto); | ||
| 360 | + | ||
| 361 | + // 状态名称(枚举 CImprovementStatusEnum) | ||
| 362 | + dto.setZtDesc(CImprovementStatusEnum.getDescByCode(item.getZt())); | ||
| 363 | + | ||
| 364 | + // 室组名称、编号及所属单位车间 | ||
| 365 | + if (item.getSzmc() != null) { | ||
| 366 | + RoomGroup rg = roomGroupMap.get(item.getSzmc()); | ||
| 367 | + if (rg != null) { | ||
| 368 | + dto.setSzmcName(rg.getSzmc()); | ||
| 369 | + dto.setSzbh(rg.getSzbh()); | ||
| 370 | + if (rg.getSsdw() != null) { | ||
| 371 | + dto.setDwcj(rg.getSsdw()); | ||
| 372 | + Workshop ws = workshopMap.get(rg.getSsdw()); | ||
| 373 | + if (ws != null) { | ||
| 374 | + dto.setDwcjName(ws.getDwmc()); | ||
| 375 | + dto.setDwcjCode(ws.getDwbh()); | ||
| 376 | + } | ||
| 377 | + } | ||
| 378 | + } | ||
| 379 | + } | ||
| 380 | + | ||
| 381 | + // 班组名称 | ||
| 382 | + if (item.getBz() != null) { | ||
| 383 | + Team team = teamMap.get(item.getBz()); | ||
| 384 | + if (team != null) { | ||
| 385 | + dto.setBzName(team.getBzmc()); | ||
| 386 | + } | ||
| 387 | + } | ||
| 388 | + | ||
| 389 | + // 部门名称 | ||
| 390 | + if (item.getBm() != null) { | ||
| 391 | + UcOrg org = orgMap.get(item.getBm()); | ||
| 392 | + if (org != null) { | ||
| 393 | + dto.setBmName(org.getName()); | ||
| 394 | + } | ||
| 395 | + } | ||
| 396 | + | ||
| 397 | + // 发起人姓名 | ||
| 398 | + if (item.getFqr() != null) { | ||
| 399 | + UcUser user = userMap.get(item.getFqr()); | ||
| 400 | + if (user != null) { | ||
| 401 | + dto.setFqrName(user.getName()); | ||
| 402 | + } | ||
| 403 | + } | ||
| 404 | + | ||
| 405 | + // 区长确认姓名 | ||
| 406 | + if (item.getQzqr() != null) { | ||
| 407 | + UcUser user = userMap.get(item.getQzqr()); | ||
| 408 | + if (user != null) { | ||
| 409 | + dto.setQzqrName(user.getName()); | ||
| 410 | + } | ||
| 411 | + } | ||
| 412 | + | ||
| 413 | + // 改善员确认姓名 | ||
| 414 | + if (item.getGsyqr() != null) { | ||
| 415 | + UcUser user = userMap.get(item.getGsyqr()); | ||
| 416 | + if (user != null) { | ||
| 417 | + dto.setGsyqrName(user.getName()); | ||
| 418 | + } | ||
| 419 | + } | ||
| 420 | + | ||
| 421 | + return dto; | ||
| 422 | + }) | ||
| 423 | + .collect(Collectors.toList()); | ||
| 424 | + | ||
| 425 | + // 10. 按创建时间降序排序 | ||
| 426 | + resultList.sort(Comparator.comparing(CImprovementDetailDTO::getCreatedAt, | ||
| 427 | + Comparator.nullsLast(Comparator.reverseOrder()))); | ||
| 428 | + return resultList; | ||
| 276 | } | 429 | } |
| 277 | } | 430 | } |
| 1 | +package com.qgutech.qgyun.apaas.sync.cps.service; | ||
| 2 | + | ||
| 3 | +import com.qgutech.qgyun.apaas.sync.cps.mapper.CImprovementTargetMapper; | ||
| 4 | +import com.qgutech.qgyun.apaas.sync.cps.model.CImprovementTarget; | ||
| 5 | +import com.qgutech.qgyun.apaas.sync.utils.DateDealUtils; | ||
| 6 | +import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl; | ||
| 7 | +import org.apache.commons.collections4.CollectionUtils; | ||
| 8 | +import org.apache.commons.lang3.StringUtils; | ||
| 9 | +import org.springframework.stereotype.Service; | ||
| 10 | +import org.springframework.transaction.annotation.Transactional; | ||
| 11 | +import org.springframework.util.Assert; | ||
| 12 | +import tk.mybatis.mapper.entity.Example; | ||
| 13 | + | ||
| 14 | +import javax.annotation.Resource; | ||
| 15 | +import java.util.ArrayList; | ||
| 16 | +import java.util.Calendar; | ||
| 17 | +import java.util.Date; | ||
| 18 | +import java.util.List; | ||
| 19 | + | ||
| 20 | +/** | ||
| 21 | + * CImprovementTarget 服务 | ||
| 22 | + */ | ||
| 23 | +@Service | ||
| 24 | +public class CImprovementTargetService extends BaseServiceImpl<CImprovementTarget> { | ||
| 25 | + | ||
| 26 | + @Resource | ||
| 27 | + private CImprovementTargetMapper cImprovementTargetMapper; | ||
| 28 | + | ||
| 29 | + /** | ||
| 30 | + * 根据年份查询C类改善目标 | ||
| 31 | + * | ||
| 32 | + * @param year 年份,格式:yyyy,为空时默认当前年 | ||
| 33 | + * @return C类改善目标列表 | ||
| 34 | + */ | ||
| 35 | + @Transactional(readOnly = true) | ||
| 36 | + public List<CImprovementTarget> listByYear(String year) { | ||
| 37 | + // 1. 处理年份参数,为空时默认为当前年 | ||
| 38 | + String queryYear = StringUtils.isBlank(year) ? String.valueOf(Calendar.getInstance().get(Calendar.YEAR)) : year; | ||
| 39 | + Assert.isTrue(queryYear.matches("\\d{4}"), "year format must be yyyy!"); | ||
| 40 | + | ||
| 41 | + // 2. 计算年份的开始时间和结束时间 | ||
| 42 | + Date startTime = DateDealUtils.parseYearStartTime(queryYear); | ||
| 43 | + Date endTime = DateDealUtils.parseYearEndTime(queryYear); | ||
| 44 | + | ||
| 45 | + // 3. 查询该年份的C类目标信息 | ||
| 46 | + Example targetExample = new Example(entityClass); | ||
| 47 | + targetExample.createCriteria() | ||
| 48 | + .andBetween(CImprovementTarget.YEAR, startTime, endTime); | ||
| 49 | + List<CImprovementTarget> targetList = cImprovementTargetMapper.selectByExample(targetExample); | ||
| 50 | + if (CollectionUtils.isEmpty(targetList)) { | ||
| 51 | + return new ArrayList<>(0); | ||
| 52 | + } | ||
| 53 | + return targetList; | ||
| 54 | + } | ||
| 55 | +} |
| 1 | package com.qgutech.qgyun.apaas.sync.cps.service; | 1 | package com.qgutech.qgyun.apaas.sync.cps.service; |
| 2 | 2 | ||
| 3 | -import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl; | ||
| 4 | import com.qgutech.qgyun.apaas.sync.base.BoErrorCode; | 3 | import com.qgutech.qgyun.apaas.sync.base.BoErrorCode; |
| 5 | import com.qgutech.qgyun.apaas.sync.base.BoException; | 4 | import com.qgutech.qgyun.apaas.sync.base.BoException; |
| 5 | +import com.qgutech.qgyun.apaas.sync.cps.dto.CpsProblemDetailDTO; | ||
| 6 | +import com.qgutech.qgyun.apaas.sync.cps.dto.CpsProblemSourceSummaryDTO; | ||
| 7 | +import com.qgutech.qgyun.apaas.sync.cps.dto.CpsProblemSummaryDTO; | ||
| 8 | +import com.qgutech.qgyun.apaas.sync.cps.enums.MbghlkEnum; | ||
| 9 | +import com.qgutech.qgyun.apaas.sync.cps.enums.RylbEnum; | ||
| 10 | +import com.qgutech.qgyun.apaas.sync.cps.enums.SflEnum; | ||
| 11 | +import com.qgutech.qgyun.apaas.sync.cps.enums.WtclfsEnum; | ||
| 12 | +import com.qgutech.qgyun.apaas.sync.cps.enums.WtclztEnum; | ||
| 13 | +import com.qgutech.qgyun.apaas.sync.cps.enums.WtlbEnum; | ||
| 14 | +import com.qgutech.qgyun.apaas.sync.cps.enums.WtlyEnum; | ||
| 15 | +import com.qgutech.qgyun.apaas.sync.cps.enums.WtxzEnum; | ||
| 6 | import com.qgutech.qgyun.apaas.sync.cps.mapper.CpsProblemMapper; | 16 | import com.qgutech.qgyun.apaas.sync.cps.mapper.CpsProblemMapper; |
| 17 | +import com.qgutech.qgyun.apaas.sync.cps.model.Area; | ||
| 7 | import com.qgutech.qgyun.apaas.sync.cps.model.CpsProblem; | 18 | import com.qgutech.qgyun.apaas.sync.cps.model.CpsProblem; |
| 19 | +import com.qgutech.qgyun.apaas.sync.cps.model.RoomGroup; | ||
| 20 | +import com.qgutech.qgyun.apaas.sync.cps.model.Team; | ||
| 21 | +import com.qgutech.qgyun.apaas.sync.cps.model.Workshop; | ||
| 22 | +import com.qgutech.qgyun.apaas.sync.org.model.UcUser; | ||
| 23 | +import com.qgutech.qgyun.apaas.sync.org.service.UcUserService; | ||
| 24 | +import com.qgutech.qgyun.apaas.sync.utils.DateDealUtils; | ||
| 25 | +import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl; | ||
| 8 | import org.apache.commons.collections4.CollectionUtils; | 26 | import org.apache.commons.collections4.CollectionUtils; |
| 27 | +import org.apache.commons.lang3.StringUtils; | ||
| 28 | +import org.springframework.beans.BeanUtils; | ||
| 9 | import org.springframework.stereotype.Service; | 29 | import org.springframework.stereotype.Service; |
| 10 | import org.springframework.transaction.annotation.Transactional; | 30 | import org.springframework.transaction.annotation.Transactional; |
| 11 | import org.springframework.util.Assert; | 31 | import org.springframework.util.Assert; |
| @@ -24,6 +44,21 @@ public class CpsProblemService extends BaseServiceImpl<CpsProblem> { | @@ -24,6 +44,21 @@ public class CpsProblemService extends BaseServiceImpl<CpsProblem> { | ||
| 24 | @Resource | 44 | @Resource |
| 25 | private CpsProblemMapper cpsProblemMapper; | 45 | private CpsProblemMapper cpsProblemMapper; |
| 26 | 46 | ||
| 47 | + @Resource | ||
| 48 | + private WorkshopService workshopService; | ||
| 49 | + | ||
| 50 | + @Resource | ||
| 51 | + private RoomGroupService roomGroupService; | ||
| 52 | + | ||
| 53 | + @Resource | ||
| 54 | + private AreaService areaService; | ||
| 55 | + | ||
| 56 | + @Resource | ||
| 57 | + private TeamService teamService; | ||
| 58 | + | ||
| 59 | + @Resource | ||
| 60 | + private UcUserService ucUserService; | ||
| 61 | + | ||
| 27 | @Transactional(readOnly = true) | 62 | @Transactional(readOnly = true) |
| 28 | public CpsProblem getById(String id) { | 63 | public CpsProblem getById(String id) { |
| 29 | Assert.hasLength(id, "id is empty!"); | 64 | Assert.hasLength(id, "id is empty!"); |
| @@ -67,4 +102,402 @@ public class CpsProblemService extends BaseServiceImpl<CpsProblem> { | @@ -67,4 +102,402 @@ public class CpsProblemService extends BaseServiceImpl<CpsProblem> { | ||
| 67 | 102 | ||
| 68 | return cpsProblemMapper.selectAll(); | 103 | return cpsProblemMapper.selectAll(); |
| 69 | } | 104 | } |
| 105 | + | ||
| 106 | + /** | ||
| 107 | + * 根据计划解决时间范围查询问题记录,并按责任单位 + 问题处理状态维度汇总问题数 | ||
| 108 | + * <p> | ||
| 109 | + * 开始、结束时间为空时默认使用当前月的开始、结束时间 | ||
| 110 | + * | ||
| 111 | + * @param startTime 开始时间,格式:yyyy-MM-dd [HH:mm:ss],可为空(默认当前月 1 号 00:00:00) | ||
| 112 | + * @param endTime 结束时间,格式:yyyy-MM-dd [HH:mm:ss],可为空(默认当前月最后一天 23:59:59) | ||
| 113 | + * @return 各责任单位下各处理状态的问题数汇总列表(按责任单位编号升序) | ||
| 114 | + */ | ||
| 115 | + @Transactional(readOnly = true) | ||
| 116 | + public List<CpsProblemSummaryDTO> summaryByPlanResolveTime(String startTime, String endTime) { | ||
| 117 | + // 1. 解析时间参数,为空时默认当前月起止时间 | ||
| 118 | + Date start = DateDealUtils.parseStartTimeOrCurrentMonthStart(startTime); | ||
| 119 | + Date end = DateDealUtils.parseEndTimeOrCurrentMonthEnd(endTime); | ||
| 120 | + Assert.notNull(start, "startTime is invalid!"); | ||
| 121 | + Assert.notNull(end, "endTime is invalid!"); | ||
| 122 | + Assert.isTrue(!start.after(end), "startTime must be earlier than endTime!"); | ||
| 123 | + | ||
| 124 | + // 2. 查询计划解决时间在范围内的所有问题记录 | ||
| 125 | + Example example = new Example(CpsProblem.class); | ||
| 126 | + example.createCriteria() | ||
| 127 | + .andBetween(CpsProblem.JHJJSJ, start, end); | ||
| 128 | + List<CpsProblem> cpsProblemList = cpsProblemMapper.selectByExample(example); | ||
| 129 | + if (CollectionUtils.isEmpty(cpsProblemList)) { | ||
| 130 | + return new ArrayList<>(0); | ||
| 131 | + } | ||
| 132 | + | ||
| 133 | + // 3. 按责任单位分组,再按处理状态计数 | ||
| 134 | + Map<String, Map<String, Long>> wtdwStatusCountMap = cpsProblemList.stream() | ||
| 135 | + .filter(item -> item.getWtzrdw() != null) | ||
| 136 | + .collect(Collectors.groupingBy( | ||
| 137 | + CpsProblem::getWtzrdw, | ||
| 138 | + Collectors.groupingBy( | ||
| 139 | + item -> item.getWtclzt() == null ? "" : item.getWtclzt(), | ||
| 140 | + Collectors.counting() | ||
| 141 | + ) | ||
| 142 | + )); | ||
| 143 | + | ||
| 144 | + if (wtdwStatusCountMap.isEmpty()) { | ||
| 145 | + return new ArrayList<>(0); | ||
| 146 | + } | ||
| 147 | + | ||
| 148 | + // 4. 批量查询责任单位详细信息 | ||
| 149 | + Set<String> workshopIds = wtdwStatusCountMap.keySet(); | ||
| 150 | + Map<String, Workshop> workshopMap = workshopService.mapByIds(workshopIds); | ||
| 151 | + | ||
| 152 | + // 5. 组装汇总结果 | ||
| 153 | + List<CpsProblemSummaryDTO> resultList = wtdwStatusCountMap.entrySet().stream() | ||
| 154 | + .map(entry -> { | ||
| 155 | + String wtzrdw = entry.getKey(); | ||
| 156 | + Map<String, Long> statusCountMap = entry.getValue(); | ||
| 157 | + | ||
| 158 | + CpsProblemSummaryDTO dto = new CpsProblemSummaryDTO(); | ||
| 159 | + dto.setWtzrdw(wtzrdw); | ||
| 160 | + | ||
| 161 | + // 设置责任单位名称、编号 | ||
| 162 | + Workshop workshop = workshopMap.get(wtzrdw); | ||
| 163 | + if (workshop != null) { | ||
| 164 | + dto.setWtzrdwName(workshop.getDwmc()); | ||
| 165 | + dto.setWtzrdwCode(workshop.getDwbh()); | ||
| 166 | + } | ||
| 167 | + | ||
| 168 | + // 计算总数 | ||
| 169 | + int totalCount = statusCountMap.values().stream().mapToInt(Long::intValue).sum(); | ||
| 170 | + dto.setTotalCount(totalCount); | ||
| 171 | + | ||
| 172 | + // 按预定义状态顺序填充状态明细(保证 4 个状态都存在,即使为 0) | ||
| 173 | + List<CpsProblemSummaryDTO.StatusCount> statusCounts = new ArrayList<>(); | ||
| 174 | + for (WtclztEnum statusEnum : WtclztEnum.values()) { | ||
| 175 | + Long count = statusCountMap.getOrDefault(statusEnum.getCode(), 0L); | ||
| 176 | + statusCounts.add(new CpsProblemSummaryDTO.StatusCount( | ||
| 177 | + statusEnum.getCode(), statusEnum.getDesc(), count.intValue())); | ||
| 178 | + } | ||
| 179 | + // 处理非预定义状态(如空值或异常状态码) | ||
| 180 | + for (Map.Entry<String, Long> sc : statusCountMap.entrySet()) { | ||
| 181 | + String code = sc.getKey(); | ||
| 182 | + if (StringUtils.isBlank(code) || WtclztEnum.fromCode(code) == null) { | ||
| 183 | + String desc = StringUtils.isBlank(code) ? "未设置" : code; | ||
| 184 | + statusCounts.add(new CpsProblemSummaryDTO.StatusCount( | ||
| 185 | + code, desc, sc.getValue().intValue())); | ||
| 186 | + } | ||
| 187 | + } | ||
| 188 | + dto.setStatusCounts(statusCounts); | ||
| 189 | + | ||
| 190 | + return dto; | ||
| 191 | + }) | ||
| 192 | + .collect(Collectors.toList()); | ||
| 193 | + | ||
| 194 | + // 6. 按责任单位编号升序排序,编号为空的排在最后 | ||
| 195 | + resultList.sort(Comparator.comparing(CpsProblemSummaryDTO::getWtzrdwCode, | ||
| 196 | + Comparator.nullsLast(Comparator.naturalOrder()))); | ||
| 197 | + return resultList; | ||
| 198 | + } | ||
| 199 | + | ||
| 200 | + /** | ||
| 201 | + * 根据计划解决时间范围、责任单位id、问题处理状态查询问题记录明细 | ||
| 202 | + * <p> | ||
| 203 | + * 结果中包含工作单位、责任单位、室组、区域、班组、问题提出人、问题处理人等关联实体名称; | ||
| 204 | + * 开始、结束时间为空时默认使用当前月的开始、结束时间 | ||
| 205 | + * | ||
| 206 | + * @param startTime 开始时间,格式:yyyy-MM-dd [HH:mm:ss],可为空(默认当前月 1 号 00:00:00) | ||
| 207 | + * @param endTime 结束时间,格式:yyyy-MM-dd [HH:mm:ss],可为空(默认当前月最后一天 23:59:59) | ||
| 208 | + * @param wtzrdwId 责任单位id,必传 | ||
| 209 | + * @param status 问题处理状态编号(#1#-#4#),必传 | ||
| 210 | + * @return 问题记录明细列表(按创建时间降序) | ||
| 211 | + */ | ||
| 212 | + @Transactional(readOnly = true) | ||
| 213 | + public List<CpsProblemDetailDTO> listDetailByPlanResolveTime(String startTime, String endTime, | ||
| 214 | + String wtzrdwId, String status) { | ||
| 215 | + // 1. 校验参数 | ||
| 216 | + Assert.hasLength(wtzrdwId, "wtzrdwId is empty!"); | ||
| 217 | + Assert.hasLength(status, "status is empty!"); | ||
| 218 | + | ||
| 219 | + // 解析时间参数,为空时默认当前月起止时间 | ||
| 220 | + Date start = DateDealUtils.parseStartTimeOrCurrentMonthStart(startTime); | ||
| 221 | + Date end = DateDealUtils.parseEndTimeOrCurrentMonthEnd(endTime); | ||
| 222 | + Assert.notNull(start, "startTime is invalid!"); | ||
| 223 | + Assert.notNull(end, "endTime is invalid!"); | ||
| 224 | + Assert.isTrue(!start.after(end), "startTime must be earlier than endTime!"); | ||
| 225 | + | ||
| 226 | + // 校验状态格式,允许传入 #1# 或 1 两种形式,统一转换为 #1# | ||
| 227 | + WtclztEnum statusEnum = WtclztEnum.fromCode(status); | ||
| 228 | + Assert.notNull(statusEnum, "status format is invalid!"); | ||
| 229 | + String statusCode = statusEnum.getCode(); | ||
| 230 | + | ||
| 231 | + // 2. 查询问题记录 | ||
| 232 | + Example example = new Example(CpsProblem.class); | ||
| 233 | + example.createCriteria() | ||
| 234 | + .andBetween(CpsProblem.JHJJSJ, start, end) | ||
| 235 | + .andEqualTo(CpsProblem.WTZRDW, wtzrdwId) | ||
| 236 | + .andEqualTo(CpsProblem.WTCLZT, statusCode); | ||
| 237 | + List<CpsProblem> cpsProblemList = cpsProblemMapper.selectByExample(example); | ||
| 238 | + if (CollectionUtils.isEmpty(cpsProblemList)) { | ||
| 239 | + return new ArrayList<>(0); | ||
| 240 | + } | ||
| 241 | + | ||
| 242 | + // 3. 收集所有关联实体ID | ||
| 243 | + Set<String> workshopIds = new HashSet<>(); | ||
| 244 | + Set<String> roomGroupIds = new HashSet<>(); | ||
| 245 | + Set<String> areaIds = new HashSet<>(); | ||
| 246 | + Set<String> teamIds = new HashSet<>(); | ||
| 247 | + Set<String> userIds = new HashSet<>(); | ||
| 248 | + | ||
| 249 | + for (CpsProblem item : cpsProblemList) { | ||
| 250 | + if (item.getGzdw() != null) workshopIds.add(item.getGzdw()); | ||
| 251 | + if (item.getWtzrdw() != null) workshopIds.add(item.getWtzrdw()); | ||
| 252 | + if (item.getSz() != null) roomGroupIds.add(item.getSz()); | ||
| 253 | + if (item.getQy() != null) areaIds.add(item.getQy()); | ||
| 254 | + if (item.getBz() != null) teamIds.add(item.getBz()); | ||
| 255 | + if (item.getWttcr() != null) userIds.add(item.getWttcr()); | ||
| 256 | + if (item.getWtclr() != null) userIds.add(item.getWtclr()); | ||
| 257 | + } | ||
| 258 | + | ||
| 259 | + // 4. 批量查询关联实体 | ||
| 260 | + Map<String, Workshop> workshopMap = CollectionUtils.isEmpty(workshopIds) | ||
| 261 | + ? new HashMap<>(0) : workshopService.mapByIds(workshopIds); | ||
| 262 | + Map<String, RoomGroup> roomGroupMap = CollectionUtils.isEmpty(roomGroupIds) | ||
| 263 | + ? new HashMap<>(0) : roomGroupService.mapByIds(roomGroupIds); | ||
| 264 | + Map<String, Area> areaMap = CollectionUtils.isEmpty(areaIds) | ||
| 265 | + ? new HashMap<>(0) : areaService.mapByIds(areaIds); | ||
| 266 | + Map<String, Team> teamMap = CollectionUtils.isEmpty(teamIds) | ||
| 267 | + ? new HashMap<>(0) : teamService.mapByIds(teamIds); | ||
| 268 | + Map<String, UcUser> userMap = CollectionUtils.isEmpty(userIds) | ||
| 269 | + ? new HashMap<>(0) : ucUserService.mapByIds(userIds); | ||
| 270 | + | ||
| 271 | + // 5. 组装明细结果 | ||
| 272 | + List<CpsProblemDetailDTO> resultList = buildDetailList(cpsProblemList, workshopMap, roomGroupMap, areaMap, teamMap, userMap); | ||
| 273 | + | ||
| 274 | + // 6. 按创建时间降序排序 | ||
| 275 | + resultList.sort(Comparator.comparing(CpsProblemDetailDTO::getCreatedAt, | ||
| 276 | + Comparator.nullsLast(Comparator.reverseOrder()))); | ||
| 277 | + return resultList; | ||
| 278 | + } | ||
| 279 | + | ||
| 280 | + /** | ||
| 281 | + * 根据创建时间范围查询问题记录,并按问题来源维度汇总问题数 | ||
| 282 | + * <p> | ||
| 283 | + * 开始、结束时间为空时默认使用当前月的开始、结束时间; | ||
| 284 | + * 结果按 WtlyEnum 预定义顺序输出(含计数为 0 的来源),未知编号追加在后 | ||
| 285 | + * | ||
| 286 | + * @param startTime 开始时间,格式:yyyy-MM-dd [HH:mm:ss],可为空(默认当前月 1 号 00:00:00) | ||
| 287 | + * @param endTime 结束时间,格式:yyyy-MM-dd [HH:mm:ss],可为空(默认当前月最后一天 23:59:59) | ||
| 288 | + * @return 各问题来源对应的问题数汇总列表 | ||
| 289 | + */ | ||
| 290 | + @Transactional(readOnly = true) | ||
| 291 | + public List<CpsProblemSourceSummaryDTO> summaryByCreatedAtSource(String startTime, String endTime) { | ||
| 292 | + // 1. 解析时间参数,为空时默认当前月起止时间 | ||
| 293 | + Date start = DateDealUtils.parseStartTimeOrCurrentMonthStart(startTime); | ||
| 294 | + Date end = DateDealUtils.parseEndTimeOrCurrentMonthEnd(endTime); | ||
| 295 | + Assert.notNull(start, "startTime is invalid!"); | ||
| 296 | + Assert.notNull(end, "endTime is invalid!"); | ||
| 297 | + Assert.isTrue(!start.after(end), "startTime must be earlier than endTime!"); | ||
| 298 | + | ||
| 299 | + // 2. 查询创建时间在范围内的问题记录 | ||
| 300 | + Example example = new Example(CpsProblem.class); | ||
| 301 | + example.createCriteria() | ||
| 302 | + .andBetween(CpsProblem.CREATED_AT, start, end); | ||
| 303 | + List<CpsProblem> cpsProblemList = cpsProblemMapper.selectByExample(example); | ||
| 304 | + | ||
| 305 | + // 3. 按问题来源分组计数(包含 null 和空字符串,统一归为“未设置”) | ||
| 306 | + Map<String, Long> sourceCountMap = CollectionUtils.isEmpty(cpsProblemList) | ||
| 307 | + ? new HashMap<>(0) | ||
| 308 | + : cpsProblemList.stream() | ||
| 309 | + .collect(Collectors.groupingBy( | ||
| 310 | + item -> item.getWtly() == null ? "" : item.getWtly(), | ||
| 311 | + Collectors.counting() | ||
| 312 | + )); | ||
| 313 | + | ||
| 314 | + // 4. 按 WtlyEnum 预定义顺序输出,保证 5 个来源都存在(即使为 0) | ||
| 315 | + List<CpsProblemSourceSummaryDTO> resultList = new ArrayList<>(); | ||
| 316 | + for (WtlyEnum sourceEnum : WtlyEnum.values()) { | ||
| 317 | + Long count = sourceCountMap.getOrDefault(sourceEnum.getCode(), 0L); | ||
| 318 | + resultList.add(new CpsProblemSourceSummaryDTO( | ||
| 319 | + sourceEnum.getCode(), sourceEnum.getDesc(), count.intValue())); | ||
| 320 | + } | ||
| 321 | + | ||
| 322 | + // 5. 处理非预定义来源(如空值或异常编号) | ||
| 323 | + for (Map.Entry<String, Long> entry : sourceCountMap.entrySet()) { | ||
| 324 | + String code = entry.getKey(); | ||
| 325 | + if (StringUtils.isBlank(code) || WtlyEnum.fromCode(code) == null) { | ||
| 326 | + String desc = StringUtils.isBlank(code) ? "未设置" : code; | ||
| 327 | + resultList.add(new CpsProblemSourceSummaryDTO(code, desc, entry.getValue().intValue())); | ||
| 328 | + } | ||
| 329 | + } | ||
| 330 | + | ||
| 331 | + return resultList; | ||
| 332 | + } | ||
| 333 | + | ||
| 334 | + /** | ||
| 335 | + * 根据创建时间范围、问题来源查询问题记录明细 | ||
| 336 | + * <p> | ||
| 337 | + * 结果中包含工作单位、责任单位、室组、区域、班组、问题提出人、问题处理人等关联实体名称; | ||
| 338 | + * 开始、结束时间为空时默认使用当前月的开始、结束时间 | ||
| 339 | + * | ||
| 340 | + * @param startTime 开始时间,格式:yyyy-MM-dd [HH:mm:ss],可为空(默认当前月 1 号 00:00:00) | ||
| 341 | + * @param endTime 结束时间,格式:yyyy-MM-dd [HH:mm:ss],可为空(默认当前月最后一天 23:59:59) | ||
| 342 | + * @param wtly 问题来源编号(#1#-#5#),必传;兼容传入 1 ~ 5 的短形式 | ||
| 343 | + * @return 问题记录明细列表(按创建时间降序) | ||
| 344 | + */ | ||
| 345 | + @Transactional(readOnly = true) | ||
| 346 | + public List<CpsProblemDetailDTO> listDetailByCreatedAtAndSource(String startTime, String endTime, String wtly) { | ||
| 347 | + // 1. 校验参数 | ||
| 348 | + Assert.hasLength(wtly, "wtly is empty!"); | ||
| 349 | + WtlyEnum sourceEnum = WtlyEnum.fromCode(wtly); | ||
| 350 | + Assert.notNull(sourceEnum, "wtly format is invalid!"); | ||
| 351 | + String sourceCode = sourceEnum.getCode(); | ||
| 352 | + | ||
| 353 | + // 解析时间参数,为空时默认当前月起止时间 | ||
| 354 | + Date start = DateDealUtils.parseStartTimeOrCurrentMonthStart(startTime); | ||
| 355 | + Date end = DateDealUtils.parseEndTimeOrCurrentMonthEnd(endTime); | ||
| 356 | + Assert.notNull(start, "startTime is invalid!"); | ||
| 357 | + Assert.notNull(end, "endTime is invalid!"); | ||
| 358 | + Assert.isTrue(!start.after(end), "startTime must be earlier than endTime!"); | ||
| 359 | + | ||
| 360 | + // 2. 查询问题记录 | ||
| 361 | + Example example = new Example(CpsProblem.class); | ||
| 362 | + example.createCriteria() | ||
| 363 | + .andBetween(CpsProblem.CREATED_AT, start, end) | ||
| 364 | + .andEqualTo(CpsProblem.WTLY, sourceCode); | ||
| 365 | + List<CpsProblem> cpsProblemList = cpsProblemMapper.selectByExample(example); | ||
| 366 | + if (CollectionUtils.isEmpty(cpsProblemList)) { | ||
| 367 | + return new ArrayList<>(0); | ||
| 368 | + } | ||
| 369 | + | ||
| 370 | + // 3. 收集关联实体ID | ||
| 371 | + Set<String> workshopIds = new HashSet<>(); | ||
| 372 | + Set<String> roomGroupIds = new HashSet<>(); | ||
| 373 | + Set<String> areaIds = new HashSet<>(); | ||
| 374 | + Set<String> teamIds = new HashSet<>(); | ||
| 375 | + Set<String> userIds = new HashSet<>(); | ||
| 376 | + for (CpsProblem item : cpsProblemList) { | ||
| 377 | + if (item.getGzdw() != null) workshopIds.add(item.getGzdw()); | ||
| 378 | + if (item.getWtzrdw() != null) workshopIds.add(item.getWtzrdw()); | ||
| 379 | + if (item.getSz() != null) roomGroupIds.add(item.getSz()); | ||
| 380 | + if (item.getQy() != null) areaIds.add(item.getQy()); | ||
| 381 | + if (item.getBz() != null) teamIds.add(item.getBz()); | ||
| 382 | + if (item.getWttcr() != null) userIds.add(item.getWttcr()); | ||
| 383 | + if (item.getWtclr() != null) userIds.add(item.getWtclr()); | ||
| 384 | + } | ||
| 385 | + | ||
| 386 | + // 4. 批量查询关联实体 | ||
| 387 | + Map<String, Workshop> workshopMap = CollectionUtils.isEmpty(workshopIds) | ||
| 388 | + ? new HashMap<>(0) : workshopService.mapByIds(workshopIds); | ||
| 389 | + Map<String, RoomGroup> roomGroupMap = CollectionUtils.isEmpty(roomGroupIds) | ||
| 390 | + ? new HashMap<>(0) : roomGroupService.mapByIds(roomGroupIds); | ||
| 391 | + Map<String, Area> areaMap = CollectionUtils.isEmpty(areaIds) | ||
| 392 | + ? new HashMap<>(0) : areaService.mapByIds(areaIds); | ||
| 393 | + Map<String, Team> teamMap = CollectionUtils.isEmpty(teamIds) | ||
| 394 | + ? new HashMap<>(0) : teamService.mapByIds(teamIds); | ||
| 395 | + Map<String, UcUser> userMap = CollectionUtils.isEmpty(userIds) | ||
| 396 | + ? new HashMap<>(0) : ucUserService.mapByIds(userIds); | ||
| 397 | + | ||
| 398 | + // 5. 组装明细结果 | ||
| 399 | + List<CpsProblemDetailDTO> resultList = buildDetailList(cpsProblemList, workshopMap, roomGroupMap, areaMap, teamMap, userMap); | ||
| 400 | + | ||
| 401 | + // 6. 按创建时间降序排序 | ||
| 402 | + resultList.sort(Comparator.comparing(CpsProblemDetailDTO::getCreatedAt, | ||
| 403 | + Comparator.nullsLast(Comparator.reverseOrder()))); | ||
| 404 | + return resultList; | ||
| 405 | + } | ||
| 406 | + | ||
| 407 | + /** | ||
| 408 | + * 组装 CPS 问题明细 DTO 列表(含枚举名称、关联实体名称) | ||
| 409 | + */ | ||
| 410 | + private List<CpsProblemDetailDTO> buildDetailList(List<CpsProblem> cpsProblemList, | ||
| 411 | + Map<String, Workshop> workshopMap, | ||
| 412 | + Map<String, RoomGroup> roomGroupMap, | ||
| 413 | + Map<String, Area> areaMap, | ||
| 414 | + Map<String, Team> teamMap, | ||
| 415 | + Map<String, UcUser> userMap) { | ||
| 416 | + return cpsProblemList.stream() | ||
| 417 | + .map(item -> { | ||
| 418 | + CpsProblemDetailDTO dto = new CpsProblemDetailDTO(); | ||
| 419 | + // 复制原始字段(同名属性) | ||
| 420 | + BeanUtils.copyProperties(item, dto); | ||
| 421 | + // 模型字段 wtzrdw 对应 DTO 字段 wtdw,需手动赋值 | ||
| 422 | + dto.setWtzrdw(item.getWtzrdw()); | ||
| 423 | + | ||
| 424 | + // 处理状态描述 | ||
| 425 | + dto.setWtclztDesc(WtclztEnum.getDescByCode(item.getWtclzt())); | ||
| 426 | + | ||
| 427 | + // 各枚举字段中文名称 | ||
| 428 | + dto.setWtlyDesc(WtlyEnum.getDescByCode(item.getWtly())); | ||
| 429 | + dto.setWtlbDesc(WtlbEnum.getDescByCode(item.getWtlb())); | ||
| 430 | + dto.setWtxzDesc(WtxzEnum.getDescByCode(item.getWtxz())); | ||
| 431 | + dto.setSflDesc(SflEnum.getDescByCode(item.getSfl())); | ||
| 432 | + dto.setMbghlkDesc(MbghlkEnum.getDescByCode(item.getMbghlk())); | ||
| 433 | + dto.setRylbDesc(RylbEnum.getDescByCode(item.getRylb())); | ||
| 434 | + dto.setWtclfsDesc(WtclfsEnum.getDescByCode(item.getWtclfs())); | ||
| 435 | + dto.setWtclfs2Desc(WtclfsEnum.getDescByCode(item.getWtclfs2())); | ||
| 436 | + dto.setWtclfs3Desc(WtclfsEnum.getDescByCode(item.getWtclfs3())); | ||
| 437 | + | ||
| 438 | + // 工作单位 | ||
| 439 | + if (item.getGzdw() != null) { | ||
| 440 | + Workshop ws = workshopMap.get(item.getGzdw()); | ||
| 441 | + if (ws != null) { | ||
| 442 | + dto.setGzdwName(ws.getDwmc()); | ||
| 443 | + dto.setGzdwCode(ws.getDwbh()); | ||
| 444 | + } | ||
| 445 | + } | ||
| 446 | + | ||
| 447 | + // 问题责任单位 | ||
| 448 | + if (item.getWtzrdw() != null) { | ||
| 449 | + Workshop ws = workshopMap.get(item.getWtzrdw()); | ||
| 450 | + if (ws != null) { | ||
| 451 | + dto.setWtzrdwName(ws.getDwmc()); | ||
| 452 | + dto.setWtzrdwCode(ws.getDwbh()); | ||
| 453 | + } | ||
| 454 | + } | ||
| 455 | + | ||
| 456 | + // 室组 | ||
| 457 | + if (item.getSz() != null) { | ||
| 458 | + RoomGroup rg = roomGroupMap.get(item.getSz()); | ||
| 459 | + if (rg != null) { | ||
| 460 | + dto.setSzName(rg.getSzmc()); | ||
| 461 | + dto.setSzCode(rg.getSzbh()); | ||
| 462 | + } | ||
| 463 | + } | ||
| 464 | + | ||
| 465 | + // 区域 | ||
| 466 | + if (item.getQy() != null) { | ||
| 467 | + Area area = areaMap.get(item.getQy()); | ||
| 468 | + if (area != null) { | ||
| 469 | + dto.setQyName(area.getQymc()); | ||
| 470 | + dto.setQyCode(area.getQybh()); | ||
| 471 | + } | ||
| 472 | + } | ||
| 473 | + | ||
| 474 | + // 班组 | ||
| 475 | + if (item.getBz() != null) { | ||
| 476 | + Team team = teamMap.get(item.getBz()); | ||
| 477 | + if (team != null) { | ||
| 478 | + dto.setBzName(team.getBzmc()); | ||
| 479 | + dto.setBzCode(team.getBzbh()); | ||
| 480 | + } | ||
| 481 | + } | ||
| 482 | + | ||
| 483 | + // 问题提出人 | ||
| 484 | + if (item.getWttcr() != null) { | ||
| 485 | + UcUser user = userMap.get(item.getWttcr()); | ||
| 486 | + if (user != null) { | ||
| 487 | + dto.setWttcrName(user.getName()); | ||
| 488 | + } | ||
| 489 | + } | ||
| 490 | + | ||
| 491 | + // 问题处理人 | ||
| 492 | + if (item.getWtclr() != null) { | ||
| 493 | + UcUser user = userMap.get(item.getWtclr()); | ||
| 494 | + if (user != null) { | ||
| 495 | + dto.setWtclrName(user.getName()); | ||
| 496 | + } | ||
| 497 | + } | ||
| 498 | + | ||
| 499 | + return dto; | ||
| 500 | + }) | ||
| 501 | + .collect(Collectors.toList()); | ||
| 502 | + } | ||
| 70 | } | 503 | } |
| @@ -67,4 +67,28 @@ public class PersonnelService extends BaseServiceImpl<Personnel> { | @@ -67,4 +67,28 @@ public class PersonnelService extends BaseServiceImpl<Personnel> { | ||
| 67 | 67 | ||
| 68 | return personnelMapper.selectAll(); | 68 | return personnelMapper.selectAll(); |
| 69 | } | 69 | } |
| 70 | + | ||
| 71 | + /** | ||
| 72 | + * 根据工号集合查询人员信息 | ||
| 73 | + * | ||
| 74 | + * @param ghSet 工号集合 | ||
| 75 | + * @return 工号到人员信息的映射 | ||
| 76 | + */ | ||
| 77 | + @Transactional(readOnly = true) | ||
| 78 | + public Map<String, Personnel> mapByGh(Collection<String> ghSet) { | ||
| 79 | + if (CollectionUtils.isEmpty(ghSet)) { | ||
| 80 | + return new HashMap<>(0); | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + Example example = new Example(entityClass); | ||
| 84 | + example.createCriteria().andIn(Personnel.GH, ghSet); | ||
| 85 | + List<Personnel> personnelList = personnelMapper.selectByExample(example); | ||
| 86 | + if (CollectionUtils.isEmpty(personnelList)) { | ||
| 87 | + return new HashMap<>(0); | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + return personnelList.stream() | ||
| 91 | + .filter(p -> p.getGh() != null) | ||
| 92 | + .collect(Collectors.toMap(Personnel::getGh, p -> p, (v1, v2) -> v1)); | ||
| 93 | + } | ||
| 70 | } | 94 | } |
| 1 | package com.qgutech.qgyun.apaas.sync.cps.service; | 1 | package com.qgutech.qgyun.apaas.sync.cps.service; |
| 2 | 2 | ||
| 3 | +import com.qgutech.qgyun.apaas.sync.cps.enums.QuarterEnum; | ||
| 4 | +import com.qgutech.qgyun.apaas.sync.utils.DateDealUtils; | ||
| 3 | import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl; | 5 | import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl; |
| 4 | import com.qgutech.qgyun.apaas.sync.base.BoErrorCode; | 6 | import com.qgutech.qgyun.apaas.sync.base.BoErrorCode; |
| 5 | import com.qgutech.qgyun.apaas.sync.base.BoException; | 7 | import com.qgutech.qgyun.apaas.sync.base.BoException; |
| 6 | import com.qgutech.qgyun.apaas.sync.cps.mapper.QuarterPersonnelMapper; | 8 | import com.qgutech.qgyun.apaas.sync.cps.mapper.QuarterPersonnelMapper; |
| 7 | import com.qgutech.qgyun.apaas.sync.cps.model.QuarterPersonnel; | 9 | import com.qgutech.qgyun.apaas.sync.cps.model.QuarterPersonnel; |
| 8 | import org.apache.commons.collections4.CollectionUtils; | 10 | import org.apache.commons.collections4.CollectionUtils; |
| 11 | +import org.apache.commons.lang3.StringUtils; | ||
| 9 | import org.springframework.stereotype.Service; | 12 | import org.springframework.stereotype.Service; |
| 10 | import org.springframework.transaction.annotation.Transactional; | 13 | import org.springframework.transaction.annotation.Transactional; |
| 11 | import org.springframework.util.Assert; | 14 | import org.springframework.util.Assert; |
| @@ -71,19 +74,56 @@ public class QuarterPersonnelService extends BaseServiceImpl<QuarterPersonnel> { | @@ -71,19 +74,56 @@ public class QuarterPersonnelService extends BaseServiceImpl<QuarterPersonnel> { | ||
| 71 | /** | 74 | /** |
| 72 | * 根据年份和季度查询季度人员信息 | 75 | * 根据年份和季度查询季度人员信息 |
| 73 | * | 76 | * |
| 74 | - * @param yearStartTime 年份开始时间 | ||
| 75 | - * @param quarter 季度枚举值(#1#-#4#) | 77 | + * @param year 年份 |
| 78 | + * @param quarter 季度枚举值(#1#-#4#) | ||
| 76 | * @return 季度人员信息列表 | 79 | * @return 季度人员信息列表 |
| 77 | */ | 80 | */ |
| 78 | @Transactional(readOnly = true) | 81 | @Transactional(readOnly = true) |
| 79 | - public List<QuarterPersonnel> listByYearAndQuarter(Date yearStartTime, String quarter) { | ||
| 80 | - Assert.notNull(yearStartTime, "year is empty!"); | ||
| 81 | - Assert.hasLength(quarter, "quarter is empty!"); | 82 | + public List<QuarterPersonnel> listByYearAndQuarter(String year, QuarterEnum quarter) { |
| 83 | + // 2. 处理年份参数,为空时默认为当前年 | ||
| 84 | + String queryYear = StringUtils.isBlank(year) ? String.valueOf(Calendar.getInstance().get(Calendar.YEAR)) : year; | ||
| 85 | + Assert.isTrue(queryYear.matches("\\d{4}"), "year format must be yyyy!"); | ||
| 86 | + Assert.notNull(quarter, "quarter is empty!"); | ||
| 82 | 87 | ||
| 88 | + Date yearStartTime = DateDealUtils.parseYearStartTime(queryYear); | ||
| 89 | + Date yearEndTime = DateDealUtils.parseYearEndTime(queryYear); | ||
| 83 | Example example = new Example(entityClass); | 90 | Example example = new Example(entityClass); |
| 84 | example.createCriteria() | 91 | example.createCriteria() |
| 85 | - .andEqualTo("year", yearStartTime) | ||
| 86 | - .andEqualTo("jdxx", quarter); | 92 | + .andBetween(QuarterPersonnel.YEAR, yearStartTime, yearEndTime) |
| 93 | + .andEqualTo(QuarterPersonnel.JDXX, quarter.getCode()); | ||
| 94 | + List<QuarterPersonnel> quarterPersonnelList = quarterPersonnelMapper.selectByExample(example); | ||
| 95 | + if (CollectionUtils.isEmpty(quarterPersonnelList)) { | ||
| 96 | + return new ArrayList<>(0); | ||
| 97 | + } | ||
| 98 | + return quarterPersonnelList; | ||
| 99 | + } | ||
| 100 | + | ||
| 101 | + /** | ||
| 102 | + * 根据年份、季度和室组id查询季度人员信息 | ||
| 103 | + * | ||
| 104 | + * @param year 年份,格式:yyyy,为空时默认当前年 | ||
| 105 | + * @param quarter 季度枚举值(#1#-#4#) | ||
| 106 | + * @param roomGroupId 室组id | ||
| 107 | + * @return 季度人员信息列表 | ||
| 108 | + */ | ||
| 109 | + @Transactional(readOnly = true) | ||
| 110 | + public List<QuarterPersonnel> listByYearQuarterAndRoomGroup(String year, QuarterEnum quarter, String roomGroupId) { | ||
| 111 | + // 1. 处理年份参数,为空时默认为当前年 | ||
| 112 | + String queryYear = StringUtils.isBlank(year) ? String.valueOf(Calendar.getInstance().get(Calendar.YEAR)) : year; | ||
| 113 | + Assert.isTrue(queryYear.matches("\\d{4}"), "year format must be yyyy!"); | ||
| 114 | + Assert.notNull(quarter, "quarter is empty!"); | ||
| 115 | + Assert.hasLength(roomGroupId, "roomGroupId is empty!"); | ||
| 116 | + | ||
| 117 | + // 2. 计算年份的开始时间和结束时间 | ||
| 118 | + Date yearStartTime = DateDealUtils.parseYearStartTime(queryYear); | ||
| 119 | + Date yearEndTime = DateDealUtils.parseYearEndTime(queryYear); | ||
| 120 | + | ||
| 121 | + // 3. 查询该年份季度该室组下的季度人员信息 | ||
| 122 | + Example example = new Example(entityClass); | ||
| 123 | + example.createCriteria() | ||
| 124 | + .andBetween(QuarterPersonnel.YEAR, yearStartTime, yearEndTime) | ||
| 125 | + .andEqualTo(QuarterPersonnel.JDXX, quarter.getCode()) | ||
| 126 | + .andEqualTo(QuarterPersonnel.SHSZ, roomGroupId); | ||
| 87 | List<QuarterPersonnel> quarterPersonnelList = quarterPersonnelMapper.selectByExample(example); | 127 | List<QuarterPersonnel> quarterPersonnelList = quarterPersonnelMapper.selectByExample(example); |
| 88 | if (CollectionUtils.isEmpty(quarterPersonnelList)) { | 128 | if (CollectionUtils.isEmpty(quarterPersonnelList)) { |
| 89 | return new ArrayList<>(0); | 129 | return new ArrayList<>(0); |
| 1 | +package com.qgutech.qgyun.apaas.sync.org.model; | ||
| 2 | + | ||
| 3 | +import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | ||
| 4 | +import lombok.Getter; | ||
| 5 | +import lombok.Setter; | ||
| 6 | +import lombok.ToString; | ||
| 7 | + | ||
| 8 | +import javax.persistence.Table; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * 组织结构信息 | ||
| 12 | + */ | ||
| 13 | +@Getter | ||
| 14 | +@Setter | ||
| 15 | +@ToString | ||
| 16 | +@Table(name = "t_apaas_uc_org") | ||
| 17 | +public class UcOrg extends BaseCorpModel { | ||
| 18 | + | ||
| 19 | + public static final String NAME = "name"; | ||
| 20 | + public static final String PARENT_ID = "parentId"; | ||
| 21 | + | ||
| 22 | + /* | ||
| 23 | + * 部门编码 | ||
| 24 | + */ | ||
| 25 | + private String code; | ||
| 26 | + | ||
| 27 | + /* | ||
| 28 | + * 部门名称 | ||
| 29 | + */ | ||
| 30 | + private String name; | ||
| 31 | + | ||
| 32 | + /* | ||
| 33 | + * 部门负责人 | ||
| 34 | + */ | ||
| 35 | + private String administrator; | ||
| 36 | + | ||
| 37 | + /* | ||
| 38 | + * 部门类型 | ||
| 39 | + */ | ||
| 40 | + private String type; | ||
| 41 | + | ||
| 42 | + /* | ||
| 43 | + * 父级ID | ||
| 44 | + */ | ||
| 45 | + private String parentId; | ||
| 46 | + | ||
| 47 | + /* | ||
| 48 | + * 引用类型 | ||
| 49 | + */ | ||
| 50 | + private String refType; | ||
| 51 | + | ||
| 52 | + /* | ||
| 53 | + * 引用ID | ||
| 54 | + */ | ||
| 55 | + private String refId; | ||
| 56 | + | ||
| 57 | + /* | ||
| 58 | + * 排序 | ||
| 59 | + */ | ||
| 60 | + private Double sorts; | ||
| 61 | +} |
| 1 | +package com.qgutech.qgyun.apaas.sync.org.model; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonFormat; | ||
| 4 | +import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | ||
| 5 | +import lombok.Getter; | ||
| 6 | +import lombok.Setter; | ||
| 7 | +import lombok.ToString; | ||
| 8 | +import org.springframework.format.annotation.DateTimeFormat; | ||
| 9 | + | ||
| 10 | +import javax.persistence.Column; | ||
| 11 | +import javax.persistence.Table; | ||
| 12 | +import java.util.Date; | ||
| 13 | + | ||
| 14 | +/** | ||
| 15 | + * 组织用户信息 | ||
| 16 | + */ | ||
| 17 | +@Getter | ||
| 18 | +@Setter | ||
| 19 | +@ToString | ||
| 20 | +@Table(name = "t_apaas_uc_user") | ||
| 21 | +public class UcUser extends BaseCorpModel { | ||
| 22 | + | ||
| 23 | + public static final String NAME = "name"; | ||
| 24 | + | ||
| 25 | + /* | ||
| 26 | + * 姓名 | ||
| 27 | + */ | ||
| 28 | + private String name; | ||
| 29 | + | ||
| 30 | + /* | ||
| 31 | + * 姓名全拼 | ||
| 32 | + */ | ||
| 33 | + private String nameSpell; | ||
| 34 | + | ||
| 35 | + /* | ||
| 36 | + * 手机号 | ||
| 37 | + */ | ||
| 38 | + private String mobile; | ||
| 39 | + | ||
| 40 | + /* | ||
| 41 | + * 邮箱 | ||
| 42 | + */ | ||
| 43 | + private String email; | ||
| 44 | + | ||
| 45 | + /* | ||
| 46 | + * 身份证号 | ||
| 47 | + */ | ||
| 48 | + private String idCard; | ||
| 49 | + | ||
| 50 | + /* | ||
| 51 | + * 上级ID | ||
| 52 | + */ | ||
| 53 | + private String leaderId; | ||
| 54 | + | ||
| 55 | + /* | ||
| 56 | + * 登录名 | ||
| 57 | + */ | ||
| 58 | + private String loginName; | ||
| 59 | + | ||
| 60 | + /* | ||
| 61 | + * 状态 | ||
| 62 | + */ | ||
| 63 | + private String status; | ||
| 64 | + | ||
| 65 | + /* | ||
| 66 | + * 密码 | ||
| 67 | + */ | ||
| 68 | + private String pwd; | ||
| 69 | + | ||
| 70 | + /* | ||
| 71 | + * 类型 | ||
| 72 | + */ | ||
| 73 | + private String type; | ||
| 74 | + | ||
| 75 | + /* | ||
| 76 | + * 是否启用报表(自定义字段) | ||
| 77 | + */ | ||
| 78 | + @Column(name = "_d_10409_enabled_report") | ||
| 79 | + private Boolean d10409EnabledReport; | ||
| 80 | + | ||
| 81 | + /* | ||
| 82 | + * 门户ID | ||
| 83 | + */ | ||
| 84 | + private String portalId; | ||
| 85 | + | ||
| 86 | + /* | ||
| 87 | + * lflzvg | ||
| 88 | + */ | ||
| 89 | + private String lflzvg; | ||
| 90 | + | ||
| 91 | + /* | ||
| 92 | + * 性别 | ||
| 93 | + */ | ||
| 94 | + private String sex; | ||
| 95 | + | ||
| 96 | + /* | ||
| 97 | + * 上级 | ||
| 98 | + */ | ||
| 99 | + private String leader; | ||
| 100 | + | ||
| 101 | + /* | ||
| 102 | + * 生日 | ||
| 103 | + */ | ||
| 104 | + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||
| 105 | + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||
| 106 | + private Date birthday; | ||
| 107 | + | ||
| 108 | + /* | ||
| 109 | + * 启用报表 | ||
| 110 | + */ | ||
| 111 | + private String enabledReport; | ||
| 112 | + | ||
| 113 | + /* | ||
| 114 | + * 头像 | ||
| 115 | + */ | ||
| 116 | + private String avatar; | ||
| 117 | + | ||
| 118 | + /* | ||
| 119 | + * 引用类型 | ||
| 120 | + */ | ||
| 121 | + private String refType; | ||
| 122 | + | ||
| 123 | + /* | ||
| 124 | + * 引用ID | ||
| 125 | + */ | ||
| 126 | + private String refId; | ||
| 127 | +} |
| 1 | +package com.qgutech.qgyun.apaas.sync.org.service; | ||
| 2 | + | ||
| 3 | +import com.qgutech.qgyun.apaas.sync.base.BoErrorCode; | ||
| 4 | +import com.qgutech.qgyun.apaas.sync.base.BoException; | ||
| 5 | +import com.qgutech.qgyun.apaas.sync.org.mapper.UcOrgMapper; | ||
| 6 | +import com.qgutech.qgyun.apaas.sync.org.model.UcOrg; | ||
| 7 | +import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl; | ||
| 8 | +import org.apache.commons.collections4.CollectionUtils; | ||
| 9 | +import org.springframework.stereotype.Service; | ||
| 10 | +import org.springframework.transaction.annotation.Transactional; | ||
| 11 | +import org.springframework.util.Assert; | ||
| 12 | +import tk.mybatis.mapper.entity.Example; | ||
| 13 | + | ||
| 14 | +import javax.annotation.Resource; | ||
| 15 | +import java.util.*; | ||
| 16 | +import java.util.stream.Collectors; | ||
| 17 | + | ||
| 18 | +/** | ||
| 19 | + * 组织结构信息服务 | ||
| 20 | + */ | ||
| 21 | +@Service | ||
| 22 | +public class UcOrgService extends BaseServiceImpl<UcOrg> { | ||
| 23 | + | ||
| 24 | + @Resource | ||
| 25 | + private UcOrgMapper ucOrgMapper; | ||
| 26 | + | ||
| 27 | + @Transactional(readOnly = true) | ||
| 28 | + public UcOrg getById(String id) { | ||
| 29 | + Assert.hasLength(id, "id is empty!"); | ||
| 30 | + | ||
| 31 | + Example example = new Example(entityClass); | ||
| 32 | + example.createCriteria().andEqualTo(UcOrg.ID, id); | ||
| 33 | + UcOrg ucOrg = ucOrgMapper.selectOneByExample(example); | ||
| 34 | + if (null == ucOrg) { | ||
| 35 | + throw new BoException(BoErrorCode.DATA_ERROR); | ||
| 36 | + } | ||
| 37 | + return ucOrg; | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + @Transactional(readOnly = true) | ||
| 41 | + public List<UcOrg> listByIds(Collection<String> ids) { | ||
| 42 | + Assert.notEmpty(ids, "ids is empty!"); | ||
| 43 | + | ||
| 44 | + Example example = new Example(entityClass); | ||
| 45 | + example.createCriteria().andIn(UcOrg.ID, ids); | ||
| 46 | + List<UcOrg> ucOrgList = ucOrgMapper.selectByExample(example); | ||
| 47 | + if (CollectionUtils.isEmpty(ucOrgList)) { | ||
| 48 | + return new ArrayList<>(0); | ||
| 49 | + } | ||
| 50 | + return ucOrgList; | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + @Transactional(readOnly = true) | ||
| 54 | + public Map<String, UcOrg> mapByIds(Collection<String> ids) { | ||
| 55 | + Assert.notEmpty(ids, "ids is empty!"); | ||
| 56 | + | ||
| 57 | + List<UcOrg> ucOrgList = listByIds(ids); | ||
| 58 | + if (CollectionUtils.isEmpty(ucOrgList)) { | ||
| 59 | + return new HashMap<>(0); | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + return ucOrgList.stream().collect(Collectors.toMap(UcOrg::getId, ucOrg -> ucOrg)); | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + @Transactional(readOnly = true) | ||
| 66 | + public List<UcOrg> listAll() { | ||
| 67 | + | ||
| 68 | + return ucOrgMapper.selectAll(); | ||
| 69 | + } | ||
| 70 | +} |
| 1 | +package com.qgutech.qgyun.apaas.sync.org.service; | ||
| 2 | + | ||
| 3 | +import com.qgutech.qgyun.apaas.sync.base.BoErrorCode; | ||
| 4 | +import com.qgutech.qgyun.apaas.sync.base.BoException; | ||
| 5 | +import com.qgutech.qgyun.apaas.sync.org.mapper.UcUserMapper; | ||
| 6 | +import com.qgutech.qgyun.apaas.sync.org.model.UcUser; | ||
| 7 | +import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl; | ||
| 8 | +import org.apache.commons.collections4.CollectionUtils; | ||
| 9 | +import org.springframework.stereotype.Service; | ||
| 10 | +import org.springframework.transaction.annotation.Transactional; | ||
| 11 | +import org.springframework.util.Assert; | ||
| 12 | +import tk.mybatis.mapper.entity.Example; | ||
| 13 | + | ||
| 14 | +import javax.annotation.Resource; | ||
| 15 | +import java.util.*; | ||
| 16 | +import java.util.stream.Collectors; | ||
| 17 | + | ||
| 18 | +/** | ||
| 19 | + * 组织用户信息服务 | ||
| 20 | + */ | ||
| 21 | +@Service | ||
| 22 | +public class UcUserService extends BaseServiceImpl<UcUser> { | ||
| 23 | + | ||
| 24 | + @Resource | ||
| 25 | + private UcUserMapper ucUserMapper; | ||
| 26 | + | ||
| 27 | + @Transactional(readOnly = true) | ||
| 28 | + public UcUser getById(String id) { | ||
| 29 | + Assert.hasLength(id, "id is empty!"); | ||
| 30 | + | ||
| 31 | + Example example = new Example(entityClass); | ||
| 32 | + example.createCriteria().andEqualTo(UcUser.ID, id); | ||
| 33 | + UcUser ucUser = ucUserMapper.selectOneByExample(example); | ||
| 34 | + if (null == ucUser) { | ||
| 35 | + throw new BoException(BoErrorCode.DATA_ERROR); | ||
| 36 | + } | ||
| 37 | + return ucUser; | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + @Transactional(readOnly = true) | ||
| 41 | + public List<UcUser> listByIds(Collection<String> ids) { | ||
| 42 | + Assert.notEmpty(ids, "ids is empty!"); | ||
| 43 | + | ||
| 44 | + Example example = new Example(entityClass); | ||
| 45 | + example.createCriteria().andIn(UcUser.ID, ids); | ||
| 46 | + List<UcUser> ucUserList = ucUserMapper.selectByExample(example); | ||
| 47 | + if (CollectionUtils.isEmpty(ucUserList)) { | ||
| 48 | + return new ArrayList<>(0); | ||
| 49 | + } | ||
| 50 | + return ucUserList; | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + @Transactional(readOnly = true) | ||
| 54 | + public Map<String, UcUser> mapByIds(Collection<String> ids) { | ||
| 55 | + Assert.notEmpty(ids, "ids is empty!"); | ||
| 56 | + | ||
| 57 | + List<UcUser> ucUserList = listByIds(ids); | ||
| 58 | + if (CollectionUtils.isEmpty(ucUserList)) { | ||
| 59 | + return new HashMap<>(0); | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + return ucUserList.stream().collect(Collectors.toMap(UcUser::getId, ucUser -> ucUser)); | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + @Transactional(readOnly = true) | ||
| 66 | + public List<UcUser> listAll() { | ||
| 67 | + | ||
| 68 | + return ucUserMapper.selectAll(); | ||
| 69 | + } | ||
| 70 | +} |
| @@ -2,19 +2,23 @@ package com.qgutech.qgyun.apaas.sync.utils; | @@ -2,19 +2,23 @@ package com.qgutech.qgyun.apaas.sync.utils; | ||
| 2 | 2 | ||
| 3 | import com.qgutech.qgyun.apaas.sync.base.BoErrorCode; | 3 | import com.qgutech.qgyun.apaas.sync.base.BoErrorCode; |
| 4 | import com.qgutech.qgyun.apaas.sync.base.BoException; | 4 | import com.qgutech.qgyun.apaas.sync.base.BoException; |
| 5 | +import com.qgutech.qgyun.apaas.sync.cps.enums.QuarterEnum; | ||
| 5 | 6 | ||
| 6 | import java.text.ParseException; | 7 | import java.text.ParseException; |
| 7 | import java.text.SimpleDateFormat; | 8 | import java.text.SimpleDateFormat; |
| 9 | +import java.util.Calendar; | ||
| 8 | import java.util.Date; | 10 | import java.util.Date; |
| 9 | 11 | ||
| 10 | public class DateDealUtils { | 12 | public class DateDealUtils { |
| 11 | 13 | ||
| 14 | + private static final String DATE_TIME_PATTERN = "yyyy-MM-dd HH:mm:ss"; | ||
| 15 | + | ||
| 12 | /** | 16 | /** |
| 13 | * 解析年份开始时间 | 17 | * 解析年份开始时间 |
| 14 | */ | 18 | */ |
| 15 | public static Date parseYearStartTime(String year) { | 19 | public static Date parseYearStartTime(String year) { |
| 16 | try { | 20 | try { |
| 17 | - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | 21 | + SimpleDateFormat sdf = new SimpleDateFormat(DATE_TIME_PATTERN); |
| 18 | return sdf.parse(year + "-01-01 00:00:00"); | 22 | return sdf.parse(year + "-01-01 00:00:00"); |
| 19 | } catch (ParseException e) { | 23 | } catch (ParseException e) { |
| 20 | throw new BoException(BoErrorCode.PARAM_ERROR, "年份格式错误"); | 24 | throw new BoException(BoErrorCode.PARAM_ERROR, "年份格式错误"); |
| @@ -26,10 +30,151 @@ public class DateDealUtils { | @@ -26,10 +30,151 @@ public class DateDealUtils { | ||
| 26 | */ | 30 | */ |
| 27 | public static Date parseYearEndTime(String year) { | 31 | public static Date parseYearEndTime(String year) { |
| 28 | try { | 32 | try { |
| 29 | - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | 33 | + SimpleDateFormat sdf = new SimpleDateFormat(DATE_TIME_PATTERN); |
| 30 | return sdf.parse(year + "-12-31 23:59:59"); | 34 | return sdf.parse(year + "-12-31 23:59:59"); |
| 31 | } catch (ParseException e) { | 35 | } catch (ParseException e) { |
| 32 | throw new BoException(BoErrorCode.PARAM_ERROR, "年份格式错误"); | 36 | throw new BoException(BoErrorCode.PARAM_ERROR, "年份格式错误"); |
| 33 | } | 37 | } |
| 34 | } | 38 | } |
| 39 | + | ||
| 40 | + /** | ||
| 41 | + * 解析季度开始时间 | ||
| 42 | + */ | ||
| 43 | + public static Date parseQuarterStartTime(String year, QuarterEnum quarter) { | ||
| 44 | + try { | ||
| 45 | + SimpleDateFormat sdf = new SimpleDateFormat(DATE_TIME_PATTERN); | ||
| 46 | + return sdf.parse(year + "-" + quarter.getStartDate() + " 00:00:00"); | ||
| 47 | + } catch (ParseException e) { | ||
| 48 | + throw new BoException(BoErrorCode.PARAM_ERROR, "季度日期格式错误"); | ||
| 49 | + } | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + /** | ||
| 53 | + * 解析季度结束时间 | ||
| 54 | + */ | ||
| 55 | + public static Date parseQuarterEndTime(String year, QuarterEnum quarter) { | ||
| 56 | + try { | ||
| 57 | + SimpleDateFormat sdf = new SimpleDateFormat(DATE_TIME_PATTERN); | ||
| 58 | + return sdf.parse(year + "-" + quarter.getEndDate() + " 23:59:59"); | ||
| 59 | + } catch (ParseException e) { | ||
| 60 | + throw new BoException(BoErrorCode.PARAM_ERROR, "季度日期格式错误"); | ||
| 61 | + } | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + /** | ||
| 65 | + * 解析日期字符串,支持以下格式: | ||
| 66 | + * <ul> | ||
| 67 | + * <li>yyyy-MM-dd HH:mm:ss</li> | ||
| 68 | + * <li>yyyy-MM-dd</li> | ||
| 69 | + * <li>yyyy/MM/dd HH:mm:ss</li> | ||
| 70 | + * <li>yyyy/MM/dd</li> | ||
| 71 | + * </ul> | ||
| 72 | + * | ||
| 73 | + * @param dateStr 日期字符串 | ||
| 74 | + * @return 解析后的日期,为空时返回 null | ||
| 75 | + */ | ||
| 76 | + public static Date parseDate(String dateStr) { | ||
| 77 | + if (dateStr == null || dateStr.trim().isEmpty()) { | ||
| 78 | + return null; | ||
| 79 | + } | ||
| 80 | + String trimmed = dateStr.trim(); | ||
| 81 | + String[] patterns = new String[]{ | ||
| 82 | + "yyyy-MM-dd HH:mm:ss", | ||
| 83 | + "yyyy-MM-dd", | ||
| 84 | + "yyyy/MM/dd HH:mm:ss", | ||
| 85 | + "yyyy/MM/dd" | ||
| 86 | + }; | ||
| 87 | + for (String pattern : patterns) { | ||
| 88 | + try { | ||
| 89 | + SimpleDateFormat sdf = new SimpleDateFormat(pattern); | ||
| 90 | + sdf.setLenient(false); | ||
| 91 | + return sdf.parse(trimmed); | ||
| 92 | + } catch (ParseException ignored) { | ||
| 93 | + // 尝试下一个格式 | ||
| 94 | + } | ||
| 95 | + } | ||
| 96 | + throw new BoException(BoErrorCode.PARAM_ERROR, "日期格式错误,支持 yyyy-MM-dd [HH:mm:ss]"); | ||
| 97 | + } | ||
| 98 | + | ||
| 99 | + /** | ||
| 100 | + * 将开始时间字符串解析为当天的 00:00:00(若未包含时间部分) | ||
| 101 | + */ | ||
| 102 | + public static Date parseStartTime(String dateStr) { | ||
| 103 | + Date date = parseDate(dateStr); | ||
| 104 | + if (date == null) { | ||
| 105 | + return null; | ||
| 106 | + } | ||
| 107 | + // 如果传入的字符串不包含时间部分,则默认为当天开始 | ||
| 108 | + if (dateStr != null && dateStr.trim().length() <= 10) { | ||
| 109 | + return date; | ||
| 110 | + } | ||
| 111 | + return date; | ||
| 112 | + } | ||
| 113 | + | ||
| 114 | + /** | ||
| 115 | + * 将结束时间字符串解析为当天的 23:59:59(若未包含时间部分) | ||
| 116 | + */ | ||
| 117 | + public static Date parseEndTime(String dateStr) { | ||
| 118 | + Date date = parseDate(dateStr); | ||
| 119 | + if (date == null) { | ||
| 120 | + return null; | ||
| 121 | + } | ||
| 122 | + // 如果传入的字符串不包含时间部分,则默认为当天结束 | ||
| 123 | + if (dateStr != null && dateStr.trim().length() <= 10) { | ||
| 124 | + java.util.Calendar cal = java.util.Calendar.getInstance(); | ||
| 125 | + cal.setTime(date); | ||
| 126 | + cal.set(java.util.Calendar.HOUR_OF_DAY, 23); | ||
| 127 | + cal.set(java.util.Calendar.MINUTE, 59); | ||
| 128 | + cal.set(java.util.Calendar.SECOND, 59); | ||
| 129 | + cal.set(java.util.Calendar.MILLISECOND, 999); | ||
| 130 | + return cal.getTime(); | ||
| 131 | + } | ||
| 132 | + return date; | ||
| 133 | + } | ||
| 134 | + | ||
| 135 | + /** | ||
| 136 | + * 获取当前月的开始时间(当月 1 号 00:00:00.000) | ||
| 137 | + */ | ||
| 138 | + public static Date getCurrentMonthStartTime() { | ||
| 139 | + Calendar cal = Calendar.getInstance(); | ||
| 140 | + cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH)); | ||
| 141 | + cal.set(Calendar.HOUR_OF_DAY, 0); | ||
| 142 | + cal.set(Calendar.MINUTE, 0); | ||
| 143 | + cal.set(Calendar.SECOND, 0); | ||
| 144 | + cal.set(Calendar.MILLISECOND, 0); | ||
| 145 | + return cal.getTime(); | ||
| 146 | + } | ||
| 147 | + | ||
| 148 | + /** | ||
| 149 | + * 获取当前月的结束时间(当月最后一天 23:59:59.999) | ||
| 150 | + */ | ||
| 151 | + public static Date getCurrentMonthEndTime() { | ||
| 152 | + Calendar cal = Calendar.getInstance(); | ||
| 153 | + cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH)); | ||
| 154 | + cal.set(Calendar.HOUR_OF_DAY, 23); | ||
| 155 | + cal.set(Calendar.MINUTE, 59); | ||
| 156 | + cal.set(Calendar.SECOND, 59); | ||
| 157 | + cal.set(Calendar.MILLISECOND, 999); | ||
| 158 | + return cal.getTime(); | ||
| 159 | + } | ||
| 160 | + | ||
| 161 | + /** | ||
| 162 | + * 解析开始时间字符串,为空时默认返回当前月开始时间 | ||
| 163 | + */ | ||
| 164 | + public static Date parseStartTimeOrCurrentMonthStart(String dateStr) { | ||
| 165 | + if (dateStr == null || dateStr.trim().isEmpty()) { | ||
| 166 | + return getCurrentMonthStartTime(); | ||
| 167 | + } | ||
| 168 | + return parseStartTime(dateStr); | ||
| 169 | + } | ||
| 170 | + | ||
| 171 | + /** | ||
| 172 | + * 解析结束时间字符串,为空时默认返回当前月结束时间 | ||
| 173 | + */ | ||
| 174 | + public static Date parseEndTimeOrCurrentMonthEnd(String dateStr) { | ||
| 175 | + if (dateStr == null || dateStr.trim().isEmpty()) { | ||
| 176 | + return getCurrentMonthEndTime(); | ||
| 177 | + } | ||
| 178 | + return parseEndTime(dateStr); | ||
| 179 | + } | ||
| 35 | } | 180 | } |