|
@@ -50,6 +50,9 @@ class SaveMeterInfoHistoryTest {
|
|
|
@Value("${end.time}")
|
|
|
private String endTimeString;
|
|
|
|
|
|
+ @Resource
|
|
|
+ MeterJSCD meterJSCD;
|
|
|
+
|
|
|
//读取时间段内设备发电量计算肉发电量写入pg数据库
|
|
|
@Test
|
|
|
void saveEquipmentRfdl() {
|
|
@@ -80,7 +83,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
LocalDateTime day1 = LocalDateTimeUtil.of(startDateTime);
|
|
|
LocalDateTime day2 = LocalDateTimeUtil.of(endDateTime);
|
|
|
long between = ChronoUnit.DAYS.between(day1, day2);
|
|
|
- System.out.println("相差天数"+between);
|
|
|
+ System.out.println("相差天数" + between);
|
|
|
|
|
|
for (int i = 0; i <= between; i++) {
|
|
|
|
|
@@ -88,7 +91,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
//开始时间00:00:01
|
|
|
DateTime dateTime1 = DateUtil.offsetSecond(DateUtil.offsetDay(startDateTime, i), 1);
|
|
|
//结束时间第二天00:00:01
|
|
|
- DateTime dateTime2 = DateUtil.offsetSecond(DateUtil.offsetDay(startDateTime, i+1), 1);
|
|
|
+ DateTime dateTime2 = DateUtil.offsetSecond(DateUtil.offsetDay(startDateTime, i + 1), 1);
|
|
|
|
|
|
//6,根据code和日期开始时间00:00:00获取日期开始点发电量
|
|
|
Map<String, PointData> historySection1 = adapter.getHistorySection(pointcode, dateTime1.getTime());
|
|
@@ -120,9 +123,9 @@ class SaveMeterInfoHistoryTest {
|
|
|
meterInfoEquipment.setRfdl(rfdl);
|
|
|
// meterInfoEquipment.insert();
|
|
|
QueryWrapper<MeterInfoEquipment> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("equipment_nem_code", thingId1.getNemCode()).eq("date",dateTime1.toLocalDateTime());
|
|
|
+ queryWrapper.eq("equipment_nem_code", thingId1.getNemCode()).eq("date", dateTime1.toLocalDateTime());
|
|
|
List<MeterInfoEquipment> list = meterInfoEquipmentService.list(queryWrapper);
|
|
|
- System.out.println("有无数据集合数"+list.size());
|
|
|
+ System.out.println("有无数据集合数" + list.size());
|
|
|
if (list.size() > 0) {
|
|
|
meterInfoEquipment.update(queryWrapper);
|
|
|
} else {
|
|
@@ -145,7 +148,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
for (PowerStation powerStation : powerStationList) {
|
|
|
|
|
|
//2,根据场站ID得到场站下所有测点
|
|
|
- List<MeterPoint> meterPointList = meterPointService.list(new QueryWrapper<MeterPoint>().eq("windpowerstation_id", powerStation.getId()));
|
|
|
+ List<MeterPoint> meterPointList = meterPointService.list(new QueryWrapper<MeterPoint>().eq("windpowerstation_id", powerStation.getId()).eq("property", "CD"));
|
|
|
System.out.println(meterPointList.size());
|
|
|
|
|
|
//3,遍历测点,拿到每个测点的nem_code
|
|
@@ -166,7 +169,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
LocalDateTime day1 = LocalDateTimeUtil.of(startDateTime);
|
|
|
LocalDateTime day2 = LocalDateTimeUtil.of(endDateTime);
|
|
|
long between = ChronoUnit.DAYS.between(day1, day2);
|
|
|
- System.out.println("相差天数"+between);
|
|
|
+ System.out.println("相差天数" + between);
|
|
|
|
|
|
for (int i = 0; i <= between; i++) {
|
|
|
|
|
@@ -196,7 +199,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
// meterInfoBottomcode.insert();
|
|
|
|
|
|
QueryWrapper<MeterInfoBottomcode> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("start_time", dateTime1.toLocalDateTime()).eq("name", meterPoint.getName()).eq("end_time",dateTime2.toLocalDateTime()).eq("windpowerstation_id", meterPoint.getWindpowerstationId());
|
|
|
+ queryWrapper.eq("start_time", dateTime1.toLocalDateTime()).eq("name", meterPoint.getName()).eq("end_time", dateTime2.toLocalDateTime()).eq("windpowerstation_id", meterPoint.getWindpowerstationId());
|
|
|
List<MeterInfoBottomcode> list = meterInfoBottomcodeService.list(queryWrapper);
|
|
|
System.out.println(list.size());
|
|
|
if (list.size() > 0) {
|
|
@@ -255,233 +258,252 @@ class SaveMeterInfoHistoryTest {
|
|
|
@Test
|
|
|
void saveCalculating() {
|
|
|
|
|
|
- //获取说有风电厂
|
|
|
+ //获取所有风电厂
|
|
|
List<PowerStation> powerStationList = powerStationService.list(new QueryWrapper<PowerStation>().like("nem_code", "_FDC_"));
|
|
|
|
|
|
//遍历所有风电场
|
|
|
for (PowerStation powerStation : powerStationList) {
|
|
|
|
|
|
+ //2,根据场站ID得到场站下所有计算点
|
|
|
+ List<MeterPoint> meterPointList = meterPointService.list(new QueryWrapper<MeterPoint>().eq("windpowerstation_id", powerStation.getId()).eq("property", "JSD"));
|
|
|
+ System.out.println(meterPointList);
|
|
|
|
|
|
- //6,设置取值开始日期前一天
|
|
|
- String str = startTimeString;
|
|
|
+ //设置取值开始时间
|
|
|
+ String startString = startTimeString;
|
|
|
+ DateTime startDateTime = DateUtil.parse(startString);
|
|
|
|
|
|
- DateTime dateTime = DateUtil.parse(str);
|
|
|
- DateTime dateTime1 = dateTime;
|
|
|
+ //设置取值结束时间
|
|
|
+ String endDateString = endTimeString;
|
|
|
+ DateTime endDateTime = DateUtil.parse(endDateString);
|
|
|
|
|
|
- //指定日期到现在天数
|
|
|
- LocalDateTime day1 = LocalDateTimeUtil.of(dateTime);
|
|
|
- LocalDateTime day2 = LocalDateTime.now();
|
|
|
- System.out.println(day2);
|
|
|
+ //指定开始日期到结束日期的天数
|
|
|
+ LocalDateTime day1 = LocalDateTimeUtil.of(startDateTime);
|
|
|
+ LocalDateTime day2 = LocalDateTimeUtil.of(endDateTime);
|
|
|
long between = ChronoUnit.DAYS.between(day1, day2);
|
|
|
- System.out.println(between);
|
|
|
-
|
|
|
- for (int i = 1; i < between; i++) {
|
|
|
-
|
|
|
- dateTime1 = DateUtil.offsetDay(dateTime1, 1);
|
|
|
- System.out.println("第一天开始" + dateTime1);
|
|
|
|
|
|
- if (powerStation.getNemCode().equals("NX_GDDL_MHS_FDC_STA")) {
|
|
|
-
|
|
|
- List<MeterInfoBottomcode> list = meterInfoBottomcodeService.list(new QueryWrapper<MeterInfoBottomcode>().eq("start_time", dateTime1.toString()).in("code", "MHSDJL.NX_GD_MHSF_DD_P1_L1_001_ZXYG033", "MHSDJL.NX_GD_MHSF_DD_P1_L1_001_ZXYG029", "MHSDJL.NX_GD_MHSF_DD_P1_L1_001_ZXYG025"));
|
|
|
- System.out.println(list.size());
|
|
|
- BigDecimal bigDecimal1 = BigDecimal.valueOf(0);
|
|
|
- for (MeterInfoBottomcode meterInfoBottomcode : list) {
|
|
|
- bigDecimal1 = bigDecimal1.add(meterInfoBottomcode.getDayValue());
|
|
|
- }
|
|
|
- MeterInfoCalculating meterInfoCalculating = new MeterInfoCalculating();
|
|
|
- meterInfoCalculating.setName("一期集电线路发电量");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
- meterInfoCalculating.setValue(bigDecimal1.divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
- meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
- meterInfoCalculating.insert();
|
|
|
-
|
|
|
-
|
|
|
- list = meterInfoBottomcodeService.list(new QueryWrapper<MeterInfoBottomcode>().eq("start_time", dateTime1.toString()).in("code", "MHSDJL.NX_GD_MHSF_DD_P1_L1_001_ZXYG045"));
|
|
|
- BigDecimal bigDecimal2 = BigDecimal.valueOf(0);
|
|
|
- for (MeterInfoBottomcode meterInfoBottomcode : list) {
|
|
|
- bigDecimal2 = bigDecimal2.add(meterInfoBottomcode.getDayValue());
|
|
|
- }
|
|
|
- meterInfoCalculating = new MeterInfoCalculating();
|
|
|
- meterInfoCalculating.setName("分散式集电线路发电量");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
- meterInfoCalculating.setValue(bigDecimal2.divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
- meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
- meterInfoCalculating.insert();
|
|
|
-
|
|
|
-
|
|
|
- meterInfoCalculating = new MeterInfoCalculating();
|
|
|
- meterInfoCalculating.setName("集电线路总发电量");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
- meterInfoCalculating.setValue(bigDecimal1.add(bigDecimal2).divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
- meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
- meterInfoCalculating.insert();
|
|
|
|
|
|
+ for (MeterPoint meterPoint : meterPointList) {
|
|
|
|
|
|
- List<MeterInfoEquipment> meterInfoEquipments = meterInfoEquipmentService.list(new QueryWrapper<MeterInfoEquipment>().eq("projectNemCode", "NX_GDDL_MHSF01_EG"));
|
|
|
- if (meterInfoEquipments != null && meterInfoEquipments.size() > 0) {
|
|
|
- bigDecimal1 = BigDecimal.valueOf(0);
|
|
|
- for (MeterInfoEquipment meterInfoEquipment : meterInfoEquipments) {
|
|
|
- bigDecimal1 = bigDecimal1.add(meterInfoEquipment.getRfdl());
|
|
|
+ if (meterPoint.getDescription().equals("集电线路总发电量一期集电线路电量")) {
|
|
|
+ System.out.println("集电线路总发电量一期集电线路电量");
|
|
|
+ for (int i = 0; i <= between; i++) {
|
|
|
+
|
|
|
+ //开始时间00:00:01
|
|
|
+ DateTime dateTime1 = DateUtil.offsetSecond(DateUtil.offsetDay(startDateTime, i), 1);
|
|
|
+ //结束时间第二天00:00:01
|
|
|
+ List<MeterInfoBottomcode> meterInfoBottomcodeList = meterInfoBottomcodeService.list(new QueryWrapper<MeterInfoBottomcode>().eq("start_time", dateTime1).in("code", meterJSCD.getMhsjdxl1(), meterJSCD.getMhsjdxl2(), meterJSCD.getMhsjdxl3()));
|
|
|
+ BigDecimal bigDecimal1 = BigDecimal.valueOf(0);
|
|
|
+ for (MeterInfoBottomcode meterInfoBottomcode : meterInfoBottomcodeList) {
|
|
|
+ bigDecimal1 = bigDecimal1.add(meterInfoBottomcode.getDayValue());
|
|
|
}
|
|
|
- meterInfoCalculating = new MeterInfoCalculating();
|
|
|
- meterInfoCalculating.setName("风机一期发电量");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ MeterInfoCalculating meterInfoCalculating = new MeterInfoCalculating();
|
|
|
+ meterInfoCalculating.setName(meterPoint.getName());
|
|
|
+ meterInfoCalculating.setCode(meterPoint.getNemCode());
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal1.divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
- meterInfoCalculating.insert();
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- meterInfoEquipments = meterInfoEquipmentService.list(new QueryWrapper<MeterInfoEquipment>().eq("projectNemCode", "NX_GDDL_MHSF02_EG"));
|
|
|
- if (meterInfoEquipments != null && meterInfoEquipments.size() > 0) {
|
|
|
- bigDecimal1 = BigDecimal.valueOf(0);
|
|
|
- for (MeterInfoEquipment meterInfoEquipment : meterInfoEquipments) {
|
|
|
- bigDecimal1 = bigDecimal1.add(meterInfoEquipment.getRfdl());
|
|
|
- }
|
|
|
|
|
|
- meterInfoCalculating = new MeterInfoCalculating();
|
|
|
- meterInfoCalculating.setName("风机分散式发电量");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
- meterInfoCalculating.setValue(bigDecimal2.divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
- meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
- meterInfoCalculating.insert();
|
|
|
-
|
|
|
-
|
|
|
- meterInfoCalculating = new MeterInfoCalculating();
|
|
|
- meterInfoCalculating.setName("风机总发电量");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
- meterInfoCalculating.setValue(bigDecimal1.add(bigDecimal2).divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
- meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
- meterInfoCalculating.insert();
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- list = meterInfoBottomcodeService.list(new QueryWrapper<MeterInfoBottomcode>().eq("code", "MHSDJL.NX_GD_MHSF_DD_P1_L1_001_ZXYG057"));
|
|
|
- System.out.println(list.size());
|
|
|
- bigDecimal1 = BigDecimal.valueOf(0);
|
|
|
- for (MeterInfoBottomcode meterInfoBottomcode : list) {
|
|
|
- bigDecimal1 = bigDecimal1.add(meterInfoBottomcode.getDayValue());
|
|
|
- }
|
|
|
- meterInfoCalculating = new MeterInfoCalculating();
|
|
|
- meterInfoCalculating.setName("上网电量111线路侧");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
- meterInfoCalculating.setValue(bigDecimal1.divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
- meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
- meterInfoCalculating.insert();
|
|
|
-
|
|
|
- list = meterInfoBottomcodeService.list(new QueryWrapper<MeterInfoBottomcode>().eq("code", "MHSDJL.NX_GD_MHSF_DD_P1_L1_001_ZXYG053"));
|
|
|
- bigDecimal1 = BigDecimal.valueOf(0);
|
|
|
- for (MeterInfoBottomcode meterInfoBottomcode : list) {
|
|
|
- bigDecimal1 = bigDecimal1.add(meterInfoBottomcode.getDayValue());
|
|
|
- }
|
|
|
- meterInfoCalculating = new MeterInfoCalculating();
|
|
|
- meterInfoCalculating.setName("上网电量#1主变高压侧");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
- meterInfoCalculating.setValue(bigDecimal1.divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
- meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
- meterInfoCalculating.insert();
|
|
|
-
|
|
|
- list = meterInfoBottomcodeService.list(new QueryWrapper<MeterInfoBottomcode>().eq("code", "MHSDJL.NX_GD_MHSF_DD_P1_L1_001_ZXYG061"));
|
|
|
- bigDecimal2 = BigDecimal.valueOf(0);
|
|
|
- for (MeterInfoBottomcode meterInfoBottomcode : list) {
|
|
|
- bigDecimal2 = bigDecimal2.add(meterInfoBottomcode.getDayValue());
|
|
|
- }
|
|
|
- meterInfoCalculating = new MeterInfoCalculating();
|
|
|
- meterInfoCalculating.setName("上网电量#2主变高压侧");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
- meterInfoCalculating.setValue(bigDecimal2.divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
- meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
- meterInfoCalculating.insert();
|
|
|
-
|
|
|
- meterInfoCalculating = new MeterInfoCalculating();
|
|
|
- meterInfoCalculating.setName("上网电量主变高压侧总");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
- meterInfoCalculating.setValue(bigDecimal1.add(bigDecimal2).divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
- meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
- meterInfoCalculating.insert();
|
|
|
-
|
|
|
-
|
|
|
- //购网电量 110KV南风线受入加#1站用变 (缺#1站用变)
|
|
|
- list = meterInfoBottomcodeService.list(new QueryWrapper<MeterInfoBottomcode>().in("code", "MHSDJL.NX_GD_MHSF_DD_P1_L1_001_ZXYG057", "#1站用变code"));
|
|
|
- System.out.println(list.size());
|
|
|
- bigDecimal1 = BigDecimal.valueOf(0);
|
|
|
- for (MeterInfoBottomcode meterInfoBottomcode : list) {
|
|
|
- bigDecimal1 = bigDecimal1.add(meterInfoBottomcode.getDayValue());
|
|
|
- }
|
|
|
- meterInfoCalculating = new MeterInfoCalculating();
|
|
|
- meterInfoCalculating.setName("购网电量111线路侧");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
- meterInfoCalculating.setValue(bigDecimal1.divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
- meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
- meterInfoCalculating.insert();
|
|
|
-
|
|
|
- list = meterInfoBottomcodeService.list(new QueryWrapper<MeterInfoBottomcode>().eq("code", "MHSDJL.NX_GD_MHSF_DD_P1_L1_001_FXYG054"));
|
|
|
- bigDecimal1 = BigDecimal.valueOf(0);
|
|
|
- for (MeterInfoBottomcode meterInfoBottomcode : list) {
|
|
|
- bigDecimal1 = bigDecimal1.add(meterInfoBottomcode.getDayValue());
|
|
|
- }
|
|
|
- list = meterInfoBottomcodeService.list(new QueryWrapper<MeterInfoBottomcode>().eq("code", "1#站用变的code"));
|
|
|
- bigDecimal2 = BigDecimal.valueOf(0);
|
|
|
- if (list.size() > 0) {
|
|
|
- for (MeterInfoBottomcode meterInfoBottomcode : list) {
|
|
|
- bigDecimal2 = bigDecimal2.add(meterInfoBottomcode.getDayValue());
|
|
|
- }
|
|
|
- }
|
|
|
- BigDecimal bigDecimal = bigDecimal2.divide(BigDecimal.valueOf(2), 4, RoundingMode.HALF_EVEN).add(bigDecimal1);
|
|
|
- meterInfoCalculating = new MeterInfoCalculating();
|
|
|
- meterInfoCalculating.setName("购网电量#1主变高压侧");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
- meterInfoCalculating.setValue(bigDecimal.divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
- meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
- meterInfoCalculating.insert();
|
|
|
-
|
|
|
-
|
|
|
- list = meterInfoBottomcodeService.list(new QueryWrapper<MeterInfoBottomcode>().eq("code", "MHSDJL.NX_GD_MHSF_DD_P1_L1_001_FXYG062"));
|
|
|
- bigDecimal1 = BigDecimal.valueOf(0);
|
|
|
- for (MeterInfoBottomcode meterInfoBottomcode : list) {
|
|
|
- bigDecimal1 = bigDecimal1.add(meterInfoBottomcode.getDayValue());
|
|
|
- }
|
|
|
-
|
|
|
- bigDecimal = bigDecimal2.divide(BigDecimal.valueOf(2), 4, RoundingMode.HALF_EVEN).add(bigDecimal1);
|
|
|
- meterInfoCalculating = new MeterInfoCalculating();
|
|
|
- meterInfoCalculating.setName("购网电量#2主变高压侧");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
- meterInfoCalculating.setValue(bigDecimal.divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
- meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
- meterInfoCalculating.insert();
|
|
|
-
|
|
|
-
|
|
|
- list = meterInfoBottomcodeService.list(new QueryWrapper<MeterInfoBottomcode>().eq("code", "MHSDJL.NX_GD_MHSF_DD_P1_L1_001_FXYG054"));
|
|
|
- bigDecimal1 = BigDecimal.valueOf(0);
|
|
|
- for (MeterInfoBottomcode meterInfoBottomcode : list) {
|
|
|
- bigDecimal1 = bigDecimal1.add(meterInfoBottomcode.getDayValue());
|
|
|
- }
|
|
|
- list = meterInfoBottomcodeService.list(new QueryWrapper<MeterInfoBottomcode>().eq("code", "1#站用变的code"));
|
|
|
- bigDecimal = BigDecimal.valueOf(0);
|
|
|
- if (list.size() > 0) {
|
|
|
- for (MeterInfoBottomcode meterInfoBottomcode : list) {
|
|
|
- bigDecimal = bigDecimal.add(meterInfoBottomcode.getDayValue());
|
|
|
+ QueryWrapper<MeterInfoCalculating> queryWrapper = new QueryWrapper<>();
|
|
|
+// queryWrapper.eq("date", dateTime1.toLocalDateTime()).eq("windpowerstation_id", powerStation.getNemCode()).eq("name", meterPoint.getName());
|
|
|
+ queryWrapper.eq("date", dateTime1.toLocalDateTime()).eq("code", meterPoint.getNemCode());
|
|
|
+ List<MeterInfoCalculating> list = meterInfoCalculatingService.list(queryWrapper);
|
|
|
+ if (list.size() > 0) {
|
|
|
+ meterInfoCalculating.update(queryWrapper);
|
|
|
+ } else {
|
|
|
+ meterInfoCalculating.insert();
|
|
|
}
|
|
|
}
|
|
|
- list = meterInfoBottomcodeService.list(new QueryWrapper<MeterInfoBottomcode>().eq("code", "MHSDJL.NX_GD_MHSF_DD_P1_L1_001_FXYG062"));
|
|
|
- bigDecimal2 = BigDecimal.valueOf(0);
|
|
|
- for (MeterInfoBottomcode meterInfoBottomcode : list) {
|
|
|
- bigDecimal2 = bigDecimal2.add(meterInfoBottomcode.getDayValue());
|
|
|
- }
|
|
|
- meterInfoCalculating = new MeterInfoCalculating();
|
|
|
- meterInfoCalculating.setName("购网电量主变高压侧总");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
- meterInfoCalculating.setValue(bigDecimal1.add(bigDecimal2).add(bigDecimal).divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
- meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
- meterInfoCalculating.insert();
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
+ if (meterPoint.getDescription().equals("")) {
|
|
|
+ System.out.println("1");
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+// meterInfoBottomcodeList = meterInfoBottomcodeService.list(new QueryWrapper<MeterInfoBottomcode>().eq("start_time", dateTime1.toString()).in("code", "MHSDJL.NX_GD_MHSF_DD_P1_L1_001_ZXYG045"));
|
|
|
+// BigDecimal bigDecimal2 = BigDecimal.valueOf(0);
|
|
|
+// for (MeterInfoBottomcode meterInfoBottomcode : meterInfoBottomcodeList) {
|
|
|
+// bigDecimal2 = bigDecimal2.add(meterInfoBottomcode.getDayValue());
|
|
|
+// }
|
|
|
+// meterInfoCalculating = new MeterInfoCalculating();
|
|
|
+// meterInfoCalculating.setName("分散式集电线路发电量");
|
|
|
+// meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
+// meterInfoCalculating.setValue(bigDecimal2.divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
+// meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
+// meterInfoCalculating.insert();
|
|
|
+//
|
|
|
+//
|
|
|
+// meterInfoCalculating = new MeterInfoCalculating();
|
|
|
+// meterInfoCalculating.setName("集电线路总发电量");
|
|
|
+// meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
+// meterInfoCalculating.setValue(bigDecimal1.add(bigDecimal2).divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
+// meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
+// meterInfoCalculating.insert();
|
|
|
+//
|
|
|
+//
|
|
|
+// List<MeterInfoEquipment> meterInfoEquipments = meterInfoEquipmentService.list(new QueryWrapper<MeterInfoEquipment>().eq("projectNemCode", "NX_GDDL_MHSF01_EG"));
|
|
|
+// if (meterInfoEquipments != null && meterInfoEquipments.size() > 0) {
|
|
|
+// bigDecimal1 = BigDecimal.valueOf(0);
|
|
|
+// for (MeterInfoEquipment meterInfoEquipment : meterInfoEquipments) {
|
|
|
+// bigDecimal1 = bigDecimal1.add(meterInfoEquipment.getRfdl());
|
|
|
+// }
|
|
|
+// meterInfoCalculating = new MeterInfoCalculating();
|
|
|
+// meterInfoCalculating.setName("风机一期发电量");
|
|
|
+// meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
+// meterInfoCalculating.setValue(bigDecimal1.divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
+// meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
+// meterInfoCalculating.insert();
|
|
|
+//
|
|
|
+// }
|
|
|
+//
|
|
|
+// meterInfoEquipments = meterInfoEquipmentService.list(new QueryWrapper<MeterInfoEquipment>().eq("projectNemCode", "NX_GDDL_MHSF02_EG"));
|
|
|
+// if (meterInfoEquipments != null && meterInfoEquipments.size() > 0) {
|
|
|
+// bigDecimal1 = BigDecimal.valueOf(0);
|
|
|
+// for (MeterInfoEquipment meterInfoEquipment : meterInfoEquipments) {
|
|
|
+// bigDecimal1 = bigDecimal1.add(meterInfoEquipment.getRfdl());
|
|
|
+// }
|
|
|
+//
|
|
|
+// meterInfoCalculating = new MeterInfoCalculating();
|
|
|
+// meterInfoCalculating.setName("风机分散式发电量");
|
|
|
+// meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
+// meterInfoCalculating.setValue(bigDecimal2.divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
+// meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
+// meterInfoCalculating.insert();
|
|
|
+//
|
|
|
+//
|
|
|
+// meterInfoCalculating = new MeterInfoCalculating();
|
|
|
+// meterInfoCalculating.setName("风机总发电量");
|
|
|
+// meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
+// meterInfoCalculating.setValue(bigDecimal1.add(bigDecimal2).divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
+// meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
+// meterInfoCalculating.insert();
|
|
|
+//
|
|
|
+// }
|
|
|
+//
|
|
|
+//
|
|
|
+// list = meterInfoBottomcodeService.list(new QueryWrapper<MeterInfoBottomcode>().eq("code", "MHSDJL.NX_GD_MHSF_DD_P1_L1_001_ZXYG057"));
|
|
|
+// System.out.println(list.size());
|
|
|
+// bigDecimal1 = BigDecimal.valueOf(0);
|
|
|
+// for (MeterInfoBottomcode meterInfoBottomcode : list) {
|
|
|
+// bigDecimal1 = bigDecimal1.add(meterInfoBottomcode.getDayValue());
|
|
|
+// }
|
|
|
+// meterInfoCalculating = new MeterInfoCalculating();
|
|
|
+// meterInfoCalculating.setName("上网电量111线路侧");
|
|
|
+// meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
+// meterInfoCalculating.setValue(bigDecimal1.divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
+// meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
+// meterInfoCalculating.insert();
|
|
|
+//
|
|
|
+// list = meterInfoBottomcodeService.list(new QueryWrapper<MeterInfoBottomcode>().eq("code", "MHSDJL.NX_GD_MHSF_DD_P1_L1_001_ZXYG053"));
|
|
|
+// bigDecimal1 = BigDecimal.valueOf(0);
|
|
|
+// for (MeterInfoBottomcode meterInfoBottomcode : list) {
|
|
|
+// bigDecimal1 = bigDecimal1.add(meterInfoBottomcode.getDayValue());
|
|
|
+// }
|
|
|
+// meterInfoCalculating = new MeterInfoCalculating();
|
|
|
+// meterInfoCalculating.setName("上网电量#1主变高压侧");
|
|
|
+// meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
+// meterInfoCalculating.setValue(bigDecimal1.divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
+// meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
+// meterInfoCalculating.insert();
|
|
|
+//
|
|
|
+// list = meterInfoBottomcodeService.list(new QueryWrapper<MeterInfoBottomcode>().eq("code", "MHSDJL.NX_GD_MHSF_DD_P1_L1_001_ZXYG061"));
|
|
|
+// bigDecimal2 = BigDecimal.valueOf(0);
|
|
|
+// for (MeterInfoBottomcode meterInfoBottomcode : list) {
|
|
|
+// bigDecimal2 = bigDecimal2.add(meterInfoBottomcode.getDayValue());
|
|
|
+// }
|
|
|
+// meterInfoCalculating = new MeterInfoCalculating();
|
|
|
+// meterInfoCalculating.setName("上网电量#2主变高压侧");
|
|
|
+// meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
+// meterInfoCalculating.setValue(bigDecimal2.divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
+// meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
+// meterInfoCalculating.insert();
|
|
|
+//
|
|
|
+// meterInfoCalculating = new MeterInfoCalculating();
|
|
|
+// meterInfoCalculating.setName("上网电量主变高压侧总");
|
|
|
+// meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
+// meterInfoCalculating.setValue(bigDecimal1.add(bigDecimal2).divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
+// meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
+// meterInfoCalculating.insert();
|
|
|
+//
|
|
|
+//
|
|
|
+// //购网电量 110KV南风线受入加#1站用变 (缺#1站用变)
|
|
|
+// list = meterInfoBottomcodeService.list(new QueryWrapper<MeterInfoBottomcode>().in("code", "MHSDJL.NX_GD_MHSF_DD_P1_L1_001_ZXYG057", "#1站用变code"));
|
|
|
+// System.out.println(list.size());
|
|
|
+// bigDecimal1 = BigDecimal.valueOf(0);
|
|
|
+// for (MeterInfoBottomcode meterInfoBottomcode : list) {
|
|
|
+// bigDecimal1 = bigDecimal1.add(meterInfoBottomcode.getDayValue());
|
|
|
+// }
|
|
|
+// meterInfoCalculating = new MeterInfoCalculating();
|
|
|
+// meterInfoCalculating.setName("购网电量111线路侧");
|
|
|
+// meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
+// meterInfoCalculating.setValue(bigDecimal1.divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
+// meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
+// meterInfoCalculating.insert();
|
|
|
+//
|
|
|
+// list = meterInfoBottomcodeService.list(new QueryWrapper<MeterInfoBottomcode>().eq("code", "MHSDJL.NX_GD_MHSF_DD_P1_L1_001_FXYG054"));
|
|
|
+// bigDecimal1 = BigDecimal.valueOf(0);
|
|
|
+// for (MeterInfoBottomcode meterInfoBottomcode : list) {
|
|
|
+// bigDecimal1 = bigDecimal1.add(meterInfoBottomcode.getDayValue());
|
|
|
+// }
|
|
|
+// list = meterInfoBottomcodeService.list(new QueryWrapper<MeterInfoBottomcode>().eq("code", "1#站用变的code"));
|
|
|
+// bigDecimal2 = BigDecimal.valueOf(0);
|
|
|
+// if (list.size() > 0) {
|
|
|
+// for (MeterInfoBottomcode meterInfoBottomcode : list) {
|
|
|
+// bigDecimal2 = bigDecimal2.add(meterInfoBottomcode.getDayValue());
|
|
|
+// }
|
|
|
+// }
|
|
|
+// BigDecimal bigDecimal = bigDecimal2.divide(BigDecimal.valueOf(2), 4, RoundingMode.HALF_EVEN).add(bigDecimal1);
|
|
|
+// meterInfoCalculating = new MeterInfoCalculating();
|
|
|
+// meterInfoCalculating.setName("购网电量#1主变高压侧");
|
|
|
+// meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
+// meterInfoCalculating.setValue(bigDecimal.divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
+// meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
+// meterInfoCalculating.insert();
|
|
|
+//
|
|
|
+//
|
|
|
+// list = meterInfoBottomcodeService.list(new QueryWrapper<MeterInfoBottomcode>().eq("code", "MHSDJL.NX_GD_MHSF_DD_P1_L1_001_FXYG062"));
|
|
|
+// bigDecimal1 = BigDecimal.valueOf(0);
|
|
|
+// for (MeterInfoBottomcode meterInfoBottomcode : list) {
|
|
|
+// bigDecimal1 = bigDecimal1.add(meterInfoBottomcode.getDayValue());
|
|
|
+// }
|
|
|
+//
|
|
|
+// bigDecimal = bigDecimal2.divide(BigDecimal.valueOf(2), 4, RoundingMode.HALF_EVEN).add(bigDecimal1);
|
|
|
+// meterInfoCalculating = new MeterInfoCalculating();
|
|
|
+// meterInfoCalculating.setName("购网电量#2主变高压侧");
|
|
|
+// meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
+// meterInfoCalculating.setValue(bigDecimal.divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
+// meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
+// meterInfoCalculating.insert();
|
|
|
+//
|
|
|
+//
|
|
|
+// list = meterInfoBottomcodeService.list(new QueryWrapper<MeterInfoBottomcode>().eq("code", "MHSDJL.NX_GD_MHSF_DD_P1_L1_001_FXYG054"));
|
|
|
+// bigDecimal1 = BigDecimal.valueOf(0);
|
|
|
+// for (MeterInfoBottomcode meterInfoBottomcode : list) {
|
|
|
+// bigDecimal1 = bigDecimal1.add(meterInfoBottomcode.getDayValue());
|
|
|
+// }
|
|
|
+// list = meterInfoBottomcodeService.list(new QueryWrapper<MeterInfoBottomcode>().eq("code", "1#站用变的code"));
|
|
|
+// bigDecimal = BigDecimal.valueOf(0);
|
|
|
+// if (list.size() > 0) {
|
|
|
+// for (MeterInfoBottomcode meterInfoBottomcode : list) {
|
|
|
+// bigDecimal = bigDecimal.add(meterInfoBottomcode.getDayValue());
|
|
|
+// }
|
|
|
+// }
|
|
|
+// list = meterInfoBottomcodeService.list(new QueryWrapper<MeterInfoBottomcode>().eq("code", "MHSDJL.NX_GD_MHSF_DD_P1_L1_001_FXYG062"));
|
|
|
+// bigDecimal2 = BigDecimal.valueOf(0);
|
|
|
+// for (MeterInfoBottomcode meterInfoBottomcode : list) {
|
|
|
+// bigDecimal2 = bigDecimal2.add(meterInfoBottomcode.getDayValue());
|
|
|
+// }
|
|
|
+// meterInfoCalculating = new MeterInfoCalculating();
|
|
|
+// meterInfoCalculating.setName("购网电量主变高压侧总");
|
|
|
+// meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
+// meterInfoCalculating.setValue(bigDecimal1.add(bigDecimal2).add(bigDecimal).divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
+// meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
+// meterInfoCalculating.insert();
|
|
|
+
|
|
|
+
|
|
|
//综合厂用电量
|
|
|
@Test
|
|
|
void saveCalculating1() {
|
|
@@ -533,7 +555,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
|
|
|
MeterInfoCalculating meterInfoCalculating = new MeterInfoCalculating();
|
|
|
meterInfoCalculating.setName("综合厂用电量一期风机侧");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal1.subtract(bigDecimal2).add(bigDecimal3));
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
meterInfoCalculating.insert();
|
|
@@ -559,7 +581,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
|
|
|
meterInfoCalculating = new MeterInfoCalculating();
|
|
|
meterInfoCalculating.setName("综合厂用电量分散式风机侧");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal1.subtract(bigDecimal2).add(bigDecimal3));
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
meterInfoCalculating.insert();
|
|
@@ -585,7 +607,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
|
|
|
meterInfoCalculating = new MeterInfoCalculating();
|
|
|
meterInfoCalculating.setName("综合厂用电量风机侧总");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal1.subtract(bigDecimal2).add(bigDecimal3));
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
meterInfoCalculating.insert();
|
|
@@ -611,7 +633,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
|
|
|
meterInfoCalculating = new MeterInfoCalculating();
|
|
|
meterInfoCalculating.setName("综合厂用电量一期集电线路侧");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal1.subtract(bigDecimal2).add(bigDecimal3));
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
meterInfoCalculating.insert();
|
|
@@ -637,7 +659,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
|
|
|
meterInfoCalculating = new MeterInfoCalculating();
|
|
|
meterInfoCalculating.setName("综合厂用电量分散式集电线路侧");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal1.subtract(bigDecimal2).add(bigDecimal3));
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
meterInfoCalculating.insert();
|
|
@@ -663,7 +685,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
|
|
|
meterInfoCalculating = new MeterInfoCalculating();
|
|
|
meterInfoCalculating.setName("综合厂用电量集电线路总");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal1.subtract(bigDecimal2).add(bigDecimal3));
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
meterInfoCalculating.insert();
|
|
@@ -721,7 +743,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
BigDecimal bigDecimal3 = bigDecimal1.divide(bigDecimal2, 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100));
|
|
|
MeterInfoCalculating meterInfoCalculating = new MeterInfoCalculating();
|
|
|
meterInfoCalculating.setName("综合厂用率一期风机侧");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal3);
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
meterInfoCalculating.insert();
|
|
@@ -745,7 +767,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
BigDecimal bigDecimal3 = bigDecimal1.divide(bigDecimal2, 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100));
|
|
|
MeterInfoCalculating meterInfoCalculating = new MeterInfoCalculating();
|
|
|
meterInfoCalculating.setName("综合厂用率分散式风机侧");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal3);
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
meterInfoCalculating.insert();
|
|
@@ -769,7 +791,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
BigDecimal bigDecimal3 = bigDecimal1.divide(bigDecimal2, 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100));
|
|
|
MeterInfoCalculating meterInfoCalculating = new MeterInfoCalculating();
|
|
|
meterInfoCalculating.setName("综合厂用率风机侧总");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal3);
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
meterInfoCalculating.insert();
|
|
@@ -793,7 +815,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
BigDecimal bigDecimal3 = bigDecimal1.divide(bigDecimal2, 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100));
|
|
|
MeterInfoCalculating meterInfoCalculating = new MeterInfoCalculating();
|
|
|
meterInfoCalculating.setName("综合厂用率一期集电线路侧");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal3);
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
meterInfoCalculating.insert();
|
|
@@ -817,7 +839,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
BigDecimal bigDecimal3 = bigDecimal1.divide(bigDecimal2, 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100));
|
|
|
MeterInfoCalculating meterInfoCalculating = new MeterInfoCalculating();
|
|
|
meterInfoCalculating.setName("综合厂用率分散式集电线路侧");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal3);
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
meterInfoCalculating.insert();
|
|
@@ -841,7 +863,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
BigDecimal bigDecimal3 = bigDecimal1.divide(bigDecimal2, 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100));
|
|
|
MeterInfoCalculating meterInfoCalculating = new MeterInfoCalculating();
|
|
|
meterInfoCalculating.setName("综合厂用率集电线路侧总");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal3);
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
meterInfoCalculating.insert();
|
|
@@ -897,7 +919,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
|
|
|
MeterInfoCalculating meterInfoCalculating = new MeterInfoCalculating();
|
|
|
meterInfoCalculating.setName("发电厂用电量一期");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal1.add(bigDecimal2).divide(BigDecimal.valueOf(20000), 4, RoundingMode.HALF_EVEN));
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
meterInfoCalculating.insert();
|
|
@@ -917,7 +939,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
|
|
|
meterInfoCalculating = new MeterInfoCalculating();
|
|
|
meterInfoCalculating.setName("发电厂用电量分散式");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal1.add(bigDecimal2).divide(BigDecimal.valueOf(20000), 4, RoundingMode.HALF_EVEN));
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
meterInfoCalculating.insert();
|
|
@@ -937,7 +959,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
|
|
|
meterInfoCalculating = new MeterInfoCalculating();
|
|
|
meterInfoCalculating.setName("发电厂用电量总");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal1.add(bigDecimal2).divide(BigDecimal.valueOf(10000), 4, RoundingMode.HALF_EVEN));
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
meterInfoCalculating.insert();
|
|
@@ -992,7 +1014,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
BigDecimal bigDecimal3 = bigDecimal1.divide(bigDecimal2, 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100));
|
|
|
MeterInfoCalculating meterInfoCalculating = new MeterInfoCalculating();
|
|
|
meterInfoCalculating.setName("发电厂用电率一期");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal3);
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
meterInfoCalculating.insert();
|
|
@@ -1014,7 +1036,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
BigDecimal bigDecimal3 = bigDecimal1.divide(bigDecimal2, 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100));
|
|
|
MeterInfoCalculating meterInfoCalculating = new MeterInfoCalculating();
|
|
|
meterInfoCalculating.setName("发电厂用电率分散式");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal3);
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
meterInfoCalculating.insert();
|
|
@@ -1036,7 +1058,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
BigDecimal bigDecimal3 = bigDecimal1.divide(bigDecimal2, 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100));
|
|
|
MeterInfoCalculating meterInfoCalculating = new MeterInfoCalculating();
|
|
|
meterInfoCalculating.setName("发电厂用电率总");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal3);
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
meterInfoCalculating.insert();
|
|
@@ -1084,7 +1106,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
|
|
|
MeterInfoCalculating meterInfoCalculating = new MeterInfoCalculating();
|
|
|
meterInfoCalculating.setName("利用小时风机侧一期");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal1.divide(BigDecimal.valueOf(4.95), 2, RoundingMode.HALF_EVEN));
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
meterInfoCalculating.insert();
|
|
@@ -1097,7 +1119,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
}
|
|
|
meterInfoCalculating = new MeterInfoCalculating();
|
|
|
meterInfoCalculating.setName("利用小时集电线路侧一期");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal1.divide(BigDecimal.valueOf(4.95), 2, RoundingMode.HALF_EVEN));
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
meterInfoCalculating.insert();
|
|
@@ -1110,7 +1132,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
}
|
|
|
meterInfoCalculating = new MeterInfoCalculating();
|
|
|
meterInfoCalculating.setName("利用小时风机侧分散式");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal1.divide(BigDecimal.valueOf(2), 2, RoundingMode.HALF_EVEN));
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
meterInfoCalculating.insert();
|
|
@@ -1123,7 +1145,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
}
|
|
|
meterInfoCalculating = new MeterInfoCalculating();
|
|
|
meterInfoCalculating.setName("利用小时集电线路侧分散式");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal1.divide(BigDecimal.valueOf(2), 2, RoundingMode.HALF_EVEN));
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
meterInfoCalculating.insert();
|
|
@@ -1136,7 +1158,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
}
|
|
|
meterInfoCalculating = new MeterInfoCalculating();
|
|
|
meterInfoCalculating.setName("利用小时风机侧总");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal1.divide(BigDecimal.valueOf(6.95), 2, RoundingMode.HALF_EVEN));
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
meterInfoCalculating.insert();
|
|
@@ -1149,7 +1171,7 @@ class SaveMeterInfoHistoryTest {
|
|
|
}
|
|
|
meterInfoCalculating = new MeterInfoCalculating();
|
|
|
meterInfoCalculating.setName("利用小时集电线路侧总");
|
|
|
- meterInfoCalculating.setDate(String.valueOf(dateTime1));
|
|
|
+ meterInfoCalculating.setDate(dateTime1.toLocalDateTime());
|
|
|
meterInfoCalculating.setValue(bigDecimal1.divide(BigDecimal.valueOf(6.95), 2, RoundingMode.HALF_EVEN));
|
|
|
meterInfoCalculating.setWindpowerstationId(powerStation.getNemCode());
|
|
|
meterInfoCalculating.insert();
|