From ab78424bf520cbe8f2eab8dde235baa82c660e19 Mon Sep 17 00:00:00 2001
From: songhuangfeng123 <shf18767906695@163.com>
Date: 星期四, 21 七月 2022 15:07:35 +0800
Subject: [PATCH] 工伤申报
---
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/WorkInjuryDeclarationServiceImpl.java | 8 ++--
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentReportServiceImpl.java | 72 ++++++++++++++++++++++--------------
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/enums/AccidentResultCodes.java | 18 ++++++++-
3 files changed, 64 insertions(+), 34 deletions(-)
diff --git a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/enums/AccidentResultCodes.java b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/enums/AccidentResultCodes.java
index 8aab127..b5afef3 100644
--- a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/enums/AccidentResultCodes.java
+++ b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/enums/AccidentResultCodes.java
@@ -16,9 +16,23 @@
EXPRESS_EMERGENCY_PRECAUTIONS_NULL("E1009","事故快报应急防范措施不能为空"),
- ACCIDENT_REPORT_NULL("A1001", "事故报告不可为空"),
- ACCIDENT_REPORT_NOT_EXIST("A1002", "事故报告不存在"),
+ ACCIDENT_REPORT_NULL("A1003", "事故报告不可为空"),
+ ACCIDENT_REPORT_NOT_EXIST("A1004", "事故报告不存在"),
+ REPORT_TYPE_NULL("R1001","事故报告事故类型不能为空"),
+ REPORT_GRADE_NULL("R1002","事故报告事故等级不能为空"),
+ REPORT_ECONOMIC_LOSS_NULL("R1003","事故报告经济损失不能为空"),
+ REPORT_REPORT_DEADLINE_NULL("R1004","事故报告要求报告完成期限不能为空"),
+ REPORT_LEVEL_NULL("R1005","事故报告事故级别不能为空"),
+ REPORT_COMPREHENSIVE_ANALYSIS_DIRECT_NULL("R1006","事故报告原因综合分析(直接分析)不能为空"),
+ REPORT_COMPREHENSIVE_ANALYSIS_INDIRECT_NULL("R1007","事故报告原因综合分析(间接分析)不能为空"),
+ REPORT_RECTIFICATION_MEASURES_NULL("R1008","事故报告整改措施不能为空"),
+ REPORT_ACCIDENT_HANDLING_NULL("R1009","事故报告事故处理不能为空"),
+ REPORT_FILL_IN_USER_UID_NULL("R1010","事故报告填写人不能为空"),
+ REPORT_FILL_IN_TIME_NULL("R1011","事故报告填写日期不能为空"),
+
+ WORK_INJURY_DECLARATION_NULL("W1001", "工伤申报不可为空"),
+ WORK_INJURY_DECLARATION_NOT_EXIST("W1002", "工伤申报不存在"),
ERROR("A3000", "未知错误");
diff --git a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentReportServiceImpl.java b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentReportServiceImpl.java
index 0df3f3c..31f0516 100644
--- a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentReportServiceImpl.java
+++ b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentReportServiceImpl.java
@@ -212,42 +212,58 @@
* @return
*/
private void checkRequired(AccidentReportReqDTO AccidentReportReqDTO) {
- /* //名称
- if (StringUtils.isBlank(AccidentReportReqDTO.getAccidentName())) {
- throw new AccidentException(AccidentResultCodes.Report_NAME_NULL);
+ //事故快报
+ if (AccidentReportReqDTO.getAccidentExpressId() == null ) {
+ throw new AccidentException(AccidentResultCodes.ACCIDENT_EXPRESS_NULL);
}
- //部门
- if (AccidentReportReqDTO.getAccidentDepartmentId()==null) {
- throw new AccidentException(AccidentResultCodes.Report_DEPARTMENT_NULL);
+ //事故类型
+ if (StringUtils.isBlank(AccidentReportReqDTO.getAccidentType())) {
+ throw new AccidentException(AccidentResultCodes.REPORT_TYPE_NULL);
}
- //发生时间
- if (AccidentReportReqDTO.getOccurrenceTime() == null ) {
- throw new AccidentException(AccidentResultCodes.Report_TIME_NULL);
+ //事故等级
+ if (StringUtils.isBlank(AccidentReportReqDTO.getAccidentGrade())) {
+ throw new AccidentException(AccidentResultCodes.REPORT_GRADE_NULL);
}
- //发生地点
- if (StringUtils.isBlank(AccidentReportReqDTO.getOccurrencePlace())) {
- throw new AccidentException(AccidentResultCodes.Report_PLACE_NULL);
+ //经济损失
+ if (AccidentReportReqDTO.getEconomicLoss() == null ) {
+ throw new AccidentException(AccidentResultCodes.REPORT_ECONOMIC_LOSS_NULL);
}
- //事故原因
- if (StringUtils.isBlank(AccidentReportReqDTO.getAccidentCause())) {
- throw new AccidentException(AccidentResultCodes.Report_CAUSE_NULL);
+ //要求报告完成期限
+ if (AccidentReportReqDTO.getReportDeadline() == null ) {
+ throw new AccidentException(AccidentResultCodes.REPORT_REPORT_DEADLINE_NULL);
}
- //是否有伤亡
- if (AccidentReportReqDTO.getCasualties()==null) {
- throw new AccidentException(AccidentResultCodes.Report_CASUALTIES_NULL);
+ //事故级别
+ if (StringUtils.isBlank(AccidentReportReqDTO.getAccidentLevel())) {
+ throw new AccidentException(AccidentResultCodes.REPORT_LEVEL_NULL);
}
- //简要经过
- if (StringUtils.isBlank(AccidentReportReqDTO.getAccidentBriefProcess())) {
- throw new AccidentException(AccidentResultCodes.Report_BRIEF_PROCESS_NULL);
+ //原因综合分析(直接)
+ if (StringUtils.isBlank(AccidentReportReqDTO.getComprehensiveAnalysisDirect())) {
+ throw new AccidentException(AccidentResultCodes.REPORT_COMPREHENSIVE_ANALYSIS_DIRECT_NULL);
}
- //初步分析
- if (StringUtils.isBlank(AccidentReportReqDTO.getAccidentCausesPreliminaryAnalysis())) {
- throw new AccidentException(AccidentResultCodes.Report_CASE_PRELIMINARY_ANALYSIS_NULL);
+ //原因综合分析(直接)
+ if (StringUtils.isBlank(AccidentReportReqDTO.getComprehensiveAnalysisDirect())) {
+ throw new AccidentException(AccidentResultCodes.REPORT_COMPREHENSIVE_ANALYSIS_DIRECT_NULL);
}
- //应急防范措施
- if (StringUtils.isBlank(AccidentReportReqDTO.getEmergencyPrecautions())) {
- throw new AccidentException(AccidentResultCodes.Report_EMERGENCY_PRECAUTIONS_NULL);
- }*/
+ //原因综合分析(间接)
+ if (StringUtils.isBlank(AccidentReportReqDTO.getComprehensiveAnalysisIndirect())) {
+ throw new AccidentException(AccidentResultCodes.REPORT_COMPREHENSIVE_ANALYSIS_INDIRECT_NULL);
+ }
+ //整改措施
+ if (StringUtils.isBlank(AccidentReportReqDTO.getRectificationMeasures())) {
+ throw new AccidentException(AccidentResultCodes.REPORT_RECTIFICATION_MEASURES_NULL);
+ }
+ //事故处理
+ if (StringUtils.isBlank(AccidentReportReqDTO.getAccidentHandling())) {
+ throw new AccidentException(AccidentResultCodes.REPORT_ACCIDENT_HANDLING_NULL);
+ }
+ //填写人
+ if (AccidentReportReqDTO.getFillInUserUid() == null ) {
+ throw new AccidentException(AccidentResultCodes.REPORT_FILL_IN_USER_UID_NULL);
+ }
+ //填写日期
+ if (AccidentReportReqDTO.getFillInTime() == null ) {
+ throw new AccidentException(AccidentResultCodes.REPORT_FILL_IN_TIME_NULL);
+ }
}
}
diff --git a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/WorkInjuryDeclarationServiceImpl.java b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/WorkInjuryDeclarationServiceImpl.java
index 80b673f..8f76e40 100644
--- a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/WorkInjuryDeclarationServiceImpl.java
+++ b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/WorkInjuryDeclarationServiceImpl.java
@@ -104,7 +104,7 @@
//查询是否存在
WorkInjuryDeclarationInfoDetailDO WorkInjuryDeclarationInfoDetailDO = workInjuryDeclarationInfoService.selectWorkInjuryDeclarationById(id);
if (WorkInjuryDeclarationInfoDetailDO==null){
- throw new AccidentException(AccidentResultCodes.ACCIDENT_REPORT_NOT_EXIST);
+ throw new AccidentException(AccidentResultCodes.WORK_INJURY_DECLARATION_NOT_EXIST);
}else{
BeanUtils.copyProperties(WorkInjuryDeclarationInfoDetailDO,WorkInjuryDeclarationDetailRespDTO);
//查找对应的附件
@@ -123,7 +123,7 @@
//查询是否存在
WorkInjuryDeclarationInfoDetailDO WorkInjuryDeclarationInfoDetailDO = workInjuryDeclarationInfoService.selectWorkInjuryDeclarationById(WorkInjuryDeclarationReqDTO.getId());
if (WorkInjuryDeclarationInfoDetailDO==null){
- throw new AccidentException(AccidentResultCodes.ACCIDENT_REPORT_NOT_EXIST);
+ throw new AccidentException(AccidentResultCodes.WORK_INJURY_DECLARATION_NOT_EXIST);
}else{
WorkInjuryDeclarationInfo WorkInjuryDeclarationInfo = new WorkInjuryDeclarationInfo();
BeanUtils.copyProperties(WorkInjuryDeclarationReqDTO,WorkInjuryDeclarationInfo);
@@ -181,7 +181,7 @@
@Override
public ResultVO batchDeleteWorkInjuryDeclaration(String ids) {
if (StringUtils.isBlank(ids)){
- throw new AccidentException(AccidentResultCodes.ACCIDENT_REPORT_NULL);
+ throw new AccidentException(AccidentResultCodes.WORK_INJURY_DECLARATION_NULL);
}else{
String[] idArr = ids.split(",");
for (String id : idArr) {
@@ -195,7 +195,7 @@
//查询是否存在
WorkInjuryDeclarationInfoDetailDO WorkInjuryDeclarationInfoDetailDO = workInjuryDeclarationInfoService.selectWorkInjuryDeclarationById(id);
if (WorkInjuryDeclarationInfoDetailDO==null){
- throw new AccidentException(AccidentResultCodes.ACCIDENT_REPORT_NOT_EXIST);
+ throw new AccidentException(AccidentResultCodes.WORK_INJURY_DECLARATION_NOT_EXIST);
}else{
workInjuryDeclarationInfoService.deleteWorkInjuryDeclarationById(id);
//删除附件
--
Gitblit v1.9.2