法规清单--带入相关人员

This commit is contained in:
zhn
2022-07-04 14:44:48 +08:00
parent 8886d83ba4
commit d440219c45
@@ -1694,31 +1694,103 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
} }
for (ProjectLawsInventoryEO projectLawsInventoryEO : projectLawsInventoryEOS) { for (ProjectLawsInventoryEO projectLawsInventoryEO : projectLawsInventoryEOS) {
for (ProjectRelatedPersonnel projectRelatedPersonnel : projectRelatedPersonnels) { //法规清单的责任领域
if(StringUtils.equals(projectRelatedPersonnel.getDutyTerritory(),projectLawsInventoryEO.getDutyTerritory())){ String dutyTerritory = projectLawsInventoryEO.getDutyTerritory();
//法规工程师 if(StringUtils.isNotBlank(dutyTerritory)){
if (StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerId())) { List<ProjectRelatedPersonnel> projectRelatedPersonnelList = projectRelatedPersonnels.stream()
String userId = ToGetAUserId(ProjectRoleEnum.REGULATI_ENGINEER.getValue(), projectRelatedPersonnel,studioEngineer); .filter(e -> dutyTerritory.contains(e.getDutyTerritory())).collect(Collectors.toList());
List<String> lawEngineerList = projectRelatedPersonnelList.stream().map(ProjectRelatedPersonnel::getLawEngineer).distinct().collect(Collectors.toList()).stream().filter(e->StringUtils.isNotBlank(e)).collect(Collectors.toList());
List<String> engineeringInterfacePersonList = projectRelatedPersonnelList.stream().map(ProjectRelatedPersonnel::getEngineeringInterfacePerson).distinct().collect(Collectors.toList()).stream().filter(e->StringUtils.isNotBlank(e)).collect(Collectors.toList());
List<String> certificationEngineerList = projectRelatedPersonnelList.stream().map(ProjectRelatedPersonnel::getCertificationEngineer).distinct().collect(Collectors.toList()).stream().filter(e->StringUtils.isNotBlank(e)).collect(Collectors.toList());
List<String> lawEngineerListTemp = new ArrayList<>();
List<String> engineeringInterfacePersonListTemp = new ArrayList<>();
List<String> certificationEngineerListTemp = new ArrayList<>();
if(lawEngineerList.size() != 0){
for (String s : lawEngineerList) {
lawEngineerListTemp.addAll(Arrays.asList(s.split(",")));
}
lawEngineerListTemp = lawEngineerListTemp.stream().distinct().collect(Collectors.toList());
}
if(engineeringInterfacePersonList.size() != 0){
for (String s : engineeringInterfacePersonList) {
engineeringInterfacePersonListTemp.addAll(Arrays.asList(s.split(",")));
}
engineeringInterfacePersonListTemp = engineeringInterfacePersonListTemp.stream().distinct().collect(Collectors.toList());
}
if(certificationEngineerList.size() != 0){
for (String s : certificationEngineerList) {
certificationEngineerListTemp.addAll(Arrays.asList(s.split(",")));
}
certificationEngineerListTemp = certificationEngineerListTemp.stream().distinct().collect(Collectors.toList());
}
//法规工程师
if (StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerId()) && lawEngineerListTemp.size() == 1) {
List<String> finalLawEngineerList = lawEngineerListTemp;
List<ProjectRelatedPersonnel> collect = projectRelatedPersonnels.stream()
.filter(e -> finalLawEngineerList.contains(e.getLawEngineer())).collect(Collectors.toList());
if(collect.size() != 0){
String userId = ToGetAUserId(ProjectRoleEnum.REGULATI_ENGINEER.getValue(), collect.get(0),studioEngineer);
if(StringUtils.isNotEmpty(userId)){ if(StringUtils.isNotEmpty(userId)){
projectLawsInventoryEO.setRegulationOwnerId(userId); projectLawsInventoryEO.setRegulationOwnerId(userId);
} }
} }
}
//认证工程师 //认证工程师
if (StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerId())) { if (StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerId()) && certificationEngineerListTemp.size() == 1) {
String userId = ToGetAUserId(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue(), projectRelatedPersonnel,studioEngineer); List<String> finalCertificationEngineerList = certificationEngineerListTemp;
List<ProjectRelatedPersonnel> collect = projectRelatedPersonnels.stream()
.filter(e -> finalCertificationEngineerList.contains(e.getCertificationEngineer())).collect(Collectors.toList());
if(collect.size() != 0){
String userId = ToGetAUserId(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue(), collect.get(0),studioEngineer);
if(StringUtils.isNotEmpty(userId)){ if(StringUtils.isNotEmpty(userId)){
projectLawsInventoryEO.setHomologationEngineerId(userId); projectLawsInventoryEO.setHomologationEngineerId(userId);
} }
} }
}
//项目接口人 //项目接口人
if (StringUtils.isEmpty(projectLawsInventoryEO.getEngineeringInterfacePerson())) { if (StringUtils.isEmpty(projectLawsInventoryEO.getEngineeringInterfacePerson()) && engineeringInterfacePersonListTemp.size() == 1) {
String userId = ToGetAUserId(ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue(), projectRelatedPersonnel,studioEngineer); List<String> finalEngineeringInterfacePersonList = engineeringInterfacePersonListTemp;
List<ProjectRelatedPersonnel> collect = projectRelatedPersonnels.stream()
.filter(e -> finalEngineeringInterfacePersonList.contains(e.getEngineeringInterfacePerson())).collect(Collectors.toList());
if(collect.size() != 0){
String userId = ToGetAUserId(ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue(), collect.get(0),studioEngineer);
if(StringUtils.isNotEmpty(userId)){ if(StringUtils.isNotEmpty(userId)){
projectLawsInventoryEO.setEngineeringInterfacePerson(userId); projectLawsInventoryEO.setEngineeringInterfacePerson(userId);
} }
} }
}
}
for (ProjectRelatedPersonnel projectRelatedPersonnel : projectRelatedPersonnels) {
if(StringUtils.equals(projectRelatedPersonnel.getDutyTerritory(),projectLawsInventoryEO.getDutyTerritory())){
// //法规工程师
// if (StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerId())) {
// String userId = ToGetAUserId(ProjectRoleEnum.REGULATI_ENGINEER.getValue(), projectRelatedPersonnel,studioEngineer);
// if(StringUtils.isNotEmpty(userId)){
// projectLawsInventoryEO.setRegulationOwnerId(userId);
// }
// }
//
// //认证工程师
// if (StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerId())) {
// String userId = ToGetAUserId(ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue(), projectRelatedPersonnel,studioEngineer);
// if(StringUtils.isNotEmpty(userId)){
// projectLawsInventoryEO.setHomologationEngineerId(userId);
// }
// }
//
// //项目接口人
// if (StringUtils.isEmpty(projectLawsInventoryEO.getEngineeringInterfacePerson())) {
// String userId = ToGetAUserId(ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue(), projectRelatedPersonnel,studioEngineer);
// if(StringUtils.isNotEmpty(userId)){
// projectLawsInventoryEO.setEngineeringInterfacePerson(userId);
// }
// }
//设计符合性确认 //设计符合性确认
//发起人角色 //发起人角色
@@ -2171,121 +2243,125 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
for (String id : projectLawsInventoryEO.getIds().split(",")) { for (String id : projectLawsInventoryEO.getIds().split(",")) {
ProjectLawsInventoryEO info = infoList.stream().filter(e -> id.equals(e.getId())).collect(Collectors.toList()).get(0); List<ProjectLawsInventoryEO> collect = infoList.stream().filter(e -> id.equals(e.getId())).collect(Collectors.toList());
ProjectLawsInventoryEO infoCopy = infoListCopy.stream().filter(e -> id.equals(e.getId())).collect(Collectors.toList()).get(0); if(collect.size() != 0){
StringBuilder contentLogBuilder = new StringBuilder(); ProjectLawsInventoryEO info = collect.get(0);
StringBuilder enContentLogBuilder = new StringBuilder(); ProjectLawsInventoryEO infoCopy = infoListCopy.stream().filter(e -> id.equals(e.getId())).collect(Collectors.toList()).get(0);
contentLogBuilder.append(info.getSerialNumber() + ":"); StringBuilder contentLogBuilder = new StringBuilder();
enContentLogBuilder.append(infoCopy.getSerialNumber() + ":"); StringBuilder enContentLogBuilder = new StringBuilder();
ProjectLawsInventoryEO projectLawsInventoryEOTemp = new ProjectLawsInventoryEO(); contentLogBuilder.append(info.getSerialNumber() + ":");
projectLawsInventoryEOTemp.setId(id); enContentLogBuilder.append(infoCopy.getSerialNumber() + ":");
//实施类别 implementType ProjectLawsInventoryEO projectLawsInventoryEOTemp = new ProjectLawsInventoryEO();
if(StringUtils.isNotBlank(projectLawsInventoryEO.getImplementType())){ projectLawsInventoryEOTemp.setId(id);
if (!info.getImplementType().equals(inputInfoEO.getImplementType()) && !inputInfoEO.getImplementType().equals("空")){ //实施类别 implementType
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.IMPLEMENT_TYPE.getName(), info.getImplementType(), inputInfoEO.getImplementType()); if(StringUtils.isNotBlank(projectLawsInventoryEO.getImplementType())){
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.IMPLEMENT_TYPE.getEnName(), infoCopy.getImplementType(), inputInfoEO.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(), 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(), 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(), 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(), infoCopy.getDutyTerritory(), inputInfoEO.getDutyTerritory());
}
}
//在产车实施日期implementTime
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getImplementTime())){
if (info.getImplementTime() == null){
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.IMPLEMENT_TIME.getName(),"空",inputInfoEO.getImplementTimeString());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.IMPLEMENT_TIME.getEnName(),"null",inputInfoEO.getImplementTimeString());
}else {
if (!info.getImplementTimeString().equals(inputInfoEO.getImplementTimeString())) {
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.IMPLEMENT_TIME.getName(), info.getImplementTimeString(), inputInfoEO.getImplementTimeString());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.IMPLEMENT_TIME.getEnName(), infoCopy.getImplementTimeString(), inputInfoEO.getImplementTimeString());
} }
} }
} //认证类型 attestationType
//新车型实施日期xin1Che1Xing2Shi2Shi1Ri4Qi1 if(StringUtils.isNotBlank(projectLawsInventoryEO.getAttestationType())){
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1())){ if (!info.getAttestationType().equals(inputInfoEO.getAttestationType()) && !inputInfoEO.getAttestationType().equals("空")){
if (info.getXin1Che1Xing2Shi2Shi1Ri4Qi1() == null){ setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.ATTESTATION_TYPE.getName(), info.getAttestationType(), inputInfoEO.getAttestationType());
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getName(),"空",inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String()); setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.ATTESTATION_TYPE.getEnName(), infoCopy.getAttestationType(), inputInfoEO.getAttestationType());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getEnName(),"null",inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String());
}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(), infoCopy.getXin1Che1Xing2Shi2Shi1Ri4Qi1String(), inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String());
} }
} }
} //认证级别 attestationRank
//适用地区region if(StringUtils.isNotBlank(projectLawsInventoryEO.getAttestationRank())){
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getRegion())){ if (!info.getAttestationRank().equals(inputInfoEO.getAttestationRank()) && !inputInfoEO.getAttestationRank().equals("空")){
if (!info.getRegion().equals(inputInfoEO.getRegion())) { setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.ATTESTATION_RANK.getName(), info.getAttestationRank(), inputInfoEO.getAttestationRank());
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.REGION.getName(),info.getRegion(),inputInfoEO.getRegion()); setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.ATTESTATION_RANK.getEnName(), infoCopy.getAttestationRank(), inputInfoEO.getAttestationRank());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.REGION.getEnName(), infoCopy.getRegion(),inputInfoEO.getRegion()); }
}
//责任领域 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(), infoCopy.getDutyTerritory(), inputInfoEO.getDutyTerritory());
}
}
//在产车实施日期implementTime
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getImplementTime())){
if (info.getImplementTime() == null){
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.IMPLEMENT_TIME.getName(),"空",inputInfoEO.getImplementTimeString());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.IMPLEMENT_TIME.getEnName(),"null",inputInfoEO.getImplementTimeString());
}else {
if (!info.getImplementTimeString().equals(inputInfoEO.getImplementTimeString())) {
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.IMPLEMENT_TIME.getName(), info.getImplementTimeString(), inputInfoEO.getImplementTimeString());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.IMPLEMENT_TIME.getEnName(), infoCopy.getImplementTimeString(), inputInfoEO.getImplementTimeString());
}
}
}
//新车型实施日期xin1Che1Xing2Shi2Shi1Ri4Qi1
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1())){
if (info.getXin1Che1Xing2Shi2Shi1Ri4Qi1() == null){
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getName(),"空",inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getEnName(),"null",inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String());
}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(), infoCopy.getXin1Che1Xing2Shi2Shi1Ri4Qi1String(), inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String());
}
}
}
//适用地区region
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(), infoCopy.getRegion(),inputInfoEO.getRegion());
}
}
//设计符合性确认截止时间
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getDesignDueDate())){
if (info.getDesignDueDate() == null){
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.DESIGN_DUE_DATE.getName(),"空",inputInfoEO.getDesignDueDateString());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.DESIGN_DUE_DATE.getEnName(),"null",inputInfoEO.getDesignDueDateString());
}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(), infoCopy.getDesignDueDateString(), inputInfoEO.getDesignDueDateString());
} }
} }
} //设计符合性确认截止时间
//preHomo确认截止时间 if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getDesignDueDate())){
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoDueDate())){ if (info.getDesignDueDate() == null){
if (info.getVerifyDueDate() == null){ setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.DESIGN_DUE_DATE.getName(),"空",inputInfoEO.getDesignDueDateString());
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.PREHOMO_DUE_DATE.getName(),"空",inputInfoEO.getPrehomoDueDateString()); setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.DESIGN_DUE_DATE.getEnName(),"null",inputInfoEO.getDesignDueDateString());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.PREHOMO_DUE_DATE.getEnName(),"null",inputInfoEO.getPrehomoDueDateString()); }else {
}else { if (!info.getDesignDueDateString().equals(inputInfoEO.getDesignDueDateString())) {
if (!info.getPrehomoDueDateString().equals(inputInfoEO.getPrehomoDueDateString())) { setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.DESIGN_DUE_DATE.getName(), info.getDesignDueDateString(), inputInfoEO.getDesignDueDateString());
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.PREHOMO_DUE_DATE.getName(), info.getPrehomoDueDateString(), inputInfoEO.getPrehomoDueDateString()); setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.DESIGN_DUE_DATE.getEnName(), infoCopy.getDesignDueDateString(), inputInfoEO.getDesignDueDateString());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.PREHOMO_DUE_DATE.getEnName(), infoCopy.getPrehomoDueDateString(), inputInfoEO.getPrehomoDueDateString()); }
} }
} }
} //preHomo确认截止时间
//验证符合性确认截止时间 if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoDueDate())){
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getVerifyDueDate())){ if (info.getVerifyDueDate() == null){
if (info.getVerifyDueDate() == null){ setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.PREHOMO_DUE_DATE.getName(),"空",inputInfoEO.getPrehomoDueDateString());
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.VERIFY_DUE_DATE.getName(),"空",inputInfoEO.getVerifyDueDateString()); setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.PREHOMO_DUE_DATE.getEnName(),"null",inputInfoEO.getPrehomoDueDateString());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.VERIFY_DUE_DATE.getEnName(),"null",inputInfoEO.getVerifyDueDateString()); }else {
}else { if (!info.getPrehomoDueDateString().equals(inputInfoEO.getPrehomoDueDateString())) {
if (!info.getVerifyDueDateString().equals(inputInfoEO.getVerifyDueDateString())) { setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.PREHOMO_DUE_DATE.getName(), info.getPrehomoDueDateString(), inputInfoEO.getPrehomoDueDateString());
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.VERIFY_DUE_DATE.getName(), info.getVerifyDueDateString(), inputInfoEO.getVerifyDueDateString()); setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.PREHOMO_DUE_DATE.getEnName(), infoCopy.getPrehomoDueDateString(), inputInfoEO.getPrehomoDueDateString());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.VERIFY_DUE_DATE.getEnName(), infoCopy.getVerifyDueDateString(), inputInfoEO.getVerifyDueDateString()); }
} }
} }
} //验证符合性确认截止时间
//处理具体变动消息为空的contentLog if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getVerifyDueDate())){
String contentInfoIndexStart = contentLogBuilder.substring(0,contentLogBuilder.lastIndexOf(":")); if (info.getVerifyDueDate() == null){
String contentInfo= contentLogBuilder.substring(contentInfoIndexStart.length()+1,contentLogBuilder.length()); setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.VERIFY_DUE_DATE.getName(),"空",inputInfoEO.getVerifyDueDateString());
setUpdateEnContentLog(enContentLogBuilder, ProjectInventoryFieldEnum.VERIFY_DUE_DATE.getEnName(),"null",inputInfoEO.getVerifyDueDateString());
}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(), infoCopy.getVerifyDueDateString(), inputInfoEO.getVerifyDueDateString());
}
}
}
//处理具体变动消息为空的contentLog
String contentInfoIndexStart = contentLogBuilder.substring(0,contentLogBuilder.lastIndexOf(":"));
String contentInfo= contentLogBuilder.substring(contentInfoIndexStart.length()+1,contentLogBuilder.length());
String enContentInfoIndexStart = enContentLogBuilder.substring(0,enContentLogBuilder.lastIndexOf(":")); String enContentInfoIndexStart = enContentLogBuilder.substring(0,enContentLogBuilder.lastIndexOf(":"));
String enContentInfo= enContentLogBuilder.substring(enContentInfoIndexStart.length()+1,enContentLogBuilder.length()); String enContentInfo= enContentLogBuilder.substring(enContentInfoIndexStart.length()+1,enContentLogBuilder.length());
if(StringUtils.isNotBlank(contentInfo) && StringUtils.isNotBlank(enContentInfo)){ if(StringUtils.isNotBlank(contentInfo) && StringUtils.isNotBlank(enContentInfo)){
contentLog += contentLogBuilder; contentLog += contentLogBuilder;
enContentLog += enContentLogBuilder ; enContentLog += enContentLogBuilder ;
}
} }
} }
String contentIndexStart = contentLog.substring(0,contentLog.indexOf("“")); String contentIndexStart = contentLog.substring(0,contentLog.indexOf("“"));
String content= contentLog.substring(contentIndexStart.length()+1,contentLog.length()); String content= contentLog.substring(contentIndexStart.length()+1,contentLog.length());