Merge remote-tracking branch 'origin/master'
This commit is contained in:
+4
@@ -106,6 +106,8 @@ public class DummyInventoryInfoEO implements Serializable {
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private java.util.Date xin1Che1Xing2Shi2Shi1Ri4Qi1;
|
||||
@TableField(exist = false)
|
||||
private String xin1Che1Xing2Shi2Shi1Ri4Qi1String;
|
||||
|
||||
/**在产车实施日期*/
|
||||
@Excel(name = "在产车实施日期", width = 15,format = "yyyy-MM-dd")
|
||||
@@ -113,6 +115,8 @@ public class DummyInventoryInfoEO implements Serializable {
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private java.util.Date implementTime;
|
||||
@TableField(exist = false)
|
||||
private String implementTimeString;
|
||||
|
||||
/**对应标准*/
|
||||
@Excel(name = "对应标准", width = 15)
|
||||
|
||||
+79
-109
@@ -13,13 +13,19 @@ import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
|
||||
import com.jero.modules.domain.service.DomainUserRelService;
|
||||
import com.jero.modules.dummy.entity.*;
|
||||
import com.jero.modules.dummy.entity.DummyContentChangeEO;
|
||||
import com.jero.modules.dummy.entity.DummyInventoryBaseEO;
|
||||
import com.jero.modules.dummy.entity.DummyInventoryInfoEO;
|
||||
import com.jero.modules.dummy.entity.DummyReadEO;
|
||||
import com.jero.modules.dummy.enums.DummyInventoryBaseFieldEnum;
|
||||
import com.jero.modules.dummy.enums.InventoryStateEnum;
|
||||
import com.jero.modules.dummy.enums.ReadFlagEnum;
|
||||
import com.jero.modules.dummy.mapper.DummyContentChangeEOMapper;
|
||||
import com.jero.modules.dummy.mapper.DummyInventoryBaseEOMapper;
|
||||
import com.jero.modules.dummy.service.*;
|
||||
import com.jero.modules.dummy.service.IDummyContentChangeEOService;
|
||||
import com.jero.modules.dummy.service.IDummyInventoryBaseEOService;
|
||||
import com.jero.modules.dummy.service.IDummyInventoryInfoEOService;
|
||||
import com.jero.modules.dummy.service.IDummyReadEOService;
|
||||
import com.jero.modules.dummy.util.ListDiff;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.system.entity.SysAnnouncement;
|
||||
@@ -40,6 +46,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -78,8 +85,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
private SysDictItemMapper sysDictItemMapper;
|
||||
@Autowired
|
||||
private DummyContentChangeEOMapper dummyContentChangeEOMapper;
|
||||
@Autowired
|
||||
private IDummyLogEOService dummyLogEOService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -321,21 +327,20 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
List<String> sameSerialNumberList = infoCJBaseSerialNumberList.stream().filter(t -> dummyInventoryInfoEOSerialNumberList.contains(t)).collect(Collectors.toList());
|
||||
|
||||
if(CollectionUtils.isNotEmpty(sameSerialNumberList)) {
|
||||
|
||||
for (String sameSerialNumber : sameSerialNumberList) {
|
||||
//查询传入里包含共有编号的数据
|
||||
for(DummyInventoryInfoEO dummyInventoryInfoEO :dummyInventoryInfoEOList){
|
||||
if (dummyInventoryInfoEO.getSerialNumber().equals(sameSerialNumber)) {
|
||||
sameDummyInventoryInfoEOList.add(dummyInventoryInfoEO);
|
||||
}
|
||||
}
|
||||
|
||||
DummyInventoryInfoEO sameInfoEO = dummyInventoryInfoEOList.stream().filter(e->e.getSerialNumber().equals(sameSerialNumber)).collect(Collectors.toList()).get(0);
|
||||
sameDummyInventoryInfoEOList.add(sameInfoEO);
|
||||
//查询数据库里包含共有编号的数据
|
||||
for (DummyInventoryInfoEO midInfoCJ : infoCJList) {
|
||||
if (midInfoCJ.getSerialNumber().equals(sameSerialNumber)) {
|
||||
sameinfoCJList.add(midInfoCJ);
|
||||
}
|
||||
}
|
||||
DummyInventoryInfoEO sameInfoCJ = infoCJList.stream().filter(e -> e.getSerialNumber().equals(sameSerialNumber)).collect(Collectors.toList()).get(0);
|
||||
sameinfoCJList.add(sameInfoCJ);
|
||||
}
|
||||
/* for (String sameSerialNumber : sameSerialNumberList) {
|
||||
//查询数据库里包含共有编号的数据
|
||||
DummyInventoryInfoEO sameInfoCJ = infoCJList.stream().filter(e -> e.getSerialNumber().equals(sameSerialNumber)).collect(Collectors.toList()).get(0);
|
||||
sameinfoCJList.add(sameInfoCJ);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -345,11 +350,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
List<Map<String, String>> infoDiffList=new ArrayList<>();
|
||||
|
||||
for (int i = 0; i < sameinfoCJList.size(); i++) {
|
||||
try {//!!!
|
||||
infoDiff = ListDiff.compareObject(sameinfoCJList.get(i), sameDummyInventoryInfoEOList.get(i));
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (MapUtils.isNotEmpty(infoDiff)) {
|
||||
if(infoDiff.size() > 1) {
|
||||
infoDiffList.add(infoDiff);
|
||||
@@ -429,21 +430,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置更新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);
|
||||
}
|
||||
}
|
||||
|
||||
public void disposeData(List<DummyInventoryInfoEO> records) {
|
||||
Set<String> technologyTerritorySet = new HashSet<>();
|
||||
for (DummyInventoryInfoEO dummyInventoryInfoEO : records) {
|
||||
@@ -466,11 +452,7 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
for (String technologyTerritory : technologyTerritoryList) {
|
||||
List<SysCategory> collect = categoryList.stream().filter(e -> technologyTerritory.equals(e.getId())).collect(Collectors.toList());
|
||||
if (collect.size() != 0) {
|
||||
// if (CutEnum.CN.getValue().equals(dummyInventoryInfoEO.getCut())) {
|
||||
sb.append(collect.get(0).getName() + ",");
|
||||
// } else {
|
||||
// sb.append(collect.get(0).getEnName()+ ",");
|
||||
// }
|
||||
}
|
||||
}
|
||||
String technologyTerritoryName = null;
|
||||
@@ -478,6 +460,8 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
technologyTerritoryName = sb.substring(0, sb.length() - 1);
|
||||
}
|
||||
dummyInventoryInfoEO.setTechnologyTerritoryName(technologyTerritoryName);
|
||||
}else{
|
||||
dummyInventoryInfoEO.setTechnologyTerritoryName("空");
|
||||
}
|
||||
|
||||
//适用范围
|
||||
@@ -490,6 +474,8 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
shi4Yong4Fan4Wei2Builder.append(shi4Yong4Fan4Wei2Name).append(",");
|
||||
}
|
||||
dummyInventoryInfoEO.setShi4Yong4Fan4Wei2(shi4Yong4Fan4Wei2Builder.substring(0, shi4Yong4Fan4Wei2Builder.toString().length() - 1));
|
||||
}else{
|
||||
dummyInventoryInfoEO.setShi4Yong4Fan4Wei2("空");
|
||||
}
|
||||
//适用地区
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getRegion())) {
|
||||
@@ -501,6 +487,8 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
regionBuilder.append(regionName).append(",");
|
||||
}
|
||||
dummyInventoryInfoEO.setRegion(regionBuilder.substring(0, regionBuilder.toString().length() - 1));
|
||||
}else {
|
||||
dummyInventoryInfoEO.setRegion("空");
|
||||
}
|
||||
//责任领域
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getDutyTerritory())) {
|
||||
@@ -513,40 +501,73 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
}
|
||||
dummyInventoryInfoEO.setDutyTerritory(dutyTerritoryBuilder.substring(0, dutyTerritoryBuilder.toString().length() - 1));
|
||||
}
|
||||
else {
|
||||
dummyInventoryInfoEO.setDutyTerritory("空");
|
||||
}
|
||||
//实施类别
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getImplementType())) {
|
||||
List<SysDictItem> implementType = sysDictItemMapper.selectItemsByDictCode(DummyInventoryBaseFieldEnum.IMPLEMENT_TYPE.getValue());
|
||||
String implementTypeName = implementType.stream().filter(e -> e.getItemValue().equals(dummyInventoryInfoEO.getImplementType())).map(f -> f.getItemText()).collect(Collectors.joining(","));
|
||||
dummyInventoryInfoEO.setImplementType(implementTypeName);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setImplementType("空");
|
||||
}
|
||||
//认证级别
|
||||
//认证类型
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getAttestationType())) {
|
||||
List<SysDictItem> attestationType = sysDictItemMapper.selectItemsByDictCode(DummyInventoryBaseFieldEnum.ATTESTATION_TYPE.getValue());
|
||||
String attestationTypeName = attestationType.stream().filter(e -> e.getItemValue().equals(dummyInventoryInfoEO.getAttestationType())).map(f -> f.getItemText()).collect(Collectors.joining(","));
|
||||
dummyInventoryInfoEO.setAttestationType(attestationTypeName);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setAttestationType("空");
|
||||
}
|
||||
//认证级别
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getAttestationRank())) {
|
||||
List<SysDictItem> attestationRank = sysDictItemMapper.selectItemsByDictCode(DummyInventoryBaseFieldEnum.ATTESTATION_RANK.getValue());
|
||||
String attestationRankName = attestationRank.stream().filter(e -> e.getItemValue().equals(dummyInventoryInfoEO.getAttestationRank())).map(f -> f.getItemText()).collect(Collectors.joining(","));
|
||||
dummyInventoryInfoEO.setAttestationRank(attestationRankName);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setAttestationRank("空");
|
||||
}
|
||||
//新车型实施日期
|
||||
if (dummyInventoryInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1() != null) {
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
|
||||
String dateString = sdf.format(dummyInventoryInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1());
|
||||
dummyInventoryInfoEO.setXin1Che1Xing2Shi2Shi1Ri4Qi1String(dateString);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setXin1Che1Xing2Shi2Shi1Ri4Qi1String("空");
|
||||
}
|
||||
//在产车实施日期
|
||||
if (dummyInventoryInfoEO.getImplementTime() != null) {
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
|
||||
String dateString = sdf.format(dummyInventoryInfoEO.getImplementTime());
|
||||
dummyInventoryInfoEO.setImplementTimeString(dateString);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setImplementTimeString("空");
|
||||
}
|
||||
|
||||
|
||||
//交付物类型
|
||||
List<SysDictItem> deliverableTemplate = sysDictItemMapper.selectItemsByDictCode(DummyInventoryBaseFieldEnum.DELIVERABLE_TEMPLATE.getValue());
|
||||
//设计符合性确认-交付物类型
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getDesignDeliverableType())) {
|
||||
String designDeliverableTypeName = deliverableTemplate.stream().filter(e -> e.getItemValue().equals(dummyInventoryInfoEO.getDesignDeliverableType())).map(f -> f.getItemText()).collect(Collectors.joining(","));
|
||||
dummyInventoryInfoEO.setDesignDeliverableType(designDeliverableTypeName);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setDesignDeliverableType("空");
|
||||
}
|
||||
//prehomo确认-交付物类型
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getPrehomoDeliverableType())) {
|
||||
String prehomoDeliverableTypeName = deliverableTemplate.stream().filter(e -> e.getItemValue().equals(dummyInventoryInfoEO.getPrehomoDeliverableType())).map(f -> f.getItemText()).collect(Collectors.joining(","));
|
||||
dummyInventoryInfoEO.setPrehomoDeliverableType(prehomoDeliverableTypeName);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setPrehomoDeliverableType("空");
|
||||
}
|
||||
//验证符合性确认-交付物类型
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getVerifyDeliverableType())) {
|
||||
String verifyDeliverableTypeName = deliverableTemplate.stream().filter(e -> e.getItemValue().equals(dummyInventoryInfoEO.getVerifyDeliverableType())).map(f -> f.getItemText()).collect(Collectors.joining(","));
|
||||
dummyInventoryInfoEO.setVerifyDeliverableType(verifyDeliverableTypeName);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setVerifyDeliverableType("空");
|
||||
}
|
||||
|
||||
//发起人
|
||||
@@ -555,16 +576,22 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getDesignInitiator())) {
|
||||
String designInitiatorName = fa1_qi3_ren2.stream().filter(e -> e.getItemValue().equals(dummyInventoryInfoEO.getDesignInitiator())).map(f -> f.getItemText()).collect(Collectors.joining(","));
|
||||
dummyInventoryInfoEO.setDesignInitiator(designInitiatorName);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setDesignInitiator("空");
|
||||
}
|
||||
//prehomo确认-发起人
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getPrehomoInitiator())) {
|
||||
String prehomoInitiatorName = fa1_qi3_ren2.stream().filter(e -> e.getItemValue().equals(dummyInventoryInfoEO.getPrehomoInitiator())).map(f -> f.getItemText()).collect(Collectors.joining(","));
|
||||
dummyInventoryInfoEO.setPrehomoInitiator(prehomoInitiatorName);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setPrehomoInitiator("空");
|
||||
}
|
||||
//验证符合性确认-发起人
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getVerifyInitiator())) {
|
||||
String verifyInitiatorName = fa1_qi3_ren2.stream().filter(e -> e.getItemValue().equals(dummyInventoryInfoEO.getVerifyInitiator())).map(f -> f.getItemText()).collect(Collectors.joining(","));
|
||||
dummyInventoryInfoEO.setVerifyInitiator(verifyInitiatorName);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setVerifyInitiator("空");
|
||||
}
|
||||
|
||||
//责任人
|
||||
@@ -573,16 +600,22 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getDesignDuty())) {
|
||||
String designDutyName = ze2_ren4_ren2.stream().filter(e -> e.getItemValue().equals(dummyInventoryInfoEO.getDesignDuty())).map(f -> f.getItemText()).collect(Collectors.joining(","));
|
||||
dummyInventoryInfoEO.setDesignDuty(designDutyName);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setDesignDuty("空");
|
||||
}
|
||||
//prehomo确认-责任人
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getPrehomoDuty())) {
|
||||
String prehomoDutyName = ze2_ren4_ren2.stream().filter(e -> e.getItemValue().equals(dummyInventoryInfoEO.getPrehomoDuty())).map(f -> f.getItemText()).collect(Collectors.joining(","));
|
||||
dummyInventoryInfoEO.setPrehomoDuty(prehomoDutyName);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setPrehomoDuty("空");
|
||||
}
|
||||
//验证符合性确认-责任人
|
||||
if (StringUtils.isNotBlank(dummyInventoryInfoEO.getVerifyDuty())) {
|
||||
String verifyDutyName = ze2_ren4_ren2.stream().filter(e -> e.getItemValue().equals(dummyInventoryInfoEO.getVerifyDuty())).map(f -> f.getItemText()).collect(Collectors.joining(","));
|
||||
dummyInventoryInfoEO.setVerifyDuty(verifyDutyName);
|
||||
}else {
|
||||
dummyInventoryInfoEO.setVerifyDuty("空");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -681,31 +714,25 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffNew = list.get(1);//需要翻译
|
||||
contentInfo += "(" + infoDiffRow + "). Technology territory has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
//更新log
|
||||
contentLog = DummyInventoryBaseFieldEnum.TECHNOLOGY_TERRITORY.getName() + "由" + infoDiffOld + "改为" + infoDiffNew;
|
||||
updateLog(contentLog,idTemp);
|
||||
|
||||
}
|
||||
//新车型实施日期
|
||||
if (StringUtils.isNotBlank(infoDiff.get("xin1Che1Xing2Shi2Shi1Ri4Qi1"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("xin1Che1Xing2Shi2Shi1Ri4Qi1").split(","));
|
||||
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);//需要翻译
|
||||
contentInfo += "(" + infoDiffRow + "). The implementation date of new model has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
//更新log
|
||||
contentLog = DummyInventoryBaseFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getName() + "由" + infoDiffOld + "改为" + infoDiffNew;
|
||||
updateLog(contentLog,idTemp);
|
||||
|
||||
}
|
||||
//在产车实施日期
|
||||
if (StringUtils.isNotBlank(infoDiff.get("implementTime"))) {
|
||||
List<String> list = Arrays.asList(infoDiff.get("implementTime").split(","));
|
||||
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);//需要翻译
|
||||
contentInfo += "(" + infoDiffRow + "). Implement time has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
//更新log
|
||||
contentLog = DummyInventoryBaseFieldEnum.IMPLEMENT_TIME.getName() + "由" + infoDiffOld + "改为" + infoDiffNew;
|
||||
updateLog(contentLog,idTemp);
|
||||
|
||||
}
|
||||
//WVTA ID
|
||||
if (StringUtils.isNotBlank(infoDiff.get("wvtaId"))) {
|
||||
@@ -714,9 +741,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffNew = list.get(1);//需要翻译
|
||||
contentInfo += "(" + infoDiffRow + "). WVTA ID has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
//更新log
|
||||
contentLog = DummyInventoryBaseFieldEnum.WVTA_ID.getName() + "由" + infoDiffOld + "改为" + infoDiffNew;
|
||||
updateLog(contentLog,idTemp);
|
||||
}
|
||||
//子标题
|
||||
if (StringUtils.isNotBlank(infoDiff.get("subtitle"))) {
|
||||
@@ -725,9 +749,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffNew = list.get(1);//需要翻译
|
||||
contentInfo += "(" + infoDiffRow + "). Subtitle has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
//更新log
|
||||
contentLog = DummyInventoryBaseFieldEnum.SUBTITLE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew;
|
||||
updateLog(contentLog,idTemp);
|
||||
}
|
||||
//实施类别
|
||||
if (StringUtils.isNotBlank(infoDiff.get("implementType"))) {
|
||||
@@ -736,9 +757,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffNew = list.get(1);//需要翻译
|
||||
contentInfo += "(" + infoDiffRow + "). Implement type has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
//更新log
|
||||
contentLog = DummyInventoryBaseFieldEnum.IMPLEMENT_TYPE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew;
|
||||
updateLog(contentLog,idTemp);
|
||||
}
|
||||
//认证类型
|
||||
if (StringUtils.isNotBlank(infoDiff.get("attestationType"))) {
|
||||
@@ -747,9 +765,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffNew = list.get(1);//需要翻译
|
||||
contentInfo += "(" + infoDiffRow + "). Attestation type has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
//更新log
|
||||
contentLog = DummyInventoryBaseFieldEnum.ATTESTATION_TYPE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew;
|
||||
updateLog(contentLog,idTemp);
|
||||
}
|
||||
//认证级别
|
||||
if (StringUtils.isNotBlank(infoDiff.get("attestationRank"))) {
|
||||
@@ -758,9 +773,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffNew = list.get(1);//需要翻译
|
||||
contentInfo += "(" + infoDiffRow + "). Attestation rank has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
//更新log
|
||||
contentLog = DummyInventoryBaseFieldEnum.ATTESTATION_RANK.getName() + "由" + infoDiffOld + "改为" + infoDiffNew;
|
||||
updateLog(contentLog,idTemp);
|
||||
}
|
||||
//责任领域
|
||||
if (StringUtils.isNotBlank(infoDiff.get("dutyTerritory"))) {
|
||||
@@ -769,9 +781,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffNew = list.get(1);//需要翻译
|
||||
contentInfo += "(" + infoDiffRow + "). Duty territory has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
//更新log
|
||||
contentLog = DummyInventoryBaseFieldEnum.DUTY_TERRITORY.getName() + "由" + infoDiffOld + "改为" + infoDiffNew;
|
||||
updateLog(contentLog,idTemp);
|
||||
}
|
||||
//备注
|
||||
if (StringUtils.isNotBlank(infoDiff.get("remark"))) {
|
||||
@@ -780,9 +789,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffNew = list.get(1);
|
||||
contentInfo += "(" + infoDiffRow + "). Remark has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
//更新log
|
||||
contentLog = DummyInventoryBaseFieldEnum.REMARK.getName() + "由" + infoDiffOld + "改为" + infoDiffNew;
|
||||
updateLog(contentLog,idTemp);
|
||||
}
|
||||
//设计符合性确认-交付物类型
|
||||
if (StringUtils.isNotBlank(infoDiff.get("designDeliverableType"))) {
|
||||
@@ -791,9 +797,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffNew = list.get(1);//需要翻译
|
||||
contentInfo += "(" + infoDiffRow + "). Design deliverable type has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
//更新log
|
||||
contentLog = DummyInventoryBaseFieldEnum.DESIGN_DELIVERABLE_TYPE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew;
|
||||
updateLog(contentLog,idTemp);
|
||||
}
|
||||
//设计符合性确认-交付物模板
|
||||
if (StringUtils.isNotBlank(infoDiff.get("designDeliverableTemplate"))) {
|
||||
@@ -802,9 +805,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffNew = list.get(1);//需要翻译
|
||||
contentInfo += "(" + infoDiffRow + "). Design deliverable template has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
//更新log
|
||||
contentLog = DummyInventoryBaseFieldEnum.DESIGN_DELIVERABLE_TEMPLATE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew;
|
||||
updateLog(contentLog,idTemp);
|
||||
}
|
||||
//设计符合性确认-发起人
|
||||
if (StringUtils.isNotBlank(infoDiff.get("designInitiator"))) {
|
||||
@@ -813,9 +813,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffNew = list.get(1);//需要翻译
|
||||
contentInfo += "(" + infoDiffRow + "). Design initiator has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
//更新log
|
||||
contentLog = DummyInventoryBaseFieldEnum.DESIGN_INITIATOR.getName() + "由" + infoDiffOld + "改为" + infoDiffNew;
|
||||
updateLog(contentLog,idTemp);
|
||||
}
|
||||
//设计符合性确认-责任人
|
||||
if (StringUtils.isNotBlank(infoDiff.get("designDuty"))) {
|
||||
@@ -824,9 +821,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffNew = list.get(1);//需要翻译
|
||||
contentInfo += "(" + infoDiffRow + "). Design duty has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
//更新log
|
||||
contentLog = DummyInventoryBaseFieldEnum.DESIGN_DUTY.getName() + "由" + infoDiffOld + "改为" + infoDiffNew;
|
||||
updateLog(contentLog,idTemp);
|
||||
}
|
||||
//prehomo确认-交付物类型
|
||||
if (StringUtils.isNotBlank(infoDiff.get("prehomoDeliverableType"))) {
|
||||
@@ -835,9 +829,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffNew = list.get(1);//需要翻译
|
||||
contentInfo += "(" + infoDiffRow + "). Prehomo deliverable type has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
//更新log
|
||||
contentLog = DummyInventoryBaseFieldEnum.PREHOMO_DELIVERABLE_TYPE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew;
|
||||
updateLog(contentLog,idTemp);
|
||||
}
|
||||
//prehomo确认-交付物模板
|
||||
if (StringUtils.isNotBlank(infoDiff.get("prehomoDeliverableTemplate"))) {
|
||||
@@ -846,9 +837,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffNew = list.get(1);//需要翻译
|
||||
contentInfo += "(" + infoDiffRow + "). Prehomo deliverable template has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
//更新log
|
||||
contentLog = DummyInventoryBaseFieldEnum.PREHOMO_DELIVERABLE_TEMPLATE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew;
|
||||
updateLog(contentLog,idTemp);
|
||||
}
|
||||
//prehomo确认-发起人
|
||||
if (StringUtils.isNotBlank(infoDiff.get("prehomoInitiator"))) {
|
||||
@@ -857,9 +845,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffNew = list.get(1);//需要翻译
|
||||
contentInfo += "(" + infoDiffRow + "). Prehomo initiator has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
//更新log
|
||||
contentLog = DummyInventoryBaseFieldEnum.PREHOMO_INITIATOR.getName() + "由" + infoDiffOld + "改为" + infoDiffNew;
|
||||
updateLog(contentLog,idTemp);
|
||||
}
|
||||
//prehomo确认-责任人
|
||||
if (StringUtils.isNotBlank(infoDiff.get("prehomoDuty"))) {
|
||||
@@ -868,9 +853,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffNew = list.get(1);//需要翻译
|
||||
contentInfo += "(" + infoDiffRow + "). Prehomo duty has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
//更新log
|
||||
contentLog = DummyInventoryBaseFieldEnum.PREHOMO_DUTY.getName() + "由" + infoDiffOld + "改为" + infoDiffNew;
|
||||
updateLog(contentLog,idTemp);
|
||||
}
|
||||
//验证符合性确认-交付物类型
|
||||
if (StringUtils.isNotBlank(infoDiff.get("verifyDeliverableType"))) {
|
||||
@@ -879,9 +861,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffNew = list.get(1);//需要翻译
|
||||
contentInfo += "(" + infoDiffRow + "). Verify deliverable type has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
//更新log
|
||||
contentLog = DummyInventoryBaseFieldEnum.VERIFY_DELIVERABLE_TYPE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew;
|
||||
updateLog(contentLog,idTemp);
|
||||
}
|
||||
//验证符合性确认-交付物模板
|
||||
if (StringUtils.isNotBlank(infoDiff.get("verifyDeliverableTemplate"))) {
|
||||
@@ -890,9 +869,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffNew = list.get(1);//需要翻译
|
||||
contentInfo += "(" + infoDiffRow + "). Verify deliverable template has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
//更新log
|
||||
contentLog = DummyInventoryBaseFieldEnum.VERIFY_DELIVERABLE_TEMPLATE.getName() + "由" + infoDiffOld + "改为" + infoDiffNew;
|
||||
updateLog(contentLog,idTemp);
|
||||
}
|
||||
//验证符合性确认-发起人
|
||||
if (StringUtils.isNotBlank(infoDiff.get("verifyInitiator"))) {
|
||||
@@ -901,9 +877,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffNew = list.get(1);//需要翻译
|
||||
contentInfo += "(" + infoDiffRow + "). Verify initiator has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
//更新log
|
||||
contentLog = DummyInventoryBaseFieldEnum.VERIFY_INITIATOR.getName() + "由" + infoDiffOld + "改为" + infoDiffNew;
|
||||
updateLog(contentLog,idTemp);
|
||||
}
|
||||
//验证符合性确认-责任人
|
||||
if (StringUtils.isNotBlank(infoDiff.get("verifyDuty"))) {
|
||||
@@ -912,9 +885,6 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String infoDiffNew = list.get(1);//需要翻译
|
||||
contentInfo += "(" + infoDiffRow + "). Verify duty has been changed from " + infoDiffOld + " to " + infoDiffNew + ".\r\n";
|
||||
infoDiffRow++;
|
||||
//更新log
|
||||
contentLog = DummyInventoryBaseFieldEnum.VERIFY_DUTY.getName() + "由" + infoDiffOld + "改为" + infoDiffNew;
|
||||
updateLog(contentLog,idTemp);
|
||||
}
|
||||
row++;
|
||||
}
|
||||
|
||||
+139
-34
@@ -11,10 +11,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
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.DummyInventoryInfoEO;
|
||||
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;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
@@ -28,21 +31,11 @@ import lombok.SneakyThrows;
|
||||
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;
|
||||
import org.aspectj.util.FileUtil;
|
||||
import org.jeecgframework.poi.excel.ExcelExportUtil;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
@@ -56,22 +49,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.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl.copyFile;
|
||||
@@ -96,7 +77,10 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
private SysDictItemServiceImpl sysDictItemServiceImpl;
|
||||
@Value(value = "${jero.path.upload}")
|
||||
private String uploadpath;
|
||||
|
||||
@Autowired
|
||||
private DummyLogEOServiceImpl dummyLogEOService;
|
||||
@Autowired
|
||||
private DummyInventoryBaseEOServiceImpl dummyInventoryBaseEOService;
|
||||
|
||||
@Override
|
||||
public IPage<DummyInventoryInfoEO> getPageInfo(DummyInventoryInfoEO dummyInventoryInfoEO,HttpServletRequest req) {
|
||||
@@ -109,7 +93,20 @@ 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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -161,6 +158,12 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
list.add(dummyInventoryInfoEOTemp);
|
||||
}
|
||||
this.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+"\"";
|
||||
updateLog(contentLog, dummyInventoryInfoEO.getDummyInventoryBaseId());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,6 +189,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -214,6 +218,14 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
}
|
||||
iOSSFileService.removeByIds(fileIdList);
|
||||
removeByIds(ids);
|
||||
|
||||
//更新log
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String username = sysUser.getUsername();
|
||||
String projectId = dummyInventoryInfoEOList.get(0).getDummyInventoryBaseId();
|
||||
String serialNumber = dummyInventoryInfoEOList.stream().map(e->e.getSerialNumber()).collect(Collectors.joining(","));
|
||||
String contentLog = username+"删除了清单中的\""+serialNumber+"\"标准";
|
||||
updateLog(contentLog, projectId);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -259,6 +271,14 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
dummyInventoryInfoEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||
}
|
||||
this.saveBatch(dummyInventoryInfoEOList);
|
||||
|
||||
//更新log
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String username = sysUser.getUsername();
|
||||
String projectId = dummyInventoryInfoEOList.get(0).getDummyInventoryBaseId();
|
||||
String serialNumber = dummyInventoryInfoEOList.stream().map(e->e.getSerialNumber()).collect(Collectors.joining(","));
|
||||
String contentLog = username+"复制了\""+serialNumber+"\"";
|
||||
updateLog(contentLog, projectId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -270,52 +290,135 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
@Override
|
||||
public void setBatch(DummyInventoryInfoEO dummyInventoryInfoEO) {
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.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(dummyInventoryInfoEO.getIds().split(","));
|
||||
QueryWrapper<DummyInventoryInfoEO> queryWrapper = new QueryWrapper<>();
|
||||
List<DummyInventoryInfoEO> infoList = list(queryWrapper.in("id", idList));
|
||||
String projectId = infoList.get(0).getDummyInventoryBaseId();
|
||||
dummyInventoryBaseEOService.disposeData(infoList);
|
||||
|
||||
//翻译传入的数据
|
||||
List<DummyInventoryInfoEO> inputList = new ArrayList<>();
|
||||
inputList.add(dummyInventoryInfoEO);
|
||||
dummyInventoryBaseEOService.disposeData(inputList);
|
||||
DummyInventoryInfoEO inputInfoEO = inputList.get(0);
|
||||
|
||||
List<DummyInventoryInfoEO> dummyInventoryInfoEOList = new ArrayList<>();
|
||||
for (String id : dummyInventoryInfoEO.getIds().split(",")) {
|
||||
DummyInventoryInfoEO info = infoList.stream().filter(e -> id.equals(e.getId())).collect(Collectors.toList()).get(0);
|
||||
contentLogBuilder.append(info.getSerialNumber() + ":");
|
||||
DummyInventoryInfoEO dummyInventoryInfoEOTemp = new DummyInventoryInfoEO();
|
||||
dummyInventoryInfoEOTemp.setId(id);
|
||||
//实施类别 implementType
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getImplementType())){
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getImplementType())) {
|
||||
dummyInventoryInfoEOTemp.setImplementType(dummyInventoryInfoEO.getImplementType());
|
||||
if (StringUtils.isBlank(info.getImplementType())){
|
||||
info.setImplementType("空");
|
||||
}
|
||||
if (!info.getImplementType().equals(inputInfoEO.getImplementType())) {
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.IMPLEMENT_TYPE.getName(), info.getImplementType(), inputInfoEO.getImplementType());
|
||||
}
|
||||
|
||||
}
|
||||
//认证类型 attestationType
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getAttestationType())){
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getAttestationType())) {
|
||||
dummyInventoryInfoEOTemp.setAttestationType(dummyInventoryInfoEO.getAttestationType());
|
||||
if (StringUtils.isBlank(info.getAttestationType())){
|
||||
info.setAttestationType("空");
|
||||
}
|
||||
if (!info.getAttestationType().equals(inputInfoEO.getAttestationType())) {
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.ATTESTATION_TYPE.getName(), info.getAttestationType(), inputInfoEO.getAttestationType());
|
||||
}
|
||||
}
|
||||
//认证级别 attestationRank
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getAttestationRank())){
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getAttestationRank())) {
|
||||
dummyInventoryInfoEOTemp.setAttestationRank(dummyInventoryInfoEO.getAttestationRank());
|
||||
if (StringUtils.isBlank(info.getAttestationRank())){
|
||||
info.setAttestationRank("空");
|
||||
}
|
||||
if (!info.getAttestationRank().equals(inputInfoEO.getAttestationRank())){
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.ATTESTATION_RANK.getName(), info.getAttestationRank(), inputInfoEO.getAttestationRank());
|
||||
}
|
||||
}
|
||||
//责任领域 dutyTerritory
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getDutyTerritory())){
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getDutyTerritory())) {
|
||||
dummyInventoryInfoEOTemp.setDutyTerritory(dummyInventoryInfoEO.getDutyTerritory());
|
||||
if (StringUtils.isBlank(info.getDutyTerritory())){
|
||||
info.setDutyTerritory("空");
|
||||
}
|
||||
if (!info.getDutyTerritory().equals(inputInfoEO.getDutyTerritory())){
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.DUTY_TERRITORY.getName(), info.getDutyTerritory(), inputInfoEO.getDutyTerritory());
|
||||
}
|
||||
}
|
||||
//适用范围 shi4Yong4Fan4Wei2
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getShi4Yong4Fan4Wei2())){
|
||||
dummyInventoryInfoEOTemp.setShi4Yong4Fan4Wei2(dummyInventoryInfoEO.getShi4Yong4Fan4Wei2());
|
||||
if (StringUtils.isBlank(info.getShi4Yong4Fan4Wei2())){
|
||||
info.setShi4Yong4Fan4Wei2("空");
|
||||
}
|
||||
if (!info.getShi4Yong4Fan4Wei2().equals(inputInfoEO.getShi4Yong4Fan4Wei2())) {
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.SHI4_YONG4_FAN4_WEI2.getName(),info.getShi4Yong4Fan4Wei2(),inputInfoEO.getShi4Yong4Fan4Wei2());
|
||||
}
|
||||
}
|
||||
//技术领域 technologyTerritory
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getTechnologyTerritory())){
|
||||
dummyInventoryInfoEOTemp.setTechnologyTerritory(dummyInventoryInfoEO.getTechnologyTerritory());
|
||||
if (StringUtils.isBlank(info.getTechnologyTerritoryName())){
|
||||
info.setTechnologyTerritoryName("空");
|
||||
}
|
||||
if (!info.getTechnologyTerritoryName().equals(inputInfoEO.getTechnologyTerritoryName())) {
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.TECHNOLOGY_TERRITORY.getName(),info.getTechnologyTerritoryName(),inputInfoEO.getTechnologyTerritoryName());
|
||||
}
|
||||
}
|
||||
//适用地区 region
|
||||
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getRegion())){
|
||||
dummyInventoryInfoEOTemp.setRegion(dummyInventoryInfoEO.getRegion());
|
||||
if (StringUtils.isBlank(info.getRegion())){
|
||||
info.setRegion("空");
|
||||
}
|
||||
if (!info.getRegion().equals(inputInfoEO.getRegion())) {
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.REGION.getName(),info.getRegion(),inputInfoEO.getRegion());
|
||||
}
|
||||
}
|
||||
//新车实施日期
|
||||
if(ObjectUtils.isNotEmpty(dummyInventoryInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1())){
|
||||
dummyInventoryInfoEOTemp.setXin1Che1Xing2Shi2Shi1Ri4Qi1(dummyInventoryInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1());
|
||||
if (info.getXin1Che1Xing2Shi2Shi1Ri4Qi1() == null){
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getName(),"空",inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String());
|
||||
}else {
|
||||
if (!info.getXin1Che1Xing2Shi2Shi1Ri4Qi1String().equals(inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String())) {
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.XIN1_CHE1_XING2_SHI2_SHI1_RI4_QI1.getName(), info.getXin1Che1Xing2Shi2Shi1Ri4Qi1String(), inputInfoEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1String());
|
||||
}
|
||||
}
|
||||
}
|
||||
//在产车实施日期
|
||||
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());
|
||||
}else {
|
||||
if (!info.getImplementTimeString().equals(inputInfoEO.getImplementTimeString())) {
|
||||
setUpdateContentLog(contentLogBuilder, DummyInventoryBaseFieldEnum.IMPLEMENT_TIME.getName(), info.getImplementTimeString(), inputInfoEO.getImplementTimeString());
|
||||
}
|
||||
}
|
||||
}
|
||||
dummyInventoryInfoEOList.add(dummyInventoryInfoEOTemp);
|
||||
}
|
||||
this.updateBatchById(dummyInventoryInfoEOList);
|
||||
|
||||
contentLog = contentLogBuilder.substring(0, contentLogBuilder.length() - 1);
|
||||
updateLog(contentLog, projectId);
|
||||
}
|
||||
}
|
||||
|
||||
public StringBuilder setUpdateContentLog(StringBuilder contentLogBuilder,String fieldName,String oldValue,String newValue){
|
||||
return contentLogBuilder.append("\'"+ fieldName + "\'由" + oldValue + "改为了" + newValue).append(",");
|
||||
}
|
||||
/**
|
||||
* 模板下载
|
||||
* @param dummyInventoryInfoEO
|
||||
@@ -1053,6 +1156,8 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
} else {
|
||||
if (dataList.size() != 0) {
|
||||
this.saveBatch(dataList);
|
||||
|
||||
//////
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,8 +22,13 @@ public class ListDiff <T> {
|
||||
if(f.getName().equals("serialNumber")){
|
||||
result.put(f.getName(),v1.toString());
|
||||
}
|
||||
if( ! equals(v1, v2) && !f.getName().contains("create")
|
||||
&& !f.getName().contains("update") && !f.getName().equals("id")){
|
||||
//设置排除字段
|
||||
if( !equals(v1, v2) && !f.getName().contains("create")
|
||||
&& !f.getName().contains("update") && !f.getName().equals("id")
|
||||
&& !f.getName().equals("technologyTerritory") &&!f.getName().equals("xin1Che1Xing2Shi2Shi1Ri4Qi1")
|
||||
&& !f.getName().equals("implementTime") && !f.getName().equals("xin1Che1Xing2Shi2Shi1Ri4Qi1")
|
||||
&& !f.getName().equals("implementTime")
|
||||
){
|
||||
|
||||
StringBuilder v1String= new StringBuilder(String.valueOf(v1));
|
||||
StringBuilder v2String= new StringBuilder(String.valueOf(v2));
|
||||
|
||||
+15
@@ -159,4 +159,19 @@ public class ProjectLibraryBaseController extends JeroController<ProjectLibraryB
|
||||
return super.importExcel(request, response, ProjectLibraryBase.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目详情-统计接口
|
||||
* @param id 项目库id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目详情-统计接口")
|
||||
@ApiOperation(value="项目详情-统计接口", notes="项目详情-统计接口")
|
||||
@GetMapping(value = "/getProjectDetailsStatistics")
|
||||
public Result<?> getProjectDetailsStatistics(@RequestParam(name="id",required=true) String id,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
Map<String,Object> data = projectLibraryBaseService.getProjectDetailsStatistics(id);
|
||||
return Result.OK(cut,data);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+30
@@ -14,7 +14,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @description
|
||||
@@ -47,6 +49,34 @@ public class ProjectStatusBoardController {
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 时间轴列
|
||||
* @param startTime
|
||||
* @param endTime
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "时间轴列")
|
||||
@ApiOperation(value="时间轴列", notes="时间轴列")
|
||||
@GetMapping(value = "/timeline")
|
||||
public Result<?> timeline(Date startTime,Date endTime) {
|
||||
List<String> timeline = iProjectStatusBoardService.timeline(startTime, endTime);
|
||||
return Result.OK(timeline);
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目状态进度
|
||||
*
|
||||
* @param projectLibraryBase
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目状态进度")
|
||||
@ApiOperation(value="项目状态进度", notes="项目状态进度")
|
||||
@GetMapping(value = "/scheduleInfoList")
|
||||
public Result<?> scheduleInfoList(ProjectLibraryBase projectLibraryBase, HttpServletRequest req) {
|
||||
List<Map<String, Object>> mapList = iProjectStatusBoardService.scheduleInfoList(projectLibraryBase, req);
|
||||
return Result.OK(mapList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.jero.modules.project.enums;
|
||||
|
||||
/**
|
||||
* 认证进度枚举类
|
||||
*/
|
||||
public enum CertificationProgressEnum {
|
||||
TEST_PASSED("实验通过","Test passed"),
|
||||
TEST_FAILED("实验失败","Test failed"),
|
||||
NOT_START("待开始","Not start"),
|
||||
IN_PROGRESS("进行中","In progress"),
|
||||
NA("不涉及","NA"),
|
||||
;
|
||||
|
||||
String name;
|
||||
String value;
|
||||
|
||||
private CertificationProgressEnum(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;
|
||||
}
|
||||
|
||||
public static String getTextByValue(String value) {
|
||||
CertificationProgressEnum[] values = values();
|
||||
for (CertificationProgressEnum certificationProgressEnum : values) {
|
||||
if (certificationProgressEnum.value.equals(value)) {
|
||||
return certificationProgressEnum.name;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.jero.modules.project.enums;
|
||||
|
||||
/**
|
||||
* 当前项目状态枚举类
|
||||
*/
|
||||
public enum CurrentProjectStatusEnum {
|
||||
|
||||
BLUE("蓝色","0"),
|
||||
RED("红色","1"),
|
||||
YELLOW("黄色","2"),
|
||||
GREEN("绿色","3"),
|
||||
;
|
||||
|
||||
String name;
|
||||
String value;
|
||||
|
||||
private CurrentProjectStatusEnum(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;
|
||||
}
|
||||
|
||||
public static String getTextByValue(String value) {
|
||||
CurrentProjectStatusEnum[] values = values();
|
||||
for (CurrentProjectStatusEnum currentProjectStatusEnum : values) {
|
||||
if (currentProjectStatusEnum.value.equals(value)) {
|
||||
return currentProjectStatusEnum.name;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -4,9 +4,9 @@ public enum ProjectTaskPlanningNameEnum {
|
||||
LIST_CONFIRMATION("法规清单确认"," Confirmation of regulations list"),
|
||||
LEGAL_TASK_CONFIRMATION("法规任务确认","Regulatory task confirmation"),
|
||||
DESIGN_DEADLINE("设计符合性确认","Design Compliance Check"),
|
||||
PREHOMO_DEADLINE("PreHomo确认","Pre-homo Check"),
|
||||
PREHOMO_DEADLINE("Pre-Homo确认","Pre-homo Check"),
|
||||
ATTESTATION_START_TIME("认证开始","Certification start"),
|
||||
ATTESTATION_END_TIME("认证结束"," Certification end\n"),
|
||||
ATTESTATION_END_TIME("认证结束"," Certification end"),
|
||||
VERIFY_DEADLINE("验证符合性确认截止时间","Verification compliance confirmation deadline"),
|
||||
|
||||
;
|
||||
|
||||
+7
-1
@@ -1,6 +1,7 @@
|
||||
package com.jero.modules.project.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.jero.modules.project.entity.ConditionAssessmentEO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -13,5 +14,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ConditionAssessmentEOMapper extends BaseMapper<ConditionAssessmentEO> {
|
||||
|
||||
/**
|
||||
* 获取当前项目状态统计数据
|
||||
* @param projectLawsInventoryIdList
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> getCurrentProjectStatusStatistics(@Param("projectLawsInventoryIdList") List<String> projectLawsInventoryIdList);
|
||||
}
|
||||
|
||||
+14
@@ -1,6 +1,7 @@
|
||||
package com.jero.modules.project.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
@@ -14,4 +15,17 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
*/
|
||||
public interface ProjectLawsInventoryEOMapper extends BaseMapper<ProjectLawsInventoryEO> {
|
||||
|
||||
/**
|
||||
* 获取清单确认统计
|
||||
* @param projectLibraryId 项目库id
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> getlistingToConfirmStatistics(@Param("projectLibraryId") String projectLibraryId);
|
||||
|
||||
/**
|
||||
* 获取清单确认统计
|
||||
* @param projectLibraryId 项目库id
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> getTaskToConfirmStatistics(@Param("projectLibraryId")String projectLibraryId);
|
||||
}
|
||||
|
||||
+26
@@ -1,6 +1,7 @@
|
||||
package com.jero.modules.project.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.jero.modules.project.entity.ProjectTaskInventoryEO;
|
||||
@@ -14,4 +15,29 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
*/
|
||||
public interface ProjectTaskInventoryEOMapper extends BaseMapper<ProjectTaskInventoryEO> {
|
||||
|
||||
/**
|
||||
* 获取认证进度统计数据
|
||||
* @param projectLawsInventoryIdList
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getCertificationProgressStatistics(@Param("projectLawsInventoryIdList") List<String> projectLawsInventoryIdList);
|
||||
|
||||
/**
|
||||
* 获取设计符合性统计数据
|
||||
* @param projectLawsInventoryIdList
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> getDesignComplianceStatistice(@Param("projectLawsInventoryIdList") List<String> projectLawsInventoryIdList);
|
||||
/**
|
||||
* 获取prehomo确认统计数据
|
||||
* @param projectLawsInventoryIdList
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> getPrehomoStatistice(@Param("projectLawsInventoryIdList") List<String> projectLawsInventoryIdList);
|
||||
/**
|
||||
* 获取验证符合性统计数据
|
||||
* @param projectLawsInventoryIdList
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> getVerifyComplianceStatistice(@Param("projectLawsInventoryIdList") List<String> projectLawsInventoryIdList);
|
||||
}
|
||||
|
||||
+15
@@ -13,4 +13,19 @@
|
||||
<result column="project_laws_inventory_id" property="projectLawsInventoryId" />
|
||||
<result column="role_code" property="roleCode" />
|
||||
</resultMap>
|
||||
|
||||
<select id="getCurrentProjectStatusStatistics" resultType="hashMap">
|
||||
select
|
||||
count(condition_assessment) as "conditionAssessmentCount",
|
||||
condition_assessment as "conditionAssessment",
|
||||
project_laws_inventory_id as "projectLawsInventoryId"
|
||||
from
|
||||
project_task_inventory_condition_assessment
|
||||
where
|
||||
project_laws_inventory_id in
|
||||
<foreach collection="projectLawsInventoryIdList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
group by condition_assessment
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+24
@@ -41,4 +41,28 @@
|
||||
<result column="verify_due_date" property="verifyDueDate" />
|
||||
<result column="region" property="region" />
|
||||
</resultMap>
|
||||
|
||||
<select id="getlistingToConfirmStatistics" resultType="hashmap">
|
||||
select
|
||||
count(inventory_affirm_status) as "inventoryAffirmStatusCount",
|
||||
inventory_affirm_status as "inventoryAffirmStatus",
|
||||
id as "id"
|
||||
from
|
||||
project_laws_inventory
|
||||
where
|
||||
project_library_id = #{projectLibraryId}
|
||||
group by inventory_affirm_status
|
||||
</select>
|
||||
|
||||
<select id="getTaskToConfirmStatistics" resultType="hashmap">
|
||||
select
|
||||
count(task_affirm_status) as "taskAffirmStatusCount",
|
||||
task_affirm_status as "taskAffirmStatus",
|
||||
id as "id"
|
||||
from
|
||||
project_laws_inventory
|
||||
where
|
||||
project_library_id = #{projectLibraryId}
|
||||
group by task_affirm_status
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+61
-1
@@ -18,4 +18,64 @@
|
||||
<result column="certification_progress" property="certificationProgress" />
|
||||
<result column="project_status_assess" property="projectStatusAssess" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
|
||||
<select id="getCertificationProgressStatistics" resultType="hashmap">
|
||||
select
|
||||
count(certification_progress) as "certificationProgressCount",
|
||||
certification_progress as "certificationProgress",
|
||||
project_laws_inventory_id as "projectLawsInventoryId"
|
||||
from
|
||||
project_task_inventory
|
||||
where
|
||||
project_laws_inventory_id in
|
||||
<foreach collection="projectLawsInventoryIdList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
group by certification_progress;
|
||||
</select>
|
||||
|
||||
<select id="getDesignComplianceStatistice" resultType="hashmap">
|
||||
select
|
||||
count(design_flow_task_status) as "designFlowTaskStatusCount",
|
||||
design_flow_task_status as "designFlowTaskStatus",
|
||||
id as "id"
|
||||
from
|
||||
project_task_inventory
|
||||
where
|
||||
project_laws_inventory_id in
|
||||
<foreach collection="projectLawsInventoryIdList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
group by design_flow_task_status
|
||||
</select>
|
||||
|
||||
<select id="getPrehomoStatistice" resultType="hashmap">
|
||||
select
|
||||
count(prehomo_flow_task_status) as "prehomoFlowTaskStatusCount",
|
||||
prehomo_flow_task_status as "prehomoFlowTaskStatus",
|
||||
id as "id"
|
||||
from
|
||||
project_task_inventory
|
||||
where
|
||||
project_laws_inventory_id in
|
||||
<foreach collection="projectLawsInventoryIdList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
group by prehomo_flow_task_status
|
||||
</select>
|
||||
|
||||
<select id="getVerifyComplianceStatistice" resultType="hashmap">
|
||||
select
|
||||
count(verify_flow_task_status) as "verifyFlowTaskStatusCount",
|
||||
verify_flow_task_status as "verifyFlowTaskStatus",
|
||||
id as "id"
|
||||
from
|
||||
project_task_inventory
|
||||
where
|
||||
project_laws_inventory_id in
|
||||
<foreach collection="projectLawsInventoryIdList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
group by verify_flow_task_status
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+7
@@ -69,4 +69,11 @@ public interface IProjectLibraryBaseService extends IService<ProjectLibraryBase>
|
||||
* @return
|
||||
*/
|
||||
IPage<ProjectLibraryBase> queryPageList(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 项目详情-统计接口
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> getProjectDetailsStatistics(String id);
|
||||
}
|
||||
|
||||
+17
@@ -4,7 +4,9 @@ import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
import com.jero.modules.project.vo.TimeNodeVO;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @description
|
||||
@@ -13,5 +15,20 @@ import java.util.List;
|
||||
*/
|
||||
public interface IProjectStatusBoardService {
|
||||
|
||||
/**
|
||||
* 时间轴
|
||||
* @param projectLibraryBase
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
List<List<TimeNodeVO>> timelineList(ProjectLibraryBase projectLibraryBase, HttpServletRequest req);
|
||||
|
||||
List<String> timeline(Date startTime, Date endTime);
|
||||
|
||||
/**
|
||||
* 项目状态进度
|
||||
* @param projectLibraryBase
|
||||
* @param req
|
||||
*/
|
||||
List<Map<String,Object>> scheduleInfoList(ProjectLibraryBase projectLibraryBase, HttpServletRequest req);
|
||||
}
|
||||
|
||||
+128
@@ -5,8 +5,17 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.project.entity.ConditionAssessmentEO;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
import com.jero.modules.project.enums.CertificationProgressEnum;
|
||||
import com.jero.modules.project.enums.CurrentProjectStatusEnum;
|
||||
import com.jero.modules.project.enums.InventoryAffirmStatusEnum;
|
||||
import com.jero.modules.project.enums.TaskAffirmStatusEnum;
|
||||
import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper;
|
||||
import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
|
||||
import com.jero.modules.project.mapper.ProjectTaskInventoryEOMapper;
|
||||
import com.jero.modules.project.service.IConditionAssessmentEOService;
|
||||
import com.jero.modules.project.service.IProjectLibraryBaseService;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.mapper.SysDictItemMapper;
|
||||
@@ -43,6 +52,15 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
|
||||
@Autowired
|
||||
private ProjectTaskPlanningServiceImpl projectTaskPlanningService;
|
||||
|
||||
@Autowired
|
||||
private ProjectLawsInventoryEOMapper projectLawsInventoryEOMapper;
|
||||
|
||||
@Autowired
|
||||
private ProjectTaskInventoryEOMapper projectTaskInventoryEOMapper;
|
||||
|
||||
@Autowired
|
||||
private IConditionAssessmentEOService conditionAssessmentEOService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -170,6 +188,116 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getProjectDetailsStatistics(String id) {
|
||||
Map<String,Object> result = new HashMap<>();
|
||||
|
||||
//当前项目状态
|
||||
Map<String,Object> currentProjectStatusMap = new HashMap<>();
|
||||
//清单确认
|
||||
Map<String,Object> listingToConfirmMap = new HashMap<>();
|
||||
//任务确认
|
||||
Map<String,Object> taskToConfirmMap = new HashMap<>();
|
||||
//设计符合性
|
||||
Map<String,Object> designComplianceMap = new HashMap<>();
|
||||
//prehomo确认
|
||||
Map<String,Object> prehomoMap = new HashMap<>();
|
||||
//验证符合性
|
||||
Map<String,Object> verifyComplianceMap = new HashMap<>();
|
||||
//认证进度
|
||||
Map<String,Object> certificationProgressMap = new HashMap<>();
|
||||
|
||||
QueryWrapper<ProjectLawsInventoryEO> lawsInventoryEOQueryWrapper = new QueryWrapper<>();
|
||||
lawsInventoryEOQueryWrapper.lambda().eq(ProjectLawsInventoryEO::getProjectLibraryId,id);
|
||||
lawsInventoryEOQueryWrapper.lambda().eq(ProjectLawsInventoryEO::getInventoryAffirmStatus, InventoryAffirmStatusEnum.ACCEPTED.getValue());
|
||||
lawsInventoryEOQueryWrapper.lambda().eq(ProjectLawsInventoryEO::getTaskAffirmStatus, TaskAffirmStatusEnum.ACCEPTED.getValue());
|
||||
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = projectLawsInventoryEOMapper.selectList(lawsInventoryEOQueryWrapper);
|
||||
if(CollectionUtils.isNotEmpty(projectLawsInventoryEOList)){
|
||||
List<String> projectLawsInventoryIdList = projectLawsInventoryEOList.stream().distinct().map(ProjectLawsInventoryEO::getId).collect(Collectors.toList());
|
||||
|
||||
//当前项目状态统计 获取一个 最差的结果 统计的数据 就是studio看到的数据。
|
||||
List<Map<String,Object>> currentProjectStatusMapList = new ArrayList<>();
|
||||
CurrentProjectStatusEnum[] values = CurrentProjectStatusEnum.values();
|
||||
for (CurrentProjectStatusEnum value : values) {
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("color",value.getValue());
|
||||
currentProjectStatusMapList.add(map);
|
||||
}
|
||||
int currentProjectStatusTotal;
|
||||
List<ConditionAssessmentEO> projectStatusAssessList = this.conditionAssessmentEOService.getProjectStatusAssessList(projectLawsInventoryIdList);
|
||||
|
||||
for (Map<String, Object> map : currentProjectStatusMapList) {
|
||||
List<ConditionAssessmentEO> collect = projectStatusAssessList.stream().filter(
|
||||
projectStatusAssess -> StringUtils.equals(projectStatusAssess.getConditionAssessment(),map.get("color").toString())
|
||||
).collect(Collectors.toList());
|
||||
map.put("conditionAssessmentCount",collect.size());
|
||||
}
|
||||
|
||||
currentProjectStatusTotal = currentProjectStatusMapList.stream().filter(
|
||||
currentProjectStatus -> Integer.parseInt(currentProjectStatus.get("conditionAssessmentCount").toString()) != 0
|
||||
).mapToInt(currentProjectStatus -> Integer.parseInt(currentProjectStatus.get("conditionAssessmentCount").toString())).sum();
|
||||
|
||||
currentProjectStatusMap.put("currentProjectStatusMapList",currentProjectStatusMapList);
|
||||
currentProjectStatusMap.put("currentProjectStatusTotal",currentProjectStatusTotal);
|
||||
result.put("currentProjectStatusMap",currentProjectStatusMap);
|
||||
|
||||
//清单确认统计
|
||||
List<Map<String,Object>> listingToConfirmMapList = this.projectLawsInventoryEOMapper.getlistingToConfirmStatistics(id);
|
||||
listingToConfirmMap.put("listingToConfirmMapList",listingToConfirmMapList);
|
||||
result.put("listingToConfirmMap",listingToConfirmMap);
|
||||
|
||||
//任务确认统计
|
||||
List<Map<String,Object>> taskToConfirmMapList = this.projectLawsInventoryEOMapper.getTaskToConfirmStatistics(id);
|
||||
taskToConfirmMap.put("taskToConfirmMapList",taskToConfirmMapList);
|
||||
result.put("taskToConfirmMap",taskToConfirmMap);
|
||||
|
||||
//设计符合性
|
||||
List<Map<String,Object>> designComplianceMapList = this.projectTaskInventoryEOMapper.getDesignComplianceStatistice(projectLawsInventoryIdList);
|
||||
designComplianceMap.put("designComplianceMapList",designComplianceMapList);
|
||||
result.put("designComplianceMap",designComplianceMap);
|
||||
|
||||
//prehomo确认
|
||||
List<Map<String,Object>> prehomoMapList = this.projectTaskInventoryEOMapper.getPrehomoStatistice(projectLawsInventoryIdList);
|
||||
prehomoMap.put("prehomoMapList",prehomoMapList);
|
||||
result.put("prehomoMap",prehomoMap);
|
||||
|
||||
//验证符合性
|
||||
List<Map<String,Object>> verifyComplianceMapList = this.projectTaskInventoryEOMapper.getVerifyComplianceStatistice(projectLawsInventoryIdList);
|
||||
verifyComplianceMap.put("verifyComplianceMapList",verifyComplianceMapList);
|
||||
result.put("verifyComplianceMap",verifyComplianceMap);
|
||||
|
||||
//认证进度统计
|
||||
int certificationProgressTotal;
|
||||
List<Map<String,Object>> certificationProgressMapList = this.projectTaskInventoryEOMapper.getCertificationProgressStatistics(projectLawsInventoryIdList);
|
||||
certificationProgressTotal = certificationProgressMapList.stream().filter(
|
||||
certificationProgress -> Integer.parseInt(certificationProgress.get("certificationProgressCount").toString()) != 0
|
||||
).mapToInt(certificationProgress -> Integer.parseInt(certificationProgress.get("certificationProgressCount").toString())).sum();
|
||||
|
||||
CertificationProgressEnum[] CertificationProgressEnumValues = CertificationProgressEnum.values();
|
||||
for (CertificationProgressEnum certificationProgressEnumValue : CertificationProgressEnumValues) {
|
||||
boolean flag = true;
|
||||
for (Map<String, Object> map : certificationProgressMapList) {
|
||||
if(StringUtils.equals(certificationProgressEnumValue.getValue(),map.get("certificationProgress").toString())){
|
||||
flag = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(flag){
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("certificationProgress",certificationProgressEnumValue.getValue());
|
||||
map.put("certificationProgressCount",0);
|
||||
certificationProgressMapList.add(map);
|
||||
}
|
||||
}
|
||||
|
||||
certificationProgressMap.put("certificationProgressTotal",certificationProgressTotal);
|
||||
certificationProgressMap.put("certificationProgressMapList",certificationProgressMapList);
|
||||
result.put("certificationProgressMap",certificationProgressMap);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+349
-1
@@ -2,18 +2,35 @@ package com.jero.modules.project.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.dummy.entity.DummyInventoryBaseEO;
|
||||
import com.jero.modules.project.entity.ConditionAssessmentEO;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
import com.jero.modules.project.entity.ProjectTaskInventoryEO;
|
||||
import com.jero.modules.project.enums.CertificationProgressEnum;
|
||||
import com.jero.modules.project.enums.CurrentProjectStatusEnum;
|
||||
import com.jero.modules.project.enums.InventoryAffirmStatusEnum;
|
||||
import com.jero.modules.project.enums.ReviewResultEnum;
|
||||
import com.jero.modules.project.enums.TaskAffirmStatusEnum;
|
||||
import com.jero.modules.project.service.IConditionAssessmentEOService;
|
||||
import com.jero.modules.project.service.IProjectStatusBoardService;
|
||||
import com.jero.modules.project.vo.TimeNodeVO;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -27,8 +44,22 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService
|
||||
private ProjectTaskPlanningServiceImpl projectTaskPlanningService;
|
||||
@Autowired
|
||||
private ProjectLibraryBaseServiceImpl projectLibraryBaseService;
|
||||
@Autowired
|
||||
private IConditionAssessmentEOService conditionAssessmentEOService;
|
||||
@Autowired
|
||||
private ProjectLawsInventoryEOServiceImpl projectLawsInventoryEOService;
|
||||
@Autowired
|
||||
private ProjectTaskInventoryEOServiceImpl projectTaskInventoryEOService;
|
||||
@Autowired
|
||||
private SysDictItemServiceImpl sysDictItemServiceImpl;
|
||||
|
||||
|
||||
/**
|
||||
* 时间轴
|
||||
* @param projectLibraryBase
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<List<TimeNodeVO>> timelineList(ProjectLibraryBase projectLibraryBase, HttpServletRequest req) {
|
||||
|
||||
@@ -46,4 +77,321 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目状态进度
|
||||
* @param projectLibraryBase
|
||||
* @param req
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String,Object>> scheduleInfoList(ProjectLibraryBase projectLibraryBase, HttpServletRequest req) {
|
||||
//目标市场数据字典
|
||||
List<SysDictItem> dictItemList = sysDictItemServiceImpl.selectItemsByDictCode("region");
|
||||
QueryWrapper<ProjectLibraryBase> queryWrapper = QueryGenerator.initQueryWrapper(projectLibraryBase, req.getParameterMap());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
//项目库信息
|
||||
List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseService.list(queryWrapper);
|
||||
|
||||
List<Map<String,Object>> result = new ArrayList<>();
|
||||
if(projectLibraryBaseList.size() != 0){
|
||||
List<String> LibraryBaseIdList = projectLibraryBaseList.stream().map(ProjectLibraryBase::getId).collect(Collectors.toList());
|
||||
|
||||
//所有项目的法规清单
|
||||
LambdaQueryWrapper<ProjectLawsInventoryEO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.in(ProjectLawsInventoryEO::getProjectLibraryId,LibraryBaseIdList);
|
||||
List<ProjectLawsInventoryEO> projectLawsInventoryEOAll = projectLawsInventoryEOService.list(wrapper);
|
||||
|
||||
//所有项目的任务清单
|
||||
List<ProjectTaskInventoryEO> projectTaskInventoryEOList = new ArrayList<>();
|
||||
if(projectLawsInventoryEOAll.size() != 0){
|
||||
//法规清单id
|
||||
List<String> projectLawsInventoryEOIdAll = projectLawsInventoryEOAll.stream().map(ProjectLawsInventoryEO::getId).collect(Collectors.toList());
|
||||
LambdaQueryWrapper<ProjectTaskInventoryEO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.in(ProjectTaskInventoryEO::getProjectLawsInventoryId,projectLawsInventoryEOIdAll);
|
||||
projectTaskInventoryEOList = projectTaskInventoryEOService.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
|
||||
for (ProjectLibraryBase libraryBase : projectLibraryBaseList) {
|
||||
//处理目标市场
|
||||
targetMarket(projectLibraryBase, dictItemList, libraryBase);
|
||||
//(1)每个项目下的法规清单
|
||||
List<ProjectLawsInventoryEO> ProjectLawsInventoryEOS = projectLawsInventoryEOAll.stream().filter(e -> libraryBase.getId().equals(e.getProjectLibraryId())).collect(Collectors.toList());
|
||||
List<String> ProjectLawsInventoryIdList = ProjectLawsInventoryEOS.stream().map(ProjectLawsInventoryEO::getId).collect(Collectors.toList());
|
||||
//(2)每个项目下的任务清单
|
||||
List<ProjectTaskInventoryEO> projectTaskInventoryEOS = new ArrayList<>();
|
||||
if(projectTaskInventoryEOList.size() != 0){
|
||||
projectTaskInventoryEOS = projectTaskInventoryEOList.stream().filter(e -> ProjectLawsInventoryIdList.contains(e.getProjectLawsInventoryId())).collect(Collectors.toList());
|
||||
}
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("projectName",libraryBase.getProjectName());//项目名称
|
||||
map.put("targetMarket",libraryBase.getTargetMarket());//目标市场
|
||||
|
||||
//1. 项目当前状态--projectState(蓝/红/黄/绿)-->studio视角下的数据
|
||||
int blue = 0;
|
||||
int red = 0;
|
||||
int yellow = 0;
|
||||
int green = 0;
|
||||
//3. 清单确认状态(未发起,待确认,接收,拒绝)
|
||||
int inventoryNotStarted=0;
|
||||
int inventoryListToConfirm=0;
|
||||
int inventoryAccepted=0;
|
||||
int inventoryRejected=0;
|
||||
//4. 任务确认状态(未发起,待确认,接收,拒绝)
|
||||
int taskNotStarted=0;
|
||||
int taskListToConfirm=0;
|
||||
int taskAccepted=0;
|
||||
int taskRejected=0;
|
||||
//设计
|
||||
int designToBeConfirmed = 0;//设计待确认
|
||||
int designConformity = 0;//设计符合
|
||||
int designInconformity = 0;//设计不符合
|
||||
int designToTrack = 0;//设计待追踪
|
||||
int designUninvolved = 0;//设计不涉及
|
||||
int designTerminationOfTask = 0;//设计任务终止
|
||||
|
||||
//pre
|
||||
int preToBeConfirmed = 0;//pre待确认
|
||||
int preConformity = 0;//pre符合
|
||||
int preInconformity = 0;//pre不符合
|
||||
int preToTrack = 0;//pre待追踪
|
||||
int preUninvolved = 0;//pre不涉及
|
||||
int preTerminationOfTask = 0;//pre任务终止
|
||||
|
||||
//验证
|
||||
int verifyToBeConfirmed = 0;//验证待确认
|
||||
int verifyConformity = 0;//验证符合
|
||||
int verifyInconformity = 0;//验证不符合
|
||||
int verifyToTrack = 0;//验证待追踪
|
||||
int verifyUninvolved = 0;//验证不涉及
|
||||
int verifyTerminationOfTask = 0;//验证任务终止
|
||||
|
||||
//认证进度
|
||||
int na = 0;
|
||||
int notStart = 0;
|
||||
int inProgress = 0;
|
||||
int testFailed = 0;
|
||||
int testPassed = 0;
|
||||
if(ProjectLawsInventoryIdList.size() != 0){
|
||||
//studio视角下获取项目状态评估数据
|
||||
List<ConditionAssessmentEO> projectStatusAssessList = conditionAssessmentEOService.getProjectStatusAssessList(ProjectLawsInventoryIdList);
|
||||
if(projectStatusAssessList.size() != 0){
|
||||
for (ConditionAssessmentEO conditionAssessmentEO : projectStatusAssessList) {
|
||||
//蓝/红/黄/绿
|
||||
String conditionAssessment = conditionAssessmentEO.getConditionAssessment();
|
||||
if(StringUtils.isNotBlank(conditionAssessment)){
|
||||
if(CurrentProjectStatusEnum.BLUE.getValue().equals(conditionAssessment)){
|
||||
blue++;
|
||||
}else if(CurrentProjectStatusEnum.RED.getValue().equals(conditionAssessment)){
|
||||
red++;
|
||||
}else if(CurrentProjectStatusEnum.YELLOW.getValue().equals(conditionAssessment)){
|
||||
yellow++;
|
||||
}else if(CurrentProjectStatusEnum.GREEN.getValue().equals(conditionAssessment)){
|
||||
green++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
String projectState = blue+"/"+red+"/"+yellow+"/"+green;
|
||||
map.put("projectStatus",projectState);//项目当前状态
|
||||
|
||||
String inventory = "";
|
||||
String task = "";
|
||||
if(ProjectLawsInventoryEOS.size() != 0){
|
||||
for (ProjectLawsInventoryEO projectLawsInventoryEO : ProjectLawsInventoryEOS) {
|
||||
String inventoryAffirmStatus = projectLawsInventoryEO.getInventoryAffirmStatus();//清单确认状态
|
||||
String taskAffirmStatus = projectLawsInventoryEO.getTaskAffirmStatus();//任务确认状态
|
||||
if(StringUtils.isNotBlank(inventoryAffirmStatus)){
|
||||
if(InventoryAffirmStatusEnum.NOT_STARTED.getValue().equals(inventoryAffirmStatus)){
|
||||
inventoryNotStarted++;
|
||||
}else if(InventoryAffirmStatusEnum.LIST_TO_CONFIRM.getValue().equals(inventoryAffirmStatus)){
|
||||
inventoryListToConfirm++;
|
||||
}else if(InventoryAffirmStatusEnum.ACCEPTED.getValue().equals(inventoryAffirmStatus)){
|
||||
inventoryAccepted++;
|
||||
}else if(InventoryAffirmStatusEnum.REJECTED.getValue().equals(inventoryAffirmStatus)){
|
||||
inventoryRejected++;
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(taskAffirmStatus)){
|
||||
if(TaskAffirmStatusEnum.NOT_STARTED.getValue().equals(taskAffirmStatus)){
|
||||
taskNotStarted++;
|
||||
}else if(TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue().equals(taskAffirmStatus)){
|
||||
taskListToConfirm++;
|
||||
}else if(TaskAffirmStatusEnum.ACCEPTED.getValue().equals(taskAffirmStatus)){
|
||||
taskAccepted++;
|
||||
}else if(TaskAffirmStatusEnum.REJECTED.getValue().equals(taskAffirmStatus)){
|
||||
taskRejected++;
|
||||
}
|
||||
}
|
||||
}
|
||||
inventory = inventoryNotStarted+"/"+inventoryListToConfirm+"/"+inventoryAccepted+"/"+inventoryRejected+"/";
|
||||
task = taskNotStarted+"/"+taskListToConfirm+"/"+taskAccepted+"/"+taskRejected+"/";
|
||||
}
|
||||
map.put("inventory",inventory);//清单确认状态
|
||||
map.put("task",task);//任务确认状态
|
||||
|
||||
//5. 设计符合性确认,PreHomo确认,验证符合性确认
|
||||
String design = "";
|
||||
String pre = "";
|
||||
String verify = "";
|
||||
String certificationProgress = "";
|
||||
if(projectTaskInventoryEOS.size() != 0){
|
||||
for (ProjectTaskInventoryEO projectTaskInventoryEO : projectTaskInventoryEOS) {
|
||||
//设计符合性流程-任务状态
|
||||
String designFlowTaskStatus = projectTaskInventoryEO.getDesignFlowTaskStatus();
|
||||
//prehomo确认流程-任务状态
|
||||
String prehomoFlowTaskStatus = projectTaskInventoryEO.getPrehomoFlowTaskStatus();
|
||||
//verify_flow_task_status
|
||||
String verifyFlowTaskStatus = projectTaskInventoryEO.getVerifyFlowTaskStatus();
|
||||
//认证进度
|
||||
String certificationProgressTemp = projectTaskInventoryEO.getCertificationProgress();
|
||||
|
||||
//2. 认证进度(不涉及/待开始/进行中/实验失败/实验通过)
|
||||
if(StringUtils.isNotBlank(certificationProgressTemp)){
|
||||
if(CertificationProgressEnum.NA.getValue().equals(certificationProgressTemp)){
|
||||
na++;
|
||||
}else if(CertificationProgressEnum.NOT_START.getValue().equals(certificationProgressTemp)){
|
||||
notStart++;
|
||||
}else if(CertificationProgressEnum.IN_PROGRESS.getValue().equals(certificationProgressTemp)){
|
||||
inProgress++;
|
||||
}else if(CertificationProgressEnum.TEST_FAILED.getValue().equals(certificationProgressTemp)){
|
||||
testFailed++;
|
||||
}else if(CertificationProgressEnum.TEST_PASSED.getValue().equals(certificationProgressTemp)){
|
||||
testPassed++;
|
||||
}
|
||||
}
|
||||
|
||||
//5. 设计符合性确认(待确认/符合/不符合/待追踪/不涉及/任务终止)
|
||||
if(StringUtils.isNotBlank(designFlowTaskStatus)){
|
||||
if(ReviewResultEnum.TO_BE_CONFIRMED.getValue().equals(designFlowTaskStatus)){
|
||||
designToBeConfirmed++;
|
||||
}else if(ReviewResultEnum.CONFORMITY.getValue().equals(designFlowTaskStatus)){
|
||||
designConformity++;
|
||||
}else if(ReviewResultEnum.INCONFORMITY.getValue().equals(designFlowTaskStatus)){
|
||||
designInconformity++;
|
||||
}else if(ReviewResultEnum.TO_TRACK.getValue().equals(designFlowTaskStatus)){
|
||||
designToTrack++;
|
||||
}else if(ReviewResultEnum.UNINVOLVED.getValue().equals(designFlowTaskStatus)){
|
||||
designUninvolved++;
|
||||
}else if(ReviewResultEnum.TERMINATION_OF_TASK.getValue().equals(designFlowTaskStatus)){
|
||||
designTerminationOfTask++;
|
||||
}
|
||||
}
|
||||
//6. PreHomo确认(待确认/符合/不符合/待追踪/不涉及/任务终止)
|
||||
if(StringUtils.isNotBlank(prehomoFlowTaskStatus)){
|
||||
if(ReviewResultEnum.TO_BE_CONFIRMED.getValue().equals(prehomoFlowTaskStatus)){
|
||||
preToBeConfirmed++;
|
||||
}else if(ReviewResultEnum.CONFORMITY.getValue().equals(prehomoFlowTaskStatus)){
|
||||
preConformity++;
|
||||
}else if(ReviewResultEnum.INCONFORMITY.getValue().equals(prehomoFlowTaskStatus)){
|
||||
preInconformity++;
|
||||
}else if(ReviewResultEnum.TO_TRACK.getValue().equals(prehomoFlowTaskStatus)){
|
||||
preToTrack++;
|
||||
}else if(ReviewResultEnum.UNINVOLVED.getValue().equals(prehomoFlowTaskStatus)){
|
||||
preUninvolved++;
|
||||
}else if(ReviewResultEnum.TERMINATION_OF_TASK.getValue().equals(prehomoFlowTaskStatus)){
|
||||
preTerminationOfTask++;
|
||||
}
|
||||
}
|
||||
//7. 验证符合性确认(待完成/符合/不符合/未验证/不涉及)
|
||||
if(StringUtils.isNotBlank(verifyFlowTaskStatus)){
|
||||
if(ReviewResultEnum.TO_BE_CONFIRMED.getValue().equals(verifyFlowTaskStatus)){
|
||||
verifyToBeConfirmed++;
|
||||
}else if(ReviewResultEnum.CONFORMITY.getValue().equals(verifyFlowTaskStatus)){
|
||||
verifyConformity++;
|
||||
}else if(ReviewResultEnum.INCONFORMITY.getValue().equals(verifyFlowTaskStatus)){
|
||||
verifyInconformity++;
|
||||
}else if(ReviewResultEnum.TO_TRACK.getValue().equals(verifyFlowTaskStatus)){
|
||||
verifyToTrack++;
|
||||
}else if(ReviewResultEnum.UNINVOLVED.getValue().equals(verifyFlowTaskStatus)){
|
||||
verifyUninvolved++;
|
||||
}else if(ReviewResultEnum.TERMINATION_OF_TASK.getValue().equals(verifyFlowTaskStatus)){
|
||||
verifyTerminationOfTask++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
certificationProgress = na+"/"+notStart+"/"+inProgress+"/"+testFailed+"/"+testPassed;
|
||||
design = designToBeConfirmed+"/"+designConformity+"/"+designInconformity+"/"+designToTrack+"/"+designUninvolved+"/"+designTerminationOfTask;
|
||||
pre = preToBeConfirmed+"/"+preConformity+"/"+preInconformity+"/"+preToTrack+"/"+preUninvolved+"/"+preTerminationOfTask;
|
||||
verify = verifyToBeConfirmed+"/"+verifyConformity+"/"+verifyInconformity+"/"+verifyToTrack+"/"+verifyUninvolved+"/"+verifyTerminationOfTask;
|
||||
|
||||
map.put("certificationProgress",certificationProgress);//认证进度
|
||||
map.put("design",design);//设计符合性确认
|
||||
map.put("pre",pre);//PreHomo确认
|
||||
map.put("verify",verify);//验证符合性确认
|
||||
result.add(map);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private void targetMarket(ProjectLibraryBase projectLibraryBase, List<SysDictItem> dictItemList, ProjectLibraryBase libraryBase) {
|
||||
String targetMarket = libraryBase.getTargetMarket();
|
||||
if(StringUtils.isNotBlank(targetMarket)){
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String s : targetMarket.split(",")) {
|
||||
List<SysDictItem> collect = dictItemList.stream().filter(e -> s.equals(e.getItemValue())).collect(Collectors.toList());
|
||||
String itemText = "";
|
||||
if(CutEnum.CN.getValue().equals(projectLibraryBase.getCut())){
|
||||
if(collect.size() != 0){
|
||||
itemText = collect.get(0).getItemText();
|
||||
}
|
||||
}else{
|
||||
if(collect.size() != 0){
|
||||
itemText = collect.get(0).getEnName();
|
||||
}
|
||||
}
|
||||
sb.append(itemText+",");
|
||||
}
|
||||
if(StringUtils.isNotBlank(sb)){
|
||||
String substring = sb.substring(0, sb.length() - 1);
|
||||
libraryBase.setTargetMarket(substring);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<String> timeline(Date startTime, Date endTime) {
|
||||
List<String> result = new ArrayList<String>();
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|
||||
Calendar calendarBefore = Calendar.getInstance();
|
||||
if(ObjectUtils.isNotEmpty(startTime)){
|
||||
calendarBefore.setTime(startTime);
|
||||
}else{
|
||||
calendarBefore.setTime(new Date());
|
||||
}
|
||||
calendarBefore.add(Calendar.MONTH, -6);
|
||||
Date dateBefore = calendarBefore.getTime();
|
||||
|
||||
Calendar calendarAfter = Calendar.getInstance();
|
||||
if(ObjectUtils.isNotEmpty(endTime)){
|
||||
calendarAfter.setTime(endTime);
|
||||
}else{
|
||||
calendarAfter.setTime(new Date());
|
||||
}
|
||||
calendarAfter.add(Calendar.YEAR, +6);
|
||||
Date dateAfter = calendarAfter.getTime();
|
||||
|
||||
Calendar min = Calendar.getInstance();
|
||||
Calendar max = Calendar.getInstance();
|
||||
|
||||
min.setTime(dateBefore);
|
||||
min.set(min.get(Calendar.YEAR), min.get(Calendar.MONTH), 10);
|
||||
|
||||
max.setTime(dateAfter);
|
||||
max.set(max.get(Calendar.YEAR), max.get(Calendar.MONTH), 13);
|
||||
|
||||
Calendar curr = min;
|
||||
while (curr.before(max)) {
|
||||
result.add(sdf.format(curr.getTime()));
|
||||
curr.add(Calendar.MONTH, 1);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -707,6 +707,7 @@ module.exports = {
|
||||
uploadTime: 'Upload time',
|
||||
enclosure: 'enclosure',
|
||||
// 认证
|
||||
operatethisbutton: 'You do not have permission to operate this button',
|
||||
ParameterLibrary: 'Parameter Library',
|
||||
referenceparameter: 'reference Parameter',
|
||||
Assignedby: 'Assignedby',
|
||||
@@ -825,4 +826,10 @@ module.exports = {
|
||||
refuse:'Refuse',
|
||||
taskTermination:'Task termination',
|
||||
projectStatusAndProgress:'Project status and progress',
|
||||
listConfirmationProgress:'List confirmation progress',
|
||||
taskConfirmationProgress:'Task confirmation progress',
|
||||
designComplianceConfirmationProgress:'Design Compliance Confirmation Progress',
|
||||
preHomeConfirmProgress:'Pre-Home confirm progress',
|
||||
verificationComplianceConfirmationProgress:'Verification compliance confirmation progress',
|
||||
totalTable:'Total',
|
||||
}
|
||||
@@ -716,6 +716,7 @@ module.exports = {
|
||||
uploadTime: '上传时间',
|
||||
enclosure: '附件',
|
||||
// 认证
|
||||
operatethisbutton: '没有权限操作此按钮',
|
||||
ParameterLibrary: '参数库',
|
||||
referenceparameter: '引用参数',
|
||||
Assignedby: '分配填写人',
|
||||
@@ -830,4 +831,10 @@ module.exports = {
|
||||
refuse:'拒绝',
|
||||
taskTermination:'任务终止',
|
||||
projectStatusAndProgress:'项目状态进度',
|
||||
listConfirmationProgress:'清单确认进度',
|
||||
taskConfirmationProgress:'任务确认进度',
|
||||
designComplianceConfirmationProgress:'设计符合性确认进度',
|
||||
preHomeConfirmProgress:'Pre-Home确认进度',
|
||||
verificationComplianceConfirmationProgress:'验证符合性确认进度',
|
||||
totalTable:'总数',
|
||||
}
|
||||
@@ -73,6 +73,7 @@ export default {
|
||||
indeterminate: false,
|
||||
columns: [],
|
||||
selectedRowKeys: [],
|
||||
selectedRowrowValue: [],
|
||||
dataSource: [],
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
@@ -81,6 +82,7 @@ export default {
|
||||
loading: false,
|
||||
orderBy: '1',
|
||||
orderByField: '',
|
||||
LoginUserType: '', // 登陆人角色状态
|
||||
homo: 0, // 认证工程师
|
||||
sdt: 0, // 工程接口人
|
||||
dre: 0, // 填写人
|
||||
@@ -98,6 +100,8 @@ export default {
|
||||
}
|
||||
getAction(this.url.getLoginUserType, params).then((res) => {
|
||||
if (res.success) {
|
||||
this.LoginUserType = res.result
|
||||
this.$emit('LoginUserType', this.LoginUserType)
|
||||
res.result.split(',').forEach((item,index) => {
|
||||
if(item === 'homo') {
|
||||
this.homo = 1
|
||||
@@ -190,8 +194,8 @@ export default {
|
||||
// this.getTableList()
|
||||
},
|
||||
onSelectChange(value,rowValue) {
|
||||
console.log(value,rowValue)
|
||||
this.selectedRowKeys = value
|
||||
this.selectedRowrowValue = rowValue
|
||||
this.$emit('value',value)
|
||||
this.$emit('rowValue', rowValue)
|
||||
},
|
||||
|
||||
@@ -64,12 +64,12 @@
|
||||
<a-popconfirm overlayClassName='popconfirm' placement="bottomRight">
|
||||
<template slot="title" id="popconfirm">
|
||||
<!-- 下发收集 -->
|
||||
<div @click="handleAdd" class="operator-text-title">
|
||||
<div @click="distributionAndCollection" class="operator-text-title">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('distributionAndCollection')}}
|
||||
</div>
|
||||
<!-- 冻结配置-->
|
||||
<div @click="handleAdd" class="operator-text-title">
|
||||
<div @click="freezeConfiguration" class="operator-text-title">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('FreezeConfiguration')}}
|
||||
</div>
|
||||
@@ -121,7 +121,7 @@
|
||||
</div>
|
||||
<div style="width: 100%">
|
||||
<!-- 表格-10控件-->
|
||||
<table-collection ref="CollectionTabel" :url='url' :paramsManifest='paramsManifest' @rowValue='rowValue' :formInline='formInline' @value='value'/>
|
||||
<table-collection ref="CollectionTabel" :url='url' :paramsManifest='paramsManifest' @rowValue='rowValue' :formInline='formInline' @LoginUserType='LoginUserType' @value='value'/>
|
||||
</div>
|
||||
<!-- 添加--->
|
||||
<a-modal v-model="areaVisible" :title="$t('ParameterLibrary')" width='750px' :footer="null">
|
||||
@@ -217,8 +217,11 @@ export default {
|
||||
rowId: '',
|
||||
version: 0,
|
||||
itemId: '',
|
||||
selectedRowKeysValue: [],
|
||||
selectedRowKeysValue: [], // table列表所选得数据
|
||||
token:Vue.ls.get(ACCESS_TOKEN),
|
||||
homo: 0, // 认证工程师
|
||||
sdt: 0, // 工程接口人
|
||||
dre: 0, // 填写人
|
||||
}
|
||||
},
|
||||
props: {
|
||||
@@ -230,6 +233,45 @@ export default {
|
||||
},
|
||||
mounted() {},
|
||||
methods:{
|
||||
// 判断是否有权限 认证工程师 待发起收集
|
||||
// 添加 批量删除 下发收集 冻结配置 工程接口人列修改
|
||||
permission() {
|
||||
// 判断是否具有提交权限
|
||||
// 认证工程师
|
||||
// 定义开关 0为没有权限 1为有权限
|
||||
let flag = 1
|
||||
if(this.homo) {
|
||||
if(this.selectedRowKeysValue.length == 0) {
|
||||
flag = 0
|
||||
this.$message.success(this.$t('selectLeastOne'))
|
||||
} else {
|
||||
this.selectedRowKeysValue.forEach((item, index) => {
|
||||
if(item.state !== '待发起收集') {
|
||||
flag = 0
|
||||
}
|
||||
})
|
||||
if(flag === 1) {
|
||||
flag = 1
|
||||
} else {
|
||||
this.$message.warning(this.$t('operatethisbutton'))
|
||||
}
|
||||
}
|
||||
}else {
|
||||
this.$message.success(this.$t('operatethisbutton'))
|
||||
}
|
||||
return flag
|
||||
},
|
||||
LoginUserType(val) {
|
||||
val.split(',').forEach((item,index) => {
|
||||
if(item === 'homo') {
|
||||
this.homo = 1
|
||||
} else if(item === 'sdt') {
|
||||
this.sdt = 1
|
||||
} else if(item === 'dre') {
|
||||
this.dre = 1
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表格所选中得行内容
|
||||
rowValue(val) {
|
||||
this.selectedRowKeysValue = val
|
||||
@@ -239,9 +281,29 @@ export default {
|
||||
this.selectedRowKeys = val,
|
||||
this.selectedRowKeysArray = val.join(',')
|
||||
},
|
||||
// 冻结配置
|
||||
freezeConfiguration() {
|
||||
// 先判断是否有权限
|
||||
let permission = this.permission()
|
||||
if(permission) {
|
||||
console.log('拥有冻结配置权限')
|
||||
}
|
||||
},
|
||||
// 下发收集
|
||||
distributionAndCollection() {
|
||||
// 先判断是否有权限
|
||||
let permission = this.permission()
|
||||
if(permission) {
|
||||
console.log('拥有下发收集权限')
|
||||
}
|
||||
},
|
||||
// 添加
|
||||
handleAdd() {
|
||||
this.areaVisible = true
|
||||
// 先判断是否有权限
|
||||
let permission = this.permission()
|
||||
if(permission) {
|
||||
this.areaVisible = true
|
||||
}
|
||||
},
|
||||
// 提交
|
||||
handleSubmit() {
|
||||
@@ -284,47 +346,51 @@ export default {
|
||||
this.$refs.CollectionTabel.getTableListReset()
|
||||
},
|
||||
handleDel(){
|
||||
let param={
|
||||
ids: this.selectedRowKeysArray
|
||||
}
|
||||
if (this.selectedRowKeys.length > 0) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmBatchDeletion'),
|
||||
onOk() {
|
||||
axios({
|
||||
url: '/jero-boot/params/collectManifest/deleteBatch',
|
||||
method: 'post',
|
||||
data: param,
|
||||
transformRequest: [function (data) {
|
||||
let ret = ''
|
||||
for (let it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token':_this.token
|
||||
}
|
||||
})
|
||||
.then( (res) =>{
|
||||
if (res.data.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.selectedRowKeys = []
|
||||
_this.$refs.CollectionTabel.getData()
|
||||
_this.$refs.CollectionTabel.getTableList()
|
||||
}else{
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
// 先判断是否有权限
|
||||
let permission = this.permission()
|
||||
if(permission) {
|
||||
let param={
|
||||
ids: this.selectedRowKeysArray
|
||||
}
|
||||
if (this.selectedRowKeys.length > 0) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmBatchDeletion'),
|
||||
onOk() {
|
||||
axios({
|
||||
url: '/jero-boot/params/collectManifest/deleteBatch',
|
||||
method: 'post',
|
||||
data: param,
|
||||
transformRequest: [function (data) {
|
||||
let ret = ''
|
||||
for (let it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token':_this.token
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
.then( (res) =>{
|
||||
if (res.data.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.selectedRowKeys = []
|
||||
_this.$refs.CollectionTabel.getData()
|
||||
_this.$refs.CollectionTabel.getTableList()
|
||||
}else{
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
}
|
||||
},
|
||||
pageOnChange() {
|
||||
|
||||
@@ -4,23 +4,128 @@
|
||||
<div id="main-left"></div>
|
||||
</div>
|
||||
<div class="box-content-right">
|
||||
<div id="main-right"></div>
|
||||
<div id="main-right">
|
||||
<a-table
|
||||
ref="table"
|
||||
:loading="loading"
|
||||
:pagination="false"
|
||||
:scroll="{x: true}"
|
||||
:data-source="dataSource"
|
||||
:columns="columns"
|
||||
>
|
||||
<template slot="footer" slot-scope="currentPageData">
|
||||
{{$t('totalTable')}}:{{certificationProgressTotal}}
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'certificationProgress',
|
||||
data() {
|
||||
return {}
|
||||
return {
|
||||
loading: false,
|
||||
dataSource: [],
|
||||
certificationProgressTotal: 0,
|
||||
url: {
|
||||
getProjectDetailsStatistics: '/project/projectLibraryBase/getProjectDetailsStatistics'
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('notInvolved'),
|
||||
align: 'center',
|
||||
dataIndex: 'notInvolved'
|
||||
},
|
||||
{
|
||||
title: this.$t('toBeStarted'),
|
||||
align: 'center',
|
||||
dataIndex: 'toBeStarted'
|
||||
},
|
||||
{
|
||||
title: this.$t('inProgress'),
|
||||
align: 'center',
|
||||
dataIndex: 'inProgress'
|
||||
},
|
||||
{
|
||||
title: this.$t('experimentFailed'),
|
||||
align: 'center',
|
||||
dataIndex: 'experimentFailed'
|
||||
},
|
||||
{
|
||||
title: this.$t('experimentPassed'),
|
||||
align: 'center',
|
||||
dataIndex: 'experimentPassed'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.mainLeftEcharts()
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
getAction(this.url.getProjectDetailsStatistics, { id: this.$route.query.id }).then((res) => {
|
||||
if (res.success) {
|
||||
let certificationProgressMap = res.result.certificationProgressMap.certificationProgressMapList || []
|
||||
this.certificationProgressTotal = res.result.certificationProgressMap.certificationProgressTotal
|
||||
this.dataEcharts(certificationProgressMap)
|
||||
}
|
||||
})
|
||||
},
|
||||
dataEcharts(val) {
|
||||
let data = []
|
||||
let color = []
|
||||
this.dataSource = []
|
||||
if (val && val.length > 0) {
|
||||
this.dataSource = [{}]
|
||||
val.forEach(res => {
|
||||
if (res.certificationProgress == 'NA') {
|
||||
data.push({
|
||||
value: res.certificationProgressCount,
|
||||
name: this.$t('notInvolved')
|
||||
})
|
||||
color.push('#9DB9D4')
|
||||
this.dataSource[0].notInvolved = res.certificationProgressCount
|
||||
} else if (res.certificationProgress == 'Not start') {
|
||||
data.push({
|
||||
value: res.certificationProgressCount,
|
||||
name: this.$t('toBeStarted')
|
||||
})
|
||||
color.push('#FDB033')
|
||||
this.dataSource[0].toBeStarted = res.certificationProgressCount
|
||||
} else if (res.certificationProgress == 'In progress') {
|
||||
data.push({
|
||||
value: res.certificationProgressCount,
|
||||
name: this.$t('inProgress')
|
||||
})
|
||||
color.push('#FF8543')
|
||||
this.dataSource[0].inProgress = res.certificationProgressCount
|
||||
} else if (res.certificationProgress == 'Test failed') {
|
||||
data.push({
|
||||
value: res.certificationProgressCount,
|
||||
name: this.$t('experimentFailed')
|
||||
})
|
||||
color.push('#FF8543')
|
||||
this.dataSource[0].experimentFailed = res.certificationProgressCount
|
||||
} else if (res.certificationProgress == 'Test passed') {
|
||||
data.push({
|
||||
value: res.certificationProgressCount,
|
||||
name: this.$t('experimentPassed')
|
||||
})
|
||||
color.push('#2F8DF3')
|
||||
this.dataSource[0].experimentPassed = res.certificationProgressCount
|
||||
}
|
||||
})
|
||||
}
|
||||
this.mainLeftEcharts(data, color)
|
||||
},
|
||||
getEcharts(chart, title, color, data) {
|
||||
var myChart = echarts.init(document.getElementById(chart))
|
||||
myChart.setOption({
|
||||
@@ -57,13 +162,8 @@
|
||||
]
|
||||
})
|
||||
},
|
||||
mainLeftEcharts() {
|
||||
let data = [
|
||||
{ value: 1048, name: '待审查' },
|
||||
{ value: 735, name: '审查中' },
|
||||
{ value: 580, name: '审查完成' }
|
||||
]
|
||||
this.getEcharts('main-left', '内部审查进度', ['#00BEBE', '#FDB033', '#2F8DF3'], data)
|
||||
mainLeftEcharts(data, color) {
|
||||
this.getEcharts('main-left', this.$t('CertificationProgress'), color, data)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+68
-22
@@ -1,5 +1,11 @@
|
||||
<template>
|
||||
<div class="box-content">
|
||||
<div class="headerText">
|
||||
{{this.$t('redSchedule')}};
|
||||
{{this.$t('yellowSchedule')}};
|
||||
{{this.$t('greenRequirements')}};
|
||||
{{this.$t('blueUndeterminedState')}};
|
||||
</div>
|
||||
<div class="box-content-left">
|
||||
<div id="main-left"></div>
|
||||
</div>
|
||||
@@ -13,6 +19,9 @@
|
||||
:data-source="dataSource"
|
||||
:columns="columns"
|
||||
>
|
||||
<template slot="footer" slot-scope="currentPageData">
|
||||
{{$t('totalTable')}}:{{currentProjectStatusTotal}}
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -29,46 +38,45 @@
|
||||
return {
|
||||
loading: false,
|
||||
dataSource: [],
|
||||
currentProjectStatusTotal: 0,
|
||||
url: {
|
||||
getProjectDetailsStatistics: '/project/projectLibraryBase/getProjectDetailsStatistics'
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('nonConformity'),
|
||||
title: this.$t('red'),
|
||||
align: 'center',
|
||||
dataIndex: 'nonConformity',
|
||||
scopedSlots: { customRender: 'titleName' }
|
||||
dataIndex: 'redCount'
|
||||
},
|
||||
{
|
||||
title: this.$t('Tracked'),
|
||||
title: this.$t('yellow'),
|
||||
align: 'center',
|
||||
dataIndex: 'Tracked',
|
||||
scopedSlots: { customRender: 'titleName' }
|
||||
dataIndex: 'yellowCount'
|
||||
},
|
||||
{
|
||||
title: this.$t('accord'),
|
||||
title: this.$t('green'),
|
||||
align: 'center',
|
||||
dataIndex: 'accord',
|
||||
scopedSlots: { customRender: 'titleName' }
|
||||
dataIndex: 'greenCount'
|
||||
},
|
||||
{
|
||||
title: this.$t('notEvaluated'),
|
||||
title: this.$t('blue'),
|
||||
align: 'center',
|
||||
dataIndex: 'notEvaluated',
|
||||
scopedSlots: { customRender: 'titleName' }
|
||||
dataIndex: 'blueCount'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.mainLeftEcharts()
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
getAction(this.url.getProjectDetailsStatistics, { id: this.$route.query.id }).then((res) => {
|
||||
if (res.success) {
|
||||
|
||||
this.dataSource = [{}]
|
||||
let dataSource = res.result.currentProjectStatusMap.currentProjectStatusMapList || []
|
||||
this.mainLeftEcharts(dataSource)
|
||||
this.currentProjectStatusTotal = res.result.currentProjectStatusMap.currentProjectStatusTotal
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -108,14 +116,43 @@
|
||||
]
|
||||
})
|
||||
},
|
||||
mainLeftEcharts() {
|
||||
let data = [
|
||||
{ value: 1048, name: this.$t('nonConformity') },
|
||||
{ value: 735, name: this.$t('Tracked') },
|
||||
{ value: 580, name: this.$t('accord') },
|
||||
{ value: 580, name: this.$t('notEvaluated') }
|
||||
]
|
||||
this.getEcharts('main-left', this.$t('CurrentStatusOfTheProject'), ['#2F8DF3', '#FF8543', '#37CED1', '#FDB033', '#9DB9D4'], data)
|
||||
mainLeftEcharts(dataSource) {
|
||||
let data = []
|
||||
let color = []
|
||||
if (dataSource && dataSource.length > 0) {
|
||||
dataSource.forEach(res => {
|
||||
if (res.color == '0') {
|
||||
data.push({
|
||||
value: res.conditionAssessmentCount,
|
||||
name: this.$t('blue')
|
||||
})
|
||||
color.push('#00B3BE')
|
||||
this.dataSource[0].blueCount = res.conditionAssessmentCount
|
||||
} else if (res.color == '1') {
|
||||
data.push({
|
||||
value: res.conditionAssessmentCount,
|
||||
name: this.$t('red')
|
||||
})
|
||||
color.push('#E83030')
|
||||
this.dataSource[0].redCount = res.conditionAssessmentCount
|
||||
} else if (res.color == '2') {
|
||||
data.push({
|
||||
value: res.conditionAssessmentCount,
|
||||
name: this.$t('yellow')
|
||||
})
|
||||
color.push('#FDA71C')
|
||||
this.dataSource[0].yellowCount = res.conditionAssessmentCount
|
||||
} else if (res.color == '3') {
|
||||
data.push({
|
||||
value: res.conditionAssessmentCount,
|
||||
name: this.$t('green')
|
||||
})
|
||||
this.dataSource[0].greenCount = res.conditionAssessmentCount
|
||||
color.push('#26BD4B')
|
||||
}
|
||||
})
|
||||
}
|
||||
this.getEcharts('main-left', this.$t('CurrentStatusOfTheProject'), color, data)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -130,6 +167,7 @@
|
||||
|
||||
.box-content-left {
|
||||
width: calc(50% - 12px);
|
||||
margin-top: 30px;
|
||||
height: 398px;
|
||||
border: 2px #eff1f3 solid;
|
||||
|
||||
@@ -143,6 +181,7 @@
|
||||
|
||||
.box-content-right {
|
||||
width: calc(50% - 12px);
|
||||
margin-top: 30px;
|
||||
height: 398px;
|
||||
border: 2px #eff1f3 solid;
|
||||
|
||||
@@ -154,4 +193,11 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.headerText {
|
||||
margin-left: 30px;
|
||||
color: #040B29;
|
||||
font-weight: 400;
|
||||
position: absolute;
|
||||
}
|
||||
</style>
|
||||
@@ -1,27 +1,152 @@
|
||||
<template>
|
||||
<div class="box-content">
|
||||
<div class="box-content-left">
|
||||
<div id="main-left"></div>
|
||||
<div>
|
||||
<div class="box-content">
|
||||
<div class="box-content-left">
|
||||
<div id="main-left"></div>
|
||||
</div>
|
||||
<div class="box-content-right">
|
||||
<div id="main-right"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-content-right">
|
||||
<div id="main-right"></div>
|
||||
<div class="box-content">
|
||||
<div class="box-content-left">
|
||||
<div id="main-left-content"></div>
|
||||
</div>
|
||||
<div class="box-content-right">
|
||||
<div id="main-right-content"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<div class="box-content-left">
|
||||
<div id="main-bottom"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'DeliverableStatusEchart',
|
||||
data() {
|
||||
return {}
|
||||
return {
|
||||
url: {
|
||||
getProjectDetailsStatistics: '/project/projectLibraryBase/getProjectDetailsStatistics'
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.mainLeftEcharts()
|
||||
this.mainLeftContentEcharts()
|
||||
this.mainRightEcharts()
|
||||
this.mainRightContentEcharts()
|
||||
this.mainBottomEcharts()
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
getAction(this.url.getProjectDetailsStatistics, { id: this.$route.query.id }).then((res) => {
|
||||
if (res.success) {
|
||||
let listingToConfirmMap = res.result.listingToConfirmMap.listingToConfirmMapList || []
|
||||
let taskToConfirmMap = res.result.taskToConfirmMap.taskToConfirmMapList || []
|
||||
let designComplianceMap = res.result.designComplianceMap.designComplianceMapList || []
|
||||
let prehomoMap = res.result.prehomoMap.prehomoMapList || []
|
||||
let verifyComplianceMap = res.result.verifyComplianceMap.verifyComplianceMapList || []
|
||||
this.dataEcharts(listingToConfirmMap, 1)
|
||||
this.dataEcharts(taskToConfirmMap, 2)
|
||||
this.dataEchartsOne(designComplianceMap, 1)
|
||||
this.dataEchartsOne(prehomoMap, 2)
|
||||
this.dataEchartsOne(verifyComplianceMap, 3)
|
||||
}
|
||||
})
|
||||
},
|
||||
dataEcharts(val, num) {
|
||||
let data = []
|
||||
let color = []
|
||||
if (val && val.length > 0) {
|
||||
val.forEach((res) => {
|
||||
if (res.inventoryAffirmStatus == 'Not started' || res.taskAffirmStatus == 'Not started') {
|
||||
data.push({
|
||||
value: res.inventoryAffirmStatusCount || res.taskAffirmStatusCount,
|
||||
name: this.$t('notLaunch')
|
||||
})
|
||||
color.push('#00BEBE')
|
||||
} else if (res.inventoryAffirmStatus == 'List to confirm' || res.taskAffirmStatus == 'List to confirm') {
|
||||
data.push({
|
||||
value: res.inventoryAffirmStatusCount || res.taskAffirmStatusCount,
|
||||
name: this.$t('toBeConfirmed')
|
||||
})
|
||||
color.push('#FDB033')
|
||||
} else if (res.inventoryAffirmStatus == 'Accepted' || res.taskAffirmStatus == 'Accepted') {
|
||||
data.push({
|
||||
value: res.inventoryAffirmStatusCount || res.taskAffirmStatusCount,
|
||||
name: this.$t('accept')
|
||||
})
|
||||
color.push('#2F8DF3')
|
||||
} else if (res.inventoryAffirmStatus == 'Rejected' || res.taskAffirmStatus == 'Rejected') {
|
||||
data.push({
|
||||
value: res.inventoryAffirmStatusCount || res.taskAffirmStatusCount,
|
||||
name: this.$t('refuse')
|
||||
})
|
||||
color.push('#9DB9D4')
|
||||
}
|
||||
})
|
||||
}
|
||||
if (num == 1) {
|
||||
this.mainLeftEcharts(data, color)
|
||||
} else {
|
||||
this.mainRightEcharts(data, color)
|
||||
}
|
||||
},
|
||||
dataEchartsOne(val, num) {
|
||||
let data = []
|
||||
let color = []
|
||||
if (val && val.length > 0) {
|
||||
val.forEach((res) => {
|
||||
if (res.designFlowTaskStatus == 'No rating' || res.prehomoFlowTaskStatus == 'No rating' || res.verifyFlowTaskStatus == 'No rating') {
|
||||
data.push({
|
||||
value: res.designFlowTaskStatusCount || res.prehomoFlowTaskStatusCount || res.verifyFlowTaskStatusCount,
|
||||
name: this.$t('toBeConfirmed')
|
||||
})
|
||||
color.push('#37CED1')
|
||||
} else if (res.designFlowTaskStatus == 'Compliance' || res.prehomoFlowTaskStatus == 'Compliance' || res.verifyFlowTaskStatus == 'Compliance') {
|
||||
data.push({
|
||||
value: res.designFlowTaskStatusCount || res.prehomoFlowTaskStatusCount || res.verifyFlowTaskStatusCount,
|
||||
name: this.$t('accord')
|
||||
})
|
||||
color.push('#2F8DF3')
|
||||
} else if (res.designFlowTaskStatus == 'Non-Compliance' || res.prehomoFlowTaskStatus == 'Non-Compliance' || res.verifyFlowTaskStatus == 'Non-Compliance') {
|
||||
data.push({
|
||||
value: res.designFlowTaskStatusCount || res.prehomoFlowTaskStatusCount || res.verifyFlowTaskStatusCount,
|
||||
name: this.$t('nonConformity')
|
||||
})
|
||||
color.push('#FF8543')
|
||||
} else if (res.designFlowTaskStatus == 'To be tracked' || res.prehomoFlowTaskStatus == 'To be tracked' || res.verifyFlowTaskStatus == 'To be tracked') {
|
||||
data.push({
|
||||
value: res.designFlowTaskStatusCount || res.prehomoFlowTaskStatusCount || res.verifyFlowTaskStatusCount,
|
||||
name: this.$t('Tracked')
|
||||
})
|
||||
color.push('#FDB033')
|
||||
} else if (res.designFlowTaskStatus == 'NA' || res.prehomoFlowTaskStatus == 'NA' || res.verifyFlowTaskStatus == 'NA') {
|
||||
data.push({
|
||||
value: res.designFlowTaskStatusCount || res.prehomoFlowTaskStatusCount || res.verifyFlowTaskStatusCount,
|
||||
name: this.$t('notInvolved')
|
||||
})
|
||||
color.push('#9DB9D4')
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
if (num == 1) {
|
||||
this.mainLeftContentEcharts(data, color)
|
||||
} else if (num == 2) {
|
||||
this.mainRightContentEcharts(data, color)
|
||||
} else if (num == 3) {
|
||||
this.mainBottomEcharts(data, color)
|
||||
}
|
||||
},
|
||||
getEcharts(chart, title, color, data) {
|
||||
var myChart = echarts.init(document.getElementById(chart))
|
||||
myChart.setOption({
|
||||
@@ -57,22 +182,26 @@
|
||||
}
|
||||
]
|
||||
})
|
||||
},
|
||||
mainLeftEcharts() {
|
||||
let data = [
|
||||
{ value: 1048, name: '待审查' },
|
||||
{ value: 735, name: '审查中' },
|
||||
{ value: 580, name: '审查完成' }
|
||||
]
|
||||
this.getEcharts('main-left', '内部审查进度', ['#00BEBE', '#FDB033', '#2F8DF3'], data)
|
||||
},
|
||||
mainRightEcharts() {
|
||||
let data = [
|
||||
{ value: 1048, name: '待审查' },
|
||||
{ value: 735, name: '审查中' },
|
||||
{ value: 580, name: '审查完成' }
|
||||
]
|
||||
this.getEcharts('main-right', '法规握手进度', ['#00BEBE', '#FDB033', '#2F8DF3'], data)
|
||||
}
|
||||
,
|
||||
mainLeftEcharts(data, color) {
|
||||
this.getEcharts('main-left', this.$t('listConfirmationProgress'), color, data)
|
||||
}
|
||||
,
|
||||
mainRightEcharts(data, color) {
|
||||
this.getEcharts('main-right', this.$t('taskConfirmationProgress'), color, data)
|
||||
}
|
||||
,
|
||||
mainLeftContentEcharts(data, color) {
|
||||
this.getEcharts('main-left-content', this.$t('designComplianceConfirmationProgress'), color, data)
|
||||
}
|
||||
,
|
||||
mainRightContentEcharts(data, color) {
|
||||
this.getEcharts('main-right-content', this.$t('preHomeConfirmProgress'), color, data)
|
||||
}
|
||||
,
|
||||
mainBottomEcharts(data, color) {
|
||||
this.getEcharts('main-bottom', this.$t('verificationComplianceConfirmationProgress'), color, data)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -83,6 +212,7 @@
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.box-content-left {
|
||||
width: calc(50% - 12px);
|
||||
@@ -95,6 +225,20 @@
|
||||
padding: 24px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#main-left-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 24px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#main-bottom {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 24px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
.box-content-right {
|
||||
@@ -108,6 +252,13 @@
|
||||
padding: 24px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#main-right-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 24px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -44,7 +44,7 @@
|
||||
size="middle"
|
||||
:loading="loading"
|
||||
:pagination="false"
|
||||
:scroll="{x: true}"
|
||||
:scroll="{x: true,y:500}"
|
||||
:data-source="dataSource"
|
||||
:columns="columns"
|
||||
>
|
||||
@@ -83,6 +83,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
data() {
|
||||
@@ -90,6 +92,9 @@
|
||||
queryParam: {},
|
||||
loading: false,
|
||||
dataSource: [],
|
||||
url: {
|
||||
list: '/project/ProjectStatusBoardController/scheduleInfoList'
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('entryName'),
|
||||
@@ -101,47 +106,47 @@
|
||||
{
|
||||
title: this.$t('targetMarket'),
|
||||
align: 'center',
|
||||
dataIndex: 'targetMarket_dictText',
|
||||
dataIndex: 'targetMarket',
|
||||
width: 180
|
||||
},
|
||||
{
|
||||
align: 'center',
|
||||
dataIndex: 'projectStatus_dictText',
|
||||
dataIndex: 'projectStatus',
|
||||
scopedSlots: { title: 'projectStatusTitle' },
|
||||
width: 240
|
||||
},
|
||||
{
|
||||
align: 'center',
|
||||
dataIndex: 'studioEngineerName',
|
||||
dataIndex: 'certificationProgress',
|
||||
width: 340,
|
||||
scopedSlots: { title: 'CertificationProgressTitle' }
|
||||
},
|
||||
{
|
||||
align: 'center',
|
||||
dataIndex: 'certificationEngineerName',
|
||||
dataIndex: 'inventory',
|
||||
width: 340,
|
||||
scopedSlots: { title: 'listConfirmationStatusTitle' }
|
||||
},
|
||||
{
|
||||
align: 'center',
|
||||
dataIndex: 'vehiclePlatform_dictText',
|
||||
dataIndex: 'task',
|
||||
width: 340,
|
||||
scopedSlots: { title: 'taskAffirmStatusTitle' }
|
||||
},
|
||||
{
|
||||
align: 'center',
|
||||
dataIndex: 'digitalPlatform_dictText',
|
||||
dataIndex: 'design',
|
||||
width: 440,
|
||||
scopedSlots: { title: 'designComplianceReviewTitle' }
|
||||
},
|
||||
{
|
||||
dataIndex: 'digitalPlatform',
|
||||
dataIndex: 'pre',
|
||||
align: 'center',
|
||||
width: 440,
|
||||
scopedSlots: { title: 'preHomeConfirmationTitle' }
|
||||
},
|
||||
{
|
||||
dataIndex: 'digitalPlatform',
|
||||
dataIndex: 'verify',
|
||||
align: 'center',
|
||||
width: 440,
|
||||
scopedSlots: { title: 'verificationComplianceReviewTitle' }
|
||||
@@ -150,6 +155,7 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
searchQuery() {
|
||||
@@ -157,6 +163,15 @@
|
||||
},
|
||||
searchReset() {
|
||||
|
||||
},
|
||||
getList() {
|
||||
getAction(this.url.list, {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSource = res.result || []
|
||||
} else {
|
||||
this.dataSource = []
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user