diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLibraryBaseController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLibraryBaseController.java index 5e04f3ce1..f49a2ca42 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLibraryBaseController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLibraryBaseController.java @@ -1,5 +1,6 @@ package com.jero.modules.project.controller; +import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.jero.common.api.vo.Result; @@ -270,10 +271,19 @@ public class ProjectLibraryBaseController extends JeroController getProjectInfo(@RequestBody JSONObject jsonObject){ - return Result.OK(jsonObject); + 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); } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/HSStatisticalNodesEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/HSStatisticalNodesEnum.java new file mode 100644 index 000000000..d26991c86 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/HSStatisticalNodesEnum.java @@ -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; + } +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectLibraryBaseService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectLibraryBaseService.java index 3fabc4053..f68aa498e 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectLibraryBaseService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectLibraryBaseService.java @@ -1,5 +1,6 @@ package com.jero.modules.project.service; +import com.alibaba.fastjson.JSONArray; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import com.jero.modules.project.entity.ProjectLibraryBase; @@ -146,4 +147,16 @@ public interface IProjectLibraryBaseService extends IService * @return */ ProjectLibraryBase selectById(String projectLibraryId); + + /** + * 对接火山引擎接口-获取项目统计信息 + * @return + */ + JSONArray getProjectInfo(); + + /** + * 对接火山引擎接口-获取项目统计信息 + * @return + */ + JSONArray getProjectProgressInfo(); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLibraryBaseServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLibraryBaseServiceImpl.java index 2f3d96bc9..1e8fc39d4 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLibraryBaseServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLibraryBaseServiceImpl.java @@ -1,5 +1,7 @@ package com.jero.modules.project.service.impl; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; @@ -9,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; @@ -22,6 +28,7 @@ import com.jero.modules.project.mapper.ProjectRelatedPersonnelMapper; import com.jero.modules.project.mapper.ProjectTaskInventoryEOMapper; import com.jero.modules.project.mapper.ProjectUserPermissionMapper; import com.jero.modules.project.service.*; +import com.jero.modules.project.vo.TimeNodeVO; import com.jero.modules.system.entity.SysDictItem; import com.jero.modules.system.entity.SysUser; import com.jero.modules.system.enums.DicCodeEnum; @@ -56,7 +63,9 @@ 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; import java.util.Arrays; import java.util.Collections; @@ -153,6 +162,11 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl 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()); + List> TimeNodeVOsList = projectTaskPlanningService.queryByProjectId(plb.getId(),CutEnum.CN.getValue()); + //获取前置节点 + TimeNodeVO preNodeTnVo = null; + //获取后置节点 + TimeNodeVO postNodeTnVo = null; + if (ObjectUtils.isNotEmpty(TimeNodeVOsList) && TimeNodeVOsList.size() > 0) { + List TimeNodeVOList = TimeNodeVOsList.get(0); + for (TimeNodeVO tnVo : TimeNodeVOList) { + if (null != postNodeTnVo) { + break; + } + tnVo.setProjectId(plb.getId()); + if (now.after(tnVo.getTime())) { + preNodeTnVo = tnVo; + } + if (now.before(tnVo.getTime())) { + postNodeTnVo = tnVo; + } + } + } + JSONArray preNodeList = getNodeList(preNodeTnVo); + jsonObject.put("preNode", preNodeList); + JSONArray postNodeList = getNodeList(postNodeTnVo); + jsonObject.put("postNode",postNodeList); + resList.add(jsonObject); + } + return resList; + } + + @Override + public JSONArray getProjectProgressInfo() { + List 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> TimeNodeVOsList = projectTaskPlanningService.queryByProjectId(plb.getId(),CutEnum.CN.getValue()); + + JSONArray preNodeList = new JSONArray(); + if (ObjectUtils.isNotEmpty(TimeNodeVOsList) && TimeNodeVOsList.size() > 0) { + List 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)){ + String projectId = nodeTnVo.getProjectId(); + + QueryWrapper pliQueryWrap = new QueryWrapper<>(); + pliQueryWrap.lambda().eq(ProjectLawsInventoryEO::getProjectLibraryId,projectId); + List pliEoList = this.projectLawsInventoryEOService.list(pliQueryWrap); + + QueryWrapper pciQueryWrap = new QueryWrapper<>(); + pciQueryWrap.lambda().eq(ProjectCertificationInventoryEO::getProjectLibraryId,projectId); + List pciEoList = this.projectCertificationInventoryEOService.list(pciQueryWrap); + + QueryWrapper pmQueryWrap = new QueryWrapper<>(); + pmQueryWrap.lambda().eq(ParamsManifestEO::getProjectId,projectId); + List pmEoList = this.paramsManifestEOService.list(pmQueryWrap); + List pcmEoList = new ArrayList<>(); + if(CollectionUtils.isNotEmpty(pmEoList)){ + List pmIdList = pmEoList.stream().map(ParamsManifestEO::getId).distinct().collect(Collectors.toList()); + QueryWrapper pcmQueryWrap = new QueryWrapper<>(); + pcmQueryWrap.lambda().in(ParamsCollectManifestEO::getParamsManifestId,pmIdList); + pcmEoList = this.paramsCollectManifestEOService.list(pcmQueryWrap); + } + + Map 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", 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.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); + }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 pliQueryWrap = new QueryWrapper<>(); + pliQueryWrap.lambda().eq(ProjectLawsInventoryEO::getProjectLibraryId,projectId); + List pliEoList = this.projectLawsInventoryEOService.list(pliQueryWrap); + + QueryWrapper pciQueryWrap = new QueryWrapper<>(); + pciQueryWrap.lambda().eq(ProjectCertificationInventoryEO::getProjectLibraryId,projectId); + List pciEoList = this.projectCertificationInventoryEOService.list(pciQueryWrap); + + QueryWrapper pmQueryWrap = new QueryWrapper<>(); + pmQueryWrap.lambda().eq(ParamsManifestEO::getProjectId,projectId); + List pmEoList = this.paramsManifestEOService.list(pmQueryWrap); + List pcmEoList = new ArrayList<>(); + if(CollectionUtils.isNotEmpty(pmEoList)){ + List pmIdList = pmEoList.stream().map(ParamsManifestEO::getId).distinct().collect(Collectors.toList()); + QueryWrapper pcmQueryWrap = new QueryWrapper<>(); + pcmQueryWrap.lambda().in(ParamsCollectManifestEO::getParamsManifestId,pmIdList); + pcmEoList = this.paramsCollectManifestEOService.list(pcmQueryWrap); + } + + Map 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 params){ + DecimalFormat df = new DecimalFormat("#.00"); + double result = 0; + List pliEoList = (List) params.get("pliEoList"); + List pciEoList = (List) params.get("pciEoList"); + List pcmEoList = (List) 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"; + } } diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index c6425324e..1bdd0684d 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1800,4 +1800,5 @@ module.exports = { responsiblepersonforverifyingcompliance:'Responsible person for verifying compliance', verifytheconformancedeliverabletype:'Verify the conformance deliverable type', designaconformancedeliverabletype:'Design a conformance deliverable type', + reasonForReturnOfCompliance:'Reason for compliance return', } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index b67cfd46b..4a7f90656 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1902,4 +1902,5 @@ module.exports = { responsiblepersonforverifyingcompliance:'验证符合性责任人', verifytheconformancedeliverabletype:'验证符合性交付物类型', designaconformancedeliverabletype:'设计符合性交付物类型', + reasonForReturnOfCompliance: '符合性退回原因', } \ No newline at end of file diff --git a/jero-web/src/components/ParameterLibraryAdd/index.vue b/jero-web/src/components/ParameterLibraryAdd/index.vue index 3d409a54e..6ddfd2bed 100644 --- a/jero-web/src/components/ParameterLibraryAdd/index.vue +++ b/jero-web/src/components/ParameterLibraryAdd/index.vue @@ -112,7 +112,7 @@ title: this.$t('areaOfResponsibility'), dataIndex: 'dutyTerritory_dictText', align: 'left', - width: 200, + width: 100, ellipsis: true } ], diff --git a/jero-web/src/components/SplitTable/index.vue b/jero-web/src/components/SplitTable/index.vue index 069c7cb3b..2a37e67a1 100644 --- a/jero-web/src/components/SplitTable/index.vue +++ b/jero-web/src/components/SplitTable/index.vue @@ -36,7 +36,7 @@ - {{text && text.length > 18?text.slice(0,17)+'...':text}} + {{text && text.length > 25?text.slice(0,24)+'...':text}} diff --git a/jero-web/src/components/libraryAddForm/index.vue b/jero-web/src/components/libraryAddForm/index.vue index b8fa241f1..48819fbba 100644 --- a/jero-web/src/components/libraryAddForm/index.vue +++ b/jero-web/src/components/libraryAddForm/index.vue @@ -557,7 +557,7 @@ dataIndex: 'implementationDate', align: 'left', ellipsis: true, - width: 150, + width: 190, scopedSlots: { title: 'implementationDateTwo' } }, { diff --git a/jero-web/src/components/tableCollection/index.vue b/jero-web/src/components/tableCollection/index.vue index 6ee036553..484df9dd3 100644 --- a/jero-web/src/components/tableCollection/index.vue +++ b/jero-web/src/components/tableCollection/index.vue @@ -829,6 +829,15 @@ if (res.db_field_name == 'nioNumber') { this.columns[index].width = 120 } + if (res.db_field_name == 'dutyTerritory') { + this.columns[index].width = 120 + } + if (res.db_field_name == 'sdt') { + this.columns[index].width = 130 + } + if (res.db_field_name == 'dre') { + this.columns[index].width = 120 + } if (res.click1) { this.columns[index].scopedSlots = { customRender: 'operationzr' diff --git a/jero-web/src/components/tableCollection/index1.vue b/jero-web/src/components/tableCollection/index1.vue index 06e3c055f..bfb8812c3 100644 --- a/jero-web/src/components/tableCollection/index1.vue +++ b/jero-web/src/components/tableCollection/index1.vue @@ -710,6 +710,15 @@ if (res.db_field_name == 'nioNumber') { this.columns[index].width = 120 } + if (res.db_field_name == 'dutyTerritory') { + this.columns[index].width = 120 + } + if (res.db_field_name == 'sdt') { + this.columns[index].width = 130 + } + if (res.db_field_name == 'dre') { + this.columns[index].width = 120 + } if (res.click) { // 工程接口人列表修改 this.columns[index].scopedSlots = { diff --git a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/initiatingProcess.vue b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/initiatingProcess.vue index f77f87916..2e41d003d 100644 --- a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/initiatingProcess.vue +++ b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/initiatingProcess.vue @@ -240,7 +240,7 @@ title: this.$t('correspondingStandard'), align: 'left', ellipsis: true, - width: 170, + width: 150, dataIndex: 'corresponding_standard' } ] diff --git a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue index 31cca5e65..7779d9cba 100644 --- a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue +++ b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue @@ -203,14 +203,14 @@ { title: this.$t('ProcessStatus'), align: 'left', - width: 140, + width: 100, ellipsis: true, dataIndex: 'gatherResultShow' }, { title: this.$t('Sponsor'), align: 'left', - width: 140, + width: 110, ellipsis: true, dataIndex: 'createBy' }, @@ -218,7 +218,7 @@ title: this.$t('brand'), align: 'left', ellipsis: true, - width: 140, + width: 120, dataIndex: 'brand_text' }, { @@ -239,7 +239,7 @@ title: this.$t('operation'), align: 'left', fixed: 'right', - width: 210, + width: 150, scopedSlots: { customRender: 'operation' } } ], diff --git a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/listAddModel.vue b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/listAddModel.vue index 686a16c12..46c03099e 100644 --- a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/listAddModel.vue +++ b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/listAddModel.vue @@ -138,14 +138,14 @@ dataIndex: 'xin1_che1_xing2_shi2_shi1_ri4_qi1', align: 'left', ellipsis: true, - width: 228 + width: 190 }, { title: this.$t('vehicleInProductionDate'), dataIndex: 'implement_time', align: 'left', ellipsis: true, - width: 228 + width: 190 } ], dataList: [], diff --git a/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyManagement.vue b/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyManagement.vue index 4c6b0b78c..de5543fff 100644 --- a/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyManagement.vue +++ b/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyManagement.vue @@ -129,21 +129,21 @@ title: this.$t('monthlyLanguage'), align: 'left', dataIndex: 'language', - width: 195, + width: 120, ellipsis: true, scopedSlots: { customRender: 'language' } }, { title: this.$t('releaseStatus'), align: 'left', - width: 175, + width: 100, ellipsis: true, dataIndex: 'issueStatus_dictText' }, { title: this.$t('uploadTime'), align: 'left', - width: 305, + width: 180, ellipsis: true, dataIndex: 'createTime' }, @@ -151,14 +151,14 @@ title: this.$t('uploadedBy'), align: 'left', ellipsis: true, - width: 170, + width: 120, dataIndex: 'createBy' }, { title: this.$t('operation'), align: 'left', fixed: 'right', - width: 240, + width: 180, scopedSlots: { customRender: 'operation' } } ] diff --git a/jero-web/src/views/businessSupport/regulationReport/components/modules/addModel.vue b/jero-web/src/views/businessSupport/regulationReport/components/modules/addModel.vue index 891996117..1bee3e993 100644 --- a/jero-web/src/views/businessSupport/regulationReport/components/modules/addModel.vue +++ b/jero-web/src/views/businessSupport/regulationReport/components/modules/addModel.vue @@ -153,14 +153,14 @@ dataIndex: 'xin1_che1_xing2_shi2_shi1_ri4_qi1', align: 'left', ellipsis: true, - width: 228 + width: 190 }, { title: this.$t('vehicleInProductionDate'), dataIndex: 'implement_time', align: 'left', ellipsis: true, - width: 228 + width: 190 } // { // title: this.$t('correspondingStandard'), diff --git a/jero-web/src/views/businessSupport/technologyAssessment/components/initiatingProcess.vue b/jero-web/src/views/businessSupport/technologyAssessment/components/initiatingProcess.vue index e3ae2906e..51c44353f 100644 --- a/jero-web/src/views/businessSupport/technologyAssessment/components/initiatingProcess.vue +++ b/jero-web/src/views/businessSupport/technologyAssessment/components/initiatingProcess.vue @@ -369,7 +369,7 @@ title: this.$t('correspondingStandard'), align: 'left', ellipsis: true, - width: 170, + width: 150, dataIndex: 'corresponding_standard' }, { diff --git a/jero-web/src/views/businessSupport/technologyAssessment/index.vue b/jero-web/src/views/businessSupport/technologyAssessment/index.vue index bf305061e..cedea358c 100644 --- a/jero-web/src/views/businessSupport/technologyAssessment/index.vue +++ b/jero-web/src/views/businessSupport/technologyAssessment/index.vue @@ -272,14 +272,14 @@ { title: this.$t('ProcessStatus'), align: 'left', - width: 170, + width: 100, ellipsis: true, dataIndex: 'flowStatusName' }, { title: this.$t('Sponsor'), align: 'left', - width: 140, + width: 110, ellipsis: true, dataIndex: 'createBy' }, @@ -287,21 +287,21 @@ title: this.$t('brand'), align: 'left', ellipsis: true, - width: 140, + width: 120, dataIndex: 'brand_text' }, { title: this.$t('dateOfInitiation'), align: 'left', ellipsis: true, - width: 170, + width: 130, dataIndex: 'startTime' }, { title: this.$t('closingDate'), align: 'left', ellipsis: true, - width: 170, + width: 130, dataIndex: 'endTime' }, { diff --git a/jero-web/src/views/documentTools/searchCenter/components/DocumentLibrary.vue b/jero-web/src/views/documentTools/searchCenter/components/DocumentLibrary.vue index cc26a0fa5..35abbfbc1 100644 --- a/jero-web/src/views/documentTools/searchCenter/components/DocumentLibrary.vue +++ b/jero-web/src/views/documentTools/searchCenter/components/DocumentLibrary.vue @@ -323,7 +323,7 @@ title: this.$t('vehicleInProductionDate'), align: 'left', ellipsis: true, - width: 210, + width: 190, sorter: true, dataIndex: 'implement_time' }, @@ -332,7 +332,7 @@ align: 'left', ellipsis: true, sorter: true, - width: 210, + width: 190, dataIndex: 'xin1_che1_xing2_shi2_shi1_ri4_qi1' }, { diff --git a/jero-web/src/views/documentTools/virtualList/components/addModel.vue b/jero-web/src/views/documentTools/virtualList/components/addModel.vue index a4ff4f8aa..01d2dfda0 100644 --- a/jero-web/src/views/documentTools/virtualList/components/addModel.vue +++ b/jero-web/src/views/documentTools/virtualList/components/addModel.vue @@ -157,14 +157,14 @@ dataIndex: 'xin1_che1_xing2_shi2_shi1_ri4_qi1', align: 'left', ellipsis: true, - width: 228 + width: 190 }, { title: this.$t('vehicleInProductionDate'), dataIndex: 'implement_time', align: 'left', ellipsis: true, - width: 228 + width: 190 } // { // title: this.$t('correspondingStandard'), diff --git a/jero-web/src/views/documentTools/virtualList/components/transferListvirtal.vue b/jero-web/src/views/documentTools/virtualList/components/transferListvirtal.vue index 466be2b80..61126e8e9 100644 --- a/jero-web/src/views/documentTools/virtualList/components/transferListvirtal.vue +++ b/jero-web/src/views/documentTools/virtualList/components/transferListvirtal.vue @@ -138,14 +138,14 @@ export default { { title: this.$t('ImplementationDate'), align: 'left', - width: 200, + width: 190, dataIndex: 'xin1Che1Xing2Shi2Shi1Ri4Qi1', ellipsis: true }, { title: this.$t('vehicleInProductionDate'), align: 'left', - width: 220, + width: 190, dataIndex: 'implementTime', ellipsis: true }, @@ -182,7 +182,7 @@ export default { align: 'left', ellipsis: true, dataIndex: 'dutyTerritory_dictText', - width: 180 + width: 100 }, ], fieldList: [ diff --git a/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue b/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue index e642a1cff..3965a9050 100644 --- a/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue +++ b/jero-web/src/views/documentTools/virtualList/components/virtualListDetails.vue @@ -65,14 +65,27 @@
-
- {{$t('subtitle')}} +
+ {{$t('areaOfResponsibility')}}
- + + +
diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/index.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/index.vue index 76fc112de..d6a15c946 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/index.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/index.vue @@ -7,35 +7,35 @@ {{$t('fillintherecord')}}
-
- - {{$t('historicalrecord')}} -
+ + + + + - - + + - + - + - + - + - + - + - + @@ -162,13 +162,33 @@ export default { }, ], toggleSearchStatus: false, - tabActive: this.$t('upgradetargetmodel') + tabActive: this.$t('upgradetargetmodel'), + oldName: this.$t('upgradetargetmodel'), } }, methods: { callback(value) { this.tabActive = value }, + tabClick(tab,event){ + this.tabActive=tab + if(this.oldName == this.$t('upgradetargetmodel')){ + this.$refs.dealtWithRef.save() + } else if(this.oldName == this.$t('thetargetvehicleofthisupgrade')){ + this.$refs.doneListRef.save() + } else if(this.oldName == this.$t('upgradeimpactassessment')){ + this.$refs.SentListRef.save() + } else if(this.oldName == this.$t('upgradehavechanged')){ + this.$refs.upgradedonlineRef.save() + } else if(this.oldName == this.$t('auxiliaryupgradehavechanged')){ + this.$refs.beupgradedonlineRef.save() + } else if(this.oldName == this.$t('usernotification')){ + this.$refs.recordparametersRef.save() + } else if(this.oldName == this.$t('informationaboutotherupgradetasks')){ + this.$refs.otherRef.save() + } + this.oldName = tab + }, handleToggleSearch() { this.toggleSearchStatus = !this.toggleSearchStatus }, diff --git a/jero-web/src/views/otamanagement/vehicleinformation/components/historicalrecord.vue b/jero-web/src/views/otamanagement/vehicleinformation/components/historicalrecord.vue index c19eb0d49..0939753fd 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/components/historicalrecord.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/components/historicalrecord.vue @@ -15,9 +15,9 @@
-
- {{$t('returntofill')}} -
+ + + diff --git a/jero-web/src/views/otamanagement/vehicleinformation/index.vue b/jero-web/src/views/otamanagement/vehicleinformation/index.vue index 503940a48..7997af34d 100644 --- a/jero-web/src/views/otamanagement/vehicleinformation/index.vue +++ b/jero-web/src/views/otamanagement/vehicleinformation/index.vue @@ -7,35 +7,35 @@ {{$t('fillintherecord')}} -
- - {{$t('historicalrecord')}} -
+ + + + + - - + + - + - + - + - + - + - + - + @@ -163,6 +163,7 @@ export default { ], toggleSearchStatus: false, tabActive: this.$t('basicinformationofvehicletype'), + oldName: this.$t('basicinformationofvehicletype'), otaId:'' } }, @@ -170,6 +171,25 @@ export default { callback(value) { this.tabActive = value }, + tabClick(tab,event){ + this.tabActive=tab + if(this.oldName == this.$t('basicinformationofvehicletype')){ + this.$refs.dealtWithRef.save() + } else if(this.oldName == this.$t('onlineupgraderequirements')){ + this.$refs.doneListRef.save() + } else if(this.oldName == this.$t('safetymeasure')){ + this.$refs.SentListRef.save() + } else if(this.oldName == this.$t('upgradedonline')){ + this.$refs.upgradedonlineRef.save() + } else if(this.oldName == this.$t('beupgradedonline')){ + this.$refs.beupgradedonlineRef.save() + } else if(this.oldName == this.$t('recordparameters')){ + this.$refs.recordparametersRef.save() + } else if(this.oldName == this.$t('other')){ + this.$refs.otherRef.save() + } + this.oldName = tab + }, handleToggleSearch() { this.toggleSearchStatus = !this.toggleSearchStatus }, diff --git a/jero-web/src/views/parameter/escalationlibrary/index.vue b/jero-web/src/views/parameter/escalationlibrary/index.vue index 1df5d2c2c..67c5295ec 100644 --- a/jero-web/src/views/parameter/escalationlibrary/index.vue +++ b/jero-web/src/views/parameter/escalationlibrary/index.vue @@ -160,7 +160,7 @@ { title: this.$t('entryName'), align: 'left', - width: 405, + width: 300, dataIndex: 'projectName', sorter:true, scopedSlots: { customRender: 'projectName' } @@ -168,20 +168,20 @@ { title: this.$t('ListTitle'), align: 'left', - width: 500, + width: 400, dataIndex: 'title', }, { title: this.$t('Version'), align: 'left', - width: 384, + width: 90, dataIndex: 'version' }, { title: this.$t('operation'), align: 'left', fixed: 'right', - width: 220, + width: 200, scopedSlots: { customRender: 'operation' } } ], diff --git a/jero-web/src/views/parameter/parameterexport/index.vue b/jero-web/src/views/parameter/parameterexport/index.vue index 70d3e477e..35c2c4398 100644 --- a/jero-web/src/views/parameter/parameterexport/index.vue +++ b/jero-web/src/views/parameter/parameterexport/index.vue @@ -215,7 +215,7 @@ export default { title: this.$t('operation'), align: 'left', fixed: 'right', - width: 200, + width: 130, scopedSlots: { customRender: 'operation' } } ], diff --git a/jero-web/src/views/parameter/parameterlist/index.vue b/jero-web/src/views/parameter/parameterlist/index.vue index e7e02a093..1efb39f1a 100644 --- a/jero-web/src/views/parameter/parameterlist/index.vue +++ b/jero-web/src/views/parameter/parameterlist/index.vue @@ -185,7 +185,7 @@ export default { title: this.$t('areaOfResponsibility'), align: 'left', dataIndex: 'dutyTerritory_dictText', - width: 259, + width: 100, sorter: true, ellipsis: true, }, @@ -194,14 +194,14 @@ export default { align: 'left', dataIndex: 'createTime', sorter: true, - width: 265, + width: 200, ellipsis: true, }, { title: this.$t('operation'), align: 'left', fixed: 'right', - width: 200, + width: 130, scopedSlots: { customRender: 'operation' } } ], diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue index 427b790e5..4bea95522 100644 --- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue +++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue @@ -33,28 +33,28 @@ v-model="formInline.paramsName"> - -
-
- {{$t('NareaOfResponsibility')}} -
- -
-
- - - - - - - - - - - + + + + + + + + + + + + +
+
+ {{$t('certificationCategory')}} +
+ +
+