Merge remote-tracking branch 'origin/fix_20230911_UAT' into fix_20230911_UAT

This commit is contained in:
zyx.net
2023-10-12 15:10:43 +08:00
8 changed files with 187 additions and 45 deletions
@@ -80,6 +80,7 @@ import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO;
import com.jero.modules.todoCenter.entity.ProcessInfoEO;
import com.jero.modules.todoCenter.enums.TodoCenterStatusEnum;
import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService;
import com.jero.modules.todoCenter.service.IProcessInfoEOService;
import com.jero.modules.wkflow.enums.FlowTypeEnum;
@@ -3489,7 +3490,8 @@ public class PlatformProjectCertificationInventoryEOServiceImpl extends ServiceI
notStartedMap.put("taskAffirmStatus",TaskAffirmStatusEnum.NOT_STARTED.getValue());
notStartedMap.put("taskAffirmStatusCount",notStartedCount);
toConfirmMap.put("taskAffirmStatus",TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue());
toConfirmMap.put("taskAffirmStatus", TodoCenterStatusEnum.TO_SUBMIT.getValue());
// toConfirmMap.put("taskAffirmStatus",TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue());
toConfirmMap.put("taskAffirmStatusCount",toConfirmCount);
acceptedMap.put("taskAffirmStatus",CertificationInventoryFlowStatusEnum.REVIEW_AND_PASS.getValue());
@@ -77,6 +77,7 @@ import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
import com.jero.modules.system.util.StringUtils;
import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO;
import com.jero.modules.todoCenter.enums.TodoCenterStatusEnum;
import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService;
import com.jero.modules.top.entity.TopProjectEO;
import com.jero.modules.top.service.ITopProjectEOService;
@@ -2853,14 +2854,16 @@ public class PlatformProjectLibraryBaseServiceImpl extends ServiceImpl<PlatformP
"Pre-Homo";
String secondTitle = "责任领域(一级)," +
"未发起,待确认,接受,拒绝,完成度," +
"未发起,待确认,审查通过,审查退回,完成度";
"未发起,待提交,审查通过,审查退回,完成度";
// "未发起,待确认,审查通过,审查退回,完成度";
if(StringUtils.equals(cut,CutEnum.EN.getValue())){
sheetName = "Certification Activity Management";
firstTitle = "Authentication task confirmation," +
"Pre-Homo";
secondTitle = "Area of responsibility (level 1)," +
"Not launched,To be confirmed,Accept,Refuse,Degree of completion," +
"Not launched,To be confirmed,Review of the adoption,Review return,Degree of completion";
"Not launched,To submit,Review of the adoption,Review return,Degree of completion";
// "Not launched,To be confirmed,Review of the adoption,Review return,Degree of completion";
}
HSSFSheet sheet = workbook.createSheet(sheetName);
@@ -2983,7 +2986,7 @@ public class PlatformProjectLibraryBaseServiceImpl extends ServiceImpl<PlatformP
Map<String, Object> prehomoMap = this.projectLibraryStatisticsService.getPrehomoStatisticeGroupByTerritory(pciEoList, params);
Map<String, Object> prehomoNotStartedMap = (Map<String, Object>) prehomoMap.get(TaskAffirmStatusEnum.NOT_STARTED.getValue());
double prehomoNotStartedAmount = (double) prehomoNotStartedMap.get("amount");
Map<String, Object> prehomoToConfirmMap = (Map<String, Object>) prehomoMap.get(TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue());
Map<String, Object> prehomoToConfirmMap = (Map<String, Object>) prehomoMap.get(TodoCenterStatusEnum.TO_SUBMIT.getValue());
double prehomoToConfirmAmount = (double) prehomoToConfirmMap.get("amount");
Map<String, Object> prehomoAcceptedMap = (Map<String, Object>) prehomoMap.get(CertificationInventoryFlowStatusEnum.REVIEW_AND_PASS.getValue());
double prehomoAcceptedAmount = (double) prehomoAcceptedMap.get("amount");
@@ -75,6 +75,8 @@ public interface IProjectLibraryStatisticsService {
*/
Map<String, Object> getPartCertificationProgressStatisticsGroupByTerritory(List<ProjectCertificationInventoryEO> datas, Map<String, Object> params);
Map<String, Object> getPartCertificationProgressStatisticsGroupByTerritoryTemp(List<ProjectCertificationInventoryEO> datas, Map<String, Object> params);
/**
* 获取认证参数收集-统计信息
* @param datas
@@ -82,4 +84,6 @@ public interface IProjectLibraryStatisticsService {
* @return
*/
Map<String, Object> getParameterCollectingStatisticsGroupByTerritory(List<ParamsCollectManifestEO> datas, Map<String, Object> params);
Map<String, Object> getParameterCollectingStatisticsGroupByTerritoryExport(List<ParamsCollectManifestEO> datas, Map<String, Object> params);
}
@@ -83,6 +83,7 @@ import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO;
import com.jero.modules.todoCenter.entity.ProcessInfoEO;
import com.jero.modules.todoCenter.enums.TodoCenterStatusEnum;
import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService;
import com.jero.modules.todoCenter.service.IProcessInfoEOService;
import com.jero.modules.wkflow.enums.FlowTypeEnum;
@@ -3389,7 +3390,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
notStartedMap.put("taskAffirmStatus",TaskAffirmStatusEnum.NOT_STARTED.getValue());
notStartedMap.put("taskAffirmStatusCount",notStartedCount);
toConfirmMap.put("taskAffirmStatus",TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue());
toConfirmMap.put("taskAffirmStatus", TodoCenterStatusEnum.TO_SUBMIT.getValue());
// toConfirmMap.put("taskAffirmStatus",TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue());
toConfirmMap.put("taskAffirmStatusCount",toConfirmCount);
acceptedMap.put("taskAffirmStatus",CertificationInventoryFlowStatusEnum.REVIEW_AND_PASS.getValue());
@@ -75,6 +75,7 @@ import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
import com.jero.modules.system.util.StringUtils;
import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO;
import com.jero.modules.todoCenter.enums.TodoCenterStatusEnum;
import com.jero.modules.todoCenter.service.IProcessInfoDetailEOService;
import com.jero.modules.top.entity.TopProjectEO;
import com.jero.modules.top.service.ITopProjectEOService;
@@ -3146,8 +3147,12 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
"认证进度";
String secondTitle = "责任领域(一级)," +
"未发起,待确认,接受,拒绝,完成度," +
"未发起,待确认,审查通过,审查退回,完成度," +
"未开始,进行中,实验通过,实验失败,部件报告未上传,部件报告已上传,部件报告已入库,完成度";
"未发起,待提交,审查通过,审查退回,完成度," +
"未开始,进行中,实验通过,实验失败,完成度";
// String secondTitle = "责任领域(一级)," +
// "未发起,待确认,接受,拒绝,完成度," +
// "未发起,待确认,审查通过,审查退回,完成度," +
// "未开始,进行中,实验通过,实验失败,部件报告未上传,部件报告已上传,部件报告已入库,完成度";
if(StringUtils.equals(cut,CutEnum.EN.getValue())){
sheetName = "Certification Activity Management";
firstTitle = "Authentication task confirmation," +
@@ -3155,8 +3160,12 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
"Certification progress";
secondTitle = "Area of responsibility (level 1)," +
"Not launched,To be confirmed,Accept,Refuse,Degree of completion," +
"Not launched,To be confirmed,Review of the adoption,Review return,Degree of completion," +
"Not started,In progress,Experiment passed,Experiment failed,Parts report not uploaded,Parts report uploaded,Parts report in stock,Degree of completion";
"Not launched,To submit,Review of the adoption,Review return,Degree of completion," +
"Not started,In progress,Experiment passed,Experiment failed,Degree of completion";
// secondTitle = "Area of responsibility (level 1)," +
// "Not launched,To be confirmed,Accept,Refuse,Degree of completion," +
// "Not launched,To be confirmed,Review of the adoption,Review return,Degree of completion," +
// "Not started,In progress,Experiment passed,Experiment failed,Parts report not uploaded,Parts report uploaded,Parts report in stock,Degree of completion";
}
HSSFSheet sheet = workbook.createSheet(sheetName);
@@ -3165,10 +3174,11 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
sheet.addMergedRegion(region1);
CellRangeAddress region2 = new CellRangeAddress(0, 0, 6, 10);
sheet.addMergedRegion(region2);
CellRangeAddress region3 = new CellRangeAddress(0, 0, 11, 18);
CellRangeAddress region3 = new CellRangeAddress(0, 0, 11, 15);
// CellRangeAddress region3 = new CellRangeAddress(0, 0, 11, 18);
sheet.addMergedRegion(region3);
CellRangeAddress region4 = new CellRangeAddress(0, 0, 19, 23);
sheet.addMergedRegion(region4);
// CellRangeAddress region4 = new CellRangeAddress(0, 0, 19, 23);
// sheet.addMergedRegion(region4);
String[] firstTitleArr = firstTitle.split(",");
String[] secondTitleArr = secondTitle.split(",");
@@ -3177,7 +3187,7 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
CellStyle cellStyleTitle = workbook.createCellStyle();
cellStyleTitle.setAlignment(HorizontalAlignment.CENTER);
for (int i = 0; i <= 18; i++){
for (int i = 0; i <= 15; i++){
sheet.setColumnWidth(i, 3500);
Cell firstRowCell = firstRow.createCell(i);
firstRowCell.setCellStyle(cellStyleTitle);
@@ -3187,9 +3197,10 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
firstRowCell.setCellValue(firstTitleArr[1]);
}else if(i==11){
firstRowCell.setCellValue(firstTitleArr[2]);
}else if(i==19){
firstRowCell.setCellValue(firstTitleArr[3]);
}
// else if(i==19){
// firstRowCell.setCellValue(firstTitleArr[3]);
// }
Cell secondRowCell = secondRow.createCell(i);
secondRowCell.setCellValue(secondTitleArr[i]);
}
@@ -3278,7 +3289,8 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
Map<String, Object> prehomoMap = this.projectLibraryStatisticsService.getPrehomoStatisticeGroupByTerritory(pciEoList, params);
Map<String, Object> prehomoNotStartedMap = (Map<String, Object>) prehomoMap.get(TaskAffirmStatusEnum.NOT_STARTED.getValue());
double prehomoNotStartedAmount = (double) prehomoNotStartedMap.get("amount");
Map<String, Object> prehomoToConfirmMap = (Map<String, Object>) prehomoMap.get(TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue());
Map<String, Object> prehomoToConfirmMap = (Map<String, Object>) prehomoMap.get(TodoCenterStatusEnum.TO_SUBMIT.getValue());
// Map<String, Object> prehomoToConfirmMap = (Map<String, Object>) prehomoMap.get(TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue());
double prehomoToConfirmAmount = (double) prehomoToConfirmMap.get("amount");
Map<String, Object> prehomoAcceptedMap = (Map<String, Object>) prehomoMap.get(CertificationInventoryFlowStatusEnum.REVIEW_AND_PASS.getValue());
double prehomoAcceptedAmount = (double) prehomoAcceptedMap.get("amount");
@@ -3293,7 +3305,7 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
String prehomoPercentageStr = (prehomoPercentage != 0 && (prehomoCount !=0 )) ? df.format(prehomoPercentage) : "0";
dataRow.createCell(10).setCellValue(prehomoPercentageStr + percentSign);
Map<String, Object> certificationProgressMap = this.projectLibraryStatisticsService.getPartCertificationProgressStatisticsGroupByTerritory(pciEoList, params);
Map<String, Object> certificationProgressMap = this.projectLibraryStatisticsService.getPartCertificationProgressStatisticsGroupByTerritoryTemp(pciEoList, params);
Map<String, Object> certificationProgressNotStartMap = (Map<String, Object>)certificationProgressMap.get(CertificationProgressEnum.NOT_START.getValue());
double certificationProgressNotStartAmount = (double) certificationProgressNotStartMap.get("amount");
Map<String, Object> certificationProgressInProgressMap = (Map<String, Object>)certificationProgressMap.get(CertificationProgressEnum.IN_PROGRESS.getValue());
@@ -3302,26 +3314,15 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
double certificationProgressTestPassedAmount = (double) certificationProgressTestPassedMap.get("amount");
Map<String, Object> certificationProgressTestFailedMap = (Map<String, Object>)certificationProgressMap.get(CertificationProgressEnum.TEST_FAILED.getValue());
double certificationProgressTestFailedAmount = (double) certificationProgressTestFailedMap.get("amount");
Map<String, Object> certificationProgressNotSubmitMap = (Map<String, Object>)certificationProgressMap.get(CertificationProgressEnum.COMPONENT_REPORT_NOT_SUBMITTED.getValue());
double certificationProgressNotSubmitAmount = (double) certificationProgressNotSubmitMap.get("amount");
Map<String, Object> certificationProgressSubmitMap = (Map<String, Object>)certificationProgressMap.get(CertificationProgressEnum.COMPONENT_REPORT_SUBMITTED.getValue());
double certificationProgressSubmitAmount = (double) certificationProgressSubmitMap.get("amount");
Map<String, Object> certificationProgressStoredMap = (Map<String, Object>)certificationProgressMap.get(CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue());
double certificationProgressStoredAmount = (double) certificationProgressStoredMap.get("amount");
dataRow.createCell(11).setCellValue(certificationProgressNotStartAmount);
dataRow.createCell(12).setCellValue(certificationProgressInProgressAmount);
dataRow.createCell(13).setCellValue(certificationProgressTestPassedAmount);
dataRow.createCell(14).setCellValue(certificationProgressTestFailedAmount);
dataRow.createCell(15).setCellValue(certificationProgressNotSubmitAmount);
dataRow.createCell(16).setCellValue(certificationProgressSubmitAmount);
dataRow.createCell(17).setCellValue(certificationProgressStoredAmount);
double certificationProgressCount = certificationProgressNotStartAmount + certificationProgressInProgressAmount
+ certificationProgressTestPassedAmount + certificationProgressTestFailedAmount
+ certificationProgressNotSubmitAmount + certificationProgressSubmitAmount
+ certificationProgressStoredAmount;
+ certificationProgressTestPassedAmount + certificationProgressTestFailedAmount;
double certificationProgressPercentage = (certificationProgressTestPassedAmount / certificationProgressCount) * 100;
String certificationProgressPercentageStr = (certificationProgressPercentage != 0 && (certificationProgressCount !=0 )) ? df.format(certificationProgressPercentage) : "0";
dataRow.createCell(18).setCellValue(certificationProgressPercentageStr + percentSign);
dataRow.createCell(15).setCellValue(certificationProgressPercentageStr + percentSign);
}
/**
@@ -3514,7 +3515,7 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
* @param pcmEos
*/
private void exportParameterCollectingSetData(Map<String, Object> params, HSSFSheet sheet, int dataIndex, String key, List<ParamsCollectManifestEO> pcmEos) {
Map<String, Object> parameterCollectingMap = this.projectLibraryStatisticsService.getParameterCollectingStatisticsGroupByTerritory(pcmEos,params);
Map<String, Object> parameterCollectingMap = this.projectLibraryStatisticsService.getParameterCollectingStatisticsGroupByTerritoryExport(pcmEos,params);
Map<String, Object> notStartMap = (Map<String, Object>) parameterCollectingMap.get(CollectManifestStatisticsStateEnum.NOT_START.getValue());
double notStartAmount = (double) notStartMap.get("amount");
Map<String, Object> collectingMap = (Map<String, Object>) parameterCollectingMap.get(CollectManifestStatisticsStateEnum.COLLECTING.getValue());
@@ -12,6 +12,7 @@ import com.jero.modules.project.enums.TaskAffirmStatusEnum;
import com.jero.modules.project.service.IProjectCertificationInventoryEOService;
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
import com.jero.modules.project.service.IProjectLibraryStatisticsService;
import com.jero.modules.todoCenter.enums.TodoCenterStatusEnum;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -360,6 +361,7 @@ public class ProjectLibraryStatisticsServiceImpl implements IProjectLibraryStati
result.put(TaskAffirmStatusEnum.NOT_STARTED.getValue(),notStartedMap);
result.put(TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue(),toConfirmMap);
// result.put(TodoCenterStatusEnum.TO_SUBMIT.getValue(),acceptedMap);
result.put(TaskAffirmStatusEnum.ACCEPTED.getValue(),acceptedMap);
result.put(TaskAffirmStatusEnum.REJECTED.getValue(),rejectedMap);
}
@@ -395,7 +397,7 @@ public class ProjectLibraryStatisticsServiceImpl implements IProjectLibraryStati
notStartedMap.put("amount",notStartedCount);
notStartedMap.put("percentage",notStartedPercentageStr + percentSign);
// 待确认
// 待提交
List<ProjectCertificationInventoryEO> toConfirmPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getFlowStatus(),CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
@@ -436,7 +438,8 @@ public class ProjectLibraryStatisticsServiceImpl implements IProjectLibraryStati
rejectedMap.put("percentage",rejectedPercentageStr + percentSign);
result.put(TaskAffirmStatusEnum.NOT_STARTED.getValue(),notStartedMap);
result.put(TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue(),toConfirmMap);
// result.put(TaskAffirmStatusEnum.LIST_TO_CONFIRM.getValue(),toConfirmMap);
result.put(TodoCenterStatusEnum.TO_SUBMIT.getValue(),acceptedMap);
result.put(CertificationInventoryFlowStatusEnum.REVIEW_AND_PASS.getValue(),acceptedMap);
result.put(CertificationInventoryFlowStatusEnum.REVIEW_AND_RETURN.getValue(),rejectedMap);
}
@@ -514,7 +517,6 @@ public class ProjectLibraryStatisticsServiceImpl implements IProjectLibraryStati
}
return result;
}
@Override
public Map<String, Object> getCarCertificationProgressStatisticsGroupByTerritory(List<ProjectCertificationInventoryEO> datas, Map<String, Object> params) {
Map<String, Object> result = new HashMap<>();
@@ -695,6 +697,76 @@ public class ProjectLibraryStatisticsServiceImpl implements IProjectLibraryStati
}
return result;
}
@Override
public Map<String, Object> getPartCertificationProgressStatisticsGroupByTerritoryTemp(List<ProjectCertificationInventoryEO> datas, Map<String, Object> params) {
Map<String, Object> result = new HashMap<>();
if(CollectionUtils.isNotEmpty(datas)){
Map<String,Object> notStartMap = new HashMap<>();
Map<String,Object> inProgressMap = new HashMap<>();
Map<String,Object> testPassedMap = new HashMap<>();
Map<String,Object> testFailedMap = new HashMap<>();
// 未开始
List<ProjectCertificationInventoryEO> notStartPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.NOT_START.getValue())
);
return flag;
}).collect(Collectors.toList());
double notStartCount = (double) notStartPciEoList.size();
double notStartPercentage = (notStartCount / (datas.size())) * 100;
String notStartPercentageStr = notStartPercentage != 0 ? df.format(notStartPercentage) : "0";
notStartMap.put("amount",notStartCount);
notStartMap.put("percentage",notStartPercentageStr + percentSign);
// 进行中
List<ProjectCertificationInventoryEO> inProgressPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.IN_PROGRESS.getValue())
|| StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.COMPONENT_REPORT_NOT_SUBMITTED.getValue())
);
return flag;
}).collect(Collectors.toList());
double inProgressCount = (double) inProgressPciEoList.size();
double inProgressPercentage = (inProgressCount / (datas.size())) * 100;
String inProgressPercentageStr = inProgressPercentage != 0 ? df.format(inProgressPercentage) : "0";
inProgressMap.put("amount",inProgressCount);
inProgressMap.put("percentage",inProgressPercentageStr + percentSign);
// 实验通过
List<ProjectCertificationInventoryEO> testPassedPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.TEST_PASSED.getValue())
|| StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.COMPONENT_REPORT_SUBMITTED.getValue())
|| StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.COMPONENT_REPORT_HAS_BEEN_STORED.getValue())
);
return flag;
}).collect(Collectors.toList());
double testPassedCount = (double) testPassedPciEoList.size();
double testPassedPercentage = (testPassedCount / (datas.size())) * 100;
String testPassedPercentageStr = testPassedPercentage != 0 ? df.format(testPassedPercentage) : "0";
testPassedMap.put("amount",testPassedCount);
testPassedMap.put("percentage",testPassedPercentageStr + percentSign);
// 实验失败
List<ProjectCertificationInventoryEO> testFailedPciEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getCertificationProgress(),CertificationProgressEnum.TEST_FAILED.getValue())
);
return flag;
}).collect(Collectors.toList());
double testFailedCount = (double) testFailedPciEoList.size();
double testFailedPercentage = (testFailedCount / (datas.size())) * 100;
String testFailedPercentageStr = testFailedPercentage != 0 ? df.format(testFailedPercentage) : "0";
testFailedMap.put("amount",testFailedCount);
testFailedMap.put("percentage",testFailedPercentageStr + percentSign);
result.put(CertificationProgressEnum.NOT_START.getValue(),notStartMap);
result.put(CertificationProgressEnum.IN_PROGRESS.getValue(),inProgressMap);
result.put(CertificationProgressEnum.TEST_PASSED.getValue(),testPassedMap);
result.put(CertificationProgressEnum.TEST_FAILED.getValue(),testFailedMap);
}
return result;
}
@Override
public Map<String, Object> getParameterCollectingStatisticsGroupByTerritory(List<ParamsCollectManifestEO> datas, Map<String, Object> params) {
@@ -704,7 +776,7 @@ public class ProjectLibraryStatisticsServiceImpl implements IProjectLibraryStati
Map<String,Object> collectingMap = new HashMap<>();
Map<String,Object> submitMap = new HashMap<>();
Map<String,Object> syncReporMap = new HashMap<>();
//未发起
List<ParamsCollectManifestEO> notStartPcmEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getState(), CollectManifestStateEnum.WAIT_COLLECT.getValue())
@@ -715,7 +787,7 @@ public class ProjectLibraryStatisticsServiceImpl implements IProjectLibraryStati
}).collect(Collectors.toList());
double notStartCount = (double) notStartPcmEoList.size();
notStartMap.put("amount",notStartCount);
//收集中
List<ParamsCollectManifestEO> collectingPcmEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getState(), CollectManifestStateEnum.WAIT_FILL.getValue())
@@ -727,7 +799,7 @@ public class ProjectLibraryStatisticsServiceImpl implements IProjectLibraryStati
}).collect(Collectors.toList());
double collectingCount = (double) collectingPcmEoList.size();
collectingMap.put("amount",collectingCount);
//已提交
List<ParamsCollectManifestEO> submitPcmEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getState(), CollectManifestStateEnum.SUBMIT.getValue())
@@ -736,7 +808,65 @@ public class ProjectLibraryStatisticsServiceImpl implements IProjectLibraryStati
}).collect(Collectors.toList());
double submitCount = (double) submitPcmEoList.size();
submitMap.put("amount",submitCount);
//已同步至上报库
List<ParamsCollectManifestEO> syncReporPcmEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getState(), CollectManifestStateEnum.SYNC_REPORT.getValue())
);
return flag;
}).collect(Collectors.toList());
double syncReporCount = (double) syncReporPcmEoList.size();
syncReporMap.put("amount",syncReporCount);
result.put(CollectManifestStatisticsStateEnum.NOT_START.getValue(),notStartMap);
result.put(CollectManifestStatisticsStateEnum.COLLECTING.getValue(),collectingMap);
result.put(CollectManifestStatisticsStateEnum.SUBMIT.getValue(),submitMap);
result.put(CollectManifestStatisticsStateEnum.SYNC_REPORT.getValue(),syncReporMap);
}
return result;
}
@Override
public Map<String, Object> getParameterCollectingStatisticsGroupByTerritoryExport(List<ParamsCollectManifestEO> datas, Map<String, Object> params) {
Map<String, Object> result = new HashMap<>();
if(CollectionUtils.isNotEmpty(datas)){
Map<String,Object> notStartMap = new HashMap<>();
Map<String,Object> collectingMap = new HashMap<>();
Map<String,Object> submitMap = new HashMap<>();
Map<String,Object> syncReporMap = new HashMap<>();
//未发起
List<ParamsCollectManifestEO> notStartPcmEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getState(), CollectManifestStateEnum.WAIT_COLLECT.getValue())
|| StringUtils.equals(data.getState(), CollectManifestStateEnum.SDT_BACK.getValue())
// || StringUtils.equals(data.getState(), CollectManifestStateEnum.CHANGE.getValue())
);
return flag;
}).collect(Collectors.toList());
double notStartCount = (double) notStartPcmEoList.size();
notStartMap.put("amount",notStartCount);
//收集中
List<ParamsCollectManifestEO> collectingPcmEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getState(), CollectManifestStateEnum.WAIT_FILL.getValue())
|| StringUtils.equals(data.getState(),CollectManifestStateEnum.WAIT_SDT.getValue())
|| StringUtils.equals(data.getState(),CollectManifestStateEnum.DRE_BACK.getValue())
|| StringUtils.equals(data.getState(),CollectManifestStateEnum.CERT_BACK.getValue())
);
return flag;
}).collect(Collectors.toList());
double collectingCount = (double) collectingPcmEoList.size();
collectingMap.put("amount",collectingCount);
//已提交
List<ParamsCollectManifestEO> submitPcmEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getState(), CollectManifestStateEnum.SUBMIT.getValue())
|| StringUtils.equals(data.getState(), CollectManifestStateEnum.CHANGE.getValue())
);
return flag;
}).collect(Collectors.toList());
double submitCount = (double) submitPcmEoList.size();
submitMap.put("amount",submitCount);
//已同步至上报库
List<ParamsCollectManifestEO> syncReporPcmEoList = datas.stream().filter(data -> {
boolean flag = (
StringUtils.equals(data.getState(), CollectManifestStateEnum.SYNC_REPORT.getValue())
@@ -118,10 +118,10 @@
status: res.taskAffirmStatus
})
color.push('#00B3BE')
} else if (res.taskAffirmStatus == 'List to confirm') {
} else if (res.taskAffirmStatus == 'To submit') {
data.push({
value: res.taskAffirmStatusCount,
name: this.$t('listToConfirm'),
name: this.$t('toSubmit'),
color: '#FDA71C',
status: res.taskAffirmStatus
})
@@ -163,10 +163,10 @@
status: res.taskAffirmStatus
})
color.push('#00B3BE')
} else if (res.taskAffirmStatus == 'List to confirm') {
} else if (res.taskAffirmStatus == 'To submit') {
data.push({
value: res.taskAffirmStatusCount,
name: this.$t('listToConfirm'),
name: this.$t('toSubmit'),
color: '#FDA71C',
status: res.taskAffirmStatus
})
@@ -117,10 +117,10 @@
status: res.taskAffirmStatus
})
color.push('#00B3BE')
} else if (res.taskAffirmStatus == 'List to confirm') {
} else if (res.taskAffirmStatus == 'To submit') {
data.push({
value: res.taskAffirmStatusCount,
name: this.$t('listToConfirm'),
name: this.$t('toSubmit'),
color: '#FDA71C',
status: res.taskAffirmStatus
})
@@ -162,10 +162,10 @@
status: res.taskAffirmStatus
})
color.push('#00B3BE')
} else if (res.taskAffirmStatus == 'List to confirm') {
} else if (res.taskAffirmStatus == 'To submit') {
data.push({
value: res.taskAffirmStatusCount,
name: this.$t('listToConfirm'),
name: this.$t('toSubmit'),
color: '#FDA71C',
status: res.taskAffirmStatus
})