songhuangfeng123
2022-09-15 1341b18605bcb800eba683eda18640520a6508a5
事故数据字典fix
已修改22个文件
已添加5个文件
553 ■■■■ 文件已修改
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentExpressInfo.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentExpressInfoDetailDO.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentExpressInfoPageDO.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentReportInfo.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentReportInfoDetailDO.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentReportInfoPageDO.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/WorkInjuryDeclarationInfo.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/WorkInjuryDeclarationInfoDetailDO.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/WorkInjuryDeclarationInfoPageDO.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/enums/AccidentExpressEnum.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/enums/AccidentReportGradeEnum.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/enums/AccidentReportLevelEnum.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/enums/AccidentReportTypeEnum.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/enums/AccidentResultCodes.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/enums/WorkInjuryTypeEnum.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/req/AccidentExpressReqDTO.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/req/AccidentReportReqDTO.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/req/WorkInjuryDeclarationReqDTO.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/resp/AccidentExpressDetailRespDTO.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/resp/AccidentExpressPageRespDTO.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/resp/AccidentReportDetailRespDTO.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/resp/AccidentReportPageRespDTO.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/resp/WorkInjuryDeclarationDetailRespDTO.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/resp/WorkInjuryDeclarationPageRespDTO.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentExpressServiceImpl.java 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentReportServiceImpl.java 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/WorkInjuryDeclarationServiceImpl.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentExpressInfo.java
@@ -40,7 +40,7 @@
    private Boolean casualties;
    private String accidentCause;
    private Byte accidentCause;
    private Date occurrenceTime;
@@ -130,11 +130,11 @@
        this.casualties = casualties;
    }
    public String getAccidentCause() {
    public Byte getAccidentCause() {
        return accidentCause;
    }
    public void setAccidentCause(String accidentCause) {
    public void setAccidentCause(Byte accidentCause) {
        this.accidentCause = accidentCause;
    }
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentExpressInfoDetailDO.java
@@ -21,7 +21,7 @@
    private Boolean casualties;
    private String accidentCause;
    private Byte accidentCause;
    private Date occurrenceTime;
@@ -74,11 +74,11 @@
        this.casualties = casualties;
    }
    public String getAccidentCause() {
    public Byte getAccidentCause() {
        return accidentCause;
    }
    public void setAccidentCause(String accidentCause) {
    public void setAccidentCause(Byte accidentCause) {
        this.accidentCause = accidentCause;
    }
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentExpressInfoPageDO.java
@@ -26,7 +26,7 @@
    private Long createUid;
    private String accidentCause;
    private Byte accidentCause;
    private Date occurrenceTime;
@@ -61,11 +61,11 @@
    }
    public String getAccidentCause() {
    public Byte getAccidentCause() {
        return accidentCause;
    }
    public void setAccidentCause(String accidentCause) {
    public void setAccidentCause(Byte accidentCause) {
        this.accidentCause = accidentCause;
    }
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentReportInfo.java
@@ -45,9 +45,9 @@
    private Long accidentExpressId;
    private String accidentType;
    private Byte accidentType;
    private String accidentGrade;
    private Byte accidentGrade;
    private BigDecimal economicLoss;
@@ -61,7 +61,7 @@
    private Date reportDeadline;
    private String accidentLevel;
    private Byte accidentLevel;
    private String accidentDelayApply;
@@ -137,19 +137,19 @@
        this.accidentExpressId = accidentExpressId;
    }
    public String getAccidentType() {
    public Byte getAccidentType() {
        return accidentType;
    }
    public void setAccidentType(String accidentType) {
    public void setAccidentType(Byte accidentType) {
        this.accidentType = accidentType;
    }
    public String getAccidentGrade() {
    public Byte getAccidentGrade() {
        return accidentGrade;
    }
    public void setAccidentGrade(String accidentGrade) {
    public void setAccidentGrade(Byte accidentGrade) {
        this.accidentGrade = accidentGrade;
    }
@@ -201,11 +201,11 @@
        this.reportDeadline = reportDeadline;
    }
    public String getAccidentLevel() {
    public Byte getAccidentLevel() {
        return accidentLevel;
    }
    public void setAccidentLevel(String accidentLevel) {
    public void setAccidentLevel(Byte accidentLevel) {
        this.accidentLevel = accidentLevel;
    }
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentReportInfoDetailDO.java
@@ -44,9 +44,9 @@
    private Long accidentExpressId;
    private String accidentType;
    private Byte accidentType;
    private String accidentGrade;
    private Byte accidentGrade;
    private BigDecimal economicLoss;
@@ -60,7 +60,7 @@
    private Date reportDeadline;
    private String accidentLevel;
    private Byte accidentLevel;
    private String accidentDelayApply;
@@ -96,19 +96,19 @@
        this.accidentExpressId = accidentExpressId;
    }
    public String getAccidentType() {
    public Byte getAccidentType() {
        return accidentType;
    }
    public void setAccidentType(String accidentType) {
    public void setAccidentType(Byte accidentType) {
        this.accidentType = accidentType;
    }
    public String getAccidentGrade() {
    public Byte getAccidentGrade() {
        return accidentGrade;
    }
    public void setAccidentGrade(String accidentGrade) {
    public void setAccidentGrade(Byte accidentGrade) {
        this.accidentGrade = accidentGrade;
    }
@@ -160,11 +160,11 @@
        this.reportDeadline = reportDeadline;
    }
    public String getAccidentLevel() {
    public Byte getAccidentLevel() {
        return accidentLevel;
    }
    public void setAccidentLevel(String accidentLevel) {
    public void setAccidentLevel(Byte accidentLevel) {
        this.accidentLevel = accidentLevel;
    }
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentReportInfoPageDO.java
@@ -32,9 +32,9 @@
    private Long accidentExpressId;
    private String accidentType;
    private Byte accidentType;
    private String accidentGrade;
    private Byte accidentGrade;
    public Long getId() {
        return id;
@@ -52,11 +52,11 @@
        this.accidentExpressId = accidentExpressId;
    }
    public String getAccidentType() {
    public Byte getAccidentType() {
        return accidentType;
    }
    public void setAccidentType(String accidentType) {
    public void setAccidentType(Byte accidentType) {
        this.accidentType = accidentType;
    }
@@ -70,11 +70,11 @@
                '}';
    }
    public String getAccidentGrade() {
    public Byte getAccidentGrade() {
        return accidentGrade;
    }
    public void setAccidentGrade(String accidentGrade) {
    public void setAccidentGrade(Byte accidentGrade) {
        this.accidentGrade = accidentGrade;
    }
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/WorkInjuryDeclarationInfo.java
@@ -31,7 +31,7 @@
    private Long accidentExpressId;
    private String workInjuryType;
    private Byte workInjuryType;
    private Date declareDate;
@@ -127,11 +127,11 @@
        this.accidentExpressId = accidentExpressId;
    }
    public String getWorkInjuryType() {
    public Byte getWorkInjuryType() {
        return workInjuryType;
    }
    public void setWorkInjuryType(String workInjuryType) {
    public void setWorkInjuryType(Byte workInjuryType) {
        this.workInjuryType = workInjuryType;
    }
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/WorkInjuryDeclarationInfoDetailDO.java
@@ -42,7 +42,7 @@
    private Long accidentExpressId;
    private String workInjuryType;
    private Byte workInjuryType;
    private Date declareDate;
@@ -98,11 +98,11 @@
        this.accidentExpressId = accidentExpressId;
    }
    public String getWorkInjuryType() {
    public Byte getWorkInjuryType() {
        return workInjuryType;
    }
    public void setWorkInjuryType(String workInjuryType) {
    public void setWorkInjuryType(Byte workInjuryType) {
        this.workInjuryType = workInjuryType;
    }
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/WorkInjuryDeclarationInfoPageDO.java
@@ -38,7 +38,7 @@
    private Long accidentExpressId;
    private String workInjuryType;
    private Byte workInjuryType;
    private Date declareDate;
@@ -77,11 +77,11 @@
        this.accidentExpressId = accidentExpressId;
    }
    public String getWorkInjuryType() {
    public Byte getWorkInjuryType() {
        return workInjuryType;
    }
    public void setWorkInjuryType(String workInjuryType) {
    public void setWorkInjuryType(Byte workInjuryType) {
        this.workInjuryType = workInjuryType;
    }
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/enums/AccidentExpressEnum.java
对比新文件
@@ -0,0 +1,46 @@
package com.gkhy.safePlatform.incidentManage.enums;
import java.util.HashMap;
import java.util.Map;
public enum AccidentExpressEnum {
    HUMAN_UNSAFE_BEHAVIOR((byte) 1, "人的不安全行为"),
    MATTER_UNSAFE_BEHAVIOR((byte) 2, "物的不安全状态");
    private Byte code;
    private String value;
    AccidentExpressEnum(Byte code, String value) {
        this.code = code;
        this.value = value;
    }
    public Byte getCode() {
        return code;
    }
    public void setCode(Byte code) {
        this.code = code;
    }
    public String getValue() {
        return value;
    }
    public void setValue(String value) {
        this.value = value;
    }
    // 转换成为 MAP<Byte, String>, 对外提供查询和遍历功能
    public static Map<Byte, AccidentExpressEnum> toMap() {
        Map<Byte, AccidentExpressEnum> map = new HashMap();
        for (AccidentExpressEnum accidentExpressEnum : AccidentExpressEnum.values()) {
            map.put(accidentExpressEnum.getCode(), accidentExpressEnum);
        }
        return map;
    }
    public static AccidentExpressEnum getByCode(Byte code){
        return toMap().get(code);
    }
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/enums/AccidentReportGradeEnum.java
对比新文件
@@ -0,0 +1,50 @@
package com.gkhy.safePlatform.incidentManage.enums;
import java.util.HashMap;
import java.util.Map;
public enum AccidentReportGradeEnum {
    GRADE_ONE((byte) 1, "一级"),
    GRADE_TWO((byte) 2, "二级"),
    GRADE_THREE((byte) 3, "三级"),
    GRADE_FOUR((byte) 4, "四级");
    private Byte code;
    private String value;
    AccidentReportGradeEnum(Byte code, String value) {
        this.code = code;
        this.value = value;
    }
    public Byte getCode() {
        return code;
    }
    public void setCode(Byte code) {
        this.code = code;
    }
    public String getValue() {
        return value;
    }
    public void setValue(String value) {
        this.value = value;
    }
    // 转换成为 MAP<Byte, String>, 对外提供查询和遍历功能
    public static Map<Byte, AccidentReportGradeEnum> toMap() {
        Map<Byte, AccidentReportGradeEnum> map = new HashMap();
        for (AccidentReportGradeEnum accidentExpressEnum : AccidentReportGradeEnum.values()) {
            map.put(accidentExpressEnum.getCode(), accidentExpressEnum);
        }
        return map;
    }
    public static AccidentReportGradeEnum getByCode(Byte code){
        return toMap().get(code);
    }
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/enums/AccidentReportLevelEnum.java
对比新文件
@@ -0,0 +1,50 @@
package com.gkhy.safePlatform.incidentManage.enums;
import java.util.HashMap;
import java.util.Map;
public enum AccidentReportLevelEnum {
    LEVEL_ONE((byte) 1, "特大事故"),
    LEVEL_TWO((byte) 2, "重大事故"),
    LEVEL_THREE((byte) 3, "较大事故"),
    LEVEL_FOUR((byte) 4, "一般事故"),
    LEVEL_FIVE((byte) 5, "未遂事故");
    private Byte code;
    private String value;
    AccidentReportLevelEnum(Byte code, String value) {
        this.code = code;
        this.value = value;
    }
    public Byte getCode() {
        return code;
    }
    public void setCode(Byte code) {
        this.code = code;
    }
    public String getValue() {
        return value;
    }
    public void setValue(String value) {
        this.value = value;
    }
    // 转换成为 MAP<Byte, String>, 对外提供查询和遍历功能
    public static Map<Byte, AccidentReportLevelEnum> toMap() {
        Map<Byte, AccidentReportLevelEnum> map = new HashMap();
        for (AccidentReportLevelEnum accidentExpressEnum : AccidentReportLevelEnum.values()) {
            map.put(accidentExpressEnum.getCode(), accidentExpressEnum);
        }
        return map;
    }
    public static AccidentReportLevelEnum getByCode(Byte code){
        return toMap().get(code);
    }
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/enums/AccidentReportTypeEnum.java
对比新文件
@@ -0,0 +1,50 @@
package com.gkhy.safePlatform.incidentManage.enums;
import java.util.HashMap;
import java.util.Map;
public enum AccidentReportTypeEnum {
    TYPE_ONE((byte) 1, "人员伤亡事故"),
    TYPE_TWO((byte) 2, "火灾爆炸事故"),
    TYPE_THREE((byte) 3, "危险品泄露事故"),
    TYPE_FOUR((byte) 4, "设备事故"),
    TYPE_FIVE((byte) 5, "工艺事故");
    private Byte code;
    private String value;
    AccidentReportTypeEnum(Byte code, String value) {
        this.code = code;
        this.value = value;
    }
    public Byte getCode() {
        return code;
    }
    public void setCode(Byte code) {
        this.code = code;
    }
    public String getValue() {
        return value;
    }
    public void setValue(String value) {
        this.value = value;
    }
    // 转换成为 MAP<Byte, String>, 对外提供查询和遍历功能
    public static Map<Byte, AccidentReportTypeEnum> toMap() {
        Map<Byte, AccidentReportTypeEnum> map = new HashMap();
        for (AccidentReportTypeEnum accidentExpressEnum : AccidentReportTypeEnum.values()) {
            map.put(accidentExpressEnum.getCode(), accidentExpressEnum);
        }
        return map;
    }
    public static AccidentReportTypeEnum getByCode(Byte code){
        return toMap().get(code);
    }
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/enums/AccidentResultCodes.java
@@ -4,7 +4,6 @@
    ACCIDENT_EXPRESS_NULL("A1001", "事故快报不可为空"),
    ACCIDENT_EXPRESS_NOT_EXIST("A1002", "事故快报不存在"),
    EXPRESS_NAME_NULL("E1001","事故快报名称不能为空"),
    EXPRESS_DEPARTMENT_NULL("E1002","事故快报事故部门不能为空"),
    EXPRESS_TIME_NULL("E1003","事故快报发生时间不能为空"),
@@ -14,11 +13,11 @@
    EXPRESS_BRIEF_PROCESS_NULL("E1007","事故快报事故简要经过不能为空"),
    EXPRESS_CASE_PRELIMINARY_ANALYSIS_NULL("E1008","事故快报事故原因初步分析不能为空"),
    EXPRESS_EMERGENCY_PRECAUTIONS_NULL("E1009","事故快报应急防范措施不能为空"),
    EXPRESS_ENUMS_CAUSE_NOT_EXIST("E1010","事故快报事故原因参数非法"),
    ACCIDENT_REPORT_NULL("A1003", "事故报告不可为空"),
    ACCIDENT_REPORT_NOT_EXIST("A1004", "事故报告不存在"),
    REPORT_TYPE_NULL("R1001","事故报告事故类型不能为空"),
    REPORT_GRADE_NULL("R1002","事故报告事故等级不能为空"),
    REPORT_ECONOMIC_LOSS_NULL("R1003","事故报告经济损失不能为空"),
@@ -30,15 +29,19 @@
    REPORT_ACCIDENT_HANDLING_NULL("R1009","事故报告事故处理不能为空"),
    REPORT_FILL_IN_USER_UID_NULL("R1010","事故报告填写人不能为空"),
    REPORT_FILL_IN_TIME_NULL("R1011","事故报告填写日期不能为空"),
    REPORT_ENUMS_TYPE_NOT_EXIST("E1012","事故报告事故类别参数非法"),
    REPORT_ENUMS_GRADE_NOT_EXIST("E1013","事故报告事故等级参数非法"),
    REPORT_ENUMS_LEVEL_NOT_EXIST("E1014","事故报告事故级别参数非法"),
    WORK_INJURY_DECLARATION_NULL("W1001", "工伤申报不可为空"),
    WORK_INJURY_DECLARATION_NOT_EXIST("W1002", "工伤申报不存在"),
    WORK_INJURY_DECLARATION_USERNAME_NULL("W1003", "申报人名称不可为空"),
    WORK_INJURY_DECLARATION_GENDER_NULL("W1003", "申报人名称不可为空"),
    WORK_INJURY_DECLARATION_USERNAME_NOT_EXIST("W1005", "申报人部门不可为空"),
    WORK_INJURY_DECLARATION_TYPE_NULL("W1006", "工伤类型不可为空"),
    WORK_INJURY_DECLARATION_Date_NULL("W1006", "申报日期不可为空"),
    WORK_INJURY_DECLARATION_DATA_NULL("W1006", "申报日期不可为空"),
    WORK_INJURY_DECLARATION_ENUMS_TYPE_NOT_EXIST("W1007","工伤申报工伤类型参数非法"),
    CASE_NULL("C1001", "事故案例不可为空"),
    CASE_NOT_EXIST("C1002", "事故案例不存在"),
@@ -47,6 +50,8 @@
    YEAR_NULL("Y1001" , "年份不能为空"),
    ERROR("A3000", "未知错误");
    private String code;
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/enums/WorkInjuryTypeEnum.java
对比新文件
@@ -0,0 +1,47 @@
package com.gkhy.safePlatform.incidentManage.enums;
import java.util.HashMap;
import java.util.Map;
public enum WorkInjuryTypeEnum {
    TYPE_TWO((byte) 1, "轻伤"),
    TYPE_THREE((byte) 2, "重伤");
    private Byte code;
    private String value;
    WorkInjuryTypeEnum(Byte code, String value) {
        this.code = code;
        this.value = value;
    }
    public Byte getCode() {
        return code;
    }
    public void setCode(Byte code) {
        this.code = code;
    }
    public String getValue() {
        return value;
    }
    public void setValue(String value) {
        this.value = value;
    }
    // 转换成为 MAP<Byte, String>, 对外提供查询和遍历功能
    public static Map<Byte, WorkInjuryTypeEnum> toMap() {
        Map<Byte, WorkInjuryTypeEnum> map = new HashMap();
        for (WorkInjuryTypeEnum accidentExpressEnum : WorkInjuryTypeEnum.values()) {
            map.put(accidentExpressEnum.getCode(), accidentExpressEnum);
        }
        return map;
    }
    public static WorkInjuryTypeEnum getByCode(Byte code){
        return toMap().get(code);
    }
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/req/AccidentExpressReqDTO.java
@@ -27,7 +27,7 @@
    private Boolean casualties;
    private String accidentCause;
    private Byte accidentCause;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date occurrenceTime;
@@ -81,11 +81,11 @@
        this.casualties = casualties;
    }
    public String getAccidentCause() {
    public Byte getAccidentCause() {
        return accidentCause;
    }
    public void setAccidentCause(String accidentCause) {
    public void setAccidentCause(Byte accidentCause) {
        this.accidentCause = accidentCause;
    }
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/req/AccidentReportReqDTO.java
@@ -32,9 +32,9 @@
    private Long accidentExpressId;
    private String accidentType;
    private Byte accidentType;
    private String accidentGrade;
    private Byte accidentGrade;
    private BigDecimal economicLoss;
@@ -49,7 +49,7 @@
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date reportDeadline;
    private String accidentLevel;
    private Byte accidentLevel;
    private String accidentDelayApply;
@@ -88,19 +88,19 @@
        this.accidentExpressId = accidentExpressId;
    }
    public String getAccidentType() {
    public Byte getAccidentType() {
        return accidentType;
    }
    public void setAccidentType(String accidentType) {
    public void setAccidentType(Byte accidentType) {
        this.accidentType = accidentType;
    }
    public String getAccidentGrade() {
    public Byte getAccidentGrade() {
        return accidentGrade;
    }
    public void setAccidentGrade(String accidentGrade) {
    public void setAccidentGrade(Byte accidentGrade) {
        this.accidentGrade = accidentGrade;
    }
@@ -152,11 +152,11 @@
        this.reportDeadline = reportDeadline;
    }
    public String getAccidentLevel() {
    public Byte getAccidentLevel() {
        return accidentLevel;
    }
    public void setAccidentLevel(String accidentLevel) {
    public void setAccidentLevel(Byte accidentLevel) {
        this.accidentLevel = accidentLevel;
    }
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/req/WorkInjuryDeclarationReqDTO.java
@@ -18,7 +18,7 @@
    private Long accidentExpressId;
    private String workInjuryType;
    private Byte workInjuryType;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date declareDate;
@@ -77,11 +77,11 @@
        this.accidentExpressId = accidentExpressId;
    }
    public String getWorkInjuryType() {
    public Byte getWorkInjuryType() {
        return workInjuryType;
    }
    public void setWorkInjuryType(String workInjuryType) {
    public void setWorkInjuryType(Byte workInjuryType) {
        this.workInjuryType = workInjuryType;
    }
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/resp/AccidentExpressDetailRespDTO.java
@@ -19,7 +19,7 @@
    private Boolean casualties;
    private String accidentCause;
    private Byte accidentCause;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date occurrenceTime;
@@ -73,11 +73,11 @@
        this.casualties = casualties;
    }
    public String getAccidentCause() {
    public Byte getAccidentCause() {
        return accidentCause;
    }
    public void setAccidentCause(String accidentCause) {
    public void setAccidentCause(Byte accidentCause) {
        this.accidentCause = accidentCause;
    }
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/resp/AccidentExpressPageRespDTO.java
@@ -36,7 +36,7 @@
    private Long createUid;
    private String accidentCause;
    private Byte accidentCause;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date occurrenceTime;
@@ -72,11 +72,11 @@
    }
    public String getAccidentCause() {
    public Byte getAccidentCause() {
        return accidentCause;
    }
    public void setAccidentCause(String accidentCause) {
    public void setAccidentCause(Byte accidentCause) {
        this.accidentCause = accidentCause;
    }
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/resp/AccidentReportDetailRespDTO.java
@@ -84,9 +84,9 @@
    private Long accidentExpressId;
    private String accidentType;
    private Byte accidentType;
    private String accidentGrade;
    private Byte accidentGrade;
    private BigDecimal economicLoss;
@@ -101,7 +101,7 @@
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date reportDeadline;
    private String accidentLevel;
    private Byte accidentLevel;
    private String accidentDelayApply;
@@ -140,19 +140,19 @@
        this.accidentExpressId = accidentExpressId;
    }
    public String getAccidentType() {
    public Byte getAccidentType() {
        return accidentType;
    }
    public void setAccidentType(String accidentType) {
    public void setAccidentType(Byte accidentType) {
        this.accidentType = accidentType;
    }
    public String getAccidentGrade() {
    public Byte getAccidentGrade() {
        return accidentGrade;
    }
    public void setAccidentGrade(String accidentGrade) {
    public void setAccidentGrade(Byte accidentGrade) {
        this.accidentGrade = accidentGrade;
    }
@@ -204,11 +204,11 @@
        this.reportDeadline = reportDeadline;
    }
    public String getAccidentLevel() {
    public Byte getAccidentLevel() {
        return accidentLevel;
    }
    public void setAccidentLevel(String accidentLevel) {
    public void setAccidentLevel(Byte accidentLevel) {
        this.accidentLevel = accidentLevel;
    }
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/resp/AccidentReportPageRespDTO.java
@@ -64,9 +64,9 @@
    private Long accidentExpressId;
    private String accidentType;
    private Byte accidentType;
    private String accidentGrade;
    private Byte accidentGrade;
    public Long getId() {
        return id;
@@ -92,19 +92,19 @@
        this.accidentExpressId = accidentExpressId;
    }
    public String getAccidentType() {
    public Byte getAccidentType() {
        return accidentType;
    }
    public void setAccidentType(String accidentType) {
    public void setAccidentType(Byte accidentType) {
        this.accidentType = accidentType;
    }
    public String getAccidentGrade() {
    public Byte getAccidentGrade() {
        return accidentGrade;
    }
    public void setAccidentGrade(String accidentGrade) {
    public void setAccidentGrade(Byte accidentGrade) {
        this.accidentGrade = accidentGrade;
    }
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/resp/WorkInjuryDeclarationDetailRespDTO.java
@@ -40,7 +40,7 @@
    private Long accidentExpressId;
    private String workInjuryType;
    private Byte workInjuryType;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date declareDate;
@@ -99,11 +99,11 @@
        this.accidentExpressId = accidentExpressId;
    }
    public String getWorkInjuryType() {
    public Byte getWorkInjuryType() {
        return workInjuryType;
    }
    public void setWorkInjuryType(String workInjuryType) {
    public void setWorkInjuryType(Byte workInjuryType) {
        this.workInjuryType = workInjuryType;
    }
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/resp/WorkInjuryDeclarationPageRespDTO.java
@@ -35,7 +35,7 @@
    private Long accidentExpressId;
    private String workInjuryType;
    private Byte workInjuryType;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date declareDate;
@@ -74,11 +74,11 @@
        this.accidentExpressId = accidentExpressId;
    }
    public String getWorkInjuryType() {
    public Byte getWorkInjuryType() {
        return workInjuryType;
    }
    public void setWorkInjuryType(String workInjuryType) {
    public void setWorkInjuryType(Byte workInjuryType) {
        this.workInjuryType = workInjuryType;
    }
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentExpressServiceImpl.java
@@ -12,6 +12,7 @@
import com.gkhy.safePlatform.commons.vo.ResultVO;
import com.gkhy.safePlatform.commons.vo.SearchResultVO;
import com.gkhy.safePlatform.incidentManage.entity.*;
import com.gkhy.safePlatform.incidentManage.enums.AccidentExpressEnum;
import com.gkhy.safePlatform.incidentManage.enums.AccidentResultCodes;
import com.gkhy.safePlatform.incidentManage.exception.AccidentException;
import com.gkhy.safePlatform.incidentManage.model.dto.req.AccidentExpressCasualtyReqDTO;
@@ -78,7 +79,8 @@
                        depPool.put(dep.getDepId(), dep.getDepName());
                    }
                }}
                }
            }
            String depName = depPool.get(AccidentExpressPageRespDTO.getAccidentDepartmentId());
            AccidentExpressPageRespDTO.setDeptName(depName);
@@ -100,6 +102,9 @@
        String uName = contextCacheUser.getRealName();
        //必填项验证
        checkRequired(accidentExpressReqDTO);
        //枚举验证
        checkEnum(accidentExpressReqDTO);
        Date nowDate = new Date();
        //1.新增事故快报
@@ -154,6 +159,12 @@
    @Override
    public ResultVO updateAccidentExpress(Long uid, AccidentExpressReqDTO accidentExpressReqDTO) {
        //必填项验证
        checkRequired(accidentExpressReqDTO);
        //枚举验证
        checkEnum(accidentExpressReqDTO);
        Date nowDate = new Date();
        //查询是否存在
        AccidentExpressInfoDetailDO AccidentExpressInfoDetailDO = accidentExpressInfoService.selectAccidentExpressById(accidentExpressReqDTO.getId());
@@ -268,48 +279,59 @@
    }
    /**
     * 验证必填项
     *
     * @return
     */
    private void checkRequired(AccidentExpressReqDTO AccidentExpressReqDTO) {
    private void checkRequired(AccidentExpressReqDTO accidentExpressReqDTO) {
        //名称
        if (StringUtils.isBlank(AccidentExpressReqDTO.getAccidentName())) {
        if (StringUtils.isBlank(accidentExpressReqDTO.getAccidentName())) {
            throw new AccidentException(AccidentResultCodes.EXPRESS_NAME_NULL);
        }
        //部门
        if (AccidentExpressReqDTO.getAccidentDepartmentId()==null) {
        if (accidentExpressReqDTO.getAccidentDepartmentId() == null) {
            throw new AccidentException(AccidentResultCodes.EXPRESS_DEPARTMENT_NULL);
        }
        //发生时间
        if (AccidentExpressReqDTO.getOccurrenceTime() == null ) {
        if (accidentExpressReqDTO.getOccurrenceTime() == null) {
            throw new AccidentException(AccidentResultCodes.EXPRESS_TIME_NULL);
        }
        //发生地点
        if (StringUtils.isBlank(AccidentExpressReqDTO.getOccurrencePlace())) {
        if (StringUtils.isBlank(accidentExpressReqDTO.getOccurrencePlace())) {
            throw new AccidentException(AccidentResultCodes.EXPRESS_PLACE_NULL);
        }
        //事故原因
        if (StringUtils.isBlank(AccidentExpressReqDTO.getAccidentCause())) {
        if (accidentExpressReqDTO.getAccidentCause() == null) {
            throw new AccidentException(AccidentResultCodes.EXPRESS_CAUSE_NULL);
        }
        //是否有伤亡
        if (AccidentExpressReqDTO.getCasualties()==null) {
        if (accidentExpressReqDTO.getCasualties() == null) {
            throw new AccidentException(AccidentResultCodes.EXPRESS_CASUALTIES_NULL);
        }
        //简要经过
        if (StringUtils.isBlank(AccidentExpressReqDTO.getAccidentBriefProcess())) {
        if (StringUtils.isBlank(accidentExpressReqDTO.getAccidentBriefProcess())) {
            throw new AccidentException(AccidentResultCodes.EXPRESS_BRIEF_PROCESS_NULL);
        }
        //初步分析
        if (StringUtils.isBlank(AccidentExpressReqDTO.getAccidentCausesPreliminaryAnalysis())) {
        if (StringUtils.isBlank(accidentExpressReqDTO.getAccidentCausesPreliminaryAnalysis())) {
            throw new AccidentException(AccidentResultCodes.EXPRESS_CASE_PRELIMINARY_ANALYSIS_NULL);
        }
        //应急防范措施
        if (StringUtils.isBlank(AccidentExpressReqDTO.getEmergencyPrecautions())) {
        if (StringUtils.isBlank(accidentExpressReqDTO.getEmergencyPrecautions())) {
            throw new AccidentException(AccidentResultCodes.EXPRESS_EMERGENCY_PRECAUTIONS_NULL);
        }
    }
    /**
     *
     * 枚举验证
     *
     */
    private void checkEnum(AccidentExpressReqDTO accidentExpressReqDTO){
        if (AccidentExpressEnum.getByCode(accidentExpressReqDTO.getAccidentCause())==null){
            throw new AccidentException(AccidentResultCodes.EXPRESS_ENUMS_CAUSE_NOT_EXIST);
        }
    }
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentReportServiceImpl.java
@@ -10,6 +10,9 @@
import com.gkhy.safePlatform.commons.vo.ResultVO;
import com.gkhy.safePlatform.commons.vo.SearchResultVO;
import com.gkhy.safePlatform.incidentManage.entity.*;
import com.gkhy.safePlatform.incidentManage.enums.AccidentReportGradeEnum;
import com.gkhy.safePlatform.incidentManage.enums.AccidentReportLevelEnum;
import com.gkhy.safePlatform.incidentManage.enums.AccidentReportTypeEnum;
import com.gkhy.safePlatform.incidentManage.enums.AccidentResultCodes;
import com.gkhy.safePlatform.incidentManage.exception.AccidentException;
import com.gkhy.safePlatform.incidentManage.model.dto.req.AccidentReportFileReqDTO;
@@ -99,6 +102,8 @@
    public ResultVO addAccidentReport(Long uid, AccidentReportReqDTO accidentReportReqDTO) {
        //必填项验证
        checkRequired(accidentReportReqDTO);
        // 验证枚举
        checkEnum(accidentReportReqDTO);
        Date nowDate = new Date();
        //1.新增事故报告
@@ -157,6 +162,9 @@
    @Override
    public ResultVO updateAccidentReport(Long uid, AccidentReportReqDTO accidentReportReqDTO) {
        // 验证枚举
        checkEnum(accidentReportReqDTO);
        Date nowDate = new Date();
        //查询是否存在
        AccidentReportInfoDetailDO AccidentReportInfoDetailDO = accidentReportInfoService.selectAccidentReportById(accidentReportReqDTO.getId());
@@ -248,64 +256,79 @@
     *
     * @return
     */
    private void checkRequired(AccidentReportReqDTO AccidentReportReqDTO) {
    private void checkRequired(AccidentReportReqDTO accidentReportReqDTO) {
        //事故快报
        if (AccidentReportReqDTO.getAccidentExpressId() == null) {
        if (accidentReportReqDTO.getAccidentExpressId() == null) {
            throw new AccidentException(AccidentResultCodes.ACCIDENT_EXPRESS_NULL);
        }
        AccidentExpressInfoDetailDO accidentExpressInfo = accidentExpressInfoService.selectAccidentExpressById(AccidentReportReqDTO.getAccidentExpressId());
        AccidentExpressInfoDetailDO accidentExpressInfo = accidentExpressInfoService.selectAccidentExpressById(accidentReportReqDTO.getAccidentExpressId());
        if (accidentExpressInfo == null) {
            throw new AccidentException(AccidentResultCodes.ACCIDENT_EXPRESS_NOT_EXIST);
        }
        //事故类型
        if (StringUtils.isBlank(AccidentReportReqDTO.getAccidentType())) {
        if (accidentReportReqDTO.getAccidentType() == null) {
            throw new AccidentException(AccidentResultCodes.REPORT_TYPE_NULL);
        }
        //事故等级
        if (StringUtils.isBlank(AccidentReportReqDTO.getAccidentGrade())) {
        if (accidentReportReqDTO.getAccidentGrade() == null) {
            throw new AccidentException(AccidentResultCodes.REPORT_GRADE_NULL);
        }
        //经济损失
        if (AccidentReportReqDTO.getEconomicLoss() == null) {
        if (accidentReportReqDTO.getEconomicLoss() == null) {
            throw new AccidentException(AccidentResultCodes.REPORT_ECONOMIC_LOSS_NULL);
        }
        //要求报告完成期限
        if (AccidentReportReqDTO.getReportDeadline() == null) {
        if (accidentReportReqDTO.getReportDeadline() == null) {
            throw new AccidentException(AccidentResultCodes.REPORT_REPORT_DEADLINE_NULL);
        }
        //事故级别
        if (StringUtils.isBlank(AccidentReportReqDTO.getAccidentLevel())) {
        if (accidentReportReqDTO.getAccidentLevel() == null) {
            throw new AccidentException(AccidentResultCodes.REPORT_LEVEL_NULL);
        }
        //原因综合分析(直接)
        if (StringUtils.isBlank(AccidentReportReqDTO.getComprehensiveAnalysisDirect())) {
        if (StringUtils.isBlank(accidentReportReqDTO.getComprehensiveAnalysisDirect())) {
            throw new AccidentException(AccidentResultCodes.REPORT_COMPREHENSIVE_ANALYSIS_DIRECT_NULL);
        }
        //原因综合分析(直接)
        if (StringUtils.isBlank(AccidentReportReqDTO.getComprehensiveAnalysisDirect())) {
        if (StringUtils.isBlank(accidentReportReqDTO.getComprehensiveAnalysisDirect())) {
            throw new AccidentException(AccidentResultCodes.REPORT_COMPREHENSIVE_ANALYSIS_DIRECT_NULL);
        }
        //原因综合分析(间接)
        if (StringUtils.isBlank(AccidentReportReqDTO.getComprehensiveAnalysisIndirect())) {
        if (StringUtils.isBlank(accidentReportReqDTO.getComprehensiveAnalysisIndirect())) {
            throw new AccidentException(AccidentResultCodes.REPORT_COMPREHENSIVE_ANALYSIS_INDIRECT_NULL);
        }
        //整改措施
        if (StringUtils.isBlank(AccidentReportReqDTO.getRectificationMeasures())) {
        if (StringUtils.isBlank(accidentReportReqDTO.getRectificationMeasures())) {
            throw new AccidentException(AccidentResultCodes.REPORT_RECTIFICATION_MEASURES_NULL);
        }
        //事故处理
        if (StringUtils.isBlank(AccidentReportReqDTO.getAccidentHandling())) {
        if (StringUtils.isBlank(accidentReportReqDTO.getAccidentHandling())) {
            throw new AccidentException(AccidentResultCodes.REPORT_ACCIDENT_HANDLING_NULL);
        }
        //填写人
        if (AccidentReportReqDTO.getFillInUserUid() == null) {
        if (accidentReportReqDTO.getFillInUserUid() == null) {
            throw new AccidentException(AccidentResultCodes.REPORT_FILL_IN_USER_UID_NULL);
        }
        //填写日期
        if (AccidentReportReqDTO.getFillInTime() == null) {
        if (accidentReportReqDTO.getFillInTime() == null) {
            throw new AccidentException(AccidentResultCodes.REPORT_FILL_IN_TIME_NULL);
        }
    }
    /**
     * 枚举验证
     */
    private void checkEnum(AccidentReportReqDTO accidentExpressReqDTO) {
        if (AccidentReportTypeEnum.getByCode(accidentExpressReqDTO.getAccidentType()) == null) {
            throw new AccidentException(AccidentResultCodes.REPORT_ENUMS_TYPE_NOT_EXIST);
        }
        if (AccidentReportGradeEnum.getByCode(accidentExpressReqDTO.getAccidentGrade()) == null) {
            throw new AccidentException(AccidentResultCodes.REPORT_ENUMS_GRADE_NOT_EXIST);
        }
        if (AccidentReportLevelEnum.getByCode(accidentExpressReqDTO.getAccidentLevel()) == null) {
            throw new AccidentException(AccidentResultCodes.REPORT_ENUMS_LEVEL_NOT_EXIST);
        }
    }
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/WorkInjuryDeclarationServiceImpl.java
@@ -11,6 +11,7 @@
import com.gkhy.safePlatform.commons.vo.SearchResultVO;
import com.gkhy.safePlatform.incidentManage.entity.*;
import com.gkhy.safePlatform.incidentManage.enums.AccidentResultCodes;
import com.gkhy.safePlatform.incidentManage.enums.WorkInjuryTypeEnum;
import com.gkhy.safePlatform.incidentManage.exception.AccidentException;
import com.gkhy.safePlatform.incidentManage.model.dto.req.WorkInjuryDeclarationFileReqDTO;
import com.gkhy.safePlatform.incidentManage.model.dto.req.WorkInjuryDeclarationReqDTO;
@@ -232,41 +233,48 @@
    }
    /**
     * 验证必填项
     *
     * @return
     */
    private void checkRequired(WorkInjuryDeclarationReqDTO WorkInjuryDeclarationReqDTO) {
    private void checkRequired(WorkInjuryDeclarationReqDTO workInjuryDeclarationReqDTO) {
        //申报人姓名
        if (StringUtils.isBlank(WorkInjuryDeclarationReqDTO.getDeclareUserName())) {
        if (StringUtils.isBlank(workInjuryDeclarationReqDTO.getDeclareUserName())) {
            throw new AccidentException(AccidentResultCodes.WORK_INJURY_DECLARATION_USERNAME_NULL);
        }
        //事故性别
        if (WorkInjuryDeclarationReqDTO.getDeclareUserGender() == null ) {
        if (workInjuryDeclarationReqDTO.getDeclareUserGender() == null) {
            throw new AccidentException(AccidentResultCodes.WORK_INJURY_DECLARATION_GENDER_NULL);
        }
        //申报人部门
        if (WorkInjuryDeclarationReqDTO.getDeclareDepartmentId()==null) {
        if (workInjuryDeclarationReqDTO.getDeclareDepartmentId() == null) {
            throw new AccidentException(AccidentResultCodes.WORK_INJURY_DECLARATION_USERNAME_NOT_EXIST);
        }
        //事故名称
        if (WorkInjuryDeclarationReqDTO.getAccidentExpressId() == null ) {
        if (workInjuryDeclarationReqDTO.getAccidentExpressId() == null) {
            throw new AccidentException(AccidentResultCodes.ACCIDENT_EXPRESS_NULL);
        }
        AccidentExpressInfoDetailDO accidentExpressInfo = accidentExpressInfoService.selectAccidentExpressById(WorkInjuryDeclarationReqDTO.getAccidentExpressId());
        AccidentExpressInfoDetailDO accidentExpressInfo = accidentExpressInfoService.selectAccidentExpressById(workInjuryDeclarationReqDTO.getAccidentExpressId());
        if (accidentExpressInfo == null) {
            throw new AccidentException(AccidentResultCodes.ACCIDENT_EXPRESS_NOT_EXIST);
        }
        //工伤类型
        if (StringUtils.isBlank(WorkInjuryDeclarationReqDTO.getWorkInjuryType())) {
        if (workInjuryDeclarationReqDTO.getWorkInjuryType() == null) {
            throw new AccidentException(AccidentResultCodes.WORK_INJURY_DECLARATION_TYPE_NULL);
        }
        //申报日期
        if (WorkInjuryDeclarationReqDTO.getDeclareDate()==null) {
            throw new AccidentException(AccidentResultCodes.WORK_INJURY_DECLARATION_Date_NULL);
        if (workInjuryDeclarationReqDTO.getDeclareDate() == null) {
            throw new AccidentException(AccidentResultCodes.WORK_INJURY_DECLARATION_DATA_NULL);
        }
    }
    /**
     * 枚举验证
     */
    private void checkEnum(WorkInjuryDeclarationReqDTO workInjuryDeclarationReqDTO) {
        if (WorkInjuryTypeEnum.getByCode(workInjuryDeclarationReqDTO.getWorkInjuryType()) == null) {
            throw new AccidentException(AccidentResultCodes.WORK_INJURY_DECLARATION_ENUMS_TYPE_NOT_EXIST);
        }
    }
}