法规清单批量设置

This commit is contained in:
zhn
2022-06-07 16:16:57 +08:00
parent aa0486cb63
commit fd99e629d7
@@ -1652,18 +1652,32 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
//实施类别 implementType
if(org.apache.commons.lang.StringUtils.isNotBlank(projectLawsInventoryEO.getImplementType())){
projectLawsInventoryEOTemp.setImplementType(projectLawsInventoryEO.getImplementType());
}else{
projectLawsInventoryEOTemp.setImplementType("");
}
//认证类型 attestationType
if(org.apache.commons.lang.StringUtils.isNotBlank(projectLawsInventoryEO.getAttestationType())){
projectLawsInventoryEOTemp.setAttestationType(projectLawsInventoryEO.getAttestationType());
}else{
projectLawsInventoryEOTemp.setAttestationType("");
}
//认证级别 attestationRank
if(org.apache.commons.lang.StringUtils.isNotBlank(projectLawsInventoryEO.getAttestationRank())){
projectLawsInventoryEOTemp.setAttestationRank(projectLawsInventoryEO.getAttestationRank());
}else{
projectLawsInventoryEOTemp.setAttestationRank("");
}
//责任领域 dutyTerritory
if(org.apache.commons.lang.StringUtils.isNotBlank(projectLawsInventoryEO.getDutyTerritory())){
projectLawsInventoryEOTemp.setDutyTerritory(projectLawsInventoryEO.getDutyTerritory());
}else{
projectLawsInventoryEOTemp.setDutyTerritory("");
}
//适用地区region
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getRegion())){
projectLawsInventoryEOTemp.setRegion(projectLawsInventoryEO.getRegion());
}else{
projectLawsInventoryEOTemp.setRegion("");
}
//在产车实施日期implementTime
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getImplementTime())){
@@ -1673,10 +1687,6 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1())){
projectLawsInventoryEOTemp.setXin1Che1Xing2Shi2Shi1Ri4Qi1(projectLawsInventoryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1());
}
//适用地区region
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getRegion())){
projectLawsInventoryEOTemp.setRegion(projectLawsInventoryEO.getRegion());
}
//设计符合性确认截止时间
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getDesignDueDate())){
projectLawsInventoryEOTemp.setDesignDueDate(projectLawsInventoryEO.getDesignDueDate());
@@ -1691,9 +1701,17 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
}
projectLawsInventoryEOList.add(projectLawsInventoryEOTemp);
}
this.updateBatchById(projectLawsInventoryEOList);
//根据id查询数据库中完整信息,翻译
// this.updateBatchById(projectLawsInventoryEOList);
for (ProjectLawsInventoryEO lawsInventoryEO : projectLawsInventoryEOList) {
LambdaUpdateWrapper<ProjectLawsInventoryEO> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.in(ProjectLawsInventoryEO::getId,lawsInventoryEO.getId());
setDateNull(lawsInventoryEO, updateWrapper);
//保存
this.update(lawsInventoryEO,updateWrapper);
}
//根据id查询数据库中完整信息,翻译
List<String> idList = Arrays.asList(projectLawsInventoryEO.getIds().split(","));
QueryWrapper<ProjectLawsInventoryEO> queryWrapper = new QueryWrapper<>();
List<ProjectLawsInventoryEO> infoList = list(queryWrapper.in("id", idList));