风险预警调整
parent
00266a6d70
commit
899e59de0e
|
|
@ -2,10 +2,13 @@ package org.qinan.safetyeval.app.executor.institution;
|
|||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import org.qinan.safetyeval.app.convertor.EvalSurveyCmdConvertor;
|
||||
import org.qinan.safetyeval.app.waring.executor.command.EvalProjectOrgWaringAddCmdExe;
|
||||
import org.qinan.safetyeval.client.api.institution.EvalSurveyAttachApi;
|
||||
import org.qinan.safetyeval.client.co.institution.EvalSurveyAttachCO;
|
||||
import org.qinan.safetyeval.client.dto.SingleResponse;
|
||||
import org.qinan.safetyeval.client.dto.institution.EvalSurveyAttachSaveCmd;
|
||||
import org.qinan.safetyeval.client.waring.request.EvalProjectOrgWaringAddCmd;
|
||||
import org.qinan.safetyeval.domain.constant.OrgProjectWarningTypeEnum;
|
||||
import org.qinan.safetyeval.domain.constant.ProjectDocumentEnum;
|
||||
import org.qinan.safetyeval.domain.constant.ProjectStageEnum;
|
||||
import org.qinan.safetyeval.domain.entity.EvalSurveyAttachEntity;
|
||||
|
|
@ -40,6 +43,8 @@ public class EvalSurveyAttachExecutor implements EvalSurveyAttachApi {
|
|||
private EvalSurveyAttachMapper evalSurveyAttachMapper;
|
||||
@Autowired
|
||||
private EvalSurveyMapper evalSurveyMapper;
|
||||
@Autowired
|
||||
private EvalProjectOrgWaringAddCmdExe evalProjectOrgWaringAddCmdExe;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
|
@ -61,7 +66,11 @@ public class EvalSurveyAttachExecutor implements EvalSurveyAttachApi {
|
|||
&& StringUtils.hasText(f.getFileUrl())).count();
|
||||
if (enterpriseCount == 0) {
|
||||
// todo新增预警数据: 企业整改附件未传
|
||||
|
||||
evalProjectOrgWaringAddCmdExe.execute(EvalProjectOrgWaringAddCmd.builder()
|
||||
.projectId(Long.valueOf(cmdList.get(0).getProjectId()))
|
||||
.warningType(OrgProjectWarningTypeEnum.CORPORATE_RECTIFICATION.getCode())
|
||||
.triggerCondition("企业整改附件未传")
|
||||
.build());
|
||||
}
|
||||
long rectificationCountPrefix = data.stream().filter(f -> ProjectDocumentEnum.RECTIFICATION_NOTICE.getVal().equals(f.getAttachTypeCode())
|
||||
&& f.getCheckbox() == 1).count();
|
||||
|
|
@ -70,8 +79,12 @@ public class EvalSurveyAttachExecutor implements EvalSurveyAttachApi {
|
|||
&& StringUtils.hasText(f.getFileUrl())).count();
|
||||
if (rectificationCount == 0) {
|
||||
// todo 新增预警数据: 整改复查附件未传
|
||||
evalProjectOrgWaringAddCmdExe.execute(EvalProjectOrgWaringAddCmd.builder()
|
||||
.projectId(Long.valueOf(cmdList.get(0).getProjectId()))
|
||||
.warningType(OrgProjectWarningTypeEnum.MAJOR_HAZARD.getCode())
|
||||
.triggerCondition("整改复查附件未传")
|
||||
.build());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return SingleResponse.success(true);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package org.qinan.safetyeval.client.waring.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
|
@ -14,6 +15,7 @@ import java.io.Serializable;
|
|||
* @date 2026-08-13 15:49:16
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
public class EvalProjectOrgWaringAddCmd implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
|
@ -50,5 +52,4 @@ public class EvalProjectOrgWaringAddCmd implements Serializable {
|
|||
*/
|
||||
@ApiModelProperty(value = "环境")
|
||||
private String env;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ public enum OrgProjectWarningTypeEnum {
|
|||
|
||||
NOT_ARCHIVED("not_archived", "未归档"),
|
||||
REPORT_OVERDUE("report_overdue", "报告超期"),
|
||||
CORPORATE_RECTIFICATION("CORPORATE_RECTIFICATION", "企业整改"),
|
||||
MAJOR_HAZARD("MAJOR_HAZARD", "重大隐患"),
|
||||
;
|
||||
|
||||
private final String code;
|
||||
|
|
|
|||
Loading…
Reference in New Issue