Merge remote-tracking branch 'origin/fix_20230420' into fix_20230420
This commit is contained in:
+9
-1
@@ -271,11 +271,19 @@ public class ProjectLibraryBaseController extends JeroController<ProjectLibraryB
|
||||
}
|
||||
|
||||
@AutoLog(value = "对接火山引擎接口getProjectInfo")
|
||||
@ApiOperation(value="对接火山引擎接口-获取项目统计信息", notes="对接火山引擎接口-获取项目统计信息")
|
||||
@ApiOperation(value="对接火山引擎接口-获取项目统计信息1", notes="对接火山引擎接口-获取项目统计信息1")
|
||||
@PostMapping(value = "/getProjectInfo")
|
||||
public Result<?> getProjectInfo(){
|
||||
JSONArray resList = projectLibraryBaseService.getProjectInfo();
|
||||
return Result.OK(resList);
|
||||
}
|
||||
|
||||
@AutoLog(value = "对接火山引擎接口getProjectProgressInfo")
|
||||
@ApiOperation(value="对接火山引擎接口-获取项目统计信息2", notes="对接火山引擎接口-获取项目统计信息2")
|
||||
@PostMapping(value = "/getProjectProgressInfo")
|
||||
public Result<?> getProjectProgressInfo(){
|
||||
JSONArray resList = this.projectLibraryBaseService.getProjectProgressInfo();
|
||||
return Result.OK(resList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
package com.jero.modules.project.enums;
|
||||
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
/**
|
||||
* 火山引擎对接-统计节点枚举类
|
||||
*/
|
||||
public enum HSStatisticalNodesEnum {
|
||||
HS_FGRWQR("法规任务确认","Confirmation of regulatory tasks","1"),
|
||||
HS_RZRWQR("认证任务确认","Certification task confirmation","2"),
|
||||
HS_SJFHX("设计符合性流程","Design Compliance Process","3"),
|
||||
HS_PRE_HOMO("Pre-Homo流程","Pre Homo Process","4"),
|
||||
HS_RZJD("认证进度","Certification progress","5"),
|
||||
HS_YZFHX("验证符合性流程","Verification of compliance process","6"),
|
||||
HS_CSSJJD("参数收集进度","Parameter Collection Progress","7"),
|
||||
;
|
||||
|
||||
|
||||
String cnName;
|
||||
String enName;
|
||||
String value;
|
||||
|
||||
private HSStatisticalNodesEnum(String cnName, String enName, String value) {
|
||||
this.cnName = cnName;
|
||||
this.enName = enName;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getCnName() {
|
||||
return cnName;
|
||||
}
|
||||
|
||||
public void setCnName(String cnName) {
|
||||
this.cnName = cnName;
|
||||
}
|
||||
|
||||
public String getEnName() {
|
||||
return enName;
|
||||
}
|
||||
|
||||
public void setEnName(String enName) {
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static String getTextByValue(String value,String cut) {
|
||||
HSStatisticalNodesEnum[] values = values();
|
||||
for (HSStatisticalNodesEnum complianceFlowStatusEnum : values) {
|
||||
if (complianceFlowStatusEnum.value.equals(value)) {
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
return complianceFlowStatusEnum.cnName;
|
||||
}else {
|
||||
return complianceFlowStatusEnum.enName;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+6
@@ -153,4 +153,10 @@ public interface IProjectLibraryBaseService extends IService<ProjectLibraryBase>
|
||||
* @return
|
||||
*/
|
||||
JSONArray getProjectInfo();
|
||||
|
||||
/**
|
||||
* 对接火山引擎接口-获取项目统计信息
|
||||
* @return
|
||||
*/
|
||||
JSONArray getProjectProgressInfo();
|
||||
}
|
||||
|
||||
+291
-30
@@ -11,6 +11,10 @@ import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.vo.DictModel;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO;
|
||||
import com.jero.modules.cert.collect.entity.ParamsManifestEO;
|
||||
import com.jero.modules.cert.collect.enums.CollectManifestStateEnum;
|
||||
import com.jero.modules.cert.collect.service.IParamsCollectManifestEOService;
|
||||
import com.jero.modules.cert.collect.service.IParamsManifestEOService;
|
||||
import com.jero.modules.dummy.enums.OrderEnum;
|
||||
import com.jero.modules.enums.DictCodeEnum;
|
||||
@@ -59,6 +63,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.text.Collator;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
@@ -157,6 +162,9 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
|
||||
@Autowired
|
||||
private IProcessInfoDetailEOService processInfoDetailEOService;
|
||||
|
||||
@Autowired
|
||||
private IParamsCollectManifestEOService paramsCollectManifestEOService;
|
||||
|
||||
private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
/**
|
||||
@@ -2106,6 +2114,7 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
|
||||
if (null != postNodeTnVo) {
|
||||
break;
|
||||
}
|
||||
tnVo.setProjectId(plb.getId());
|
||||
if (now.after(tnVo.getTime())) {
|
||||
preNodeTnVo = tnVo;
|
||||
}
|
||||
@@ -2123,62 +2132,314 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
|
||||
return resList;
|
||||
}
|
||||
|
||||
private JSONArray getNodeList(TimeNodeVO nodeTnVo) {
|
||||
@Override
|
||||
public JSONArray getProjectProgressInfo() {
|
||||
List<ProjectLibraryBase> plbList = this.getList(new ProjectLibraryBase());
|
||||
JSONArray resList = new JSONArray();
|
||||
for (ProjectLibraryBase plb: plbList) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("projectId",plb.getId());
|
||||
jsonObject.put("projectName",plb.getShowName());
|
||||
jsonObject.put("studio",plb.getStudioEngineerName());
|
||||
List<List<TimeNodeVO>> TimeNodeVOsList = projectTaskPlanningService.queryByProjectId(plb.getId(),CutEnum.CN.getValue());
|
||||
|
||||
JSONArray preNodeList = new JSONArray();
|
||||
if (ObjectUtils.isNotEmpty(TimeNodeVOsList) && TimeNodeVOsList.size() > 0) {
|
||||
List<TimeNodeVO> TimeNodeVOList = TimeNodeVOsList.get(0);
|
||||
for (TimeNodeVO tnVo : TimeNodeVOList) {
|
||||
tnVo.setProjectId(plb.getId());
|
||||
preNodeList.addAll(getNodeProgressList(tnVo));
|
||||
}
|
||||
}
|
||||
jsonObject.put("preNode", preNodeList);
|
||||
resList.add(jsonObject);
|
||||
}
|
||||
return resList;
|
||||
}
|
||||
|
||||
private JSONArray getNodeProgressList(TimeNodeVO nodeTnVo) {
|
||||
//根据节点获取对应进度和时间
|
||||
JSONArray nodeList = new JSONArray();
|
||||
if(ObjectUtils.isNotEmpty(nodeTnVo)){
|
||||
if(ProjectTaskPlanningNameEnum.LIST_CONFIRMATION.getName().equals(nodeTnVo.getName()) || ProjectTaskPlanningNameEnum.LEGAL_TASK_CONFIRMATION.getName().equals(nodeTnVo.getName())){
|
||||
String projectId = nodeTnVo.getProjectId();
|
||||
|
||||
QueryWrapper<ProjectLawsInventoryEO> pliQueryWrap = new QueryWrapper<>();
|
||||
pliQueryWrap.lambda().eq(ProjectLawsInventoryEO::getProjectLibraryId,projectId);
|
||||
List<ProjectLawsInventoryEO> pliEoList = this.projectLawsInventoryEOService.list(pliQueryWrap);
|
||||
|
||||
QueryWrapper<ProjectCertificationInventoryEO> pciQueryWrap = new QueryWrapper<>();
|
||||
pciQueryWrap.lambda().eq(ProjectCertificationInventoryEO::getProjectLibraryId,projectId);
|
||||
List<ProjectCertificationInventoryEO> pciEoList = this.projectCertificationInventoryEOService.list(pciQueryWrap);
|
||||
|
||||
QueryWrapper<ParamsManifestEO> pmQueryWrap = new QueryWrapper<>();
|
||||
pmQueryWrap.lambda().eq(ParamsManifestEO::getProjectId,projectId);
|
||||
List<ParamsManifestEO> pmEoList = this.paramsManifestEOService.list(pmQueryWrap);
|
||||
List<ParamsCollectManifestEO> pcmEoList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(pmEoList)){
|
||||
List<String> pmIdList = pmEoList.stream().map(ParamsManifestEO::getId).distinct().collect(Collectors.toList());
|
||||
QueryWrapper<ParamsCollectManifestEO> pcmQueryWrap = new QueryWrapper<>();
|
||||
pcmQueryWrap.lambda().in(ParamsCollectManifestEO::getParamsManifestId,pmIdList);
|
||||
pcmEoList = this.paramsCollectManifestEOService.list(pcmQueryWrap);
|
||||
}
|
||||
|
||||
Map<String,Object> getProgressParams = new HashMap<>();
|
||||
getProgressParams.put("pliEoList",pliEoList);
|
||||
getProgressParams.put("pciEoList",pciEoList);
|
||||
getProgressParams.put("pcmEoList",pcmEoList);
|
||||
|
||||
if(ProjectTaskPlanningNameEnum.LEGAL_TASK_CONFIRMATION.getName().equals(nodeTnVo.getName())){
|
||||
JSONObject preNode = new JSONObject();
|
||||
preNode.put("nodeName", "法规任务确认");
|
||||
preNode.put("progress", 0.23);
|
||||
preNode.put("progress", this.getProgress(nodeTnVo,HSStatisticalNodesEnum.HS_FGRWQR.getValue(),getProgressParams));
|
||||
preNode.put("date", sdf.format(nodeTnVo.getTime()));
|
||||
nodeList.add(preNode);
|
||||
|
||||
JSONObject preNode1 = new JSONObject();
|
||||
preNode1.put("nodeName", "认证任务确认");
|
||||
preNode1.put("progress", 0.23);
|
||||
preNode1.put("progress", this.getProgress(nodeTnVo,HSStatisticalNodesEnum.HS_RZRWQR.getValue(),getProgressParams));
|
||||
preNode1.put("date", sdf.format(nodeTnVo.getTime()));
|
||||
nodeList.add(preNode1);
|
||||
}else if(ProjectTaskPlanningNameEnum.DESIGN_DEADLINE.getName().equals(nodeTnVo.getName())){
|
||||
JSONObject preNode = new JSONObject();
|
||||
preNode.put("nodeName", "设计符合性流程");
|
||||
preNode.put("progress", 0.55);
|
||||
preNode.put("progress", this.getProgress(nodeTnVo,HSStatisticalNodesEnum.HS_SJFHX.getValue(),getProgressParams));
|
||||
preNode.put("date", sdf.format(nodeTnVo.getTime()));
|
||||
nodeList.add(preNode);
|
||||
}else if(ProjectTaskPlanningNameEnum.PREHOMO_DEADLINE.getName().equals(nodeTnVo.getName()) ||ProjectTaskPlanningNameEnum.ATTESTATION_START_TIME.getName().equals(nodeTnVo.getName())){
|
||||
JSONObject preNode = new JSONObject();
|
||||
preNode.put("nodeName", "Pre-Homo流程");
|
||||
preNode.put("progress", 0.85);
|
||||
preNode.put("date", sdf.format(nodeTnVo.getTime()));
|
||||
nodeList.add(preNode);
|
||||
|
||||
JSONObject preNode1 = new JSONObject();
|
||||
preNode1.put("nodeName", "参数收集进度");
|
||||
preNode1.put("progress", 0.66);
|
||||
preNode1.put("date", sdf.format(nodeTnVo.getTime()));
|
||||
nodeList.add(preNode1);
|
||||
}else if(ProjectTaskPlanningNameEnum.CERTIFICATION_SUBMISSION.getName().equals(nodeTnVo.getName()) || ProjectTaskPlanningNameEnum.ATTESTATION_END_TIME.getName().equals(nodeTnVo.getName())){
|
||||
JSONObject preNode = new JSONObject();
|
||||
preNode.put("nodeName", "认证进度");
|
||||
preNode.put("progress", 0.44);
|
||||
preNode.put("date", sdf.format(nodeTnVo.getTime()));
|
||||
nodeList.add(preNode);
|
||||
|
||||
JSONObject preNode1 = new JSONObject();
|
||||
preNode1.put("nodeName", "参数收集进度");
|
||||
preNode1.put("progress", 0.66);
|
||||
preNode1.put("date", sdf.format(nodeTnVo.getTime()));
|
||||
nodeList.add(preNode1);
|
||||
}else if(ProjectTaskPlanningNameEnum.VERIFY_DEADLINE.getName().equals(nodeTnVo.getName())){
|
||||
JSONObject preNode = new JSONObject();
|
||||
preNode.put("nodeName", "验证符合性流程");
|
||||
preNode.put("progress", 0.10);
|
||||
preNode.put("progress", this.getProgress(nodeTnVo,HSStatisticalNodesEnum.HS_YZFHX.getValue(),getProgressParams));
|
||||
preNode.put("date", sdf.format(nodeTnVo.getTime()));
|
||||
nodeList.add(preNode);
|
||||
}else if(ProjectTaskPlanningNameEnum.ATTESTATION_START_TIME.getName().equals(nodeTnVo.getName())){
|
||||
JSONObject preNode = new JSONObject();
|
||||
preNode.put("nodeName", "Pre-Homo流程");
|
||||
preNode.put("progress", this.getProgress(nodeTnVo,HSStatisticalNodesEnum.HS_PRE_HOMO.getValue(),getProgressParams));
|
||||
preNode.put("date", sdf.format(nodeTnVo.getTime()));
|
||||
nodeList.add(preNode);
|
||||
|
||||
JSONObject preNode1 = new JSONObject();
|
||||
preNode1.put("nodeName", "参数收集进度");
|
||||
preNode1.put("progress", this.getProgress(nodeTnVo,HSStatisticalNodesEnum.HS_CSSJJD.getValue(),getProgressParams));
|
||||
preNode1.put("date", sdf.format(nodeTnVo.getTime()));
|
||||
nodeList.add(preNode1);
|
||||
}else if(ProjectTaskPlanningNameEnum.ATTESTATION_END_TIME.getName().equals(nodeTnVo.getName())){
|
||||
JSONObject preNode = new JSONObject();
|
||||
preNode.put("nodeName", "认证进度");
|
||||
preNode.put("progress", this.getProgress(nodeTnVo,HSStatisticalNodesEnum.HS_RZJD.getValue(),getProgressParams));
|
||||
preNode.put("date", sdf.format(nodeTnVo.getTime()));
|
||||
nodeList.add(preNode);
|
||||
}
|
||||
}
|
||||
return nodeList;
|
||||
}
|
||||
|
||||
private JSONArray getNodeList(TimeNodeVO nodeTnVo) {
|
||||
//根据节点获取对应进度和时间
|
||||
JSONArray nodeList = new JSONArray();
|
||||
if(ObjectUtils.isNotEmpty(nodeTnVo)){
|
||||
String projectId = nodeTnVo.getProjectId();
|
||||
|
||||
QueryWrapper<ProjectLawsInventoryEO> pliQueryWrap = new QueryWrapper<>();
|
||||
pliQueryWrap.lambda().eq(ProjectLawsInventoryEO::getProjectLibraryId,projectId);
|
||||
List<ProjectLawsInventoryEO> pliEoList = this.projectLawsInventoryEOService.list(pliQueryWrap);
|
||||
|
||||
QueryWrapper<ProjectCertificationInventoryEO> pciQueryWrap = new QueryWrapper<>();
|
||||
pciQueryWrap.lambda().eq(ProjectCertificationInventoryEO::getProjectLibraryId,projectId);
|
||||
List<ProjectCertificationInventoryEO> pciEoList = this.projectCertificationInventoryEOService.list(pciQueryWrap);
|
||||
|
||||
QueryWrapper<ParamsManifestEO> pmQueryWrap = new QueryWrapper<>();
|
||||
pmQueryWrap.lambda().eq(ParamsManifestEO::getProjectId,projectId);
|
||||
List<ParamsManifestEO> pmEoList = this.paramsManifestEOService.list(pmQueryWrap);
|
||||
List<ParamsCollectManifestEO> pcmEoList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(pmEoList)){
|
||||
List<String> pmIdList = pmEoList.stream().map(ParamsManifestEO::getId).distinct().collect(Collectors.toList());
|
||||
QueryWrapper<ParamsCollectManifestEO> pcmQueryWrap = new QueryWrapper<>();
|
||||
pcmQueryWrap.lambda().in(ParamsCollectManifestEO::getParamsManifestId,pmIdList);
|
||||
pcmEoList = this.paramsCollectManifestEOService.list(pcmQueryWrap);
|
||||
}
|
||||
|
||||
Map<String,Object> getProgressParams = new HashMap<>();
|
||||
getProgressParams.put("pliEoList",pliEoList);
|
||||
getProgressParams.put("pciEoList",pciEoList);
|
||||
getProgressParams.put("pcmEoList",pcmEoList);
|
||||
|
||||
if(ProjectTaskPlanningNameEnum.LIST_CONFIRMATION.getName().equals(nodeTnVo.getName()) || ProjectTaskPlanningNameEnum.LEGAL_TASK_CONFIRMATION.getName().equals(nodeTnVo.getName())){
|
||||
JSONObject preNode = new JSONObject();
|
||||
preNode.put("nodeName", "法规任务确认");
|
||||
preNode.put("progress", this.getProgress(nodeTnVo,HSStatisticalNodesEnum.HS_FGRWQR.getValue(),getProgressParams));
|
||||
preNode.put("date", sdf.format(nodeTnVo.getTime()));
|
||||
nodeList.add(preNode);
|
||||
|
||||
JSONObject preNode1 = new JSONObject();
|
||||
preNode1.put("nodeName", "认证任务确认");
|
||||
preNode1.put("progress", this.getProgress(nodeTnVo,HSStatisticalNodesEnum.HS_RZRWQR.getValue(),getProgressParams));
|
||||
preNode1.put("date", sdf.format(nodeTnVo.getTime()));
|
||||
nodeList.add(preNode1);
|
||||
}else if(ProjectTaskPlanningNameEnum.DESIGN_DEADLINE.getName().equals(nodeTnVo.getName())){
|
||||
JSONObject preNode = new JSONObject();
|
||||
preNode.put("nodeName", "设计符合性流程");
|
||||
preNode.put("progress", this.getProgress(nodeTnVo,HSStatisticalNodesEnum.HS_SJFHX.getValue(),getProgressParams));
|
||||
preNode.put("date", sdf.format(nodeTnVo.getTime()));
|
||||
nodeList.add(preNode);
|
||||
}else if(ProjectTaskPlanningNameEnum.PREHOMO_DEADLINE.getName().equals(nodeTnVo.getName()) ||ProjectTaskPlanningNameEnum.ATTESTATION_START_TIME.getName().equals(nodeTnVo.getName())){
|
||||
JSONObject preNode = new JSONObject();
|
||||
preNode.put("nodeName", "Pre-Homo流程");
|
||||
preNode.put("progress", this.getProgress(nodeTnVo,HSStatisticalNodesEnum.HS_PRE_HOMO.getValue(),getProgressParams));
|
||||
preNode.put("date", sdf.format(nodeTnVo.getTime()));
|
||||
nodeList.add(preNode);
|
||||
|
||||
JSONObject preNode1 = new JSONObject();
|
||||
preNode1.put("nodeName", "参数收集进度");
|
||||
preNode1.put("progress", this.getProgress(nodeTnVo,HSStatisticalNodesEnum.HS_CSSJJD.getValue(),getProgressParams));
|
||||
preNode1.put("date", sdf.format(nodeTnVo.getTime()));
|
||||
nodeList.add(preNode1);
|
||||
}else if(ProjectTaskPlanningNameEnum.CERTIFICATION_SUBMISSION.getName().equals(nodeTnVo.getName()) || ProjectTaskPlanningNameEnum.ATTESTATION_END_TIME.getName().equals(nodeTnVo.getName())){
|
||||
JSONObject preNode = new JSONObject();
|
||||
preNode.put("nodeName", "认证进度");
|
||||
preNode.put("progress", this.getProgress(nodeTnVo,HSStatisticalNodesEnum.HS_RZJD.getValue(),getProgressParams));
|
||||
preNode.put("date", sdf.format(nodeTnVo.getTime()));
|
||||
nodeList.add(preNode);
|
||||
|
||||
JSONObject preNode1 = new JSONObject();
|
||||
preNode1.put("nodeName", "参数收集进度");
|
||||
preNode1.put("progress", this.getProgress(nodeTnVo,HSStatisticalNodesEnum.HS_CSSJJD.getValue(),getProgressParams));
|
||||
preNode1.put("date", sdf.format(nodeTnVo.getTime()));
|
||||
nodeList.add(preNode1);
|
||||
}else if(ProjectTaskPlanningNameEnum.VERIFY_DEADLINE.getName().equals(nodeTnVo.getName())){
|
||||
JSONObject preNode = new JSONObject();
|
||||
preNode.put("nodeName", "验证符合性流程");
|
||||
preNode.put("progress", this.getProgress(nodeTnVo,HSStatisticalNodesEnum.HS_YZFHX.getValue(),getProgressParams));
|
||||
preNode.put("date", sdf.format(nodeTnVo.getTime()));
|
||||
nodeList.add(preNode);
|
||||
}
|
||||
}
|
||||
return nodeList;
|
||||
}
|
||||
|
||||
public String getProgress(TimeNodeVO nodeTnVo,String statisticalNode,Map<String,Object> params){
|
||||
DecimalFormat df = new DecimalFormat("#.00");
|
||||
double result = 0;
|
||||
List<ProjectLawsInventoryEO> pliEoList = (List<ProjectLawsInventoryEO>) params.get("pliEoList");
|
||||
List<ProjectCertificationInventoryEO> pciEoList = (List<ProjectCertificationInventoryEO>) params.get("pciEoList");
|
||||
List<ParamsCollectManifestEO> pcmEoList = (List<ParamsCollectManifestEO>) params.get("pcmEoList");
|
||||
|
||||
if (StringUtils.equals(statisticalNode,HSStatisticalNodesEnum.HS_FGRWQR.getValue())) {
|
||||
int count = pliEoList.size() * 2;
|
||||
if (count > 0) {
|
||||
double designCompleteCount = (double) pliEoList.stream().filter(pliEo -> {
|
||||
boolean flag = (
|
||||
StringUtils.equals(pliEo.getDesignFlowStatus(), ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
|
||||
|| StringUtils.equals(pliEo.getDesignFlowStatus(), ComplianceFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
|
||||
|| StringUtils.equals(pliEo.getDesignFlowStatus(), ComplianceFlowStatusEnum.CONFORMITY.getValue())
|
||||
|| StringUtils.equals(pliEo.getDesignFlowStatus(), ComplianceFlowStatusEnum.INCONFORMITY.getValue())
|
||||
|| StringUtils.equals(pliEo.getDesignFlowStatus(), ComplianceFlowStatusEnum.TO_TRACK.getValue())
|
||||
|| StringUtils.equals(pliEo.getDesignFlowStatus(), ComplianceFlowStatusEnum.UNINVOLVED.getValue())
|
||||
|| StringUtils.equals(pliEo.getDesignFlowStatus(), ComplianceFlowStatusEnum.TERMINATION_OF_TASK.getValue())
|
||||
);
|
||||
return flag;
|
||||
}).count();
|
||||
|
||||
double verifyCompleteCount = (double) pliEoList.stream().filter(pliEo -> {
|
||||
boolean flag = (
|
||||
StringUtils.equals(pliEo.getVerifyFlowStatus(), ComplianceFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
|
||||
|| StringUtils.equals(pliEo.getVerifyFlowStatus(), ComplianceFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
|
||||
|| StringUtils.equals(pliEo.getVerifyFlowStatus(), ComplianceFlowStatusEnum.CONFORMITY.getValue())
|
||||
|| StringUtils.equals(pliEo.getVerifyFlowStatus(), ComplianceFlowStatusEnum.INCONFORMITY.getValue())
|
||||
|| StringUtils.equals(pliEo.getVerifyFlowStatus(), ComplianceFlowStatusEnum.TO_TRACK.getValue())
|
||||
|| StringUtils.equals(pliEo.getVerifyFlowStatus(), ComplianceFlowStatusEnum.UNINVOLVED.getValue())
|
||||
|| StringUtils.equals(pliEo.getVerifyFlowStatus(), ComplianceFlowStatusEnum.TERMINATION_OF_TASK.getValue())
|
||||
);
|
||||
return flag;
|
||||
}).count();
|
||||
|
||||
result = ((designCompleteCount + verifyCompleteCount) / count) * 100;
|
||||
}
|
||||
} else if (StringUtils.equals(statisticalNode,HSStatisticalNodesEnum.HS_RZRWQR.getValue())) {
|
||||
int count = pciEoList.size();
|
||||
if (count > 0) {
|
||||
double completeCount = (double) pciEoList.stream().filter(pciEo -> {
|
||||
boolean flag = (
|
||||
StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_SUBMITTED.getValue())
|
||||
|| StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.RESULTS_TO_BE_REVIEWED.getValue())
|
||||
|| StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.REVIEW_AND_PASS.getValue())
|
||||
|| StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.REVIEW_AND_RETURN.getValue())
|
||||
|| StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.UNINVOLVED.getValue())
|
||||
);
|
||||
return flag;
|
||||
}).count();
|
||||
|
||||
result = (completeCount / count) * 100;
|
||||
}
|
||||
} else if (StringUtils.equals(statisticalNode,HSStatisticalNodesEnum.HS_SJFHX.getValue())) {
|
||||
int count = pliEoList.size();
|
||||
if (count > 0) {
|
||||
double completeCount = (double) pliEoList.stream().filter(pliEo -> {
|
||||
boolean flag = (
|
||||
StringUtils.equals(pliEo.getDesignFlowStatus(), ComplianceFlowStatusEnum.CONFORMITY.getValue())
|
||||
|| StringUtils.equals(pliEo.getDesignFlowStatus(), ComplianceFlowStatusEnum.UNINVOLVED.getValue())
|
||||
);
|
||||
return flag;
|
||||
}).count();
|
||||
|
||||
result = (completeCount / count) * 100;
|
||||
}
|
||||
} else if (StringUtils.equals(statisticalNode,HSStatisticalNodesEnum.HS_PRE_HOMO.getValue())) {
|
||||
int count = pciEoList.size();
|
||||
if (count > 0) {
|
||||
double completeCount = (double) pciEoList.stream().filter(pciEo -> {
|
||||
boolean flag = (
|
||||
StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.REVIEW_AND_PASS.getValue())
|
||||
|| StringUtils.equals(pciEo.getFlowStatus(),CertificationInventoryFlowStatusEnum.UNINVOLVED.getValue())
|
||||
);
|
||||
return flag;
|
||||
}).count();
|
||||
|
||||
result = (completeCount / count) * 100;
|
||||
}
|
||||
} else if (StringUtils.equals(statisticalNode,HSStatisticalNodesEnum.HS_RZJD.getValue())) {
|
||||
// 认证清单认证进度为 实验通过的是完成。
|
||||
int count = pciEoList.size();
|
||||
if (count > 0) {
|
||||
double completeCount = (double)pciEoList.stream().filter(pciEo -> {
|
||||
boolean flag = (
|
||||
StringUtils.equals(pciEo.getCertificationProgress(),CertificationProgressEnum.TEST_PASSED.getValue())
|
||||
);
|
||||
return flag;
|
||||
}).count();
|
||||
|
||||
result = (completeCount / count) * 100;
|
||||
}
|
||||
} else if (StringUtils.equals(statisticalNode,HSStatisticalNodesEnum.HS_YZFHX.getValue())) {
|
||||
int count = pliEoList.size();
|
||||
if (count > 0) {
|
||||
double completeCount = (double) pliEoList.stream().filter(pliEo -> {
|
||||
boolean flag = (
|
||||
StringUtils.equals(pliEo.getVerifyFlowStatus(), ComplianceFlowStatusEnum.CONFORMITY.getValue())
|
||||
|| StringUtils.equals(pliEo.getVerifyFlowStatus(), ComplianceFlowStatusEnum.UNINVOLVED.getValue())
|
||||
);
|
||||
return flag;
|
||||
}).count();
|
||||
|
||||
result = (completeCount / count) * 100;
|
||||
}
|
||||
} else if (StringUtils.equals(statisticalNode,HSStatisticalNodesEnum.HS_CSSJJD.getValue())) {
|
||||
if(CollectionUtils.isNotEmpty(pcmEoList)){
|
||||
int count = pcmEoList.size();
|
||||
double completeCount = (double) pcmEoList.stream().filter(pcmEo -> {
|
||||
boolean flag = (
|
||||
StringUtils.equals(pcmEo.getState(), CollectManifestStateEnum.SUBMIT.getValue())
|
||||
|| StringUtils.equals(pcmEo.getState(),CollectManifestStateEnum.SYNC_REPORT.getValue())
|
||||
);
|
||||
return flag;
|
||||
}).count();
|
||||
|
||||
result = (completeCount / count) * 100;
|
||||
}
|
||||
}
|
||||
|
||||
return result != 0 ? df.format(result) : "0";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user