|
|
|
@ -1,11 +1,9 @@
|
|
|
|
|
package com.foreverwin.mesnac.anomaly.service.impl;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.foreverwin.mesnac.anomaly.dto.IntegrationLogDto;
|
|
|
|
|
import com.foreverwin.mesnac.anomaly.mapper.ReportMapper;
|
|
|
|
|
import com.foreverwin.mesnac.anomaly.service.ReportService;
|
|
|
|
|
import com.foreverwin.mesnac.anomaly.utils.DateReportUtils;
|
|
|
|
|
import com.foreverwin.mesnac.common.enums.HandleEnum;
|
|
|
|
|
import com.foreverwin.mesnac.common.util.DateUtil;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.mapper.DataFieldListMapper;
|
|
|
|
@ -676,6 +674,68 @@ public class ReportServiceImpl implements ReportService {
|
|
|
|
|
return reportMapper.qualityInspectionResponseReport(paramMap);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 项目生产加工周期看板
|
|
|
|
|
* @param userGroup
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public Map<String, Object> projectPlanningProgress(String userGroup) {
|
|
|
|
|
List<Map<String, String>> abnormalQualityList = reportMapper.projectPlanningProgress(userGroup);
|
|
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
|
|
Map<String, List<Map<String, String>>> workOrderMap = abnormalQualityList.stream()
|
|
|
|
|
.collect(Collectors.groupingBy(e -> {
|
|
|
|
|
String career =e.get("workOrder");
|
|
|
|
|
try {
|
|
|
|
|
if (career.indexOf("硫化") != -1) {
|
|
|
|
|
return "硫化";
|
|
|
|
|
}else if (career.indexOf("全钢") != -1) {
|
|
|
|
|
return "全钢";
|
|
|
|
|
}else if (career.indexOf("半钢") != -1) {
|
|
|
|
|
return "半钢";
|
|
|
|
|
}else if (career.indexOf("鼓") != -1) {
|
|
|
|
|
return "鼓";
|
|
|
|
|
}else if (career.indexOf("裁断") != -1) {
|
|
|
|
|
return "裁断";
|
|
|
|
|
}else if (career.indexOf("检测") != -1) {
|
|
|
|
|
return "检测";
|
|
|
|
|
}else if (career.indexOf("橡塑") != -1) {
|
|
|
|
|
return "橡塑";
|
|
|
|
|
} else if (career.indexOf("非公路") != -1) {
|
|
|
|
|
return "非公路";
|
|
|
|
|
} else if (career.indexOf("塞班") != -1) {
|
|
|
|
|
return "塞班";
|
|
|
|
|
} else {
|
|
|
|
|
return "外部";
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception exception) {
|
|
|
|
|
exception.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
return "";
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
for (String workOrder : workOrderMap.keySet()) {
|
|
|
|
|
HashMap<String, Object> resultMap = new HashMap<>();
|
|
|
|
|
ArrayList<String> items = new ArrayList<>();
|
|
|
|
|
ArrayList<String> shopOrderQTYs = new ArrayList<>();
|
|
|
|
|
ArrayList<String> doneQTY = new ArrayList<>();
|
|
|
|
|
ArrayList<String> rate = new ArrayList<>();
|
|
|
|
|
List<Map<String, String>> maps = workOrderMap.get(workOrder);
|
|
|
|
|
maps.forEach(e -> {
|
|
|
|
|
items.add(e.get("item"));
|
|
|
|
|
shopOrderQTYs.add(e.get("shopOrderQTY"));
|
|
|
|
|
doneQTY.add(e.get("doneQTY"));
|
|
|
|
|
rate.add(e.get("rate"));
|
|
|
|
|
});
|
|
|
|
|
resultMap.put("items",items);
|
|
|
|
|
resultMap.put("shopOrderQTY",shopOrderQTYs);
|
|
|
|
|
resultMap.put("doneQTY",doneQTY);
|
|
|
|
|
resultMap.put("rate",rate);
|
|
|
|
|
result.put(workOrder,resultMap);
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 事业部质量看板数据接口
|
|
|
|
|
* @param user
|
|
|
|
|