Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH

This commit is contained in:
zyx.net
2023-03-28 10:14:04 +08:00
4 changed files with 98 additions and 7 deletions
@@ -33,8 +33,11 @@ import com.jero.modules.system.service.ISysDictService;
import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
import com.jero.modules.system.util.StringUtils;
import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO;
import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService;
import com.jero.modules.top.entity.TopProjectEO;
import com.jero.modules.top.service.ITopProjectEOService;
import com.jero.modules.wkflow.enums.FlowTypeEnum;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.poi.hssf.usermodel.HSSFSheet;
@@ -147,6 +150,9 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
@Autowired
private IProjectCertificationInventoryEOService projectCertificationInventoryEOService;
@Autowired
private IProcessInfoDetailEOService processInfoDetailEOService;
/**
* 保存
*
@@ -441,6 +447,8 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
}
}
}
setRzlcCertificationEngineerTask(projectLibraryBase);
checkExitData(projectLibraryBase);
saveOrUpdate(projectLibraryBase);
checkVersionOrder(projectLibraryBase.getParentId(),projectLibraryBase.getProjectVersion(),projectLibraryBase.getId());
@@ -666,6 +674,87 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
}
/**
* 重新设置认证工程师在待办中心的 认证流程的 待办任务。
* @param projectLibraryBase
*/
private void setRzlcCertificationEngineerTask(ProjectLibraryBase projectLibraryBase) {
if(org.apache.commons.lang3.StringUtils.isNotEmpty(projectLibraryBase.getCertificationEngineer())){
List<String> certificationEngineerIdList = Arrays.asList(projectLibraryBase.getCertificationEngineer().split(","));
QueryWrapper<ProjectCertificationInventoryEO> pciQueryWrap = new QueryWrapper<>();
pciQueryWrap.lambda().eq(ProjectCertificationInventoryEO::getProjectLibraryId, projectLibraryBase.getId());
List<ProjectCertificationInventoryEO> pciEOList = this.projectCertificationInventoryEOService.list(pciQueryWrap);
if(CollectionUtils.isNotEmpty(pciEOList)){
// 清单待校核的数据
List<ProjectCertificationInventoryEO> pciToBeCheckedList = pciEOList.stream().filter(pci -> {
boolean flag = false;
if(StringUtils.equals(pci.getFlowStatus(),CertificationInventoryFlowStatusEnum.LIST_TO_BE_CHECKED.getValue())){
flag = true;
}
return flag;
}).collect(Collectors.toList());
// 如果该项目下清单待校核的数据不为空,给这些认证工程师分配待办任务。
if(CollectionUtils.isNotEmpty(pciToBeCheckedList)){
// 删除待办中心(是这个项目库的 pre-Homo流程的待办任务, 认证工程师接受任务节点的数据)
QueryWrapper<ProcessInfoDetailEO> pidRemoveWrap = new QueryWrapper<>();
pidRemoveWrap.lambda().eq(ProcessInfoDetailEO::getProcessInfoId, projectLibraryBase.getId());
pidRemoveWrap.lambda().eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.RZGCSJSRW.getKey());
pidRemoveWrap.lambda().eq(ProcessInfoDetailEO::getFlowType,FlowTypeEnum.CERTIFICATION_LC.getValue());
this.processInfoDetailEOService.remove(pidRemoveWrap);
// 给认证工程师分配任务
List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
for (String userId : certificationEngineerIdList) {
ProcessInfoDetailEO processInfoDetailEO = new ProcessInfoDetailEO();
processInfoDetailEO.setUserId(userId);
processInfoDetailEO.setTaskDefinitionKey(CertificationFlowNodeEnum.RZGCSJSRW.getKey());
processInfoDetailEO.setCreateTime(new Date());
processInfoDetailEO.setStatus(TaskStatusEnum.NOT_DONE.getValue());
processInfoDetailEO.setProcessInfoId(projectLibraryBase.getId());
processInfoDetailEO.setActiProcInstId(projectLibraryBase.getId());
processInfoDetailEO.setFlowType(FlowTypeEnum.CERTIFICATION_LC.getValue());
processInfoDetailEOList.add(processInfoDetailEO);
}
this.processInfoDetailEOService.saveBatch(processInfoDetailEOList);
}
// 结果待提交的数据
List<ProjectCertificationInventoryEO> pciToBeReviewEDList = pciEOList.stream().filter(pci -> {
boolean flag = false;
if(StringUtils.equals(pci.getFlowStatus(),CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())){
flag = true;
}
return flag;
}).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(pciToBeReviewEDList)){
// 删除待办中心(是这个项目库的 pre-Homo流程的待办任务, 认证工程师审查 任务节点的数据)
QueryWrapper<ProcessInfoDetailEO> pidRemoveWrap = new QueryWrapper<>();
pidRemoveWrap.lambda().eq(ProcessInfoDetailEO::getProcessInfoId, projectLibraryBase.getId());
pidRemoveWrap.lambda().eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.RZGCSSC.getKey());
pidRemoveWrap.lambda().eq(ProcessInfoDetailEO::getFlowType,FlowTypeEnum.CERTIFICATION_LC.getValue());
this.processInfoDetailEOService.remove(pidRemoveWrap);
// 给认证工程师分配任务
List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
for (String userId : certificationEngineerIdList) {
ProcessInfoDetailEO processInfoDetailEO = new ProcessInfoDetailEO();
processInfoDetailEO.setUserId(userId);
processInfoDetailEO.setTaskDefinitionKey(CertificationFlowNodeEnum.RZGCSSC.getKey());
processInfoDetailEO.setCreateTime(new Date());
processInfoDetailEO.setStatus(TaskStatusEnum.NOT_DONE.getValue());
processInfoDetailEO.setProcessInfoId(projectLibraryBase.getId());
processInfoDetailEO.setActiProcInstId(projectLibraryBase.getId());
processInfoDetailEO.setFlowType(FlowTypeEnum.CERTIFICATION_LC.getValue());
processInfoDetailEOList.add(processInfoDetailEO);
}
this.processInfoDetailEOService.saveBatch(processInfoDetailEOList);
}
}
}
}
/**
* 通过id删除
*
+1
View File
@@ -1726,4 +1726,5 @@ module.exports = {
noteone:'Note: CSV format is supported. The value is within 20M and the number is 1 to 10',
notetwo:'\n1. Provide the modified or expanded batch of "Announcement" and supporting materials;\n2. Verification materials shall be submitted to ensure that products meet the relevant requirements of national laws and regulations, technologies, standards and technical specifications;\n',
notethree:'Provide supporting materials',
verifyComplianceConfirmReturnReason:'Verify compliance Confirm return reason',
}
+2 -1
View File
@@ -1825,7 +1825,8 @@ module.exports = {
notecsv:':支持CSV格式大小20M以内',
theDataYouInitiate:'您所选的数据均不符合流程发起条件请重新检查后发起',
dataWithProcessReleasedCannotBeReset:'流程状态为清单待发布的数据不能被重置',
reasonForReturnOfDesignCompliance:'设计符合性退回原因',
reasonForReturnOfDesignCompliance:'设计符合性确认退回原因',
notetwo:'\n1提供变更或扩展后的公告批次及证明材料;\n2应提交验证材料保障产品符合国家法律法规技术标准及技术规范等相关要求;\n',
notethree:'\n提供证明材料\n',
verifyComplianceConfirmReturnReason:'验证符合性确认退回原因',
}
@@ -782,11 +782,11 @@
</div>
</a-col>
</a-row>
<div class="header-text" v-if="rejectCauseList && rejectCauseList.length > 0">
{{$t('listConfirmationRejectionReason')}}
<div class="header-text" v-if="rejectCauseList && rejectCauseList.length > 0 && formInline.roleCodeIndex == 0">
{{$t('reasonForReturnOfDesignCompliance')}}
</div>
<div v-if="rejectCauseList && rejectCauseList.length > 0"
<div v-if="rejectCauseList && rejectCauseList.length > 0 && formInline.roleCodeIndex == 0"
v-for="(item,index) in rejectCauseList">
<a-row :gutter="24">
<a-col :span="12">
@@ -827,11 +827,11 @@
</a-row>
</div>
<div class="header-text" v-if="rejectCauseListOne && rejectCauseListOne.length > 0">
{{$t('taskConfirmationRejectionReason')}}
<div class="header-text" v-if="rejectCauseListOne && rejectCauseListOne.length > 0 && formInline.roleCodeIndex == 0">
{{$t('verifyComplianceConfirmReturnReason')}}
</div>
<div v-if="rejectCauseListOne && rejectCauseListOne.length > 0"
<div v-if="rejectCauseListOne && rejectCauseListOne.length > 0 && formInline.roleCodeIndex == 0"
v-for="(item,index) in rejectCauseListOne">
<a-row :gutter="24">
<a-col :span="12">