Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH
This commit is contained in:
+1
-1
@@ -233,5 +233,5 @@ public interface IProjectCertificationInventoryEOService extends IService<Projec
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
List<ProjectCertificationInventoryEO> dataUniqueCheck(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList, String cut,List<String> result);
|
||||
List<ProjectCertificationInventoryEO> dataUniqueCheck(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList, String cut,List<String> result,String projectLibraryId);
|
||||
}
|
||||
|
||||
+43
-13
@@ -349,7 +349,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
projectCertificationInventoryEOList.add(projectCertificationInventoryEO);
|
||||
}
|
||||
// 处理提示信息, 类别+检验项目+配置项+编号+责任领域 作为唯一检验
|
||||
List<ProjectCertificationInventoryEO> saveDataList = this.dataUniqueCheck(projectCertificationInventoryEOList,cut,result);
|
||||
List<ProjectCertificationInventoryEO> saveDataList = this.dataUniqueCheck(projectCertificationInventoryEOList,cut,result,projectLibraryId);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(saveDataList)){
|
||||
this.saveBatch(saveDataList);
|
||||
@@ -499,10 +499,12 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
* @param result
|
||||
*/
|
||||
@Override
|
||||
public List<ProjectCertificationInventoryEO> dataUniqueCheck(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList, String cut,List<String> result) {
|
||||
public List<ProjectCertificationInventoryEO> dataUniqueCheck(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList, String cut,List<String> result,String projectLibraryId) {
|
||||
List<ProjectCertificationInventoryEO> pciSaveList = new ArrayList<>();
|
||||
|
||||
List<ProjectCertificationInventoryEO> allDataList = this.list();
|
||||
QueryWrapper<ProjectCertificationInventoryEO> pciQueryWrap = new QueryWrapper<>();
|
||||
pciQueryWrap.lambda().eq(ProjectCertificationInventoryEO::getProjectLibraryId,projectLibraryId);
|
||||
List<ProjectCertificationInventoryEO> allDataList = this.list(pciQueryWrap);
|
||||
// 重复数据数组
|
||||
List<ProjectCertificationInventoryEO> duplicateDataList = allDataList.stream().filter(data -> {
|
||||
boolean flag = false;
|
||||
@@ -2299,7 +2301,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
|
||||
QueryWrapper<ProjectCertificationInventoryEO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().in(ProjectCertificationInventoryEO::getId,idList);
|
||||
queryWrapper.lambda().in(ProjectCertificationInventoryEO::getDutyPerson,currentUser.getId());
|
||||
// queryWrapper.lambda().in(ProjectCertificationInventoryEO::getDutyPerson,currentUser.getId());
|
||||
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = this.list(queryWrapper);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(projectCertificationInventoryEOList)){
|
||||
@@ -2388,16 +2390,44 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
if(!ObjectUtils.isEmpty(certifycationInventoryListByDutyPersonMap) && CollectionUtils.isNotEmpty(dutyPersonList)){
|
||||
for (Map.Entry<String, List<ProjectCertificationInventoryEO>> map : certifycationInventoryListByDutyPersonMap.entrySet()) {
|
||||
String key = map.getKey();
|
||||
List<ProjectCertificationInventoryEO> value = map.getValue();
|
||||
List<String> userIdList = Arrays.asList(key.split(","));
|
||||
|
||||
// 给责任人发消息
|
||||
this.sendMessageByTemplateId(
|
||||
value,
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE18.getValue(),
|
||||
userIdList,
|
||||
dutyPersonList
|
||||
);
|
||||
// 任务待确认状态的数据:发送认证任务确认的催办消息
|
||||
List<ProjectCertificationInventoryEO> toBeConfirmedPciEoList = map.getValue().stream().filter(pciEo -> {
|
||||
boolean flag = false;
|
||||
if(StringUtils.equals(pciEo.getFlowStatus(), CertificationInventoryFlowStatusEnum.TASK_TO_BE_CONFIRMED.getValue())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(toBeConfirmedPciEoList)) {
|
||||
// 给责任人发消息
|
||||
this.sendMessageByTemplateId(
|
||||
toBeConfirmedPciEoList,
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE16.getValue(),
|
||||
userIdList,
|
||||
dutyPersonList
|
||||
);
|
||||
}
|
||||
|
||||
List<ProjectCertificationInventoryEO> toBeSubmitOrReturnPciEoList = map.getValue().stream().filter(pciEo -> {
|
||||
boolean flag = false;
|
||||
if(StringUtils.equals(pciEo.getFlowStatus(), CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
|
||||
|| StringUtils.equals(pciEo.getFlowStatus(), CertificationInventoryFlowStatusEnum.REVIEW_AND_RETURN.getValue())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
if (CollectionUtils.isNotEmpty(toBeSubmitOrReturnPciEoList)) {
|
||||
// 给责任人发消息
|
||||
this.sendMessageByTemplateId(
|
||||
toBeSubmitOrReturnPciEoList,
|
||||
TemplateInfoEnum2.CERTIFICATION_MESSAGE18.getValue(),
|
||||
userIdList,
|
||||
dutyPersonList
|
||||
);
|
||||
}
|
||||
|
||||
/*// 待提交数据 单独发消息
|
||||
List<ProjectCertificationInventoryEO> toBeSubmitDataList = value.stream().filter(v -> {
|
||||
@@ -2636,7 +2666,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
}
|
||||
}
|
||||
|
||||
List<ProjectCertificationInventoryEO> saveDataList = this.dataUniqueCheck(projectCertificationInventoryEOList, cut, result);
|
||||
List<ProjectCertificationInventoryEO> saveDataList = this.dataUniqueCheck(projectCertificationInventoryEOList, cut, result, projectLibraryId);
|
||||
|
||||
this.saveBatch(saveDataList);
|
||||
Date now = new Date();
|
||||
|
||||
+8
-8
@@ -1117,7 +1117,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
&& isProjectRole != Integer.parseInt(ProjectRoleEnum.VIEWER.getValue())){
|
||||
projectLawsInventoryEOQueryWrapper.and(queryWrapper ->{
|
||||
queryWrapper.eq("regulation_owner_id",currentUser.getId()).
|
||||
or().eq("homologation_engineer_id",currentUser.getId());
|
||||
or().eq("engineering_interface_person",currentUser.getId()).
|
||||
or().eq("design_duty_id",currentUser.getId()).
|
||||
or().eq("verify_duty_id",currentUser.getId());
|
||||
});
|
||||
}
|
||||
List<ProjectLawsInventoryEO> result = super.baseMapper.selectList(projectLawsInventoryEOQueryWrapper);
|
||||
@@ -9931,8 +9933,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
}
|
||||
}
|
||||
}
|
||||
if((StringUtils.isNotBlank(certificationEngineerName) && certificationEngineerName.contains(loginUser.getUsername()))
|
||||
|| lawEngineerNameList.contains(loginUser.getUsername())){
|
||||
if(lawEngineerNameList.contains(loginUser.getUsername())){
|
||||
SysRole sysRole = new SysRole();
|
||||
sysRole.setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.REGULATI_ENGINEER.getValue());
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
@@ -9942,7 +9943,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
}
|
||||
sysRoles.add(sysRole);
|
||||
}
|
||||
List<String> certificationEngineerList = new ArrayList<>();
|
||||
/*List<String> certificationEngineerList = new ArrayList<>();
|
||||
if(projectRelatedPersonnels.size() != 0){
|
||||
for(ProjectRelatedPersonnel projectRelatedPersonnel : projectRelatedPersonnels){
|
||||
String certificationEngineerName1 = projectRelatedPersonnel.getCertificationEngineerName();
|
||||
@@ -9962,7 +9963,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
sysRole.setRoleName(com.jero.modules.system.enums.ProjectRoleEnum.HOMOLOGATION_ENGINEER.getCode());
|
||||
}
|
||||
sysRoles.add(sysRole);
|
||||
}
|
||||
}*/
|
||||
|
||||
List<String> engineeringInterfacePersonList = new ArrayList<>();
|
||||
if(projectRelatedPersonnels.size() != 0){
|
||||
@@ -9970,12 +9971,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
String engineeringInterfacePerson = projectRelatedPersonnel.getEngineeringInterfacePersonName();
|
||||
if(StringUtils.isNotBlank(engineeringInterfacePerson)){
|
||||
engineeringInterfacePerson = engineeringInterfacePerson.replaceAll(" ","");
|
||||
certificationEngineerList.addAll(Arrays.asList(engineeringInterfacePerson.split(",")));
|
||||
engineeringInterfacePersonList.addAll(Arrays.asList(engineeringInterfacePerson.split(",")));
|
||||
}
|
||||
}
|
||||
}
|
||||
if((StringUtils.isNotBlank(certificationEngineerName) && certificationEngineerName.contains(loginUser.getUsername()))
|
||||
|| engineeringInterfacePersonList.contains(loginUser.getUsername())){
|
||||
if(engineeringInterfacePersonList.contains(loginUser.getUsername())){
|
||||
SysRole sysRole = new SysRole();
|
||||
sysRole.setRoleCode(com.jero.modules.system.enums.ProjectRoleEnum.INTERFACE_PERSON1.getValue());
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
|
||||
+1
@@ -19,6 +19,7 @@
|
||||
|
||||
<sql id="BaseQuerySql">
|
||||
<where>
|
||||
and project_name is not null
|
||||
<if test="params.projectName != null and params.projectName !=''">
|
||||
and (
|
||||
temp.project_name like CONCAT(CONCAT('%',#{params.projectName}),'%')
|
||||
|
||||
Reference in New Issue
Block a user