资源负荷率报表(月维度)改列值

master
yinq 2 years ago
parent e9bf31496d
commit 10a6dbef09

@ -691,7 +691,8 @@ public class ReportServiceImpl implements ReportService {
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")));
map.put("workHours" + month, String.format("%.2f",number)); map.put("workHours" + month, String.format("%.2f",number));
if ((map.containsKey("dayCapacity"))){ if ((map.containsKey("dayCapacity"))){
map.put("monthRate" + month, String.format("%.2f",(number / (Float.valueOf(String.valueOf(map.get("dayCapacity")))) * monthRemainingDays) * 100) + "%" ); Float dayCapacity= (Float.valueOf(String.valueOf(map.get("dayCapacity")))) * monthRemainingDays;
map.put("monthRate" + month, String.format("%.2f",(number / dayCapacity) * 100) + "%");
}else { }else {
map.put("monthRate" + month, "0.00%"); map.put("monthRate" + month, "0.00%");
} }
@ -699,6 +700,7 @@ public class ReportServiceImpl implements ReportService {
HashMap<String, String> countMap = new HashMap<>(); HashMap<String, String> countMap = new HashMap<>();
countMap.put("workCenterDescription","总计:"); countMap.put("workCenterDescription","总计:");
Float monthCapacity = 0.00f; Float monthCapacity = 0.00f;
Float dayCapacity = 0.00f;
Float tardinessWork = 0.00f; Float tardinessWork = 0.00f;
Float workHours1 = 0.00f; Float workHours1 = 0.00f;
Float workHours2 = 0.00f; Float workHours2 = 0.00f;
@ -719,6 +721,9 @@ public class ReportServiceImpl implements ReportService {
if (!StringUtils.isBlank(map.get("monthCapacity"))){ if (!StringUtils.isBlank(map.get("monthCapacity"))){
monthCapacity += Float.valueOf(String.valueOf(map.get("monthCapacity"))); monthCapacity += Float.valueOf(String.valueOf(map.get("monthCapacity")));
} }
if (!StringUtils.isBlank(map.get("dayCapacity"))){
dayCapacity += Float.valueOf(String.valueOf(map.get("dayCapacity")));
}
workHours1 += Float.valueOf(String.valueOf(map.get("workHours1"))); workHours1 += Float.valueOf(String.valueOf(map.get("workHours1")));
workHours2 += Float.valueOf(String.valueOf(map.get("workHours2"))); workHours2 += Float.valueOf(String.valueOf(map.get("workHours2")));
workHours3 += Float.valueOf(String.valueOf(map.get("workHours3"))); workHours3 += Float.valueOf(String.valueOf(map.get("workHours3")));
@ -736,6 +741,7 @@ public class ReportServiceImpl implements ReportService {
} }
countMap.put("tardinessWork",String.format("%.2f",tardinessWork)); countMap.put("tardinessWork",String.format("%.2f",tardinessWork));
countMap.put("monthCapacity",String.format("%.2f",monthCapacity)); countMap.put("monthCapacity",String.format("%.2f",monthCapacity));
countMap.put("dayCapacity",String.format("%.2f",dayCapacity));
countMap.put("workHours1",String.format("%.2f",workHours1)); countMap.put("workHours1",String.format("%.2f",workHours1));
countMap.put("workHours2",String.format("%.2f",workHours2)); countMap.put("workHours2",String.format("%.2f",workHours2));
countMap.put("workHours3",String.format("%.2f",workHours3)); countMap.put("workHours3",String.format("%.2f",workHours3));
@ -763,7 +769,8 @@ public class ReportServiceImpl implements ReportService {
countMap.put("currentCompletedWorkHours",String.format("%.2f",currentCompletedWorkHours)); countMap.put("currentCompletedWorkHours",String.format("%.2f",currentCompletedWorkHours));
countMap.put("currentCompletedRate",String.format("%.2f",currentCompletedWorkHours / monthCapacity * 100 ) + "%"); countMap.put("currentCompletedRate",String.format("%.2f",currentCompletedWorkHours / monthCapacity * 100 ) + "%");
countMap.put("currentPlanWorkHours",String.format("%.2f",currentPlanWorkHours)); countMap.put("currentPlanWorkHours",String.format("%.2f",currentPlanWorkHours));
countMap.put("monthRate" + month,String.format("%.2f",(Float.valueOf(String.valueOf(countMap.get("workHours" + month))) /
(monthRemainingDays * dayCapacity)) * 100 ) + "%");
result.add(countMap); result.add(countMap);
return result; return result;
} }

Loading…
Cancel
Save