|
|
|
@ -688,7 +688,9 @@ public class ReportServiceImpl implements ReportService {
|
|
|
|
|
List<Map<String, String>> result = reportMapper.monthLoadRateReport(paramMap);
|
|
|
|
|
Integer monthRemainingDays = getMonthRemainingDays();
|
|
|
|
|
for (Map<String, String> map : result) {
|
|
|
|
|
Float number = Float.valueOf(String.valueOf(map.get("workHours" + month))) + Float.valueOf(String.valueOf(map.get("tardinessWork")));
|
|
|
|
|
Float number = Float.valueOf(String.valueOf(map.get("workHours" + month)))
|
|
|
|
|
+ Float.valueOf(String.valueOf(map.get("tardinessWork")))
|
|
|
|
|
- Float.valueOf(String.valueOf(map.get("monthToNow")));
|
|
|
|
|
map.put("workHours" + month, String.format("%.2f",number));
|
|
|
|
|
if ((map.containsKey("dayCapacity"))){
|
|
|
|
|
Float dayCapacity= (Float.valueOf(String.valueOf(map.get("dayCapacity")))) * monthRemainingDays;
|
|
|
|
@ -1329,21 +1331,21 @@ public class ReportServiceImpl implements ReportService {
|
|
|
|
|
tardinessWork += Float.valueOf(String.valueOf(map.get("tardinessWork")));
|
|
|
|
|
totalWorkingHours += Float.valueOf(String.valueOf(map.get("totalWorkingHours")));
|
|
|
|
|
}
|
|
|
|
|
countMap.put("tardinessWork",String.format("%.2f",tardinessWork));
|
|
|
|
|
countMap.put("monthCapacity",String.format("%.2f",monthCapacity));
|
|
|
|
|
countMap.put("workHours1",String.format("%.2f",workHours1));
|
|
|
|
|
countMap.put("workHours2",String.format("%.2f",workHours2));
|
|
|
|
|
countMap.put("workHours3",String.format("%.2f",workHours3));
|
|
|
|
|
countMap.put("workHours4",String.format("%.2f",workHours4));
|
|
|
|
|
countMap.put("workHours5",String.format("%.2f",workHours5));
|
|
|
|
|
countMap.put("workHours6",String.format("%.2f",workHours6));
|
|
|
|
|
countMap.put("workHours7",String.format("%.2f",workHours7));
|
|
|
|
|
countMap.put("workHours8",String.format("%.2f",workHours8));
|
|
|
|
|
countMap.put("workHours9",String.format("%.2f",workHours9));
|
|
|
|
|
countMap.put("workHours10",String.format("%.2f",workHours10));
|
|
|
|
|
countMap.put("workHours11",String.format("%.2f",workHours11));
|
|
|
|
|
countMap.put("workHours12",String.format("%.2f",workHours12));
|
|
|
|
|
countMap.put("totalWorkingHours",String.format("%.2f",totalWorkingHours));
|
|
|
|
|
countMap.put("tardinessWork",String.format("%.3f",tardinessWork));
|
|
|
|
|
countMap.put("monthCapacity",String.format("%.3f",monthCapacity));
|
|
|
|
|
countMap.put("workHours1",String.format("%.3f",workHours1));
|
|
|
|
|
countMap.put("workHours2",String.format("%.3f",workHours2));
|
|
|
|
|
countMap.put("workHours3",String.format("%.3f",workHours3));
|
|
|
|
|
countMap.put("workHours4",String.format("%.3f",workHours4));
|
|
|
|
|
countMap.put("workHours5",String.format("%.3f",workHours5));
|
|
|
|
|
countMap.put("workHours6",String.format("%.3f",workHours6));
|
|
|
|
|
countMap.put("workHours7",String.format("%.3f",workHours7));
|
|
|
|
|
countMap.put("workHours8",String.format("%.3f",workHours8));
|
|
|
|
|
countMap.put("workHours9",String.format("%.3f",workHours9));
|
|
|
|
|
countMap.put("workHours10",String.format("%.3f",workHours10));
|
|
|
|
|
countMap.put("workHours11",String.format("%.3f",workHours11));
|
|
|
|
|
countMap.put("workHours12",String.format("%.3f",workHours12));
|
|
|
|
|
countMap.put("totalWorkingHours",String.format("%.3f",totalWorkingHours));
|
|
|
|
|
result.add(countMap);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
@ -1391,24 +1393,75 @@ public class ReportServiceImpl implements ReportService {
|
|
|
|
|
tardinessWork += Float.valueOf(String.valueOf(map.get("tardinessWork")));
|
|
|
|
|
totalWorkingHours += Float.valueOf(String.valueOf(map.get("totalWorkingHours")));
|
|
|
|
|
}
|
|
|
|
|
countMap.put("tardinessWork",String.format("%.2f",tardinessWork));
|
|
|
|
|
countMap.put("workHours1",String.format("%.2f",workHours1));
|
|
|
|
|
countMap.put("workHours2",String.format("%.2f",workHours2));
|
|
|
|
|
countMap.put("workHours3",String.format("%.2f",workHours3));
|
|
|
|
|
countMap.put("workHours4",String.format("%.2f",workHours4));
|
|
|
|
|
countMap.put("workHours5",String.format("%.2f",workHours5));
|
|
|
|
|
countMap.put("workHours6",String.format("%.2f",workHours6));
|
|
|
|
|
countMap.put("workHours7",String.format("%.2f",workHours7));
|
|
|
|
|
countMap.put("workHours8",String.format("%.2f",workHours8));
|
|
|
|
|
countMap.put("workHours9",String.format("%.2f",workHours9));
|
|
|
|
|
countMap.put("workHours10",String.format("%.2f",workHours10));
|
|
|
|
|
countMap.put("workHours11",String.format("%.2f",workHours11));
|
|
|
|
|
countMap.put("workHours12",String.format("%.2f",workHours12));
|
|
|
|
|
countMap.put("totalWorkingHours",String.format("%.2f",totalWorkingHours));
|
|
|
|
|
countMap.put("tardinessWork",String.format("%.3f",tardinessWork));
|
|
|
|
|
countMap.put("workHours1",String.format("%.3f",workHours1));
|
|
|
|
|
countMap.put("workHours2",String.format("%.3f",workHours2));
|
|
|
|
|
countMap.put("workHours3",String.format("%.3f",workHours3));
|
|
|
|
|
countMap.put("workHours4",String.format("%.3f",workHours4));
|
|
|
|
|
countMap.put("workHours5",String.format("%.3f",workHours5));
|
|
|
|
|
countMap.put("workHours6",String.format("%.3f",workHours6));
|
|
|
|
|
countMap.put("workHours7",String.format("%.3f",workHours7));
|
|
|
|
|
countMap.put("workHours8",String.format("%.3f",workHours8));
|
|
|
|
|
countMap.put("workHours9",String.format("%.3f",workHours9));
|
|
|
|
|
countMap.put("workHours10",String.format("%.3f",workHours10));
|
|
|
|
|
countMap.put("workHours11",String.format("%.3f",workHours11));
|
|
|
|
|
countMap.put("workHours12",String.format("%.3f",workHours12));
|
|
|
|
|
countMap.put("totalWorkingHours",String.format("%.3f",totalWorkingHours));
|
|
|
|
|
result.add(countMap);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 工时看板
|
|
|
|
|
* @param workCenter
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public Map<String, Object> workHoursBoard(String workCenter) {
|
|
|
|
|
HashMap<String, Object> result = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
//各车间总工时完成情况(单轴多折线图)
|
|
|
|
|
List<Map<String, String>> WorkshopList = reportMapper.workingHoursEachWorkshop(workCenter);
|
|
|
|
|
List<String> monthOldList = WorkshopList.stream().map(e -> { return e.get("MONTH"); })
|
|
|
|
|
.distinct().sorted().collect(Collectors.toList());
|
|
|
|
|
ArrayList<String> monthList = new ArrayList<>();
|
|
|
|
|
monthList.addAll(monthOldList);
|
|
|
|
|
|
|
|
|
|
Map<String, List<Map<String, String>>> descriptionMap = WorkshopList.stream().
|
|
|
|
|
collect(Collectors.groupingBy(e -> e.get("WORK_CENTER")));
|
|
|
|
|
ArrayList<HashMap<String, Object>> descriptionValueList = new ArrayList<>();
|
|
|
|
|
for (String description : descriptionMap.keySet()) {
|
|
|
|
|
List<Map<String, String>> maps = descriptionMap.get(description);
|
|
|
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
|
|
|
ArrayList<Float> QTYList = new ArrayList<>();
|
|
|
|
|
maps.forEach(e -> {
|
|
|
|
|
QTYList.add(Float.valueOf(String.valueOf(e.get("QTY"))));
|
|
|
|
|
});
|
|
|
|
|
map.put("name",description);
|
|
|
|
|
map.put("value",QTYList);
|
|
|
|
|
descriptionValueList.add(map);
|
|
|
|
|
}
|
|
|
|
|
result.put("monthList",monthList);
|
|
|
|
|
result.put("descriptionValueList",descriptionValueList);
|
|
|
|
|
|
|
|
|
|
//事业部完工工时占比(双环形图)
|
|
|
|
|
HashMap<String, Object> dutyCauseMap = new HashMap<>();
|
|
|
|
|
List<Map<String, String>> workHoursCompletedList = reportMapper.workHoursCompletedBusinessUnit(workCenter);
|
|
|
|
|
ArrayList<String> nameList = new ArrayList<>();
|
|
|
|
|
ArrayList<HashMap<String, Object>> nameAndValueList = new ArrayList<>();
|
|
|
|
|
for (Map<String, String> map : workHoursCompletedList) {
|
|
|
|
|
nameList.add(map.get("workOrder"));
|
|
|
|
|
HashMap<String, Object> NVMap = new HashMap<>();
|
|
|
|
|
NVMap.put("name",map.get("workOrder"));
|
|
|
|
|
NVMap.put("value",map.get("workHours"));
|
|
|
|
|
nameAndValueList.add(NVMap);
|
|
|
|
|
}
|
|
|
|
|
dutyCauseMap.put("causeTypeDescription",nameList);
|
|
|
|
|
dutyCauseMap.put("distributionMapList",nameAndValueList);
|
|
|
|
|
result.put("dutyCause",dutyCauseMap);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 工时统计报表
|
|
|
|
|
* @param paramMap
|
|
|
|
|