法规清单+虚拟清单log内容修改

This commit is contained in:
xiejunyu
2022-06-15 13:59:22 +08:00
parent 9feb26d2dd
commit 0e34eae4e8
2 changed files with 65 additions and 35 deletions
@@ -474,9 +474,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String username = sysUser.getUsername();
String contentLog = username+"批量设置了:“";
StringBuilder contentLogBuilder = new StringBuilder(contentLog);
String enContentLog = username+" batch set :“";
StringBuilder enContentLogBuilder = new StringBuilder(enContentLog);
List<DummyInventoryInfoEO> infoListCopy = DeepCopyListUtil.depCopy(infoList);
@@ -493,6 +491,8 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
for (String id : idList) {
DummyInventoryInfoEO info = infoList.stream().filter(e -> id.equals(e.getId())).collect(Collectors.toList()).get(0);
DummyInventoryInfoEO infoCopy = infoListCopy.stream().filter(e -> id.equals(e.getId())).collect(Collectors.toList()).get(0);
StringBuilder contentLogBuilder = new StringBuilder();
StringBuilder enContentLogBuilder = new StringBuilder();
contentLogBuilder.append(info.getSerialNumber() + ":");
enContentLogBuilder.append(infoCopy.getSerialNumber() + ":");
DummyInventoryInfoEO dummyInventoryInfoEOTemp = new DummyInventoryInfoEO();
@@ -571,20 +571,32 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
}
}
}
}
String contentIndexStart = contentLogBuilder.substring(0,contentLogBuilder.indexOf(":"));
String content= contentLogBuilder.substring(contentIndexStart.length()+1,contentLogBuilder.length());
//处理具体变动消息为空的contentLog
String contentInfoIndexStart = contentLogBuilder.substring(0,contentLogBuilder.lastIndexOf(":"));
String contentInfo= contentLogBuilder.substring(contentInfoIndexStart.length()+1,contentLogBuilder.length());
String enContentIndexStart = enContentLogBuilder.substring(0,enContentLogBuilder.indexOf(":"));
String enContent= enContentLogBuilder.substring(enContentIndexStart.length()+1,enContentLogBuilder.length());
String enContentInfoIndexStart = enContentLogBuilder.substring(0,enContentLogBuilder.lastIndexOf(":"));
String enContentInfo= enContentLogBuilder.substring(enContentInfoIndexStart.length()+1,enContentLogBuilder.length());
if(StringUtils.isNotBlank(contentInfo) && StringUtils.isNotBlank(enContentInfo)){
contentLog += contentLogBuilder;
enContentLog += enContentLogBuilder ;
}
}
String contentIndexStart = contentLog.substring(0,contentLog.indexOf(""));
String content= contentLog.substring(contentIndexStart.length()+1,contentLog.length());
String enContentIndexStart = enContentLog.substring(0,enContentLog.indexOf(""));
String enContent= enContentLog.substring(enContentIndexStart.length()+1,enContentLog.length());
if(StringUtils.isNotBlank(content)){
contentLog = contentLogBuilder.substring(0, contentLogBuilder.length() - 5) + "";
contentLog = contentLog.substring(0, contentLog.length() - 5) + "";
dummyLogEOService.updateLog(contentLog, projectId,CutEnum.CN.getValue());
}
if(StringUtils.isNotBlank(enContent)){
enContentLog = enContentLogBuilder.substring(0, enContentLogBuilder.length() - 5) + "";
enContentLog = enContentLog.substring(0, enContentLog.length() - 5) + "";
dummyLogEOService.updateLog(enContentLog, projectId,CutEnum.EN.getValue());
}
}
@@ -1650,7 +1650,19 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
@Override
public void setBatch(ProjectLawsInventoryEO projectLawsInventoryEO) {/////
List<String> idsList = Arrays.asList(projectLawsInventoryEO.getIds().split(","));
List<ProjectLawsInventoryEO> infoEOList = listByIds(idsList);
String projectLibraryId = null;
if (CollectionUtils.isNotEmpty(infoEOList)) {
projectLibraryId = infoEOList.get(0).getProjectLibraryId();
}
if(org.apache.commons.lang3.StringUtils.isNotBlank(projectLawsInventoryEO.getIds())){
//根据id查询数据库中完整信息,翻译
List<String> idList = Arrays.asList(projectLawsInventoryEO.getIds().split(","));
QueryWrapper<ProjectLawsInventoryEO> queryWrapper = new QueryWrapper<>();
List<ProjectLawsInventoryEO> infoList = list(queryWrapper.in("id", idList));
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = new ArrayList<>();
for (String id : projectLawsInventoryEO.getIds().split(",")) {
ProjectLawsInventoryEO projectLawsInventoryEOTemp = new ProjectLawsInventoryEO();
@@ -1717,18 +1729,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
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));
String projectLibraryId = infoList.get(0).getProjectLibraryId();
//更新log
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String username = sysUser.getUsername();
String contentLog = username+"批量设置了:";
StringBuilder contentLogBuilder = new StringBuilder(contentLog);
String contentLog = username+"批量设置了:";
String enContentLog = username+" batch set : “";
StringBuilder enContentLogBuilder = new StringBuilder(enContentLog);
List<ProjectLawsInventoryEO> infoListCopy = DeepCopyListUtil.depCopy(infoList);
@@ -1747,6 +1752,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
for (String id : projectLawsInventoryEO.getIds().split(",")) {
ProjectLawsInventoryEO info = infoList.stream().filter(e -> id.equals(e.getId())).collect(Collectors.toList()).get(0);
ProjectLawsInventoryEO infoCopy = infoListCopy.stream().filter(e -> id.equals(e.getId())).collect(Collectors.toList()).get(0);
StringBuilder contentLogBuilder = new StringBuilder();
StringBuilder enContentLogBuilder = new StringBuilder();
contentLogBuilder.append(info.getSerialNumber() + ":");
enContentLogBuilder.append(infoCopy.getSerialNumber() + ":");
ProjectLawsInventoryEO projectLawsInventoryEOTemp = new ProjectLawsInventoryEO();
@@ -1755,28 +1762,28 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
if(StringUtils.isNotBlank(projectLawsInventoryEO.getImplementType())){
if (!info.getImplementType().equals(inputInfoEO.getImplementType()) && !inputInfoEO.getImplementType().equals("")){
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.IMPLEMENT_TYPE.getName(), info.getImplementType(), inputInfoEO.getImplementType());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.IMPLEMENT_TYPE.getEnName(), info.getImplementType(), inputInfoEO.getImplementType());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.IMPLEMENT_TYPE.getEnName(), infoCopy.getImplementType(), inputInfoEO.getImplementType());
}
}
//认证类型 attestationType
if(StringUtils.isNotBlank(projectLawsInventoryEO.getAttestationType())){
if (!info.getAttestationType().equals(inputInfoEO.getAttestationType()) && !inputInfoEO.getAttestationType().equals("")){
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.ATTESTATION_TYPE.getName(), info.getAttestationType(), inputInfoEO.getAttestationType());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.ATTESTATION_TYPE.getEnName(), info.getAttestationType(), inputInfoEO.getAttestationType());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.ATTESTATION_TYPE.getEnName(), infoCopy.getAttestationType(), inputInfoEO.getAttestationType());
}
}
//认证级别 attestationRank
if(StringUtils.isNotBlank(projectLawsInventoryEO.getAttestationRank())){
if (!info.getAttestationRank().equals(inputInfoEO.getAttestationRank()) && !inputInfoEO.getAttestationRank().equals("")){
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.ATTESTATION_RANK.getName(), info.getAttestationRank(), inputInfoEO.getAttestationRank());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.ATTESTATION_RANK.getEnName(), info.getAttestationRank(), inputInfoEO.getAttestationRank());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.ATTESTATION_RANK.getEnName(), infoCopy.getAttestationRank(), inputInfoEO.getAttestationRank());
}
}
//责任领域 dutyTerritory
if(StringUtils.isNotBlank(projectLawsInventoryEO.getDutyTerritory())){
if (!info.getDutyTerritory().equals(inputInfoEO.getDutyTerritory())){
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.DUTY_TERRITORY.getName(), info.getDutyTerritory(), inputInfoEO.getDutyTerritory());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.DUTY_TERRITORY.getEnName(), info.getDutyTerritory(), inputInfoEO.getDutyTerritory());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.DUTY_TERRITORY.getEnName(), infoCopy.getDutyTerritory(), inputInfoEO.getDutyTerritory());
}
}
//在产车实施日期implementTime
@@ -1787,7 +1794,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
}else {
if (!info.getImplementTimeString().equals(inputInfoEO.getImplementTimeString())) {
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.IMPLEMENT_TIME.getName(), info.getImplementTimeString(), inputInfoEO.getImplementTimeString());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.IMPLEMENT_TIME.getEnName(), info.getImplementTimeString(), inputInfoEO.getImplementTimeString());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.IMPLEMENT_TIME.getEnName(), infoCopy.getImplementTimeString(), inputInfoEO.getImplementTimeString());
}
}
}
@@ -1799,7 +1806,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
}else {
if (!info.getXin1Che1Xing2Shi2Shi1Ri4Qi1String().equals(inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String())) {
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getName(), info.getXin1Che1Xing2Shi2Shi1Ri4Qi1String(), inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getEnName(), info.getXin1Che1Xing2Shi2Shi1Ri4Qi1String(), inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getEnName(), infoCopy.getXin1Che1Xing2Shi2Shi1Ri4Qi1String(), inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String());
}
}
}
@@ -1807,7 +1814,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getRegion())){
if (!info.getRegion().equals(inputInfoEO.getRegion())) {
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.REGION.getName(),info.getRegion(),inputInfoEO.getRegion());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.REGION.getEnName(),info.getRegion(),inputInfoEO.getRegion());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.REGION.getEnName(), infoCopy.getRegion(),inputInfoEO.getRegion());
}
}
@@ -1819,7 +1826,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
}else {
if (!info.getDesignDueDateString().equals(inputInfoEO.getDesignDueDateString())) {
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.DESIGN_DUE_DATE.getName(), info.getDesignDueDateString(), inputInfoEO.getDesignDueDateString());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.DESIGN_DUE_DATE.getEnName(), info.getDesignDueDateString(), inputInfoEO.getDesignDueDateString());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.DESIGN_DUE_DATE.getEnName(), infoCopy.getDesignDueDateString(), inputInfoEO.getDesignDueDateString());
}
}
}
@@ -1827,11 +1834,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoDueDate())){
if (info.getVerifyDueDate() == null){
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.PREHOMO_DUE_DATE.getName(),"",inputInfoEO.getPrehomoDueDateString());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.PREHOMO_DUE_DATE.getName(),"",inputInfoEO.getPrehomoDueDateString());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.PREHOMO_DUE_DATE.getEnName(),"null",inputInfoEO.getPrehomoDueDateString());
}else {
if (!info.getPrehomoDueDateString().equals(inputInfoEO.getPrehomoDueDateString())) {
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.PREHOMO_DUE_DATE.getName(), info.getPrehomoDueDateString(), inputInfoEO.getPrehomoDueDateString());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.PREHOMO_DUE_DATE.getEnName(), info.getPrehomoDueDateString(), inputInfoEO.getPrehomoDueDateString());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.PREHOMO_DUE_DATE.getEnName(), infoCopy.getPrehomoDueDateString(), inputInfoEO.getPrehomoDueDateString());
}
}
}
@@ -1843,24 +1850,35 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
}else {
if (!info.getVerifyDueDateString().equals(inputInfoEO.getVerifyDueDateString())) {
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.VERIFY_DUE_DATE.getName(), info.getVerifyDueDateString(), inputInfoEO.getVerifyDueDateString());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.VERIFY_DUE_DATE.getEnName(), info.getVerifyDueDateString(), inputInfoEO.getVerifyDueDateString());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.VERIFY_DUE_DATE.getEnName(), infoCopy.getVerifyDueDateString(), inputInfoEO.getVerifyDueDateString());
}
}
}
}
String contentIndexStart = contentLogBuilder.substring(0,contentLogBuilder.indexOf(":"));
String content= contentLogBuilder.substring(contentIndexStart.length()+1,contentLogBuilder.length());
//处理具体变动消息为空的contentLog
String contentInfoIndexStart = contentLogBuilder.substring(0,contentLogBuilder.lastIndexOf(":"));
String contentInfo= contentLogBuilder.substring(contentInfoIndexStart.length()+1,contentLogBuilder.length());
String enContentIndexStart = enContentLogBuilder.substring(0,enContentLogBuilder.indexOf(":"));
String enContent= enContentLogBuilder.substring(enContentIndexStart.length()+1,enContentLogBuilder.length());
String enContentInfoIndexStart = enContentLogBuilder.substring(0,enContentLogBuilder.lastIndexOf(":"));
String enContentInfo= enContentLogBuilder.substring(enContentInfoIndexStart.length()+1,enContentLogBuilder.length());
if(StringUtils.isNotBlank(contentInfo) && StringUtils.isNotBlank(enContentInfo)){
contentLog += contentLogBuilder;
enContentLog += enContentLogBuilder ;
}
}
String contentIndexStart = contentLog.substring(0,contentLog.indexOf(""));
String content= contentLog.substring(contentIndexStart.length()+1,contentLog.length());
String enContentIndexStart = enContentLog.substring(0,enContentLog.indexOf(""));
String enContent= enContentLog.substring(enContentIndexStart.length()+1,enContentLog.length());
if(StringUtils.isNotBlank(content)){
contentLog = contentLogBuilder.substring(0, contentLogBuilder.length() - 5) + "";
contentLog = contentLog.substring(0, contentLog.length() - 5) + "";
projectLawsInventoryLogEOService.updateLog(contentLog, projectLibraryId,CutEnum.CN.getValue());
}
if(StringUtils.isNotBlank(enContent)){
enContentLog = enContentLogBuilder.substring(0, enContentLogBuilder.length() - 5) + "";
enContentLog = enContentLog.substring(0, enContentLog.length() - 5) + "";
projectLawsInventoryLogEOService.updateLog(enContentLog, projectLibraryId,CutEnum.EN.getValue());
}
}