Showing
25 changed files
with
2035 additions
and
98 deletions
| @@ -69,6 +69,11 @@ public class ProcessConfirmTeamPlanDetailDTO implements Serializable { | @@ -69,6 +69,11 @@ public class ProcessConfirmTeamPlanDetailDTO implements Serializable { | ||
| 69 | private String zt; | 69 | private String zt; |
| 70 | 70 | ||
| 71 | /* | 71 | /* |
| 72 | + * 状态中文描述 | ||
| 73 | + */ | ||
| 74 | + private String ztDesc; | ||
| 75 | + | ||
| 76 | + /* | ||
| 72 | * 是否发现问题 | 77 | * 是否发现问题 |
| 73 | */ | 78 | */ |
| 74 | private Boolean sffxwt; | 79 | private Boolean sffxwt; |
| @@ -17,11 +17,31 @@ public class QualityDefectWorkstationSummaryDTO implements Serializable { | @@ -17,11 +17,31 @@ public class QualityDefectWorkstationSummaryDTO implements Serializable { | ||
| 17 | private static final long serialVersionUID = 1L; | 17 | private static final long serialVersionUID = 1L; |
| 18 | 18 | ||
| 19 | /* | 19 | /* |
| 20 | - * 工位信息ID | 20 | + * 停线工位信息ID |
| 21 | */ | 21 | */ |
| 22 | private String wtgwxx; | 22 | private String wtgwxx; |
| 23 | 23 | ||
| 24 | /* | 24 | /* |
| 25 | + * 工位名称(关联停线工位信息) | ||
| 26 | + */ | ||
| 27 | + private String gwmc; | ||
| 28 | + | ||
| 29 | + /* | ||
| 30 | + * 工位编号(关联停线工位信息) | ||
| 31 | + */ | ||
| 32 | + private String gwbh; | ||
| 33 | + | ||
| 34 | + /* | ||
| 35 | + * 工位性质编号(关联停线工位信息,枚举 #1#-主线/#2#-辅线) | ||
| 36 | + */ | ||
| 37 | + private String gwxz; | ||
| 38 | + | ||
| 39 | + /* | ||
| 40 | + * 工位性质名称(关联停线工位信息,由 StopGwxzEnum 解析) | ||
| 41 | + */ | ||
| 42 | + private String gwxzDesc; | ||
| 43 | + | ||
| 44 | + /* | ||
| 25 | * 该工位缺陷记录数 | 45 | * 该工位缺陷记录数 |
| 26 | */ | 46 | */ |
| 27 | private Integer count; | 47 | private Integer count; |
| @@ -22,6 +22,11 @@ public class WorkshopWorkTaskStatusSummaryDTO implements Serializable { | @@ -22,6 +22,11 @@ public class WorkshopWorkTaskStatusSummaryDTO implements Serializable { | ||
| 22 | private String rwzt; | 22 | private String rwzt; |
| 23 | 23 | ||
| 24 | /* | 24 | /* |
| 25 | + * 任务状态中文描述 | ||
| 26 | + */ | ||
| 27 | + private String rwztDesc; | ||
| 28 | + | ||
| 29 | + /* | ||
| 25 | * 该状态下的任务数量 | 30 | * 该状态下的任务数量 |
| 26 | */ | 31 | */ |
| 27 | private Integer count; | 32 | private Integer count; |
| @@ -29,8 +34,9 @@ public class WorkshopWorkTaskStatusSummaryDTO implements Serializable { | @@ -29,8 +34,9 @@ public class WorkshopWorkTaskStatusSummaryDTO implements Serializable { | ||
| 29 | public WorkshopWorkTaskStatusSummaryDTO() { | 34 | public WorkshopWorkTaskStatusSummaryDTO() { |
| 30 | } | 35 | } |
| 31 | 36 | ||
| 32 | - public WorkshopWorkTaskStatusSummaryDTO(String rwzt, Integer count) { | 37 | + public WorkshopWorkTaskStatusSummaryDTO(String rwzt, String rwztDesc, Integer count) { |
| 33 | this.rwzt = rwzt; | 38 | this.rwzt = rwzt; |
| 39 | + this.rwztDesc = rwztDesc; | ||
| 34 | this.count = count; | 40 | this.count = count; |
| 35 | } | 41 | } |
| 36 | } | 42 | } |
| 1 | +package com.qgutech.qgyun.apaas.sync.cps.enums; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 车间级工作计划状态枚举 | ||
| 7 | + * <p> | ||
| 8 | + * 数据库字段 gzjhzt 存储编号: | ||
| 9 | + * #1#-进行中,#2#-已完成,#3#-已逾期 | ||
| 10 | + */ | ||
| 11 | +@Getter | ||
| 12 | +public enum GzjhztEnum { | ||
| 13 | + | ||
| 14 | + JINXINGZHONG("#1#", "进行中"), | ||
| 15 | + YIWANCHENG("#2#", "已完成"), | ||
| 16 | + YIYUQI("#3#", "已逾期"); | ||
| 17 | + | ||
| 18 | + private final String code; | ||
| 19 | + private final String desc; | ||
| 20 | + | ||
| 21 | + GzjhztEnum(String code, String desc) { | ||
| 22 | + this.code = code; | ||
| 23 | + this.desc = desc; | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + public static GzjhztEnum fromCode(String code) { | ||
| 27 | + if (code == null) { | ||
| 28 | + return null; | ||
| 29 | + } | ||
| 30 | + for (GzjhztEnum item : values()) { | ||
| 31 | + if (item.code.equals(code)) { | ||
| 32 | + return item; | ||
| 33 | + } | ||
| 34 | + } | ||
| 35 | + if (!code.startsWith("#")) { | ||
| 36 | + String wrapped = "#" + code + "#"; | ||
| 37 | + for (GzjhztEnum 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 | + GzjhztEnum 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 | + * 数据库字段 kzahnt 存储编号: | ||
| 9 | + * #1#-C928,#2#-S311 | ||
| 10 | + */ | ||
| 11 | +@Getter | ||
| 12 | +public enum KzahntEnum { | ||
| 13 | + | ||
| 14 | + C928("#1#", "C928"), | ||
| 15 | + S311("#2#", "S311"); | ||
| 16 | + | ||
| 17 | + private final String code; | ||
| 18 | + private final String desc; | ||
| 19 | + | ||
| 20 | + KzahntEnum(String code, String desc) { | ||
| 21 | + this.code = code; | ||
| 22 | + this.desc = desc; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + public static KzahntEnum fromCode(String code) { | ||
| 26 | + if (code == null) { | ||
| 27 | + return null; | ||
| 28 | + } | ||
| 29 | + for (KzahntEnum item : values()) { | ||
| 30 | + if (item.code.equals(code)) { | ||
| 31 | + return item; | ||
| 32 | + } | ||
| 33 | + } | ||
| 34 | + if (!code.startsWith("#")) { | ||
| 35 | + String wrapped = "#" + code + "#"; | ||
| 36 | + for (KzahntEnum item : values()) { | ||
| 37 | + if (item.code.equals(wrapped)) { | ||
| 38 | + return item; | ||
| 39 | + } | ||
| 40 | + } | ||
| 41 | + } | ||
| 42 | + return null; | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + public static String getDescByCode(String code) { | ||
| 46 | + KzahntEnum item = fromCode(code); | ||
| 47 | + return item != null ? item.getDesc() : code; | ||
| 48 | + } | ||
| 49 | +} |
| 1 | +package com.qgutech.qgyun.apaas.sync.cps.enums; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 排查问题原因枚举 | ||
| 7 | + * <p> | ||
| 8 | + * 数据库字段 pcwtyy 存储编号: | ||
| 9 | + * #1#-40分问题,#2#-80分问题,#3#-300分问题 | ||
| 10 | + */ | ||
| 11 | +@Getter | ||
| 12 | +public enum PcwtyyEnum { | ||
| 13 | + | ||
| 14 | + FORTY("#1#", "40分问题"), | ||
| 15 | + EIGHTY("#2#", "80分问题"), | ||
| 16 | + THREE_HUNDRED("#3#", "300分问题"); | ||
| 17 | + | ||
| 18 | + private final String code; | ||
| 19 | + private final String desc; | ||
| 20 | + | ||
| 21 | + PcwtyyEnum(String code, String desc) { | ||
| 22 | + this.code = code; | ||
| 23 | + this.desc = desc; | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + public static PcwtyyEnum fromCode(String code) { | ||
| 27 | + if (code == null) { | ||
| 28 | + return null; | ||
| 29 | + } | ||
| 30 | + for (PcwtyyEnum item : values()) { | ||
| 31 | + if (item.code.equals(code)) { | ||
| 32 | + return item; | ||
| 33 | + } | ||
| 34 | + } | ||
| 35 | + if (!code.startsWith("#")) { | ||
| 36 | + String wrapped = "#" + code + "#"; | ||
| 37 | + for (PcwtyyEnum 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 | + PcwtyyEnum 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 | + * 数据库字段 qgxtbxz 存储编号: | ||
| 9 | + * #1#-是,#2#-否 | ||
| 10 | + */ | ||
| 11 | +@Getter | ||
| 12 | +public enum QgxtbxzEnum { | ||
| 13 | + | ||
| 14 | + SHI("#1#", "是"), | ||
| 15 | + FOU("#2#", "否"); | ||
| 16 | + | ||
| 17 | + private final String code; | ||
| 18 | + private final String desc; | ||
| 19 | + | ||
| 20 | + QgxtbxzEnum(String code, String desc) { | ||
| 21 | + this.code = code; | ||
| 22 | + this.desc = desc; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + public static QgxtbxzEnum fromCode(String code) { | ||
| 26 | + if (code == null) { | ||
| 27 | + return null; | ||
| 28 | + } | ||
| 29 | + for (QgxtbxzEnum item : values()) { | ||
| 30 | + if (item.code.equals(code)) { | ||
| 31 | + return item; | ||
| 32 | + } | ||
| 33 | + } | ||
| 34 | + if (!code.startsWith("#")) { | ||
| 35 | + String wrapped = "#" + code + "#"; | ||
| 36 | + for (QgxtbxzEnum item : values()) { | ||
| 37 | + if (item.code.equals(wrapped)) { | ||
| 38 | + return item; | ||
| 39 | + } | ||
| 40 | + } | ||
| 41 | + } | ||
| 42 | + return null; | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + public static String getDescByCode(String code) { | ||
| 46 | + QgxtbxzEnum item = fromCode(code); | ||
| 47 | + return item != null ? item.getDesc() : code; | ||
| 48 | + } | ||
| 49 | +} |
| 1 | +package com.qgutech.qgyun.apaas.sync.cps.enums; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 车间级工作任务状态枚举 | ||
| 7 | + * <p> | ||
| 8 | + * 数据库字段 rwzt 存储编号: | ||
| 9 | + * #1#-进行中,#2#-已完成,#3#-已逾期 | ||
| 10 | + */ | ||
| 11 | +@Getter | ||
| 12 | +public enum RwztEnum { | ||
| 13 | + | ||
| 14 | + JINXINGZHONG("#1#", "进行中"), | ||
| 15 | + YIWANCHENG("#2#", "已完成"), | ||
| 16 | + YIYUQI("#3#", "已逾期"); | ||
| 17 | + | ||
| 18 | + private final String code; | ||
| 19 | + private final String desc; | ||
| 20 | + | ||
| 21 | + RwztEnum(String code, String desc) { | ||
| 22 | + this.code = code; | ||
| 23 | + this.desc = desc; | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + public static RwztEnum fromCode(String code) { | ||
| 27 | + if (code == null) { | ||
| 28 | + return null; | ||
| 29 | + } | ||
| 30 | + for (RwztEnum item : values()) { | ||
| 31 | + if (item.code.equals(code)) { | ||
| 32 | + return item; | ||
| 33 | + } | ||
| 34 | + } | ||
| 35 | + if (!code.startsWith("#")) { | ||
| 36 | + String wrapped = "#" + code + "#"; | ||
| 37 | + for (RwztEnum 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 | + RwztEnum 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 | + * 数据库字段 sbgzlx 存储编号: | ||
| 9 | + * #1#-机械故障,#2#-电气故障 | ||
| 10 | + */ | ||
| 11 | +@Getter | ||
| 12 | +public enum SbgzlxEnum { | ||
| 13 | + | ||
| 14 | + JIXIE_GUZHANG("#1#", "机械故障"), | ||
| 15 | + DIANQI_GUZHANG("#2#", "电气故障"); | ||
| 16 | + | ||
| 17 | + private final String code; | ||
| 18 | + private final String desc; | ||
| 19 | + | ||
| 20 | + SbgzlxEnum(String code, String desc) { | ||
| 21 | + this.code = code; | ||
| 22 | + this.desc = desc; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + public static SbgzlxEnum fromCode(String code) { | ||
| 26 | + if (code == null) { | ||
| 27 | + return null; | ||
| 28 | + } | ||
| 29 | + for (SbgzlxEnum item : values()) { | ||
| 30 | + if (item.code.equals(code)) { | ||
| 31 | + return item; | ||
| 32 | + } | ||
| 33 | + } | ||
| 34 | + if (!code.startsWith("#")) { | ||
| 35 | + String wrapped = "#" + code + "#"; | ||
| 36 | + for (SbgzlxEnum item : values()) { | ||
| 37 | + if (item.code.equals(wrapped)) { | ||
| 38 | + return item; | ||
| 39 | + } | ||
| 40 | + } | ||
| 41 | + } | ||
| 42 | + return null; | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + public static String getDescByCode(String code) { | ||
| 46 | + SbgzlxEnum item = fromCode(code); | ||
| 47 | + return item != null ? item.getDesc() : code; | ||
| 48 | + } | ||
| 49 | +} |
| 1 | +package com.qgutech.qgyun.apaas.sync.cps.enums; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 设备故障类型分解枚举 | ||
| 7 | + * <p> | ||
| 8 | + * 数据库字段 sbgzlxfj 存储编号: | ||
| 9 | + * #1#-非设备原因,#2#-安装调整不良,#3#-松动,#4#-磨损,#5#-腐蚀,#6#-断裂,#7#-老化, | ||
| 10 | + * #8#-误操作,#9#-设计不合理,#10#-参数设置不合理,#11#-部件质量不良,#12#-介质污染, | ||
| 11 | + * #13#-5S不良,#14#-原因不明 | ||
| 12 | + */ | ||
| 13 | +@Getter | ||
| 14 | +public enum SbgzlxfjEnum { | ||
| 15 | + | ||
| 16 | + FEISHEBEI_YUANYIN("#1#", "非设备原因"), | ||
| 17 | + ANZHUANG_TIAOZHENG_BULIANG("#2#", "安装调整不良"), | ||
| 18 | + SONGDONG("#3#", "松动"), | ||
| 19 | + MOSUN("#4#", "磨损"), | ||
| 20 | + FUSHI("#5#", "腐蚀"), | ||
| 21 | + DUANLIE("#6#", "断裂"), | ||
| 22 | + LAOHUA("#7#", "老化"), | ||
| 23 | + WUCAOZUO("#8#", "误操作"), | ||
| 24 | + SHEJI_BUHELI("#9#", "设计不合理"), | ||
| 25 | + CANSHU_SHEZHI_BUHELI("#10#", "参数设置不合理"), | ||
| 26 | + BUJIAN_ZHILIANG_BULIANG("#11#", "部件质量不良"), | ||
| 27 | + JIEZHI_WURAN("#12#", "介质污染"), | ||
| 28 | + WU_S_BULIANG("#13#", "5S不良"), | ||
| 29 | + YUANYIN_BUMING("#14#", "原因不明"); | ||
| 30 | + | ||
| 31 | + private final String code; | ||
| 32 | + private final String desc; | ||
| 33 | + | ||
| 34 | + SbgzlxfjEnum(String code, String desc) { | ||
| 35 | + this.code = code; | ||
| 36 | + this.desc = desc; | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + public static SbgzlxfjEnum fromCode(String code) { | ||
| 40 | + if (code == null) { | ||
| 41 | + return null; | ||
| 42 | + } | ||
| 43 | + for (SbgzlxfjEnum item : values()) { | ||
| 44 | + if (item.code.equals(code)) { | ||
| 45 | + return item; | ||
| 46 | + } | ||
| 47 | + } | ||
| 48 | + if (!code.startsWith("#")) { | ||
| 49 | + String wrapped = "#" + code + "#"; | ||
| 50 | + for (SbgzlxfjEnum item : values()) { | ||
| 51 | + if (item.code.equals(wrapped)) { | ||
| 52 | + return item; | ||
| 53 | + } | ||
| 54 | + } | ||
| 55 | + } | ||
| 56 | + return null; | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + public static String getDescByCode(String code) { | ||
| 60 | + SbgzlxfjEnum item = fromCode(code); | ||
| 61 | + return item != null ? item.getDesc() : code; | ||
| 62 | + } | ||
| 63 | +} |
| 1 | +package com.qgutech.qgyun.apaas.sync.cps.enums; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 设备故障有无标准枚举 | ||
| 7 | + * <p> | ||
| 8 | + * 数据库字段 sbgzywbz 存储编号: | ||
| 9 | + * #1#-有,#2#-无 | ||
| 10 | + */ | ||
| 11 | +@Getter | ||
| 12 | +public enum SbgzywbzEnum { | ||
| 13 | + | ||
| 14 | + YOU("#1#", "有"), | ||
| 15 | + WU("#2#", "无"); | ||
| 16 | + | ||
| 17 | + private final String code; | ||
| 18 | + private final String desc; | ||
| 19 | + | ||
| 20 | + SbgzywbzEnum(String code, String desc) { | ||
| 21 | + this.code = code; | ||
| 22 | + this.desc = desc; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + public static SbgzywbzEnum fromCode(String code) { | ||
| 26 | + if (code == null) { | ||
| 27 | + return null; | ||
| 28 | + } | ||
| 29 | + for (SbgzywbzEnum item : values()) { | ||
| 30 | + if (item.code.equals(code)) { | ||
| 31 | + return item; | ||
| 32 | + } | ||
| 33 | + } | ||
| 34 | + if (!code.startsWith("#")) { | ||
| 35 | + String wrapped = "#" + code + "#"; | ||
| 36 | + for (SbgzywbzEnum item : values()) { | ||
| 37 | + if (item.code.equals(wrapped)) { | ||
| 38 | + return item; | ||
| 39 | + } | ||
| 40 | + } | ||
| 41 | + } | ||
| 42 | + return null; | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + public static String getDescByCode(String code) { | ||
| 46 | + SbgzywbzEnum item = fromCode(code); | ||
| 47 | + return item != null ? item.getDesc() : code; | ||
| 48 | + } | ||
| 49 | +} |
| 1 | +package com.qgutech.qgyun.apaas.sync.cps.enums; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 数据属性枚举 | ||
| 7 | + * <p> | ||
| 8 | + * 数据库字段 sjsx 存储编号: | ||
| 9 | + * #1#-内部,#2#-外部 | ||
| 10 | + */ | ||
| 11 | +@Getter | ||
| 12 | +public enum SjsxEnum { | ||
| 13 | + | ||
| 14 | + NEIBU("#0#", "0-对应内部"), | ||
| 15 | + WAIBU("#1#", "1-对应外部"); | ||
| 16 | + | ||
| 17 | + private final String code; | ||
| 18 | + private final String desc; | ||
| 19 | + | ||
| 20 | + SjsxEnum(String code, String desc) { | ||
| 21 | + this.code = code; | ||
| 22 | + this.desc = desc; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + public static SjsxEnum fromCode(String code) { | ||
| 26 | + if (code == null) { | ||
| 27 | + return null; | ||
| 28 | + } | ||
| 29 | + for (SjsxEnum item : values()) { | ||
| 30 | + if (item.code.equals(code)) { | ||
| 31 | + return item; | ||
| 32 | + } | ||
| 33 | + } | ||
| 34 | + if (!code.startsWith("#")) { | ||
| 35 | + String wrapped = "#" + code + "#"; | ||
| 36 | + for (SjsxEnum item : values()) { | ||
| 37 | + if (item.code.equals(wrapped)) { | ||
| 38 | + return item; | ||
| 39 | + } | ||
| 40 | + } | ||
| 41 | + } | ||
| 42 | + return null; | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + public static String getDescByCode(String code) { | ||
| 46 | + SjsxEnum item = fromCode(code); | ||
| 47 | + return item != null ? item.getDesc() : code; | ||
| 48 | + } | ||
| 49 | +} |
| 1 | +package com.qgutech.qgyun.apaas.sync.cps.enums; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 停线工位性质枚举 | ||
| 7 | + * <p> | ||
| 8 | + * 数据库字段 gwxz(停线工位信息、停线记录信息)存储编号: | ||
| 9 | + * #1#-主线,#2#-辅线 | ||
| 10 | + * <p> | ||
| 11 | + * 注意:与 {@link GwxzEnum}(岗位性质 A/B/C 类)语义不同,不可混用。 | ||
| 12 | + */ | ||
| 13 | +@Getter | ||
| 14 | +public enum StopGwxzEnum { | ||
| 15 | + | ||
| 16 | + ZHUXIAN("#1#", "主线"), | ||
| 17 | + FUXIAN("#2#", "辅线"); | ||
| 18 | + | ||
| 19 | + private final String code; | ||
| 20 | + private final String desc; | ||
| 21 | + | ||
| 22 | + StopGwxzEnum(String code, String desc) { | ||
| 23 | + this.code = code; | ||
| 24 | + this.desc = desc; | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + public static StopGwxzEnum fromCode(String code) { | ||
| 28 | + if (code == null) { | ||
| 29 | + return null; | ||
| 30 | + } | ||
| 31 | + for (StopGwxzEnum item : values()) { | ||
| 32 | + if (item.code.equals(code)) { | ||
| 33 | + return item; | ||
| 34 | + } | ||
| 35 | + } | ||
| 36 | + if (!code.startsWith("#")) { | ||
| 37 | + String wrapped = "#" + code + "#"; | ||
| 38 | + for (StopGwxzEnum item : values()) { | ||
| 39 | + if (item.code.equals(wrapped)) { | ||
| 40 | + return item; | ||
| 41 | + } | ||
| 42 | + } | ||
| 43 | + } | ||
| 44 | + return null; | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + public static String getDescByCode(String code) { | ||
| 48 | + StopGwxzEnum item = fromCode(code); | ||
| 49 | + return item != null ? item.getDesc() : code; | ||
| 50 | + } | ||
| 51 | +} |
| 1 | +package com.qgutech.qgyun.apaas.sync.cps.enums; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 问题属性枚举 | ||
| 7 | + * <p> | ||
| 8 | + * 数据库字段 wtsx 存储编号: | ||
| 9 | + * #1#-装配不良,#2#-钣金碰划伤,#3#-装配异常,#4#-零部件, | ||
| 10 | + * #5#-错漏装,#6#-日异物,#7#-异物,#8#-/ | ||
| 11 | + */ | ||
| 12 | +@Getter | ||
| 13 | +public enum WtsxEnum { | ||
| 14 | + | ||
| 15 | + ZHUANGPEI_BULIANG("#1#", "装配不良"), | ||
| 16 | + BANJIN_PENGHUASHANG("#2#", "钣金碰划伤"), | ||
| 17 | + ZHUANGPEI_YICHANG("#3#", "装配异常"), | ||
| 18 | + LINGBUDIAN("#4#", "零部件"), | ||
| 19 | + CUOLOUZHUANG("#5#", "错漏装"), | ||
| 20 | + RIYIWU("#6#", "日异物"), | ||
| 21 | + YIWU("#7#", "异物"), | ||
| 22 | + XIEGANG("#8#", "无"); | ||
| 23 | + | ||
| 24 | + private final String code; | ||
| 25 | + private final String desc; | ||
| 26 | + | ||
| 27 | + WtsxEnum(String code, String desc) { | ||
| 28 | + this.code = code; | ||
| 29 | + this.desc = desc; | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + public static WtsxEnum fromCode(String code) { | ||
| 33 | + if (code == null) { | ||
| 34 | + return null; | ||
| 35 | + } | ||
| 36 | + for (WtsxEnum item : values()) { | ||
| 37 | + if (item.code.equals(code)) { | ||
| 38 | + return item; | ||
| 39 | + } | ||
| 40 | + } | ||
| 41 | + if (!code.startsWith("#")) { | ||
| 42 | + String wrapped = "#" + code + "#"; | ||
| 43 | + for (WtsxEnum item : values()) { | ||
| 44 | + if (item.code.equals(wrapped)) { | ||
| 45 | + return item; | ||
| 46 | + } | ||
| 47 | + } | ||
| 48 | + } | ||
| 49 | + return null; | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + public static String getDescByCode(String code) { | ||
| 53 | + WtsxEnum item = fromCode(code); | ||
| 54 | + return item != null ? item.getDesc() : code; | ||
| 55 | + } | ||
| 56 | +} |
| 1 | +package com.qgutech.qgyun.apaas.sync.cps.enums; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 问题提出单位枚举 | ||
| 7 | + * <p> | ||
| 8 | + * 数据库字段 wttcdw 存储编号: | ||
| 9 | + * #1#-检验区,#2#-出厂 | ||
| 10 | + */ | ||
| 11 | +@Getter | ||
| 12 | +public enum WttcdwEnum { | ||
| 13 | + | ||
| 14 | + JIANYANQU("#1#", "检验区"), | ||
| 15 | + CHUCHANG("#2#", "出厂"); | ||
| 16 | + | ||
| 17 | + private final String code; | ||
| 18 | + private final String desc; | ||
| 19 | + | ||
| 20 | + WttcdwEnum(String code, String desc) { | ||
| 21 | + this.code = code; | ||
| 22 | + this.desc = desc; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + public static WttcdwEnum fromCode(String code) { | ||
| 26 | + if (code == null) { | ||
| 27 | + return null; | ||
| 28 | + } | ||
| 29 | + for (WttcdwEnum item : values()) { | ||
| 30 | + if (item.code.equals(code)) { | ||
| 31 | + return item; | ||
| 32 | + } | ||
| 33 | + } | ||
| 34 | + if (!code.startsWith("#")) { | ||
| 35 | + String wrapped = "#" + code + "#"; | ||
| 36 | + for (WttcdwEnum item : values()) { | ||
| 37 | + if (item.code.equals(wrapped)) { | ||
| 38 | + return item; | ||
| 39 | + } | ||
| 40 | + } | ||
| 41 | + } | ||
| 42 | + return null; | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + public static String getDescByCode(String code) { | ||
| 46 | + WttcdwEnum item = fromCode(code); | ||
| 47 | + return item != null ? item.getDesc() : code; | ||
| 48 | + } | ||
| 49 | +} |
| 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.fasterxml.jackson.annotation.JsonFormat; |
| 4 | +import com.qgutech.qgyun.apaas.sync.cps.enums.GcqrZtEnum; | ||
| 4 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 5 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 5 | import lombok.Getter; | 6 | import lombok.Getter; |
| 6 | import lombok.Setter; | 7 | import lombok.Setter; |
| @@ -8,6 +9,7 @@ import lombok.ToString; | @@ -8,6 +9,7 @@ import lombok.ToString; | ||
| 8 | import org.springframework.format.annotation.DateTimeFormat; | 9 | import org.springframework.format.annotation.DateTimeFormat; |
| 9 | 10 | ||
| 10 | import javax.persistence.Table; | 11 | import javax.persistence.Table; |
| 12 | +import javax.persistence.Transient; | ||
| 11 | import java.util.Date; | 13 | import java.util.Date; |
| 12 | 14 | ||
| 13 | /** | 15 | /** |
| @@ -68,7 +70,7 @@ public class ProcessConfirmTeamPlan extends BaseCorpModel { | @@ -68,7 +70,7 @@ public class ProcessConfirmTeamPlan extends BaseCorpModel { | ||
| 68 | private String jhzfgw; | 70 | private String jhzfgw; |
| 69 | 71 | ||
| 70 | /* | 72 | /* |
| 71 | - * 状态 | 73 | + * 状态-枚举:#1#-待执行,#2#-未执行,#3#-已执行,#4#-已逾期 |
| 72 | */ | 74 | */ |
| 73 | private String zt; | 75 | private String zt; |
| 74 | 76 | ||
| @@ -81,4 +83,20 @@ public class ProcessConfirmTeamPlan extends BaseCorpModel { | @@ -81,4 +83,20 @@ public class ProcessConfirmTeamPlan extends BaseCorpModel { | ||
| 81 | * 班次信息 | 83 | * 班次信息 |
| 82 | */ | 84 | */ |
| 83 | private String bcxx; | 85 | private String bcxx; |
| 86 | + | ||
| 87 | + /**********非持久化字段*********/ | ||
| 88 | + /* | ||
| 89 | + * 状态中文描述(非数据库字段,用于前端展示) | ||
| 90 | + */ | ||
| 91 | + @Transient | ||
| 92 | + private String ztDesc; | ||
| 93 | + | ||
| 94 | + /** | ||
| 95 | + * 获取状态中文描述 | ||
| 96 | + * | ||
| 97 | + * @return 状态中文描述 | ||
| 98 | + */ | ||
| 99 | + public String getZtDesc() { | ||
| 100 | + return GcqrZtEnum.getDescByCode(this.zt); | ||
| 101 | + } | ||
| 84 | } | 102 | } |
| 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.fasterxml.jackson.annotation.JsonFormat; |
| 4 | +import com.qgutech.qgyun.apaas.sync.cps.enums.KzahntEnum; | ||
| 5 | +import com.qgutech.qgyun.apaas.sync.cps.enums.PcwtyyEnum; | ||
| 6 | +import com.qgutech.qgyun.apaas.sync.cps.enums.SjsxEnum; | ||
| 7 | +import com.qgutech.qgyun.apaas.sync.cps.enums.WttcdwEnum; | ||
| 8 | +import com.qgutech.qgyun.apaas.sync.cps.enums.WtsxEnum; | ||
| 4 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 9 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 5 | import lombok.Getter; | 10 | import lombok.Getter; |
| 6 | import lombok.Setter; | 11 | import lombok.Setter; |
| @@ -8,6 +13,7 @@ import lombok.ToString; | @@ -8,6 +13,7 @@ import lombok.ToString; | ||
| 8 | import org.springframework.format.annotation.DateTimeFormat; | 13 | import org.springframework.format.annotation.DateTimeFormat; |
| 9 | 14 | ||
| 10 | import javax.persistence.Table; | 15 | import javax.persistence.Table; |
| 16 | +import javax.persistence.Transient; | ||
| 11 | import java.util.Date; | 17 | import java.util.Date; |
| 12 | 18 | ||
| 13 | /** | 19 | /** |
| @@ -25,7 +31,7 @@ public class QualityDefect extends BaseCorpModel { | @@ -25,7 +31,7 @@ public class QualityDefect extends BaseCorpModel { | ||
| 25 | public static final String ZRQYXX = "zrqyxx"; | 31 | public static final String ZRQYXX = "zrqyxx"; |
| 26 | 32 | ||
| 27 | /* | 33 | /* |
| 28 | - * 事件属性 | 34 | + * 事件属性-枚举:#0#-0-对应内部,#1#-1-对应外部 |
| 29 | */ | 35 | */ |
| 30 | private String sjsx; | 36 | private String sjsx; |
| 31 | 37 | ||
| @@ -37,7 +43,7 @@ public class QualityDefect extends BaseCorpModel { | @@ -37,7 +43,7 @@ public class QualityDefect extends BaseCorpModel { | ||
| 37 | private Date tcrq; | 43 | private Date tcrq; |
| 38 | 44 | ||
| 39 | /* | 45 | /* |
| 40 | - * 控制案例号 | 46 | + * 车型-枚举:#1#-C928,#2#-S311 |
| 41 | */ | 47 | */ |
| 42 | private String kzahnt; | 48 | private String kzahnt; |
| 43 | 49 | ||
| @@ -62,7 +68,7 @@ public class QualityDefect extends BaseCorpModel { | @@ -62,7 +68,7 @@ public class QualityDefect extends BaseCorpModel { | ||
| 62 | private String wtgwxx; | 68 | private String wtgwxx; |
| 63 | 69 | ||
| 64 | /* | 70 | /* |
| 65 | - * 缺陷次数 | 71 | + * 月度重复次数 |
| 66 | */ | 72 | */ |
| 67 | private Double ydcfcs; | 73 | private Double ydcfcs; |
| 68 | 74 | ||
| @@ -72,12 +78,13 @@ public class QualityDefect extends BaseCorpModel { | @@ -72,12 +78,13 @@ public class QualityDefect extends BaseCorpModel { | ||
| 72 | private String wtImg; | 78 | private String wtImg; |
| 73 | 79 | ||
| 74 | /* | 80 | /* |
| 75 | - * 问题提出单位 | 81 | + * 问题提出单位-枚举:#1#-检验区,#2#-出厂 |
| 76 | */ | 82 | */ |
| 77 | private String wttcdw; | 83 | private String wttcdw; |
| 78 | 84 | ||
| 79 | /* | 85 | /* |
| 80 | - * 问题属性 | 86 | + * 问题属性-枚举 |
| 87 | + * #1#-装配不良,#2#-钣金碰划伤,#3#-装配异常,#4#-零部件,#5#-错漏装,#6#-日异物,#7#-异物,#8#-无; | ||
| 81 | */ | 88 | */ |
| 82 | private String wtsx; | 89 | private String wtsx; |
| 83 | 90 | ||
| @@ -104,6 +111,11 @@ public class QualityDefect extends BaseCorpModel { | @@ -104,6 +111,11 @@ public class QualityDefect extends BaseCorpModel { | ||
| 104 | private String zrqyxx; | 111 | private String zrqyxx; |
| 105 | 112 | ||
| 106 | /* | 113 | /* |
| 114 | + * 责任区长 | ||
| 115 | + */ | ||
| 116 | + private String zrqz; | ||
| 117 | + | ||
| 118 | + /* | ||
| 107 | * 责任人员 | 119 | * 责任人员 |
| 108 | */ | 120 | */ |
| 109 | private String zrry; | 121 | private String zrry; |
| @@ -114,12 +126,12 @@ public class QualityDefect extends BaseCorpModel { | @@ -114,12 +126,12 @@ public class QualityDefect extends BaseCorpModel { | ||
| 114 | private Boolean sfpc; | 126 | private Boolean sfpc; |
| 115 | 127 | ||
| 116 | /* | 128 | /* |
| 117 | - * 排出问题原因 | 129 | + * 排出问题原因-枚举:#1#-40分问题,#2#-80分问题,#3#-300分问题 |
| 118 | */ | 130 | */ |
| 119 | private String pcwtyy; | 131 | private String pcwtyy; |
| 120 | 132 | ||
| 121 | /* | 133 | /* |
| 122 | - * 排出措施 | 134 | + * 排查台数 |
| 123 | */ | 135 | */ |
| 124 | private String pcts; | 136 | private String pcts; |
| 125 | 137 | ||
| @@ -147,4 +159,134 @@ public class QualityDefect extends BaseCorpModel { | @@ -147,4 +159,134 @@ public class QualityDefect extends BaseCorpModel { | ||
| 147 | * 管控措施 | 159 | * 管控措施 |
| 148 | */ | 160 | */ |
| 149 | private String gkcs; | 161 | private String gkcs; |
| 162 | + | ||
| 163 | + /**********非持久化字段*********/ | ||
| 164 | + /* | ||
| 165 | + * 问题工位名称(关联工位信息,非数据库字段) | ||
| 166 | + */ | ||
| 167 | + @Transient | ||
| 168 | + private String gwmc; | ||
| 169 | + | ||
| 170 | + /* | ||
| 171 | + * 问题工位编号(关联工位信息,非数据库字段) | ||
| 172 | + */ | ||
| 173 | + @Transient | ||
| 174 | + private String gwbh; | ||
| 175 | + | ||
| 176 | + /* | ||
| 177 | + * 数据属性中文描述(非数据库字段,用于前端展示) | ||
| 178 | + */ | ||
| 179 | + @Transient | ||
| 180 | + private String sjsxDesc; | ||
| 181 | + | ||
| 182 | + /* | ||
| 183 | + * 问题提出单位中文描述(非数据库字段,用于前端展示) | ||
| 184 | + */ | ||
| 185 | + @Transient | ||
| 186 | + private String wttcdwDesc; | ||
| 187 | + | ||
| 188 | + /* | ||
| 189 | + * 问题属性中文描述(非数据库字段,用于前端展示) | ||
| 190 | + */ | ||
| 191 | + @Transient | ||
| 192 | + private String wtsxDesc; | ||
| 193 | + | ||
| 194 | + /* | ||
| 195 | + * 排查问题原因中文描述(非数据库字段,用于前端展示) | ||
| 196 | + */ | ||
| 197 | + @Transient | ||
| 198 | + private String pcwtyyDesc; | ||
| 199 | + | ||
| 200 | + /* | ||
| 201 | + * 车型中文描述(非数据库字段,用于前端展示) | ||
| 202 | + */ | ||
| 203 | + @Transient | ||
| 204 | + private String kzahntDesc; | ||
| 205 | + | ||
| 206 | + /* | ||
| 207 | + * 问题班次名称(关联班次信息,非数据库字段,由 Service 填充) | ||
| 208 | + */ | ||
| 209 | + @Transient | ||
| 210 | + private String bcmc; | ||
| 211 | + | ||
| 212 | + /* | ||
| 213 | + * 问题班次编号(关联班次信息,非数据库字段,由 Service 填充) | ||
| 214 | + */ | ||
| 215 | + @Transient | ||
| 216 | + private String bcbh; | ||
| 217 | + | ||
| 218 | + /* | ||
| 219 | + * 责任区域名称(关联区域信息,非数据库字段,由 Service 填充) | ||
| 220 | + */ | ||
| 221 | + @Transient | ||
| 222 | + private String qymc; | ||
| 223 | + | ||
| 224 | + /* | ||
| 225 | + * 责任区域编号(关联区域信息,非数据库字段,由 Service 填充) | ||
| 226 | + */ | ||
| 227 | + @Transient | ||
| 228 | + private String qybh; | ||
| 229 | + | ||
| 230 | + /* | ||
| 231 | + * 责任人员姓名(关联组织用户信息,非数据库字段,由 Service 填充) | ||
| 232 | + */ | ||
| 233 | + @Transient | ||
| 234 | + private String zrryName; | ||
| 235 | + | ||
| 236 | + /* | ||
| 237 | + * 创建人姓名(关联组织用户信息,非数据库字段,由 Service 填充) | ||
| 238 | + */ | ||
| 239 | + @Transient | ||
| 240 | + private String createdByName; | ||
| 241 | + | ||
| 242 | + /* | ||
| 243 | + * 更新人姓名(关联组织用户信息,非数据库字段,由 Service 填充) | ||
| 244 | + */ | ||
| 245 | + @Transient | ||
| 246 | + private String updatedByName; | ||
| 247 | + | ||
| 248 | + /** | ||
| 249 | + * 获取数据属性中文描述 | ||
| 250 | + * | ||
| 251 | + * @return 数据属性中文描述 | ||
| 252 | + */ | ||
| 253 | + public String getSjsxDesc() { | ||
| 254 | + return SjsxEnum.getDescByCode(this.sjsx); | ||
| 255 | + } | ||
| 256 | + | ||
| 257 | + /** | ||
| 258 | + * 获取问题提出单位中文描述 | ||
| 259 | + * | ||
| 260 | + * @return 问题提出单位中文描述 | ||
| 261 | + */ | ||
| 262 | + public String getWttcdwDesc() { | ||
| 263 | + return WttcdwEnum.getDescByCode(this.wttcdw); | ||
| 264 | + } | ||
| 265 | + | ||
| 266 | + /** | ||
| 267 | + * 获取问题属性中文描述 | ||
| 268 | + * | ||
| 269 | + * @return 问题属性中文描述 | ||
| 270 | + */ | ||
| 271 | + public String getWtsxDesc() { | ||
| 272 | + return WtsxEnum.getDescByCode(this.wtsx); | ||
| 273 | + } | ||
| 274 | + | ||
| 275 | + /** | ||
| 276 | + * 获取排查问题原因中文描述 | ||
| 277 | + * | ||
| 278 | + * @return 排查问题原因中文描述 | ||
| 279 | + */ | ||
| 280 | + public String getPcwtyyDesc() { | ||
| 281 | + return PcwtyyEnum.getDescByCode(this.pcwtyy); | ||
| 282 | + } | ||
| 283 | + | ||
| 284 | + /** | ||
| 285 | + * 获取车型中文描述 | ||
| 286 | + * | ||
| 287 | + * @return 车型中文描述 | ||
| 288 | + */ | ||
| 289 | + public String getKzahntDesc() { | ||
| 290 | + return KzahntEnum.getDescByCode(this.kzahnt); | ||
| 291 | + } | ||
| 150 | } | 292 | } |
| 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.fasterxml.jackson.annotation.JsonFormat; |
| 4 | +import com.qgutech.qgyun.apaas.sync.cps.enums.QgxtbxzEnum; | ||
| 5 | +import com.qgutech.qgyun.apaas.sync.cps.enums.SbgzlxEnum; | ||
| 6 | +import com.qgutech.qgyun.apaas.sync.cps.enums.SbgzlxfjEnum; | ||
| 7 | +import com.qgutech.qgyun.apaas.sync.cps.enums.SbgzywbzEnum; | ||
| 8 | +import com.qgutech.qgyun.apaas.sync.cps.enums.StopGwxzEnum; | ||
| 4 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 9 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 5 | import lombok.Getter; | 10 | import lombok.Getter; |
| 6 | import lombok.Setter; | 11 | import lombok.Setter; |
| @@ -8,6 +13,7 @@ import lombok.ToString; | @@ -8,6 +13,7 @@ import lombok.ToString; | ||
| 8 | import org.springframework.format.annotation.DateTimeFormat; | 13 | import org.springframework.format.annotation.DateTimeFormat; |
| 9 | 14 | ||
| 10 | import javax.persistence.Table; | 15 | import javax.persistence.Table; |
| 16 | +import javax.persistence.Transient; | ||
| 11 | import java.util.Date; | 17 | import java.util.Date; |
| 12 | 18 | ||
| 13 | /** | 19 | /** |
| @@ -97,12 +103,12 @@ public class StopRecord extends BaseCorpModel { | @@ -97,12 +103,12 @@ public class StopRecord extends BaseCorpModel { | ||
| 97 | private String txms; | 103 | private String txms; |
| 98 | 104 | ||
| 99 | /* | 105 | /* |
| 100 | - * 切换系统备选组 | 106 | + * 前工序填报选择-枚举:#1#-是,#2#-否 |
| 101 | */ | 107 | */ |
| 102 | private String qgxtbxz; | 108 | private String qgxtbxz; |
| 103 | 109 | ||
| 104 | /* | 110 | /* |
| 105 | - * 本班停线工艺原因 | 111 | + * 不申报前工序原因 |
| 106 | */ | 112 | */ |
| 107 | private String bsbqgxyy; | 113 | private String bsbqgxyy; |
| 108 | 114 | ||
| @@ -132,7 +138,7 @@ public class StopRecord extends BaseCorpModel { | @@ -132,7 +138,7 @@ public class StopRecord extends BaseCorpModel { | ||
| 132 | private String sbmc; | 138 | private String sbmc; |
| 133 | 139 | ||
| 134 | /* | 140 | /* |
| 135 | - * 设备故障类型 | 141 | + * 设备故障类型-枚举:#1#-机械故障,#2#-电气故障; |
| 136 | */ | 142 | */ |
| 137 | private String sbgzlx; | 143 | private String sbgzlx; |
| 138 | 144 | ||
| @@ -142,12 +148,14 @@ public class StopRecord extends BaseCorpModel { | @@ -142,12 +148,14 @@ public class StopRecord extends BaseCorpModel { | ||
| 142 | private Boolean sbgzsfcf; | 148 | private Boolean sbgzsfcf; |
| 143 | 149 | ||
| 144 | /* | 150 | /* |
| 145 | - * 设备故障业务板块 | 151 | + * 设备故障有无标准-枚举:#1#-有,#2#-无 |
| 146 | */ | 152 | */ |
| 147 | private String sbgzywbz; | 153 | private String sbgzywbz; |
| 148 | 154 | ||
| 149 | /* | 155 | /* |
| 150 | - * 设备故障类型附件 | 156 | + * 设备故障类型分解-枚举 |
| 157 | + * #1#-非设备原因,#2#-安装调整不良,#3#-松动,#4#-磨损,#5#-腐蚀,#6#-断裂,#7#-老化, | ||
| 158 | + * #8#-误操作,#9#-设计不合理,#10#-参数设置不合理,#11#-部件质量不良,#12#-介质污染,#13#-5S不良,#14#-原因不明 | ||
| 151 | */ | 159 | */ |
| 152 | private String sbgzlxfj; | 160 | private String sbgzlxfj; |
| 153 | 161 | ||
| @@ -162,7 +170,7 @@ public class StopRecord extends BaseCorpModel { | @@ -162,7 +170,7 @@ public class StopRecord extends BaseCorpModel { | ||
| 162 | private String sblscs; | 170 | private String sblscs; |
| 163 | 171 | ||
| 164 | /* | 172 | /* |
| 165 | - * 设备应急措施 | 173 | + * 设备永久措施 |
| 166 | */ | 174 | */ |
| 167 | private String sbyjcs; | 175 | private String sbyjcs; |
| 168 | 176 | ||
| @@ -182,12 +190,12 @@ public class StopRecord extends BaseCorpModel { | @@ -182,12 +190,12 @@ public class StopRecord extends BaseCorpModel { | ||
| 182 | private String tbrygh; | 190 | private String tbrygh; |
| 183 | 191 | ||
| 184 | /* | 192 | /* |
| 185 | - * 处置人员 | 193 | + * 操作人员 |
| 186 | */ | 194 | */ |
| 187 | private String czry; | 195 | private String czry; |
| 188 | 196 | ||
| 189 | /* | 197 | /* |
| 190 | - * 处置人员工号 | 198 | + * 操作人员工号 |
| 191 | */ | 199 | */ |
| 192 | private String czrygh; | 200 | private String czrygh; |
| 193 | 201 | ||
| @@ -195,4 +203,152 @@ public class StopRecord extends BaseCorpModel { | @@ -195,4 +203,152 @@ public class StopRecord extends BaseCorpModel { | ||
| 195 | * 遗留问题处理方案 | 203 | * 遗留问题处理方案 |
| 196 | */ | 204 | */ |
| 197 | private String ylwtclfa; | 205 | private String ylwtclfa; |
| 206 | + | ||
| 207 | + /**********非持久化字段*********/ | ||
| 208 | + /* | ||
| 209 | + * 工位性质中文描述(非数据库字段,用于前端展示) | ||
| 210 | + */ | ||
| 211 | + @Transient | ||
| 212 | + private String gwxzDesc; | ||
| 213 | + | ||
| 214 | + /* | ||
| 215 | + * 前工序填报选择中文描述(非数据库字段,用于前端展示) | ||
| 216 | + */ | ||
| 217 | + @Transient | ||
| 218 | + private String qgxtbxzDesc; | ||
| 219 | + | ||
| 220 | + /* | ||
| 221 | + * 设备故障类型中文描述(非数据库字段,用于前端展示) | ||
| 222 | + */ | ||
| 223 | + @Transient | ||
| 224 | + private String sbgzlxDesc; | ||
| 225 | + | ||
| 226 | + /* | ||
| 227 | + * 设备故障有无标准中文描述(非数据库字段,用于前端展示) | ||
| 228 | + */ | ||
| 229 | + @Transient | ||
| 230 | + private String sbgzywbzDesc; | ||
| 231 | + | ||
| 232 | + /* | ||
| 233 | + * 设备故障类型分解中文描述(非数据库字段,用于前端展示) | ||
| 234 | + */ | ||
| 235 | + @Transient | ||
| 236 | + private String sbgzlxfjDesc; | ||
| 237 | + | ||
| 238 | + /* | ||
| 239 | + * 线体名称(非数据库字段,由 Service 填充) | ||
| 240 | + */ | ||
| 241 | + @Transient | ||
| 242 | + private String xtmc; | ||
| 243 | + | ||
| 244 | + /* | ||
| 245 | + * 线体编号(非数据库字段,由 Service 填充) | ||
| 246 | + */ | ||
| 247 | + @Transient | ||
| 248 | + private String xtbh; | ||
| 249 | + | ||
| 250 | + /* | ||
| 251 | + * 班次名称(非数据库字段,由 Service 填充) | ||
| 252 | + */ | ||
| 253 | + @Transient | ||
| 254 | + private String bcmc; | ||
| 255 | + | ||
| 256 | + /* | ||
| 257 | + * 班次编号(非数据库字段,由 Service 填充) | ||
| 258 | + */ | ||
| 259 | + @Transient | ||
| 260 | + private String bcbh; | ||
| 261 | + | ||
| 262 | + /* | ||
| 263 | + * 停线区域名称(非数据库字段,由 Service 填充) | ||
| 264 | + */ | ||
| 265 | + @Transient | ||
| 266 | + private String txqymc; | ||
| 267 | + | ||
| 268 | + /* | ||
| 269 | + * 停线区域编号(非数据库字段,由 Service 填充) | ||
| 270 | + */ | ||
| 271 | + @Transient | ||
| 272 | + private String txqybh; | ||
| 273 | + | ||
| 274 | + /* | ||
| 275 | + * 停线板块名称(非数据库字段,由 Service 填充) | ||
| 276 | + */ | ||
| 277 | + @Transient | ||
| 278 | + private String txbkmc; | ||
| 279 | + | ||
| 280 | + /* | ||
| 281 | + * 停线板块编码(非数据库字段,由 Service 填充) | ||
| 282 | + */ | ||
| 283 | + @Transient | ||
| 284 | + private String txbkbm; | ||
| 285 | + | ||
| 286 | + /* | ||
| 287 | + * 停线工位名称(非数据库字段,由 Service 填充) | ||
| 288 | + */ | ||
| 289 | + @Transient | ||
| 290 | + private String txgwmc; | ||
| 291 | + | ||
| 292 | + /* | ||
| 293 | + * 停线工位编号(非数据库字段,由 Service 填充) | ||
| 294 | + */ | ||
| 295 | + @Transient | ||
| 296 | + private String txgwbh; | ||
| 297 | + | ||
| 298 | + /* | ||
| 299 | + * 停线班组名称(非数据库字段,由 Service 填充) | ||
| 300 | + */ | ||
| 301 | + @Transient | ||
| 302 | + private String txbzmc; | ||
| 303 | + | ||
| 304 | + /* | ||
| 305 | + * 停线班组编号(非数据库字段,由 Service 填充) | ||
| 306 | + */ | ||
| 307 | + @Transient | ||
| 308 | + private String txbzbh; | ||
| 309 | + | ||
| 310 | + /** | ||
| 311 | + * 获取工位性质中文描述 | ||
| 312 | + * | ||
| 313 | + * @return 工位性质中文描述 | ||
| 314 | + */ | ||
| 315 | + public String getGwxzDesc() { | ||
| 316 | + return StopGwxzEnum.getDescByCode(this.gwxz); | ||
| 317 | + } | ||
| 318 | + | ||
| 319 | + /** | ||
| 320 | + * 获取前工序填报选择中文描述 | ||
| 321 | + * | ||
| 322 | + * @return 前工序填报选择中文描述 | ||
| 323 | + */ | ||
| 324 | + public String getQgxtbxzDesc() { | ||
| 325 | + return QgxtbxzEnum.getDescByCode(this.qgxtbxz); | ||
| 326 | + } | ||
| 327 | + | ||
| 328 | + /** | ||
| 329 | + * 获取设备故障类型中文描述 | ||
| 330 | + * | ||
| 331 | + * @return 设备故障类型中文描述 | ||
| 332 | + */ | ||
| 333 | + public String getSbgzlxDesc() { | ||
| 334 | + return SbgzlxEnum.getDescByCode(this.sbgzlx); | ||
| 335 | + } | ||
| 336 | + | ||
| 337 | + /** | ||
| 338 | + * 获取设备故障有无标准中文描述 | ||
| 339 | + * | ||
| 340 | + * @return 设备故障有无标准中文描述 | ||
| 341 | + */ | ||
| 342 | + public String getSbgzywbzDesc() { | ||
| 343 | + return SbgzywbzEnum.getDescByCode(this.sbgzywbz); | ||
| 344 | + } | ||
| 345 | + | ||
| 346 | + /** | ||
| 347 | + * 获取设备故障类型分解中文描述 | ||
| 348 | + * | ||
| 349 | + * @return 设备故障类型分解中文描述 | ||
| 350 | + */ | ||
| 351 | + public String getSbgzlxfjDesc() { | ||
| 352 | + return SbgzlxfjEnum.getDescByCode(this.sbgzlxfj); | ||
| 353 | + } | ||
| 198 | } | 354 | } |
| 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.apaas.sync.cps.enums.StopGwxzEnum; | ||
| 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 4 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 4 | import lombok.Getter; | 5 | import lombok.Getter; |
| 5 | import lombok.Setter; | 6 | import lombok.Setter; |
| 6 | import lombok.ToString; | 7 | import lombok.ToString; |
| 7 | 8 | ||
| 8 | import javax.persistence.Table; | 9 | import javax.persistence.Table; |
| 10 | +import javax.persistence.Transient; | ||
| 9 | 11 | ||
| 10 | /** | 12 | /** |
| 11 | * 停线工位信息 | 13 | * 停线工位信息 |
| @@ -42,7 +44,23 @@ public class StopWorkstation extends BaseCorpModel { | @@ -42,7 +44,23 @@ public class StopWorkstation extends BaseCorpModel { | ||
| 42 | private String gwbh; | 44 | private String gwbh; |
| 43 | 45 | ||
| 44 | /* | 46 | /* |
| 45 | - * 工位性质 | 47 | + * 工位性质-枚举:#1#-主线,#2#-辅线 |
| 46 | */ | 48 | */ |
| 47 | private String gwxz; | 49 | private String gwxz; |
| 50 | + | ||
| 51 | + /**********非持久化字段*********/ | ||
| 52 | + /* | ||
| 53 | + * 工位性质中文描述(非数据库字段,用于前端展示) | ||
| 54 | + */ | ||
| 55 | + @Transient | ||
| 56 | + private String gwxzDesc; | ||
| 57 | + | ||
| 58 | + /** | ||
| 59 | + * 获取工位性质中文描述 | ||
| 60 | + * | ||
| 61 | + * @return 工位性质中文描述 | ||
| 62 | + */ | ||
| 63 | + public String getGwxzDesc() { | ||
| 64 | + return StopGwxzEnum.getDescByCode(this.gwxz); | ||
| 65 | + } | ||
| 48 | } | 66 | } |
| 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.apaas.sync.cps.enums.GzjhztEnum; | ||
| 3 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 4 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 4 | import lombok.Getter; | 5 | import lombok.Getter; |
| 5 | import lombok.Setter; | 6 | import lombok.Setter; |
| 6 | import lombok.ToString; | 7 | import lombok.ToString; |
| 7 | 8 | ||
| 8 | import javax.persistence.Table; | 9 | import javax.persistence.Table; |
| 10 | +import javax.persistence.Transient; | ||
| 9 | 11 | ||
| 10 | /** | 12 | /** |
| 11 | * 车间级工作计划信息 | 13 | * 车间级工作计划信息 |
| @@ -61,7 +63,7 @@ public class WorkshopWorkPlan extends BaseCorpModel { | @@ -61,7 +63,7 @@ public class WorkshopWorkPlan extends BaseCorpModel { | ||
| 61 | private Boolean jhsfkq; | 63 | private Boolean jhsfkq; |
| 62 | 64 | ||
| 63 | /* | 65 | /* |
| 64 | - * 工作计划状态 | 66 | + * 工作计划状态-枚举:#1#-进行中,#2#-已完成,#3#-已逾期; |
| 65 | */ | 67 | */ |
| 66 | private String gzjhzt; | 68 | private String gzjhzt; |
| 67 | 69 | ||
| @@ -79,4 +81,20 @@ public class WorkshopWorkPlan extends BaseCorpModel { | @@ -79,4 +81,20 @@ public class WorkshopWorkPlan extends BaseCorpModel { | ||
| 79 | * 序号 | 81 | * 序号 |
| 80 | */ | 82 | */ |
| 81 | private String xh; | 83 | private String xh; |
| 84 | + | ||
| 85 | + /**********非持久化字段*********/ | ||
| 86 | + /* | ||
| 87 | + * 工作计划状态中文描述(非数据库字段,用于前端展示) | ||
| 88 | + */ | ||
| 89 | + @Transient | ||
| 90 | + private String gzjhztDesc; | ||
| 91 | + | ||
| 92 | + /** | ||
| 93 | + * 获取工作计划状态中文描述 | ||
| 94 | + * | ||
| 95 | + * @return 工作计划状态中文描述 | ||
| 96 | + */ | ||
| 97 | + public String getGzjhztDesc() { | ||
| 98 | + return GzjhztEnum.getDescByCode(this.gzjhzt); | ||
| 99 | + } | ||
| 82 | } | 100 | } |
| 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.fasterxml.jackson.annotation.JsonFormat; |
| 4 | +import com.qgutech.qgyun.apaas.sync.cps.enums.RwztEnum; | ||
| 4 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; | 5 | import com.qgutech.qgyun.framework.database.model.BaseCorpModel; |
| 5 | import lombok.Getter; | 6 | import lombok.Getter; |
| 6 | import lombok.Setter; | 7 | import lombok.Setter; |
| @@ -8,6 +9,7 @@ import lombok.ToString; | @@ -8,6 +9,7 @@ import lombok.ToString; | ||
| 8 | import org.springframework.format.annotation.DateTimeFormat; | 9 | import org.springframework.format.annotation.DateTimeFormat; |
| 9 | 10 | ||
| 10 | import javax.persistence.Table; | 11 | import javax.persistence.Table; |
| 12 | +import javax.persistence.Transient; | ||
| 11 | import java.util.Date; | 13 | import java.util.Date; |
| 12 | 14 | ||
| 13 | /** | 15 | /** |
| @@ -46,13 +48,6 @@ public class WorkshopWorkTask extends BaseCorpModel { | @@ -46,13 +48,6 @@ public class WorkshopWorkTask extends BaseCorpModel { | ||
| 46 | private String rwfzr; | 48 | private String rwfzr; |
| 47 | 49 | ||
| 48 | /* | 50 | /* |
| 49 | - * 开始日期 | ||
| 50 | - */ | ||
| 51 | - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||
| 52 | - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | ||
| 53 | - private Date startDate; | ||
| 54 | - | ||
| 55 | - /* | ||
| 56 | * 结束日期 | 51 | * 结束日期 |
| 57 | */ | 52 | */ |
| 58 | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | 53 | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| @@ -60,7 +55,7 @@ public class WorkshopWorkTask extends BaseCorpModel { | @@ -60,7 +55,7 @@ public class WorkshopWorkTask extends BaseCorpModel { | ||
| 60 | private Date endDate; | 55 | private Date endDate; |
| 61 | 56 | ||
| 62 | /* | 57 | /* |
| 63 | - * 任务状态 | 58 | + * 任务状态-枚举:#1#-进行中,#2#-已完成,#3#-已逾期; |
| 64 | */ | 59 | */ |
| 65 | private String rwzt; | 60 | private String rwzt; |
| 66 | 61 | ||
| @@ -80,11 +75,6 @@ public class WorkshopWorkTask extends BaseCorpModel { | @@ -80,11 +75,6 @@ public class WorkshopWorkTask extends BaseCorpModel { | ||
| 80 | private String qyxx; | 75 | private String qyxx; |
| 81 | 76 | ||
| 82 | /* | 77 | /* |
| 83 | - * 关联信息 | ||
| 84 | - */ | ||
| 85 | - private String iejjof; | ||
| 86 | - | ||
| 87 | - /* | ||
| 88 | * 序号 | 78 | * 序号 |
| 89 | */ | 79 | */ |
| 90 | private String xh; | 80 | private String xh; |
| @@ -108,4 +98,62 @@ public class WorkshopWorkTask extends BaseCorpModel { | @@ -108,4 +98,62 @@ public class WorkshopWorkTask extends BaseCorpModel { | ||
| 108 | * 备注 | 98 | * 备注 |
| 109 | */ | 99 | */ |
| 110 | private String remark; | 100 | private String remark; |
| 101 | + | ||
| 102 | + /**********非持久化字段*********/ | ||
| 103 | + /* | ||
| 104 | + * 任务状态中文描述(非数据库字段,用于前端展示) | ||
| 105 | + */ | ||
| 106 | + @Transient | ||
| 107 | + private String rwztDesc; | ||
| 108 | + | ||
| 109 | + /* | ||
| 110 | + * 所属工作计划名称(关联工作计划信息,非数据库字段,由 Service 填充) | ||
| 111 | + */ | ||
| 112 | + @Transient | ||
| 113 | + private String ssgzjhMc; | ||
| 114 | + | ||
| 115 | + /* | ||
| 116 | + * 任务负责人姓名(关联组织用户信息,非数据库字段,由 Service 填充) | ||
| 117 | + */ | ||
| 118 | + @Transient | ||
| 119 | + private String rwfzrName; | ||
| 120 | + | ||
| 121 | + /* | ||
| 122 | + * 计划负责人姓名(关联组织用户信息,非数据库字段,由 Service 填充) | ||
| 123 | + */ | ||
| 124 | + @Transient | ||
| 125 | + private String jhfzrName; | ||
| 126 | + | ||
| 127 | + /* | ||
| 128 | + * 区域名称(关联区域信息,非数据库字段,由 Service 填充) | ||
| 129 | + */ | ||
| 130 | + @Transient | ||
| 131 | + private String qymc; | ||
| 132 | + | ||
| 133 | + /* | ||
| 134 | + * 区域编号(关联区域信息,非数据库字段,由 Service 填充) | ||
| 135 | + */ | ||
| 136 | + @Transient | ||
| 137 | + private String qybh; | ||
| 138 | + | ||
| 139 | + /* | ||
| 140 | + * 创建人姓名(关联组织用户信息,非数据库字段,由 Service 填充) | ||
| 141 | + */ | ||
| 142 | + @Transient | ||
| 143 | + private String createdByName; | ||
| 144 | + | ||
| 145 | + /* | ||
| 146 | + * 更新人姓名(关联组织用户信息,非数据库字段,由 Service 填充) | ||
| 147 | + */ | ||
| 148 | + @Transient | ||
| 149 | + private String updatedByName; | ||
| 150 | + | ||
| 151 | + /** | ||
| 152 | + * 获取任务状态中文描述 | ||
| 153 | + * | ||
| 154 | + * @return 任务状态中文描述 | ||
| 155 | + */ | ||
| 156 | + public String getRwztDesc() { | ||
| 157 | + return RwztEnum.getDescByCode(this.rwzt); | ||
| 158 | + } | ||
| 111 | } | 159 | } |
| @@ -5,8 +5,14 @@ import com.qgutech.qgyun.apaas.sync.base.BoErrorCode; | @@ -5,8 +5,14 @@ import com.qgutech.qgyun.apaas.sync.base.BoErrorCode; | ||
| 5 | import com.qgutech.qgyun.apaas.sync.base.BoException; | 5 | import com.qgutech.qgyun.apaas.sync.base.BoException; |
| 6 | import com.qgutech.qgyun.apaas.sync.cps.dto.QualityDefectDailySummaryDTO; | 6 | import com.qgutech.qgyun.apaas.sync.cps.dto.QualityDefectDailySummaryDTO; |
| 7 | import com.qgutech.qgyun.apaas.sync.cps.dto.QualityDefectWorkstationSummaryDTO; | 7 | import com.qgutech.qgyun.apaas.sync.cps.dto.QualityDefectWorkstationSummaryDTO; |
| 8 | +import com.qgutech.qgyun.apaas.sync.cps.enums.StopGwxzEnum; | ||
| 8 | import com.qgutech.qgyun.apaas.sync.cps.mapper.QualityDefectMapper; | 9 | import com.qgutech.qgyun.apaas.sync.cps.mapper.QualityDefectMapper; |
| 10 | +import com.qgutech.qgyun.apaas.sync.cps.model.Area; | ||
| 9 | import com.qgutech.qgyun.apaas.sync.cps.model.QualityDefect; | 11 | import com.qgutech.qgyun.apaas.sync.cps.model.QualityDefect; |
| 12 | +import com.qgutech.qgyun.apaas.sync.cps.model.Shift; | ||
| 13 | +import com.qgutech.qgyun.apaas.sync.cps.model.StopWorkstation; | ||
| 14 | +import com.qgutech.qgyun.apaas.sync.org.model.UcUser; | ||
| 15 | +import com.qgutech.qgyun.apaas.sync.org.service.UcUserService; | ||
| 10 | import com.qgutech.qgyun.apaas.sync.utils.CorpExample; | 16 | import com.qgutech.qgyun.apaas.sync.utils.CorpExample; |
| 11 | import com.qgutech.qgyun.apaas.sync.utils.DateDealUtils; | 17 | import com.qgutech.qgyun.apaas.sync.utils.DateDealUtils; |
| 12 | import org.apache.commons.collections4.CollectionUtils; | 18 | import org.apache.commons.collections4.CollectionUtils; |
| @@ -30,6 +36,18 @@ public class QualityDefectService extends BaseServiceImpl<QualityDefect> { | @@ -30,6 +36,18 @@ public class QualityDefectService extends BaseServiceImpl<QualityDefect> { | ||
| 30 | @Resource | 36 | @Resource |
| 31 | private QualityDefectMapper qualityDefectMapper; | 37 | private QualityDefectMapper qualityDefectMapper; |
| 32 | 38 | ||
| 39 | + @Resource | ||
| 40 | + private StopWorkstationService stopWorkstationService; | ||
| 41 | + | ||
| 42 | + @Resource | ||
| 43 | + private ShiftService shiftService; | ||
| 44 | + | ||
| 45 | + @Resource | ||
| 46 | + private AreaService areaService; | ||
| 47 | + | ||
| 48 | + @Resource | ||
| 49 | + private UcUserService ucUserService; | ||
| 50 | + | ||
| 33 | @Transactional(readOnly = true) | 51 | @Transactional(readOnly = true) |
| 34 | public QualityDefect getById(String id) { | 52 | public QualityDefect getById(String id) { |
| 35 | Assert.hasLength(id, "id is empty!"); | 53 | Assert.hasLength(id, "id is empty!"); |
| @@ -72,7 +90,9 @@ public class QualityDefectService extends BaseServiceImpl<QualityDefect> { | @@ -72,7 +90,9 @@ public class QualityDefectService extends BaseServiceImpl<QualityDefect> { | ||
| 72 | public List<QualityDefect> listAll() { | 90 | public List<QualityDefect> listAll() { |
| 73 | 91 | ||
| 74 | Example example = CorpExample.ofCorp(entityClass); | 92 | Example example = CorpExample.ofCorp(entityClass); |
| 75 | - return qualityDefectMapper.selectByExample(example); | 93 | + List<QualityDefect> list = qualityDefectMapper.selectByExample(example); |
| 94 | + fillRelatedInfo(list); | ||
| 95 | + return list; | ||
| 76 | } | 96 | } |
| 77 | 97 | ||
| 78 | /** | 98 | /** |
| @@ -132,13 +152,27 @@ public class QualityDefectService extends BaseServiceImpl<QualityDefect> { | @@ -132,13 +152,27 @@ public class QualityDefectService extends BaseServiceImpl<QualityDefect> { | ||
| 132 | .filter(item -> StringUtils.isNotBlank(item.getWtgwxx())) | 152 | .filter(item -> StringUtils.isNotBlank(item.getWtgwxx())) |
| 133 | .collect(Collectors.groupingBy(QualityDefect::getWtgwxx)); | 153 | .collect(Collectors.groupingBy(QualityDefect::getWtgwxx)); |
| 134 | 154 | ||
| 155 | + // 批量查询停线工位信息,补充工位名称、编号与工位性质 | ||
| 156 | + Map<String, StopWorkstation> workstationMap = workstationGroup.isEmpty() | ||
| 157 | + ? new HashMap<>(0) : stopWorkstationService.mapByIds(workstationGroup.keySet()); | ||
| 158 | + | ||
| 135 | List<QualityDefectWorkstationSummaryDTO> result = new ArrayList<>(); | 159 | List<QualityDefectWorkstationSummaryDTO> result = new ArrayList<>(); |
| 136 | for (Map.Entry<String, List<QualityDefect>> entry : workstationGroup.entrySet()) { | 160 | for (Map.Entry<String, List<QualityDefect>> entry : workstationGroup.entrySet()) { |
| 161 | + String wtgwxx = entry.getKey(); | ||
| 137 | List<QualityDefect> wsList = entry.getValue(); | 162 | List<QualityDefect> wsList = entry.getValue(); |
| 138 | double totalYdcfcs = wsList.stream() | 163 | double totalYdcfcs = wsList.stream() |
| 139 | .mapToDouble(item -> item.getYdcfcs() == null ? 0.0 : item.getYdcfcs()) | 164 | .mapToDouble(item -> item.getYdcfcs() == null ? 0.0 : item.getYdcfcs()) |
| 140 | .sum(); | 165 | .sum(); |
| 141 | - result.add(new QualityDefectWorkstationSummaryDTO(entry.getKey(), wsList.size(), totalYdcfcs)); | 166 | + QualityDefectWorkstationSummaryDTO dto = |
| 167 | + new QualityDefectWorkstationSummaryDTO(wtgwxx, wsList.size(), totalYdcfcs); | ||
| 168 | + StopWorkstation workstation = workstationMap.get(wtgwxx); | ||
| 169 | + if (workstation != null) { | ||
| 170 | + dto.setGwmc(workstation.getGwmc()); | ||
| 171 | + dto.setGwbh(workstation.getGwbh()); | ||
| 172 | + dto.setGwxz(workstation.getGwxz()); | ||
| 173 | + dto.setGwxzDesc(StopGwxzEnum.getDescByCode(workstation.getGwxz())); | ||
| 174 | + } | ||
| 175 | + result.add(dto); | ||
| 142 | } | 176 | } |
| 143 | 177 | ||
| 144 | // 按缺陷次数降序 | 178 | // 按缺陷次数降序 |
| @@ -158,7 +192,90 @@ public class QualityDefectService extends BaseServiceImpl<QualityDefect> { | @@ -158,7 +192,90 @@ public class QualityDefectService extends BaseServiceImpl<QualityDefect> { | ||
| 158 | @Transactional(readOnly = true) | 192 | @Transactional(readOnly = true) |
| 159 | public List<QualityDefect> listDetailByCondition(String zrqyxx, String date, String wtgwxx) { | 193 | public List<QualityDefect> listDetailByCondition(String zrqyxx, String date, String wtgwxx) { |
| 160 | Date[] range = parseDateRange(date); | 194 | Date[] range = parseDateRange(date); |
| 161 | - return listByCondition(zrqyxx, range[0], range[1], wtgwxx); | 195 | + List<QualityDefect> list = listByCondition(zrqyxx, range[0], range[1], wtgwxx); |
| 196 | + fillRelatedInfo(list); | ||
| 197 | + return list; | ||
| 198 | + } | ||
| 199 | + | ||
| 200 | + /** | ||
| 201 | + * 批量填充质量缺陷记录关联的停线工位/班次/区域名称与编号,以及责任人员/创建人/更新人姓名。 | ||
| 202 | + * <p> | ||
| 203 | + * 工位关联停线工位信息(StopWorkstation),人员关联组织用户(UcUser)。 | ||
| 204 | + * 一次批量收集所有关联 Id,再分别调用 mapByIds 批量查询,避免 N+1。 | ||
| 205 | + * | ||
| 206 | + * @param list 质量缺陷记录列表 | ||
| 207 | + */ | ||
| 208 | + private void fillRelatedInfo(List<QualityDefect> list) { | ||
| 209 | + if (CollectionUtils.isEmpty(list)) { | ||
| 210 | + return; | ||
| 211 | + } | ||
| 212 | + | ||
| 213 | + // 一次性收集四类关联 Id | ||
| 214 | + Set<String> workstationIds = new HashSet<>(); | ||
| 215 | + Set<String> shiftIds = new HashSet<>(); | ||
| 216 | + Set<String> areaIds = new HashSet<>(); | ||
| 217 | + Set<String> userIds = new HashSet<>(); | ||
| 218 | + for (QualityDefect item : list) { | ||
| 219 | + if (StringUtils.isNotBlank(item.getWtgwxx())) { | ||
| 220 | + workstationIds.add(item.getWtgwxx()); | ||
| 221 | + } | ||
| 222 | + if (StringUtils.isNotBlank(item.getWtbcxx())) { | ||
| 223 | + shiftIds.add(item.getWtbcxx()); | ||
| 224 | + } | ||
| 225 | + if (StringUtils.isNotBlank(item.getZrqyxx())) { | ||
| 226 | + areaIds.add(item.getZrqyxx()); | ||
| 227 | + } | ||
| 228 | + if (StringUtils.isNotBlank(item.getZrry())) { | ||
| 229 | + userIds.add(item.getZrry()); | ||
| 230 | + } | ||
| 231 | + if (StringUtils.isNotBlank(item.getCreatedBy())) { | ||
| 232 | + userIds.add(item.getCreatedBy()); | ||
| 233 | + } | ||
| 234 | + if (StringUtils.isNotBlank(item.getUpdatedBy())) { | ||
| 235 | + userIds.add(item.getUpdatedBy()); | ||
| 236 | + } | ||
| 237 | + } | ||
| 238 | + | ||
| 239 | + // 批量查询 | ||
| 240 | + Map<String, StopWorkstation> workstationMap = workstationIds.isEmpty() | ||
| 241 | + ? new HashMap<>(0) : stopWorkstationService.mapByIds(workstationIds); | ||
| 242 | + Map<String, Shift> shiftMap = shiftIds.isEmpty() | ||
| 243 | + ? new HashMap<>(0) : shiftService.mapByIds(shiftIds); | ||
| 244 | + Map<String, Area> areaMap = areaIds.isEmpty() | ||
| 245 | + ? new HashMap<>(0) : areaService.mapByIds(areaIds); | ||
| 246 | + Map<String, UcUser> userMap = userIds.isEmpty() | ||
| 247 | + ? new HashMap<>(0) : ucUserService.mapByIds(userIds); | ||
| 248 | + | ||
| 249 | + // 填充 @Transient 字段 | ||
| 250 | + for (QualityDefect item : list) { | ||
| 251 | + StopWorkstation workstation = workstationMap.get(item.getWtgwxx()); | ||
| 252 | + if (workstation != null) { | ||
| 253 | + item.setGwmc(workstation.getGwmc()); | ||
| 254 | + item.setGwbh(workstation.getGwbh()); | ||
| 255 | + } | ||
| 256 | + Shift shift = shiftMap.get(item.getWtbcxx()); | ||
| 257 | + if (shift != null) { | ||
| 258 | + item.setBcmc(shift.getBcmc()); | ||
| 259 | + item.setBcbh(shift.getBcbh()); | ||
| 260 | + } | ||
| 261 | + Area area = areaMap.get(item.getZrqyxx()); | ||
| 262 | + if (area != null) { | ||
| 263 | + item.setQymc(area.getQymc()); | ||
| 264 | + item.setQybh(area.getQybh()); | ||
| 265 | + } | ||
| 266 | + UcUser zrryUser = userMap.get(item.getZrry()); | ||
| 267 | + if (zrryUser != null) { | ||
| 268 | + item.setZrryName(zrryUser.getName()); | ||
| 269 | + } | ||
| 270 | + UcUser creator = userMap.get(item.getCreatedBy()); | ||
| 271 | + if (creator != null) { | ||
| 272 | + item.setCreatedByName(creator.getName()); | ||
| 273 | + } | ||
| 274 | + UcUser updater = userMap.get(item.getUpdatedBy()); | ||
| 275 | + if (updater != null) { | ||
| 276 | + item.setUpdatedByName(updater.getName()); | ||
| 277 | + } | ||
| 278 | + } | ||
| 162 | } | 279 | } |
| 163 | 280 | ||
| 164 | /** | 281 | /** |
| @@ -7,9 +7,13 @@ import com.qgutech.qgyun.apaas.sync.constant.Constant; | @@ -7,9 +7,13 @@ import com.qgutech.qgyun.apaas.sync.constant.Constant; | ||
| 7 | import com.qgutech.qgyun.apaas.sync.cps.dto.StopRecordDailySummaryDTO; | 7 | import com.qgutech.qgyun.apaas.sync.cps.dto.StopRecordDailySummaryDTO; |
| 8 | import com.qgutech.qgyun.apaas.sync.cps.dto.StopRecordWorkstationSummaryDTO; | 8 | import com.qgutech.qgyun.apaas.sync.cps.dto.StopRecordWorkstationSummaryDTO; |
| 9 | import com.qgutech.qgyun.apaas.sync.cps.mapper.StopRecordMapper; | 9 | import com.qgutech.qgyun.apaas.sync.cps.mapper.StopRecordMapper; |
| 10 | +import com.qgutech.qgyun.apaas.sync.cps.model.Area; | ||
| 10 | import com.qgutech.qgyun.apaas.sync.cps.model.BlockInfo; | 11 | import com.qgutech.qgyun.apaas.sync.cps.model.BlockInfo; |
| 12 | +import com.qgutech.qgyun.apaas.sync.cps.model.Shift; | ||
| 11 | import com.qgutech.qgyun.apaas.sync.cps.model.StopRecord; | 13 | import com.qgutech.qgyun.apaas.sync.cps.model.StopRecord; |
| 12 | import com.qgutech.qgyun.apaas.sync.cps.model.StopWorkstation; | 14 | import com.qgutech.qgyun.apaas.sync.cps.model.StopWorkstation; |
| 15 | +import com.qgutech.qgyun.apaas.sync.cps.model.Team; | ||
| 16 | +import com.qgutech.qgyun.apaas.sync.cps.model.XtLine; | ||
| 13 | import org.apache.commons.collections4.CollectionUtils; | 17 | import org.apache.commons.collections4.CollectionUtils; |
| 14 | import org.apache.commons.lang3.StringUtils; | 18 | import org.apache.commons.lang3.StringUtils; |
| 15 | import org.springframework.stereotype.Service; | 19 | import org.springframework.stereotype.Service; |
| @@ -43,6 +47,18 @@ public class StopRecordService extends BaseServiceImpl<StopRecord> { | @@ -43,6 +47,18 @@ public class StopRecordService extends BaseServiceImpl<StopRecord> { | ||
| 43 | @Resource | 47 | @Resource |
| 44 | private BlockInfoService blockInfoService; | 48 | private BlockInfoService blockInfoService; |
| 45 | 49 | ||
| 50 | + @Resource | ||
| 51 | + private XtLineService xtLineService; | ||
| 52 | + | ||
| 53 | + @Resource | ||
| 54 | + private ShiftService shiftService; | ||
| 55 | + | ||
| 56 | + @Resource | ||
| 57 | + private AreaService areaService; | ||
| 58 | + | ||
| 59 | + @Resource | ||
| 60 | + private TeamService teamService; | ||
| 61 | + | ||
| 46 | @Transactional(readOnly = true) | 62 | @Transactional(readOnly = true) |
| 47 | public StopRecord getById(String id) { | 63 | public StopRecord getById(String id) { |
| 48 | Assert.hasLength(id, "id is empty!"); | 64 | Assert.hasLength(id, "id is empty!"); |
| @@ -538,7 +554,73 @@ public class StopRecordService extends BaseServiceImpl<StopRecord> { | @@ -538,7 +554,73 @@ public class StopRecordService extends BaseServiceImpl<StopRecord> { | ||
| 538 | String txgwxx, String date) { | 554 | String txgwxx, String date) { |
| 539 | // 解析指定日期为当天时间范围 | 555 | // 解析指定日期为当天时间范围 |
| 540 | Date[] range = parseDateRange(date); | 556 | Date[] range = parseDateRange(date); |
| 541 | - return listByBlock(blockCode, xtxx, bcxx, txqyxx, txgwxx, range[0], range[1]); | 557 | + List<StopRecord> list = listByBlock(blockCode, xtxx, bcxx, txqyxx, txgwxx, range[0], range[1]); |
| 558 | + fillRelatedInfo(list); | ||
| 559 | + return list; | ||
| 560 | + } | ||
| 561 | + | ||
| 562 | + /** | ||
| 563 | + * 批量填充停线记录中关联实体的名称/编号等非持久化字段 | ||
| 564 | + * <p> | ||
| 565 | + * 涉及:线体(XtLine)、班次(Shift)、停线区域(Area)、停线板块(BlockInfo)、 | ||
| 566 | + * 停线工位(StopWorkstation)、停线班组(Team)。 | ||
| 567 | + * | ||
| 568 | + * @param list 停线记录列表,为空时直接返回 | ||
| 569 | + */ | ||
| 570 | + private void fillRelatedInfo(List<StopRecord> list) { | ||
| 571 | + if (CollectionUtils.isEmpty(list)) { | ||
| 572 | + return; | ||
| 573 | + } | ||
| 574 | + | ||
| 575 | + // 收集各类关联 Id | ||
| 576 | + Set<String> xtIds = list.stream().map(StopRecord::getXtxx).filter(StringUtils::isNotBlank).collect(Collectors.toSet()); | ||
| 577 | + Set<String> bcIds = list.stream().map(StopRecord::getBcxx).filter(StringUtils::isNotBlank).collect(Collectors.toSet()); | ||
| 578 | + Set<String> qyIds = list.stream().map(StopRecord::getTxqyxx).filter(StringUtils::isNotBlank).collect(Collectors.toSet()); | ||
| 579 | + Set<String> bkIds = list.stream().map(StopRecord::getTxbkxx).filter(StringUtils::isNotBlank).collect(Collectors.toSet()); | ||
| 580 | + Set<String> gwIds = list.stream().map(StopRecord::getTxgwxx).filter(StringUtils::isNotBlank).collect(Collectors.toSet()); | ||
| 581 | + Set<String> bzIds = list.stream().map(StopRecord::getTxbzxx).filter(StringUtils::isNotBlank).collect(Collectors.toSet()); | ||
| 582 | + | ||
| 583 | + // 批量查询关联实体 | ||
| 584 | + Map<String, XtLine> xtMap = CollectionUtils.isEmpty(xtIds) ? new HashMap<>(0) : xtLineService.mapByIds(xtIds); | ||
| 585 | + Map<String, Shift> bcMap = CollectionUtils.isEmpty(bcIds) ? new HashMap<>(0) : shiftService.mapByIds(bcIds); | ||
| 586 | + Map<String, Area> qyMap = CollectionUtils.isEmpty(qyIds) ? new HashMap<>(0) : areaService.mapByIds(qyIds); | ||
| 587 | + Map<String, BlockInfo> bkMap = CollectionUtils.isEmpty(bkIds) ? new HashMap<>(0) : blockInfoService.mapByIds(bkIds); | ||
| 588 | + Map<String, StopWorkstation> gwMap = CollectionUtils.isEmpty(gwIds) ? new HashMap<>(0) : stopWorkstationService.mapByIds(gwIds); | ||
| 589 | + Map<String, Team> bzMap = CollectionUtils.isEmpty(bzIds) ? new HashMap<>(0) : teamService.mapByIds(bzIds); | ||
| 590 | + | ||
| 591 | + // 填充非持久化字段 | ||
| 592 | + for (StopRecord record : list) { | ||
| 593 | + XtLine xt = xtMap.get(record.getXtxx()); | ||
| 594 | + if (xt != null) { | ||
| 595 | + record.setXtmc(xt.getXtmc()); | ||
| 596 | + record.setXtbh(xt.getXtbh()); | ||
| 597 | + } | ||
| 598 | + Shift shift = bcMap.get(record.getBcxx()); | ||
| 599 | + if (shift != null) { | ||
| 600 | + record.setBcmc(shift.getBcmc()); | ||
| 601 | + record.setBcbh(shift.getBcbh()); | ||
| 602 | + } | ||
| 603 | + Area area = qyMap.get(record.getTxqyxx()); | ||
| 604 | + if (area != null) { | ||
| 605 | + record.setTxqymc(area.getQymc()); | ||
| 606 | + record.setTxqybh(area.getQybh()); | ||
| 607 | + } | ||
| 608 | + BlockInfo block = bkMap.get(record.getTxbkxx()); | ||
| 609 | + if (block != null) { | ||
| 610 | + record.setTxbkmc(block.getMc()); | ||
| 611 | + record.setTxbkbm(block.getBm()); | ||
| 612 | + } | ||
| 613 | + StopWorkstation gw = gwMap.get(record.getTxgwxx()); | ||
| 614 | + if (gw != null) { | ||
| 615 | + record.setTxgwmc(gw.getGwmc()); | ||
| 616 | + record.setTxgwbh(gw.getGwbh()); | ||
| 617 | + } | ||
| 618 | + Team team = bzMap.get(record.getTxbzxx()); | ||
| 619 | + if (team != null) { | ||
| 620 | + record.setTxbzmc(team.getBzmc()); | ||
| 621 | + record.setTxbzbh(team.getBzbh()); | ||
| 622 | + } | ||
| 623 | + } | ||
| 542 | } | 624 | } |
| 543 | 625 | ||
| 544 | /** | 626 | /** |
| @@ -4,8 +4,13 @@ import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl; | @@ -4,8 +4,13 @@ import com.qgutech.qgyun.framework.database.mybatis.service.BaseServiceImpl; | ||
| 4 | import com.qgutech.qgyun.apaas.sync.base.BoErrorCode; | 4 | import com.qgutech.qgyun.apaas.sync.base.BoErrorCode; |
| 5 | import com.qgutech.qgyun.apaas.sync.base.BoException; | 5 | import com.qgutech.qgyun.apaas.sync.base.BoException; |
| 6 | import com.qgutech.qgyun.apaas.sync.cps.dto.WorkshopWorkTaskStatusSummaryDTO; | 6 | import com.qgutech.qgyun.apaas.sync.cps.dto.WorkshopWorkTaskStatusSummaryDTO; |
| 7 | +import com.qgutech.qgyun.apaas.sync.cps.enums.RwztEnum; | ||
| 7 | import com.qgutech.qgyun.apaas.sync.cps.mapper.WorkshopWorkTaskMapper; | 8 | import com.qgutech.qgyun.apaas.sync.cps.mapper.WorkshopWorkTaskMapper; |
| 9 | +import com.qgutech.qgyun.apaas.sync.cps.model.Area; | ||
| 10 | +import com.qgutech.qgyun.apaas.sync.cps.model.WorkshopWorkPlan; | ||
| 8 | import com.qgutech.qgyun.apaas.sync.cps.model.WorkshopWorkTask; | 11 | import com.qgutech.qgyun.apaas.sync.cps.model.WorkshopWorkTask; |
| 12 | +import com.qgutech.qgyun.apaas.sync.org.model.UcUser; | ||
| 13 | +import com.qgutech.qgyun.apaas.sync.org.service.UcUserService; | ||
| 9 | import com.qgutech.qgyun.apaas.sync.utils.CorpExample; | 14 | import com.qgutech.qgyun.apaas.sync.utils.CorpExample; |
| 10 | import com.qgutech.qgyun.apaas.sync.utils.DateDealUtils; | 15 | import com.qgutech.qgyun.apaas.sync.utils.DateDealUtils; |
| 11 | import org.apache.commons.collections4.CollectionUtils; | 16 | import org.apache.commons.collections4.CollectionUtils; |
| @@ -28,6 +33,15 @@ public class WorkshopWorkTaskService extends BaseServiceImpl<WorkshopWorkTask> { | @@ -28,6 +33,15 @@ public class WorkshopWorkTaskService extends BaseServiceImpl<WorkshopWorkTask> { | ||
| 28 | @Resource | 33 | @Resource |
| 29 | private WorkshopWorkTaskMapper workshopWorkTaskMapper; | 34 | private WorkshopWorkTaskMapper workshopWorkTaskMapper; |
| 30 | 35 | ||
| 36 | + @Resource | ||
| 37 | + private WorkshopWorkPlanService workshopWorkPlanService; | ||
| 38 | + | ||
| 39 | + @Resource | ||
| 40 | + private AreaService areaService; | ||
| 41 | + | ||
| 42 | + @Resource | ||
| 43 | + private UcUserService ucUserService; | ||
| 44 | + | ||
| 31 | @Transactional(readOnly = true) | 45 | @Transactional(readOnly = true) |
| 32 | public WorkshopWorkTask getById(String id) { | 46 | public WorkshopWorkTask getById(String id) { |
| 33 | Assert.hasLength(id, "id is empty!"); | 47 | Assert.hasLength(id, "id is empty!"); |
| @@ -70,11 +84,13 @@ public class WorkshopWorkTaskService extends BaseServiceImpl<WorkshopWorkTask> { | @@ -70,11 +84,13 @@ public class WorkshopWorkTaskService extends BaseServiceImpl<WorkshopWorkTask> { | ||
| 70 | public List<WorkshopWorkTask> listAll() { | 84 | public List<WorkshopWorkTask> listAll() { |
| 71 | 85 | ||
| 72 | Example example = CorpExample.ofCorp(entityClass); | 86 | Example example = CorpExample.ofCorp(entityClass); |
| 73 | - return workshopWorkTaskMapper.selectByExample(example); | 87 | + List<WorkshopWorkTask> list = workshopWorkTaskMapper.selectByExample(example); |
| 88 | + fillRelatedInfo(list); | ||
| 89 | + return list; | ||
| 74 | } | 90 | } |
| 75 | 91 | ||
| 76 | /** | 92 | /** |
| 77 | - * 根据条件查询工作任务明细列表 | 93 | + * 根据条件查询工作任务明细列表(含关联信息填充) |
| 78 | * | 94 | * |
| 79 | * @param qyxx 区域信息,可为空 | 95 | * @param qyxx 区域信息,可为空 |
| 80 | * @param year 年份,可为空,默认当前年 | 96 | * @param year 年份,可为空,默认当前年 |
| @@ -83,12 +99,26 @@ public class WorkshopWorkTaskService extends BaseServiceImpl<WorkshopWorkTask> { | @@ -83,12 +99,26 @@ public class WorkshopWorkTaskService extends BaseServiceImpl<WorkshopWorkTask> { | ||
| 83 | */ | 99 | */ |
| 84 | @Transactional(readOnly = true) | 100 | @Transactional(readOnly = true) |
| 85 | public List<WorkshopWorkTask> listByCondition(String qyxx, Integer year, Integer month) { | 101 | public List<WorkshopWorkTask> listByCondition(String qyxx, Integer year, Integer month) { |
| 102 | + List<WorkshopWorkTask> list = queryByCondition(qyxx, year, month); | ||
| 103 | + fillRelatedInfo(list); | ||
| 104 | + return list; | ||
| 105 | + } | ||
| 106 | + | ||
| 107 | + /** | ||
| 108 | + * 根据条件查询工作任务原始列表(不填充关联信息) | ||
| 109 | + * | ||
| 110 | + * @param qyxx 区域信息,可为空 | ||
| 111 | + * @param year 年份,可为空,默认当前年 | ||
| 112 | + * @param month 月份(1-12),可为空,默认当前月 | ||
| 113 | + * @return 工作任务列表 | ||
| 114 | + */ | ||
| 115 | + private List<WorkshopWorkTask> queryByCondition(String qyxx, Integer year, Integer month) { | ||
| 86 | Date start = DateDealUtils.getMonthStartTime(year, month); | 116 | Date start = DateDealUtils.getMonthStartTime(year, month); |
| 87 | Date end = DateDealUtils.getMonthEndTime(year, month); | 117 | Date end = DateDealUtils.getMonthEndTime(year, month); |
| 88 | 118 | ||
| 89 | Example example = new Example(entityClass); | 119 | Example example = new Example(entityClass); |
| 90 | Example.Criteria criteria = CorpExample.criteria(example); | 120 | Example.Criteria criteria = CorpExample.criteria(example); |
| 91 | - criteria.andBetween(WorkshopWorkTask.START_DATE, start, end); | 121 | + criteria.andBetween(WorkshopWorkTask.CREATED_AT, start, end); |
| 92 | if (StringUtils.isNotBlank(qyxx)) { | 122 | if (StringUtils.isNotBlank(qyxx)) { |
| 93 | criteria.andEqualTo(WorkshopWorkTask.QYXX, qyxx); | 123 | criteria.andEqualTo(WorkshopWorkTask.QYXX, qyxx); |
| 94 | } | 124 | } |
| @@ -101,6 +131,83 @@ public class WorkshopWorkTaskService extends BaseServiceImpl<WorkshopWorkTask> { | @@ -101,6 +131,83 @@ public class WorkshopWorkTaskService extends BaseServiceImpl<WorkshopWorkTask> { | ||
| 101 | } | 131 | } |
| 102 | 132 | ||
| 103 | /** | 133 | /** |
| 134 | + * 批量填充工作任务关联的工作计划名称、区域名称/编号, | ||
| 135 | + * 以及任务负责人/计划负责人/创建人/更新人姓名。 | ||
| 136 | + * <p> | ||
| 137 | + * 工作计划关联 WorkshopWorkPlan,区域关联 Area,人员关联组织用户 UcUser。 | ||
| 138 | + * 一次批量收集所有关联 Id,再分别调用 mapByIds 批量查询,避免 N+1。 | ||
| 139 | + * | ||
| 140 | + * @param list 工作任务列表 | ||
| 141 | + */ | ||
| 142 | + private void fillRelatedInfo(List<WorkshopWorkTask> list) { | ||
| 143 | + if (CollectionUtils.isEmpty(list)) { | ||
| 144 | + return; | ||
| 145 | + } | ||
| 146 | + | ||
| 147 | + // 一次性收集三类关联 Id | ||
| 148 | + Set<String> planIds = new HashSet<>(); | ||
| 149 | + Set<String> areaIds = new HashSet<>(); | ||
| 150 | + Set<String> userIds = new HashSet<>(); | ||
| 151 | + for (WorkshopWorkTask item : list) { | ||
| 152 | + if (StringUtils.isNotBlank(item.getSsgzjh())) { | ||
| 153 | + planIds.add(item.getSsgzjh()); | ||
| 154 | + } | ||
| 155 | + if (StringUtils.isNotBlank(item.getQyxx())) { | ||
| 156 | + areaIds.add(item.getQyxx()); | ||
| 157 | + } | ||
| 158 | + if (StringUtils.isNotBlank(item.getRwfzr())) { | ||
| 159 | + userIds.add(item.getRwfzr()); | ||
| 160 | + } | ||
| 161 | + if (StringUtils.isNotBlank(item.getJhfzr())) { | ||
| 162 | + userIds.add(item.getJhfzr()); | ||
| 163 | + } | ||
| 164 | + if (StringUtils.isNotBlank(item.getCreatedBy())) { | ||
| 165 | + userIds.add(item.getCreatedBy()); | ||
| 166 | + } | ||
| 167 | + if (StringUtils.isNotBlank(item.getUpdatedBy())) { | ||
| 168 | + userIds.add(item.getUpdatedBy()); | ||
| 169 | + } | ||
| 170 | + } | ||
| 171 | + | ||
| 172 | + // 批量查询 | ||
| 173 | + Map<String, WorkshopWorkPlan> planMap = planIds.isEmpty() | ||
| 174 | + ? new HashMap<>(0) : workshopWorkPlanService.mapByIds(planIds); | ||
| 175 | + Map<String, Area> areaMap = areaIds.isEmpty() | ||
| 176 | + ? new HashMap<>(0) : areaService.mapByIds(areaIds); | ||
| 177 | + Map<String, UcUser> userMap = userIds.isEmpty() | ||
| 178 | + ? new HashMap<>(0) : ucUserService.mapByIds(userIds); | ||
| 179 | + | ||
| 180 | + // 填充 @Transient 字段 | ||
| 181 | + for (WorkshopWorkTask item : list) { | ||
| 182 | + WorkshopWorkPlan plan = planMap.get(item.getSsgzjh()); | ||
| 183 | + if (plan != null) { | ||
| 184 | + item.setSsgzjhMc(plan.getGzjhmc()); | ||
| 185 | + } | ||
| 186 | + Area area = areaMap.get(item.getQyxx()); | ||
| 187 | + if (area != null) { | ||
| 188 | + item.setQymc(area.getQymc()); | ||
| 189 | + item.setQybh(area.getQybh()); | ||
| 190 | + } | ||
| 191 | + UcUser rwfzr = userMap.get(item.getRwfzr()); | ||
| 192 | + if (rwfzr != null) { | ||
| 193 | + item.setRwfzrName(rwfzr.getName()); | ||
| 194 | + } | ||
| 195 | + UcUser jhfzr = userMap.get(item.getJhfzr()); | ||
| 196 | + if (jhfzr != null) { | ||
| 197 | + item.setJhfzrName(jhfzr.getName()); | ||
| 198 | + } | ||
| 199 | + UcUser creator = userMap.get(item.getCreatedBy()); | ||
| 200 | + if (creator != null) { | ||
| 201 | + item.setCreatedByName(creator.getName()); | ||
| 202 | + } | ||
| 203 | + UcUser updater = userMap.get(item.getUpdatedBy()); | ||
| 204 | + if (updater != null) { | ||
| 205 | + item.setUpdatedByName(updater.getName()); | ||
| 206 | + } | ||
| 207 | + } | ||
| 208 | + } | ||
| 209 | + | ||
| 210 | + /** | ||
| 104 | * 按任务状态汇总各状态记录条数 | 211 | * 按任务状态汇总各状态记录条数 |
| 105 | * | 212 | * |
| 106 | * @param qyxx 区域信息,可为空 | 213 | * @param qyxx 区域信息,可为空 |
| @@ -110,7 +217,7 @@ public class WorkshopWorkTaskService extends BaseServiceImpl<WorkshopWorkTask> { | @@ -110,7 +217,7 @@ public class WorkshopWorkTaskService extends BaseServiceImpl<WorkshopWorkTask> { | ||
| 110 | */ | 217 | */ |
| 111 | @Transactional(readOnly = true) | 218 | @Transactional(readOnly = true) |
| 112 | public List<WorkshopWorkTaskStatusSummaryDTO> summaryByStatus(String qyxx, Integer year, Integer month) { | 219 | public List<WorkshopWorkTaskStatusSummaryDTO> summaryByStatus(String qyxx, Integer year, Integer month) { |
| 113 | - List<WorkshopWorkTask> list = listByCondition(qyxx, year, month); | 220 | + List<WorkshopWorkTask> list = queryByCondition(qyxx, year, month); |
| 114 | if (CollectionUtils.isEmpty(list)) { | 221 | if (CollectionUtils.isEmpty(list)) { |
| 115 | return new ArrayList<>(0); | 222 | return new ArrayList<>(0); |
| 116 | } | 223 | } |
| @@ -123,7 +230,8 @@ public class WorkshopWorkTaskService extends BaseServiceImpl<WorkshopWorkTask> { | @@ -123,7 +230,8 @@ public class WorkshopWorkTaskService extends BaseServiceImpl<WorkshopWorkTask> { | ||
| 123 | 230 | ||
| 124 | List<WorkshopWorkTaskStatusSummaryDTO> result = new ArrayList<>(); | 231 | List<WorkshopWorkTaskStatusSummaryDTO> result = new ArrayList<>(); |
| 125 | for (Map.Entry<String, Long> entry : statusCountMap.entrySet()) { | 232 | for (Map.Entry<String, Long> entry : statusCountMap.entrySet()) { |
| 126 | - result.add(new WorkshopWorkTaskStatusSummaryDTO(entry.getKey(), entry.getValue().intValue())); | 233 | + result.add(new WorkshopWorkTaskStatusSummaryDTO(entry.getKey(), |
| 234 | + RwztEnum.getDescByCode(entry.getKey()), entry.getValue().intValue())); | ||
| 127 | } | 235 | } |
| 128 | return result; | 236 | return result; |
| 129 | } | 237 | } |
| 1 | # IPO 看板接口 API 说明文档 | 1 | # IPO 看板接口 API 说明文档 |
| 2 | 2 | ||
| 3 | -> 本文档梳理 2026-10-06 之后新建的看板相关接口,涵盖 **板块信息、停线工位、停线记录、过程确认班组计划** 4 个新建控制器下的全部端点。文档格式与《CPS 模块接口 API 说明文档》保持一致。 | 3 | +> 本文档梳理 2026-10-06 之后新建的看板相关接口,涵盖 **板块信息、停线工位、停线记录、过程确认班组计划、PJO 计划执行、CPS 问题、质量缺陷、车间级工作任务** 8 个控制器下的看板相关端点。文档格式与《CPS 模块接口 API 说明文档》保持一致。 |
| 4 | 4 | ||
| 5 | ## 目录 | 5 | ## 目录 |
| 6 | 6 | ||
| @@ -10,9 +10,9 @@ | @@ -10,9 +10,9 @@ | ||
| 10 | - [2.1 获取所有停线工位信息列表 🆕新增](#21-获取所有停线工位信息列表) | 10 | - [2.1 获取所有停线工位信息列表 🆕新增](#21-获取所有停线工位信息列表) |
| 11 | - [3. 停线记录接口](#3-停线记录接口) | 11 | - [3. 停线记录接口](#3-停线记录接口) |
| 12 | - [3.1 获取所有停线记录列表 🆕新增](#31-获取所有停线记录列表) | 12 | - [3.1 获取所有停线记录列表 🆕新增](#31-获取所有停线记录列表) |
| 13 | - - [3.2 按月份汇总统计每天的停线时长 🆕新增](#32-按月份汇总统计每天的停线时长) | ||
| 14 | - - [3.3 按工位汇总统计停线时长 🆕新增](#33-按工位汇总统计停线时长) | ||
| 15 | - - [3.4 查询停线记录明细列表 🆕新增](#34-查询停线记录明细列表) | 13 | + - [3.2 按天汇总统计停线时长(按板块拆分) ✏️更新](#32-按天汇总统计停线时长按板块拆分) |
| 14 | + - [3.3 按工位汇总统计停线时长(按板块拆分) ✏️更新](#33-按工位汇总统计停线时长按板块拆分) | ||
| 15 | + - [3.4 查询停线记录明细列表(按板块拆分) ✏️更新](#34-查询停线记录明细列表按板块拆分) | ||
| 16 | - [4. 过程确认班组计划接口](#4-过程确认班组计划接口) | 16 | - [4. 过程确认班组计划接口](#4-过程确认班组计划接口) |
| 17 | - [4.1 获取所有过程确认班组计划列表 🆕新增](#41-获取所有过程确认班组计划列表) | 17 | - [4.1 获取所有过程确认班组计划列表 🆕新增](#41-获取所有过程确认班组计划列表) |
| 18 | - [4.2 按区域查询当前周过程确认班组计划明细列表 🆕新增](#42-按区域查询当前周过程确认班组计划明细列表) | 18 | - [4.2 按区域查询当前周过程确认班组计划明细列表 🆕新增](#42-按区域查询当前周过程确认班组计划明细列表) |
| @@ -20,25 +20,41 @@ | @@ -20,25 +20,41 @@ | ||
| 20 | - [5.1 查询区域内当前周PJO执行记录明细列表 🆕新增](#51-查询区域内当前周pjo执行记录明细列表) | 20 | - [5.1 查询区域内当前周PJO执行记录明细列表 🆕新增](#51-查询区域内当前周pjo执行记录明细列表) |
| 21 | - [6. CPS问题接口](#6-cps问题接口) | 21 | - [6. CPS问题接口](#6-cps问题接口) |
| 22 | - [6.1 根据年月、区域、状态查询问题记录明细 🆕新增](#61-根据年月区域状态查询问题记录明细) | 22 | - [6.1 根据年月、区域、状态查询问题记录明细 🆕新增](#61-根据年月区域状态查询问题记录明细) |
| 23 | +- [7. 质量缺陷接口](#7-质量缺陷接口) | ||
| 24 | + - [7.1 获取所有质量缺陷信息列表 🆕新增](#71-获取所有质量缺陷信息列表) | ||
| 25 | + - [7.2 按月份查询每日质量缺陷记录汇总数目 🆕新增](#72-按月份查询每日质量缺陷记录汇总数目) | ||
| 26 | + - [7.3 按指定日期和区域汇总各工位缺陷次数 🆕新增](#73-按指定日期和区域汇总各工位缺陷次数) | ||
| 27 | + - [7.4 按指定日期、区域、工位查询质量缺陷明细列表 🆕新增](#74-按指定日期区域工位查询质量缺陷明细列表) | ||
| 28 | +- [8. 车间级工作任务接口](#8-车间级工作任务接口) | ||
| 29 | + - [8.1 获取所有车间级工作任务列表 🆕新增](#81-获取所有车间级工作任务列表) | ||
| 30 | + - [8.2 根据区域、年份、月份查询工作任务明细列表 🆕新增](#82-根据区域年份月份查询工作任务明细列表) | ||
| 31 | + - [8.3 按任务状态汇总各状态记录条数 🆕新增](#83-按任务状态汇总各状态记录条数) | ||
| 23 | 32 | ||
| 24 | --- | 33 | --- |
| 25 | 34 | ||
| 26 | ## 变更记录 | 35 | ## 变更记录 |
| 27 | 36 | ||
| 28 | -> 标记说明:🆕 **新增接口**(2026-10-06 之后新建的接口) | 37 | +> 标记说明:🆕 **新增接口**(2026-10-06 之后新建的接口) ✏️ **接口更新**(路径/参数/响应结构变更) |
| 29 | 38 | ||
| 30 | | 标记 | 章节 | 接口路径 | 变更类型 | 变更说明 | | 39 | | 标记 | 章节 | 接口路径 | 变更类型 | 变更说明 | |
| 31 | |------|------|----------|----------|----------| | 40 | |------|------|----------|----------|----------| |
| 32 | | 🆕 | [1.1](#11-获取所有板块信息列表) | `GET /blockInfo/list/all` | 新增接口 | 获取当前企业下所有板块信息列表 | | 41 | | 🆕 | [1.1](#11-获取所有板块信息列表) | `GET /blockInfo/list/all` | 新增接口 | 获取当前企业下所有板块信息列表 | |
| 33 | -| 🆕 | [2.1](#21-获取所有停线工位信息列表) | `GET /stopWorkstation/list/all` | 新增接口 | 获取当前企业下所有停线工位信息列表 | | ||
| 34 | -| 🆕 | [3.1](#31-获取所有停线记录列表) | `GET /stopRecord/list/all` | 新增接口 | 获取当前企业下所有停线记录信息列表 | | ||
| 35 | -| 🆕 | [3.2](#32-按月份汇总统计每天的停线时长) | `GET /stopRecord/summary/daily` | 新增接口 | 按线体、班次、区域、板块、年月(1-12)筛选停线记录,按天汇总每天的停线时长,结果按日期升序 | | ||
| 36 | -| 🆕 | [3.3](#33-按工位汇总统计停线时长) | `GET /stopRecord/summary/workstation` | 新增接口 | 按线体、班次、区域、板块及指定日期筛选,按工位汇总停线时长(降序),仅返回汇总不含明细 | | ||
| 37 | -| 🆕 | [3.4](#34-查询停线记录明细列表) | `GET /stopRecord/list/detail` | 新增接口 | 按线体、班次、区域、板块、工位及指定日期筛选,返回停线记录明细列表 | | ||
| 38 | -| 🆕 | [4.1](#41-获取所有过程确认班组计划列表) | `GET /processConfirmTeamPlan/list/all` | 新增接口 | 获取当前企业下所有过程确认班组计划列表 | | 42 | +| 🆕 | [2.1](#21-获取所有停线工位信息列表) | `GET /stopWorkstation/list/all` | 新增接口 | 获取当前企业下所有停线工位信息列表;响应含 `gwxzDesc` 工位性质中文描述 | |
| 43 | +| 🆕 | [3.1](#31-获取所有停线记录列表) | `GET /stopRecord/list/all` | 新增接口 | 获取当前企业下所有停线记录信息列表;响应含 5 个枚举中文描述计算字段 | | ||
| 44 | +| ✏️ | [3.2](#32-按天汇总统计停线时长按板块拆分) | `GET /stopRecord/summary/daily/{logistics,equipment,quality,other}` | 接口更新 | 原 `/stopRecord/summary/daily` 按板块拆分为 4 个专用端点;`txbkxx` 入参移除,改由端点区分;`year`/`month` 由必传改为可选(默认当前年/月);响应新增 `bkbm`/`bkmc` | | ||
| 45 | +| ✏️ | [3.3](#33-按工位汇总统计停线时长按板块拆分) | `GET /stopRecord/summary/workstation/{logistics,equipment,quality,other}` | 接口更新 | 原 `/stopRecord/summary/workstation` 按板块拆分为 4 个专用端点;`txbkxx` 入参移除;响应新增 `bkbm`/`bkmc` | | ||
| 46 | +| ✏️ | [3.4](#34-查询停线记录明细列表按板块拆分) | `GET /stopRecord/list/detail/{logistics,equipment,quality,other}` | 接口更新 | 原 `/stopRecord/list/detail` 按板块拆分为 4 个专用端点;`txbkxx` 入参移除;响应新增线体/班次/区域/板块/工位/班组共 12 个关联名称与编号字段 | | ||
| 47 | +| 🆕 | [4.1](#41-获取所有过程确认班组计划列表) | `GET /processConfirmTeamPlan/list/all` | 新增接口 | 获取当前企业下所有过程确认班组计划列表;响应含 `ztDesc` 状态中文描述 | | ||
| 39 | | 🆕 | [4.2](#42-按区域查询当前周过程确认班组计划明细列表) | `GET /processConfirmTeamPlan/list/currentWeek` | 新增接口 | 按区域(qyxx,可选)查询当前时间所在周(周一~周日)的过程确认班组计划明细,关联计划走访班组、工位的编号与名称 | | 48 | | 🆕 | [4.2](#42-按区域查询当前周过程确认班组计划明细列表) | `GET /processConfirmTeamPlan/list/currentWeek` | 新增接口 | 按区域(qyxx,可选)查询当前时间所在周(周一~周日)的过程确认班组计划明细,关联计划走访班组、工位的编号与名称 | |
| 40 | | 🆕 | [5.1](#51-查询区域内当前周pjo执行记录明细列表) | `GET /pjoExec/list/detail/currentWeek` | 新增接口 | 按区域(qy,可选)查询当前时间所在周(周一~周日)的 PJO 执行记录明细,含关联实体名称/编号、枚举中文描述及各阶段问题标记 | | 49 | | 🆕 | [5.1](#51-查询区域内当前周pjo执行记录明细列表) | `GET /pjoExec/list/detail/currentWeek` | 新增接口 | 按区域(qy,可选)查询当前时间所在周(周一~周日)的 PJO 执行记录明细,含关联实体名称/编号、枚举中文描述及各阶段问题标记 | |
| 41 | | 🆕 | [6.1](#61-根据年月区域状态查询问题记录明细) | `GET /cpsProblem/list/detail/condition` | 新增接口 | 按年份(默认当前年)、月份(1-12,默认当前月,按创建时间过滤)、区域 qy、处理状态筛选问题记录明细,含关联实体名称与枚举中文描述;线体/单位/班次无对应字段不作条件 | | 50 | | 🆕 | [6.1](#61-根据年月区域状态查询问题记录明细) | `GET /cpsProblem/list/detail/condition` | 新增接口 | 按年份(默认当前年)、月份(1-12,默认当前月,按创建时间过滤)、区域 qy、处理状态筛选问题记录明细,含关联实体名称与枚举中文描述;线体/单位/班次无对应字段不作条件 | |
| 51 | +| 🆕 | [7.1](#71-获取所有质量缺陷信息列表) | `GET /qualityDefect/list/all` | 新增接口 | 获取当前企业下所有质量缺陷信息列表;响应含 5 个枚举中文描述计算字段,及关联停线工位/班次/区域名称与编号、责任人员/创建人/更新人姓名 | | ||
| 52 | +| 🆕 | [7.2](#72-按月份查询每日质量缺陷记录汇总数目) | `GET /qualityDefect/summary/daily` | 新增接口 | 按责任区域、年月(默认当前年月,按提出日期过滤)统计每日质量缺陷记录数,按日期升序 | | ||
| 53 | +| 🆕 | [7.3](#73-按指定日期和区域汇总各工位缺陷次数) | `GET /qualityDefect/summary/workstation` | 新增接口 | 按指定日期、责任区域汇总各停线工位缺陷次数与月度重复次数合计,关联工位名称/编号/性质,按次数降序 | | ||
| 54 | +| 🆕 | [7.4](#74-按指定日期区域工位查询质量缺陷明细列表) | `GET /qualityDefect/list/detail` | 新增接口 | 按指定日期、责任区域、问题工位查询质量缺陷明细,含关联实体名称/编号、枚举中文描述及人员姓名 | | ||
| 55 | +| 🆕 | [8.1](#81-获取所有车间级工作任务列表) | `GET /workshopWorkTask/list/all` | 新增接口 | 获取当前企业下所有车间级工作任务列表;响应含任务状态中文描述及关联工作计划/区域名称、任务负责人/计划负责人/创建人/更新人姓名 | | ||
| 56 | +| 🆕 | [8.2](#82-根据区域年份月份查询工作任务明细列表) | `GET /workshopWorkTask/list/detail` | 新增接口 | 按区域、年月(默认当前年月,按创建时间过滤)查询工作任务明细,含关联实体名称与人员姓名 | | ||
| 57 | +| 🆕 | [8.3](#83-按任务状态汇总各状态记录条数) | `GET /workshopWorkTask/summary/status` | 新增接口 | 按区域、年月(默认当前年月,按创建时间过滤)统计各任务状态记录条数,含状态中文描述 | | ||
| 42 | 58 | ||
| 43 | --- | 59 | --- |
| 44 | 60 | ||
| @@ -148,7 +164,8 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | @@ -148,7 +164,8 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | ||
| 148 | | bzxx | String | 班组信息(班组id) | | 164 | | bzxx | String | 班组信息(班组id) | |
| 149 | | gwmc | String | 工位名称 | | 165 | | gwmc | String | 工位名称 | |
| 150 | | gwbh | String | 工位编号 | | 166 | | gwbh | String | 工位编号 | |
| 151 | -| gwxz | String | 工位性质 | | 167 | +| gwxz | String | 工位性质编号(#1#-主线;#2#-辅线) | |
| 168 | +| gwxzDesc | String | 工位性质中文描述(计算字段) | | ||
| 152 | 169 | ||
| 153 | **响应示例:** | 170 | **响应示例:** |
| 154 | 171 | ||
| @@ -164,7 +181,8 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | @@ -164,7 +181,8 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | ||
| 164 | "bzxx": "BZ001", | 181 | "bzxx": "BZ001", |
| 165 | "gwmc": "焊接工位", | 182 | "gwmc": "焊接工位", |
| 166 | "gwbh": "01", | 183 | "gwbh": "01", |
| 167 | - "gwxz": "A类" | 184 | + "gwxz": "#1#", |
| 185 | + "gwxzDesc": "主线" | ||
| 168 | } | 186 | } |
| 169 | ], | 187 | ], |
| 170 | "msg": "成功", | 188 | "msg": "成功", |
| @@ -182,7 +200,7 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | @@ -182,7 +200,7 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | ||
| 182 | 200 | ||
| 183 | **接口路径:** `GET /stopRecord/list/all` | 201 | **接口路径:** `GET /stopRecord/list/all` |
| 184 | 202 | ||
| 185 | -**接口说明:** 获取当前企业下所有停线记录信息列表。 | 203 | +**接口说明:** 获取当前企业下所有停线记录信息列表。响应中除持久化字段外,还包含 5 个枚举字段中文描述(计算型 getter,所有返回该实体的接口均自动生效);关联实体名称/编号(如 `xtmc`/`xtbh` 等 12 个字段)仅在 [3.4](#34-查询停线记录明细列表按板块拆分) 明细接口中由 Service 批量填充,本接口返回时为 `null`。 |
| 186 | 204 | ||
| 187 | **请求参数:** 无 | 205 | **请求参数:** 无 |
| 188 | 206 | ||
| @@ -196,38 +214,49 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | @@ -196,38 +214,49 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | ||
| 196 | | corpCode | String | 企业编码 | | 214 | | corpCode | String | 企业编码 | |
| 197 | | createdAt | String | 创建时间(yyyy-MM-dd HH:mm:ss) | | 215 | | createdAt | String | 创建时间(yyyy-MM-dd HH:mm:ss) | |
| 198 | | cyxx | String | 成员信息 | | 216 | | cyxx | String | 成员信息 | |
| 199 | -| xtxx | String | 线体信息 | | ||
| 200 | -| bcxx | String | 班次信息 | | ||
| 201 | -| txqyxx | String | 停线区域信息 | | ||
| 202 | -| txbzxx | String | 停线班组信息 | | ||
| 203 | -| txgwxx | String | 停线工位信息 | | ||
| 204 | -| gwxz | String | 工位性质 | | 217 | +| xtxx | String | 线体信息(线体id) | |
| 218 | +| bcxx | String | 班次信息(班次id) | | ||
| 219 | +| txqyxx | String | 停线区域信息(区域id) | | ||
| 220 | +| txbzxx | String | 停线班组信息(班组id) | | ||
| 221 | +| txgwxx | String | 停线工位信息(工位id) | | ||
| 222 | +| gwxz | String | 工位性质编号(#1#-主线;#2#-辅线) | | ||
| 223 | +| gwxzDesc | String | 工位性质中文描述(计算字段) | | ||
| 205 | | startTime | String | 停线开始时间(yyyy-MM-dd HH:mm:ss) | | 224 | | startTime | String | 停线开始时间(yyyy-MM-dd HH:mm:ss) | |
| 206 | | endTime | String | 停线结束时间(yyyy-MM-dd HH:mm:ss) | | 225 | | endTime | String | 停线结束时间(yyyy-MM-dd HH:mm:ss) | |
| 207 | | txsc | Double | 停线时长(分钟) | | 226 | | txsc | Double | 停线时长(分钟) | |
| 208 | -| txbkxx | String | 停线板块信息 | | 227 | +| txbkxx | String | 停线板块信息(板块id) | |
| 209 | | txflxx | String | 停线分类信息 | | 228 | | txflxx | String | 停线分类信息 | |
| 210 | | txms | String | 停线描述 | | 229 | | txms | String | 停线描述 | |
| 211 | -| qgxtbxz | String | 切换系统备选组 | | ||
| 212 | -| bsbqgxyy | String | 本班停线工艺原因 | | 230 | +| qgxtbxz | String | 前工序填报选择编号(#1#-是;#2#-否) | |
| 231 | +| qgxtbxzDesc | String | 前工序填报选择中文描述(计算字段) | | ||
| 232 | +| bsbqgxyy | String | 不申报前工序原因 | | ||
| 213 | | zrbkfzr | String | 责任板块负责人 | | 233 | | zrbkfzr | String | 责任板块负责人 | |
| 214 | | txwthf | String | 停线问题回复 | | 234 | | txwthf | String | 停线问题回复 | |
| 215 | | sbtzxx | String | 设备台账信息 | | 235 | | sbtzxx | String | 设备台账信息 | |
| 216 | | sbbm | String | 设备编码 | | 236 | | sbbm | String | 设备编码 | |
| 217 | | sbmc | String | 设备名称 | | 237 | | sbmc | String | 设备名称 | |
| 218 | -| sbgzlx | String | 设备故障类型 | | 238 | +| sbgzlx | String | 设备故障类型编号(#1#-机械故障;#2#-电气故障) | |
| 239 | +| sbgzlxDesc | String | 设备故障类型中文描述(计算字段) | | ||
| 219 | | sbgzsfcf | Boolean | 设备故障是否重复 | | 240 | | sbgzsfcf | Boolean | 设备故障是否重复 | |
| 220 | -| sbgzywbz | String | 设备故障业务板块 | | ||
| 221 | -| sbgzlxfj | String | 设备故障类型附件 | | 241 | +| sbgzywbz | String | 设备故障有无标准编号(#1#-有;#2#-无) | |
| 242 | +| sbgzywbzDesc | String | 设备故障有无标准中文描述(计算字段) | | ||
| 243 | +| sbgzlxfj | String | 设备故障类型分解编号(#1#-非设备原因;#2#-安装调整不良;#3#-松动;#4#-磨损;#5#-腐蚀;#6#-断裂;#7#-老化;#8#-误操作;#9#-设计不合理;#10#-参数设置不合理;#11#-部件质量不良;#12#-介质污染;#13#-5S不良;#14#-原因不明) | | ||
| 244 | +| sbgzlxfjDesc | String | 设备故障类型分解中文描述(计算字段) | | ||
| 222 | | sbgzyy | String | 设备故障原因 | | 245 | | sbgzyy | String | 设备故障原因 | |
| 223 | | sblscs | String | 设备临时措施 | | 246 | | sblscs | String | 设备临时措施 | |
| 224 | -| sbyjcs | String | 设备应急措施 | | 247 | +| sbyjcs | String | 设备永久措施 | |
| 225 | | sbghbj | String | 设备更换备件 | | 248 | | sbghbj | String | 设备更换备件 | |
| 226 | | tbry | String | 填报人员 | | 249 | | tbry | String | 填报人员 | |
| 227 | | tbrygh | String | 填报人员工号 | | 250 | | tbrygh | String | 填报人员工号 | |
| 228 | -| czry | String | 处置人员 | | ||
| 229 | -| czrygh | String | 处置人员工号 | | 251 | +| czry | String | 操作人员 | |
| 252 | +| czrygh | String | 操作人员工号 | | ||
| 230 | | ylwtclfa | String | 遗留问题处理方案 | | 253 | | ylwtclfa | String | 遗留问题处理方案 | |
| 254 | +| xtmc / xtbh | String | 线体名称/编号(本接口为 null,仅 [3.4](#34-查询停线记录明细列表按板块拆分) 填充) | | ||
| 255 | +| bcmc / bcbh | String | 班次名称/编号(同上) | | ||
| 256 | +| txqymc / txqybh | String | 停线区域名称/编号(同上) | | ||
| 257 | +| txbkmc / txbkbm | String | 停线板块名称/编码(同上) | | ||
| 258 | +| txgwmc / txgwbh | String | 停线工位名称/编号(同上) | | ||
| 259 | +| txbzmc / txbzbh | String | 停线班组名称/编号(同上) | | ||
| 231 | 260 | ||
| 232 | **响应示例:** | 261 | **响应示例:** |
| 233 | 262 | ||
| @@ -242,10 +271,16 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | @@ -242,10 +271,16 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | ||
| 242 | "bcxx": "BC001", | 271 | "bcxx": "BC001", |
| 243 | "txqyxx": "QY001", | 272 | "txqyxx": "QY001", |
| 244 | "txgwxx": "GW001", | 273 | "txgwxx": "GW001", |
| 274 | + "gwxz": "#1#", | ||
| 275 | + "gwxzDesc": "主线", | ||
| 245 | "startTime": "2026-09-01 08:30:00", | 276 | "startTime": "2026-09-01 08:30:00", |
| 246 | "endTime": "2026-09-01 09:00:00", | 277 | "endTime": "2026-09-01 09:00:00", |
| 247 | "txsc": 30.0, | 278 | "txsc": 30.0, |
| 248 | - "txbkxx": "BK001" | 279 | + "txbkxx": "BK001", |
| 280 | + "qgxtbxz": "#1#", | ||
| 281 | + "qgxtbxzDesc": "是", | ||
| 282 | + "sbgzlx": "#1#", | ||
| 283 | + "sbgzlxDesc": "机械故障" | ||
| 249 | } | 284 | } |
| 250 | ], | 285 | ], |
| 251 | "msg": "成功", | 286 | "msg": "成功", |
| @@ -255,13 +290,20 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | @@ -255,13 +290,20 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | ||
| 255 | 290 | ||
| 256 | --- | 291 | --- |
| 257 | 292 | ||
| 258 | -### 3.2 按月份汇总统计每天的停线时长 🆕新增 | 293 | +### 3.2 按天汇总统计停线时长(按板块拆分) ✏️更新 |
| 259 | 294 | ||
| 260 | -> 🆕 **新增接口**(2026-10-06 之后新建) | 295 | +> ✏️ **接口更新**:原 `GET /stopRecord/summary/daily`(板块 `txbkxx` 作为可选参数)已按板块拆分为 4 个专用端点,`txbkxx` 参数移除,改由端点区分板块;`year`/`month` 由必传改为可选,为空时默认当前年/当前月;响应新增 `bkbm`/`bkmc` 板块编码/名称字段("其他"板块为空)。 |
| 296 | + | ||
| 297 | +**接口路径(按板块 4 个端点):** | ||
| 261 | 298 | ||
| 262 | -**接口路径:** `GET /stopRecord/summary/daily` | 299 | +| 板块 | 端点 | 说明 | |
| 300 | +|------|------|------| | ||
| 301 | +| 物流(编码 W) | `GET /stopRecord/summary/daily/logistics` | 汇总物流板块的每日停线时长 | | ||
| 302 | +| 设备(编码 M) | `GET /stopRecord/summary/daily/equipment` | 汇总设备板块的每日停线时长 | | ||
| 303 | +| 质量(编码 Q) | `GET /stopRecord/summary/daily/quality` | 汇总质量板块的每日停线时长 | | ||
| 304 | +| 其他 | `GET /stopRecord/summary/daily/other` | 汇总非 W/M/Q 三大板块(含板块为空)的每日停线时长 | | ||
| 263 | 305 | ||
| 264 | -**接口说明:** 根据线体、班次、区域、板块条件筛选指定年月(1-12 月)范围内的停线记录,按天分组汇总每天的停线时长与记录数,结果按日期升序排列。 | 306 | +**接口说明:** 根据板块端点定位板块信息 Id,再按线体、班次、区域条件筛选停线记录,按天分组汇总每天的停线时长与记录数,结果按日期升序排列。`year`/`month` 为空时默认当前年/当前月。 |
| 265 | 307 | ||
| 266 | **请求参数:** | 308 | **请求参数:** |
| 267 | 309 | ||
| @@ -270,9 +312,8 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | @@ -270,9 +312,8 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | ||
| 270 | | xtxx | String | 否 | 线体信息(线体id),为空则不限定 | | 312 | | xtxx | String | 否 | 线体信息(线体id),为空则不限定 | |
| 271 | | bcxx | String | 否 | 班次信息(班次id),为空则不限定 | | 313 | | bcxx | String | 否 | 班次信息(班次id),为空则不限定 | |
| 272 | | txqyxx | String | 否 | 停线区域信息(区域id),为空则不限定 | | 314 | | txqyxx | String | 否 | 停线区域信息(区域id),为空则不限定 | |
| 273 | -| txbkxx | String | 否 | 停线板块信息(板块id),为空则不限定 | | ||
| 274 | -| year | String | 是 | 年份,如 2026 | | ||
| 275 | -| month | Integer | 是 | 月份(1-12) | | 315 | +| year | Integer | 否 | 年份(如 2026),为空默认当前年 | |
| 316 | +| month | Integer | 否 | 月份(1-12),为空默认当前月 | | ||
| 276 | 317 | ||
| 277 | **响应数据:** `List<StopRecordDailySummaryDTO>` | 318 | **响应数据:** `List<StopRecordDailySummaryDTO>` |
| 278 | 319 | ||
| @@ -283,8 +324,10 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | @@ -283,8 +324,10 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | ||
| 283 | | date | String | 日期(yyyy-MM-dd) | | 324 | | date | String | 日期(yyyy-MM-dd) | |
| 284 | | totalTxsc | Double | 当日停线时长总计(分钟),单条记录 txsc 为 null 时按 0 计 | | 325 | | totalTxsc | Double | 当日停线时长总计(分钟),单条记录 txsc 为 null 时按 0 计 | |
| 285 | | totalCount | Integer | 当日停线记录数 | | 326 | | totalCount | Integer | 当日停线记录数 | |
| 327 | +| bkbm | String | 板块编码("其他"板块端点为 null) | | ||
| 328 | +| bkmc | String | 板块名称("其他"板块端点为 null) | | ||
| 286 | 329 | ||
| 287 | -**响应示例:** | 330 | +**响应示例(物流板块 `GET /stopRecord/summary/daily/logistics`):** |
| 288 | 331 | ||
| 289 | ```json | 332 | ```json |
| 290 | { | 333 | { |
| @@ -293,12 +336,16 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | @@ -293,12 +336,16 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | ||
| 293 | { | 336 | { |
| 294 | "date": "2026-09-01", | 337 | "date": "2026-09-01", |
| 295 | "totalTxsc": 120.5, | 338 | "totalTxsc": 120.5, |
| 296 | - "totalCount": 3 | 339 | + "totalCount": 3, |
| 340 | + "bkbm": "W", | ||
| 341 | + "bkmc": "物流板块" | ||
| 297 | }, | 342 | }, |
| 298 | { | 343 | { |
| 299 | "date": "2026-09-02", | 344 | "date": "2026-09-02", |
| 300 | "totalTxsc": 60.0, | 345 | "totalTxsc": 60.0, |
| 301 | - "totalCount": 1 | 346 | + "totalCount": 1, |
| 347 | + "bkbm": "W", | ||
| 348 | + "bkmc": "物流板块" | ||
| 302 | } | 349 | } |
| 303 | ], | 350 | ], |
| 304 | "msg": "成功", | 351 | "msg": "成功", |
| @@ -308,13 +355,20 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | @@ -308,13 +355,20 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | ||
| 308 | 355 | ||
| 309 | --- | 356 | --- |
| 310 | 357 | ||
| 311 | -### 3.3 按工位汇总统计停线时长 🆕新增 | 358 | +### 3.3 按工位汇总统计停线时长(按板块拆分) ✏️更新 |
| 312 | 359 | ||
| 313 | -> 🆕 **新增接口**(2026-10-06 之后新建) | 360 | +> ✏️ **接口更新**:原 `GET /stopRecord/summary/workstation`(板块 `txbkxx` 作为可选参数)已按板块拆分为 4 个专用端点,`txbkxx` 参数移除;响应新增 `bkbm`/`bkmc` 板块编码/名称字段("其他"板块为空)。 |
| 314 | 361 | ||
| 315 | -**接口路径:** `GET /stopRecord/summary/workstation` | 362 | +**接口路径(按板块 4 个端点):** |
| 316 | 363 | ||
| 317 | -**接口说明:** 在 [3.2](#32-按月份汇总统计每天的停线时长) 相同的线体、班次、区域、板块条件基础上,加上指定日期,按工位汇总停线时长(关联停线工位信息补充工位名称与编号),汇总结果按停线时长降序排列。`date` 为空时不限定日期。**仅返回汇总结果,不含停线记录明细**(明细查询见 [3.4](#34-查询停线记录明细列表))。 | 364 | +| 板块 | 端点 | 说明 | |
| 365 | +|------|------|------| | ||
| 366 | +| 物流(编码 W) | `GET /stopRecord/summary/workstation/logistics` | 汇总物流板块的各工位停线时长 | | ||
| 367 | +| 设备(编码 M) | `GET /stopRecord/summary/workstation/equipment` | 汇总设备板块的各工位停线时长 | | ||
| 368 | +| 质量(编码 Q) | `GET /stopRecord/summary/workstation/quality` | 汇总质量板块的各工位停线时长 | | ||
| 369 | +| 其他 | `GET /stopRecord/summary/workstation/other` | 汇总非 W/M/Q 三大板块(含板块为空)的各工位停线时长 | | ||
| 370 | + | ||
| 371 | +**接口说明:** 在 [3.2](#32-按天汇总统计停线时长按板块拆分) 相同的线体、班次、区域条件基础上,加上指定日期,按工位汇总停线时长(关联停线工位信息补充工位名称与编号),汇总结果按停线时长降序排列。`date` 为空时不限定日期。**仅返回汇总结果,不含停线记录明细**(明细查询见 [3.4](#34-查询停线记录明细列表按板块拆分))。 | ||
| 318 | 372 | ||
| 319 | **请求参数:** | 373 | **请求参数:** |
| 320 | 374 | ||
| @@ -323,7 +377,6 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | @@ -323,7 +377,6 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | ||
| 323 | | xtxx | String | 否 | 线体信息(线体id),为空则不限定 | | 377 | | xtxx | String | 否 | 线体信息(线体id),为空则不限定 | |
| 324 | | bcxx | String | 否 | 班次信息(班次id),为空则不限定 | | 378 | | bcxx | String | 否 | 班次信息(班次id),为空则不限定 | |
| 325 | | txqyxx | String | 否 | 停线区域信息(区域id),为空则不限定 | | 379 | | txqyxx | String | 否 | 停线区域信息(区域id),为空则不限定 | |
| 326 | -| txbkxx | String | 否 | 停线板块信息(板块id),为空则不限定 | | ||
| 327 | | date | String | 否 | 指定日期,格式:yyyy-MM-dd,为空时不限定日期 | | 380 | | date | String | 否 | 指定日期,格式:yyyy-MM-dd,为空时不限定日期 | |
| 328 | 381 | ||
| 329 | **响应数据:** `List<StopRecordWorkstationSummaryDTO>` | 382 | **响应数据:** `List<StopRecordWorkstationSummaryDTO>` |
| @@ -337,8 +390,10 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | @@ -337,8 +390,10 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | ||
| 337 | | gwbh | String | 工位编号(关联停线工位信息) | | 390 | | gwbh | String | 工位编号(关联停线工位信息) | |
| 338 | | totalTxsc | Double | 该工位停线时长总计(分钟) | | 391 | | totalTxsc | Double | 该工位停线时长总计(分钟) | |
| 339 | | totalCount | Integer | 该工位停线记录数 | | 392 | | totalCount | Integer | 该工位停线记录数 | |
| 393 | +| bkbm | String | 板块编码("其他"板块端点为 null) | | ||
| 394 | +| bkmc | String | 板块名称("其他"板块端点为 null) | | ||
| 340 | 395 | ||
| 341 | -**响应示例:** | 396 | +**响应示例(物流板块 `GET /stopRecord/summary/workstation/logistics`):** |
| 342 | 397 | ||
| 343 | ```json | 398 | ```json |
| 344 | { | 399 | { |
| @@ -349,14 +404,18 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | @@ -349,14 +404,18 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | ||
| 349 | "gwmc": "焊接工位", | 404 | "gwmc": "焊接工位", |
| 350 | "gwbh": "01", | 405 | "gwbh": "01", |
| 351 | "totalTxsc": 90.0, | 406 | "totalTxsc": 90.0, |
| 352 | - "totalCount": 1 | 407 | + "totalCount": 1, |
| 408 | + "bkbm": "W", | ||
| 409 | + "bkmc": "物流板块" | ||
| 353 | }, | 410 | }, |
| 354 | { | 411 | { |
| 355 | "txgwxx": "GW002", | 412 | "txgwxx": "GW002", |
| 356 | "gwmc": "装配工位", | 413 | "gwmc": "装配工位", |
| 357 | "gwbh": "02", | 414 | "gwbh": "02", |
| 358 | "totalTxsc": 30.0, | 415 | "totalTxsc": 30.0, |
| 359 | - "totalCount": 1 | 416 | + "totalCount": 1, |
| 417 | + "bkbm": "W", | ||
| 418 | + "bkmc": "物流板块" | ||
| 360 | } | 419 | } |
| 361 | ], | 420 | ], |
| 362 | "msg": "成功", | 421 | "msg": "成功", |
| @@ -366,13 +425,20 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | @@ -366,13 +425,20 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | ||
| 366 | 425 | ||
| 367 | --- | 426 | --- |
| 368 | 427 | ||
| 369 | -### 3.4 查询停线记录明细列表 🆕新增 | 428 | +### 3.4 查询停线记录明细列表(按板块拆分) ✏️更新 |
| 370 | 429 | ||
| 371 | -> 🆕 **新增接口**(2026-10-06 之后新建) | 430 | +> ✏️ **接口更新**:原 `GET /stopRecord/list/detail`(板块 `txbkxx` 作为可选参数)已按板块拆分为 4 个专用端点,`txbkxx` 参数移除;响应在 StopRecord 基础上补充线体、班次、区域、板块、工位、班组共 12 个关联实体的名称与编号(Service 批量 `mapByIds` 填充,避免 N+1 查询)。 |
| 431 | + | ||
| 432 | +**接口路径(按板块 4 个端点):** | ||
| 372 | 433 | ||
| 373 | -**接口路径:** `GET /stopRecord/list/detail` | 434 | +| 板块 | 端点 | 说明 | |
| 435 | +|------|------|------| | ||
| 436 | +| 物流(编码 W) | `GET /stopRecord/list/detail/logistics` | 查询物流板块的停线记录明细 | | ||
| 437 | +| 设备(编码 M) | `GET /stopRecord/list/detail/equipment` | 查询设备板块的停线记录明细 | | ||
| 438 | +| 质量(编码 Q) | `GET /stopRecord/list/detail/quality` | 查询质量板块的停线记录明细 | | ||
| 439 | +| 其他 | `GET /stopRecord/list/detail/other` | 查询非 W/M/Q 三大板块(含板块为空)的停线记录明细 | | ||
| 374 | 440 | ||
| 375 | -**接口说明:** 根据线体、班次、区域、板块、工位条件及指定日期筛选停线记录,返回停线记录明细列表。所有参数均为可选,`date` 为空时不限定日期。 | 441 | +**接口说明:** 根据线体、班次、区域、工位条件及指定日期筛选停线记录,返回停线记录明细列表;每条记录除持久化字段与枚举中文描述外,还包含关联实体(线体、班次、区域、板块、工位、班组)的名称与编号。所有参数均为可选,`date` 为空时不限定日期。 |
| 376 | 442 | ||
| 377 | **请求参数:** | 443 | **请求参数:** |
| 378 | 444 | ||
| @@ -381,13 +447,29 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | @@ -381,13 +447,29 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | ||
| 381 | | xtxx | String | 否 | 线体信息(线体id),为空则不限定 | | 447 | | xtxx | String | 否 | 线体信息(线体id),为空则不限定 | |
| 382 | | bcxx | String | 否 | 班次信息(班次id),为空则不限定 | | 448 | | bcxx | String | 否 | 班次信息(班次id),为空则不限定 | |
| 383 | | txqyxx | String | 否 | 停线区域信息(区域id),为空则不限定 | | 449 | | txqyxx | String | 否 | 停线区域信息(区域id),为空则不限定 | |
| 384 | -| txbkxx | String | 否 | 停线板块信息(板块id),为空则不限定 | | ||
| 385 | | txgwxx | String | 否 | 停线工位信息(工位id),为空则不限定 | | 450 | | txgwxx | String | 否 | 停线工位信息(工位id),为空则不限定 | |
| 386 | | date | String | 否 | 指定日期,格式:yyyy-MM-dd,为空时不限定日期 | | 451 | | date | String | 否 | 指定日期,格式:yyyy-MM-dd,为空时不限定日期 | |
| 387 | 452 | ||
| 388 | -**响应数据:** `List<StopRecord>`(结构同 [3.1](#31-获取所有停线记录列表) 的 StopRecord) | 453 | +**响应数据:** `List<StopRecord>`(结构同 [3.1](#31-获取所有停线记录列表) 的 StopRecord,其中 12 个关联实体名称/编号字段在本接口中已填充) |
| 389 | 454 | ||
| 390 | -**响应示例:** | 455 | +**响应关联实体字段(本接口专属填充):** |
| 456 | + | ||
| 457 | +| 字段 | 类型 | 说明 | | ||
| 458 | +|------|------|------| | ||
| 459 | +| xtmc | String | 线体名称(关联 XtLine) | | ||
| 460 | +| xtbh | String | 线体编号(关联 XtLine) | | ||
| 461 | +| bcmc | String | 班次名称(关联 Shift) | | ||
| 462 | +| bcbh | String | 班次编号(关联 Shift) | | ||
| 463 | +| txqymc | String | 停线区域名称(关联 Area) | | ||
| 464 | +| txqybh | String | 停线区域编号(关联 Area) | | ||
| 465 | +| txbkmc | String | 停线板块名称(关联 BlockInfo) | | ||
| 466 | +| txbkbm | String | 停线板块编码(关联 BlockInfo) | | ||
| 467 | +| txgwmc | String | 停线工位名称(关联 StopWorkstation) | | ||
| 468 | +| txgwbh | String | 停线工位编号(关联 StopWorkstation) | | ||
| 469 | +| txbzmc | String | 停线班组名称(关联 Team) | | ||
| 470 | +| txbzbh | String | 停线班组编号(关联 Team) | | ||
| 471 | + | ||
| 472 | +**响应示例(物流板块 `GET /stopRecord/list/detail/logistics`):** | ||
| 391 | 473 | ||
| 392 | ```json | 474 | ```json |
| 393 | { | 475 | { |
| @@ -397,13 +479,30 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | @@ -397,13 +479,30 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | ||
| 397 | "id": "SR20260901001", | 479 | "id": "SR20260901001", |
| 398 | "corpCode": "hfca", | 480 | "corpCode": "hfca", |
| 399 | "xtxx": "XT001", | 481 | "xtxx": "XT001", |
| 482 | + "xtmc": "总装一线", | ||
| 483 | + "xtbh": "L01", | ||
| 400 | "bcxx": "BC001", | 484 | "bcxx": "BC001", |
| 485 | + "bcmc": "白班", | ||
| 486 | + "bcbh": "BC001", | ||
| 401 | "txqyxx": "QY001", | 487 | "txqyxx": "QY001", |
| 488 | + "txqymc": "装配区域", | ||
| 489 | + "txqybh": "QY001", | ||
| 490 | + "txbkxx": "BK_W", | ||
| 491 | + "txbkmc": "物流板块", | ||
| 492 | + "txbkbm": "W", | ||
| 402 | "txgwxx": "GW001", | 493 | "txgwxx": "GW001", |
| 494 | + "txgwmc": "焊接工位", | ||
| 495 | + "txgwbh": "01", | ||
| 496 | + "txbzxx": "TEAM001", | ||
| 497 | + "txbzmc": "装配一班", | ||
| 498 | + "txbzbh": "BZ001", | ||
| 499 | + "gwxz": "#1#", | ||
| 500 | + "gwxzDesc": "主线", | ||
| 403 | "startTime": "2026-09-01 08:30:00", | 501 | "startTime": "2026-09-01 08:30:00", |
| 404 | "endTime": "2026-09-01 10:00:00", | 502 | "endTime": "2026-09-01 10:00:00", |
| 405 | "txsc": 90.0, | 503 | "txsc": 90.0, |
| 406 | - "txbkxx": "BK001" | 504 | + "qgxtbxz": "#1#", |
| 505 | + "qgxtbxzDesc": "是" | ||
| 407 | } | 506 | } |
| 408 | ], | 507 | ], |
| 409 | "msg": "成功", | 508 | "msg": "成功", |
| @@ -443,6 +542,7 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | @@ -443,6 +542,7 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | ||
| 443 | | jhzfbz | String | 计划走访班组id | | 542 | | jhzfbz | String | 计划走访班组id | |
| 444 | | jhzfgw | String | 计划走访工位id | | 543 | | jhzfgw | String | 计划走访工位id | |
| 445 | | zt | String | 状态(#1#-待确认;#2#-未执行;#3#-已执行;#4#-已逾期) | | 544 | | zt | String | 状态(#1#-待确认;#2#-未执行;#3#-已执行;#4#-已逾期) | |
| 545 | +| ztDesc | String | 状态中文描述(计算字段) | | ||
| 446 | | sffxwt | Boolean | 是否发现问题 | | 546 | | sffxwt | Boolean | 是否发现问题 | |
| 447 | | bcxx | String | 班次信息 | | 547 | | bcxx | String | 班次信息 | |
| 448 | 548 | ||
| @@ -465,6 +565,7 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | @@ -465,6 +565,7 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | ||
| 465 | "jhzfbz": "team001", | 565 | "jhzfbz": "team001", |
| 466 | "jhzfgw": "ws001", | 566 | "jhzfgw": "ws001", |
| 467 | "zt": "#1#", | 567 | "zt": "#1#", |
| 568 | + "ztDesc": "待确认", | ||
| 468 | "sffxwt": false, | 569 | "sffxwt": false, |
| 469 | "bcxx": "BC001" | 570 | "bcxx": "BC001" |
| 470 | } | 571 | } |
| @@ -505,6 +606,7 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | @@ -505,6 +606,7 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | ||
| 505 | | szxx | String | 室组信息 | | 606 | | szxx | String | 室组信息 | |
| 506 | | qyxx | String | 区域信息 | | 607 | | qyxx | String | 区域信息 | |
| 507 | | zt | String | 状态(#1#-待确认;#2#-未执行;#3#-已执行;#4#-已逾期) | | 608 | | zt | String | 状态(#1#-待确认;#2#-未执行;#3#-已执行;#4#-已逾期) | |
| 609 | +| ztDesc | String | 状态中文描述(由 BeanUtils.copyProperties 自动拷贝) | | ||
| 508 | | sffxwt | Boolean | 是否发现问题 | | 610 | | sffxwt | Boolean | 是否发现问题 | |
| 509 | | bcxx | String | 班次信息 | | 611 | | bcxx | String | 班次信息 | |
| 510 | | jhzfbz | String | 计划走访班组id | | 612 | | jhzfbz | String | 计划走访班组id | |
| @@ -530,6 +632,7 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | @@ -530,6 +632,7 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | ||
| 530 | "szxx": "rg001", | 632 | "szxx": "rg001", |
| 531 | "qyxx": "area001", | 633 | "qyxx": "area001", |
| 532 | "zt": "#1#", | 634 | "zt": "#1#", |
| 635 | + "ztDesc": "待确认", | ||
| 533 | "sffxwt": false, | 636 | "sffxwt": false, |
| 534 | "bcxx": "BC001", | 637 | "bcxx": "BC001", |
| 535 | "jhzfbz": "team001", | 638 | "jhzfbz": "team001", |
| @@ -805,3 +908,485 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | @@ -805,3 +908,485 @@ uat3 环境: https://uat3.qgutech.com/fkyycustom | ||
| 805 | "errCode": null | 908 | "errCode": null |
| 806 | } | 909 | } |
| 807 | ``` | 910 | ``` |
| 911 | + | ||
| 912 | +--- | ||
| 913 | + | ||
| 914 | +## 7. 质量缺陷接口 | ||
| 915 | + | ||
| 916 | +### 7.1 获取所有质量缺陷信息列表 🆕新增 | ||
| 917 | + | ||
| 918 | +> 🆕 **新增接口**(2026-10-06 之后新建) | ||
| 919 | + | ||
| 920 | +**接口路径:** `GET /qualityDefect/list/all` | ||
| 921 | + | ||
| 922 | +**接口说明:** 获取当前企业下所有质量缺陷信息列表。响应中除持久化字段外,还包含 5 个枚举字段中文描述(`sjsxDesc`/`wttcdwDesc`/`wtsxDesc`/`pcwtyyDesc`/`kzahntDesc`,计算型 getter,所有返回该实体的接口均自动生效),以及由 Service 批量 `mapByIds` 填充的关联实体名称/编号(停线工位、班次、区域)与人员姓名(责任人员、创建人、更新人)。 | ||
| 923 | + | ||
| 924 | +**请求参数:** 无 | ||
| 925 | + | ||
| 926 | +**响应数据:** `List<QualityDefect>` | ||
| 927 | + | ||
| 928 | +**响应字段说明:** | ||
| 929 | + | ||
| 930 | +| 字段 | 类型 | 说明 | | ||
| 931 | +|------|------|------| | ||
| 932 | +| id | String | 记录ID | | ||
| 933 | +| corpCode | String | 企业编码 | | ||
| 934 | +| createdAt | String | 创建时间(yyyy-MM-dd HH:mm:ss) | | ||
| 935 | +| createdBy | String | 创建人ID(组织用户) | | ||
| 936 | +| createdByName | String | 创建人姓名(关联组织用户,Service 填充) | | ||
| 937 | +| updatedAt | String | 更新时间(yyyy-MM-dd HH:mm:ss) | | ||
| 938 | +| updatedBy | String | 更新人ID(组织用户) | | ||
| 939 | +| updatedByName | String | 更新人姓名(关联组织用户,Service 填充) | | ||
| 940 | +| sjsx | String | 事件属性编号(#0#-内部;#1#-外部) | | ||
| 941 | +| sjsxDesc | String | 事件属性中文描述(计算字段) | | ||
| 942 | +| tcrq | String | 提出日期(yyyy-MM-dd HH:mm:ss) | | ||
| 943 | +| kzahnt | String | 车型编号(#1#-C928;#2#-S311) | | ||
| 944 | +| kzahntDesc | String | 车型中文描述(计算字段) | | ||
| 945 | +| vin | String | VIN码 | | ||
| 946 | +| wtbw | String | 问题部位 | | ||
| 947 | +| wtms | String | 问题描述 | | ||
| 948 | +| wtgwxx | String | 问题工位信息(停线工位id) | | ||
| 949 | +| gwmc | String | 问题工位名称(关联停线工位,Service 填充) | | ||
| 950 | +| gwbh | String | 问题工位编号(关联停线工位,Service 填充) | | ||
| 951 | +| ydcfcs | Double | 月度重复次数 | | ||
| 952 | +| wtImg | String | 问题图片 | | ||
| 953 | +| wttcdw | String | 问题提出单位编号(#1#-检验区;#2#-出厂) | | ||
| 954 | +| wttcdwDesc | String | 问题提出单位中文描述(计算字段) | | ||
| 955 | +| wtsx | String | 问题属性编号(#1#-装配不良;#2#-钣金碰划伤;#3#-装配异常;#4#-零部件;#5#-错漏装;#6#-日异物;#7#-异物;#8#-无) | | ||
| 956 | +| wtsxDesc | String | 问题属性中文描述(计算字段) | | ||
| 957 | +| wtbcxx | String | 问题班次信息(班次id) | | ||
| 958 | +| bcmc | String | 问题班次名称(关联班次,Service 填充) | | ||
| 959 | +| bcbh | String | 问题班次编号(关联班次,Service 填充) | | ||
| 960 | +| tzsj | String | 通知时间(yyyy-MM-dd HH:mm:ss) | | ||
| 961 | +| tzry | String | 通知人员 | | ||
| 962 | +| zrqyxx | String | 责任区域信息(区域id) | | ||
| 963 | +| qymc | String | 责任区域名称(关联区域,Service 填充) | | ||
| 964 | +| qybh | String | 责任区域编号(关联区域,Service 填充) | | ||
| 965 | +| zrqz | String | 责任区长 | | ||
| 966 | +| zrry | String | 责任人员ID(组织用户) | | ||
| 967 | +| zrryName | String | 责任人员姓名(关联组织用户,Service 填充) | | ||
| 968 | +| sfpc | Boolean | 是否排出 | | ||
| 969 | +| pcwtyy | String | 排出问题原因编号(#1#-40分问题;#2#-80分问题;#3#-300分问题) | | ||
| 970 | +| pcwtyyDesc | String | 排出问题原因中文描述(计算字段) | | ||
| 971 | +| pcts | String | 排查台数 | | ||
| 972 | +| sfnrqygk | Boolean | 是否纳入区域管理看板 | | ||
| 973 | +| ygh | String | 员工号 | | ||
| 974 | +| wtjzch | String | 问题基准车号 | | ||
| 975 | +| fsyy | String | 发生原因 | | ||
| 976 | +| gkcs | String | 管控措施 | | ||
| 977 | + | ||
| 978 | +**响应示例:** | ||
| 979 | + | ||
| 980 | +```json | ||
| 981 | +{ | ||
| 982 | + "success": true, | ||
| 983 | + "data": [ | ||
| 984 | + { | ||
| 985 | + "id": "QD20260901001", | ||
| 986 | + "corpCode": "hfca", | ||
| 987 | + "createdAt": "2026-09-01 08:00:00", | ||
| 988 | + "createdBy": "user001", | ||
| 989 | + "createdByName": "张三", | ||
| 990 | + "updatedBy": "user002", | ||
| 991 | + "updatedByName": "李四", | ||
| 992 | + "sjsx": "#0#", | ||
| 993 | + "sjsxDesc": "0-对应内部", | ||
| 994 | + "tcrq": "2026-09-01 00:00:00", | ||
| 995 | + "kzahnt": "#1#", | ||
| 996 | + "kzahntDesc": "C928", | ||
| 997 | + "vin": "LSVAA1234567890", | ||
| 998 | + "wtbw": "前保险杠", | ||
| 999 | + "wtms": "保险杠表面划伤", | ||
| 1000 | + "wtgwxx": "GW001", | ||
| 1001 | + "gwmc": "焊接工位", | ||
| 1002 | + "gwbh": "01", | ||
| 1003 | + "ydcfcs": 2.0, | ||
| 1004 | + "wttcdw": "#1#", | ||
| 1005 | + "wttcdwDesc": "检验区", | ||
| 1006 | + "wtsx": "#2#", | ||
| 1007 | + "wtsxDesc": "钣金碰划伤", | ||
| 1008 | + "wtbcxx": "BC001", | ||
| 1009 | + "bcmc": "白班", | ||
| 1010 | + "bcbh": "BC001", | ||
| 1011 | + "zrqyxx": "QY001", | ||
| 1012 | + "qymc": "装配区域", | ||
| 1013 | + "qybh": "QY001", | ||
| 1014 | + "zrry": "user003", | ||
| 1015 | + "zrryName": "王五", | ||
| 1016 | + "sfpc": true, | ||
| 1017 | + "pcwtyy": "#1#", | ||
| 1018 | + "pcwtyyDesc": "40分问题", | ||
| 1019 | + "pcts": "10", | ||
| 1020 | + "sfnrqygk": true | ||
| 1021 | + } | ||
| 1022 | + ], | ||
| 1023 | + "msg": "成功", | ||
| 1024 | + "errCode": null | ||
| 1025 | +} | ||
| 1026 | +``` | ||
| 1027 | + | ||
| 1028 | +--- | ||
| 1029 | + | ||
| 1030 | +### 7.2 按月份查询每日质量缺陷记录汇总数目 🆕新增 | ||
| 1031 | + | ||
| 1032 | +> 🆕 **新增接口**(2026-10-06 之后新建) | ||
| 1033 | + | ||
| 1034 | +**接口路径:** `GET /qualityDefect/summary/daily` | ||
| 1035 | + | ||
| 1036 | +**接口说明:** 按责任区域、年月统计每日质量缺陷记录数(按提出日期 `tcrq` 分组),结果按日期升序排列。`year`/`month` 为空时默认当前年/当前月;`zrqyxx` 为空时不限定区域。 | ||
| 1037 | + | ||
| 1038 | +**请求参数:** | ||
| 1039 | + | ||
| 1040 | +| 参数名 | 类型 | 必传 | 说明 | | ||
| 1041 | +|--------|------|------|------| | ||
| 1042 | +| zrqyxx | String | 否 | 责任区域信息(区域id),为空则不限定 | | ||
| 1043 | +| year | Integer | 否 | 年份(如 2026),为空默认当前年 | | ||
| 1044 | +| month | Integer | 否 | 月份(1-12),为空默认当前月 | | ||
| 1045 | + | ||
| 1046 | +**响应数据:** `List<QualityDefectDailySummaryDTO>` | ||
| 1047 | + | ||
| 1048 | +**响应字段说明:** | ||
| 1049 | + | ||
| 1050 | +| 字段 | 类型 | 说明 | | ||
| 1051 | +|------|------|------| | ||
| 1052 | +| date | String | 日期(yyyy-MM-dd) | | ||
| 1053 | +| count | Integer | 当日缺陷记录数 | | ||
| 1054 | + | ||
| 1055 | +**响应示例:** | ||
| 1056 | + | ||
| 1057 | +```json | ||
| 1058 | +{ | ||
| 1059 | + "success": true, | ||
| 1060 | + "data": [ | ||
| 1061 | + { | ||
| 1062 | + "date": "2026-09-01", | ||
| 1063 | + "count": 3 | ||
| 1064 | + }, | ||
| 1065 | + { | ||
| 1066 | + "date": "2026-09-02", | ||
| 1067 | + "count": 1 | ||
| 1068 | + } | ||
| 1069 | + ], | ||
| 1070 | + "msg": "成功", | ||
| 1071 | + "errCode": null | ||
| 1072 | +} | ||
| 1073 | +``` | ||
| 1074 | + | ||
| 1075 | +--- | ||
| 1076 | + | ||
| 1077 | +### 7.3 按指定日期和区域汇总各工位缺陷次数 🆕新增 | ||
| 1078 | + | ||
| 1079 | +> 🆕 **新增接口**(2026-10-06 之后新建) | ||
| 1080 | + | ||
| 1081 | +**接口路径:** `GET /qualityDefect/summary/workstation` | ||
| 1082 | + | ||
| 1083 | +**接口说明:** 按指定日期、责任区域汇总各停线工位的缺陷记录数与月度重复次数合计(关联停线工位信息补充工位名称、编号与性质),结果按缺陷次数降序排列。`date` 为必填;`zrqyxx` 为空时不限定区域。**仅返回汇总结果,不含缺陷明细**(明细查询见 [7.4](#74-按指定日期区域工位查询质量缺陷明细列表))。 | ||
| 1084 | + | ||
| 1085 | +**请求参数:** | ||
| 1086 | + | ||
| 1087 | +| 参数名 | 类型 | 必传 | 说明 | | ||
| 1088 | +|--------|------|------|------| | ||
| 1089 | +| zrqyxx | String | 否 | 责任区域信息(区域id),为空则不限定 | | ||
| 1090 | +| date | String | 是 | 指定日期,格式:yyyy-MM-dd | | ||
| 1091 | + | ||
| 1092 | +**响应数据:** `List<QualityDefectWorkstationSummaryDTO>` | ||
| 1093 | + | ||
| 1094 | +**响应字段说明:** | ||
| 1095 | + | ||
| 1096 | +| 字段 | 类型 | 说明 | | ||
| 1097 | +|------|------|------| | ||
| 1098 | +| wtgwxx | String | 停线工位信息ID | | ||
| 1099 | +| gwmc | String | 工位名称(关联停线工位信息) | | ||
| 1100 | +| gwbh | String | 工位编号(关联停线工位信息) | | ||
| 1101 | +| gwxz | String | 工位性质编号(#1#-主线;#2#-辅线) | | ||
| 1102 | +| gwxzDesc | String | 工位性质中文描述(由 StopGwxzEnum 解析) | | ||
| 1103 | +| count | Integer | 该工位缺陷记录数 | | ||
| 1104 | +| totalYdcfcs | Double | 该工位缺陷次数合计(ydcfcs 求和) | | ||
| 1105 | + | ||
| 1106 | +**响应示例:** | ||
| 1107 | + | ||
| 1108 | +```json | ||
| 1109 | +{ | ||
| 1110 | + "success": true, | ||
| 1111 | + "data": [ | ||
| 1112 | + { | ||
| 1113 | + "wtgwxx": "GW001", | ||
| 1114 | + "gwmc": "焊接工位", | ||
| 1115 | + "gwbh": "01", | ||
| 1116 | + "gwxz": "#1#", | ||
| 1117 | + "gwxzDesc": "主线", | ||
| 1118 | + "count": 3, | ||
| 1119 | + "totalYdcfcs": 5.0 | ||
| 1120 | + }, | ||
| 1121 | + { | ||
| 1122 | + "wtgwxx": "GW002", | ||
| 1123 | + "gwmc": "装配工位", | ||
| 1124 | + "gwbh": "02", | ||
| 1125 | + "gwxz": "#2#", | ||
| 1126 | + "gwxzDesc": "辅线", | ||
| 1127 | + "count": 1, | ||
| 1128 | + "totalYdcfcs": 1.0 | ||
| 1129 | + } | ||
| 1130 | + ], | ||
| 1131 | + "msg": "成功", | ||
| 1132 | + "errCode": null | ||
| 1133 | +} | ||
| 1134 | +``` | ||
| 1135 | + | ||
| 1136 | +--- | ||
| 1137 | + | ||
| 1138 | +### 7.4 按指定日期、区域、工位查询质量缺陷明细列表 🆕新增 | ||
| 1139 | + | ||
| 1140 | +> 🆕 **新增接口**(2026-10-06 之后新建) | ||
| 1141 | + | ||
| 1142 | +**接口路径:** `GET /qualityDefect/list/detail` | ||
| 1143 | + | ||
| 1144 | +**接口说明:** 按指定日期、责任区域、问题工位筛选质量缺陷记录,返回明细列表;每条记录除持久化字段与枚举中文描述外,还包含关联实体(停线工位、班次、区域)的名称与编号,以及责任人员、创建人、更新人姓名(Service 批量填充)。`date` 为必填;`zrqyxx`/`wtgwxx` 为空时不限定。 | ||
| 1145 | + | ||
| 1146 | +**请求参数:** | ||
| 1147 | + | ||
| 1148 | +| 参数名 | 类型 | 必传 | 说明 | | ||
| 1149 | +|--------|------|------|------| | ||
| 1150 | +| zrqyxx | String | 否 | 责任区域信息(区域id),为空则不限定 | | ||
| 1151 | +| date | String | 是 | 指定日期,格式:yyyy-MM-dd | | ||
| 1152 | +| wtgwxx | String | 否 | 问题工位信息(停线工位id),为空则不限定 | | ||
| 1153 | + | ||
| 1154 | +**响应数据:** `List<QualityDefect>`(结构同 [7.1](#71-获取所有质量缺陷信息列表) 的 QualityDefect,关联实体名称/编号与人员姓名字段在本接口中已填充) | ||
| 1155 | + | ||
| 1156 | +**响应示例:** | ||
| 1157 | + | ||
| 1158 | +```json | ||
| 1159 | +{ | ||
| 1160 | + "success": true, | ||
| 1161 | + "data": [ | ||
| 1162 | + { | ||
| 1163 | + "id": "QD20260901001", | ||
| 1164 | + "corpCode": "hfca", | ||
| 1165 | + "sjsx": "#0#", | ||
| 1166 | + "sjsxDesc": "0-对应内部", | ||
| 1167 | + "tcrq": "2026-09-01 00:00:00", | ||
| 1168 | + "kzahnt": "#1#", | ||
| 1169 | + "kzahntDesc": "C928", | ||
| 1170 | + "wtgwxx": "GW001", | ||
| 1171 | + "gwmc": "焊接工位", | ||
| 1172 | + "gwbh": "01", | ||
| 1173 | + "wttcdw": "#1#", | ||
| 1174 | + "wttcdwDesc": "检验区", | ||
| 1175 | + "wtsx": "#2#", | ||
| 1176 | + "wtsxDesc": "钣金碰划伤", | ||
| 1177 | + "wtbcxx": "BC001", | ||
| 1178 | + "bcmc": "白班", | ||
| 1179 | + "bcbh": "BC001", | ||
| 1180 | + "zrqyxx": "QY001", | ||
| 1181 | + "qymc": "装配区域", | ||
| 1182 | + "qybh": "QY001", | ||
| 1183 | + "zrry": "user003", | ||
| 1184 | + "zrryName": "王五", | ||
| 1185 | + "createdBy": "user001", | ||
| 1186 | + "createdByName": "张三", | ||
| 1187 | + "updatedBy": "user002", | ||
| 1188 | + "updatedByName": "李四" | ||
| 1189 | + } | ||
| 1190 | + ], | ||
| 1191 | + "msg": "成功", | ||
| 1192 | + "errCode": null | ||
| 1193 | +} | ||
| 1194 | +``` | ||
| 1195 | + | ||
| 1196 | +--- | ||
| 1197 | + | ||
| 1198 | +## 8. 车间级工作任务接口 | ||
| 1199 | + | ||
| 1200 | +### 8.1 获取所有车间级工作任务列表 🆕新增 | ||
| 1201 | + | ||
| 1202 | +> 🆕 **新增接口**(2026-10-06 之后新建) | ||
| 1203 | + | ||
| 1204 | +**接口路径:** `GET /workshopWorkTask/list/all` | ||
| 1205 | + | ||
| 1206 | +**接口说明:** 获取当前企业下所有车间级工作任务列表。响应中除持久化字段外,还包含任务状态中文描述(`rwztDesc`,计算型 getter),以及由 Service 批量 `mapByIds` 填充的关联实体名称(所属工作计划、区域)与人员姓名(任务负责人、计划负责人、创建人、更新人)。 | ||
| 1207 | + | ||
| 1208 | +**请求参数:** 无 | ||
| 1209 | + | ||
| 1210 | +**响应数据:** `List<WorkshopWorkTask>` | ||
| 1211 | + | ||
| 1212 | +**响应字段说明:** | ||
| 1213 | + | ||
| 1214 | +| 字段 | 类型 | 说明 | | ||
| 1215 | +|------|------|------| | ||
| 1216 | +| id | String | 记录ID | | ||
| 1217 | +| corpCode | String | 企业编码 | | ||
| 1218 | +| createdAt | String | 创建时间(yyyy-MM-dd HH:mm:ss) | | ||
| 1219 | +| createdBy | String | 创建人ID(组织用户) | | ||
| 1220 | +| createdByName | String | 创建人姓名(关联组织用户,Service 填充) | | ||
| 1221 | +| updatedAt | String | 更新时间(yyyy-MM-dd HH:mm:ss) | | ||
| 1222 | +| updatedBy | String | 更新人ID(组织用户) | | ||
| 1223 | +| updatedByName | String | 更新人姓名(关联组织用户,Service 填充) | | ||
| 1224 | +| rwxh | String | 任务序号 | | ||
| 1225 | +| rwmc | String | 任务名称 | | ||
| 1226 | +| ssgzjh | String | 所属工作计划(工作计划id) | | ||
| 1227 | +| ssgzjhMc | String | 所属工作计划名称(关联工作计划,Service 填充) | | ||
| 1228 | +| rwfzr | String | 任务负责人ID(组织用户) | | ||
| 1229 | +| rwfzrName | String | 任务负责人姓名(关联组织用户,Service 填充) | | ||
| 1230 | +| endDate | String | 结束日期(yyyy-MM-dd HH:mm:ss) | | ||
| 1231 | +| rwzt | String | 任务状态编号(#1#-进行中;#2#-已完成;#3#-已逾期) | | ||
| 1232 | +| rwztDesc | String | 任务状态中文描述(计算字段) | | ||
| 1233 | +| gzjhxh | String | 工作计划序号 | | ||
| 1234 | +| jhfzr | String | 计划负责人ID(组织用户) | | ||
| 1235 | +| jhfzrName | String | 计划负责人姓名(关联组织用户,Service 填充) | | ||
| 1236 | +| qyxx | String | 区域信息(区域id) | | ||
| 1237 | +| qymc | String | 区域名称(关联区域,Service 填充) | | ||
| 1238 | +| qybh | String | 区域编号(关联区域,Service 填充) | | ||
| 1239 | +| xh | String | 序号 | | ||
| 1240 | +| rwmb | String | 任务目标 | | ||
| 1241 | +| wcqk | String | 完成情况 | | ||
| 1242 | +| wcqkfj | String | 完成情况附件 | | ||
| 1243 | +| remark | String | 备注 | | ||
| 1244 | + | ||
| 1245 | +**响应示例:** | ||
| 1246 | + | ||
| 1247 | +```json | ||
| 1248 | +{ | ||
| 1249 | + "success": true, | ||
| 1250 | + "data": [ | ||
| 1251 | + { | ||
| 1252 | + "id": "WT20260901001", | ||
| 1253 | + "corpCode": "hfca", | ||
| 1254 | + "createdAt": "2026-09-01 08:00:00", | ||
| 1255 | + "createdBy": "user001", | ||
| 1256 | + "createdByName": "张三", | ||
| 1257 | + "updatedBy": "user002", | ||
| 1258 | + "updatedByName": "李四", | ||
| 1259 | + "rwxh": "1", | ||
| 1260 | + "rwmc": "装配线巡检", | ||
| 1261 | + "ssgzjh": "PLAN001", | ||
| 1262 | + "ssgzjhMc": "9月总装工作计划", | ||
| 1263 | + "rwfzr": "user003", | ||
| 1264 | + "rwfzrName": "王五", | ||
| 1265 | + "endDate": "2026-09-30 18:00:00", | ||
| 1266 | + "rwzt": "#1#", | ||
| 1267 | + "rwztDesc": "进行中", | ||
| 1268 | + "gzjhxh": "JH001", | ||
| 1269 | + "jhfzr": "user004", | ||
| 1270 | + "jhfzrName": "赵六", | ||
| 1271 | + "qyxx": "QY001", | ||
| 1272 | + "qymc": "装配区域", | ||
| 1273 | + "qybh": "QY001", | ||
| 1274 | + "xh": "1", | ||
| 1275 | + "rwmb": "完成装配线每日巡检", | ||
| 1276 | + "wcqk": "已完成 80%", | ||
| 1277 | + "remark": "正常推进" | ||
| 1278 | + } | ||
| 1279 | + ], | ||
| 1280 | + "msg": "成功", | ||
| 1281 | + "errCode": null | ||
| 1282 | +} | ||
| 1283 | +``` | ||
| 1284 | + | ||
| 1285 | +--- | ||
| 1286 | + | ||
| 1287 | +### 8.2 根据区域、年份、月份查询工作任务明细列表 🆕新增 | ||
| 1288 | + | ||
| 1289 | +> 🆕 **新增接口**(2026-10-06 之后新建) | ||
| 1290 | + | ||
| 1291 | +**接口路径:** `GET /workshopWorkTask/list/detail` | ||
| 1292 | + | ||
| 1293 | +**接口说明:** 按区域、年月筛选工作任务明细(按创建时间 `createdAt` 在该年月范围内过滤),返回明细列表;每条记录除持久化字段与任务状态中文描述外,还包含关联实体(工作计划、区域)名称与人员姓名(Service 批量填充)。`year`/`month` 为空时默认当前年/当前月;`qyxx` 为空时不限定区域。 | ||
| 1294 | + | ||
| 1295 | +**请求参数:** | ||
| 1296 | + | ||
| 1297 | +| 参数名 | 类型 | 必传 | 说明 | | ||
| 1298 | +|--------|------|------|------| | ||
| 1299 | +| qyxx | String | 否 | 区域信息(区域id),为空则不限定 | | ||
| 1300 | +| year | Integer | 否 | 年份(如 2026),为空默认当前年 | | ||
| 1301 | +| month | Integer | 否 | 月份(1-12),为空默认当前月;按创建时间范围过滤 | | ||
| 1302 | + | ||
| 1303 | +**响应数据:** `List<WorkshopWorkTask>`(结构同 [8.1](#81-获取所有车间级工作任务列表) 的 WorkshopWorkTask,关联实体名称与人员姓名字段在本接口中已填充) | ||
| 1304 | + | ||
| 1305 | +**响应示例:** | ||
| 1306 | + | ||
| 1307 | +```json | ||
| 1308 | +{ | ||
| 1309 | + "success": true, | ||
| 1310 | + "data": [ | ||
| 1311 | + { | ||
| 1312 | + "id": "WT20260901001", | ||
| 1313 | + "corpCode": "hfca", | ||
| 1314 | + "rwxh": "1", | ||
| 1315 | + "rwmc": "装配线巡检", | ||
| 1316 | + "ssgzjh": "PLAN001", | ||
| 1317 | + "ssgzjhMc": "9月总装工作计划", | ||
| 1318 | + "rwfzr": "user003", | ||
| 1319 | + "rwfzrName": "王五", | ||
| 1320 | + "jhfzr": "user004", | ||
| 1321 | + "jhfzrName": "赵六", | ||
| 1322 | + "endDate": "2026-09-30 18:00:00", | ||
| 1323 | + "rwzt": "#1#", | ||
| 1324 | + "rwztDesc": "进行中", | ||
| 1325 | + "qyxx": "QY001", | ||
| 1326 | + "qymc": "装配区域", | ||
| 1327 | + "qybh": "QY001", | ||
| 1328 | + "createdBy": "user001", | ||
| 1329 | + "createdByName": "张三", | ||
| 1330 | + "updatedBy": "user002", | ||
| 1331 | + "updatedByName": "李四" | ||
| 1332 | + } | ||
| 1333 | + ], | ||
| 1334 | + "msg": "成功", | ||
| 1335 | + "errCode": null | ||
| 1336 | +} | ||
| 1337 | +``` | ||
| 1338 | + | ||
| 1339 | +--- | ||
| 1340 | + | ||
| 1341 | +### 8.3 按任务状态汇总各状态记录条数 🆕新增 | ||
| 1342 | + | ||
| 1343 | +> 🆕 **新增接口**(2026-10-06 之后新建) | ||
| 1344 | + | ||
| 1345 | +**接口路径:** `GET /workshopWorkTask/summary/status` | ||
| 1346 | + | ||
| 1347 | +**接口说明:** 按区域、年月(按创建时间过滤)统计各任务状态下的记录条数,含状态中文描述。`year`/`month` 为空时默认当前年/当前月;`qyxx` 为空时不限定区域。本接口仅返回状态汇总,不含关联实体名称填充。 | ||
| 1348 | + | ||
| 1349 | +**请求参数:** | ||
| 1350 | + | ||
| 1351 | +| 参数名 | 类型 | 必传 | 说明 | | ||
| 1352 | +|--------|------|------|------| | ||
| 1353 | +| qyxx | String | 否 | 区域信息(区域id),为空则不限定 | | ||
| 1354 | +| year | Integer | 否 | 年份(如 2026),为空默认当前年 | | ||
| 1355 | +| month | Integer | 否 | 月份(1-12),为空默认当前月;按创建时间范围过滤 | | ||
| 1356 | + | ||
| 1357 | +**响应数据:** `List<WorkshopWorkTaskStatusSummaryDTO>` | ||
| 1358 | + | ||
| 1359 | +**响应字段说明:** | ||
| 1360 | + | ||
| 1361 | +| 字段 | 类型 | 说明 | | ||
| 1362 | +|------|------|------| | ||
| 1363 | +| rwzt | String | 任务状态编号(#1#-进行中;#2#-已完成;#3#-已逾期;无状态时为“未知”) | | ||
| 1364 | +| rwztDesc | String | 任务状态中文描述(由 RwztEnum 解析) | | ||
| 1365 | +| count | Integer | 该状态下的任务数量 | | ||
| 1366 | + | ||
| 1367 | +**响应示例:** | ||
| 1368 | + | ||
| 1369 | +```json | ||
| 1370 | +{ | ||
| 1371 | + "success": true, | ||
| 1372 | + "data": [ | ||
| 1373 | + { | ||
| 1374 | + "rwzt": "#1#", | ||
| 1375 | + "rwztDesc": "进行中", | ||
| 1376 | + "count": 5 | ||
| 1377 | + }, | ||
| 1378 | + { | ||
| 1379 | + "rwzt": "#2#", | ||
| 1380 | + "rwztDesc": "已完成", | ||
| 1381 | + "count": 3 | ||
| 1382 | + }, | ||
| 1383 | + { | ||
| 1384 | + "rwzt": "#3#", | ||
| 1385 | + "rwztDesc": "已逾期", | ||
| 1386 | + "count": 1 | ||
| 1387 | + } | ||
| 1388 | + ], | ||
| 1389 | + "msg": "成功", | ||
| 1390 | + "errCode": null | ||
| 1391 | +} | ||
| 1392 | +``` |