lyh
2 天以前 f1b7de2d0bf989ff38b0bd2c52d4bb8b753af42c
设备维修
已添加1个文件
已修改14个文件
1004 ■■■■ 文件已修改
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/BusinessCodeConst.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/EamReportAccidentsRegisterEnum.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/dto/EamReportAccidentsRegisterDto.java 290 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamRepairOrder.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamRepairPerson.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamReportAccidentsRegister.java 92 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportAccidentsRegisterMapper.xml 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamReportAccidentsRegisterQuery.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamReportAccidentsRegisterService.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamRepairOrderServiceImpl.java 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportAccidentsRegisterServiceImpl.java 402 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamRepairOrderController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportAccidentsRegisterController.java 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportProductHazardsController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamMaintenanceStandardServiceImpl.java 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/BusinessCodeConst.java
@@ -104,7 +104,16 @@
    String PCR0017 = "PCR0017";
    //使用单位主管部级领导
    String PCR0018 = "PCR0018";
    //操作工区长
    String PCR0019 = "PCR0019";
    //中心主任
    String PCR0020 = "PCR0020";
    //技术负责人
    String PCR0021 = "PCR0021";
    //技术主管室级领导
    String PCR0022 = "PCR0022";
    //主管部级领导
    String PCR0023 = "PCR0023";
    //通过、驳回
    String APPROVED = "1";
    String REJECTED = "2";
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/constant/EamReportAccidentsRegisterEnum.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,36 @@
package org.jeecg.modules.eam.constant;
public enum EamReportAccidentsRegisterEnum {
    //待提交
    PENDING_SUBMIT,
    //待区长处理
    PENDING_REGIONAL_MANAGER,
    //待中心主任处理
    PENDING_CENTER_MANAGER,
    //待维修工处理
    PENDING_REPAIR_WORKER,
    //待维修组长处理
    PENDING_REPAIR_TEAM_LEADER,
    //待维修区长处理
    PENDING_REPAIR_REGIONAL_MANAGER,
    //待技术负责人处理
    PENDING_TECHNICAL_RESPONSIBLE,
    //待技术主管室级领导处理
    PENDING_TECHNICAL_SUPERVISOR,
    //待主管部级领导处理
    PENDING_SUPERIOR_DEPARTMENT,
    //已完成
    REPAIR_COMPLETED,
    //已驳回
    REJECTED;
    public static EamReportAccidentsRegisterEnum getInstance(String code) {
        EamReportAccidentsRegisterEnum[] values = EamReportAccidentsRegisterEnum.values();
        for (EamReportAccidentsRegisterEnum value : values) {
            if (value.name().equals(code)) {
                return value;
            }
        }
        return null;
    }
}
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/dto/EamReportAccidentsRegisterDto.java
@@ -8,6 +8,7 @@
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.modules.flowable.domain.vo.FlowTaskVo;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
@@ -21,243 +22,292 @@
 * @Version: V1.0
 */
@Data
@TableName("eam_report_accidents_register")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class EamReportAccidentsRegisterDto  {
public class EamReportAccidentsRegisterDto extends FlowTaskVo implements Serializable {
    /**主键*/
    @TableId(type = IdType.ASSIGN_ID)
    private static final long serialVersionUID = 3844096033304425984L;
    /**主键*/
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
    /**创建人*/
    /**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
    /**创建日期*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    /**创建日期*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
    /**更新人*/
    /**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
    /**更新日期*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    /**更新日期*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
    /**删除标记*/
    @Excel(name = "删除标记", width = 15)
    /**删除标记*/
    @Excel(name = "删除标记", width = 15)
    @ApiModelProperty(value = "删除标记")
    @TableLogic
    private String delFlag;
    /**报修ID*/
    @Excel(name = "报修ID", width = 15)
    /**报修ID*/
    @Excel(name = "报修ID", width = 15)
    @ApiModelProperty(value = "报修ID")
    private String reportId;
    /**设备ID*/
    @Excel(name = "设备ID", width = 15)
    /**设备ID*/
    @Excel(name = "设备ID", width = 15)
    @ApiModelProperty(value = "设备ID")
    private String equipmentId;
    /**是否有设备操作证 æ˜¯å¦*/
    @Excel(name = "是否有设备操作证 æ˜¯å¦", width = 15)
    /**登记状态*/
    @ApiModelProperty(value = "登记状态")
    @Dict(dicCode = "eam_report_accidents_register_status")
    private String registerStatus;
    /**是否有设备操作证 æ˜¯å¦*/
    @Excel(name = "是否有设备操作证 æ˜¯å¦", width = 15)
    @ApiModelProperty(value = "是否有设备操作证 æ˜¯å¦")
    @Dict(dicCode = "yn")
    private String operationCertificate;
    /**是否断电重启*/
    @Excel(name = "是否断电重启", width = 15)
    /**是否断电重启*/
    @Excel(name = "是否断电重启", width = 15)
    @ApiModelProperty(value = "是否断电重启")
    @Dict(dicCode = "yn")
    private String powerOffRestart;
    /**是否为批次首件*/
    @Excel(name = "是否为批次首件", width = 15)
    /**是否为批次首件*/
    @Excel(name = "是否为批次首件", width = 15)
    @ApiModelProperty(value = "是否为批次首件")
    @Dict(dicCode = "yn")
    private String batchFirstPiece;
    /**变动因素 æ˜¯å¦*/
    @Excel(name = "变动因素 æ˜¯å¦", width = 15)
    /**变动因素 æ˜¯å¦*/
    @Excel(name = "变动因素 æ˜¯å¦", width = 15)
    @ApiModelProperty(value = "变动因素 æ˜¯å¦")
    @Dict(dicCode = "yn")
    private String variableFactors;
    /**变动因素内容 åˆ€å…·æ›´æ¢ã€å·¥è‰ºæ›´æ”¹ã€åŠ å·¥ç¨‹åºæ›´æ”¹ã€åˆ€å…·è¡¥å¿å€¼æ›´æ”¹ã€*/
    @Excel(name = "变动因素内容 åˆ€å…·æ›´æ¢ã€å·¥è‰ºæ›´æ”¹ã€åŠ å·¥ç¨‹åºæ›´æ”¹ã€åˆ€å…·è¡¥å¿å€¼æ›´æ”¹ã€", width = 15)
    /**变动因素内容 åˆ€å…·æ›´æ¢ã€å·¥è‰ºæ›´æ”¹ã€åŠ å·¥ç¨‹åºæ›´æ”¹ã€åˆ€å…·è¡¥å¿å€¼æ›´æ”¹ã€*/
    @Excel(name = "变动因素内容 åˆ€å…·æ›´æ¢ã€å·¥è‰ºæ›´æ”¹ã€åŠ å·¥ç¨‹åºæ›´æ”¹ã€åˆ€å…·è¡¥å¿å€¼æ›´æ”¹ã€", width = 15)
    @ApiModelProperty(value = "变动因素内容 åˆ€å…·æ›´æ¢ã€å·¥è‰ºæ›´æ”¹ã€åŠ å·¥ç¨‹åºæ›´æ”¹ã€åˆ€å…·è¡¥å¿å€¼æ›´æ”¹")
    @Dict(dicCode = "variable_factors_value")
    private String variableFactorsValue;
    /**执行程序*/
    @Excel(name = "执行程序", width = 15)
    /**执行程序*/
    @Excel(name = "执行程序", width = 15)
    @ApiModelProperty(value = "执行程序")
    private String executeNc;
    /**事故现象*/
    @Excel(name = "事故现象", width = 15)
    /**事故现象*/
    @Excel(name = "事故现象", width = 15)
    @ApiModelProperty(value = "事故现象")
    private String accidentPhenomenon;
    /**采取措施*/
    @Excel(name = "采取措施", width = 15)
    /**采取措施*/
    @Excel(name = "采取措施", width = 15)
    @ApiModelProperty(value = "采取措施")
    private String measure;
    /**造成结果*/
    @Excel(name = "造成结果", width = 15)
    /**造成结果*/
    @Excel(name = "造成结果", width = 15)
    @ApiModelProperty(value = "造成结果")
    private String causingResults;
    /**操作工*/
    @Excel(name = "操作工", width = 15)
    /**操作工*/
    @Excel(name = "操作工", width = 15)
    @ApiModelProperty(value = "操作工")
    private String confirmer;
    /**操作工确认时间*/
    @Excel(name = "操作工确认时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    /**操作工确认时间*/
    @Excel(name = "操作工确认时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "操作工确认时间")
    private Date confirmTime;
    /**区长*/
    @Excel(name = "区长", width = 15)
    /**区长*/
    @Excel(name = "区长", width = 15)
    @ApiModelProperty(value = "区长")
    private String district;
    /**区长确认*/
    @Excel(name = "区长确认", width = 15)
    @ApiModelProperty(value = "区长确认")
    @ApiModelProperty(value = "区长确认意见")
    private String districtConfirm;
    /**区长确认时间*/
    @Excel(name = "区长确认时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    /**区长确认时间*/
    @Excel(name = "区长确认时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "区长确认时间")
    private Date districtTime;
    /**中心主任*/
    @Excel(name = "中心主任", width = 15)
    /**区长确认结果*/
    @Excel(name = "区长确认结果", width = 15)
    @ApiModelProperty(value = "区长确认结果")
    private String districtResult;
    /**中心主任*/
    @Excel(name = "中心主任", width = 15)
    @ApiModelProperty(value = "中心主任")
    private String centerDirector;
    /**中心主任确认*/
    @Excel(name = "中心主任确认", width = 15)
    @ApiModelProperty(value = "中心主任确认")
    @ApiModelProperty(value = "中心主任确认意见")
    private String centerDirectorConfirm;
    /**中心主任确认时间*/
    @Excel(name = "中心主任确认时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    /**中心主任确认结果*/
    @Excel(name = "中心主任确认结果", width = 15)
    @ApiModelProperty(value = "中心主任确认结果")
    private String centerDirectorResult;
    /**中心主任确认时间*/
    @Excel(name = "中心主任确认时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "中心主任确认时间")
    private Date centerDirectorTime;
    /**维修开始时间*/
    @Excel(name = "维修开始时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    /**维修开始时间*/
    @Excel(name = "维修开始时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "维修开始时间")
    private Date reportStartTime;
    /**设备状态*/
    @Excel(name = "设备状态", width = 15)
    /**设备状态*/
    @Excel(name = "设备状态", width = 15)
    @ApiModelProperty(value = "设备状态")
    private String equipmentStatus;
    /**原因分析*/
    @Excel(name = "原因分析", width = 15)
    /**原因分析*/
    @Excel(name = "原因分析", width = 15)
    @ApiModelProperty(value = "原因分析")
    private String causeAnalysis;
    /**检查结果*/
    @Excel(name = "检查结果", width = 15)
    /**检查结果*/
    @Excel(name = "检查结果", width = 15)
    @ApiModelProperty(value = "检查结果")
    private String inspectionResults;
    /**采取措施*/
    @Excel(name = "采取措施", width = 15)
    /**采取措施*/
    @Excel(name = "采取措施", width = 15)
    @ApiModelProperty(value = "采取措施")
    private String takeSteps;
    /**建议采取措施*/
    @Excel(name = "建议采取措施", width = 15)
    /**建议采取措施*/
    @Excel(name = "建议采取措施", width = 15)
    @ApiModelProperty(value = "建议采取措施")
    private String suggestionTakeSteps;
    /**建议采取措施时间*/
    @Excel(name = "建议采取措施时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    /**建议采取措施时间*/
    @Excel(name = "建议采取措施时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "建议采取措施时间")
    private Date suggestionTakeStepsTime;
    /**维修确认*/
    @Excel(name = "维修确认", width = 15)
    /**维修工确认*/
    @Excel(name = "维修工确认", width = 15)
    @ApiModelProperty(value = "维修确认")
    private String repairConfirm;
    /**维修确认意见*/
    @Excel(name = "维修确认意见", width = 15)
    /**维修工确认结果*/
    @Excel(name = "维修工确认结果", width = 15)
    @ApiModelProperty(value = "维修工确认结果")
    private String repairConfirmResult;
    /**维修工确认意见*/
    @Excel(name = "维修工确认意见", width = 15)
    @ApiModelProperty(value = "维修确认意见")
    private String repairConfirmComment;
    /**维修确认时间*/
    @Excel(name = "维修确认时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    /**维修工确认时间*/
    @Excel(name = "维修工确认时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "维修确认时间")
    private Date repairConfirmTime;
    /**维修组长确认*/
    @Excel(name = "维修组长确认", width = 15)
    /**维修组长确认*/
    @Excel(name = "维修组长确认", width = 15)
    @ApiModelProperty(value = "维修组长确认")
    private String repairGroupLeader;
    /**维修组长意见*/
    @Excel(name = "维修组长意见", width = 15)
    /**维修组长意见*/
    @Excel(name = "维修组长意见", width = 15)
    @ApiModelProperty(value = "维修组长意见")
    private String repairGroupLeaderComment;
    /**维修组长确认时间*/
    @Excel(name = "维修组长确认时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    /**维修组长确认结果*/
    @Excel(name = "维修组长确认结果", width = 15)
    @ApiModelProperty(value = "维修组长确认结果")
    private String repairGroupLeaderResult;
    /**维修组长确认时间*/
    @Excel(name = "维修组长确认时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "维修组长确认时间")
    private Date repairGroupLeaderTime;
    /**维修组长确认*/
    @Excel(name = "维修组长确认", width = 15)
    @ApiModelProperty(value = "维修组长确认")
    /**维修组长(区长)确认*/
    @Excel(name = "维修组长(区长)确认", width = 15)
    @ApiModelProperty(value = "维修组长(区长)确认")
    private String repairDistrict;
    /**维修组长意见*/
    @Excel(name = "维修组长意见", width = 15)
    @ApiModelProperty(value = "维修组长意见")
    /**维修组长(区长)意见*/
    @Excel(name = "维修组长(区长)意见", width = 15)
    @ApiModelProperty(value = "维修组长(区长)意见")
    private String repairDistrictComment;
    /**维修组长确认时间*/
    @Excel(name = "维修组长确认时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    /**维修组长(区长)确认结果*/
    @Excel(name = "维修组长(区长)确认结果", width = 15)
    @ApiModelProperty(value = "维修组长(区长)确认结果")
    private String repairDistrictResult;
    /**维修组长(区长)确认时间*/
    @Excel(name = "维修组长确认时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "维修组长确认时间")
    @ApiModelProperty(value = "维修组长(区长)确认时间")
    private Date repairDistrictTime;
    /**原因分析核对同意、不同意*/
    @Excel(name = "原因分析核对同意、不同意", width = 15)
    /**原因分析核对同意、不同意*/
    @Excel(name = "原因分析核对同意、不同意", width = 15)
    @ApiModelProperty(value = "原因分析核对同意、不同意")
    private String checkAgree;
    /**不同意原因分析*/
    @Excel(name = "不同意原因分析", width = 15)
    /**不同意原因分析*/
    @Excel(name = "不同意原因分析", width = 15)
    @ApiModelProperty(value = "不同意原因分析")
    private String disagreeReason;
    /**整改措施*/
    @Excel(name = "整改措施", width = 15)
    /**整改措施*/
    @Excel(name = "整改措施", width = 15)
    @ApiModelProperty(value = "整改措施")
    private String rectificationMeasures;
    /**事故结论*/
    @Excel(name = "事故结论", width = 15)
    /**事故结论*/
    @Excel(name = "事故结论", width = 15)
    @ApiModelProperty(value = "事故结论")
    private String accidentConclusion;
    /**技术负责人*/
    @Excel(name = "技术负责人", width = 15)
    /**技术负责人*/
    @Excel(name = "技术负责人", width = 15)
    @ApiModelProperty(value = "技术负责人")
    private String technicalDirector;
    /**技术负责人确认时间*/
    @Excel(name = "技术负责人确认时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    /**技术负责人确认意见*/
    @Excel(name = "技术负责人确认意见", width = 15)
    @ApiModelProperty(value = "技术负责人确认意见")
    private String technicalDirectorConfirm;
    /**技术负责人确认结果*/
    @Excel(name = "技术负责人确认结果", width = 15)
    @ApiModelProperty(value = "技术负责人确认结果")
    private String technicalDirectorResult;
    /**技术负责人确认时间*/
    @Excel(name = "技术负责人确认时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "技术负责人确认时间")
    private Date technicalDirectorTime;
    /**技术主管室级领导*/
    @Excel(name = "技术主管室级领导", width = 15)
    /**技术主管室级领导*/
    @Excel(name = "技术主管室级领导", width = 15)
    @ApiModelProperty(value = "技术主管室级领导")
    private String technicalDirectorLeader;
    /**技术主管室级领导确认时间*/
    @Excel(name = "技术主管室级领导确认时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    /**技术主管室级领导确认意见*/
    @Excel(name = "技术主管室级领导确认意见", width = 15)
    @ApiModelProperty(value = "技术主管室级领导确认意见")
    private String technicalDirectorLeaderConfirm;
    /**技术主管室级领导确认结果*/
    @Excel(name = "技术主管室级领导确认结果", width = 15)
    @ApiModelProperty(value = "技术主管室级领导确认结果")
    private String technicalDirectorLeaderResult;
    /**技术主管室级领导确认时间*/
    @Excel(name = "技术主管室级领导确认时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "技术主管室级领导确认时间")
    private Date technicalDirectorLeaderTime;
    /**主管部级领导*/
    @Excel(name = "主管部级领导", width = 15)
    /**主管部级领导*/
    @Excel(name = "主管部级领导", width = 15)
    @ApiModelProperty(value = "主管部级领导")
    private String technicalDirectorPart;
    /**主管部级领导确认时间*/
    @Excel(name = "主管部级领导确认时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    /**主管部级领导确认时间*/
    @Excel(name = "主管部级领导确认时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "主管部级领导确认时间")
    private Date technicalDirectorPartTime;
    /**主管部级领导确认意见*/
    @Excel(name = "主管部级领导确认意见", width = 15)
    @ApiModelProperty(value = "主管部级领导确认意见")
    private String technicalDirectorPartConfirm;
    /**主管部级领导确认结果*/
    @Excel(name = "主管部级领导确认结果", width = 15)
    @ApiModelProperty(value = "主管部级领导确认结果")
    private String technicalDirectorPartResult;
    //列表展示
    @TableField(exist = false)
    private String equipmentCode;
@@ -267,4 +317,16 @@
    private String equipmentModel;
    @TableField(exist = false)
    private String installationPosition;
    /**废品件号*/
    @TableField(exist = false)
    @ApiModelProperty(value = "废品件号")
    private String scrapPartNumber;
    /**废品件数*/
    @TableField(exist = false)
    @ApiModelProperty(value = "废品件数")
    private String scrapPartQuantity;
    /**废品价值*/
    @TableField(exist = false)
    @ApiModelProperty(value = "废品价值")
    private String scrapPartValue;
}
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamRepairOrder.java
@@ -76,6 +76,11 @@
    @ApiModelProperty(name = "维修状态",notes = "待维修、维修中、待确认、维修完成")
    @Dict(dicCode = "repair_status")
    private String repairStatus;
    /**故障类型*/
    @Excel(name = "故障类型", width = 15)
    @ApiModelProperty(value = "故障类型")
    @Dict(dicCode = "fault_type")
    private String faultType;
    /** ç»´ä¿®å¼€å§‹æ—¶é—´ */
    @ApiModelProperty(name = "维修开始时间",notes = "")
    private Date actualStartTime;
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamRepairPerson.java
@@ -70,9 +70,9 @@
    @ApiModelProperty(value = "是否是主维修人")
    @Dict(dicCode = "yn")
    private String repairPrimary;
    /**维修时长*/
    @Excel(name = "维修时长", width = 15)
    @ApiModelProperty(value = "维修时长")
    /**维修时长(小时)*/
    @Excel(name = "维修时长(小时)", width = 15)
    @ApiModelProperty(value = "维修时长(小时)")
    private String repairDuration;
    /**备注*/
    @Excel(name = "备注", width = 15)
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/entity/EamReportAccidentsRegister.java
@@ -63,6 +63,10 @@
    @Excel(name = "设备ID", width = 15)
    @ApiModelProperty(value = "设备ID")
    private String equipmentId;
    /**登记状态*/
    @ApiModelProperty(value = "登记状态")
    @Dict(dicCode = "eam_report_accidents_register_status")
    private String registerStatus;
    /**是否有设备操作证 æ˜¯å¦*/
    @Excel(name = "是否有设备操作证 æ˜¯å¦", width = 15)
    @ApiModelProperty(value = "是否有设备操作证 æ˜¯å¦")
@@ -120,7 +124,7 @@
    private String district;
    /**区长确认*/
    @Excel(name = "区长确认", width = 15)
    @ApiModelProperty(value = "区长确认")
    @ApiModelProperty(value = "区长确认意见")
    private String districtConfirm;
    /**区长确认时间*/
    @Excel(name = "区长确认时间", width = 15, format = "yyyy-MM-dd")
@@ -128,14 +132,22 @@
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "区长确认时间")
    private Date districtTime;
    /**区长确认结果*/
    @Excel(name = "区长确认结果", width = 15)
    @ApiModelProperty(value = "区长确认结果")
    private String districtResult;
    /**中心主任*/
    @Excel(name = "中心主任", width = 15)
    @ApiModelProperty(value = "中心主任")
    private String centerDirector;
    /**中心主任确认*/
    @Excel(name = "中心主任确认", width = 15)
    @ApiModelProperty(value = "中心主任确认")
    @ApiModelProperty(value = "中心主任确认意见")
    private String centerDirectorConfirm;
    /**中心主任确认结果*/
    @Excel(name = "中心主任确认结果", width = 15)
    @ApiModelProperty(value = "中心主任确认结果")
    private String centerDirectorResult;
    /**中心主任确认时间*/
    @Excel(name = "中心主任确认时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@@ -174,16 +186,20 @@
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "建议采取措施时间")
    private Date suggestionTakeStepsTime;
    /**维修确认*/
    @Excel(name = "维修确认", width = 15)
    /**维修工确认*/
    @Excel(name = "维修工确认", width = 15)
    @ApiModelProperty(value = "维修确认")
    private String repairConfirm;
    /**维修确认意见*/
    @Excel(name = "维修确认意见", width = 15)
    /**维修工确认结果*/
    @Excel(name = "维修工确认结果", width = 15)
    @ApiModelProperty(value = "维修工确认结果")
    private String repairConfirmResult;
    /**维修工确认意见*/
    @Excel(name = "维修工确认意见", width = 15)
    @ApiModelProperty(value = "维修确认意见")
    private String repairConfirmComment;
    /**维修确认时间*/
    @Excel(name = "维修确认时间", width = 15, format = "yyyy-MM-dd")
    /**维修工确认时间*/
    @Excel(name = "维修工确认时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "维修确认时间")
@@ -196,25 +212,33 @@
    @Excel(name = "维修组长意见", width = 15)
    @ApiModelProperty(value = "维修组长意见")
    private String repairGroupLeaderComment;
    /**维修组长确认结果*/
    @Excel(name = "维修组长确认结果", width = 15)
    @ApiModelProperty(value = "维修组长确认结果")
    private String repairGroupLeaderResult;
    /**维修组长确认时间*/
    @Excel(name = "维修组长确认时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "维修组长确认时间")
    private Date repairGroupLeaderTime;
    /**维修组长确认*/
    @Excel(name = "维修组长确认", width = 15)
    @ApiModelProperty(value = "维修组长确认")
    /**维修组长(区长)确认*/
    @Excel(name = "维修组长(区长)确认", width = 15)
    @ApiModelProperty(value = "维修组长(区长)确认")
    private String repairDistrict;
    /**维修组长意见*/
    @Excel(name = "维修组长意见", width = 15)
    @ApiModelProperty(value = "维修组长意见")
    /**维修组长(区长)意见*/
    @Excel(name = "维修组长(区长)意见", width = 15)
    @ApiModelProperty(value = "维修组长(区长)意见")
    private String repairDistrictComment;
    /**维修组长确认时间*/
    /**维修组长(区长)确认结果*/
    @Excel(name = "维修组长(区长)确认结果", width = 15)
    @ApiModelProperty(value = "维修组长(区长)确认结果")
    private String repairDistrictResult;
    /**维修组长(区长)确认时间*/
    @Excel(name = "维修组长确认时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "维修组长确认时间")
    @ApiModelProperty(value = "维修组长(区长)确认时间")
    private Date repairDistrictTime;
    /**原因分析核对同意、不同意*/
    @Excel(name = "原因分析核对同意、不同意", width = 15)
@@ -236,6 +260,14 @@
    @Excel(name = "技术负责人", width = 15)
    @ApiModelProperty(value = "技术负责人")
    private String technicalDirector;
    /**技术负责人确认意见*/
    @Excel(name = "技术负责人确认意见", width = 15)
    @ApiModelProperty(value = "技术负责人确认意见")
    private String technicalDirectorConfirm;
    /**技术负责人确认结果*/
    @Excel(name = "技术负责人确认结果", width = 15)
    @ApiModelProperty(value = "技术负责人确认结果")
    private String technicalDirectorResult;
    /**技术负责人确认时间*/
    @Excel(name = "技术负责人确认时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@@ -246,6 +278,14 @@
    @Excel(name = "技术主管室级领导", width = 15)
    @ApiModelProperty(value = "技术主管室级领导")
    private String technicalDirectorLeader;
    /**技术主管室级领导确认意见*/
    @Excel(name = "技术主管室级领导确认意见", width = 15)
    @ApiModelProperty(value = "技术主管室级领导确认意见")
    private String technicalDirectorLeaderConfirm;
    /**技术主管室级领导确认结果*/
    @Excel(name = "技术主管室级领导确认结果", width = 15)
    @ApiModelProperty(value = "技术主管室级领导确认结果")
    private String technicalDirectorLeaderResult;
    /**技术主管室级领导确认时间*/
    @Excel(name = "技术主管室级领导确认时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@@ -262,6 +302,14 @@
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "主管部级领导确认时间")
    private Date technicalDirectorPartTime;
    /**主管部级领导确认意见*/
    @Excel(name = "主管部级领导确认意见", width = 15)
    @ApiModelProperty(value = "主管部级领导确认意见")
    private String technicalDirectorPartConfirm;
    /**主管部级领导确认结果*/
    @Excel(name = "主管部级领导确认结果", width = 15)
    @ApiModelProperty(value = "主管部级领导确认结果")
    private String technicalDirectorPartResult;
    //列表展示
    @TableField(exist = false)
    private String equipmentCode;
@@ -271,4 +319,16 @@
    private String equipmentModel;
    @TableField(exist = false)
    private String installationPosition;
    /**废品件号*/
    @TableField(exist = false)
    @ApiModelProperty(value = "废品件号")
    private String scrapPartNumber;
    /**废品件数*/
    @TableField(exist = false)
    @ApiModelProperty(value = "废品件数")
    private String scrapPartQuantity;
    /**废品价值*/
    @TableField(exist = false)
    @ApiModelProperty(value = "废品价值")
    private String scrapPartValue;
}
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/mapper/xml/EamReportAccidentsRegisterMapper.xml
@@ -8,7 +8,10 @@
            e.equipment_code,
            e.equipment_name,
            e.equipment_model,
            e.installation_position
            e.installation_position,
            wmo.scrap_part_number,
            wmo.scrap_part_quantity,
            wmo.scrap_part_value
        FROM eam_report_accidents_register aar
                 LEFT JOIN eam_report_repair wmo
                           ON aar.report_id = wmo.id
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/request/EamReportAccidentsRegisterQuery.java
@@ -54,6 +54,10 @@
    @Excel(name = "设备ID", width = 15)
    @ApiModelProperty(value = "设备ID")
    private String equipmentId;
    /**登记状态*/
    @ApiModelProperty(value = "登记状态")
    @Dict(dicCode = "eam_report_accidents_register_status")
    private String registerStatus;
    /**是否有设备操作证 æ˜¯å¦*/
    @Excel(name = "是否有设备操作证 æ˜¯å¦", width = 15)
    @ApiModelProperty(value = "是否有设备操作证 æ˜¯å¦")
@@ -264,4 +268,16 @@
    private String installationPosition;
    private String column;
    private String order;
    /**废品件号*/
    @TableField(exist = false)
    @ApiModelProperty(value = "废品件号")
    private String scrapPartNumber;
    /**废品件数*/
    @TableField(exist = false)
    @ApiModelProperty(value = "废品件数")
    private String scrapPartQuantity;
    /**废品价值*/
    @TableField(exist = false)
    @ApiModelProperty(value = "废品价值")
    private String scrapPartValue;
}
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/IEamReportAccidentsRegisterService.java
@@ -41,6 +41,12 @@
    Result<?> submit(String id);
    /**
     * æµç¨‹å®¡æ ¸
     * @param eamReportAccidentsRegisterDto
     */
    Result<?> audit(EamReportAccidentsRegisterDto eamReportAccidentsRegisterDto);
    /**
     * åˆ é™¤
     * @param id
     * @return
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamRepairOrderServiceImpl.java
@@ -212,14 +212,16 @@
        }
        eamReportRepair.setReportStatus(EamRepairOrderRepairStatusEnum.UNDER_MAINTENANCE.name());
        eamReportRepairService.updateById(eamReportRepair);
        List<EamRepairPerson> eamRepairPersonList=new ArrayList<>();
        iEamRepairPersonService.remove(new QueryWrapper<EamRepairPerson>().eq("repair_id",eamRepairOrderDto.getId()));
        if(CollectionUtils.isNotEmpty(eamRepairOrderDto.getEamRepairPersonList())) {
            List<EamRepairPerson> persons = eamRepairOrderDto.getEamRepairPersonList().stream()
                    .map(person -> new EamRepairPerson()
                            .setRepairId(eamRepairOrder.getId())
                            .setDelFlag(CommonConstant.DEL_FLAG_0))
                    .collect(Collectors.toList());
            iEamRepairPersonService.saveBatch(persons);
        if (CollectionUtils.isNotEmpty(eamRepairOrderDto.getEamRepairPersonList())) {
            eamRepairOrderDto.getEamRepairPersonList().forEach(eamRepairPerson -> {
                eamRepairPerson.setId(null);
                eamRepairPerson.setRepairId(eamRepairOrder.getId());
                eamRepairPerson.setDelFlag(CommonConstant.DEL_FLAG_0);
                eamRepairPersonList.add(eamRepairPerson);
            });
            iEamRepairPersonService.saveBatch(eamRepairPersonList);
        }
        return true;
    }
@@ -233,7 +235,27 @@
        if (CollectionUtils.isEmpty(eamRepairPersonList)) {
            throw new RuntimeException("维修人员不能为空");
        }
        if (StrUtil.isEmpty(eamRepairOrder.getRepairCode())) {}
        if (StrUtil.isEmpty(eamRepairOrder.getRepairCode())) {
            throw new RuntimeException("工单编号为空");
        }
        if (eamRepairOrder.getActualStartTime()==null){
            throw new RuntimeException("维修开始时间为空");
        }
        if (eamRepairOrder.getActualEndTime()==null){
            throw new RuntimeException("维修结束时间为空");
        }
        if (StrUtil.isEmpty(eamRepairOrder.getFaultReason())){
            throw new RuntimeException("故障原因为空");
        }
        if (StrUtil.isEmpty(eamRepairOrder.getFaultAnalysis())){
            throw new RuntimeException("故障分析为空");
        }
        if (StrUtil.isEmpty(eamRepairOrder.getFaultProcess())){
            throw new RuntimeException("排故过程为空");
        }
        if (StrUtil.isEmpty(eamRepairOrder.getFaultPrevent())){
            throw new RuntimeException("故障预防为空");
        }
        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
        EamEquipment eamEquipment = eamEquipmentService.getById(eamRepairOrder.getEquipmentId());
        List<UserSelector> userSelectorList = sysUserService.selectOperatorList(eamEquipment.getEquipmentCode(), eamEquipment.getFactoryOrgCode(), BusinessCodeConst.PCR0001);
lxzn-module-eam-common/src/main/java/org/jeecg/modules/eam/service/impl/EamReportAccidentsRegisterServiceImpl.java
@@ -1,5 +1,8 @@
package org.jeecg.modules.eam.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
@@ -8,33 +11,44 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.flowable.engine.TaskService;
import org.flowable.task.api.Task;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.constant.DataBaseConstant;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.eam.constant.*;
import org.jeecg.modules.eam.dto.EamReportAccidentsRegisterDto;
import org.jeecg.modules.eam.entity.EamReportAccidentsRegister;
import org.jeecg.modules.eam.entity.EamReportProductHazards;
import org.jeecg.modules.eam.entity.EamReportRepair;
import org.jeecg.modules.eam.entity.*;
import org.jeecg.modules.eam.mapper.EamReportAccidentsRegisterMapper;
import org.jeecg.modules.eam.request.EamReportAccidentsRegisterQuery;
import org.jeecg.modules.eam.service.IEamEquipmentService;
import org.jeecg.modules.eam.service.IEamReportAccidentsRegisterService;
import org.jeecg.modules.eam.service.IEamReportRepairService;
import org.jeecg.modules.flowable.apithird.business.entity.FlowMyBusiness;
import org.jeecg.modules.flowable.apithird.business.service.IFlowMyBusinessService;
import org.jeecg.modules.flowable.apithird.service.FlowCallBackServiceI;
import org.jeecg.modules.flowable.apithird.service.FlowCommonService;
import org.jeecg.modules.flowable.service.IFlowDefinitionService;
import org.jeecg.modules.flowable.service.IFlowTaskService;
import org.jeecg.modules.system.entity.BaseFactory;
import org.jeecg.modules.system.entity.BaseFactoryUser;
import org.jeecg.modules.system.service.IBaseFactoryService;
import org.jeecg.modules.system.service.IBaseFactoryUserService;
import org.jeecg.modules.system.service.ISysUserService;
import org.jeecg.modules.system.vo.UserSelector;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import javax.annotation.Resource;
import java.util.*;
import java.util.stream.Collectors;
/**
@@ -43,8 +57,8 @@
 * @Date:   2025-07-17
 * @Version: V1.0
 */
@Service
public class EamReportAccidentsRegisterServiceImpl extends ServiceImpl<EamReportAccidentsRegisterMapper, EamReportAccidentsRegister> implements IEamReportAccidentsRegisterService {
@Service("IEamReportAccidentsRegisterService")
public class EamReportAccidentsRegisterServiceImpl extends ServiceImpl<EamReportAccidentsRegisterMapper, EamReportAccidentsRegister> implements IEamReportAccidentsRegisterService, FlowCallBackServiceI {
    @Autowired
    private IBaseFactoryUserService baseFactoryUserService;
@@ -53,6 +67,26 @@
    @Autowired
    @Lazy
    private IEamReportRepairService iEamReportRepairService;
    @Resource
    private FlowCommonService flowCommonService;
    @Resource
    private IFlowDefinitionService flowDefinitionService;
    @Resource
    private IEamEquipmentService eamEquipmentService;
    @Resource
    private IFlowMyBusinessService flowMyBusinessService;
    @Resource
    private TaskService taskService;
    @Resource
    private IFlowTaskService flowTaskService;
    @Autowired
    private ISysUserService sysUserService;
    /**
     * åˆ†é¡µåˆ—表
     * @param page
@@ -127,6 +161,13 @@
            return false;
        }
        BeanUtils.copyProperties(eamReportAccidentsRegisterDto,eamReportAccidentsRegister);
        eamReportAccidentsRegister.setRegisterStatus(EamReportAccidentsRegisterEnum.PENDING_SUBMIT.name());
        UpdateWrapper<EamReportRepair> updateWrapper = new UpdateWrapper<>();
        updateWrapper.eq("id",eamReportAccidentsRegister.getReportId());
        updateWrapper.set("scrap_part_number",eamReportAccidentsRegister.getScrapPartNumber());
        updateWrapper.set("scrap_part_quantity",eamReportAccidentsRegister.getScrapPartQuantity());
        updateWrapper.set("scrap_part_value",eamReportAccidentsRegister.getScrapPartValue());
        iEamReportRepairService.update(updateWrapper);
        this.updateById(eamReportAccidentsRegister);
        return true;
    }
@@ -137,8 +178,329 @@
     * @return
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public Result<?> submit(String id){
        return null;
        EamReportAccidentsRegister eamReportAccidentsRegister=this.getById(id);
        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
        EamEquipment eamEquipment = eamEquipmentService.getById(eamReportAccidentsRegister.getEquipmentId());
        List<UserSelector> userSelectorList = sysUserService.selectOperatorList(eamEquipment.getEquipmentCode(), eamEquipment.getFactoryOrgCode(), BusinessCodeConst.PCR0019);
        // å¯åŠ¨è®¾å¤‡äº‹æ•…ç™»è®°æµç¨‹
        flowCommonService.initActBusiness("设备编号:" + eamEquipment.getEquipmentCode() + ", è®¾å¤‡åç§°ï¼š" + eamEquipment.getEquipmentName()+"发起设备事故登记流程",
                eamReportAccidentsRegister.getId(),
                "IEamReportAccidentsRegisterService",
                "eam_report_accidents_register",
                null);
        Map<String, Object> variables = new HashMap<>();
        variables.put("dataId", eamReportAccidentsRegister.getId());
        variables.put("organization", "操作工提交启动流程");
        variables.put("comment", "操作工提交单启动流程");
        variables.put("proofreading", true);
        if (CollectionUtils.isEmpty(userSelectorList)) {
            throw new JeecgBootException("设备未存在区长,无法进入下级审批!");
        }else {
            List<String> usernameList = userSelectorList.stream().map(UserSelector::getUsername).collect(Collectors.toList());
            variables.put("NextAssignee", usernameList);
        }
        Result result = flowDefinitionService.startProcessInstanceByKey("eam_report_accidents_register", variables);
        if (!result.isSuccess()) {
            return Result.error("流程启动失败");
        } else {
            eamReportAccidentsRegister.setConfirmer(user.getUsername());
            eamReportAccidentsRegister.setConfirmTime(new Date());
            eamReportAccidentsRegister.setRegisterStatus(EamReportAccidentsRegisterEnum.PENDING_REGIONAL_MANAGER.name());
            this.updateById(eamReportAccidentsRegister);
            return result;
        }
    }
    /**
     * æµç¨‹å®¡æ ¸
     * @param eamReportAccidentsRegisterDto
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public Result<?> audit(EamReportAccidentsRegisterDto eamReportAccidentsRegisterDto){
        EamReportAccidentsRegister eamReportAccidentsRegister = this.baseMapper.selectById(eamReportAccidentsRegisterDto.getId());
        if (eamReportAccidentsRegister == null) {
            throw new JeecgBootException("维修工单不存在,请刷新重试!");
        }
        // èŽ·å–å½“å‰ç™»å½•ç”¨æˆ·
        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
        if (user == null || StrUtil.isBlank(user.getId())) {
            throw new JeecgBootException("未获取到登录用户,请重新登录后再试!");
        }
        eamReportAccidentsRegisterDto.setAssignee(user.getUsername());
        // èŽ·å–æµç¨‹ä¸šåŠ¡è®°å½•
        FlowMyBusiness flowMyBusiness = flowMyBusinessService.getFlowMyBusiness(eamReportAccidentsRegisterDto.getInstanceId());
        if (flowMyBusiness == null) {
            throw new JeecgBootException("流程实例不存在,请刷新后重试!");
        }
        boolean userAuthorized = isUserAuthorized(flowMyBusiness, user);
        if (!userAuthorized) {
            throw new JeecgBootException("用户无权操作此任务,请刷新后重试!");
        }
        // è®¤é¢†ä»»åŠ¡
        if (!claimTask(flowMyBusiness.getTaskId(), user)) {
            throw new JeecgBootException("任务不存在、已完成或已被他人认领!");
        }
        EamEquipment equipment = eamEquipmentService.getById(eamReportAccidentsRegisterDto.getEquipmentId());
        if (equipment == null) {
            throw new JeecgBootException("设备不存在,请检查!");
        }
        EamReportAccidentsRegisterEnum status = EamReportAccidentsRegisterEnum.getInstance(eamReportAccidentsRegister.getRegisterStatus());
        if (status == null) {
            return null;
        }
        //流程变量
        Map<String, Object> values = new HashMap<>();
        List<String> userApprovalList;
        List<UserSelector> userSelectors;
        switch (status) {
            //待区长处理
            case PENDING_REGIONAL_MANAGER:
                userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0020);
                if (CollectionUtil.isEmpty(userSelectors)) {
                    throw new JeecgBootException("设备未存在中心主任,无法进入下级审批!");
                }else{
                    userApprovalList= userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList());
                    values.put("NextAssignee", userApprovalList);
                    values.put("dataId", eamReportAccidentsRegisterDto.getId());
                    if (StrUtil.isEmpty(eamReportAccidentsRegisterDto.getDistrictConfirm())){
                        eamReportAccidentsRegisterDto.setDistrictConfirm("");
                    }
                    values.put("organization",eamReportAccidentsRegisterDto.getDistrictConfirm());
                    values.put("comment", eamReportAccidentsRegisterDto.getDistrictConfirm());
                    eamReportAccidentsRegisterDto.setComment(eamReportAccidentsRegisterDto.getDistrictConfirm());
                    eamReportAccidentsRegister.setDistrict(user.getUsername());
                    eamReportAccidentsRegister.setDistrictTime(new Date());
                    eamReportAccidentsRegister.setDistrictResult(eamReportAccidentsRegisterDto.getDistrictResult());
                    eamReportAccidentsRegister.setDistrictConfirm(eamReportAccidentsRegisterDto.getDistrictConfirm());
                    if ("2".equals(eamReportAccidentsRegisterDto.getDistrictResult())){
                        //区长拒绝
                        eamReportAccidentsRegister.setRegisterStatus(EamReportAccidentsRegisterEnum.REJECTED.name());
                    }else {
                        eamReportAccidentsRegister.setRegisterStatus(EamReportAccidentsRegisterEnum.PENDING_CENTER_MANAGER.name());
                    }
                }
                break;
            //待中心主任处理
            case PENDING_CENTER_MANAGER:
                userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0002);
                if (CollectionUtil.isEmpty(userSelectors)) {
                    throw new JeecgBootException("设备未存在维修工,无法进入下级审批!");
                }else{
                    userApprovalList= userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList());
                    values.put("NextAssignee", userApprovalList);
                    values.put("dataId", eamReportAccidentsRegisterDto.getId());
                    if (StrUtil.isEmpty(eamReportAccidentsRegisterDto.getCenterDirectorConfirm())){
                        eamReportAccidentsRegisterDto.setCenterDirectorConfirm("");
                    }
                    values.put("organization",eamReportAccidentsRegisterDto.getCenterDirectorConfirm());
                    values.put("comment", eamReportAccidentsRegisterDto.getCenterDirectorConfirm());
                    eamReportAccidentsRegisterDto.setComment(eamReportAccidentsRegisterDto.getCenterDirectorConfirm());
                    eamReportAccidentsRegister.setCenterDirector(user.getUsername());
                    eamReportAccidentsRegister.setCenterDirectorTime(new Date());
                    eamReportAccidentsRegister.setCenterDirectorResult(eamReportAccidentsRegisterDto.getCenterDirectorResult());
                    eamReportAccidentsRegister.setCenterDirectorConfirm(eamReportAccidentsRegisterDto.getCenterDirectorConfirm());
                    if ("2".equals(eamReportAccidentsRegisterDto.getCenterDirectorResult())){
                        //中心主任拒绝
                        eamReportAccidentsRegister.setRegisterStatus(EamReportAccidentsRegisterEnum.REJECTED.name());
                    }else {
                        eamReportAccidentsRegister.setRegisterStatus(EamReportAccidentsRegisterEnum.PENDING_REPAIR_WORKER.name());
                    }
                }
                break;
            //待维修工处理
            case PENDING_REPAIR_WORKER:
                userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0008);
                if (CollectionUtil.isEmpty(userSelectors)) {
                    throw new JeecgBootException("设备未存在维修组长,无法进入下级审批!");
                }else{
                    userApprovalList= userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList());
                    values.put("NextAssignee", userApprovalList);
                    values.put("dataId", eamReportAccidentsRegisterDto.getId());
                    if (StrUtil.isEmpty(eamReportAccidentsRegisterDto.getRepairConfirmComment())){
                        eamReportAccidentsRegisterDto.setRepairConfirmComment("");
                    }
                    values.put("organization",eamReportAccidentsRegisterDto.getRepairConfirmComment());
                    values.put("comment", eamReportAccidentsRegisterDto.getRepairConfirmComment());
                    eamReportAccidentsRegisterDto.setComment(eamReportAccidentsRegisterDto.getRepairConfirmComment());
                    eamReportAccidentsRegister.setRepairConfirm(user.getUsername());
                    eamReportAccidentsRegister.setRepairConfirmTime(new Date());
                    eamReportAccidentsRegister.setRepairConfirmResult(eamReportAccidentsRegisterDto.getRepairConfirmResult());
                    eamReportAccidentsRegister.setRepairConfirmComment(eamReportAccidentsRegisterDto.getRepairConfirmComment());
                    eamReportAccidentsRegister.setReportStartTime(eamReportAccidentsRegisterDto.getReportStartTime());
                    eamReportAccidentsRegister.setEquipmentStatus(eamReportAccidentsRegisterDto.getEquipmentStatus());
                    eamReportAccidentsRegister.setCauseAnalysis(eamReportAccidentsRegisterDto.getCauseAnalysis());
                    eamReportAccidentsRegister.setInspectionResults(eamReportAccidentsRegisterDto.getInspectionResults());
                    eamReportAccidentsRegister.setTakeSteps(eamReportAccidentsRegisterDto.getTakeSteps());
                    eamReportAccidentsRegister.setSuggestionTakeSteps(eamReportAccidentsRegisterDto.getSuggestionTakeSteps());
                    eamReportAccidentsRegister.setSuggestionTakeStepsTime(eamReportAccidentsRegisterDto.getSuggestionTakeStepsTime());
                    if ("2".equals(eamReportAccidentsRegisterDto.getRepairConfirmResult())){
                        //维修组长拒绝
                        eamReportAccidentsRegister.setRegisterStatus(EamReportAccidentsRegisterEnum.REJECTED.name());
                    }else {
                        eamReportAccidentsRegister.setRegisterStatus(EamReportAccidentsRegisterEnum.PENDING_REPAIR_TEAM_LEADER.name());
                    }
                }
                break;
            //待维修组长处理
            case PENDING_REPAIR_TEAM_LEADER:
                userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0013);
                if (CollectionUtil.isEmpty(userSelectors)) {
                    throw new JeecgBootException("设备未存在维修组长,无法进入下级审批");
                }
                userApprovalList= userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList());
                values.put("NextAssignee", userApprovalList);
                if (StrUtil.isEmpty(eamReportAccidentsRegisterDto.getRepairGroupLeaderComment())){
                    eamReportAccidentsRegisterDto.setRepairGroupLeaderComment("");
                }
                values.put("organization",eamReportAccidentsRegisterDto.getRepairGroupLeaderComment());
                values.put("comment", eamReportAccidentsRegisterDto.getRepairGroupLeaderComment());
                eamReportAccidentsRegisterDto.setComment(eamReportAccidentsRegisterDto.getRepairGroupLeaderComment());
                eamReportAccidentsRegister.setRepairGroupLeader(user.getUsername());
                eamReportAccidentsRegister.setRepairGroupLeaderTime(new Date());
                eamReportAccidentsRegister.setRepairGroupLeaderResult(eamReportAccidentsRegisterDto.getRepairGroupLeaderResult());
                eamReportAccidentsRegister.setRepairGroupLeaderComment(eamReportAccidentsRegisterDto.getRepairGroupLeaderComment());
                if ("2".equals(eamReportAccidentsRegisterDto.getRepairGroupLeaderResult())){
                    //维修组长拒绝
                    eamReportAccidentsRegister.setRegisterStatus(EamReportAccidentsRegisterEnum.REJECTED.name());
                }else {
                    eamReportAccidentsRegister.setRegisterStatus(EamReportAccidentsRegisterEnum.PENDING_REPAIR_REGIONAL_MANAGER.name());
                }
                break;
            //待维修区长处理
            case PENDING_REPAIR_REGIONAL_MANAGER:
                userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0021);
                if (CollectionUtil.isEmpty(userSelectors)) {
                    throw new JeecgBootException("设备未存在技术负责人,无法进入下级审批");
                }
                userApprovalList= userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList());
                values.put("NextAssignee", userApprovalList);
                if (StrUtil.isEmpty(eamReportAccidentsRegisterDto.getRepairDistrictComment())){
                    eamReportAccidentsRegisterDto.setRepairDistrictComment("");
                }
                values.put("organization",eamReportAccidentsRegisterDto.getRepairDistrictComment());
                values.put("comment", eamReportAccidentsRegisterDto.getRepairDistrictComment());
                eamReportAccidentsRegisterDto.setComment(eamReportAccidentsRegisterDto.getRepairDistrictComment());
                eamReportAccidentsRegister.setRepairDistrict(user.getUsername());
                eamReportAccidentsRegister.setRepairDistrictTime(new Date());
                eamReportAccidentsRegister.setRepairDistrictResult(eamReportAccidentsRegisterDto.getRepairDistrictResult());
                eamReportAccidentsRegister.setRepairDistrictComment(eamReportAccidentsRegisterDto.getRepairDistrictComment());
                if ("2".equals(eamReportAccidentsRegisterDto.getCenterDirectorResult())){
                    //维修区长拒绝
                    eamReportAccidentsRegister.setRegisterStatus(EamReportAccidentsRegisterEnum.REJECTED.name());
                }else {
                    eamReportAccidentsRegister.setRegisterStatus(EamReportAccidentsRegisterEnum.PENDING_REPAIR_REGIONAL_MANAGER.name());
                }
                break;
            //待技术负责人处理
            case PENDING_TECHNICAL_RESPONSIBLE:
                userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0022);
                if (CollectionUtil.isEmpty(userSelectors)) {
                    throw new JeecgBootException("设备未存在技术主管室级领导,无法进入下级审批");
                }
                userApprovalList= userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList());
                values.put("NextAssignee", userApprovalList);
                if (StrUtil.isEmpty(eamReportAccidentsRegisterDto.getTechnicalDirectorConfirm())){
                    eamReportAccidentsRegisterDto.setTechnicalDirectorConfirm("");
                }
                values.put("organization",eamReportAccidentsRegisterDto.getTechnicalDirectorConfirm());
                values.put("comment", eamReportAccidentsRegisterDto.getTechnicalDirectorConfirm());
                eamReportAccidentsRegisterDto.setComment(eamReportAccidentsRegisterDto.getTechnicalDirectorConfirm());
                eamReportAccidentsRegister.setCheckAgree(eamReportAccidentsRegisterDto.getCheckAgree());
                eamReportAccidentsRegister.setDisagreeReason(eamReportAccidentsRegisterDto.getDisagreeReason());
                eamReportAccidentsRegister.setRectificationMeasures(eamReportAccidentsRegisterDto.getRectificationMeasures());
                eamReportAccidentsRegister.setAccidentConclusion(eamReportAccidentsRegisterDto.getAccidentConclusion());
                eamReportAccidentsRegister.setTechnicalDirector(user.getUsername());
                eamReportAccidentsRegister.setTechnicalDirectorTime(new Date());
                eamReportAccidentsRegister.setTechnicalDirectorResult(eamReportAccidentsRegisterDto.getTechnicalDirectorResult());
                eamReportAccidentsRegister.setTechnicalDirectorConfirm(eamReportAccidentsRegisterDto.getTechnicalDirectorConfirm());
                if ("2".equals(eamReportAccidentsRegisterDto.getCenterDirectorResult())){
                    //技术负责人拒绝
                    eamReportAccidentsRegister.setRegisterStatus(EamReportAccidentsRegisterEnum.REJECTED.name());
                }else {
                    eamReportAccidentsRegister.setRegisterStatus(EamReportAccidentsRegisterEnum.PENDING_TECHNICAL_SUPERVISOR.name());
                }
                break;
            //待技术主管室级领导处理
            case PENDING_TECHNICAL_SUPERVISOR:
                userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0023);
                if (CollectionUtil.isEmpty(userSelectors)) {
                    throw new JeecgBootException("设备未存在主管部级领导,无法进入下级审批");
                }
                userApprovalList= userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList());
                values.put("NextAssignee", userApprovalList);
                if (StrUtil.isEmpty(eamReportAccidentsRegisterDto.getTechnicalDirectorLeaderConfirm())){
                    eamReportAccidentsRegisterDto.setTechnicalDirectorLeaderConfirm("");
                }
                values.put("organization",eamReportAccidentsRegisterDto.getTechnicalDirectorLeaderConfirm());
                values.put("comment", eamReportAccidentsRegisterDto.getTechnicalDirectorLeaderConfirm());
                eamReportAccidentsRegisterDto.setComment(eamReportAccidentsRegisterDto.getTechnicalDirectorLeaderConfirm());
                eamReportAccidentsRegister.setTechnicalDirectorLeader(user.getUsername());
                eamReportAccidentsRegister.setTechnicalDirectorLeaderTime(new Date());
                eamReportAccidentsRegister.setTechnicalDirectorLeaderResult(eamReportAccidentsRegisterDto.getTechnicalDirectorLeaderResult());
                eamReportAccidentsRegister.setTechnicalDirectorLeaderConfirm(eamReportAccidentsRegisterDto.getTechnicalDirectorLeaderConfirm());
                if ("2".equals(eamReportAccidentsRegisterDto.getCenterDirectorResult())){
                    //技术主管室级领导拒绝
                    eamReportAccidentsRegister.setRegisterStatus(EamReportAccidentsRegisterEnum.REJECTED.name());
                }else {
                    eamReportAccidentsRegister.setRegisterStatus(EamReportAccidentsRegisterEnum.PENDING_SUPERIOR_DEPARTMENT.name());
                }
                break;
            //待主管部级领导处理
            case PENDING_SUPERIOR_DEPARTMENT:
                if (StrUtil.isEmpty(eamReportAccidentsRegisterDto.getTechnicalDirectorPartConfirm())){
                    eamReportAccidentsRegisterDto.setTechnicalDirectorPartConfirm("");
                }
                values.put("organization",eamReportAccidentsRegisterDto.getTechnicalDirectorPartConfirm());
                values.put("comment", eamReportAccidentsRegisterDto.getTechnicalDirectorPartConfirm());
                eamReportAccidentsRegisterDto.setComment(eamReportAccidentsRegisterDto.getTechnicalDirectorPartConfirm());
                eamReportAccidentsRegister.setTechnicalDirectorPart(user.getUsername());
                eamReportAccidentsRegister.setTechnicalDirectorPartTime(new Date());
                eamReportAccidentsRegister.setTechnicalDirectorPartResult(eamReportAccidentsRegisterDto.getTechnicalDirectorPartResult());
                eamReportAccidentsRegister.setTechnicalDirectorPartConfirm(eamReportAccidentsRegisterDto.getTechnicalDirectorPartConfirm());
                if ("2".equals(eamReportAccidentsRegisterDto.getCenterDirectorResult())){
                    //技术主管室级领导拒绝
                    eamReportAccidentsRegister.setRegisterStatus(EamReportAccidentsRegisterEnum.REJECTED.name());
                }else {
                    eamReportAccidentsRegister.setRegisterStatus(EamReportAccidentsRegisterEnum.REPAIR_COMPLETED.name());
                }
                break;
            default:
                throw  new JeecgBootException("审批失败");
        }
        eamReportAccidentsRegisterDto.setValues(values);
        Result result = flowTaskService.complete(eamReportAccidentsRegisterDto);
        if (!result.isSuccess()) {
            throw new JeecgBootException("审批失败,请刷新查看!");
        }
        //保存工单
        this.updateById(eamReportAccidentsRegister);
        return result;
    }
    private boolean claimTask(String taskId, LoginUser user) {
        Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
        if (task == null) {
            return false;
        }
        if (task.getAssignee() != null && !task.getAssignee().equals(user.getUsername())) {
            return false;
        }
        taskService.claim(taskId, user.getUsername());
        return true;
    }
    /**
     * åˆ¤æ–­ç”¨æˆ·æ˜¯å¦æ‹¥æœ‰æ­¤æƒé™
     * @param flowMyBusiness
     * @param user
     * @return
     */
    private boolean isUserAuthorized(FlowMyBusiness flowMyBusiness, LoginUser user) {
        List<String> todoUsers = JSON.parseArray(flowMyBusiness.getTodoUsers(), String.class);
        return todoUsers != null && todoUsers.contains(user.getUsername());
    }
    /**
@@ -167,4 +529,26 @@
        this.removeById(id);
        return true;
    }
    @Override
    public void afterFlowHandle(FlowMyBusiness business) {
    }
    @Override
    public Object getBusinessDataById(String dataId) {
        return null;
    }
    @Override
    public Map<String, Object> flowValuesOfTask(String taskNameId, Map<String, Object> values) {
        return Collections.emptyMap();
    }
    @Override
    public List<String> flowCandidateUsernamesOfTask(String taskNameId, Map<String, Object> values) {
        //获取下一步处理人
        Object object = values.get("NextAssignee");
        return (List<String>) object;
    }
}
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamRepairOrderController.java
@@ -86,7 +86,7 @@
        // æ ¡éªŒé¢†å–权限
        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
        if (!BusinessCodeConst.PCR0002.equals(user.getPost())) {
            return Result.error("提交失败,没有提交权限!,请登录维修工岗位用户");
            return Result.error("提交失败,没有提交权限!,需维修工提交");
        }
        eamRepairOrderService.saveRepairOrder(id);
        return Result.OK("提交成功!");
@@ -137,7 +137,7 @@
        // æ ¡éªŒé¢†å–权限
        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
        if (!BusinessCodeConst.PCR0002.equals(user.getPost())) {
            return Result.error("填报失败,没有填报权限!,请登录维修工岗位用户");
            return Result.error("填报失败,没有填报权限!,需维修工提交");
        }
        if (eamRepairOrderDto == null) {
            return Result.error("填报的对象不能为空!");
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportAccidentsRegisterController.java
@@ -10,6 +10,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.util.StrUtil;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
@@ -17,7 +18,9 @@
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.eam.constant.BusinessCodeConst;
import org.jeecg.modules.eam.dto.EamReportAccidentsRegisterDto;
import org.jeecg.modules.eam.entity.EamRepairOrder;
import org.jeecg.modules.eam.entity.EamReportAccidentsRegister;
import org.jeecg.modules.eam.request.EamRepairOrderRequest;
import org.jeecg.modules.eam.request.EamReportAccidentsRegisterQuery;
import org.jeecg.modules.eam.service.IEamReportAccidentsRegisterService;
@@ -117,7 +120,7 @@
         // æ ¡éªŒé¢†å–权限
         LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         if (!BusinessCodeConst.PCR0001.equals(user.getPost())) {
             return Result.error("填报失败,没有填报权限!,请登录操作工岗位用户");
             return Result.error("填报失败,没有填报权限!,需操作工提交");
         }
         if (eamReportAccidentsRegisterDto == null) {
             return Result.error("填报的对象不能为空!");
@@ -131,6 +134,44 @@
         }
     }
     /**
      * æ“ä½œå·¥æäº¤-发起流程
      * @param id
      * @return
      */
     @ApiOperation(value = "设备事故登记表-提交", notes = "设备事故登记表-提交")
     @GetMapping(value = "/submit")
     public Result<?> submit(String id){
         // æ ¡éªŒé¢†å–权限
         LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         if (!BusinessCodeConst.PCR0001.equals(user.getPost())) {
             return Result.error("提交失败,没有提交权限!,需操作工提交");
         }
         eamReportAccidentsRegisterService.submit(id);
         return Result.OK("提交成功!");
     }
     /**
      * æˆ‘的待办 æ‰§è¡Œ/审批
      *
      * @param eamReportAccidentsRegisterDto
      * @return
      */
     @AutoLog(value = "设备事故登记表-执行/审批")
     @ApiOperation(value = "设备事故登记表-执行/审批", notes = "设备事故登记表-执行/审批")
     @PostMapping(value = "/perform")
     public Result<?> perform(@RequestBody EamReportAccidentsRegisterDto eamReportAccidentsRegisterDto) {
         if (eamReportAccidentsRegisterDto == null) {
             return Result.error("审批的对象不能为空!");
         }
         // æ£€æŸ¥è¯·æ±‚参数
         if (StrUtil.isBlank(eamReportAccidentsRegisterDto.getTaskId()) || StrUtil.isBlank(eamReportAccidentsRegisterDto.getDataId()) || StrUtil.isBlank(eamReportAccidentsRegisterDto.getInstanceId())) {
             return Result.error("审批任务错误或不存在!");
         }
         return  eamReportAccidentsRegisterService.audit(eamReportAccidentsRegisterDto);
     }
    /**
     *   é€šè¿‡id删除
     *
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamReportProductHazardsController.java
@@ -162,7 +162,7 @@
         // æ ¡éªŒé¢†å–权限
         LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
         if (!BusinessCodeConst.PCR0001.equals(user.getPost())) {
             return Result.error("填报失败,没有填报权限!,请登录操作工岗位用户");
             return Result.error("填报失败,没有填报权限!,需操作工提交");
         }
         if (eamReportProductHazardsDto == null) {
             return Result.error("填报的对象不能为空!");
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamMaintenanceStandardServiceImpl.java
@@ -347,6 +347,16 @@
        variables.put("organization", "保养规范启动流程");
        variables.put("comment", "保养规范启动流程");
        variables.put("proofreading", true);
        EamEquipment eamEquipment = eamEquipmentService.getById(maintenanceStandard.getEquipmentId());
        List<UserSelector> userSelectorList = sysUserService.selectOperatorList(eamEquipment.getEquipmentCode(), eamEquipment.getFactoryOrgCode(), BusinessCodeConst.PCR0008);
        if (!CollectionUtils.isEmpty(userSelectorList)) {
            List<String> usernameList = userSelectorList.stream().map(UserSelector::getUsername).collect(Collectors.toList());
            if (CollectionUtils.isNotEmpty(usernameList)) {
                variables.put("NextAssignee", usernameList);
            }else {
                throw new JeecgBootException("设备未存在维修室主任,无法进入下级审批!");
            }
        }
        Result result = flowDefinitionService.startProcessInstanceByKey("eam_maintenance_standard", variables);
        if (!result.isSuccess()) {
            super.removeById(maintenanceStandard.getId());
@@ -362,14 +372,6 @@
            );
            if (businessList.isEmpty()) {
                return Result.error("流程记录不存在");
            }
            FlowMyBusiness flowMyBusiness = businessList.get(0);
            EamEquipment eamEquipment = eamEquipmentService.getById(maintenanceStandard.getEquipmentId());
            List<UserSelector> userSelectorList = sysUserService.selectOperatorList(eamEquipment.getEquipmentCode(), eamEquipment.getFactoryOrgCode(), BusinessCodeConst.PCR0008);
            if (!CollectionUtils.isEmpty(userSelectorList)) {
                List<String> usernameList = userSelectorList.stream().map(UserSelector::getUsername).collect(Collectors.toList());
                flowMyBusiness.setTodoUsers(JSON.toJSONString(usernameList));
                flowMyBusinessService.updateById(flowMyBusiness);
            }
        }
        return result;
@@ -441,22 +443,7 @@
                        eamMaintenanceStandard.setStandardStatus(MaintenanceStandardStatusEnum.REJECTED.name());
                    }
                    if (eamMaintenanceStandardVo.getRepairManagerApproveResult().equals("1")) {
                        List<FlowMyBusiness> newbusinessList = flowMyBusinessService.list(
                                new QueryWrapper<FlowMyBusiness>()
                                        .eq("process_instance_id", eamMaintenanceStandardVo.getInstanceId()));
                        FlowMyBusiness newflowMyBusiness = newbusinessList.get(0);
                        eamMaintenanceStandard.setStandardStatus(MaintenanceStandardStatusEnum.WAIT_TECHNICAL_DIRECTOR.name());
                        //获取flow的流程实例id,设置下一步的处理人员
                        EamMaintenanceStandard maintenanceStandard = this.getById(eamMaintenanceStandardVo.getDataId());
                        EamEquipment eamEquipment = eamEquipmentService.getById(maintenanceStandard.getEquipmentId());
                        List<UserSelector> userSelectorList = sysUserService.selectOperatorList(eamEquipment.getEquipmentCode(), eamEquipment.getFactoryOrgCode(), BusinessCodeConst.PCR0009);
                        if (!CollectionUtils.isEmpty(userSelectorList)) {
                            List<String> usernameList = userSelectorList.stream().map(UserSelector::getUsername).collect(Collectors.toList());
                            newflowMyBusiness.setTodoUsers(JSON.toJSONString(usernameList));
                            flowMyBusinessService.updateById(newflowMyBusiness);
                        }else {
                            throw new JeecgBootException("设备未存在管理员,无法进入下级审批!");
                        }
                    } else {
                        eamMaintenanceStandard.setStandardStatus(MaintenanceStandardStatusEnum.WAIT_SUBMIT.name());
                    }
@@ -517,6 +504,16 @@
            values.put("organization", eamMaintenanceStandardVo.getTechnicalManagerApproveComment());
            values.put("comment", eamMaintenanceStandardVo.getTechnicalManagerApproveComment());
        }
        List<UserSelector> userSelectorList=new ArrayList<>();
        if (eamMaintenanceStandardVo.getRepairManagerApproveResult() != null) {
            //获取flow的流程实例id,设置下一步的处理人员
            EamMaintenanceStandard maintenanceStandard = this.getById(eamMaintenanceStandardVo.getDataId());
            EamEquipment eamEquipment = eamEquipmentService.getById(maintenanceStandard.getEquipmentId());
            userSelectorList = sysUserService.selectOperatorList(eamEquipment.getEquipmentCode(), eamEquipment.getFactoryOrgCode(), BusinessCodeConst.PCR0009);
            if (CollectionUtils.isEmpty(userSelectorList)) {
                throw new JeecgBootException("设备未存在管理员,无法进入下级审批!");
            }
        }
        return values;
    }
@@ -540,8 +537,9 @@
    @Override
    public List<String> flowCandidateUsernamesOfTask(String taskNameId, Map<String, Object> values) {
        //业务是否干预流程,业务干预,流程干预,指定人员进行处理
        return null;
        //获取下一步处理人
        Object object = values.get("NextAssignee");
        return (List<String>) object;
    }
    /*流程业务代码--------------------------结束*/