资质文件的资质类型的(安全协议、劳务分包合同、施工合同必须都要上传
This commit is contained in:
parent
7d0e079ee4
commit
7b0a7e8aaa
@ -1,8 +1,24 @@
|
|||||||
package com.zhgd.xmgl.modules.basicdata.constant;
|
package com.zhgd.xmgl.modules.basicdata.constant;
|
||||||
|
|
||||||
public interface DictionaryConstant {
|
public interface DictionaryConstant {
|
||||||
|
/**
|
||||||
|
* 项目施工阶段
|
||||||
|
*/
|
||||||
String PROJECT_CONSTRUCTION_STAGE = "project_construction_stage";
|
String PROJECT_CONSTRUCTION_STAGE = "project_construction_stage";
|
||||||
|
/**
|
||||||
|
* AI分析硬件设备报警记录类型
|
||||||
|
*/
|
||||||
String AI_ANALYSE_HARD_WARE_ALARM_RECORD_TYPE = "ai_analyse_hard_ware_alarm_record_type";
|
String AI_ANALYSE_HARD_WARE_ALARM_RECORD_TYPE = "ai_analyse_hard_ware_alarm_record_type";
|
||||||
|
/**
|
||||||
|
* 隧道定位各项目的标签消失时间配置
|
||||||
|
*/
|
||||||
String LOCATION_DATA_PROJECT_SN_DISAPPEAR_TIME = "location_data_project_sn_disappear_time";
|
String LOCATION_DATA_PROJECT_SN_DISAPPEAR_TIME = "location_data_project_sn_disappear_time";
|
||||||
|
/**
|
||||||
|
* 项目的结构类型
|
||||||
|
*/
|
||||||
String PROJECT_STRUCTURE_TYPE = "project_structure_type";
|
String PROJECT_STRUCTURE_TYPE = "project_structure_type";
|
||||||
|
/**
|
||||||
|
* 合作单位的资质文件的资质类型
|
||||||
|
*/
|
||||||
|
String ENTERPRISE_QUALIFICATION_QUALIFICATION_TYPE = "enterprise_qualification_qualification_type";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,9 +48,7 @@ import org.springframework.transaction.annotation.Propagation;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.HashMap;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -173,7 +171,14 @@ public class XzSupplierQualificationApplyServiceImpl extends ServiceImpl<XzSuppl
|
|||||||
supplierRecord.setId(null);
|
supplierRecord.setId(null);
|
||||||
List<XzSupplierQualificationRecord> qualificationRecords = dto.getQualificationRecords();
|
List<XzSupplierQualificationRecord> qualificationRecords = dto.getQualificationRecords();
|
||||||
List<ProjectEnterpriseSupplierInfo> enterpriseSupplierInfos = dto.getEnterpriseSupplierInfos();
|
List<ProjectEnterpriseSupplierInfo> enterpriseSupplierInfos = dto.getEnterpriseSupplierInfos();
|
||||||
List<XzSupplierQualificationApply> supplierApprovalList = baseMapper.getSupplierApprovalList(apply.getProjectSn(), supplierRecord.getSocialCode());
|
String projectSn = apply.getProjectSn();
|
||||||
|
List<Integer> mustHave = Arrays.asList(1, 2, 3);
|
||||||
|
Set<Integer> set = qualificationRecords.stream().filter(x -> mustHave.contains(x.getQualificationType())).map(XzSupplierQualificationRecord::getQualificationType).collect(Collectors.toSet());
|
||||||
|
int i = 3;
|
||||||
|
if (CollUtil.isEmpty(qualificationRecords) || set.size() < i) {
|
||||||
|
throw new OpenAlertException("资质文件的资质类型的(安全协议、劳务分包合同、施工合同必须都要上传");
|
||||||
|
}
|
||||||
|
List<XzSupplierQualificationApply> supplierApprovalList = baseMapper.getSupplierApprovalList(projectSn, supplierRecord.getSocialCode());
|
||||||
long c1 = supplierApprovalList.stream().filter(apply1 -> Objects.equals(apply1.getApplyStatus(), 1)).count();
|
long c1 = supplierApprovalList.stream().filter(apply1 -> Objects.equals(apply1.getApplyStatus(), 1)).count();
|
||||||
if (c1 > 0) {
|
if (c1 > 0) {
|
||||||
throw new OpenAlertException("该承包商(信用代码:" + supplierRecord.getSocialCode() + ")待审核中");
|
throw new OpenAlertException("该承包商(信用代码:" + supplierRecord.getSocialCode() + ")待审核中");
|
||||||
@ -186,18 +191,16 @@ public class XzSupplierQualificationApplyServiceImpl extends ServiceImpl<XzSuppl
|
|||||||
Long applyId = apply.getId();
|
Long applyId = apply.getId();
|
||||||
supplierRecord.setXzSupplierQualificationApplyId(applyId);
|
supplierRecord.setXzSupplierQualificationApplyId(applyId);
|
||||||
xzSupplierRecordService.save(supplierRecord);
|
xzSupplierRecordService.save(supplierRecord);
|
||||||
if (CollUtil.isNotEmpty(qualificationRecords)) {
|
|
||||||
for (XzSupplierQualificationRecord record : qualificationRecords) {
|
for (XzSupplierQualificationRecord record : qualificationRecords) {
|
||||||
record.setId(null);
|
record.setId(null);
|
||||||
record.setXzSupplierQualificationApplyId(applyId);
|
record.setXzSupplierQualificationApplyId(applyId);
|
||||||
}
|
}
|
||||||
xzSupplierQualificationRecordService.saveBatch(qualificationRecords);
|
xzSupplierQualificationRecordService.saveBatch(qualificationRecords);
|
||||||
}
|
|
||||||
if (CollUtil.isNotEmpty(enterpriseSupplierInfos)) {
|
if (CollUtil.isNotEmpty(enterpriseSupplierInfos)) {
|
||||||
for (ProjectEnterpriseSupplierInfo info : enterpriseSupplierInfos) {
|
for (ProjectEnterpriseSupplierInfo info : enterpriseSupplierInfos) {
|
||||||
info.setId(null);
|
info.setId(null);
|
||||||
info.setType(1);
|
info.setType(1);
|
||||||
info.setProjectSn(apply.getProjectSn());
|
info.setProjectSn(projectSn);
|
||||||
info.setXzSupplierQualificationApplyId(applyId);
|
info.setXzSupplierQualificationApplyId(applyId);
|
||||||
}
|
}
|
||||||
projectEnterpriseSupplierInfoService.saveBatch(enterpriseSupplierInfos);
|
projectEnterpriseSupplierInfoService.saveBatch(enterpriseSupplierInfos);
|
||||||
@ -207,9 +210,9 @@ public class XzSupplierQualificationApplyServiceImpl extends ServiceImpl<XzSuppl
|
|||||||
String msg = StrUtil.format("{}在{}提交了承包商入场申请,请尽快审批!", supplierRecord.getEnterpriseName(), DateUtil.formatDateTime(qualificationApply.getApplyTime()));
|
String msg = StrUtil.format("{}在{}提交了承包商入场申请,请尽快审批!", supplierRecord.getEnterpriseName(), DateUtil.formatDateTime(qualificationApply.getApplyTime()));
|
||||||
String title = "承包商入场审批";
|
String title = "承包商入场审批";
|
||||||
//项目发通知
|
//项目发通知
|
||||||
noticeService.addProjectLevelNotice(apply.getProjectSn(), title, msg, "1", null);
|
noticeService.addProjectLevelNotice(projectSn, title, msg, "1", null);
|
||||||
//安全环保监察中心角色发通知
|
//安全环保监察中心角色发通知
|
||||||
List<SystemUser> systemUserList = systemUserService.getProjectChildernSystemUserList(new MapBuilder<String, Object>().put("projectSn", apply.getProjectSn()).put("isSafetyAndMonitoringRoleName", 1).put(Cts.IGNORE_DATA_SCOPE, Cts.IGNORE_DATA_SCOPE).build());
|
List<SystemUser> systemUserList = systemUserService.getProjectChildernSystemUserList(new MapBuilder<String, Object>().put("projectSn", projectSn).put("isSafetyAndMonitoringRoleName", 1).put(Cts.IGNORE_DATA_SCOPE, Cts.IGNORE_DATA_SCOPE).build());
|
||||||
if (CollUtil.isNotEmpty(systemUserList)) {
|
if (CollUtil.isNotEmpty(systemUserList)) {
|
||||||
noticeService.addUsersNotice(systemUserList.stream().map(SystemUser::getUserId).collect(Collectors.toList()), title, msg, "1");
|
noticeService.addUsersNotice(systemUserList.stream().map(SystemUser::getUserId).collect(Collectors.toList()), title, msg, "1");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user