From a350640b396546a93281b9ef76f3edbf89127a0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E5=BB=BA=E8=B6=85?= <3182967682@qq.com> Date: Wed, 28 Oct 2020 14:55:00 +0800 Subject: [PATCH] fix --- .../service/impl/ChartResultServiceImpl.java | 32 ++++++++----------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/lz/modules/performance/service/impl/ChartResultServiceImpl.java b/src/main/java/com/lz/modules/performance/service/impl/ChartResultServiceImpl.java index 294470b1..78d819c5 100644 --- a/src/main/java/com/lz/modules/performance/service/impl/ChartResultServiceImpl.java +++ b/src/main/java/com/lz/modules/performance/service/impl/ChartResultServiceImpl.java @@ -9,7 +9,9 @@ import com.lz.modules.app.entity.DepartmentsStaffRelateEntity; import com.lz.modules.app.service.DepartmentsService; import com.lz.modules.app.service.DepartmentsStaffRelateService; import com.lz.modules.app.service.StaffService; +import com.lz.modules.flow.dao.FlowChartMapper; import com.lz.modules.flow.dao.FlowStartMapper; +import com.lz.modules.flow.entity.FlowChart; import com.lz.modules.flow.entity.FlowStart; import com.lz.modules.flow.service.EvaluationGroupService; import com.lz.modules.flow.service.FlowChartService; @@ -55,6 +57,8 @@ public class ChartResultServiceImpl implements ChartResultService { private FlowStartMapper flowStartMapper; @Autowired private DepartmentsService departmentsService; + @Autowired + private FlowChartService flowChartService; @Override @@ -191,33 +195,23 @@ public class ChartResultServiceImpl implements ChartResultService { data.add(all); for(ChartStatistical statistical:process){ - map.put(ResultFlowProcessEnum.getDesc(Integer.valueOf(statistical.getDesc())),statistical.getNum()); + map.put(statistical.getDesc(),statistical.getNum()); } - List starts = flowStartMapper.selectList(new QueryWrapper().eq("is_delete", 0)); - for(FlowStart start:starts){ - ChartStatistical statistical = new ChartStatistical(); - statistical.setDesc(start.getName()); - statistical.setNum(0); - statistical.setFlowProcess(Long.valueOf(flowProcessEnum.getStatus())); + List charts = flowChartService.selectFlowChartByFlowManagerId(1L); - Object o = map.get(flowProcessEnum.getDesc()); + for(FlowChart chart:charts){ + ChartStatistical statistical = new ChartStatistical(); + statistical.setDesc(chart.getName()); + statistical.setNum(0); + statistical.setFlowProcess(Long.valueOf(chart.getFlowProcess())); + statistical.setTip(chart.getDesc()); + Object o = map.get(chart.getFlowProcess() + StringUtil.EMPTY); if(o!=null){ statistical.setNum(Integer.valueOf(o.toString())); } data.add(statistical); } - for(ResultFlowProcessEnum flowProcessEnum:ResultFlowProcessEnum.values()){ - ChartStatistical statistical = new ChartStatistical(); - statistical.setDesc(flowProcessEnum.getDesc()); - statistical.setNum(0); - statistical.setFlowProcess(Long.valueOf(flowProcessEnum.getStatus())); - Object o = map.get(flowProcessEnum.getDesc()); - if(o!=null){ - statistical.setNum(Integer.valueOf(o.toString())); - } - data.add(statistical); - } return data; }