|
@@ -213,61 +213,62 @@ public class ProjectPlanService {
|
|
|
List<ProBasicProjectPlan> currentls = proBasicProjectPlanService.getList(String.valueOf(currentyear)); //本年所有集合
|
|
|
List<ProBasicProjectPlan> twols = proBasicProjectPlanService.getList(String.valueOf(twoyear));
|
|
|
List<ProBasicProjectPlan> threels = proBasicProjectPlanService.getList(String.valueOf(threeyear));
|
|
|
-
|
|
|
List<ProEconPowerstationInfoDay5> jn = null;
|
|
|
- QueryWrapper<ProEconPowerstationInfoDay5> qw3 = new QueryWrapper<>();
|
|
|
- if (wpId.equals("KGDL_FGS0")){
|
|
|
- qw3.lambda().in(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_KGDL_GFFD_ZGS0", "SXJ_KGDL_FLFD_ZGS0");
|
|
|
- } else if (wpId.equals("KGDL_FGS-1")) {
|
|
|
- qw3.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_KGDL_FLFD_ZGS0");
|
|
|
- } else if (wpId.equals("KGDL_FGS-2")) {
|
|
|
- qw3.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_KGDL_GFFD_ZGS0");
|
|
|
- } else if (wpId.equals("SXJ_RGN0")) {
|
|
|
- qw3.lambda().in(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-1", "SXJ_RGN-2");
|
|
|
- } else if (wpId.equals("SXJ_RGN-1")) {
|
|
|
- qw3.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-1");
|
|
|
- }else if (wpId.equals("SXJ_RGN-2")) {
|
|
|
- qw3.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-2");
|
|
|
- }
|
|
|
- qw3.lambda().between(ProEconPowerstationInfoDay5::getRecordDate, beginDate, endDate);
|
|
|
- jn = proEconPowerstationInfoDay5Service.list(qw3);
|
|
|
-
|
|
|
List<ProEconPowerstationInfoDay5> qn = null;
|
|
|
- QueryWrapper<ProEconPowerstationInfoDay5> qw4 = new QueryWrapper<>();
|
|
|
- if (wpId.equals("KGDL_FGS0")){
|
|
|
- qw4.lambda().in(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_KGDL_GFFD_ZGS0", "SXJ_KGDL_FLFD_ZGS0");
|
|
|
- } else if (wpId.equals("KGDL_FGS-1")) {
|
|
|
- qw4.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_KGDL_FLFD_ZGS0");
|
|
|
- } else if (wpId.equals("KGDL_FGS-2")) {
|
|
|
- qw4.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_KGDL_GFFD_ZGS0");
|
|
|
- } else if (wpId.equals("SXJ_RGN0")) {
|
|
|
- qw4.lambda().in(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-1", "SXJ_RGN-2");
|
|
|
- } else if (wpId.equals("SXJ_RGN-1")) {
|
|
|
- qw4.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-1");
|
|
|
- }else if (wpId.equals("SXJ_RGN-2")) {
|
|
|
- qw4.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-2");
|
|
|
- }
|
|
|
- qw4.lambda().between(ProEconPowerstationInfoDay5::getRecordDate, qnbeginDate, qnendDate);
|
|
|
- qn = proEconPowerstationInfoDay5Service.list(qw4);
|
|
|
-
|
|
|
List<ProEconPowerstationInfoDay5> qyn = null;
|
|
|
- QueryWrapper<ProEconPowerstationInfoDay5> qw5 = new QueryWrapper<>();
|
|
|
- if (wpId.equals("KGDL_FGS0")){
|
|
|
- qw5.lambda().in(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_KGDL_GFFD_ZGS0", "SXJ_KGDL_FLFD_ZGS0");
|
|
|
- } else if (wpId.equals("KGDL_FGS-1")) {
|
|
|
- qw5.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_KGDL_FLFD_ZGS0");
|
|
|
- } else if (wpId.equals("KGDL_FGS-2")) {
|
|
|
- qw5.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_KGDL_GFFD_ZGS0");
|
|
|
- } else if (wpId.equals("SXJ_RGN0")) {
|
|
|
- qw5.lambda().in(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-1", "SXJ_RGN-2");
|
|
|
- } else if (wpId.equals("SXJ_RGN-1")) {
|
|
|
- qw5.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-1");
|
|
|
- }else if (wpId.equals("SXJ_RGN-2")) {
|
|
|
- qw5.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-2");
|
|
|
+ if (wpId.endsWith("0") ||wpId.endsWith("-1") || wpId.endsWith("-2") ) {
|
|
|
+
|
|
|
+ QueryWrapper<ProEconPowerstationInfoDay5> qw3 = new QueryWrapper<>();
|
|
|
+ if (wpId.equals("KGDL_FGS0")) {
|
|
|
+ qw3.lambda().in(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_KGDL_GFFD_ZGS0", "SXJ_KGDL_FLFD_ZGS0");
|
|
|
+ } else if (wpId.equals("KGDL_FGS-1")) {
|
|
|
+ qw3.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_KGDL_FLFD_ZGS0");
|
|
|
+ } else if (wpId.equals("KGDL_FGS-2")) {
|
|
|
+ qw3.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_KGDL_GFFD_ZGS0");
|
|
|
+ } else if (wpId.equals("SXJ_RGN0")) {
|
|
|
+ qw3.lambda().in(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-1", "SXJ_RGN-2");
|
|
|
+ } else if (wpId.equals("SXJ_RGN-1")) {
|
|
|
+ qw3.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-1");
|
|
|
+ } else if (wpId.equals("SXJ_RGN-2")) {
|
|
|
+ qw3.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-2");
|
|
|
+ }
|
|
|
+ qw3.lambda().between(ProEconPowerstationInfoDay5::getRecordDate, beginDate, endDate);
|
|
|
+ jn = proEconPowerstationInfoDay5Service.list(qw3);
|
|
|
+
|
|
|
+ QueryWrapper<ProEconPowerstationInfoDay5> qw4 = new QueryWrapper<>();
|
|
|
+ if (wpId.equals("KGDL_FGS0")) {
|
|
|
+ qw4.lambda().in(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_KGDL_GFFD_ZGS0", "SXJ_KGDL_FLFD_ZGS0");
|
|
|
+ } else if (wpId.equals("KGDL_FGS-1")) {
|
|
|
+ qw4.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_KGDL_FLFD_ZGS0");
|
|
|
+ } else if (wpId.equals("KGDL_FGS-2")) {
|
|
|
+ qw4.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_KGDL_GFFD_ZGS0");
|
|
|
+ } else if (wpId.equals("SXJ_RGN0")) {
|
|
|
+ qw4.lambda().in(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-1", "SXJ_RGN-2");
|
|
|
+ } else if (wpId.equals("SXJ_RGN-1")) {
|
|
|
+ qw4.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-1");
|
|
|
+ } else if (wpId.equals("SXJ_RGN-2")) {
|
|
|
+ qw4.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-2");
|
|
|
+ }
|
|
|
+ qw4.lambda().between(ProEconPowerstationInfoDay5::getRecordDate, qnbeginDate, qnendDate);
|
|
|
+ qn = proEconPowerstationInfoDay5Service.list(qw4);
|
|
|
+
|
|
|
+ QueryWrapper<ProEconPowerstationInfoDay5> qw5 = new QueryWrapper<>();
|
|
|
+ if (wpId.equals("KGDL_FGS0")) {
|
|
|
+ qw5.lambda().in(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_KGDL_GFFD_ZGS0", "SXJ_KGDL_FLFD_ZGS0");
|
|
|
+ } else if (wpId.equals("KGDL_FGS-1")) {
|
|
|
+ qw5.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_KGDL_FLFD_ZGS0");
|
|
|
+ } else if (wpId.equals("KGDL_FGS-2")) {
|
|
|
+ qw5.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_KGDL_GFFD_ZGS0");
|
|
|
+ } else if (wpId.equals("SXJ_RGN0")) {
|
|
|
+ qw5.lambda().in(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-1", "SXJ_RGN-2");
|
|
|
+ } else if (wpId.equals("SXJ_RGN-1")) {
|
|
|
+ qw5.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-1");
|
|
|
+ } else if (wpId.equals("SXJ_RGN-2")) {
|
|
|
+ qw5.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-2");
|
|
|
+ }
|
|
|
+ qw5.lambda().between(ProEconPowerstationInfoDay5::getRecordDate, qynbeginDate, qynendDate);
|
|
|
+ qyn = proEconPowerstationInfoDay5Service.list(qw5);
|
|
|
}
|
|
|
- qw5.lambda().between(ProEconPowerstationInfoDay5::getRecordDate, qynbeginDate, qynendDate);
|
|
|
- qyn = proEconPowerstationInfoDay5Service.list(qw5);
|
|
|
-
|
|
|
if (!wplist.isEmpty()) {
|
|
|
for (ProBasicPowerstation wpls : wplist) {
|
|
|
|
|
@@ -284,6 +285,24 @@ public class ProjectPlanService {
|
|
|
|
|
|
threejhdlsum += threejh.stream().mapToDouble(ProBasicProjectPlan::getGeneratingCapacity).sum(); //前年计划电量合
|
|
|
|
|
|
+
|
|
|
+ if (!(wpId.endsWith("0") ||wpId.endsWith("-1") || wpId.endsWith("-2"))) {
|
|
|
+ QueryWrapper<ProEconPowerstationInfoDay5> qw3 = new QueryWrapper<>();
|
|
|
+ QueryWrapper<ProEconPowerstationInfoDay5> qw2 = new QueryWrapper<>();
|
|
|
+ QueryWrapper<ProEconPowerstationInfoDay5> qw1 = new QueryWrapper<>();
|
|
|
+
|
|
|
+ qw3.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, wpId);
|
|
|
+ qw3.lambda().between(ProEconPowerstationInfoDay5::getRecordDate, beginDate, endDate);
|
|
|
+ jn = proEconPowerstationInfoDay5Service.list(qw3);
|
|
|
+
|
|
|
+ qw2.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, wpId);
|
|
|
+ qw2.lambda().between(ProEconPowerstationInfoDay5::getRecordDate, qnbeginDate, qnendDate);
|
|
|
+ qn = proEconPowerstationInfoDay5Service.list(qw2);
|
|
|
+
|
|
|
+ qw1.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, wpId);
|
|
|
+ qw1.lambda().between(ProEconPowerstationInfoDay5::getRecordDate, qynbeginDate, qynendDate);
|
|
|
+ qyn = proEconPowerstationInfoDay5Service.list(qw1);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
@@ -384,6 +403,8 @@ public class ProjectPlanService {
|
|
|
qw1.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-1");
|
|
|
}else if (wpId.equals("SXJ_RGN-2")) {
|
|
|
qw1.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, "SXJ_RGN-2");
|
|
|
+ } else {
|
|
|
+ qw1.lambda().eq(ProEconPowerstationInfoDay5::getForeignKeyId, wpId);
|
|
|
}
|
|
|
qw1.lambda().orderByDesc(ProEconPowerstationInfoDay5::getRecordDate);
|
|
|
qw1.last("LIMIT 1");
|