法规清单、任务清单增加文档库id字段。
This commit is contained in:
+2
@@ -465,5 +465,7 @@ public class ProjectLawsInventoryEO implements Serializable {
|
||||
@ApiModelProperty(value = "报告id")
|
||||
private String fileId;
|
||||
|
||||
@ApiModelProperty(value = "文档库id/标准id")
|
||||
private String standId;
|
||||
|
||||
}
|
||||
|
||||
+3
@@ -307,4 +307,7 @@ public class ProjectTaskInventoryEO implements Serializable {
|
||||
/**法规清单创建日期,任务清单中需要根据此字段进行倒序排序**/
|
||||
@TableField(exist = false)
|
||||
private Date lawsInventoryCreateTime;
|
||||
|
||||
@ApiModelProperty(value = "文档库id/标准id")
|
||||
private String standId;
|
||||
}
|
||||
|
||||
+16
-2
@@ -280,6 +280,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
String projectTaskInventoryId = UUID.randomUUID().toString().replace("-", "");
|
||||
projectTaskInventoryEO.setId(projectTaskInventoryId);
|
||||
projectTaskInventoryEO.setProjectLawsInventoryId(lawsInventory.getId());
|
||||
projectTaskInventoryEO.setStandId(lawsInventory.getStandId());
|
||||
projectTaskInventoryEOList.add(projectTaskInventoryEO);
|
||||
});
|
||||
|
||||
@@ -334,6 +335,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
List<ProjectLawsInventoryEO> list = new ArrayList<>();
|
||||
|
||||
for (BussDocumentLibraryEO bussDocumentLibraryEO : bussDocumentLibraryEOList) {
|
||||
String standId = bussDocumentLibraryEO.getId();
|
||||
|
||||
ProjectLawsInventoryEO projectLawsInventoryTemp = new ProjectLawsInventoryEO();
|
||||
BeanUtils.copyProperties(bussDocumentLibraryEO, projectLawsInventoryTemp);
|
||||
String projectLawsInventoryId = UUID.randomUUID().toString().replace("-", "");
|
||||
@@ -343,12 +346,14 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
projectLawsInventoryTemp.setUpdateTime(new Date());
|
||||
projectLawsInventoryTemp.setTaskAffirmStatus(TaskAffirmStatusEnum.NOT_STARTED.getValue());
|
||||
projectLawsInventoryTemp.setInventoryAffirmStatus(InventoryAffirmStatusEnum.NOT_STARTED.getValue());
|
||||
projectLawsInventoryTemp.setStandId(standId);
|
||||
list.add(projectLawsInventoryTemp);
|
||||
|
||||
ProjectTaskInventoryEO projectTaskInventoryEO = new ProjectTaskInventoryEO();
|
||||
String projectTaskInventoryId = UUID.randomUUID().toString().replace("-", "");
|
||||
projectTaskInventoryEO.setId(projectTaskInventoryId);
|
||||
projectTaskInventoryEO.setProjectLawsInventoryId(projectLawsInventoryId);
|
||||
projectTaskInventoryEO.setStandId(standId);
|
||||
projectTaskInventoryEOList.add(projectTaskInventoryEO);
|
||||
}
|
||||
super.saveBatch(list);
|
||||
@@ -3857,13 +3862,22 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
}
|
||||
|
||||
List<ProjectTaskInventoryEO> projectTaskInventoryEOList = new ArrayList<>();
|
||||
idList.forEach(id -> {
|
||||
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = this.baseMapper.selectList(updateLawsInventoryWrapper);
|
||||
projectLawsInventoryEOList.forEach(projectLawsInventory -> {
|
||||
ProjectTaskInventoryEO projectTaskInventoryEO = new ProjectTaskInventoryEO();
|
||||
String projectTaskInventoryId = UUID.randomUUID().toString().replace("-", "");
|
||||
projectTaskInventoryEO.setId(projectTaskInventoryId);
|
||||
projectTaskInventoryEO.setProjectLawsInventoryId(projectLawsInventory.getId());
|
||||
projectTaskInventoryEO.setStandId(projectLawsInventory.getStandId());
|
||||
projectTaskInventoryEOList.add(projectTaskInventoryEO);
|
||||
});
|
||||
/*idList.forEach(id -> {
|
||||
ProjectTaskInventoryEO projectTaskInventoryEO = new ProjectTaskInventoryEO();
|
||||
String projectTaskInventoryId = UUID.randomUUID().toString().replace("-", "");
|
||||
projectTaskInventoryEO.setId(projectTaskInventoryId);
|
||||
projectTaskInventoryEO.setProjectLawsInventoryId(id);
|
||||
projectTaskInventoryEOList.add(projectTaskInventoryEO);
|
||||
});
|
||||
});*/
|
||||
//项目任务清单数据初始化。
|
||||
this.projectTaskInventoryEOService.deleteByProjectLawsInventoryIds(idList);
|
||||
this.projectTaskInventoryEOService.saveBatch(projectTaskInventoryEOList);
|
||||
|
||||
Reference in New Issue
Block a user