法规清单更新log批量设置+虚拟清单log修改
This commit is contained in:
+13
-9
@@ -2,21 +2,25 @@ package com.jero.modules.dummy.enums;
|
||||
|
||||
|
||||
public enum DummyInventoryBaseFieldEnum {
|
||||
TITLE("标题","title"),
|
||||
SUBTITLE("子标题","subtitle"),
|
||||
WVTA_ID("WVTA ID","wvta_id"),
|
||||
SHI4_YONG4_FAN4_WEI2("适用范围","apply_scope"),
|
||||
XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1("新车型实施日期","xin1_che1_xing2_shi2_shi1_ri4_qi1"),
|
||||
IMPLEMENT_TIME("在产车实施日期","implement_time"),
|
||||
ATTESTATION_TYPE("认证类型","attestation_type"),
|
||||
TECHNOLOGY_TERRITORY("技术领域","technology_territory"),
|
||||
DUTY_TERRITORY("责任领域","duty_territory"),
|
||||
IMPLEMENT_TYPE("实施类别","implement_type"),
|
||||
ATTESTATION_TYPE("认证类型","attestation_type"),
|
||||
ATTESTATION_RANK("认证级别","attestation_rank"),
|
||||
IMPLEMENT_TYPE("实施类别","implement_type"),
|
||||
REGION("适用地区","region"),
|
||||
APPLICABLE_SUPPLEMENT("适用增补件","applicable_supplement"),
|
||||
REMARK("备注","remark"),
|
||||
|
||||
DELIVERABLE_TEMPLATE("交付物类型","deliverable_template"),
|
||||
FA1_QI3_REN2("发起人","fa1_qi3_ren2"),
|
||||
ZE2_REN2_REN2("责任人","ze2_ren4_ren2"),
|
||||
SHI4_YONG4_FAN4_WEI2("适用范围","apply_scope"),
|
||||
REGION("适用地区","region"),
|
||||
XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1("新车型实施日期","xin1_che1_xing2_shi2_shi1_ri4_qi1"),
|
||||
IMPLEMENT_TIME("在产车实施日期","implement_time"),
|
||||
WVTA_ID("WVTA ID","wvta_id"),
|
||||
SUBTITLE("子标题","subtitle"),
|
||||
REMARK("备注","remark"),
|
||||
|
||||
DESIGN_DELIVERABLE_TYPE("设计符合性确认-交付物类型","deliverable_template"),
|
||||
DESIGN_DELIVERABLE_TEMPLATE("设计符合性确认-交付物模板","design_deliverable_template"),
|
||||
DESIGN_INITIATOR("设计符合性确认-发起人","fa1_qi3_ren2"),
|
||||
|
||||
+110
-54
@@ -701,52 +701,16 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
if (infoDiff.size() > 1) {
|
||||
int infoDiffRow = 1;
|
||||
contentInfo += row + ". The serial Number " + infoDiff.get("serialNumber") + " has been updated as follows : " + "\r\n";
|
||||
//技术领域
|
||||
if (StringUtils.isNotBlank(infoDiff.get("technologyTerritoryName"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("technologyTerritoryName").split("\\|"));
|
||||
//标题
|
||||
if (StringUtils.isNotBlank(infoDiff.get("title"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("title").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Technology territory has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
contentInfo += "(" + infoDiffRow + "). Title has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
}else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.TECHNOLOGY_TERRITORY.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
//新车型实施日期
|
||||
if (StringUtils.isNotBlank(infoDiff.get("xin1Che1Xing2Shi2Shi1Ri4Qi1String"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("xin1Che1Xing2Shi2Shi1Ri4Qi1String").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). The implementation date of new model has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
}else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
//在产车实施日期
|
||||
if (StringUtils.isNotBlank(infoDiff.get("implementTimeString"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("implementTimeString").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Implement time has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
}else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.IMPLEMENT_TIME.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
//WVTA ID
|
||||
if (StringUtils.isNotBlank(infoDiff.get("wvtaId"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("wvtaId").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). WVTA ID has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
} else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.WVTA_ID.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
contentLog += DummyInventoryBaseFieldEnum.SUBTITLE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
//子标题
|
||||
@@ -761,18 +725,57 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
contentLog += DummyInventoryBaseFieldEnum.SUBTITLE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
//实施类别
|
||||
if (StringUtils.isNotBlank(infoDiff.get("implementType"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("implementType").split(","));
|
||||
//WVTA ID
|
||||
if (StringUtils.isNotBlank(infoDiff.get("wvtaId"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("wvtaId").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Implement type has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
contentInfo += "(" + infoDiffRow + "). WVTA ID has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
}else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.IMPLEMENT_TYPE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
} else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.WVTA_ID.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
//适用范围applyScope 多选
|
||||
if (StringUtils.isNotBlank(infoDiff.get("applyScope"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("applyScope").split("\\|"));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Apply Scope has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
} else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.SHI4_YONG4_FAN4_WEI2.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
|
||||
//新车型实施日期
|
||||
if (StringUtils.isNotBlank(infoDiff.get("xin1Che1Xing2Shi2Shi1Ri4Qi1String"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("xin1Che1Xing2Shi2Shi1Ri4Qi1String").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). The implementation date of new model has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
}else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
|
||||
//在产车实施日期
|
||||
if (StringUtils.isNotBlank(infoDiff.get("implementTimeString"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("implementTimeString").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Implement time has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
}else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.IMPLEMENT_TIME.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
|
||||
//认证类型
|
||||
if (StringUtils.isNotBlank(infoDiff.get("attestationType"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("attestationType").split(","));
|
||||
@@ -785,6 +788,33 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
contentLog += DummyInventoryBaseFieldEnum.ATTESTATION_TYPE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
|
||||
//技术领域
|
||||
if (StringUtils.isNotBlank(infoDiff.get("technologyTerritoryName"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("technologyTerritoryName").split("\\|"));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Technology territory has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
}else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.TECHNOLOGY_TERRITORY.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
|
||||
//责任领域
|
||||
if (StringUtils.isNotBlank(infoDiff.get("dutyTerritory"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("dutyTerritory").split("\\|"));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Duty territory has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
} else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.DUTY_TERRITORY.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
|
||||
//认证级别
|
||||
if (StringUtils.isNotBlank(infoDiff.get("attestationRank"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("attestationRank").split(","));
|
||||
@@ -797,20 +827,45 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
contentLog += DummyInventoryBaseFieldEnum.ATTESTATION_RANK.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
//责任领域
|
||||
if (StringUtils.isNotBlank(infoDiff.get("dutyTerritory"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("dutyTerritory").split("\\|"));
|
||||
// List<String> list = Arrays.asList(infoDiff.get("dutyTerritory").split(","));
|
||||
|
||||
//实施类别
|
||||
if (StringUtils.isNotBlank(infoDiff.get("implementType"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("implementType").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Duty territory has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
contentInfo += "(" + infoDiffRow + "). Implement type has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
} else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.DUTY_TERRITORY.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.IMPLEMENT_TYPE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
|
||||
//适用地区region 多选
|
||||
if (StringUtils.isNotBlank(infoDiff.get("region"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("region").split("\\|"));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Region has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
} else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.REGION.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
|
||||
//适用增补件applicableSupplement
|
||||
if (StringUtils.isNotBlank(infoDiff.get("applicableSupplement"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("applicableSupplement").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
if (StringUtils.isBlank(contentLog)) {
|
||||
contentInfo += "(" + infoDiffRow + "). Applicable Supplement has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
} else{
|
||||
contentLog += DummyInventoryBaseFieldEnum.APPLICABLE_SUPPLEMENT.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
//备注
|
||||
if (StringUtils.isNotBlank(infoDiff.get("remark"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("remark").split(","));
|
||||
@@ -823,6 +878,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
contentLog += DummyInventoryBaseFieldEnum.REMARK.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
|
||||
//设计符合性确认-交付物类型
|
||||
if (StringUtils.isNotBlank(infoDiff.get("designDeliverableType"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("designDeliverableType").split(","));
|
||||
|
||||
+2
-16
@@ -16,6 +16,7 @@ import com.jero.common.util.DateUtils;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.dummy.entity.DummyInventoryInfoEO;
|
||||
import com.jero.modules.dummy.entity.DummyInventoryInfoEOEn;
|
||||
import com.jero.modules.dummy.enums.DummyInventoryBaseFieldEnum;
|
||||
import com.jero.modules.dummy.mapper.DummyInventoryInfoEOMapper;
|
||||
import com.jero.modules.dummy.service.IDummyInventoryInfoEOService;
|
||||
@@ -93,21 +94,6 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置更新log
|
||||
*
|
||||
*//*
|
||||
private void updateLog(String contentLog,String baseId) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
if (StringUtils.isNotBlank(contentLog)) {
|
||||
DummyLogEO dummyLogEO = new DummyLogEO();
|
||||
dummyLogEO.setDummyInventoryBaseId(baseId);
|
||||
dummyLogEO.setLogContent(contentLog);
|
||||
dummyLogEO.setCreateBy(sysUser.getUsername());
|
||||
dummyLogEOService.add(dummyLogEO);
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -425,7 +411,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
if(ObjectUtils.isNotEmpty(dummyInventoryInfoEO.getImplementTime())){
|
||||
dummyInventoryInfoEOTemp.setImplementTime(dummyInventoryInfoEO.getImplementTime());
|
||||
if (info.getImplementTime() == null){
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getName(),"空",inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String());
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.IMPLEMENT_TIME.getName(),"空",inputInfoEO.getImplementTimeString());
|
||||
}else {
|
||||
if (!info.getImplementTimeString().equals(inputInfoEO.getImplementTimeString())) {
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.IMPLEMENT_TIME.getName(), info.getImplementTimeString(), inputInfoEO.getImplementTimeString());
|
||||
|
||||
@@ -39,7 +39,8 @@ public class ListDiff <T> {
|
||||
// v2String = new StringBuilder("null");
|
||||
// }
|
||||
if(f.getName().contains("erritory") || f.getName().contains("emplate")
|
||||
|| f.getName().equals(("shi4Yong4Fan4Wei2")) || f.getName().equals("region")){
|
||||
|| f.getName().equals(("shi4Yong4Fan4Wei2")) || f.getName().equals("region")
|
||||
|| f.getName().equals("applyScope")){
|
||||
result.put(f.getName(), v1String.append("|").append(v2String).toString());
|
||||
}else {
|
||||
//
|
||||
|
||||
+138
@@ -1286,25 +1286,70 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
@Override
|
||||
public void setBatch(ProjectLawsInventoryEO projectLawsInventoryEO) {
|
||||
if(org.apache.commons.lang3.StringUtils.isNotBlank(projectLawsInventoryEO.getIds())){
|
||||
//更新log
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String username = sysUser.getUsername();
|
||||
String contentLog = username+"批量设置了";
|
||||
StringBuilder contentLogBuilder = new StringBuilder(contentLog);
|
||||
|
||||
//根据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();
|
||||
translateData(infoList);
|
||||
|
||||
//翻译传入的数据
|
||||
List<ProjectLawsInventoryEO> inputList = new ArrayList<>();
|
||||
inputList.add(projectLawsInventoryEO);
|
||||
translateData(inputList);
|
||||
ProjectLawsInventoryEO inputInfoEO = inputList.get(0);
|
||||
|
||||
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = new ArrayList<>();
|
||||
for (String id : projectLawsInventoryEO.getIds().split(",")) {
|
||||
ProjectLawsInventoryEO info = infoList.stream().filter(e -> id.equals(e.getId())).collect(Collectors.toList()).get(0);
|
||||
contentLogBuilder.append(info.getSerialNumber() + ":");
|
||||
ProjectLawsInventoryEO projectLawsInventoryEOTemp = new ProjectLawsInventoryEO();
|
||||
projectLawsInventoryEOTemp.setId(id);
|
||||
//实施类别 implementType
|
||||
if(StringUtils.isNotBlank(projectLawsInventoryEO.getImplementType())){
|
||||
projectLawsInventoryEOTemp.setImplementType(projectLawsInventoryEO.getImplementType());
|
||||
if (StringUtils.isBlank(info.getImplementType())){
|
||||
info.setImplementType("空");
|
||||
}
|
||||
if (!info.getImplementType().equals(inputInfoEO.getImplementType())) {
|
||||
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.IMPLEMENT_TYPE.getName(), info.getImplementType(), inputInfoEO.getImplementType());
|
||||
}
|
||||
}
|
||||
//认证类型 attestationType
|
||||
if(StringUtils.isNotBlank(projectLawsInventoryEO.getAttestationType())){
|
||||
projectLawsInventoryEOTemp.setAttestationType(projectLawsInventoryEO.getAttestationType());
|
||||
if (StringUtils.isBlank(info.getAttestationType())){
|
||||
info.setAttestationType("空");
|
||||
}
|
||||
if (!info.getAttestationType().equals(inputInfoEO.getAttestationType())) {
|
||||
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.ATTESTATION_TYPE.getName(), info.getAttestationType(), inputInfoEO.getAttestationType());
|
||||
}
|
||||
}
|
||||
//认证级别 attestationRank
|
||||
if(StringUtils.isNotBlank(projectLawsInventoryEO.getAttestationRank())){
|
||||
projectLawsInventoryEOTemp.setAttestationRank(projectLawsInventoryEO.getAttestationRank());
|
||||
if (StringUtils.isBlank(info.getAttestationRank())){
|
||||
info.setAttestationRank("空");
|
||||
}
|
||||
if (!info.getAttestationRank().equals(inputInfoEO.getAttestationRank())){
|
||||
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.ATTESTATION_RANK.getName(), info.getAttestationRank(), inputInfoEO.getAttestationRank());
|
||||
}
|
||||
}
|
||||
//责任领域 dutyTerritory
|
||||
if(StringUtils.isNotBlank(projectLawsInventoryEO.getDutyTerritory())){
|
||||
projectLawsInventoryEOTemp.setDutyTerritory(projectLawsInventoryEO.getDutyTerritory());
|
||||
if (StringUtils.isBlank(info.getDutyTerritory())){
|
||||
info.setDutyTerritory("空");
|
||||
}
|
||||
if (!info.getDutyTerritory().equals(inputInfoEO.getDutyTerritory())){
|
||||
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.DUTY_TERRITORY.getName(), info.getDutyTerritory(), inputInfoEO.getDutyTerritory());
|
||||
}
|
||||
}
|
||||
//在产车实施日期implementTime
|
||||
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getImplementTime())){
|
||||
@@ -1321,21 +1366,114 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
//设计符合性确认截止时间
|
||||
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getDesignDueDate())){
|
||||
projectLawsInventoryEOTemp.setDesignDueDate(projectLawsInventoryEO.getDesignDueDate());
|
||||
if (info.getDesignDueDate() == null){
|
||||
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.DESIGN_DUE_DATE.getName(),"空",inputInfoEO.getDesignDueDateString());
|
||||
}else {
|
||||
if (!info.getDesignDueDateString().equals(inputInfoEO.getDesignDueDateString())) {
|
||||
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.DESIGN_DUE_DATE.getName(), info.getDesignDueDateString(), inputInfoEO.getDesignDueDateString());
|
||||
}
|
||||
}
|
||||
}
|
||||
//preHomo确认截止时间
|
||||
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoDueDate())){
|
||||
projectLawsInventoryEOTemp.setPrehomoDueDate(projectLawsInventoryEO.getPrehomoDueDate());
|
||||
if (info.getVerifyDueDate() == null){
|
||||
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.PREHOMO_DUE_DATE.getName(),"空",inputInfoEO.getPrehomoDueDateString());
|
||||
}else {
|
||||
if (!info.getPrehomoDueDateString().equals(inputInfoEO.getPrehomoDueDateString())) {
|
||||
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.PREHOMO_DUE_DATE.getName(), info.getPrehomoDueDateString(), inputInfoEO.getPrehomoDueDateString());
|
||||
}
|
||||
}
|
||||
}
|
||||
//验证符合性确认截止时间
|
||||
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getVerifyDueDate())){
|
||||
projectLawsInventoryEOTemp.setVerifyDueDate(projectLawsInventoryEO.getVerifyDueDate());
|
||||
if (info.getVerifyDueDate() == null){
|
||||
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.VERIFY_DUE_DATE.getName(),"空",inputInfoEO.getVerifyDueDateString());
|
||||
}else {
|
||||
if (!info.getVerifyDueDateString().equals(inputInfoEO.getVerifyDueDateString())) {
|
||||
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.VERIFY_DUE_DATE.getName(), info.getVerifyDueDateString(), inputInfoEO.getVerifyDueDateString());
|
||||
}
|
||||
}
|
||||
}
|
||||
projectLawsInventoryEOList.add(projectLawsInventoryEOTemp);
|
||||
}
|
||||
this.updateBatchById(projectLawsInventoryEOList);
|
||||
|
||||
contentLog = contentLogBuilder.substring(0, contentLogBuilder.length() - 1);
|
||||
projectLawsInventoryLogEOService.updateLog(contentLog, projectLibraryId);
|
||||
}
|
||||
}
|
||||
|
||||
public StringBuilder setUpdateContentLog(StringBuilder contentLogBuilder,String fieldName,String oldValue,String newValue){
|
||||
return contentLogBuilder.append("\'"+ fieldName + "\'由" + oldValue + "改为了" + newValue).append(",");
|
||||
}
|
||||
|
||||
private void translateData(List<ProjectLawsInventoryEO> infoList) {
|
||||
for (ProjectLawsInventoryEO projectLawsInventoryEO : infoList) {
|
||||
//责任领域
|
||||
if (StringUtils.isNotBlank(projectLawsInventoryEO.getDutyTerritory())) {
|
||||
List<SysDictItem> dutyTerritory = sysDictItemMapper.selectItemsByDictCode(ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue());
|
||||
List<String> dutyTerritoryList = Arrays.asList(projectLawsInventoryEO.getDutyTerritory().split(","));
|
||||
StringBuilder dutyTerritoryBuilder = new StringBuilder();
|
||||
for (String midDutyTerritory : dutyTerritoryList) {
|
||||
String dutyTerritoryName = dutyTerritory.stream().filter(e -> e.getItemValue().equals(midDutyTerritory)).map(f -> f.getItemText()).collect(Collectors.joining(","));
|
||||
dutyTerritoryBuilder.append(dutyTerritoryName).append(",");
|
||||
}
|
||||
projectLawsInventoryEO.setDutyTerritory(dutyTerritoryBuilder.substring(0, dutyTerritoryBuilder.toString().length() - 1));
|
||||
} else {
|
||||
projectLawsInventoryEO.setDutyTerritory("空");
|
||||
}
|
||||
//实施类别
|
||||
if (StringUtils.isNotBlank(projectLawsInventoryEO.getImplementType())) {
|
||||
List<SysDictItem> implementType = sysDictItemMapper.selectItemsByDictCode(ProjectInventoryFieldEnum.IMPLEMENT_TYPE.getValue());
|
||||
String implementTypeName = implementType.stream().filter(e -> e.getItemValue().equals(projectLawsInventoryEO.getImplementType())).map(f -> f.getItemText()).collect(Collectors.joining(","));
|
||||
projectLawsInventoryEO.setImplementType(implementTypeName);
|
||||
} else {
|
||||
projectLawsInventoryEO.setImplementType("空");
|
||||
}
|
||||
//认证类型
|
||||
if (StringUtils.isNotBlank(projectLawsInventoryEO.getAttestationType())) {
|
||||
List<SysDictItem> attestationType = sysDictItemMapper.selectItemsByDictCode(ProjectInventoryFieldEnum.ATTESTATION_TYPE.getValue());
|
||||
String attestationTypeName = attestationType.stream().filter(e -> e.getItemValue().equals(projectLawsInventoryEO.getAttestationType())).map(f -> f.getItemText()).collect(Collectors.joining(","));
|
||||
projectLawsInventoryEO.setAttestationType(attestationTypeName);
|
||||
} else {
|
||||
projectLawsInventoryEO.setAttestationType("空");
|
||||
}
|
||||
//认证级别
|
||||
if (StringUtils.isNotBlank(projectLawsInventoryEO.getAttestationRank())) {
|
||||
List<SysDictItem> attestationRank = sysDictItemMapper.selectItemsByDictCode(ProjectInventoryFieldEnum.ATTESTATION_RANK.getValue());
|
||||
String attestationRankName = attestationRank.stream().filter(e -> e.getItemValue().equals(projectLawsInventoryEO.getAttestationRank())).map(f -> f.getItemText()).collect(Collectors.joining(","));
|
||||
projectLawsInventoryEO.setAttestationRank(attestationRankName);
|
||||
} else {
|
||||
projectLawsInventoryEO.setAttestationRank("空");
|
||||
}
|
||||
//设计符合性确认-截止时间 designDueDate
|
||||
if (projectLawsInventoryEO.getDesignDueDate() != null) {
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
|
||||
String dateString = sdf.format(projectLawsInventoryEO.getDesignDueDate());
|
||||
projectLawsInventoryEO.setDesignDueDateString(dateString);
|
||||
}else {
|
||||
projectLawsInventoryEO.setDesignDueDateString("空");
|
||||
}
|
||||
//prehomo确认-截止时间 prehomoDueDate
|
||||
if (projectLawsInventoryEO.getPrehomoDueDate() != null) {
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
|
||||
String dateString = sdf.format(projectLawsInventoryEO.getPrehomoDueDate());
|
||||
projectLawsInventoryEO.setPrehomoDueDateString(dateString);
|
||||
}else {
|
||||
projectLawsInventoryEO.setPrehomoDueDateString("空");
|
||||
}
|
||||
//验证符合性确认-截止时间 verifyDueDate
|
||||
if (projectLawsInventoryEO.getDesignDueDate() != null) {
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
|
||||
String dateString = sdf.format(projectLawsInventoryEO.getVerifyDueDate());
|
||||
projectLawsInventoryEO.setVerifyDueDateString(dateString);
|
||||
}else {
|
||||
projectLawsInventoryEO.setVerifyDueDateString("空");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private ProjectLawsInventoryEO dataCompare(ProjectLawsInventoryEO projectLawsInventoryEO,DummyInventoryInfoEO dummyInventoryInfoEO){
|
||||
//编号
|
||||
|
||||
Reference in New Issue
Block a user