|
@@ -184,9 +184,17 @@ public class SpecificService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
private void setDySpecificinfodays(String companys, String type, String yearmonth, SpecificTopVo dqvo) {
|
|
private void setDySpecificinfodays(String companys, String type, String yearmonth, SpecificTopVo dqvo) {
|
|
|
|
+ LocalDate now = LocalDate.now();
|
|
|
|
+ int day = now.getDayOfMonth();
|
|
|
|
+ String[] yearMonth = yearmonth.split("-");
|
|
|
|
+ LocalDate current = LocalDate.of(Integer.parseInt(yearMonth[0]), Integer.parseInt(yearMonth[1]), day);
|
|
QueryWrapper<TurbineInfoDay> qw = new QueryWrapper<>();
|
|
QueryWrapper<TurbineInfoDay> qw = new QueryWrapper<>();
|
|
- qw.select("sum(llfdl) as llfdl,sum(rfdl) as rfdl,sum(gzss) as gzss,sum(jhjxss) as jhjxss,sum(fjhjxss) as fjhjxss,sum(djss) djss,sum(xnss) as xnss,sum(slss) as slss");
|
|
|
|
|
|
+ qw.select("sum(llfdl) as llfdl,sum(rfdl) as rfdl,sum(gzss) as gzss,sum(jhjxss) as jhjxss,sum(fjhjxss) as fjhjxss,sum(djss) as djss,sum(xdss) as xdss,sum(xnss) as xnss,sum(slss) as slss");
|
|
qw.eq("to_char(record_date,'yyyy-MM')", yearmonth);
|
|
qw.eq("to_char(record_date,'yyyy-MM')", yearmonth);
|
|
|
|
+ if (Integer.parseInt(yearMonth[0]) == now.getYear() && Integer.parseInt(yearMonth[1]) == now.getMonthValue()) {
|
|
|
|
+ qw.lt("record_date", current);
|
|
|
|
+ }
|
|
|
|
+
|
|
qw.groupBy("to_char(record_date,'yyyy-MM')");
|
|
qw.groupBy("to_char(record_date,'yyyy-MM')");
|
|
List<TurbineInfoDay> monthList = iTurbineInfoDayService.list(qw);
|
|
List<TurbineInfoDay> monthList = iTurbineInfoDayService.list(qw);
|
|
if (StringUtils.isNotEmpty(monthList)) {
|
|
if (StringUtils.isNotEmpty(monthList)) {
|
|
@@ -197,8 +205,8 @@ public class SpecificService {
|
|
dqvo.setYsjfdl(DoubleUtils.getRoundingNum(monthSpecific.getRfdl() / 1000, 2));
|
|
dqvo.setYsjfdl(DoubleUtils.getRoundingNum(monthSpecific.getRfdl() / 1000, 2));
|
|
dqvo.setYwhssdl(DoubleUtils.getRoundingNum(monthSpecific.getJhjxss() / 1000 + monthSpecific.getFjhjxss() / 1000, 2));
|
|
dqvo.setYwhssdl(DoubleUtils.getRoundingNum(monthSpecific.getJhjxss() / 1000 + monthSpecific.getFjhjxss() / 1000, 2));
|
|
dqvo.setYgzssdl(DoubleUtils.getRoundingNum(monthSpecific.getGzss() / 1000, 2));
|
|
dqvo.setYgzssdl(DoubleUtils.getRoundingNum(monthSpecific.getGzss() / 1000, 2));
|
|
- dqvo.setYxdssdl(DoubleUtils.getRoundingNum(monthSpecific.getXnss() / 1000, 2));
|
|
|
|
- dqvo.setYxnssdl(DoubleUtils.getRoundingNum(monthSpecific.getDjss() / 1000, 2));
|
|
|
|
|
|
+ dqvo.setYxdssdl(DoubleUtils.getRoundingNum(monthSpecific.getXdss() / 1000, 2));
|
|
|
|
+ dqvo.setYxnssdl(DoubleUtils.getRoundingNum(monthSpecific.getXnss() / 1000, 2));
|
|
dqvo.setYslssdl(DoubleUtils.getRoundingNum(monthSpecific.getSlss() / 1000, 2));
|
|
dqvo.setYslssdl(DoubleUtils.getRoundingNum(monthSpecific.getSlss() / 1000, 2));
|
|
if (dqvo.getYllfdl() != 0) {
|
|
if (dqvo.getYllfdl() != 0) {
|
|
dqvo.setYfnlyl(DoubleUtils.getRoundingNum(dqvo.getYsjfdl() / dqvo.getYllfdl() * 100, 2));
|
|
dqvo.setYfnlyl(DoubleUtils.getRoundingNum(dqvo.getYsjfdl() / dqvo.getYllfdl() * 100, 2));
|
|
@@ -305,7 +313,7 @@ public class SpecificService {
|
|
String year = String.valueOf(Integer.parseInt(yearString) - 1);
|
|
String year = String.valueOf(Integer.parseInt(yearString) - 1);
|
|
String yearMonth = year + "-" + yearmonth.split("-")[1];
|
|
String yearMonth = year + "-" + yearmonth.split("-")[1];
|
|
QueryWrapper<TurbineInfoDay> qw = new QueryWrapper<>();
|
|
QueryWrapper<TurbineInfoDay> qw = new QueryWrapper<>();
|
|
- qw.select("sum(llfdl) as llfdl,sum(rfdl) as rfdl,sum(gzss) as gzss,sum(jhjxss) as jhjxss,sum(fjhjxss) as fjhjxss,sum(djss) djss,sum(xnss) as xnss,sum(slss) as slss");
|
|
|
|
|
|
+ qw.select("sum(llfdl) as llfdl,sum(rfdl) as rfdl,sum(gzss) as gzss,sum(jhjxss) as jhjxss,sum(fjhjxss) as fjhjxss,sum(djss) as djss,sum(xnss) as xnss,sum(slss) as slss");
|
|
qw.eq("to_char(record_date,'yyyy-MM')", yearMonth);
|
|
qw.eq("to_char(record_date,'yyyy-MM')", yearMonth);
|
|
qw.groupBy("to_char(record_date,'yyyy-MM')");
|
|
qw.groupBy("to_char(record_date,'yyyy-MM')");
|
|
List<TurbineInfoDay> monthList = iTurbineInfoDayService.list(qw);
|
|
List<TurbineInfoDay> monthList = iTurbineInfoDayService.list(qw);
|
|
@@ -422,9 +430,16 @@ public class SpecificService {
|
|
* @param dqvo
|
|
* @param dqvo
|
|
*/
|
|
*/
|
|
private void setDnSpecificinfodays(String companys, String type, String yearmonth, SpecificTopVo dqvo) {
|
|
private void setDnSpecificinfodays(String companys, String type, String yearmonth, SpecificTopVo dqvo) {
|
|
|
|
+ LocalDate now = LocalDate.now();
|
|
|
|
+ int day = now.getDayOfMonth();
|
|
|
|
+ String[] yearMonth = yearmonth.split("-");
|
|
|
|
+ LocalDate current = LocalDate.of(Integer.parseInt(yearMonth[0]), Integer.parseInt(yearMonth[1]), day);
|
|
QueryWrapper<TurbineInfoDay> qw = new QueryWrapper<>();
|
|
QueryWrapper<TurbineInfoDay> qw = new QueryWrapper<>();
|
|
- qw.select("sum(llfdl) as llfdl,sum(rfdl) as rfdl,sum(gzss) as gzss,sum(jhjxss) as jhjxss,sum(fjhjxss) as fjhjxss,sum(djss) djss,sum(xnss) as xnss,sum(slss) as slss");
|
|
|
|
|
|
+ qw.select("sum(llfdl) as llfdl,sum(rfdl) as rfdl,sum(gzss) as gzss,sum(jhjxss) as jhjxss,sum(fjhjxss) as fjhjxss,sum(djss) as djss,sum(xdss) as xdss,sum(xnss) as xnss,sum(slss) as slss");
|
|
qw.eq("to_char(record_date,'yyyy')", yearmonth.split("-")[0]);
|
|
qw.eq("to_char(record_date,'yyyy')", yearmonth.split("-")[0]);
|
|
|
|
+ if (Integer.parseInt(yearMonth[0]) == now.getYear() && Integer.parseInt(yearMonth[1]) == now.getMonthValue()) {
|
|
|
|
+ qw.lt("record_date", current);
|
|
|
|
+ }
|
|
qw.groupBy("to_char(record_date,'yyyy')");
|
|
qw.groupBy("to_char(record_date,'yyyy')");
|
|
List<TurbineInfoDay> yearList = iTurbineInfoDayService.list(qw);
|
|
List<TurbineInfoDay> yearList = iTurbineInfoDayService.list(qw);
|
|
if (StringUtils.isNotEmpty(yearList)) {
|
|
if (StringUtils.isNotEmpty(yearList)) {
|
|
@@ -435,8 +450,8 @@ public class SpecificService {
|
|
dqvo.setNsjfdl(DoubleUtils.getRoundingNum(yearSpecific.getRfdl() / 1000, 2));
|
|
dqvo.setNsjfdl(DoubleUtils.getRoundingNum(yearSpecific.getRfdl() / 1000, 2));
|
|
dqvo.setNwhssdl(DoubleUtils.getRoundingNum(yearSpecific.getJhjxss() / 1000 + yearSpecific.getFjhjxss() / 1000, 2));
|
|
dqvo.setNwhssdl(DoubleUtils.getRoundingNum(yearSpecific.getJhjxss() / 1000 + yearSpecific.getFjhjxss() / 1000, 2));
|
|
dqvo.setNgzssdl(DoubleUtils.getRoundingNum(yearSpecific.getGzss() / 1000, 2));
|
|
dqvo.setNgzssdl(DoubleUtils.getRoundingNum(yearSpecific.getGzss() / 1000, 2));
|
|
- dqvo.setNxdssdl(DoubleUtils.getRoundingNum(yearSpecific.getXnss() / 1000, 2));
|
|
|
|
- dqvo.setNxnssdl(DoubleUtils.getRoundingNum(yearSpecific.getDjss() / 1000, 2));
|
|
|
|
|
|
+ dqvo.setNxdssdl(DoubleUtils.getRoundingNum(yearSpecific.getXdss() / 1000, 2));
|
|
|
|
+ dqvo.setNxnssdl(DoubleUtils.getRoundingNum(yearSpecific.getXnss() / 1000, 2));
|
|
dqvo.setNslssdl(DoubleUtils.getRoundingNum(yearSpecific.getSlss() / 1000, 2));
|
|
dqvo.setNslssdl(DoubleUtils.getRoundingNum(yearSpecific.getSlss() / 1000, 2));
|
|
if (dqvo.getYllfdl() != 0) {
|
|
if (dqvo.getYllfdl() != 0) {
|
|
dqvo.setNfnlyl(DoubleUtils.getRoundingNum(dqvo.getNsjfdl() / dqvo.getNllfdl() * 100, 2));
|
|
dqvo.setNfnlyl(DoubleUtils.getRoundingNum(dqvo.getNsjfdl() / dqvo.getNllfdl() * 100, 2));
|
|
@@ -1844,7 +1859,9 @@ public class SpecificService {
|
|
currentqw.select("station_id,max(record_date) as record_date,sum(rfdl_fj) rfdl_fj");
|
|
currentqw.select("station_id,max(record_date) as record_date,sum(rfdl_fj) rfdl_fj");
|
|
currentqw.eq("to_char(record_date,'yyyy')", year);
|
|
currentqw.eq("to_char(record_date,'yyyy')", year);
|
|
currentqw.like("station_id", "_FDC_");
|
|
currentqw.like("station_id", "_FDC_");
|
|
- currentqw.lt("record_date", of);
|
|
|
|
|
|
+ if (Integer.parseInt(year) == now.getYear()) {
|
|
|
|
+ currentqw.lt("record_date", of);
|
|
|
|
+ }
|
|
currentqw.groupBy("to_char(record_date,'yyyy-MM'),station_id");
|
|
currentqw.groupBy("to_char(record_date,'yyyy-MM'),station_id");
|
|
List<StationInfoDay> currentList = iStationInfoDayService.list(currentqw);
|
|
List<StationInfoDay> currentList = iStationInfoDayService.list(currentqw);
|
|
|
|
|