|
@@ -348,35 +348,63 @@ public class ProjectPlanActService{
|
|
|
boolean flag = false;
|
|
|
List<ProjectPlanArrage> projectPlanArrageList = new ArrayList<ProjectPlanArrage>();
|
|
|
for (ProjectPlanArrage plan:projectPlanArrages){
|
|
|
- projectPlanArrageList.add(plan);
|
|
|
+ if (plan.getArrageFlag().equals("1")){
|
|
|
+ if (null!=plan.getPowerPackage()&&!"".equals(plan.getPowerPackage())){
|
|
|
+ projectPlanArrageList.add(plan);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- HashSet<String> stringHashSet = new HashSet<String>();
|
|
|
- for (ProjectPlanArrage planArrage:projectPlanArrages){
|
|
|
- flag = false;
|
|
|
- //如果时间不为空
|
|
|
- if (null!=planArrage.getProjectDate()){
|
|
|
- stringHashSet = new HashSet<String>();
|
|
|
- PackagingUtil.getSplice(planArrage.getProjectPowerRange(),stringHashSet);
|
|
|
- for (ProjectPlanArrage planArrage1:projectPlanArrageList){
|
|
|
- if (null!=planArrage1.getProjectDate()){
|
|
|
- for (String s:stringHashSet){
|
|
|
- if (planArrage1.getProjectPowerRange().contains(s)){
|
|
|
- if (!sdf.format(planArrage.getProjectDate()).equals(sdf.format(planArrage1.getProjectDate()))){
|
|
|
- flag = true;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if (flag){
|
|
|
- break;
|
|
|
+ //存放停电包 hashSet
|
|
|
+ HashSet<String> hashSets = new HashSet<String>();
|
|
|
+ for (ProjectPlanArrage projectPack:projectPlanArrageList){
|
|
|
+ hashSets.add(projectPack.getPowerPackage());//添加至停电包集合
|
|
|
+ }
|
|
|
+ //循环判断hashSet
|
|
|
+ HashSet<String> packHashSet = new HashSet<String>();
|
|
|
+ for (String str:hashSets){
|
|
|
+ packHashSet = new HashSet<String>();
|
|
|
+ for (ProjectPlanArrage pa:projectPlanArrageList){
|
|
|
+ if (str.equals(pa.getPowerPackage())){
|
|
|
+ if (null!=pa.getProjectDate()){
|
|
|
+ packHashSet.add(sdf.format(pa.getProjectDate()));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (flag){
|
|
|
- break;
|
|
|
+ if (packHashSet.size()>1){
|
|
|
+ flag = true;
|
|
|
+ return flag;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+// HashSet<String> stringHashSet = new HashSet<String>();
|
|
|
+// for (ProjectPlanArrage planArrage:projectPlanArrages){
|
|
|
+// flag = false;
|
|
|
+// //如果时间不为空
|
|
|
+// if (null!=planArrage.getProjectDate()){
|
|
|
+// stringHashSet = new HashSet<String>();
|
|
|
+// PackagingUtil.getSplice(planArrage.getProjectPowerRange(),stringHashSet);
|
|
|
+// for (ProjectPlanArrage planArrage1:projectPlanArrageList){
|
|
|
+// if (null!=planArrage1.getProjectDate()){
|
|
|
+// for (String s:stringHashSet){
|
|
|
+// if (planArrage1.getProjectPowerRange().contains(s)){
|
|
|
+// if (!sdf.format(planArrage.getProjectDate()).equals(sdf.format(planArrage1.getProjectDate()))){
|
|
|
+// flag = true;
|
|
|
+// break;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// if (flag){
|
|
|
+// break;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// if (flag){
|
|
|
+// break;
|
|
|
+// }
|
|
|
+// }
|
|
|
return flag;
|
|
|
}
|
|
|
|
|
@@ -440,7 +468,7 @@ public class ProjectPlanActService{
|
|
|
OaNotify oaNotify = new OaNotify();
|
|
|
int count = 0;
|
|
|
oaNotify.setType("9");
|
|
|
- oaNotify.setTitle("项目计划安排通知");//非缺货信息
|
|
|
+ oaNotify.setTitle("项目计划安排通知");
|
|
|
oaNotify.setContent("请在详情中查看...");
|
|
|
oaNotify.setStatus("1");
|
|
|
oaNotify.setOaNotifyRecordIds(ids);
|