This commit is contained in:
杜建超 2020-10-28 14:55:00 +08:00
parent 7e4896db90
commit a350640b39

View File

@ -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<FlowStart> starts = flowStartMapper.selectList(new QueryWrapper<FlowStart>().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<FlowChart> 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;
}