songhuangfeng123
2022-07-20 aa3dadd645d92ee001d17d2b286486ebdf6ad654
事故报告
已修改2个文件
已添加23个文件
2246 ■■■■■ 文件已修改
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/controller/AccidentReportController.java 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentReportFileInfo.java 117 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentReportFileInfoDO.java 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentReportInfo.java 304 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentReportInfoDetailDO.java 250 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentReportInfoPageDO.java 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/enums/AccidentResultCodes.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/req/AccidentReportFileReqDTO.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/req/AccidentReportReqDTO.java 244 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/resp/AccidentReportDetailRespDTO.java 260 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/resp/AccidentReportFileRespDTO.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/resp/AccidentReportPageRespDTO.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/query/AccidentReportQuery.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/query/db/AccidentReportDBQuery.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/repository/AccidentReportFileInfoRepository.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/repository/AccidentReportInfoRepository.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/AccidentReportService.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/baseService/AccidentReportFileInfoService.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/baseService/AccidentReportInfoService.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/baseService/impl/AccidentExpressInfoServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/baseService/impl/AccidentReportFileInfoServiceImpl.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/baseService/impl/AccidentReportInfoServiceImpl.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentReportServiceImpl.java 253 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/resources/config/mapper/incidentManage/AccidentReportFileInfoMapper.xml 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/resources/config/mapper/incidentManage/AccidentReportInfoMapper.xml 150 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/controller/AccidentReportController.java
对比新文件
@@ -0,0 +1,68 @@
package com.gkhy.safePlatform.incidentManage.controller;
import com.gkhy.safePlatform.commons.co.ContextCacheUser;
import com.gkhy.safePlatform.commons.query.PageQuery;
import com.gkhy.safePlatform.commons.utils.PageUtils;
import com.gkhy.safePlatform.commons.vo.ResultVO;
import com.gkhy.safePlatform.incidentManage.model.dto.req.AccidentReportReqDTO;
import com.gkhy.safePlatform.incidentManage.model.dto.resp.AccidentReportDetailRespDTO;
import com.gkhy.safePlatform.incidentManage.model.dto.resp.AccidentReportPageRespDTO;
import com.gkhy.safePlatform.incidentManage.query.AccidentReportQuery;
import com.gkhy.safePlatform.incidentManage.service.AccidentReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/accidentReport")
public class AccidentReportController {
    @Autowired
    private AccidentReportService accidentReportService;
    /**
     * 事故报告列表
     */
    @RequestMapping(value = "/page/list" ,method = RequestMethod.POST)
    private ResultVO<List<AccidentReportPageRespDTO>> list (@RequestBody PageQuery<AccidentReportQuery> pageQuery){
        PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize());
        return  accidentReportService.selectAccidentReportList(pageQuery);
    }
    /**
     * 事故报告新增
     */
    @RequestMapping(value = "/add",method = RequestMethod.POST)
    public ResultVO addAccidentReport(Authentication authentication, @RequestBody AccidentReportReqDTO AccidentReportReqDTO) {
        ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal();
        return accidentReportService.addAccidentReport(currentUser.getUid(), AccidentReportReqDTO);
    }
    /**
     * 事故报告详情
     */
    @RequestMapping(value = "/info/{id}",method = RequestMethod.GET)
    public ResultVO<AccidentReportDetailRespDTO> getAccidentReportById(@PathVariable("id")Long id){
        return accidentReportService.getAccidentReportById(id);
    }
    /**
     * 事故报告修改
     */
    @RequestMapping(value = "/update",method = RequestMethod.POST)
    public ResultVO updateAccidentReport(Authentication authentication, @RequestBody AccidentReportReqDTO AccidentReportReqDTO) {
        ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal();
        return accidentReportService.updateAccidentReport(currentUser.getUid(), AccidentReportReqDTO);
    }
    /**
     * 事故报告删除/批量删除
     */
    @RequestMapping(value = "/batchDelete/{ids}",method = RequestMethod.GET)
    public ResultVO batchDeleteAccidentReport(@PathVariable("ids")String ids){
        return accidentReportService.batchDeleteAccidentReport(ids);
    }
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentReportFileInfo.java
对比新文件
@@ -0,0 +1,117 @@
package com.gkhy.safePlatform.incidentManage.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
@TableName("accident_report_file")
public class AccidentReportFileInfo {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Boolean delFlag;
    private Date gmtCreate;
    private Date gmtModitify;
    private Long createUid;
    private Long updateUid;
    private Long accidentReportId;
    private String fileUrl;
    private String fileName;
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Boolean getDelFlag() {
        return delFlag;
    }
    public void setDelFlag(Boolean delFlag) {
        this.delFlag = delFlag;
    }
    public Date getGmtCreate() {
        return gmtCreate;
    }
    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }
    public Date getGmtModitify() {
        return gmtModitify;
    }
    public void setGmtModitify(Date gmtModitify) {
        this.gmtModitify = gmtModitify;
    }
    public Long getCreateUid() {
        return createUid;
    }
    public void setCreateUid(Long createUid) {
        this.createUid = createUid;
    }
    public Long getUpdateUid() {
        return updateUid;
    }
    public void setUpdateUid(Long updateUid) {
        this.updateUid = updateUid;
    }
    public Long getAccidentReportId() {
        return accidentReportId;
    }
    public void setAccidentReportId(Long accidentReportId) {
        this.accidentReportId = accidentReportId;
    }
    public String getFileUrl() {
        return fileUrl;
    }
    public void setFileUrl(String fileUrl) {
        this.fileUrl = fileUrl;
    }
    public String getFileName() {
        return fileName;
    }
    public void setFileName(String fileName) {
        this.fileName = fileName;
    }
    @Override
    public String toString() {
        return "AccidentReportFileInfo{" +
                "id=" + id +
                ", delFlag=" + delFlag +
                ", gmtCreate=" + gmtCreate +
                ", gmtModitify=" + gmtModitify +
                ", createUid=" + createUid +
                ", updateUid=" + updateUid +
                ", accidentReportId=" + accidentReportId +
                ", fileUrl='" + fileUrl + '\'' +
                ", fileName='" + fileName + '\'' +
                '}';
    }
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentReportFileInfoDO.java
对比新文件
@@ -0,0 +1,60 @@
package com.gkhy.safePlatform.incidentManage.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
@TableName("accident_report_file")
public class AccidentReportFileInfoDO {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Long accidentReportId;
    private String fileUrl;
    private String fileName;
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Long getAccidentReportId() {
        return accidentReportId;
    }
    public void setAccidentReportId(Long accidentReportId) {
        this.accidentReportId = accidentReportId;
    }
    public String getFileUrl() {
        return fileUrl;
    }
    public void setFileUrl(String fileUrl) {
        this.fileUrl = fileUrl;
    }
    public String getFileName() {
        return fileName;
    }
    public void setFileName(String fileName) {
        this.fileName = fileName;
    }
    @Override
    public String toString() {
        return "AccidentReportFileInfo{" +
                "id=" + id +
                ", accidentReportId=" + accidentReportId +
                ", fileUrl='" + fileUrl + '\'' +
                ", fileName='" + fileName + '\'' +
                '}';
    }
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentReportInfo.java
对比新文件
@@ -0,0 +1,304 @@
package com.gkhy.safePlatform.incidentManage.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;
@TableName("accident_report")
public class AccidentReportInfo {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Boolean delFlag;
    private Date gmtCreate;
    private Date gmtModitify;
    private Long createUid;
    private Long updateUid;
    private Boolean status ;
    private Long accidentExpressId;
    private String accidentType;
    private String accidentGrade;
    private BigDecimal economicLoss;
    private Integer minorInjuryNum;
    private Integer seriousInjuryNum;
    private Integer deathNum;
    private String accidentCause;
    private Date reportDeadline;
    private String accidentLevel;
    private String accidentDelayApply;
    private String comprehensiveAnalysisDirect;
    private String comprehensiveAnalysisIndirect;
    private String rectificationMeasures;
    private String accidentHandling;
    private Long fillInUserUid;
    private Date fillInTime;
    private String relevantPersonnelRecords;
    private String otherMaterials;
    public Boolean getStatus() {
        return status;
    }
    public void setStatus(Boolean status) {
        this.status = status;
    }
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Boolean getDelFlag() {
        return delFlag;
    }
    public void setDelFlag(Boolean delFlag) {
        this.delFlag = delFlag;
    }
    public Date getGmtCreate() {
        return gmtCreate;
    }
    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }
    public Date getGmtModitify() {
        return gmtModitify;
    }
    public void setGmtModitify(Date gmtModitify) {
        this.gmtModitify = gmtModitify;
    }
    public Long getCreateUid() {
        return createUid;
    }
    public void setCreateUid(Long createUid) {
        this.createUid = createUid;
    }
    public Long getUpdateUid() {
        return updateUid;
    }
    public void setUpdateUid(Long updateUid) {
        this.updateUid = updateUid;
    }
    public Long getAccidentExpressId() {
        return accidentExpressId;
    }
    public void setAccidentExpressId(Long accidentExpressId) {
        this.accidentExpressId = accidentExpressId;
    }
    public String getAccidentType() {
        return accidentType;
    }
    public void setAccidentType(String accidentType) {
        this.accidentType = accidentType;
    }
    public String getAccidentGrade() {
        return accidentGrade;
    }
    public void setAccidentGrade(String accidentGrade) {
        this.accidentGrade = accidentGrade;
    }
    public BigDecimal getEconomicLoss() {
        return economicLoss;
    }
    public void setEconomicLoss(BigDecimal economicLoss) {
        this.economicLoss = economicLoss;
    }
    public Integer getMinorInjuryNum() {
        return minorInjuryNum;
    }
    public void setMinorInjuryNum(Integer minorInjuryNum) {
        this.minorInjuryNum = minorInjuryNum;
    }
    public Integer getSeriousInjuryNum() {
        return seriousInjuryNum;
    }
    public void setSeriousInjuryNum(Integer seriousInjuryNum) {
        this.seriousInjuryNum = seriousInjuryNum;
    }
    public Integer getDeathNum() {
        return deathNum;
    }
    public void setDeathNum(Integer deathNum) {
        this.deathNum = deathNum;
    }
    public String getAccidentCause() {
        return accidentCause;
    }
    public void setAccidentCause(String accidentCause) {
        this.accidentCause = accidentCause;
    }
    public Date getReportDeadline() {
        return reportDeadline;
    }
    public void setReportDeadline(Date reportDeadline) {
        this.reportDeadline = reportDeadline;
    }
    public String getAccidentLevel() {
        return accidentLevel;
    }
    public void setAccidentLevel(String accidentLevel) {
        this.accidentLevel = accidentLevel;
    }
    public String getAccidentDelayApply() {
        return accidentDelayApply;
    }
    public void setAccidentDelayApply(String accidentDelayApply) {
        this.accidentDelayApply = accidentDelayApply;
    }
    public String getComprehensiveAnalysisDirect() {
        return comprehensiveAnalysisDirect;
    }
    public void setComprehensiveAnalysisDirect(String comprehensiveAnalysisDirect) {
        this.comprehensiveAnalysisDirect = comprehensiveAnalysisDirect;
    }
    public String getComprehensiveAnalysisIndirect() {
        return comprehensiveAnalysisIndirect;
    }
    public void setComprehensiveAnalysisIndirect(String comprehensiveAnalysisIndirect) {
        this.comprehensiveAnalysisIndirect = comprehensiveAnalysisIndirect;
    }
    public String getRectificationMeasures() {
        return rectificationMeasures;
    }
    public void setRectificationMeasures(String rectificationMeasures) {
        this.rectificationMeasures = rectificationMeasures;
    }
    public String getAccidentHandling() {
        return accidentHandling;
    }
    public void setAccidentHandling(String accidentHandling) {
        this.accidentHandling = accidentHandling;
    }
    public Long getFillInUserUid() {
        return fillInUserUid;
    }
    public void setFillInUserUid(Long fillInUserUid) {
        this.fillInUserUid = fillInUserUid;
    }
    public Date getFillInTime() {
        return fillInTime;
    }
    public void setFillInTime(Date fillInTime) {
        this.fillInTime = fillInTime;
    }
    public String getRelevantPersonnelRecords() {
        return relevantPersonnelRecords;
    }
    public void setRelevantPersonnelRecords(String relevantPersonnelRecords) {
        this.relevantPersonnelRecords = relevantPersonnelRecords;
    }
    public String getOtherMaterials() {
        return otherMaterials;
    }
    public void setOtherMaterials(String otherMaterials) {
        this.otherMaterials = otherMaterials;
    }
    @Override
    public String toString() {
        return "AccidentReportInfo{" +
                "id=" + id +
                ", delFlag=" + delFlag +
                ", gmtCreate=" + gmtCreate +
                ", gmtModitify=" + gmtModitify +
                ", createUid=" + createUid +
                ", updateUid=" + updateUid +
                ", accidentExpressId=" + accidentExpressId +
                ", accidentType='" + accidentType + '\'' +
                ", accidentGrade='" + accidentGrade + '\'' +
                ", economicLoss=" + economicLoss +
                ", minorInjuryNum=" + minorInjuryNum +
                ", seriousInjuryNum=" + seriousInjuryNum +
                ", deathNum=" + deathNum +
                ", accidentCause='" + accidentCause + '\'' +
                ", reportDeadline=" + reportDeadline +
                ", accidentLevel='" + accidentLevel + '\'' +
                ", accidentDelayApply='" + accidentDelayApply + '\'' +
                ", comprehensiveAnalysisDirect='" + comprehensiveAnalysisDirect + '\'' +
                ", comprehensiveAnalysisIndirect='" + comprehensiveAnalysisIndirect + '\'' +
                ", rectificationMeasures='" + rectificationMeasures + '\'' +
                ", accidentHandling='" + accidentHandling + '\'' +
                ", fillInUserUid=" + fillInUserUid +
                ", fillInTime=" + fillInTime +
                ", relevantPersonnelRecords='" + relevantPersonnelRecords + '\'' +
                ", otherMaterials='" + otherMaterials + '\'' +
                '}';
    }
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentReportInfoDetailDO.java
对比新文件
@@ -0,0 +1,250 @@
package com.gkhy.safePlatform.incidentManage.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@TableName("accident_report")
public class AccidentReportInfoDetailDO {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Boolean status ;
    private Long accidentExpressId;
    private String accidentType;
    private String accidentGrade;
    private BigDecimal economicLoss;
    private Integer minorInjuryNum;
    private Integer seriousInjuryNum;
    private Integer deathNum;
    private String accidentCause;
    private Date reportDeadline;
    private String accidentLevel;
    private String accidentDelayApply;
    private String comprehensiveAnalysisDirect;
    private String comprehensiveAnalysisIndirect;
    private String rectificationMeasures;
    private String accidentHandling;
    private Long fillInUserUid;
    private Date fillInTime;
    private String relevantPersonnelRecords;
    private String otherMaterials;
    public Boolean getStatus() {
        return status;
    }
    public void setStatus(Boolean status) {
        this.status = status;
    }
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Long getAccidentExpressId() {
        return accidentExpressId;
    }
    public void setAccidentExpressId(Long accidentExpressId) {
        this.accidentExpressId = accidentExpressId;
    }
    public String getAccidentType() {
        return accidentType;
    }
    public void setAccidentType(String accidentType) {
        this.accidentType = accidentType;
    }
    public String getAccidentGrade() {
        return accidentGrade;
    }
    public void setAccidentGrade(String accidentGrade) {
        this.accidentGrade = accidentGrade;
    }
    public BigDecimal getEconomicLoss() {
        return economicLoss;
    }
    public void setEconomicLoss(BigDecimal economicLoss) {
        this.economicLoss = economicLoss;
    }
    public Integer getMinorInjuryNum() {
        return minorInjuryNum;
    }
    public void setMinorInjuryNum(Integer minorInjuryNum) {
        this.minorInjuryNum = minorInjuryNum;
    }
    public Integer getSeriousInjuryNum() {
        return seriousInjuryNum;
    }
    public void setSeriousInjuryNum(Integer seriousInjuryNum) {
        this.seriousInjuryNum = seriousInjuryNum;
    }
    public Integer getDeathNum() {
        return deathNum;
    }
    public void setDeathNum(Integer deathNum) {
        this.deathNum = deathNum;
    }
    public String getAccidentCause() {
        return accidentCause;
    }
    public void setAccidentCause(String accidentCause) {
        this.accidentCause = accidentCause;
    }
    public Date getReportDeadline() {
        return reportDeadline;
    }
    public void setReportDeadline(Date reportDeadline) {
        this.reportDeadline = reportDeadline;
    }
    public String getAccidentLevel() {
        return accidentLevel;
    }
    public void setAccidentLevel(String accidentLevel) {
        this.accidentLevel = accidentLevel;
    }
    public String getAccidentDelayApply() {
        return accidentDelayApply;
    }
    public void setAccidentDelayApply(String accidentDelayApply) {
        this.accidentDelayApply = accidentDelayApply;
    }
    public String getComprehensiveAnalysisDirect() {
        return comprehensiveAnalysisDirect;
    }
    public void setComprehensiveAnalysisDirect(String comprehensiveAnalysisDirect) {
        this.comprehensiveAnalysisDirect = comprehensiveAnalysisDirect;
    }
    public String getComprehensiveAnalysisIndirect() {
        return comprehensiveAnalysisIndirect;
    }
    public void setComprehensiveAnalysisIndirect(String comprehensiveAnalysisIndirect) {
        this.comprehensiveAnalysisIndirect = comprehensiveAnalysisIndirect;
    }
    public String getRectificationMeasures() {
        return rectificationMeasures;
    }
    public void setRectificationMeasures(String rectificationMeasures) {
        this.rectificationMeasures = rectificationMeasures;
    }
    public String getAccidentHandling() {
        return accidentHandling;
    }
    public void setAccidentHandling(String accidentHandling) {
        this.accidentHandling = accidentHandling;
    }
    public Long getFillInUserUid() {
        return fillInUserUid;
    }
    public void setFillInUserUid(Long fillInUserUid) {
        this.fillInUserUid = fillInUserUid;
    }
    public Date getFillInTime() {
        return fillInTime;
    }
    public void setFillInTime(Date fillInTime) {
        this.fillInTime = fillInTime;
    }
    public String getRelevantPersonnelRecords() {
        return relevantPersonnelRecords;
    }
    public void setRelevantPersonnelRecords(String relevantPersonnelRecords) {
        this.relevantPersonnelRecords = relevantPersonnelRecords;
    }
    public String getOtherMaterials() {
        return otherMaterials;
    }
    public void setOtherMaterials(String otherMaterials) {
        this.otherMaterials = otherMaterials;
    }
    @Override
    public String toString() {
        return "AccidentReportInfo{" +
                "id=" + id +
                ", accidentExpressId=" + accidentExpressId +
                ", accidentType='" + accidentType + '\'' +
                ", accidentGrade='" + accidentGrade + '\'' +
                ", economicLoss=" + economicLoss +
                ", minorInjuryNum=" + minorInjuryNum +
                ", seriousInjuryNum=" + seriousInjuryNum +
                ", deathNum=" + deathNum +
                ", accidentCause='" + accidentCause + '\'' +
                ", reportDeadline=" + reportDeadline +
                ", accidentLevel='" + accidentLevel + '\'' +
                ", accidentDelayApply='" + accidentDelayApply + '\'' +
                ", comprehensiveAnalysisDirect='" + comprehensiveAnalysisDirect + '\'' +
                ", comprehensiveAnalysisIndirect='" + comprehensiveAnalysisIndirect + '\'' +
                ", rectificationMeasures='" + rectificationMeasures + '\'' +
                ", accidentHandling='" + accidentHandling + '\'' +
                ", fillInUserUid=" + fillInUserUid +
                ", fillInTime=" + fillInTime +
                ", relevantPersonnelRecords='" + relevantPersonnelRecords + '\'' +
                ", otherMaterials='" + otherMaterials + '\'' +
                '}';
    }
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/entity/AccidentReportInfoPageDO.java
对比新文件
@@ -0,0 +1,74 @@
package com.gkhy.safePlatform.incidentManage.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;
@TableName("accident_report")
public class AccidentReportInfoPageDO {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Long accidentExpressId;
    private Boolean status ;
    private String accidentType;
    private String accidentGrade;
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Boolean getStatus() {
        return status;
    }
    public void setStatus(Boolean status) {
        this.status = status;
    }
    public Long getAccidentExpressId() {
        return accidentExpressId;
    }
    public void setAccidentExpressId(Long accidentExpressId) {
        this.accidentExpressId = accidentExpressId;
    }
    public String getAccidentType() {
        return accidentType;
    }
    public void setAccidentType(String accidentType) {
        this.accidentType = accidentType;
    }
    @Override
    public String toString() {
        return "AccidentReportInfoPageDO{" +
                "id=" + id +
                ", accidentExpressId=" + accidentExpressId +
                ", accidentType='" + accidentType + '\'' +
                ", accidentGrade='" + accidentGrade + '\'' +
                '}';
    }
    public String getAccidentGrade() {
        return accidentGrade;
    }
    public void setAccidentGrade(String accidentGrade) {
        this.accidentGrade = accidentGrade;
    }
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/enums/AccidentResultCodes.java
@@ -16,6 +16,8 @@
    EXPRESS_EMERGENCY_PRECAUTIONS_NULL("E1009","事故快报应急防范措施不能为空"),
    ACCIDENT_REPORT_NULL("A1001", "事故报告不可为空"),
    ACCIDENT_REPORT_NOT_EXIST("A1002", "事故报告不存在"),
    ERROR("A3000", "未知错误");
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/req/AccidentReportFileReqDTO.java
对比新文件
@@ -0,0 +1,55 @@
package com.gkhy.safePlatform.incidentManage.model.dto.req;
public class AccidentReportFileReqDTO {
    private Long id;
    private Long accidentReportId;
    private String fileUrl;
    private String fileName;
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Long getAccidentReportId() {
        return accidentReportId;
    }
    public void setAccidentReportId(Long accidentReportId) {
        this.accidentReportId = accidentReportId;
    }
    public String getFileUrl() {
        return fileUrl;
    }
    public void setFileUrl(String fileUrl) {
        this.fileUrl = fileUrl;
    }
    public String getFileName() {
        return fileName;
    }
    public void setFileName(String fileName) {
        this.fileName = fileName;
    }
    @Override
    public String toString() {
        return "AccidentReportFileInfo{" +
                "id=" + id +
                ", accidentReportId=" + accidentReportId +
                ", fileUrl='" + fileUrl + '\'' +
                ", fileName='" + fileName + '\'' +
                '}';
    }
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/req/AccidentReportReqDTO.java
对比新文件
@@ -0,0 +1,244 @@
package com.gkhy.safePlatform.incidentManage.model.dto.req;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
public class AccidentReportReqDTO {
    private Long id;
    private Long accidentExpressId;
    private String accidentType;
    private String accidentGrade;
    private BigDecimal economicLoss;
    private Integer minorInjuryNum;
    private Integer seriousInjuryNum;
    private Integer deathNum;
    private String accidentCause;
    private Date reportDeadline;
    private String accidentLevel;
    private String accidentDelayApply;
    private String comprehensiveAnalysisDirect;
    private String comprehensiveAnalysisIndirect;
    private String rectificationMeasures;
    private String accidentHandling;
    private Long fillInUserUid;
    private Date fillInTime;
    private String relevantPersonnelRecords;
    private String otherMaterials;
    private List<AccidentReportFileReqDTO> fileList;
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Long getAccidentExpressId() {
        return accidentExpressId;
    }
    public void setAccidentExpressId(Long accidentExpressId) {
        this.accidentExpressId = accidentExpressId;
    }
    public String getAccidentType() {
        return accidentType;
    }
    public void setAccidentType(String accidentType) {
        this.accidentType = accidentType;
    }
    public String getAccidentGrade() {
        return accidentGrade;
    }
    public void setAccidentGrade(String accidentGrade) {
        this.accidentGrade = accidentGrade;
    }
    public BigDecimal getEconomicLoss() {
        return economicLoss;
    }
    public void setEconomicLoss(BigDecimal economicLoss) {
        this.economicLoss = economicLoss;
    }
    public Integer getMinorInjuryNum() {
        return minorInjuryNum;
    }
    public void setMinorInjuryNum(Integer minorInjuryNum) {
        this.minorInjuryNum = minorInjuryNum;
    }
    public Integer getSeriousInjuryNum() {
        return seriousInjuryNum;
    }
    public void setSeriousInjuryNum(Integer seriousInjuryNum) {
        this.seriousInjuryNum = seriousInjuryNum;
    }
    public Integer getDeathNum() {
        return deathNum;
    }
    public void setDeathNum(Integer deathNum) {
        this.deathNum = deathNum;
    }
    public String getAccidentCause() {
        return accidentCause;
    }
    public void setAccidentCause(String accidentCause) {
        this.accidentCause = accidentCause;
    }
    public Date getReportDeadline() {
        return reportDeadline;
    }
    public void setReportDeadline(Date reportDeadline) {
        this.reportDeadline = reportDeadline;
    }
    public String getAccidentLevel() {
        return accidentLevel;
    }
    public void setAccidentLevel(String accidentLevel) {
        this.accidentLevel = accidentLevel;
    }
    public String getAccidentDelayApply() {
        return accidentDelayApply;
    }
    public void setAccidentDelayApply(String accidentDelayApply) {
        this.accidentDelayApply = accidentDelayApply;
    }
    public String getComprehensiveAnalysisDirect() {
        return comprehensiveAnalysisDirect;
    }
    public void setComprehensiveAnalysisDirect(String comprehensiveAnalysisDirect) {
        this.comprehensiveAnalysisDirect = comprehensiveAnalysisDirect;
    }
    public String getComprehensiveAnalysisIndirect() {
        return comprehensiveAnalysisIndirect;
    }
    public void setComprehensiveAnalysisIndirect(String comprehensiveAnalysisIndirect) {
        this.comprehensiveAnalysisIndirect = comprehensiveAnalysisIndirect;
    }
    public String getRectificationMeasures() {
        return rectificationMeasures;
    }
    public void setRectificationMeasures(String rectificationMeasures) {
        this.rectificationMeasures = rectificationMeasures;
    }
    public String getAccidentHandling() {
        return accidentHandling;
    }
    public void setAccidentHandling(String accidentHandling) {
        this.accidentHandling = accidentHandling;
    }
    public Long getFillInUserUid() {
        return fillInUserUid;
    }
    public void setFillInUserUid(Long fillInUserUid) {
        this.fillInUserUid = fillInUserUid;
    }
    public Date getFillInTime() {
        return fillInTime;
    }
    public void setFillInTime(Date fillInTime) {
        this.fillInTime = fillInTime;
    }
    public String getRelevantPersonnelRecords() {
        return relevantPersonnelRecords;
    }
    public void setRelevantPersonnelRecords(String relevantPersonnelRecords) {
        this.relevantPersonnelRecords = relevantPersonnelRecords;
    }
    public String getOtherMaterials() {
        return otherMaterials;
    }
    public void setOtherMaterials(String otherMaterials) {
        this.otherMaterials = otherMaterials;
    }
    public List<AccidentReportFileReqDTO> getFileList() {
        return fileList;
    }
    public void setFileList(List<AccidentReportFileReqDTO> fileList) {
        this.fileList = fileList;
    }
    @Override
    public String toString() {
        return "AccidentReportInfo{" +
                "id=" + id +
                ", accidentExpressId=" + accidentExpressId +
                ", accidentType='" + accidentType + '\'' +
                ", accidentGrade='" + accidentGrade + '\'' +
                ", economicLoss=" + economicLoss +
                ", minorInjuryNum=" + minorInjuryNum +
                ", seriousInjuryNum=" + seriousInjuryNum +
                ", deathNum=" + deathNum +
                ", accidentCause='" + accidentCause + '\'' +
                ", reportDeadline=" + reportDeadline +
                ", accidentLevel='" + accidentLevel + '\'' +
                ", accidentDelayApply='" + accidentDelayApply + '\'' +
                ", comprehensiveAnalysisDirect='" + comprehensiveAnalysisDirect + '\'' +
                ", comprehensiveAnalysisIndirect='" + comprehensiveAnalysisIndirect + '\'' +
                ", rectificationMeasures='" + rectificationMeasures + '\'' +
                ", accidentHandling='" + accidentHandling + '\'' +
                ", fillInUserUid=" + fillInUserUid +
                ", fillInTime=" + fillInTime +
                ", relevantPersonnelRecords='" + relevantPersonnelRecords + '\'' +
                ", otherMaterials='" + otherMaterials + '\'' +
                '}';
    }
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/resp/AccidentReportDetailRespDTO.java
对比新文件
@@ -0,0 +1,260 @@
package com.gkhy.safePlatform.incidentManage.model.dto.resp;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gkhy.safePlatform.incidentManage.entity.AccidentReportFileInfoDO;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
public class AccidentReportDetailRespDTO {
    private Long id;
    private Boolean status ;
    private Long accidentExpressId;
    private String accidentType;
    private String accidentGrade;
    private BigDecimal economicLoss;
    private Integer minorInjuryNum;
    private Integer seriousInjuryNum;
    private Integer deathNum;
    private String accidentCause;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date reportDeadline;
    private String accidentLevel;
    private String accidentDelayApply;
    private String comprehensiveAnalysisDirect;
    private String comprehensiveAnalysisIndirect;
    private String rectificationMeasures;
    private String accidentHandling;
    private Long fillInUserUid;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date fillInTime;
    private String relevantPersonnelRecords;
    private String otherMaterials;
    private List<AccidentReportFileRespDTO> fileList;
    public Boolean getStatus() {
        return status;
    }
    public void setStatus(Boolean status) {
        this.status = status;
    }
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Long getAccidentExpressId() {
        return accidentExpressId;
    }
    public void setAccidentExpressId(Long accidentExpressId) {
        this.accidentExpressId = accidentExpressId;
    }
    public String getAccidentType() {
        return accidentType;
    }
    public void setAccidentType(String accidentType) {
        this.accidentType = accidentType;
    }
    public String getAccidentGrade() {
        return accidentGrade;
    }
    public void setAccidentGrade(String accidentGrade) {
        this.accidentGrade = accidentGrade;
    }
    public BigDecimal getEconomicLoss() {
        return economicLoss;
    }
    public void setEconomicLoss(BigDecimal economicLoss) {
        this.economicLoss = economicLoss;
    }
    public Integer getMinorInjuryNum() {
        return minorInjuryNum;
    }
    public void setMinorInjuryNum(Integer minorInjuryNum) {
        this.minorInjuryNum = minorInjuryNum;
    }
    public Integer getSeriousInjuryNum() {
        return seriousInjuryNum;
    }
    public void setSeriousInjuryNum(Integer seriousInjuryNum) {
        this.seriousInjuryNum = seriousInjuryNum;
    }
    public Integer getDeathNum() {
        return deathNum;
    }
    public void setDeathNum(Integer deathNum) {
        this.deathNum = deathNum;
    }
    public String getAccidentCause() {
        return accidentCause;
    }
    public void setAccidentCause(String accidentCause) {
        this.accidentCause = accidentCause;
    }
    public Date getReportDeadline() {
        return reportDeadline;
    }
    public void setReportDeadline(Date reportDeadline) {
        this.reportDeadline = reportDeadline;
    }
    public String getAccidentLevel() {
        return accidentLevel;
    }
    public void setAccidentLevel(String accidentLevel) {
        this.accidentLevel = accidentLevel;
    }
    public String getAccidentDelayApply() {
        return accidentDelayApply;
    }
    public void setAccidentDelayApply(String accidentDelayApply) {
        this.accidentDelayApply = accidentDelayApply;
    }
    public String getComprehensiveAnalysisDirect() {
        return comprehensiveAnalysisDirect;
    }
    public void setComprehensiveAnalysisDirect(String comprehensiveAnalysisDirect) {
        this.comprehensiveAnalysisDirect = comprehensiveAnalysisDirect;
    }
    public String getComprehensiveAnalysisIndirect() {
        return comprehensiveAnalysisIndirect;
    }
    public void setComprehensiveAnalysisIndirect(String comprehensiveAnalysisIndirect) {
        this.comprehensiveAnalysisIndirect = comprehensiveAnalysisIndirect;
    }
    public String getRectificationMeasures() {
        return rectificationMeasures;
    }
    public void setRectificationMeasures(String rectificationMeasures) {
        this.rectificationMeasures = rectificationMeasures;
    }
    public String getAccidentHandling() {
        return accidentHandling;
    }
    public void setAccidentHandling(String accidentHandling) {
        this.accidentHandling = accidentHandling;
    }
    public Long getFillInUserUid() {
        return fillInUserUid;
    }
    public void setFillInUserUid(Long fillInUserUid) {
        this.fillInUserUid = fillInUserUid;
    }
    public Date getFillInTime() {
        return fillInTime;
    }
    public void setFillInTime(Date fillInTime) {
        this.fillInTime = fillInTime;
    }
    public String getRelevantPersonnelRecords() {
        return relevantPersonnelRecords;
    }
    public void setRelevantPersonnelRecords(String relevantPersonnelRecords) {
        this.relevantPersonnelRecords = relevantPersonnelRecords;
    }
    public String getOtherMaterials() {
        return otherMaterials;
    }
    public void setOtherMaterials(String otherMaterials) {
        this.otherMaterials = otherMaterials;
    }
    public List<AccidentReportFileRespDTO> getFileList() {
        return fileList;
    }
    public void setFileList(List<AccidentReportFileRespDTO> fileList) {
        this.fileList = fileList;
    }
    @Override
    public String toString() {
        return "AccidentReportInfo{" +
                "id=" + id +
                ", accidentExpressId=" + accidentExpressId +
                ", accidentType='" + accidentType + '\'' +
                ", accidentGrade='" + accidentGrade + '\'' +
                ", economicLoss=" + economicLoss +
                ", minorInjuryNum=" + minorInjuryNum +
                ", seriousInjuryNum=" + seriousInjuryNum +
                ", deathNum=" + deathNum +
                ", accidentCause='" + accidentCause + '\'' +
                ", reportDeadline=" + reportDeadline +
                ", accidentLevel='" + accidentLevel + '\'' +
                ", accidentDelayApply='" + accidentDelayApply + '\'' +
                ", comprehensiveAnalysisDirect='" + comprehensiveAnalysisDirect + '\'' +
                ", comprehensiveAnalysisIndirect='" + comprehensiveAnalysisIndirect + '\'' +
                ", rectificationMeasures='" + rectificationMeasures + '\'' +
                ", accidentHandling='" + accidentHandling + '\'' +
                ", fillInUserUid=" + fillInUserUid +
                ", fillInTime=" + fillInTime +
                ", relevantPersonnelRecords='" + relevantPersonnelRecords + '\'' +
                ", otherMaterials='" + otherMaterials + '\'' +
                '}';
    }
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/resp/AccidentReportFileRespDTO.java
对比新文件
@@ -0,0 +1,55 @@
package com.gkhy.safePlatform.incidentManage.model.dto.resp;
public class AccidentReportFileRespDTO {
    private Long id;
    private Long accidentReportId;
    private String fileUrl;
    private String fileName;
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Long getAccidentReportId() {
        return accidentReportId;
    }
    public void setAccidentReportId(Long accidentReportId) {
        this.accidentReportId = accidentReportId;
    }
    public String getFileUrl() {
        return fileUrl;
    }
    public void setFileUrl(String fileUrl) {
        this.fileUrl = fileUrl;
    }
    public String getFileName() {
        return fileName;
    }
    public void setFileName(String fileName) {
        this.fileName = fileName;
    }
    @Override
    public String toString() {
        return "AccidentReportFileInfo{" +
                "id=" + id +
                ", accidentReportId=" + accidentReportId +
                ", fileUrl='" + fileUrl + '\'' +
                ", fileName='" + fileName + '\'' +
                '}';
    }
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/model/dto/resp/AccidentReportPageRespDTO.java
对比新文件
@@ -0,0 +1,65 @@
package com.gkhy.safePlatform.incidentManage.model.dto.resp;
public class AccidentReportPageRespDTO {
    private Long id;
    private Boolean status ;
    private Long accidentExpressId;
    private String accidentType;
    private String accidentGrade;
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Boolean getStatus() {
        return status;
    }
    public void setStatus(Boolean status) {
        this.status = status;
    }
    public Long getAccidentExpressId() {
        return accidentExpressId;
    }
    public void setAccidentExpressId(Long accidentExpressId) {
        this.accidentExpressId = accidentExpressId;
    }
    public String getAccidentType() {
        return accidentType;
    }
    public void setAccidentType(String accidentType) {
        this.accidentType = accidentType;
    }
    public String getAccidentGrade() {
        return accidentGrade;
    }
    public void setAccidentGrade(String accidentGrade) {
        this.accidentGrade = accidentGrade;
    }
    @Override
    public String toString() {
        return "AccidentReportPageRespDTO{" +
                "id=" + id +
                ", accidentExpressId=" + accidentExpressId +
                ", accidentType='" + accidentType + '\'' +
                ", accidentGrade='" + accidentGrade + '\'' +
                '}';
    }
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/query/AccidentReportQuery.java
对比新文件
@@ -0,0 +1,14 @@
package com.gkhy.safePlatform.incidentManage.query;
public class AccidentReportQuery {
    private Boolean status;
    public Boolean getStatus() {
        return status;
    }
    public void setStatus(Boolean status) {
        this.status = status;
    }
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/query/db/AccidentReportDBQuery.java
对比新文件
@@ -0,0 +1,14 @@
package com.gkhy.safePlatform.incidentManage.query.db;
public class AccidentReportDBQuery {
    private Boolean status;
    public Boolean getStatus() {
        return status;
    }
    public void setStatus(Boolean status) {
        this.status = status;
    }
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/repository/AccidentReportFileInfoRepository.java
对比新文件
@@ -0,0 +1,22 @@
package com.gkhy.safePlatform.incidentManage.repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gkhy.safePlatform.incidentManage.entity.AccidentReportFileInfo;
import com.gkhy.safePlatform.incidentManage.entity.AccidentReportFileInfoDO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface AccidentReportFileInfoRepository extends BaseMapper<AccidentReportFileInfo> {
    List<AccidentReportFileInfoDO> selectByAccidentReportId(@Param("accidentReportId") Long accidentReportId);
    void addAccidentReportFile(AccidentReportFileInfo accidentReportFileInfo);
    void deleteAccidentReportFileByAccidentReportId(@Param("accidentReportId") Long accidentReportId);
    void deleteAccidentReportFileByIds(List<Long> ids);
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/repository/AccidentReportInfoRepository.java
对比新文件
@@ -0,0 +1,26 @@
package com.gkhy.safePlatform.incidentManage.repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gkhy.safePlatform.incidentManage.entity.AccidentReportInfo;
import com.gkhy.safePlatform.incidentManage.entity.AccidentReportInfoDetailDO;
import com.gkhy.safePlatform.incidentManage.entity.AccidentReportInfoPageDO;
import com.gkhy.safePlatform.incidentManage.query.db.AccidentReportDBQuery;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface AccidentReportInfoRepository extends BaseMapper<AccidentReportInfo> {
    List<AccidentReportInfoPageDO> selectAccidentReportList(Page<AccidentReportInfoPageDO> page, @Param("query") AccidentReportDBQuery accidentReportDBQuery);
    void addAccidentReport(AccidentReportInfo accidentReportInfo);
    AccidentReportInfoDetailDO selectAccidentReportById(@Param("id") Long id);
    void updateAccidentReport(AccidentReportInfo accidentReportInfo);
    void deleteAccidentReportById(@Param("id") Long id);
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/AccidentReportService.java
对比新文件
@@ -0,0 +1,24 @@
package com.gkhy.safePlatform.incidentManage.service;
import com.gkhy.safePlatform.commons.query.PageQuery;
import com.gkhy.safePlatform.commons.vo.ResultVO;
import com.gkhy.safePlatform.commons.vo.SearchResultVO;
import com.gkhy.safePlatform.incidentManage.model.dto.req.AccidentReportReqDTO;
import com.gkhy.safePlatform.incidentManage.model.dto.resp.AccidentReportDetailRespDTO;
import com.gkhy.safePlatform.incidentManage.model.dto.resp.AccidentReportPageRespDTO;
import com.gkhy.safePlatform.incidentManage.query.AccidentReportQuery;
import java.util.List;
public interface AccidentReportService {
    SearchResultVO<List<AccidentReportPageRespDTO>> selectAccidentReportList(PageQuery<AccidentReportQuery> query);
    ResultVO addAccidentReport(Long valueOf, AccidentReportReqDTO AccidentReportReqDTO);
    ResultVO<AccidentReportDetailRespDTO> getAccidentReportById(Long id);
    ResultVO updateAccidentReport(Long uid, AccidentReportReqDTO AccidentReportReqDTO);
    ResultVO batchDeleteAccidentReport(String ids);
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/baseService/AccidentReportFileInfoService.java
对比新文件
@@ -0,0 +1,19 @@
package com.gkhy.safePlatform.incidentManage.service.baseService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gkhy.safePlatform.incidentManage.entity.AccidentReportFileInfo;
import com.gkhy.safePlatform.incidentManage.entity.AccidentReportFileInfoDO;
import java.util.List;
public interface AccidentReportFileInfoService extends IService<AccidentReportFileInfo> {
    List<AccidentReportFileInfoDO> selectByAccidentReportId(Long id);
    void addAccidentReportFile(AccidentReportFileInfo AccidentReportFileInfo);
    void deleteAccidentReportFileByAccidentReportId(Long accidentReportId);
    void deleteAccidentReportFileByIds(List<Long> deleteList);
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/baseService/AccidentReportInfoService.java
对比新文件
@@ -0,0 +1,24 @@
package com.gkhy.safePlatform.incidentManage.service.baseService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gkhy.safePlatform.incidentManage.entity.AccidentReportInfo;
import com.gkhy.safePlatform.incidentManage.entity.AccidentReportInfoDetailDO;
import com.gkhy.safePlatform.incidentManage.entity.AccidentReportInfoPageDO;
import com.gkhy.safePlatform.incidentManage.query.db.AccidentReportDBQuery;
import java.util.List;
public interface AccidentReportInfoService extends IService<AccidentReportInfo> {
    List<AccidentReportInfoPageDO> selectAccidentReportList(Page<AccidentReportInfoPageDO> page, AccidentReportDBQuery AccidentReportDBQuery);
    void addAccidentReport(AccidentReportInfo AccidentReportInfo);
    AccidentReportInfoDetailDO selectAccidentReportById(Long id);
    void updateAccidentReport(AccidentReportInfo AccidentReportInfo);
    void deleteAccidentReportById(Long teamId);
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/baseService/impl/AccidentExpressInfoServiceImpl.java
@@ -13,7 +13,7 @@
import java.util.List;
@Service("AccidentExpressInfoService")
@Service("accidentExpressInfoService")
public class AccidentExpressInfoServiceImpl extends ServiceImpl<AccidentExpressInfoRepository, AccidentExpressInfo> implements AccidentExpressInfoService {
    @Autowired
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/baseService/impl/AccidentReportFileInfoServiceImpl.java
对比新文件
@@ -0,0 +1,41 @@
package com.gkhy.safePlatform.incidentManage.service.baseService.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gkhy.safePlatform.incidentManage.entity.AccidentReportFileInfo;
import com.gkhy.safePlatform.incidentManage.entity.AccidentReportFileInfoDO;
import com.gkhy.safePlatform.incidentManage.repository.AccidentReportFileInfoRepository;
import com.gkhy.safePlatform.incidentManage.service.baseService.AccidentReportFileInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service("accidentReportFileInfoService")
public class AccidentReportFileInfoServiceImpl extends ServiceImpl<AccidentReportFileInfoRepository, AccidentReportFileInfo> implements AccidentReportFileInfoService {
    @Autowired
    private AccidentReportFileInfoRepository accidentReportFileInfoRepository;
    @Override
    public List<AccidentReportFileInfoDO> selectByAccidentReportId(Long id) {
        return accidentReportFileInfoRepository.selectByAccidentReportId(id);
    }
    @Override
    public void addAccidentReportFile(AccidentReportFileInfo AccidentReportFileInfo) {
        accidentReportFileInfoRepository.addAccidentReportFile(AccidentReportFileInfo);
    }
    @Override
    public void deleteAccidentReportFileByAccidentReportId(Long accidentReportId) {
        accidentReportFileInfoRepository.deleteAccidentReportFileByAccidentReportId(accidentReportId);
    }
    @Override
    public void deleteAccidentReportFileByIds(List<Long> ids) {
        accidentReportFileInfoRepository.deleteAccidentReportFileByIds(ids);
    }
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/baseService/impl/AccidentReportInfoServiceImpl.java
对比新文件
@@ -0,0 +1,48 @@
package com.gkhy.safePlatform.incidentManage.service.baseService.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gkhy.safePlatform.incidentManage.entity.AccidentReportInfo;
import com.gkhy.safePlatform.incidentManage.entity.AccidentReportInfoDetailDO;
import com.gkhy.safePlatform.incidentManage.entity.AccidentReportInfoPageDO;
import com.gkhy.safePlatform.incidentManage.query.db.AccidentReportDBQuery;
import com.gkhy.safePlatform.incidentManage.repository.AccidentReportInfoRepository;
import com.gkhy.safePlatform.incidentManage.service.baseService.AccidentReportInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service("accidentReportInfoService")
public class AccidentReportInfoServiceImpl extends ServiceImpl<AccidentReportInfoRepository, AccidentReportInfo> implements AccidentReportInfoService {
    @Autowired
    private AccidentReportInfoRepository accidentReportInfoRepository;
    @Override
    public List<AccidentReportInfoPageDO> selectAccidentReportList(Page<AccidentReportInfoPageDO> page, AccidentReportDBQuery AccidentReportDBQuery) {
        return accidentReportInfoRepository.selectAccidentReportList(page,AccidentReportDBQuery);
    }
    @Override
    public void addAccidentReport(AccidentReportInfo AccidentReportInfo) {
        accidentReportInfoRepository.addAccidentReport(AccidentReportInfo);
    }
    @Override
    public AccidentReportInfoDetailDO selectAccidentReportById(Long id) {
        return accidentReportInfoRepository.selectAccidentReportById(id);
    }
    @Override
    public void updateAccidentReport(AccidentReportInfo AccidentReportInfo) {
        accidentReportInfoRepository.updateAccidentReport(AccidentReportInfo);
    }
    @Override
    public void deleteAccidentReportById(Long teamId) {
        accidentReportInfoRepository.deleteAccidentReportById(teamId);
    }
}
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentReportServiceImpl.java
对比新文件
@@ -0,0 +1,253 @@
package com.gkhy.safePlatform.incidentManage.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gkhy.safePlatform.commons.enums.ResultCodes;
import com.gkhy.safePlatform.commons.query.PageQuery;
import com.gkhy.safePlatform.commons.utils.BeanCopyUtils;
import com.gkhy.safePlatform.commons.utils.StringUtils;
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.AccidentResultCodes;
import com.gkhy.safePlatform.incidentManage.exception.AccidentException;
import com.gkhy.safePlatform.incidentManage.model.dto.req.AccidentReportFileReqDTO;
import com.gkhy.safePlatform.incidentManage.model.dto.req.AccidentReportReqDTO;
import com.gkhy.safePlatform.incidentManage.model.dto.resp.AccidentReportDetailRespDTO;
import com.gkhy.safePlatform.incidentManage.model.dto.resp.AccidentReportFileRespDTO;
import com.gkhy.safePlatform.incidentManage.model.dto.resp.AccidentReportPageRespDTO;
import com.gkhy.safePlatform.incidentManage.query.AccidentReportQuery;
import com.gkhy.safePlatform.incidentManage.query.db.AccidentReportDBQuery;
import com.gkhy.safePlatform.incidentManage.service.AccidentReportService;
import com.gkhy.safePlatform.incidentManage.service.baseService.AccidentReportFileInfoService;
import com.gkhy.safePlatform.incidentManage.service.baseService.AccidentReportInfoService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@Service("accidentReportService")
public class AccidentReportServiceImpl implements AccidentReportService {
    @Autowired
    private AccidentReportInfoService accidentReportInfoService;
    @Autowired
    private AccidentReportFileInfoService accidentReportFileInfoService;
    @Override
    public SearchResultVO<List<AccidentReportPageRespDTO>> selectAccidentReportList(PageQuery<AccidentReportQuery> query) {
        Long pageIndex = query.getPageIndex();
        Long pageSize = query.getPageSize();
        Page<AccidentReportInfoPageDO> page = new Page<>(pageIndex, pageSize);
        AccidentReportDBQuery accidentReportDBQuery = new AccidentReportDBQuery();
        if (query.getSearchParams() != null) {
            BeanUtils.copyProperties(query.getSearchParams(), accidentReportDBQuery);
        }
        List<AccidentReportInfoPageDO> accidentReportInfoPageDOList = accidentReportInfoService.selectAccidentReportList(page, accidentReportDBQuery);
        List<AccidentReportPageRespDTO> respList = BeanCopyUtils.copyBeanList(accidentReportInfoPageDOList, AccidentReportPageRespDTO.class);
        return new SearchResultVO<>(
                true,
                pageIndex,
                pageSize,
                page.getTotal(),
                respList,
                ResultCodes.OK
        );
    }
    @Override
    public ResultVO addAccidentReport(Long uid, AccidentReportReqDTO accidentReportReqDTO) {
        //必填项验证
        checkRequired(accidentReportReqDTO);
        Date nowDate = new Date();
        //1.新增事故报告
        AccidentReportInfo accidentReportInfo = new AccidentReportInfo();
        BeanUtils.copyProperties(accidentReportReqDTO, accidentReportInfo);
        accidentReportInfo.setDelFlag(false);
        accidentReportInfo.setCreateUid(uid);
        accidentReportInfo.setGmtCreate(nowDate);
        accidentReportInfo.setStatus(false);
        accidentReportInfoService.addAccidentReport(accidentReportInfo);
        //2.新增事故报告附件
        if (!CollectionUtils.isEmpty(accidentReportReqDTO.getFileList())){
            addAccidentReportFile(accidentReportInfo.getId(),uid,nowDate,accidentReportReqDTO.getFileList());
        }
        return new ResultVO(ResultCodes.OK);
    }
    private void  addAccidentReportFile(Long accidentReportId ,Long uid , Date nowDate , List<AccidentReportFileReqDTO> AccidentReportFileReqDTOList){
        List<AccidentReportFileInfo> fileInfoList = BeanCopyUtils.copyBeanList(AccidentReportFileReqDTOList, AccidentReportFileInfo.class);
        fileInfoList.forEach(AccidentReportFileInfo -> {
            AccidentReportFileInfo.setAccidentReportId(accidentReportId);
            AccidentReportFileInfo.setDelFlag(false);
            AccidentReportFileInfo.setCreateUid(uid);
            AccidentReportFileInfo.setGmtCreate(nowDate);
        });
        for (AccidentReportFileInfo AccidentReportFileInfo :fileInfoList){
            accidentReportFileInfoService.addAccidentReportFile(AccidentReportFileInfo);
        }
    }
    @Override
    public ResultVO<AccidentReportDetailRespDTO> getAccidentReportById(Long id) {
        AccidentReportDetailRespDTO AccidentReportDetailRespDTO = new AccidentReportDetailRespDTO();
        //查询是否存在
        AccidentReportInfoDetailDO AccidentReportInfoDetailDO = accidentReportInfoService.selectAccidentReportById(id);
        if (AccidentReportInfoDetailDO==null){
            throw new AccidentException(AccidentResultCodes.ACCIDENT_REPORT_NOT_EXIST);
        }else{
            BeanUtils.copyProperties(AccidentReportInfoDetailDO,AccidentReportDetailRespDTO);
            //查找对应的附件
            List<AccidentReportFileInfoDO> AccidentReportFileInfoDOList = accidentReportFileInfoService.selectByAccidentReportId(id);
            if (!CollectionUtils.isEmpty(AccidentReportFileInfoDOList)){
                List<AccidentReportFileRespDTO> accidentReportFileRespDTOList = BeanCopyUtils.copyBeanList(AccidentReportFileInfoDOList , AccidentReportFileRespDTO.class);
                AccidentReportDetailRespDTO.setFileList(accidentReportFileRespDTOList);
            }
            return new ResultVO<>(ResultCodes.OK ,AccidentReportDetailRespDTO);
        }
    }
    @Override
    public ResultVO updateAccidentReport(Long uid, AccidentReportReqDTO accidentReportReqDTO) {
        Date nowDate = new Date();
        //查询是否存在
        AccidentReportInfoDetailDO AccidentReportInfoDetailDO = accidentReportInfoService.selectAccidentReportById(accidentReportReqDTO.getId());
        if (AccidentReportInfoDetailDO==null){
            throw new AccidentException(AccidentResultCodes.ACCIDENT_REPORT_NOT_EXIST);
        }else{
            AccidentReportInfo accidentReportInfo = new AccidentReportInfo();
            BeanUtils.copyProperties(accidentReportReqDTO,accidentReportInfo);
            accidentReportInfo.setUpdateUid(uid);
            accidentReportInfo.setGmtModitify(nowDate);
            accidentReportInfoService.updateAccidentReport(accidentReportInfo);
            //修改事故报告附件
            updateAccidentReportFile(uid,accidentReportReqDTO.getId(),nowDate,accidentReportReqDTO.getFileList());
            return new ResultVO(ResultCodes.OK);
        }
    }
    private void updateAccidentReportFile(Long uid ,Long accidentReportId ,Date nowDate,List<AccidentReportFileReqDTO> AccidentReportFileReqDTOList){
        List<AccidentReportFileInfoDO> accidentReportFileInfoDOList = accidentReportFileInfoService.selectByAccidentReportId(accidentReportId);
        List<Long> oldIdsList = accidentReportFileInfoDOList.stream().map(AccidentReportFileInfoDO::getId).collect(Collectors.toList());
        List<Long> newIdsList = new ArrayList<>();
        //新增的附件集合
        List<AccidentReportFileInfo> addList = new ArrayList<>();
        //删除的附件集合(id)
        List<Long> deleteList = new ArrayList<>();
        for (AccidentReportFileReqDTO AccidentReportFileReqDTO : AccidentReportFileReqDTOList){
            //如果不存在id则表示页面新增的附件
            if (AccidentReportFileReqDTO.getId() == null){
                AccidentReportFileInfo AccidentReportFileInfo = new AccidentReportFileInfo();
                BeanUtils.copyProperties(AccidentReportFileReqDTO,AccidentReportFileInfo);
                AccidentReportFileInfo.setDelFlag(false);
                AccidentReportFileInfo.setGmtCreate(nowDate);
                AccidentReportFileInfo.setCreateUid(uid);
                AccidentReportFileInfo.setAccidentReportId(accidentReportId);
                addList.add(AccidentReportFileInfo);
            }
            //如果存在id则判断页面是否删除
            else{
                newIdsList.add(AccidentReportFileReqDTO.getId());
            }
        }
        for (Long oldId : oldIdsList){
            if (!newIdsList.contains(oldId)){
                deleteList.add(oldId);
            }
        }
        if (!CollectionUtils.isEmpty(addList)){
            for (AccidentReportFileInfo AccidentReportFileInfo : addList){
                accidentReportFileInfoService.addAccidentReportFile(AccidentReportFileInfo);
            }
        }
        if (!CollectionUtils.isEmpty(deleteList)){
            accidentReportFileInfoService.deleteAccidentReportFileByIds(deleteList);
        }
    }
    @Override
    public ResultVO batchDeleteAccidentReport(String ids) {
        if (StringUtils.isBlank(ids)){
            throw new AccidentException(AccidentResultCodes.ACCIDENT_REPORT_NULL);
        }else{
            String[] idArr = ids.split(",");
            for (String id : idArr) {
                deleteAccidentReport(Long.valueOf(id));
            }
            return new ResultVO(ResultCodes.OK);
        }
    }
    private void deleteAccidentReport(Long id) {
        //查询是否存在
        AccidentReportInfoDetailDO AccidentReportInfoDetailDO = accidentReportInfoService.selectAccidentReportById(id);
        if (AccidentReportInfoDetailDO==null){
            throw new AccidentException(AccidentResultCodes.ACCIDENT_REPORT_NOT_EXIST);
        }else{
            accidentReportInfoService.deleteAccidentReportById(id);
            //删除附件
            accidentReportFileInfoService.deleteAccidentReportFileByAccidentReportId(id);
        }
    }
    /**
     * 验证必填项
     * @return
     */
    private void checkRequired(AccidentReportReqDTO AccidentReportReqDTO) {
       /* //名称
        if (StringUtils.isBlank(AccidentReportReqDTO.getAccidentName())) {
            throw new AccidentException(AccidentResultCodes.Report_NAME_NULL);
        }
        //部门
        if (AccidentReportReqDTO.getAccidentDepartmentId()==null) {
            throw new AccidentException(AccidentResultCodes.Report_DEPARTMENT_NULL);
        }
        //发生时间
        if (AccidentReportReqDTO.getOccurrenceTime() == null ) {
            throw new AccidentException(AccidentResultCodes.Report_TIME_NULL);
        }
        //发生地点
        if (StringUtils.isBlank(AccidentReportReqDTO.getOccurrencePlace())) {
            throw new AccidentException(AccidentResultCodes.Report_PLACE_NULL);
        }
        //事故原因
        if (StringUtils.isBlank(AccidentReportReqDTO.getAccidentCause())) {
            throw new AccidentException(AccidentResultCodes.Report_CAUSE_NULL);
        }
        //是否有伤亡
        if (AccidentReportReqDTO.getCasualties()==null) {
            throw new AccidentException(AccidentResultCodes.Report_CASUALTIES_NULL);
        }
        //简要经过
        if (StringUtils.isBlank(AccidentReportReqDTO.getAccidentBriefProcess())) {
            throw new AccidentException(AccidentResultCodes.Report_BRIEF_PROCESS_NULL);
        }
        //初步分析
        if (StringUtils.isBlank(AccidentReportReqDTO.getAccidentCausesPreliminaryAnalysis())) {
            throw new AccidentException(AccidentResultCodes.Report_CASE_PRELIMINARY_ANALYSIS_NULL);
        }
        //应急防范措施
        if (StringUtils.isBlank(AccidentReportReqDTO.getEmergencyPrecautions())) {
            throw new AccidentException(AccidentResultCodes.Report_EMERGENCY_PRECAUTIONS_NULL);
        }*/
    }
}
incident-manage/incident-manage-service/src/main/resources/config/mapper/incidentManage/AccidentReportFileInfoMapper.xml
对比新文件
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gkhy.safePlatform.incidentManage.repository.AccidentReportFileInfoRepository">
    <insert id="addAccidentReportFile">
        insert into accident_report_file
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null ">id,</if>
            <if test="delFlag != null ">del_flag,</if>
            <if test="gmtCreate != null ">gmt_create,</if>
            <if test="gmtModitify != null ">gmt_moditify,</if>
            <if test="createUid != null ">create_uid,</if>
            <if test="updateUid != null ">update_uid,</if>
            <if test="accidentReportId != null ">accident_report_id,</if>
            <if test="fileUrl != null and fileUrl != ''">file_url,</if>
            <if test="fileName != null and fileName != ''">file_name</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null ">#{id},</if>
            <if test="delFlag != null ">#{delFlag},</if>
            <if test="gmtCreate != null ">#{gmtCreate},</if>
            <if test="gmtModitify != null ">#{gmtModitify},</if>
            <if test="createUid != null ">#{createUid},</if>
            <if test="updateUid != null ">#{updateUid},</if>
            <if test="accidentReportId != null ">#{accidentReportId},</if>
            <if test="fileUrl != null and fileUrl != ''">#{fileUrl},</if>
            <if test="fileName != null and fileName != ''">#{fileName}</if>
        </trim>
    </insert>
    <resultMap type="com.gkhy.safePlatform.incidentManage.entity.AccidentReportFileInfoDO" id="AccidentReportFileInfoDOResult">
        <id column="id" property="id" jdbcType="BIGINT"/>
        <result column="accident_report_id" property="accidentReportId" />
        <result column="file_url" property="fileUrl" />
        <result column="file_name" property="fileName" />
    </resultMap>
    <select id="selectByAccidentReportId" resultMap="AccidentReportFileInfoDOResult">
        select id,`accident_report_id`,`file_url`,`file_name` from accident_report_file where del_flag = 0 and accident_report_id = #{accidentReportId}
    </select>
    <update id = "deleteAccidentReportFileByIds" >
        update accident_report_file set del_flag = 1 where id in
        <foreach item="id" collection="ids" open="(" separator="," close=")">
            #{id}
        </foreach>
    </update>
    <update id="deleteAccidentReportFileByAccidentReportId">
        update accident_report_file set del_flag = 1 where accident_report_id = #{accidentReportId}
    </update>
</mapper>
incident-manage/incident-manage-service/src/main/resources/config/mapper/incidentManage/AccidentReportInfoMapper.xml
对比新文件
@@ -0,0 +1,150 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gkhy.safePlatform.incidentManage.repository.AccidentReportInfoRepository">
    <resultMap type="com.gkhy.safePlatform.incidentManage.entity.AccidentReportInfoPageDO" id="AccidentReportInfoPageDOResult">
        <id column="id" property="id" jdbcType="BIGINT"/>
        <result column="accident_express_id" property="accidentExpressId"/>
        <result column="status" property="status"/>
        <result column="accident_type" property="accidentType"/>
        <result column="accident_grade" property="accidentGrade"/>
    </resultMap>
    <select id="selectAccidentReportList" resultMap="AccidentReportInfoPageDOResult">
        select id,`accident_express_id`,`accident_type`,`accident_grade` , status from accident_report where del_flag = 0
        <if test="query.status != null  and query.status != ''">and `status` = #{query.status}</if>
    </select>
    <insert id="addAccidentReport" parameterType="com.gkhy.safePlatform.incidentManage.entity.AccidentReportInfo"
            keyProperty="id" useGeneratedKeys="true">
        insert into accident_report
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null ">id,</if>
            <if test="delFlag != null ">del_flag,</if>
            <if test="gmtCreate != null ">gmt_create,</if>
            <if test="gmtModitify != null ">gmt_moditify,</if>
            <if test="createUid != null ">create_uid,</if>
            <if test="updateUid != null ">update_uid,</if>
            <if test="status != null ">status,</if>
            <if test="accidentExpressId != null ">accident_express_id,</if>
            <if test="accidentType != null and accidentType != ''">accident_type,</if>
            <if test="accidentGrade != null and accidentGrade != ''">accident_grade,</if>
            <if test="economicLoss != null ">economic_loss,</if>
            <if test="minorInjuryNum != null ">minor_injury_num,</if>
            <if test="seriousInjuryNum != null ">serious_injury_num,</if>
            <if test="deathNum != null ">death_num,</if>
            <if test="accidentCause != null and accidentCause != ''">accident_cause,</if>
            <if test="reportDeadline != null ">report_deadline,</if>
            <if test="accidentLevel != null and accidentLevel != ''">accident_level,</if>
            <if test="accidentDelayApply != null and accidentDelayApply != ''">accident_delay_apply,</if>
            <if test="comprehensiveAnalysisDirect != null and comprehensiveAnalysisDirect != ''">comprehensive_analysis_direct,</if>
            <if test="comprehensiveAnalysisIndirect != null and comprehensiveAnalysisIndirect != ''">comprehensive_analysis_indirect,</if>
            <if test="rectificationMeasures != null and rectificationMeasures != ''">rectification_measures,</if>
            <if test="accidentHandling != null and accidentHandling != ''">accident_handling,</if>
            <if test="fillInUserUid != null ">fill_in_user_uid,</if>
            <if test="fillInTime != null ">fill_in_time,</if>
            <if test="relevantPersonnelRecords != null and relevantPersonnelRecords != ''">relevant_personnel_records,</if>
            <if test="otherMaterials != null and otherMaterials != ''">other_materials,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null ">#{id},</if>
            <if test="delFlag != null ">#{delFlag},</if>
            <if test="gmtCreate != null ">#{gmtCreate},</if>
            <if test="gmtModitify != null ">#{gmtModitify},</if>
            <if test="createUid != null ">#{createUid},</if>
            <if test="updateUid != null ">#{updateUid},</if>
            <if test="status != null ">#{status},</if>
            <if test="accidentExpressId != null ">#{accidentExpressId},</if>
            <if test="accidentType != null and accidentType != ''">#{accidentType},</if>
            <if test="accidentGrade != null and accidentGrade != ''">#{accidentGrade},</if>
            <if test="economicLoss != null ">#{economicLoss},</if>
            <if test="minorInjuryNum != null ">#{minorInjuryNum},</if>
            <if test="seriousInjuryNum != null ">#{seriousInjuryNum},</if>
            <if test="deathNum != null ">#{deathNum},</if>
            <if test="accidentCause != null and accidentCause != ''">#{accidentCause},</if>
            <if test="reportDeadline != null ">#{reportDeadline},</if>
            <if test="accidentLevel != null and accidentLevel != ''">#{accidentLevel},</if>
            <if test="accidentDelayApply != null and accidentDelayApply != ''">#{accidentDelayApply},</if>
            <if test="comprehensiveAnalysisDirect != null and comprehensiveAnalysisDirect != ''">#{comprehensiveAnalysisDirect},</if>
            <if test="comprehensiveAnalysisIndirect != null and comprehensiveAnalysisIndirect != ''">#{comprehensiveAnalysisIndirect},</if>
            <if test="rectificationMeasures != null and rectificationMeasures != ''">#{rectificationMeasures},</if>
            <if test="accidentHandling != null and accidentHandling != ''">#{accidentHandling},</if>
            <if test="fillInUserUid != null ">#{fillInUserUid},</if>
            <if test="fillInTime != null ">#{fillInTime},</if>
            <if test="relevantPersonnelRecords != null and relevantPersonnelRecords != ''">#{relevantPersonnelRecords},</if>
            <if test="otherMaterials != null and otherMaterials != ''">#{otherMaterials},</if>
        </trim>
    </insert>
    <resultMap type="com.gkhy.safePlatform.incidentManage.entity.AccidentReportInfoDetailDO" id="AccidentReportInfoDetailDOResult">
        <id column="id" property="id" jdbcType="BIGINT"/>
        <result column="status" property="status"/>
        <result column="accident_express_id" property="accidentExpressId"/>
        <result column="accident_type" property="accidentType"/>
        <result column="accident_grade" property="accidentGrade"/>
        <result column="economic_loss" property="economicLoss"/>
        <result column="minor_injury_num" property="minorInjuryNum"/>
        <result column="serious_injury_num" property="seriousInjuryNum"/>
        <result column="death_num" property="deathNum"/>
        <result column="accident_cause" property="accidentCause"/>
        <result column="report_deadline" property="reportDeadline"/>
        <result column="accident_level" property="accidentLevel"/>
        <result column="accident_delay_apply" property="accidentDelayApply"/>
        <result column="comprehensive_analysis_direct" property="comprehensiveAnalysisDirect"/>
        <result column="comprehensive_analysis_indirect" property="comprehensiveAnalysisIndirect"/>
        <result column="rectification_measures" property="rectificationMeasures"/>
        <result column="accident_handling" property="accidentHandling"/>
        <result column="fill_in_user_uid" property="fillInUserUid"/>
        <result column="fill_in_time" property="fillInTime"/>
        <result column="relevant_personnel_records" property="relevantPersonnelRecords"/>
        <result column="other_materials" property="otherMaterials"/>
    </resultMap>
    <select id="selectAccidentReportById" resultMap="AccidentReportInfoDetailDOResult">
        select id ,status ,`accident_express_id`,`accident_type`,`accident_grade`,`economic_loss`,minor_injury_num ,serious_injury_num ,
        `death_num`,`accident_cause`,`report_deadline`,`accident_level`,accident_delay_apply ,comprehensive_analysis_direct ,
        `comprehensive_analysis_indirect`,`rectification_measures`,`accident_handling`,`fill_in_user_uid`,fill_in_time,
        `relevant_personnel_records`,`other_materials`
         from accident_report
        where del_flag = 0 and id = #{id}
    </select>
    <update id="updateAccidentReport" parameterType="com.gkhy.safePlatform.incidentManage.entity.AccidentReportInfo">
        update accident_report
        <trim prefix="SET" suffixOverrides=",">
            <if test="gmtModitify != null ">gmt_moditify = #{gmtModitify},</if>
            <if test="updateUid != null ">update_uid = #{updateUid},</if>
            <if test="status != null ">status = #{status},</if>
            <if test="accidentExpressId != null ">accident_express_id = #{accidentExpressId},</if>
            <if test="accidentType != null and accidentType != ''">accident_type = #{accidentType},</if>
            <if test="accidentGrade != null and accidentGrade != ''">accident_grade = #{accidentGrade},</if>
            <if test="economicLoss != null ">economic_loss = #{economicLoss},</if>
            <if test="minorInjuryNum != null ">minor_injury_num = #{minorInjuryNum},</if>
            <if test="seriousInjuryNum != null ">serious_injury_num = #{seriousInjuryNum},</if>
            <if test="deathNum != null ">death_num = #{deathNum},</if>
            <if test="accidentCause != null and accidentCause != ''">accident_cause = #{accidentCause},</if>
            <if test="reportDeadline != null ">report_deadline = #{reportDeadline},</if>
            <if test="accidentLevel != null and accidentLevel != ''">accident_level = #{accidentLevel},</if>
            <if test="accidentDelayApply != null and accidentDelayApply != ''">accident_delay_apply = #{accidentDelayApply},</if>
            <if test="comprehensiveAnalysisDirect != null and comprehensiveAnalysisDirect != ''">comprehensive_analysis_direct = #{comprehensiveAnalysisDirect},</if>
            <if test="comprehensiveAnalysisIndirect != null and comprehensiveAnalysisIndirect != ''">comprehensive_analysis_indirect = #{comprehensiveAnalysisIndirect},</if>
            <if test="rectificationMeasures != null and rectificationMeasures != ''">rectification_measures = #{rectificationMeasures},</if>
            <if test="accidentHandling != null and accidentHandling != ''">accident_handling = #{accidentHandling},</if>
            <if test="fillInUserUid != null ">fill_in_user_uid = #{fillInUserUid},</if>
            <if test="fillInTime != null ">fill_in_time = #{fillInTime},</if>
            <if test="relevantPersonnelRecords != null and relevantPersonnelRecords != ''">relevant_personnel_records = #{relevantPersonnelRecords},</if>
            <if test="otherMaterials != null and otherMaterials != ''">other_materials = #{otherMaterials},</if>
        </trim>
        where id = #{id}
    </update>
    <update id="deleteAccidentReportById">
        update accident_report set del_flag = 1 where id = #{id}
    </update>
</mapper>