Browse Source

项目对标功能修改

shilin 4 years ago
parent
commit
10721b4c4c
1 changed files with 11 additions and 2 deletions
  1. 11 2
      src/main/java/com/gyee/frame/service/contrast/ContrastPjService.java

+ 11 - 2
src/main/java/com/gyee/frame/service/contrast/ContrastPjService.java

@@ -304,7 +304,14 @@ public class ContrastPjService {
 				String[] strs = wpId.split(",");
 				if (strs.length > 0) {
 					for (int i = 0; i < strs.length; i++) {
-						wpids.add(strs[i]);
+						if(InitialRunner.pjsmap.containsKey(strs[i]))
+						{
+							List<Project> pjls=InitialRunner.pjsmap.get(strs[i]);
+							for(Project pj:pjls)
+							{
+								wpids.add(pj.getId());
+							}
+						}
 					}
 				}
 			} else {
@@ -329,7 +336,9 @@ public class ContrastPjService {
 		if (!pjids.isEmpty()) {
 			ls =windpowerinfoday3Service.getWindpowerinfoday3(pjids, begin, end, "project");
 		} else if (!wpids.isEmpty()) {
-			ls =windpowerinfoday3Service.getWindpowerinfoday3(wpids, begin, end, "windpower");
+			ls =windpowerinfoday3Service.getWindpowerinfoday3(wpids, begin, end, "project");
+		}else {
+			ls =windpowerinfoday3Service.getWindpowerinfoday3(new ArrayList<>(), begin, end, "project");
 		}
 		// Map<String, Windpowerstation> wpmap = CacheContext.wpmap;
 		Map<String, Project> pjmap = InitialRunner.pjmap;