|
|
@@ -4060,10 +4060,18 @@ public class IotStaticController {
|
|
|
Map<Long, Integer> projectReportPair = new HashMap<>();
|
|
|
// 过滤掉 ‘设备保养、生产配合、待命’ 之外的非生产时间集合
|
|
|
Map<String, Integer> nptTeamPair = new HashMap<>();
|
|
|
+ // key非生产时间名称 value钻井业务类型数量
|
|
|
+ Map<String, Integer> nptZjPair = new HashMap<>();
|
|
|
+ // key非生产时间名称 value修井业务类型数量
|
|
|
+ Map<String, Integer> nptXjPair = new HashMap<>();
|
|
|
+
|
|
|
List<NptCountVo> resultNptCounts = new ArrayList<>();
|
|
|
if (CollUtil.isNotEmpty(dailyReports)) {
|
|
|
// 整理出每个项目部下的队伍填报的日报数量
|
|
|
dailyReports.forEach(report -> {
|
|
|
+ // 业务类型 1钻井 2修井
|
|
|
+ String classification = report.getProjectClassification();
|
|
|
+ boolean zjFlag = "1".equals(classification) ? true : false;
|
|
|
if (CollUtil.isNotEmpty(projectTeamPair)) {
|
|
|
projectTeamPair.forEach((projectDeptId, teamDeptIds) -> {
|
|
|
if (teamDeptIds.contains(report.getDeptId())) {
|
|
|
@@ -4082,6 +4090,22 @@ public class IotStaticController {
|
|
|
} else {
|
|
|
nptTeamPair.put("工程质量", 1);
|
|
|
}
|
|
|
+ // 设置不同业务类型的 npt 数量
|
|
|
+ if (zjFlag) {
|
|
|
+ if (nptZjPair.containsKey("工程质量")) {
|
|
|
+ Integer tempCount = nptZjPair.get("工程质量");
|
|
|
+ nptZjPair.put("工程质量", ++tempCount);
|
|
|
+ } else {
|
|
|
+ nptZjPair.put("工程质量", 1);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (nptXjPair.containsKey("工程质量")) {
|
|
|
+ Integer tempCount = nptXjPair.get("工程质量");
|
|
|
+ nptXjPair.put("工程质量", ++tempCount);
|
|
|
+ } else {
|
|
|
+ nptXjPair.put("工程质量", 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
BigDecimal repairTime = report.getRepairTime();
|
|
|
if (ObjUtil.isNotEmpty(repairTime) && repairTime.compareTo(BigDecimal.ZERO)>0) {
|
|
|
@@ -4091,6 +4115,21 @@ public class IotStaticController {
|
|
|
} else {
|
|
|
nptTeamPair.put("设备故障", 1);
|
|
|
}
|
|
|
+ if (zjFlag) {
|
|
|
+ if (nptZjPair.containsKey("设备故障")) {
|
|
|
+ Integer tempCount = nptZjPair.get("设备故障");
|
|
|
+ nptZjPair.put("设备故障", ++tempCount);
|
|
|
+ } else {
|
|
|
+ nptZjPair.put("设备故障", 1);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (nptXjPair.containsKey("设备故障")) {
|
|
|
+ Integer tempCount = nptXjPair.get("设备故障");
|
|
|
+ nptXjPair.put("设备故障", ++tempCount);
|
|
|
+ } else {
|
|
|
+ nptXjPair.put("设备故障", 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
BigDecimal complexityTime = report.getComplexityTime();
|
|
|
if (ObjUtil.isNotEmpty(complexityTime) && complexityTime.compareTo(BigDecimal.ZERO)>0) {
|
|
|
@@ -4100,6 +4139,21 @@ public class IotStaticController {
|
|
|
} else {
|
|
|
nptTeamPair.put("技术受限", 1);
|
|
|
}
|
|
|
+ if (zjFlag) {
|
|
|
+ if (nptZjPair.containsKey("技术受限")) {
|
|
|
+ Integer tempCount = nptZjPair.get("技术受限");
|
|
|
+ nptZjPair.put("技术受限", ++tempCount);
|
|
|
+ } else {
|
|
|
+ nptZjPair.put("技术受限", 1);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (nptXjPair.containsKey("技术受限")) {
|
|
|
+ Integer tempCount = nptXjPair.get("技术受限");
|
|
|
+ nptXjPair.put("技术受限", ++tempCount);
|
|
|
+ } else {
|
|
|
+ nptXjPair.put("技术受限", 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
BigDecimal rectificationTime = report.getRectificationTime();
|
|
|
if (ObjUtil.isNotEmpty(rectificationTime) && rectificationTime.compareTo(BigDecimal.ZERO)>0) {
|
|
|
@@ -4109,6 +4163,21 @@ public class IotStaticController {
|
|
|
} else {
|
|
|
nptTeamPair.put("生产组织", 1);
|
|
|
}
|
|
|
+ if (zjFlag) {
|
|
|
+ if (nptZjPair.containsKey("生产组织")) {
|
|
|
+ Integer tempCount = nptZjPair.get("生产组织");
|
|
|
+ nptZjPair.put("生产组织", ++tempCount);
|
|
|
+ } else {
|
|
|
+ nptZjPair.put("生产组织", 1);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (nptXjPair.containsKey("生产组织")) {
|
|
|
+ Integer tempCount = nptXjPair.get("生产组织");
|
|
|
+ nptXjPair.put("生产组织", ++tempCount);
|
|
|
+ } else {
|
|
|
+ nptXjPair.put("生产组织", 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
BigDecimal waitingStopTime = report.getWaitingStopTime();
|
|
|
if (ObjUtil.isNotEmpty(waitingStopTime) && waitingStopTime.compareTo(BigDecimal.ZERO)>0) {
|
|
|
@@ -4118,6 +4187,21 @@ public class IotStaticController {
|
|
|
} else {
|
|
|
nptTeamPair.put("不可抗力", 1);
|
|
|
}
|
|
|
+ if (zjFlag) {
|
|
|
+ if (nptZjPair.containsKey("不可抗力")) {
|
|
|
+ Integer tempCount = nptZjPair.get("不可抗力");
|
|
|
+ nptZjPair.put("不可抗力", ++tempCount);
|
|
|
+ } else {
|
|
|
+ nptZjPair.put("不可抗力", 1);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (nptXjPair.containsKey("不可抗力")) {
|
|
|
+ Integer tempCount = nptXjPair.get("不可抗力");
|
|
|
+ nptXjPair.put("不可抗力", ++tempCount);
|
|
|
+ } else {
|
|
|
+ nptXjPair.put("不可抗力", 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
BigDecimal partyaDesign = report.getPartyaDesign();
|
|
|
if (ObjUtil.isNotEmpty(partyaDesign) && partyaDesign.compareTo(BigDecimal.ZERO)>0) {
|
|
|
@@ -4127,6 +4211,21 @@ public class IotStaticController {
|
|
|
} else {
|
|
|
nptTeamPair.put("甲方设计", 1);
|
|
|
}
|
|
|
+ if (zjFlag) {
|
|
|
+ if (nptZjPair.containsKey("甲方设计")) {
|
|
|
+ Integer tempCount = nptZjPair.get("甲方设计");
|
|
|
+ nptZjPair.put("甲方设计", ++tempCount);
|
|
|
+ } else {
|
|
|
+ nptZjPair.put("甲方设计", 1);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (nptXjPair.containsKey("甲方设计")) {
|
|
|
+ Integer tempCount = nptXjPair.get("甲方设计");
|
|
|
+ nptXjPair.put("甲方设计", ++tempCount);
|
|
|
+ } else {
|
|
|
+ nptXjPair.put("甲方设计", 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
BigDecimal partyaPrepare = report.getPartyaPrepare();
|
|
|
if (ObjUtil.isNotEmpty(partyaPrepare) && partyaPrepare.compareTo(BigDecimal.ZERO)>0) {
|
|
|
@@ -4136,6 +4235,21 @@ public class IotStaticController {
|
|
|
} else {
|
|
|
nptTeamPair.put("甲方准备", 1);
|
|
|
}
|
|
|
+ if (zjFlag) {
|
|
|
+ if (nptZjPair.containsKey("甲方准备")) {
|
|
|
+ Integer tempCount = nptZjPair.get("甲方准备");
|
|
|
+ nptZjPair.put("甲方准备", ++tempCount);
|
|
|
+ } else {
|
|
|
+ nptZjPair.put("甲方准备", 1);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (nptXjPair.containsKey("甲方准备")) {
|
|
|
+ Integer tempCount = nptXjPair.get("甲方准备");
|
|
|
+ nptXjPair.put("甲方准备", ++tempCount);
|
|
|
+ } else {
|
|
|
+ nptXjPair.put("甲方准备", 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
BigDecimal partyaResource = report.getPartyaResource();
|
|
|
if (ObjUtil.isNotEmpty(partyaResource) && partyaResource.compareTo(BigDecimal.ZERO)>0) {
|
|
|
@@ -4145,6 +4259,21 @@ public class IotStaticController {
|
|
|
} else {
|
|
|
nptTeamPair.put("甲方资源", 1);
|
|
|
}
|
|
|
+ if (zjFlag) {
|
|
|
+ if (nptZjPair.containsKey("甲方资源")) {
|
|
|
+ Integer tempCount = nptZjPair.get("甲方资源");
|
|
|
+ nptZjPair.put("甲方资源", ++tempCount);
|
|
|
+ } else {
|
|
|
+ nptZjPair.put("甲方资源", 1);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (nptXjPair.containsKey("甲方资源")) {
|
|
|
+ Integer tempCount = nptXjPair.get("甲方资源");
|
|
|
+ nptXjPair.put("甲方资源", ++tempCount);
|
|
|
+ } else {
|
|
|
+ nptXjPair.put("甲方资源", 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
BigDecimal otherNptTime = report.getOtherNptTime();
|
|
|
if (ObjUtil.isNotEmpty(otherNptTime) && otherNptTime.compareTo(BigDecimal.ZERO)>0) {
|
|
|
@@ -4154,6 +4283,21 @@ public class IotStaticController {
|
|
|
} else {
|
|
|
nptTeamPair.put("其它非生产时间", 1);
|
|
|
}
|
|
|
+ if (zjFlag) {
|
|
|
+ if (nptZjPair.containsKey("其它非生产时间")) {
|
|
|
+ Integer tempCount = nptZjPair.get("其它非生产时间");
|
|
|
+ nptZjPair.put("其它非生产时间", ++tempCount);
|
|
|
+ } else {
|
|
|
+ nptZjPair.put("其它非生产时间", 1);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (nptXjPair.containsKey("其它非生产时间")) {
|
|
|
+ Integer tempCount = nptXjPair.get("其它非生产时间");
|
|
|
+ nptXjPair.put("其它非生产时间", ++tempCount);
|
|
|
+ } else {
|
|
|
+ nptXjPair.put("其它非生产时间", 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
@@ -4165,6 +4309,17 @@ public class IotStaticController {
|
|
|
NptCountVo countVo = new NptCountVo();
|
|
|
countVo.setNptName(nptName);
|
|
|
countVo.setTeamCount(teamCount);
|
|
|
+ Map<String, Integer> classificationPair = new HashMap<>();
|
|
|
+ // 设置每个非生产时间 对应的 业务类型 zj xj
|
|
|
+ if (nptZjPair.containsKey(nptName)) {
|
|
|
+ Integer zjCount = nptZjPair.get(nptName);
|
|
|
+ classificationPair.put("zj", zjCount);
|
|
|
+ }
|
|
|
+ if (nptXjPair.containsKey(nptName)) {
|
|
|
+ Integer xjCount = nptXjPair.get(nptName);
|
|
|
+ classificationPair.put("xj", xjCount);
|
|
|
+ }
|
|
|
+ countVo.setClassificationPair(classificationPair);
|
|
|
resultNptCounts.add(countVo);
|
|
|
});
|
|
|
}
|