소스 검색

项目对标功能修改

shilin 4 년 전
부모
커밋
10721b4c4c
1개의 변경된 파일11개의 추가작업 그리고 2개의 파일을 삭제
  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;