Merge remote-tracking branch 'origin/master'
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(","));
|
||||
|
||||
+10
-26
@@ -17,7 +17,6 @@ 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.entity.DummyLogEO;
|
||||
import com.jero.modules.dummy.enums.DummyInventoryBaseFieldEnum;
|
||||
import com.jero.modules.dummy.mapper.DummyInventoryInfoEOMapper;
|
||||
import com.jero.modules.dummy.service.IDummyInventoryInfoEOService;
|
||||
@@ -95,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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -165,7 +149,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
String username = sysUser.getUsername();
|
||||
String serialNumber = list.stream().map(e->e.getSerialNumber()).collect(Collectors.joining(","));
|
||||
String contentLog = username+"向清单中添加了标准\""+serialNumber+"\"";
|
||||
updateLog(contentLog, dummyInventoryInfoEO.getDummyInventoryBaseId());
|
||||
dummyLogEOService.updateLog(contentLog, dummyInventoryInfoEO.getDummyInventoryBaseId());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,7 +167,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
//更新log
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String username = sysUser.getUsername();
|
||||
String contentLog = username+"编辑了清单中的\""+dummyInventoryInfoEO.getSerialNumber()+"\",";
|
||||
String contentLog = username+"编辑了清单中的\"" + dummyInventoryInfoEO.getSerialNumber() + "\"标准:";
|
||||
List<DummyInventoryInfoEO> infoEOList = new ArrayList<>();
|
||||
infoEOList.add(dummyInventoryInfoEO);
|
||||
//查询数据库里原来的数据
|
||||
@@ -202,7 +186,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
infoDiffList.add(infoDiff);
|
||||
contentLog = dummyInventoryBaseEOService.setContentInfo(null,null,infoDiffList,null,null,contentLog);
|
||||
|
||||
updateLog(contentLog, dummyInventoryInfoEO.getDummyInventoryBaseId());
|
||||
dummyLogEOService.updateLog(contentLog, dummyInventoryInfoEO.getDummyInventoryBaseId());
|
||||
|
||||
}
|
||||
|
||||
@@ -251,7 +235,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
String projectId = dummyInventoryInfoEOList.get(0).getDummyInventoryBaseId();
|
||||
String serialNumber = dummyInventoryInfoEOList.stream().map(e->e.getSerialNumber()).collect(Collectors.joining(","));
|
||||
String contentLog = username+"删除了清单中的\""+serialNumber+"\"标准";
|
||||
updateLog(contentLog, projectId);
|
||||
dummyLogEOService.updateLog(contentLog, projectId);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -304,7 +288,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
String projectId = dummyInventoryInfoEOList.get(0).getDummyInventoryBaseId();
|
||||
String serialNumber = dummyInventoryInfoEOList.stream().map(e->e.getSerialNumber()).collect(Collectors.joining(","));
|
||||
String contentLog = username+"复制了\""+serialNumber+"\"";
|
||||
updateLog(contentLog, projectId);
|
||||
dummyLogEOService.updateLog(contentLog, projectId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -427,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());
|
||||
@@ -439,7 +423,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
this.updateBatchById(dummyInventoryInfoEOList);
|
||||
|
||||
contentLog = contentLogBuilder.substring(0, contentLogBuilder.length() - 1);
|
||||
updateLog(contentLog, projectId);
|
||||
dummyLogEOService.updateLog(contentLog, projectId);
|
||||
}
|
||||
}
|
||||
public StringBuilder setUpdateContentLog(StringBuilder contentLogBuilder,String fieldName,String oldValue,String newValue){
|
||||
@@ -605,7 +589,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
*/
|
||||
private void treeDict(DummyInventoryInfoEO dummyInventoryInfoEO, List<DummyInventoryInfoEO> dummyInventoryInfoEOList) {
|
||||
Set<String> technologyTerritorySet = new HashSet<>();
|
||||
// Set<String> correspondingStandardSet = new HashSet<>();
|
||||
Set<String> correspondingStandardSet = new HashSet<>();
|
||||
List<String> deliverableList = new ArrayList<>();
|
||||
if(dummyInventoryInfoEOList.size() != 0){
|
||||
for (DummyInventoryInfoEO record : dummyInventoryInfoEOList) {
|
||||
@@ -1209,8 +1193,8 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
String serialNumber = serialNumberBuilder.substring(0, serialNumberBuilder.length() - 1);
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String username = sysUser.getUsername();
|
||||
String contentLog = username+"向清单中添加了标准\""+serialNumber+"\"";
|
||||
updateLog(contentLog, dataList.get(0).getDummyInventoryBaseId());
|
||||
String contentLog = username+"向清单中导入了\""+serialNumber+"\"标准";
|
||||
dummyLogEOService.updateLog(contentLog, dataList.get(0).getDummyInventoryBaseId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+20
-2
@@ -1,12 +1,16 @@
|
||||
package com.jero.modules.dummy.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.dummy.entity.DummyLogEO;
|
||||
import com.jero.modules.dummy.mapper.DummyLogEOMapper;
|
||||
import com.jero.modules.dummy.service.IDummyLogEOService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 虚拟清单log表
|
||||
@@ -16,6 +20,20 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
*/
|
||||
@Service
|
||||
public class DummyLogEOServiceImpl extends ServiceImpl<DummyLogEOMapper, DummyLogEO> implements IDummyLogEOService {
|
||||
/**
|
||||
* 设置更新log
|
||||
*
|
||||
*/
|
||||
public 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());
|
||||
add(dummyLogEO);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
|
||||
@@ -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 {
|
||||
//
|
||||
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package com.jero.modules.project.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryLogEO;
|
||||
import com.jero.modules.project.service.IProjectLawsInventoryLogEOService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 项目库-法规清单更新log表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-05-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="项目库-法规清单更新log表")
|
||||
@RestController
|
||||
@RequestMapping("/project/projectLawsInventoryLogEO")
|
||||
@Slf4j
|
||||
public class ProjectLawsInventoryLogEOController extends JeroController<ProjectLawsInventoryLogEO, IProjectLawsInventoryLogEOService> {
|
||||
@Autowired
|
||||
private IProjectLawsInventoryLogEOService projectLawsInventoryLogEOService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param projectLawsInventoryLogEO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单更新log表-分页列表查询")
|
||||
@ApiOperation(value="项目库-法规清单更新log表-分页列表查询", notes="项目库-法规清单更新log表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(ProjectLawsInventoryLogEO projectLawsInventoryLogEO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProjectLawsInventoryLogEO> queryWrapper = QueryGenerator.initQueryWrapper(projectLawsInventoryLogEO, req.getParameterMap());
|
||||
Page<ProjectLawsInventoryLogEO> page = new Page<ProjectLawsInventoryLogEO>(pageNo, pageSize);
|
||||
IPage<ProjectLawsInventoryLogEO> pageList = projectLawsInventoryLogEOService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单更新log表-列表查询")
|
||||
@ApiOperation(value="项目库-法规清单更新log表-列表查询", notes="项目库-法规清单更新log表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProjectLawsInventoryLogEO>> queryList() {
|
||||
List<ProjectLawsInventoryLogEO> list = projectLawsInventoryLogEOService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param projectLawsInventoryLogEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单更新log表-添加")
|
||||
@ApiOperation(value="项目库-法规清单更新log表-添加", notes="项目库-法规清单更新log表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody ProjectLawsInventoryLogEO projectLawsInventoryLogEO) {
|
||||
projectLawsInventoryLogEOService.add(projectLawsInventoryLogEO);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param projectLawsInventoryLogEO
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单更新log表-编辑")
|
||||
@ApiOperation(value="项目库-法规清单更新log表-编辑", notes="项目库-法规清单更新log表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody ProjectLawsInventoryLogEO projectLawsInventoryLogEO) {
|
||||
projectLawsInventoryLogEOService.editById(projectLawsInventoryLogEO);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单更新log表-通过id删除")
|
||||
@ApiOperation(value="项目库-法规清单更新log表-通过id删除", notes="项目库-法规清单更新log表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
projectLawsInventoryLogEOService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单更新log表-批量删除")
|
||||
@ApiOperation(value="项目库-法规清单更新log表-批量删除", notes="项目库-法规清单更新log表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.projectLawsInventoryLogEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单更新log表-通过id查询")
|
||||
@ApiOperation(value="项目库-法规清单更新log表-通过id查询", notes="项目库-法规清单更新log表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ProjectLawsInventoryLogEO projectLawsInventoryLogEO = projectLawsInventoryLogEOService.queryById(id);
|
||||
if(projectLawsInventoryLogEO==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(projectLawsInventoryLogEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param projectLawsInventoryLogEO
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ProjectLawsInventoryLogEO projectLawsInventoryLogEO) {
|
||||
return super.exportXls(request, projectLawsInventoryLogEO, ProjectLawsInventoryLogEO.class, "项目库-法规清单更新log表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProjectLawsInventoryLogEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
+16
-8
@@ -1,18 +1,21 @@
|
||||
package com.jero.modules.project.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
@@ -230,6 +233,8 @@ public class ProjectLawsInventoryEO implements Serializable {
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "设计符合性确认-截止时间")
|
||||
private Date designDueDate;
|
||||
@TableField(exist = false)
|
||||
private String designDueDateString;
|
||||
|
||||
/**prehomo确认-交付物类型*/
|
||||
@Excel(name = "prehomo确认-交付物类型", width = 20,dicCode ="deliverable_template")
|
||||
@@ -280,6 +285,8 @@ public class ProjectLawsInventoryEO implements Serializable {
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "prehomo确认-截止时间")
|
||||
private Date prehomoDueDate;
|
||||
@TableField(exist = false)
|
||||
private String prehomoDueDateString;
|
||||
|
||||
/**验证符合性确认-交付物类型*/
|
||||
@Excel(name = "验证符合性确认-交付物类型", width = 20,dicCode ="deliverable_template")
|
||||
@@ -330,7 +337,8 @@ public class ProjectLawsInventoryEO implements Serializable {
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "验证符合性确认-截止时间")
|
||||
private Date verifyDueDate;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String verifyDueDateString;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "角色代码")
|
||||
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
package com.jero.modules.project.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 项目库-法规清单更新log表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-05-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("project_laws_inventory_log")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="project_laws_inventory_log对象", description="项目库-法规清单更新log表")
|
||||
public class ProjectLawsInventoryLogEO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
|
||||
/**法规清单表id*/
|
||||
@Excel(name = "法规清单表id", width = 15)
|
||||
@ApiModelProperty(value = "法规清单表id")
|
||||
private String projectLibraryId;
|
||||
|
||||
/**log内容*/
|
||||
@Excel(name = "log内容", width = 15)
|
||||
@ApiModelProperty(value = "log内容")
|
||||
private String logContent;
|
||||
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.jero.modules.project.enums;
|
||||
|
||||
public enum ProjectInventoryFieldEnum {
|
||||
TECHNOLOGY_TERRITORY("技术领域","technology_territory"),
|
||||
DUTY_TERRITORY("责任领域","duty_territory"),
|
||||
IMPLEMENT_TYPE("实施类别","implement_type"),
|
||||
ATTESTATION_TYPE("认证类型","attestation_type"),
|
||||
ATTESTATION_RANK("认证级别","attestation_rank"),
|
||||
|
||||
DESIGN_DUE_DATE("设计符合性确认-截止时间","designDueDate"),
|
||||
PREHOMO_DUE_DATE("Pre-Homo确认-截止时间","prehomoDueDate"),
|
||||
VERIFY_DUE_DATE("验证符合性确认-截止时间","verifyDueDate"),
|
||||
|
||||
;
|
||||
String name;
|
||||
String value;
|
||||
|
||||
ProjectInventoryFieldEnum(String name, String value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.jero.modules.project.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryLogEO;
|
||||
|
||||
/**
|
||||
* @Description: 项目库-法规清单更新log表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-05-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ProjectLawsInventoryLogEOMapper extends BaseMapper<ProjectLawsInventoryLogEO> {
|
||||
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.project.mapper.ProjectLawsInventoryLogEOMapper">
|
||||
<resultMap id="ProjectLawsInventoryLogEOResultMap" type="com.jero.modules.project.entity.ProjectLawsInventoryLogEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="sys_org_code" property="sysOrgCode" />
|
||||
<result column="project_library_id" property="projectLibraryId" />
|
||||
<result column="log_content" property="logContent" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.jero.modules.project.service;
|
||||
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryLogEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 项目库-法规清单更新log表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-05-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IProjectLawsInventoryLogEOService extends IService<ProjectLawsInventoryLogEO> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param projectLawsInventoryLogEO
|
||||
* @return
|
||||
*/
|
||||
void add(ProjectLawsInventoryLogEO projectLawsInventoryLogEO);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param projectLawsInventoryLogEO
|
||||
* @return
|
||||
*/
|
||||
void editById(ProjectLawsInventoryLogEO projectLawsInventoryLogEO);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ProjectLawsInventoryLogEO queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<ProjectLawsInventoryLogEO> queryList();
|
||||
}
|
||||
+217
-35
@@ -1,6 +1,9 @@
|
||||
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;
|
||||
@@ -21,25 +24,23 @@ 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.service.IDummyInventoryInfoEOService;
|
||||
import com.jero.modules.dummy.service.impl.DummyInventoryBaseEOServiceImpl;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.message.websocket.WebSocket;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.project.entity.*;
|
||||
import com.jero.modules.project.enums.InventoryAffirmStatusEnum;
|
||||
import com.jero.modules.project.enums.MsgTypeEnum;
|
||||
import com.jero.modules.project.enums.OperatorResultEnum;
|
||||
import com.jero.modules.project.enums.OperatorTypeEnum;
|
||||
import com.jero.modules.project.enums.ProjectRoleEnum;
|
||||
import com.jero.modules.project.enums.RequestSourceEnum;
|
||||
import com.jero.modules.project.enums.TaskAffirmStatusEnum;
|
||||
import com.jero.modules.project.mapper.*;
|
||||
import com.jero.modules.project.enums.*;
|
||||
import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper;
|
||||
import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
|
||||
import com.jero.modules.project.mapper.ProjectNameInfoEOMapper;
|
||||
import com.jero.modules.project.mapper.ProjectRelatedPersonnelMapper;
|
||||
import com.jero.modules.project.service.*;
|
||||
import com.jero.modules.split.common.FileUnZip;
|
||||
import com.jero.modules.system.entity.SysAnnouncement;
|
||||
import com.jero.modules.system.entity.SysCategory;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.mapper.SysDictItemMapper;
|
||||
import com.jero.modules.system.mapper.SysUserMapper;
|
||||
import com.jero.modules.system.service.ISysAnnouncementService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
@@ -50,19 +51,8 @@ import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.hssf.usermodel.HSSFCell;
|
||||
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
|
||||
import org.apache.poi.hssf.usermodel.HSSFDateUtil;
|
||||
import org.apache.poi.hssf.usermodel.HSSFRichTextString;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.ss.usermodel.VerticalAlignment;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.ss.usermodel.WorkbookFactory;
|
||||
import org.apache.poi.hssf.usermodel.*;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
@@ -80,21 +70,10 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.*;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl.copyFile;
|
||||
@@ -159,6 +138,15 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
@Autowired
|
||||
private IProjectRelatedPersonnelService iProjectRelatedPersonnelService;
|
||||
|
||||
@Autowired
|
||||
private ProjectLawsInventoryLogEOServiceImpl projectLawsInventoryLogEOService;
|
||||
|
||||
@Autowired
|
||||
private DummyInventoryBaseEOServiceImpl dummyInventoryBaseEOService;
|
||||
|
||||
@Autowired
|
||||
private SysDictItemMapper sysDictItemMapper;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -227,6 +215,15 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
projectTaskInventoryEO.setProjectLawsInventoryId(lawsInventory.getId());
|
||||
projectTaskInventoryEOList.add(projectTaskInventoryEO);
|
||||
});
|
||||
|
||||
//更新log
|
||||
String projectLibraryId = projectLawsInventoryEOS.stream().map(e->e.getProjectLibraryId()).collect(Collectors.toList()).get(0);
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String username = sysUser.getUsername();
|
||||
QueryWrapper<DummyInventoryBaseEO> queryWrapper = new QueryWrapper<>();
|
||||
String dummyInventoryBaseName = dummyInventoryBaseEOService.list(queryWrapper.eq("id", dummyInventoryBaseId)).get(0).getName();//name
|
||||
String contentLog = username+"调取了\""+ dummyInventoryBaseName +"\"虚拟清单的标准内容";
|
||||
projectLawsInventoryLogEOService.updateLog(contentLog, projectLibraryId);
|
||||
}
|
||||
}else if(dummyInventoryInfoEOList.size() == 0 && StringUtils.isBlank(projectLawsInventoryEO.getFlag())){
|
||||
//flag为二次确认标识,flag为空时进行验证
|
||||
@@ -286,6 +283,13 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
projectTaskInventoryEOList.add(projectTaskInventoryEO);
|
||||
}
|
||||
super.saveBatch(list);
|
||||
|
||||
//更新log
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String username = sysUser.getUsername();
|
||||
String serialNumber = list.stream().map(e->e.getSerialNumber()).collect(Collectors.joining(","));
|
||||
String contentLog = username+"向清单中添加了标准\""+serialNumber+"\"";
|
||||
projectLawsInventoryLogEOService.updateLog(contentLog, projectLawsInventoryEO.getProjectLibraryId());
|
||||
}
|
||||
//项目任务清单数据初始化。
|
||||
this.projectTaskInventoryEOService.saveBatch(projectTaskInventoryEOList);
|
||||
@@ -327,6 +331,15 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
throw new JeroBootException("The user has no deletion permission");
|
||||
}
|
||||
}
|
||||
|
||||
//更新log
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String username = sysUser.getUsername();
|
||||
QueryWrapper<ProjectLawsInventoryEO> queryWrapper = new QueryWrapper<>();
|
||||
String serialNumber = list(queryWrapper.eq("id",id)).get(0).getSerialNumber();
|
||||
String contentLog = username+"删除了清单中的\""+serialNumber+"\"标准";
|
||||
projectLawsInventoryLogEOService.updateLog(contentLog, projectLibraryId);
|
||||
|
||||
removeById(id);
|
||||
this.projectTaskInventoryEOService.deleteByProjectLawsInventoryIds(Arrays.asList(id.split(",")));
|
||||
}
|
||||
@@ -348,6 +361,16 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
throw new JeroBootException("The user has no deletion permission");
|
||||
}
|
||||
}
|
||||
|
||||
//更新log
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String username = sysUser.getUsername();
|
||||
QueryWrapper<ProjectLawsInventoryEO> queryWrapper = new QueryWrapper<>();
|
||||
List<ProjectLawsInventoryEO> lawsList = list(queryWrapper.in("id", ids));
|
||||
String serialNumber = lawsList.stream().map(e->e.getSerialNumber()).collect(Collectors.joining(","));
|
||||
String contentLog = username+"删除了清单中的\""+serialNumber+"\"标准";
|
||||
projectLawsInventoryLogEOService.updateLog(contentLog, projectLibraryId);
|
||||
|
||||
removeByIds(ids);
|
||||
this.projectTaskInventoryEOService.deleteByProjectLawsInventoryIds(ids);
|
||||
}
|
||||
@@ -1044,6 +1067,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
}else {
|
||||
throw new JeroBootException("当前操作用户不是该项目的studio工程师,没有权限操作!");
|
||||
}
|
||||
|
||||
//更新log
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String username = sysUser.getUsername();
|
||||
String contentLog = username+"带入了相关人员名单信息";
|
||||
projectLawsInventoryLogEOService.updateLog(contentLog, projectLibraryId);
|
||||
return new Result<>().success("带入成功!");
|
||||
}
|
||||
|
||||
@@ -1242,6 +1271,14 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
projectLawsInventoryEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||
}
|
||||
this.saveBatch(projectLawsInventoryEOList);
|
||||
|
||||
//更新log
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String username = sysUser.getUsername();
|
||||
String projectLibraryId = projectLawsInventoryEOList.get(0).getProjectLibraryId();
|
||||
String serialNumber = projectLawsInventoryEOList.stream().map(e->e.getSerialNumber()).collect(Collectors.joining(","));
|
||||
String contentLog = username+"复制了\""+serialNumber+"\"";
|
||||
projectLawsInventoryLogEOService.updateLog(contentLog, projectLibraryId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1249,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())){
|
||||
@@ -1284,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){
|
||||
//编号
|
||||
@@ -2211,6 +2386,13 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
projectTaskInventoryEOList.add(projectTaskInventoryEO);
|
||||
}
|
||||
this.projectTaskInventoryEOService.saveBatch(projectTaskInventoryEOList);
|
||||
|
||||
//更新log
|
||||
String serialNumber = dataList.stream().map(e->e.getSerialNumber()).collect(Collectors.joining(","));
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String username = sysUser.getUsername();
|
||||
String contentLog = username+"向清单中导入了\""+serialNumber+"\"标准";
|
||||
projectLawsInventoryLogEOService.updateLog(contentLog, dataList.get(0).getProjectLibraryId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
package com.jero.modules.project.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryLogEO;
|
||||
import com.jero.modules.project.mapper.ProjectLawsInventoryLogEOMapper;
|
||||
import com.jero.modules.project.service.IProjectLawsInventoryLogEOService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 项目库-法规清单更新log表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-05-17
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ProjectLawsInventoryLogEOServiceImpl extends ServiceImpl<ProjectLawsInventoryLogEOMapper, ProjectLawsInventoryLogEO> implements IProjectLawsInventoryLogEOService {
|
||||
/**
|
||||
* 设置更新log
|
||||
*
|
||||
*/
|
||||
public void updateLog(String contentLog,String projectLibraryId) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
if (StringUtils.isNotBlank(contentLog)) {
|
||||
ProjectLawsInventoryLogEO projectLawsInventoryLogEO = new ProjectLawsInventoryLogEO();
|
||||
projectLawsInventoryLogEO.setProjectLibraryId(projectLibraryId);
|
||||
projectLawsInventoryLogEO.setLogContent(contentLog);
|
||||
projectLawsInventoryLogEO.setCreateBy(sysUser.getUsername());
|
||||
add(projectLawsInventoryLogEO);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param projectLawsInventoryLogEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(ProjectLawsInventoryLogEO projectLawsInventoryLogEO) {
|
||||
Date now = new Date();
|
||||
projectLawsInventoryLogEO.setCreateTime(now);
|
||||
projectLawsInventoryLogEO.setUpdateTime(now);
|
||||
save(projectLawsInventoryLogEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param projectLawsInventoryLogEO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(ProjectLawsInventoryLogEO projectLawsInventoryLogEO) {
|
||||
Date now = new Date();
|
||||
projectLawsInventoryLogEO.setUpdateTime(now);
|
||||
saveOrUpdate(projectLawsInventoryLogEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProjectLawsInventoryLogEO queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProjectLawsInventoryLogEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user