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

This commit is contained in:
高嵩
2023-03-31 18:45:57 +08:00
7 changed files with 217 additions and 10 deletions
@@ -448,4 +448,8 @@ ALTER TABLE `project_version_info`
ALTER TABLE `project_version_info`
ADD COLUMN `project_laws_inventory_id` varchar(255) NULL COMMENT '法规清单数据id' AFTER `verify_flow_status`;
ALTER TABLE `project_version_info`
ADD COLUMN `applicable_supplement` varchar(255) NULL COMMENT '适用增补件' AFTER `project_laws_inventory_id`;
ADD COLUMN `applicable_supplement` varchar(255) NULL COMMENT '适用增补件' AFTER `project_laws_inventory_id`;
-- 虚拟认证清单-增加字段 2023-3-30 未同步生产环境
ALTER TABLE `auth_dummy_inventory_info`
ADD COLUMN `deliverable_template` varchar(500) NULL COMMENT '交付物模板' AFTER `auth_dummy_inventory_base_id`;
@@ -134,4 +134,12 @@ public class AuthDummyInventoryInfoEO implements Serializable {
/**值类型,对应SysCategoryValueTypeEnum中value**/
@TableField(exist = false)
private String valueType;
/**交付物模板*/
@ApiModelProperty(value = "交付物模板")
private String deliverableTemplate;
/**交付物模板名称**/
@TableField(exist = false)
@Excel(name = "交付物模板", width = 20)
private String deliverableTemplateName;
}
@@ -27,6 +27,7 @@ import com.jero.modules.dummy.entity.DummyInventoryInfoEO;
import com.jero.modules.dummy.enums.DummyInventoryBaseFieldEnum;
import com.jero.modules.dummy.service.impl.DummyLogEOServiceImpl;
import com.jero.modules.dummy.util.DeepCopyListUtil;
import com.jero.modules.oss.entity.OSSFile;
import com.jero.modules.oss.service.IOSSFileService;
import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
import com.jero.modules.project.enums.ProjectInventoryFieldEnum;
@@ -1302,6 +1303,8 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
if(CollectionUtils.isNotEmpty(datas)){
List<SysCategory> categoryList = this.sysCategoryService.list();
List<SysDictItem> sysDictItems = this.sysDictItemServiceImpl.getBaseMapper().selectItemsAll();
String deliverableTemplates = datas.stream().map(AuthDummyInventoryInfoEO::getDeliverableTemplate).distinct().collect(Collectors.joining(","));
List<OSSFile> deliverableTemplateFileList = iOSSFileService.getFileInfos(deliverableTemplates);
for (AuthDummyInventoryInfoEO data : datas) {
if(StringUtils.isNotEmpty(data.getDeliverableType())){
@@ -1312,6 +1315,20 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
String dutyTerritoryName = this.sysDictItemService.disposeShowDictItemValue(sysDictItems,data.getDutyTerritory(),cut, ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue());
data.setDutyTerritoryName(dutyTerritoryName);
}
if(StringUtils.isNotBlank(data.getDeliverableTemplate())){
String[] deliverableTemplateArr = data.getDeliverableTemplate().split(",");
String deliverableTemplateName = deliverableTemplateFileList.stream().filter(file -> {
boolean flag = false;
for (String deliverableTemplate : deliverableTemplateArr) {
if (StringUtils.equals(file.getId(),deliverableTemplate)) {
flag = true;
break;
}
}
return flag;
}).map(OSSFile::getFileName).collect(Collectors.joining(","));
data.setDeliverableTemplateName(deliverableTemplateName);
}
}
}
@@ -1311,6 +1311,17 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
List<String> dutyPersonIdList = projectCertificationInventoryEOList.stream().map(ProjectCertificationInventoryEO::getDutyPerson).distinct().collect(Collectors.toList());
List<SysUser> dutyPersonList = this.sysUserService.querySysUserListByIdList(dutyPersonIdList);
try {
// 给责任人分配待办中心的任务
List<ProcessInfoDetailEO> processInfoDetailEOList = new ArrayList<>();
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
ProcessInfoDetailEO processInfoDetailEO = new ProcessInfoDetailEO();
processInfoDetailEO.setUserId(projectCertificationInventoryEO.getDutyPerson());
processInfoDetailEO.setEndTime(projectCertificationInventoryEO.getEndTime());
processInfoDetailEO.setProjectLawsInventoryId(projectCertificationInventoryEO.getId());
processInfoDetailEOList.add(processInfoDetailEO);
}
this.addProcessInfoDetailEO(processInfoDetailEOList,projectLibraryBase.getId(),CertificationFlowNodeEnum.ZRRTJRW.getKey());
// 更新数据状态为 审查退回
this.updateBatchById(projectCertificationInventoryEOList);
@@ -1494,7 +1505,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
detailUpdateWrap.eq(ProcessInfoDetailEO::getProcessInfoId,projectLibraryBase.getId());
detailUpdateWrap.eq(ProcessInfoDetailEO::getUserId,currentUser.getId());
detailUpdateWrap.eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.ZRRTJRW.getKey());
detailUpdateWrap.eq(ProcessInfoDetailEO::getProjectLawsInventoryId,certificationIdList);
detailUpdateWrap.in(ProcessInfoDetailEO::getProjectLawsInventoryId,certificationIdList);
detailUpdateWrap.set(ProcessInfoDetailEO::getStatus,TaskStatusEnum.HAVE_DONE.getValue());
this.processInfoDetailEOService.update(detailUpdateWrap);
@@ -1580,7 +1591,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
detailUpdateWrap.eq(ProcessInfoDetailEO::getProcessInfoId,projectLibraryBase.getId());
detailUpdateWrap.eq(ProcessInfoDetailEO::getUserId,currentUser.getId());
detailUpdateWrap.eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.ZRRJSRW.getKey());
detailUpdateWrap.eq(ProcessInfoDetailEO::getProjectLawsInventoryId,certificationIdList);
detailUpdateWrap.in(ProcessInfoDetailEO::getProjectLawsInventoryId,certificationIdList);
detailUpdateWrap.set(ProcessInfoDetailEO::getStatus,TaskStatusEnum.HAVE_DONE.getValue());
this.processInfoDetailEOService.update(detailUpdateWrap);
@@ -1686,11 +1697,13 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
String itemName = (String) standNameAndItemName.get("itemName");
try {
List<String> certificationIdList = projectCertificationInventoryEOList.stream().map(ProjectCertificationInventoryEO::getId).distinct().collect(Collectors.toList());
// 将当前责任人的待办任务转为已办
LambdaUpdateWrapper<ProcessInfoDetailEO> detailUpdateWrap = new LambdaUpdateWrapper<>();
detailUpdateWrap.eq(ProcessInfoDetailEO::getProcessInfoId,projectLibraryBase.getId());
detailUpdateWrap.eq(ProcessInfoDetailEO::getUserId,currentUser.getId());
detailUpdateWrap.eq(ProcessInfoDetailEO::getTaskDefinitionKey,CertificationFlowNodeEnum.ZRRJSRW.getKey());
detailUpdateWrap.in(ProcessInfoDetailEO::getProjectLawsInventoryId,certificationIdList);
detailUpdateWrap.set(ProcessInfoDetailEO::getStatus,TaskStatusEnum.HAVE_DONE.getValue());
this.processInfoDetailEOService.update(detailUpdateWrap);