法规清单更新log编辑+虚拟清单log修改
This commit is contained in:
+17
-2
@@ -428,6 +428,22 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
public void disposeData(List<DummyInventoryInfoEO> records) {
|
||||
Set<String> technologyTerritorySet = new HashSet<>();
|
||||
for (DummyInventoryInfoEO dummyInventoryInfoEO : records) {
|
||||
//子标题
|
||||
if (StringUtils.isBlank(dummyInventoryInfoEO.getSubtitle())) {
|
||||
dummyInventoryInfoEO.setSubtitle("空");
|
||||
}
|
||||
//WVTA ID
|
||||
if (StringUtils.isBlank(dummyInventoryInfoEO.getWvtaId())) {
|
||||
dummyInventoryInfoEO.setWvtaId("空");
|
||||
}
|
||||
//备注
|
||||
if (StringUtils.isBlank(dummyInventoryInfoEO.getRemark())) {
|
||||
dummyInventoryInfoEO.setRemark("空");
|
||||
}
|
||||
//适用增补件
|
||||
if (StringUtils.isBlank(dummyInventoryInfoEO.getApplicableSupplement())) {
|
||||
dummyInventoryInfoEO.setApplicableSupplement("空");
|
||||
}
|
||||
//技术领域
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getTechnologyTerritory())) {
|
||||
List<String> list = Arrays.asList(dummyInventoryInfoEO.getTechnologyTerritory().split(","));
|
||||
@@ -540,7 +556,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
dummyInventoryInfoEO.setImplementTimeString("空");
|
||||
}
|
||||
|
||||
|
||||
//交付物类型
|
||||
List<SysDictItem> deliverableTemplate = sysDictItemMapper.selectItemsByDictCode(DummyInventoryBaseFieldEnum.DELIVERABLE_TEMPLATE.getValue());
|
||||
//设计符合性确认-交付物类型
|
||||
@@ -1030,7 +1045,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
if(StringUtils.isNotBlank(contentLog)) {
|
||||
contentInfo = contentLog;
|
||||
}
|
||||
contentInfo.substring(0, contentInfo.length() - 1);
|
||||
contentInfo = contentInfo.substring(0, contentInfo.length() - 1);
|
||||
return contentInfo;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ import java.util.Map;
|
||||
* @Date: 2022-04-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="项目库-项目库-相关人员维护表")
|
||||
@Api(tags="项目库-相关人员维护表")
|
||||
@RestController
|
||||
@RequestMapping("/project/projectRelatedPersonnel")
|
||||
@Slf4j
|
||||
|
||||
+4
@@ -121,6 +121,8 @@ public class ProjectLawsInventoryEO implements Serializable {
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "新车型实施日期")
|
||||
private Date xin1Che1Xing2Shi2Shi1Ri4Qi1;
|
||||
@TableField(exist = false)
|
||||
private String xin1Che1Xing2Shi2Shi1Ri4Qi1String;
|
||||
|
||||
/**在产车实施日期*/
|
||||
@Excel(name = "在产车实施日期", width = 20, format = "yyyy-MM-dd")
|
||||
@@ -128,6 +130,8 @@ public class ProjectLawsInventoryEO implements Serializable {
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "在产车实施日期")
|
||||
private Date implementTime;
|
||||
@TableField(exist = false)
|
||||
private String implementTimeString;
|
||||
|
||||
/**认证类型*/
|
||||
@Excel(name = "认证类型", width = 20,dicCode ="attestation_type")
|
||||
|
||||
+28
-1
@@ -1,16 +1,43 @@
|
||||
package com.jero.modules.project.enums;
|
||||
|
||||
public enum ProjectInventoryFieldEnum {
|
||||
SUBTITLE("子标题","subtitle"),
|
||||
WVTA_ID("WVTA ID","wvta_id"),
|
||||
TECHNOLOGY_TERRITORY("技术领域","technology_territory"),
|
||||
DUTY_TERRITORY("责任领域","duty_territory"),
|
||||
REGULATION_OWNER_NAME("法规工程师名称","regulation_owner_name"),
|
||||
HOMOLOGATION_ENGINEER_NAME("认证工程师名称","homologation_engineer_name"),
|
||||
ENGINEERING_INTERFACE_PERSON_NAME("工程接口人名称","engineering_interface_personName"),
|
||||
IMPLEMENT_TYPE("实施类别","implement_type"),
|
||||
ATTESTATION_TYPE("认证类型","attestation_type"),
|
||||
ATTESTATION_RANK("认证级别","attestation_rank"),
|
||||
|
||||
XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1("新车型实施日期","xin1_che1_xing2_shi2_shi1_ri4_qi1"),
|
||||
IMPLEMENT_TIME("在产车实施日期","implement_time"),
|
||||
REGION("适用地区","region"),
|
||||
REMARK("备注","remark"),
|
||||
DESIGN_DUE_DATE("设计符合性确认-截止时间","designDueDate"),
|
||||
PREHOMO_DUE_DATE("Pre-Homo确认-截止时间","prehomoDueDate"),
|
||||
VERIFY_DUE_DATE("验证符合性确认-截止时间","verifyDueDate"),
|
||||
|
||||
DELIVERABLE_TEMPLATE("交付物类型","deliverable_template"),
|
||||
FA1_QI3_REN2("发起人","fa1_qi3_ren2"),
|
||||
ZE2_REN2_REN2("责任人","ze2_ren4_ren2"),
|
||||
|
||||
DESIGN_DELIVERABLE_TYPE("设计符合性确认-交付物类型","deliverable_template"),
|
||||
DESIGN_DELIVERABLE_TEMPLATE("设计符合性确认-交付物模板","design_deliverable_template"),
|
||||
DESIGN_INITIATOR("设计符合性确认-发起人","fa1_qi3_ren2"),
|
||||
DESIGN_DUTY("设计符合性确认-责任人","ze2_ren4_ren2"),
|
||||
|
||||
PREHOMO_DELIVERABLE_TYPE("prehomo确认-交付物类型","deliverable_template"),
|
||||
PREHOMO_DELIVERABLE_TEMPLATE("prehomo确认-交付物模板","prehomo_deliverable_template"),
|
||||
PREHOMO_INITIATOR("prehomo确认-发起人","fa1_qi3_ren2"),
|
||||
PREHOMO_DUTY("prehomo确认-责任人","ze2_ren4_ren2"),
|
||||
|
||||
VERIFY_DELIVERABLE_TYPE("验证符合性确认-交付物类型","deliverable_template"),
|
||||
VERIFY_DELIVERABLE_TEMPLATE("验证符合性确认-交付物模板","verify_deliverable_template"),
|
||||
VERIFY_INITIATOR("验证符合性确认-发起人","fa1_qi3_ren2"),
|
||||
VERIFY_DUTY("验证符合性确认-责任人","ze2_ren4_ren2"),
|
||||
|
||||
;
|
||||
String name;
|
||||
String value;
|
||||
|
||||
+472
-25
@@ -1,9 +1,6 @@
|
||||
package com.jero.modules.project.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ZipUtil;
|
||||
import com.jero.modules.dummy.entity.DummyInventoryBaseEO;
|
||||
import com.jero.modules.dummy.enums.DummyInventoryBaseFieldEnum;
|
||||
import com.jero.modules.dummy.service.impl.DummyInventoryBaseEOServiceImpl;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.aliyuncs.utils.IOUtils;
|
||||
@@ -22,9 +19,12 @@ import com.jero.common.system.vo.LoginUser;
|
||||
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.DummyInventoryBaseEO;
|
||||
import com.jero.modules.dummy.entity.DummyInventoryInfoEO;
|
||||
import com.jero.modules.dummy.enums.DummyInventoryBaseFieldEnum;
|
||||
import com.jero.modules.dummy.service.IDummyInventoryInfoEOService;
|
||||
import com.jero.modules.dummy.service.impl.DummyInventoryBaseEOServiceImpl;
|
||||
import com.jero.modules.dummy.util.ListDiff;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.message.websocket.WebSocket;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
@@ -48,6 +48,7 @@ import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||
import lombok.SneakyThrows;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.collections4.MapUtils;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -308,7 +309,29 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
boolean checkResult = checkData(projectLawsInventoryEO.getProjectLibraryId(), currentUser.getId(), projectLawsInventoryEO.getId());
|
||||
if(checkResult){
|
||||
projectLawsInventoryEO.setUpdateTime(now);
|
||||
|
||||
//更新log
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String username = sysUser.getUsername();
|
||||
String contentLog = username+"编辑了清单中的\"" + projectLawsInventoryEO.getSerialNumber() + "\"标准:";
|
||||
List<ProjectLawsInventoryEO> infoEOList = new ArrayList<>();
|
||||
infoEOList.add(projectLawsInventoryEO);
|
||||
//查询数据库里原来的数据
|
||||
QueryWrapper<ProjectLawsInventoryEO> queryWrapper = new QueryWrapper<>();
|
||||
List<ProjectLawsInventoryEO> dataList = list(queryWrapper.eq("id", projectLawsInventoryEO.getId()));
|
||||
|
||||
//保存
|
||||
saveOrUpdate(projectLawsInventoryEO);
|
||||
|
||||
//翻译
|
||||
translateData(infoEOList);
|
||||
translateData(dataList);
|
||||
//比对不同字段
|
||||
Map<String, String> infoDiff = ListDiff.compareObject(dataList.get(0),projectLawsInventoryEO);
|
||||
|
||||
//设置更新log
|
||||
contentLog = setContentLog(infoDiff,contentLog);
|
||||
projectLawsInventoryLogEOService.updateLog(contentLog, projectLawsInventoryEO.getProjectLibraryId());
|
||||
}else {
|
||||
throw new JeroBootException("该用户没有权限操作该数据!");
|
||||
}
|
||||
@@ -1354,14 +1377,34 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
//在产车实施日期implementTime
|
||||
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getImplementTime())){
|
||||
projectLawsInventoryEOTemp.setImplementTime(projectLawsInventoryEO.getImplementTime());
|
||||
if (info.getImplementTime() == null){
|
||||
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.IMPLEMENT_TIME.getName(),"空",inputInfoEO.getImplementTimeString());
|
||||
}else {
|
||||
if (!info.getImplementTimeString().equals(inputInfoEO.getImplementTimeString())) {
|
||||
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.IMPLEMENT_TIME.getName(), info.getImplementTimeString(), inputInfoEO.getImplementTimeString());
|
||||
}
|
||||
}
|
||||
}
|
||||
//新车型实施日期xin1Che1Xing2Shi2Shi1Ri4Qi1
|
||||
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1())){
|
||||
projectLawsInventoryEOTemp.setXin1Che1Xing2Shi2Shi1Ri4Qi1(projectLawsInventoryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1());
|
||||
if (info.getXin1Che1Xing2Shi2Shi1Ri4Qi1() == null){
|
||||
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getName(),"空",inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String());
|
||||
}else {
|
||||
if (!info.getXin1Che1Xing2Shi2Shi1Ri4Qi1String().equals(inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String())) {
|
||||
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getName(), info.getXin1Che1Xing2Shi2Shi1Ri4Qi1String(), inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String());
|
||||
}
|
||||
}
|
||||
}
|
||||
//适用地区region
|
||||
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getRegion())){
|
||||
projectLawsInventoryEOTemp.setRegion(projectLawsInventoryEO.getRegion());
|
||||
if (StringUtils.isBlank(info.getRegion())){
|
||||
info.setRegion("空");
|
||||
}
|
||||
if (!info.getRegion().equals(inputInfoEO.getRegion())) {
|
||||
setUpdateContentLog(contentLogBuilder, ProjectInventoryFieldEnum.REGION.getName(),info.getRegion(),inputInfoEO.getRegion());
|
||||
}
|
||||
}
|
||||
//设计符合性确认截止时间
|
||||
if(ObjectUtils.isNotEmpty(projectLawsInventoryEO.getDesignDueDate())){
|
||||
@@ -1411,6 +1454,63 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
private void translateData(List<ProjectLawsInventoryEO> infoList) {
|
||||
for (ProjectLawsInventoryEO projectLawsInventoryEO : infoList) {
|
||||
//子标题
|
||||
if (StringUtils.isBlank(projectLawsInventoryEO.getSubtitle())) {
|
||||
projectLawsInventoryEO.setSubtitle("空");
|
||||
}
|
||||
//WVTA ID
|
||||
if (StringUtils.isBlank(projectLawsInventoryEO.getWvtaId())) {
|
||||
projectLawsInventoryEO.setWvtaId("空");
|
||||
}
|
||||
//备注
|
||||
if (StringUtils.isBlank(projectLawsInventoryEO.getRemark())) {
|
||||
projectLawsInventoryEO.setRemark("空");
|
||||
}
|
||||
//实施类别
|
||||
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 (projectLawsInventoryEO.getImplementTime() != null) {
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
|
||||
String dateString = sdf.format(projectLawsInventoryEO.getImplementTime());
|
||||
projectLawsInventoryEO.setImplementTimeString(dateString);
|
||||
}else {
|
||||
projectLawsInventoryEO.setImplementTimeString("空");
|
||||
}
|
||||
|
||||
//新车型实施日期
|
||||
if (projectLawsInventoryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1() != null) {
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
|
||||
String dateString = sdf.format(projectLawsInventoryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1());
|
||||
projectLawsInventoryEO.setXin1Che1Xing2Shi2Shi1Ri4Qi1String(dateString);
|
||||
}else {
|
||||
projectLawsInventoryEO.setXin1Che1Xing2Shi2Shi1Ri4Qi1String("空");
|
||||
}
|
||||
|
||||
//认证类型
|
||||
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("空");
|
||||
}
|
||||
|
||||
//责任领域
|
||||
if (StringUtils.isNotBlank(projectLawsInventoryEO.getDutyTerritory())) {
|
||||
List<SysDictItem> dutyTerritory = sysDictItemMapper.selectItemsByDictCode(ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue());
|
||||
@@ -1424,30 +1524,157 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
} 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.getRegion())) {
|
||||
List<SysDictItem> region = sysDictItemMapper.selectItemsByDictCode(DummyInventoryBaseFieldEnum.REGION.getValue());
|
||||
List<String> regionList = Arrays.asList(projectLawsInventoryEO.getRegion().split(","));
|
||||
StringBuilder regionBuilder = new StringBuilder();
|
||||
for (String midRegion : regionList) {
|
||||
String regionName = region.stream().filter(e -> e.getItemValue().equals(midRegion)).map(f -> f.getItemText()).collect(Collectors.joining(","));
|
||||
regionBuilder.append(regionName).append(",");
|
||||
}
|
||||
projectLawsInventoryEO.setRegion(regionBuilder.substring(0, regionBuilder.toString().length() - 1));
|
||||
}else {
|
||||
projectLawsInventoryEO.setRegion("空");
|
||||
}
|
||||
//认证类型
|
||||
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("空");
|
||||
|
||||
//交付物类型
|
||||
List<SysDictItem> deliverableTemplate = sysDictItemMapper.selectItemsByDictCode(DummyInventoryBaseFieldEnum.DELIVERABLE_TEMPLATE.getValue());
|
||||
//设计符合性确认-交付物类型
|
||||
if (StringUtils.isNotBlank(projectLawsInventoryEO.getDesignDeliverableType())) {
|
||||
String designDeliverableTypeName = deliverableTemplate.stream().filter(e -> e.getItemValue().equals(projectLawsInventoryEO.getDesignDeliverableType())).map(f -> f.getItemText()).collect(Collectors.joining(","));
|
||||
projectLawsInventoryEO.setDesignDeliverableType(designDeliverableTypeName);
|
||||
}else {
|
||||
projectLawsInventoryEO.setDesignDeliverableType("空");
|
||||
}
|
||||
//认证级别
|
||||
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("空");
|
||||
//prehomo确认-交付物类型
|
||||
if (StringUtils.isNotBlank(projectLawsInventoryEO.getPrehomoDeliverableType())) {
|
||||
String prehomoDeliverableTypeName = deliverableTemplate.stream().filter(e -> e.getItemValue().equals(projectLawsInventoryEO.getPrehomoDeliverableType())).map(f -> f.getItemText()).collect(Collectors.joining(","));
|
||||
projectLawsInventoryEO.setPrehomoDeliverableType(prehomoDeliverableTypeName);
|
||||
}else {
|
||||
projectLawsInventoryEO.setPrehomoDeliverableType("空");
|
||||
}
|
||||
//验证符合性确认-交付物类型
|
||||
if (StringUtils.isNotBlank(projectLawsInventoryEO.getVerifyDeliverableType())) {
|
||||
String verifyDeliverableTypeName = deliverableTemplate.stream().filter(e -> e.getItemValue().equals(projectLawsInventoryEO.getVerifyDeliverableType())).map(f -> f.getItemText()).collect(Collectors.joining(","));
|
||||
projectLawsInventoryEO.setVerifyDeliverableType(verifyDeliverableTypeName);
|
||||
}else {
|
||||
projectLawsInventoryEO.setVerifyDeliverableType("空");
|
||||
}
|
||||
|
||||
|
||||
List<String> userIdList= new ArrayList<>();
|
||||
//法规工程师
|
||||
if (StringUtils.isNotBlank(projectLawsInventoryEO.getRegulationOwnerId())) {
|
||||
userIdList.add(projectLawsInventoryEO.getRegulationOwnerId());
|
||||
} else {
|
||||
projectLawsInventoryEO.setRegulationOwnerName("空");
|
||||
}
|
||||
|
||||
//认证工程师
|
||||
if (StringUtils.isNotBlank(projectLawsInventoryEO.getHomologationEngineerId())) {
|
||||
userIdList.add(projectLawsInventoryEO.getHomologationEngineerId());
|
||||
}else {
|
||||
projectLawsInventoryEO.setHomologationEngineerName("空");
|
||||
}
|
||||
|
||||
//工程接口人
|
||||
if (StringUtils.isNotBlank(projectLawsInventoryEO.getEngineeringInterfacePerson())) {
|
||||
userIdList.add(projectLawsInventoryEO.getEngineeringInterfacePerson());
|
||||
}else {
|
||||
projectLawsInventoryEO.setEngineeringInterfacePersonName("空");
|
||||
}
|
||||
|
||||
//发起人
|
||||
if (StringUtils.isNotBlank(projectLawsInventoryEO.getDesignInitiatorId())) {
|
||||
userIdList.add(projectLawsInventoryEO.getDesignInitiatorId());
|
||||
}else {
|
||||
projectLawsInventoryEO.setDesignInitiatorName("空");
|
||||
}
|
||||
if (StringUtils.isNotBlank(projectLawsInventoryEO.getPrehomoInitiatorId())) {
|
||||
userIdList.add(projectLawsInventoryEO.getPrehomoInitiatorId());
|
||||
}else {
|
||||
projectLawsInventoryEO.setPrehomoInitiatorName("空");
|
||||
}
|
||||
if (StringUtils.isNotBlank(projectLawsInventoryEO.getVerifyInitiatorId())) {
|
||||
userIdList.add(projectLawsInventoryEO.getVerifyInitiatorId());
|
||||
}else {
|
||||
projectLawsInventoryEO.setVerifyInitiatorName("空");
|
||||
}
|
||||
|
||||
//责任人
|
||||
if (StringUtils.isBlank(projectLawsInventoryEO.getDesignDutyId())) {
|
||||
userIdList.add(projectLawsInventoryEO.getDesignDutyId());
|
||||
}else {
|
||||
projectLawsInventoryEO.setDesignDutyName("空");
|
||||
}
|
||||
if (StringUtils.isBlank(projectLawsInventoryEO.getPrehomoDutyId())) {
|
||||
userIdList.add(projectLawsInventoryEO.getPrehomoDutyId());
|
||||
}else {
|
||||
projectLawsInventoryEO.setPrehomoDutyName("空");
|
||||
}
|
||||
if (StringUtils.isBlank(projectLawsInventoryEO.getVerifyDutyId())) {
|
||||
userIdList.add(projectLawsInventoryEO.getVerifyDutyId());
|
||||
}else {
|
||||
projectLawsInventoryEO.setVerifyDutyName("空");
|
||||
}
|
||||
|
||||
userIdList = userIdList.stream().distinct().collect(Collectors.toList());
|
||||
if(CollectionUtils.isNotEmpty(userIdList)){
|
||||
QueryWrapper<SysUser> userqueryWrapper = new QueryWrapper<>();
|
||||
List<SysUser> userList = sysUserService.list(userqueryWrapper.in("id ", userIdList));
|
||||
|
||||
//法规工程师
|
||||
if (StringUtils.isNotBlank(projectLawsInventoryEO.getRegulationOwnerId())) {
|
||||
String userName = userList.stream().filter(e -> e.getId().equals(projectLawsInventoryEO.getRegulationOwnerId())).map(f -> f.getUsername()).collect(Collectors.toList()).get(0);
|
||||
projectLawsInventoryEO.setRegulationOwnerName(userName);
|
||||
}
|
||||
|
||||
//认证工程师
|
||||
if (StringUtils.isNotBlank(projectLawsInventoryEO.getHomologationEngineerId())) {
|
||||
String userName = userList.stream().filter(e -> e.getId().equals(projectLawsInventoryEO.getHomologationEngineerId())).map(f -> f.getUsername()).collect(Collectors.toList()).get(0);
|
||||
projectLawsInventoryEO.setHomologationEngineerName(userName);
|
||||
}
|
||||
|
||||
//工程接口人
|
||||
if (StringUtils.isNotBlank(projectLawsInventoryEO.getEngineeringInterfacePerson())) {
|
||||
String userName = userList.stream().filter(e -> e.getId().equals(projectLawsInventoryEO.getEngineeringInterfacePerson())).map(f -> f.getUsername()).collect(Collectors.toList()).get(0);
|
||||
projectLawsInventoryEO.setEngineeringInterfacePersonName(userName);
|
||||
}
|
||||
|
||||
|
||||
//发起人
|
||||
if (StringUtils.isNotBlank(projectLawsInventoryEO.getDesignInitiatorId())) {
|
||||
String userName = userList.stream().filter(e -> e.getId().equals(projectLawsInventoryEO.getDesignInitiatorId())).map(f -> f.getUsername()).collect(Collectors.toList()).get(0);
|
||||
projectLawsInventoryEO.setDesignInitiatorName(userName);
|
||||
}
|
||||
if (StringUtils.isNotBlank(projectLawsInventoryEO.getPrehomoInitiatorId())) {
|
||||
String userName = userList.stream().filter(e -> e.getId().equals(projectLawsInventoryEO.getPrehomoInitiatorId())).map(f -> f.getUsername()).collect(Collectors.toList()).get(0);
|
||||
projectLawsInventoryEO.setPrehomoInitiatorName(userName);
|
||||
}
|
||||
if (StringUtils.isNotBlank(projectLawsInventoryEO.getVerifyInitiatorId())) {
|
||||
String userName = userList.stream().filter(e -> e.getId().equals(projectLawsInventoryEO.getVerifyInitiatorId())).map(f -> f.getUsername()).collect(Collectors.toList()).get(0);
|
||||
projectLawsInventoryEO.setVerifyInitiatorName(userName);
|
||||
}
|
||||
|
||||
//责任人
|
||||
if (StringUtils.isNotBlank(projectLawsInventoryEO.getDesignDutyId())) {
|
||||
String userName = userList.stream().filter(e -> e.getId().equals(projectLawsInventoryEO.getDesignDutyId())).map(f -> f.getUsername()).collect(Collectors.toList()).get(0);
|
||||
projectLawsInventoryEO.setDesignDutyName(userName);
|
||||
}
|
||||
if (StringUtils.isNotBlank(projectLawsInventoryEO.getPrehomoDutyId())) {
|
||||
String userName = userList.stream().filter(e -> e.getId().equals(projectLawsInventoryEO.getPrehomoDutyId())).map(f -> f.getUsername()).collect(Collectors.toList()).get(0);
|
||||
projectLawsInventoryEO.setPrehomoDutyName(userName);
|
||||
}
|
||||
if (StringUtils.isNotBlank(projectLawsInventoryEO.getVerifyDutyId())) {
|
||||
String userName = userList.stream().filter(e -> e.getId().equals(projectLawsInventoryEO.getVerifyDutyId())).map(f -> f.getUsername()).collect(Collectors.toList()).get(0);
|
||||
projectLawsInventoryEO.setVerifyDutyName(userName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//截止时间
|
||||
//设计符合性确认-截止时间 designDueDate
|
||||
if (projectLawsInventoryEO.getDesignDueDate() != null) {
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
|
||||
@@ -1465,7 +1692,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
projectLawsInventoryEO.setPrehomoDueDateString("空");
|
||||
}
|
||||
//验证符合性确认-截止时间 verifyDueDate
|
||||
if (projectLawsInventoryEO.getDesignDueDate() != null) {
|
||||
if (projectLawsInventoryEO.getVerifyDueDate() != null) {
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
|
||||
String dateString = sdf.format(projectLawsInventoryEO.getVerifyDueDate());
|
||||
projectLawsInventoryEO.setVerifyDueDateString(dateString);
|
||||
@@ -3019,4 +3246,224 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
throw new JeroBootException(errorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
//拼接维护清单的消息
|
||||
public String setContentLog(Map<String, String> infoDiff,String contentLog) {
|
||||
|
||||
//设置维护清单的修改消息
|
||||
if(MapUtils.isNotEmpty(infoDiff)) {
|
||||
if (infoDiff.size() > 1) {
|
||||
//子标题
|
||||
if (StringUtils.isNotBlank(infoDiff.get("subtitle"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("subtitle").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
contentLog += ProjectInventoryFieldEnum.SUBTITLE.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);
|
||||
contentLog += ProjectInventoryFieldEnum.WVTA_ID.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
|
||||
//实施类别
|
||||
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);
|
||||
contentLog += ProjectInventoryFieldEnum.IMPLEMENT_TYPE.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);
|
||||
contentLog += ProjectInventoryFieldEnum.IMPLEMENT_TIME.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);
|
||||
contentLog += ProjectInventoryFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
|
||||
//认证类型
|
||||
if (StringUtils.isNotBlank(infoDiff.get("attestationType"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("attestationType").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
contentLog += ProjectInventoryFieldEnum.ATTESTATION_TYPE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
|
||||
//认证级别
|
||||
if (StringUtils.isNotBlank(infoDiff.get("attestationRank"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("attestationRank").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
contentLog += ProjectInventoryFieldEnum.ATTESTATION_RANK.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);
|
||||
contentLog += ProjectInventoryFieldEnum.DUTY_TERRITORY.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
|
||||
//regulationOwnerName;//法规工程师名称
|
||||
if (StringUtils.isNotBlank(infoDiff.get("regulationOwnerName"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("regulationOwnerName").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
contentLog += ProjectInventoryFieldEnum.REGULATION_OWNER_NAME.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
//homologationEngineerName;//认证工程师名称
|
||||
if (StringUtils.isNotBlank(infoDiff.get("homologationEngineerName"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("homologationEngineerName").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
contentLog += ProjectInventoryFieldEnum.HOMOLOGATION_ENGINEER_NAME.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
//engineeringInterfacePersonName;//工程接口人名称
|
||||
if (StringUtils.isNotBlank(infoDiff.get("engineeringInterfacePersonName"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("engineeringInterfacePersonName").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
contentLog += ProjectInventoryFieldEnum.ENGINEERING_INTERFACE_PERSON_NAME.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);
|
||||
contentLog += ProjectInventoryFieldEnum.REGION.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
|
||||
//备注
|
||||
if (StringUtils.isNotBlank(infoDiff.get("remark"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("remark").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
contentLog += ProjectInventoryFieldEnum.REMARK.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
|
||||
//设计符合性确认-交付物类型
|
||||
if (StringUtils.isNotBlank(infoDiff.get("designDeliverableType"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("designDeliverableType").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
contentLog += ProjectInventoryFieldEnum.DESIGN_DELIVERABLE_TYPE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
//设计符合性确认-交付物模板
|
||||
if (StringUtils.isNotBlank(infoDiff.get("designDeliverableTemplate"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("designDeliverableTemplate").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
contentLog += ProjectInventoryFieldEnum.DESIGN_DELIVERABLE_TEMPLATE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
//设计符合性确认-发起人
|
||||
if (StringUtils.isNotBlank(infoDiff.get("designInitiatorName"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("designInitiatorName").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
contentLog += ProjectInventoryFieldEnum.DESIGN_INITIATOR.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
//设计符合性确认-责任人
|
||||
if (StringUtils.isNotBlank(infoDiff.get("designDutyName"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("designDutyName").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
contentLog += ProjectInventoryFieldEnum.DESIGN_DUTY.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
//设计符合性确认-截止时间designDueDateString;
|
||||
if (StringUtils.isNotBlank(infoDiff.get("designDueDateString"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("designDueDateString").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
contentLog += ProjectInventoryFieldEnum.DESIGN_DUE_DATE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
//prehomo确认-交付物类型
|
||||
if (StringUtils.isNotBlank(infoDiff.get("prehomoDeliverableType"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("prehomoDeliverableType").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
contentLog += ProjectInventoryFieldEnum.PREHOMO_DELIVERABLE_TYPE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
//prehomo确认-交付物模板
|
||||
if (StringUtils.isNotBlank(infoDiff.get("prehomoDeliverableTemplate"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("prehomoDeliverableTemplate").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
contentLog += ProjectInventoryFieldEnum.PREHOMO_DELIVERABLE_TEMPLATE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
//prehomo确认-发起人
|
||||
if (StringUtils.isNotBlank(infoDiff.get("prehomoInitiatorName"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("prehomoInitiatorName").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
contentLog += ProjectInventoryFieldEnum.PREHOMO_INITIATOR.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
//prehomo确认-责任人
|
||||
if (StringUtils.isNotBlank(infoDiff.get("prehomoDutyName"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("prehomoDutyName").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
contentLog += ProjectInventoryFieldEnum.PREHOMO_DUTY.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
//prehomo确认-截止时间prehomoDueDateString;
|
||||
if (StringUtils.isNotBlank(infoDiff.get("prehomoDueDateString"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("prehomoDueDateString").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
contentLog += ProjectInventoryFieldEnum.DESIGN_DUE_DATE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
|
||||
//验证符合性确认-交付物类型
|
||||
if (StringUtils.isNotBlank(infoDiff.get("verifyDeliverableType"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("verifyDeliverableType").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
contentLog += ProjectInventoryFieldEnum.VERIFY_DELIVERABLE_TYPE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
//验证符合性确认-交付物模板
|
||||
if (StringUtils.isNotBlank(infoDiff.get("verifyDeliverableTemplate"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("verifyDeliverableTemplate").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
contentLog += ProjectInventoryFieldEnum.VERIFY_DELIVERABLE_TEMPLATE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
//验证符合性确认-发起人
|
||||
if (StringUtils.isNotBlank(infoDiff.get("verifyInitiatorName"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("verifyInitiatorName").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
contentLog += ProjectInventoryFieldEnum.VERIFY_INITIATOR.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
//验证符合性确认-责任人
|
||||
if (StringUtils.isNotBlank(infoDiff.get("verifyDutyName"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("verifyDutyName").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
contentLog += ProjectInventoryFieldEnum.VERIFY_DUTY.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
//验证符合性确认-截止时间verifyDueDateString
|
||||
if (StringUtils.isNotBlank(infoDiff.get("verifyDueDateString"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("verifyDueDateString").split(","));
|
||||
String infoDiffOld = list.get(0);
|
||||
String infoDiffNew = list.get(1);
|
||||
contentLog += ProjectInventoryFieldEnum.DESIGN_DUE_DATE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
contentLog = contentLog.substring(0, contentLog.length()-1);
|
||||
return contentLog;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user