Commit a26b01d7 authored by wujiang's avatar wujiang

Merge branch 'developer' of http://39.98.45.134:8090/moa/amos-boot-biz into developer

parents 7de8608d 44ca9a8b
......@@ -59,7 +59,7 @@ public class HouseholdTestController {
// goLangDataAcquisitionService.collectorList();
//// goLangDataAcquisitionService.inverterList();
// goLangDataAcquisitionService.collectorDetail();
// goLangDataAcquisitionService.inverterDetail();
goLangDataAcquisitionService.inverAlramInfo();
goLangDataAcquisitionService.inverterDetail();
// goLangDataAcquisitionService.inverAlramInfo();
}
}
......@@ -30,4 +30,100 @@ public class InverterDetailDto {
private Double uAc1;
private Double uAc2;
private Double uAc3;
private Double iPv1;
private Double iPv2;
private Double iPv3;
private Double iPv4;
private Double iPv5;
private Double iPv6;
private Double iPv7;
private Double iPv8;
private Double iPv9;
private Double iPv10;
private Double iPv11;
private Double iPv12;
private Double iPv13;
private Double iPv14;
private Double iPv15;
private Double iPv16;
private Double iPv17;
private Double iPv18;
private Double iPv19;
private Double iPv20;
private Double iPv21;
private Double iPv22;
private Double iPv23;
private Double iPv24;
private Double iPv25;
private Double iPv26;
private Double iPv27;
private Double iPv28;
private Double iPv29;
private Double iPv30;
private Double iPv31;
private Double iPv32;
private Double uPv1;
private Double uPv2;
private Double uPv3;
private Double uPv4;
private Double uPv5;
private Double uPv6;
private Double uPv7;
private Double uPv8;
private Double uPv9;
private Double uPv10;
private Double uPv11;
private Double uPv12;
private Double uPv13;
private Double uPv14;
private Double uPv15;
private Double uPv16;
private Double uPv17;
private Double uPv18;
private Double uPv19;
private Double uPv20;
private Double uPv21;
private Double uPv22;
private Double uPv23;
private Double uPv24;
private Double uPv25;
private Double uPv26;
private Double uPv27;
private Double uPv28;
private Double uPv29;
private Double uPv30;
private Double uPv31;
private Double uPv32;
private Double pow1;
private Double pow2;
private Double pow3;
private Double pow4;
private Double pow5;
private Double pow6;
private Double pow7;
private Double pow8;
private Double pow9;
private Double pow10;
private Double pow11;
private Double pow12;
private Double pow13;
private Double pow14;
private Double pow15;
private Double pow16;
private Double pow17;
private Double pow18;
private Double pow19;
private Double pow20;
private Double pow21;
private Double pow22;
private Double pow23;
private Double pow24;
private Double pow25;
private Double pow26;
private Double pow27;
private Double pow28;
private Double pow29;
private Double pow30;
private Double pow31;
private Double pow32;
}
package com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.hygf;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.models.auth.In;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
......@@ -97,5 +98,4 @@ public class JpInverterElectricity implements Serializable {
*/
@TableField("third_code")
private String thirdCode;
}
......@@ -8,7 +8,7 @@ import java.util.Date;
@Data
@TableName(value = "golang_collector_detail", autoResultMap = true)
public class GolangCollectorDetail {
private Date createdTime;
private Long createdTime;
private Long id;
private String sn;
private Long stationid;
......
......@@ -8,7 +8,7 @@ import java.util.Date;
@Data
@TableName(value = "golang_collector_list", autoResultMap = true)
public class GolangCollectorList {
private Date createdTime;
private Long createdTime;
private Long id;
private String stationname;
private Long stationid;
......
......@@ -8,7 +8,7 @@ import java.util.Date;
@Data
@TableName(value = "golang_inveter_detail", autoResultMap = true)
public class GolangInverterDetail {
private Date createdTime;
private Long createdTime;
private String gridSellYearEnergy;
private String batteryAlarm;
private String storageBatteryVoltageStr;
......
......@@ -8,7 +8,7 @@ import java.util.Date;
@Data
@TableName(value = "golang_inveter_list", autoResultMap = true)
public class GolangInverterList {
private Date createdTime;
private Long createdTime;
private Long id;
private String sn;
private Long stationid;
......
......@@ -10,7 +10,7 @@ import java.util.Date;
@Data
@TableName(value = "golang_station_detail", autoResultMap = true)
public class GolangStationDetail implements Serializable {
private Date createdTime;
private Long createdTime;
private Long id;
private String stationname;
private String addr;
......
......@@ -7,7 +7,7 @@ import java.util.Date;
@Data
@TableName(value = "golang_station_list" ,autoResultMap = true)
public class GolangStationList implements Serializable {
private Date createdTime;
private Long createdTime;
private String id;
private String stationName;
private String addr;
......
......@@ -9,7 +9,7 @@ import java.util.Date;
@Data
@TableName(value = "td_hygf_jp_collector_history" ,autoResultMap = true)
public class HYGFJPCollectorHistory implements Serializable {
private Date createdTime;
private Long createdTime;
private String snCode;
private Long time;
private Double signalStrength;
......
......@@ -9,7 +9,7 @@ import java.util.Date;
@Data
@TableName(value = "td_hygf_jp_invertor_elec_history" ,autoResultMap = true)
public class HYGFJPInverterElecHistory implements Serializable {
private Date createdTime;
private Long createdTime;
private String snCode;
private Double uAcVoltage;
private Double vAcVoltage;
......
......@@ -10,7 +10,7 @@ import java.util.Date;
@Data
@TableName(value = "td_hygf_jp_inverter_history" ,autoResultMap = true)
public class HYGFJPInverterHistory implements Serializable {
private Timestamp createdTime;
private Long createdTime;
private String snCode;
private String date;
private Double powerGeneration;
......
......@@ -9,7 +9,7 @@ import java.util.Date;
@Data
@TableName(value = "td_hygf_jp_inverter_warn" ,autoResultMap = true)
public class HYGFJPInverterWarn implements Serializable {
private Date createdTime;
private Long createdTime;
private long time;
private String snCode;
private String content;
......
......@@ -9,7 +9,7 @@ import java.util.Date;
@Data
@TableName(value = "td_hygf_jp_invertor_elec_history" ,autoResultMap = true)
public class HYGFJPStationPowerHistory implements Serializable {
private Date createdTime;
private Long createdTime;
private Double power;
private long time;
private String thirdStationId;
......
package com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine;
import fastjson.JSON;
import fastjson.JSONObject;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
public class Test {
public static void main(String[] args) {
String JsonString = "{\"id\":\"1299184088035566532\",\"userId\":\"1300386381676732593\",\"sn\":\"2805435232050486\",\"inverterMeterModel\":1,\"collectorsn\":\"404231046E215B4B\",\"collectorId\":\"1301093458381870472\",\"contractTime\":1838563200000,\"state\":1,\"stateExceptionFlag\":0,\"simFlowState\":-1,\"fullHour\":2.27,\"fullHourStr\":\"h\",\"currentState\":\"3\",\"warningInfoData\":0,\"timeZone\":8,\"timeZoneStr\":\"UTC+08:00\",\"daylight\":0,\"daylightSwitch\":0,\"model\":\"543\",\"productModel\":\"543\",\"ctrlCommand\":1,\"nationalStandardstr\":\"GN-380L\",\"inverterTemperature\":63.1,\"inverterTemperatureUnit\":\"℃\",\"temp\":150,\"tempName\":\"IGBT温度\",\"stationName\":\"陈益庆\",\"sno\":\"1A4C24\",\"stationId\":\"1299184320438728736\",\"version\":\"81003A\",\"acOutputType\":1,\"dcInputtype\":3,\"rs485ComAddr\":\"101\",\"dataTimestamp\":\"1684996442378\",\"timeStr\":\"2023-05-25 14:34:02\",\"reactivePower\":10,\"apparentPower\":8.3,\"dcPac\":9.128,\"uInitGnd\":0,\"uInitGndStr\":\"V\",\"dcBus\":706.6,\"dcBusStr\":\"V\",\"dcBusHalf\":351.9,\"dcBusHalfStr\":\"V\",\"power\":25,\"powerStr\":\"kWp\",\"powerPec\":\"1\",\"porwerPercent\":0.332,\"pac\":8.31,\"pacStr\":\"kW\",\"pacPec\":\"1\",\"oneSelf\":0,\"eToday\":56.8,\"eTodayStr\":\"kWh\",\"eMonth\":2.266,\"eMonthStr\":\"MWh\",\"eYear\":3.635,\"eYearStr\":\"MWh\",\"eTotal\":3.635,\"eTotalStr\":\"MWh\",\"uPv1\":674.3,\"uPv1Str\":\"V\",\"iPv1\":6.9,\"iPv1Str\":\"A\",\"uPv2\":668,\"uPv2Str\":\"V\",\"iPv2\":6.6,\"iPv2Str\":\"A\",\"uPv3\":0,\"uPv3Str\":\"V\",\"iPv3\":0,\"iPv3Str\":\"A\",\"uPv4\":0,\"uPv4Str\":\"V\",\"iPv4\":0,\"iPv4Str\":\"A\",\"uPv5\":0,\"uPv5Str\":\"V\",\"iPv5\":0,\"iPv5Str\":\"A\",\"uPv6\":0,\"uPv6Str\":\"V\",\"iPv6\":0,\"iPv6Str\":\"A\",\"uPv7\":0,\"uPv7Str\":\"V\",\"iPv7\":0,\"iPv7Str\":\"A\",\"uPv8\":0,\"uPv8Str\":\"V\",\"iPv8\":0,\"iPv8Str\":\"A\",\"uPv9\":0,\"uPv9Str\":\"V\",\"iPv9\":0,\"iPv9Str\":\"A\",\"uPv10\":0,\"uPv10Str\":\"V\",\"iPv10\":0,\"iPv10Str\":\"A\",\"uPv11\":0,\"uPv11Str\":\"V\",\"iPv11\":0,\"iPv11Str\":\"A\",\"uPv12\":0,\"uPv12Str\":\"V\",\"iPv12\":0,\"iPv12Str\":\"A\",\"uPv13\":0,\"uPv13Str\":\"V\",\"iPv13\":0,\"iPv13Str\":\"A\",\"uPv14\":0,\"uPv14Str\":\"V\",\"iPv14\":0,\"iPv14Str\":\"A\",\"uPv15\":0,\"uPv15Str\":\"V\",\"iPv15\":0,\"iPv15Str\":\"A\",\"uPv16\":0,\"uPv16Str\":\"V\",\"iPv16\":0,\"iPv16Str\":\"A\",\"uPv17\":0,\"uPv17Str\":\"V\",\"iPv17\":0,\"iPv17Str\":\"A\",\"uPv18\":0,\"uPv18Str\":\"V\",\"iPv18\":0,\"iPv18Str\":\"A\",\"uPv19\":0,\"uPv19Str\":\"V\",\"iPv19\":0,\"iPv19Str\":\"A\",\"uPv20\":0,\"uPv20Str\":\"V\",\"iPv20\":0,\"iPv20Str\":\"A\",\"uPv21\":0,\"uPv21Str\":\"V\",\"iPv21\":0,\"iPv21Str\":\"A\",\"uPv22\":0,\"uPv22Str\":\"V\",\"iPv22\":0,\"iPv22Str\":\"A\",\"uPv23\":0,\"uPv23Str\":\"V\",\"iPv23\":0,\"iPv23Str\":\"A\",\"uPv24\":0,\"uPv24Str\":\"V\",\"iPv24\":0,\"iPv24Str\":\"A\",\"uPv25\":0,\"uPv25Str\":\"V\",\"iPv25\":0,\"iPv25Str\":\"A\",\"uPv26\":0,\"uPv26Str\":\"V\",\"iPv26\":0,\"iPv26Str\":\"A\",\"uPv27\":0,\"uPv27Str\":\"V\",\"iPv27\":0,\"iPv27Str\":\"A\",\"uPv28\":0,\"uPv28Str\":\"V\",\"iPv28\":0,\"iPv28Str\":\"A\",\"uPv29\":0,\"uPv29Str\":\"V\",\"iPv29\":0,\"iPv29Str\":\"A\",\"uPv30\":0,\"uPv30Str\":\"V\",\"iPv30\":0,\"iPv30Str\":\"A\",\"uPv31\":0,\"uPv31Str\":\"V\",\"iPv31\":0,\"iPv31Str\":\"A\",\"uPv32\":0,\"uPv32Str\":\"V\",\"iPv32\":0,\"iPv32Str\":\"A\",\"pow1\":4653,\"pow1Str\":\"W\",\"pow2\":4409,\"pow2Str\":\"W\",\"pow3\":0,\"pow3Str\":\"W\",\"pow4\":0,\"pow4Str\":\"W\",\"pow5\":0,\"pow5Str\":\"W\",\"pow6\":0,\"pow6Str\":\"W\",\"pow7\":0,\"pow7Str\":\"W\",\"pow8\":0,\"pow8Str\":\"W\",\"pow9\":0,\"pow9Str\":\"W\",\"pow10\":0,\"pow10Str\":\"W\",\"pow11\":0,\"pow11Str\":\"W\",\"pow12\":0,\"pow12Str\":\"W\",\"pow13\":0,\"pow13Str\":\"W\",\"pow14\":0,\"pow14Str\":\"W\",\"pow15\":0,\"pow15Str\":\"W\",\"pow16\":0,\"pow16Str\":\"W\",\"pow17\":0,\"pow17Str\":\"W\",\"pow18\":0,\"pow18Str\":\"W\",\"pow19\":0,\"pow19Str\":\"W\",\"pow20\":0,\"pow20Str\":\"W\",\"pow21\":0,\"pow21Str\":\"W\",\"pow22\":0,\"pow22Str\":\"W\",\"pow23\":0,\"pow23Str\":\"W\",\"pow24\":0,\"pow24Str\":\"W\",\"pow25\":0,\"pow25Str\":\"W\",\"pow26\":0,\"pow26Str\":\"W\",\"pow27\":0,\"pow27Str\":\"W\",\"pow28\":0,\"pow28Str\":\"W\",\"pow29\":0,\"pow29Str\":\"W\",\"pow30\":0,\"pow30Str\":\"W\",\"pow31\":0,\"pow31Str\":\"W\",\"pow32\":0,\"pow32Str\":\"W\",\"uAc1\":229.9,\"uAc1Str\":\"V\",\"iAc1\":12,\"iAc1Str\":\"A\",\"uAc2\":229.8,\"uAc2Str\":\"V\",\"iAc2\":11.8,\"iAc2Str\":\"A\",\"uAc3\":229,\"uAc3Str\":\"V\",\"iAc3\":11.9,\"iAc3Str\":\"A\",\"powerFactor\":1,\"batteryDischargeEnergy\":0,\"batteryDischargeEnergyStr\":\"kWh\",\"batteryChargeEnergy\":0,\"batteryChargeEnergyStr\":\"kWh\",\"homeLoadEnergy\":0,\"homeLoadEnergyStr\":\"kWh\",\"gridPurchasedEnergy\":0,\"gridPurchasedEnergyStr\":\"kWh\",\"gridSellEnergy\":0,\"gridSellEnergyStr\":\"kWh\",\"fac\":49.96,\"facStr\":\"Hz\",\"batteryPower\":0,\"batteryPowerStr\":\"kW\",\"batteryPowerPec\":\"1\",\"batteryPowerZheng\":0,\"batteryPowerFu\":0,\"storageBatteryVoltage\":0,\"storageBatteryVoltageStr\":\"V\",\"storageBatteryCurrent\":0,\"storageBatteryCurrentStr\":\"A\",\"batteryCapacitySoc\":0,\"batteryHealthSoh\":0,\"batteryVoltage\":0,\"batteryVoltageStr\":\"V\",\"bstteryCurrent\":0,\"bstteryCurrentStr\":\"A\",\"batteryPowerBms\":0,\"batteryPowerBmsStr\":\"kW\",\"internalBatteryI\":0,\"batteryChargingCurrent\":0,\"batteryChargingCurrentStr\":\"A\",\"batteryDischargeLimiting\":0,\"batteryDischargeLimitingStr\":\"A\",\"batteryFailureInformation01\":\"0\",\"batteryFailureInformation02\":\"0\",\"batteryTotalChargeEnergy\":0,\"batteryTotalChargeEnergyStr\":\"kWh\",\"batteryTodayChargeEnergy\":0,\"batteryTodayChargeEnergyStr\":\"kWh\",\"batteryMonthChargeEnergy\":0,\"batteryMonthChargeEnergyStr\":\"kWh\",\"batteryYearChargeEnergy\":0,\"batteryYearChargeEnergyStr\":\"kWh\",\"batteryYesterdayChargeEnergy\":0,\"batteryYesterdayChargeEnergyStr\":\"kWh\",\"batteryTotalDischargeEnergy\":0,\"batteryTotalDischargeEnergyStr\":\"kWh\",\"batteryTodayDischargeEnergy\":0,\"batteryTodayDischargeEnergyStr\":\"kWh\",\"batteryMonthDischargeEnergy\":0,\"batteryMonthDischargeEnergyStr\":\"kWh\",\"batteryYearDischargeEnergy\":0,\"batteryYearDischargeEnergyStr\":\"kWh\",\"batteryYesterdayDischargeEnergy\":0,\"batteryYesterdayDischargeEnergyStr\":\"kWh\",\"gridPurchasedTotalEnergy\":0,\"gridPurchasedTotalEnergyStr\":\"kWh\",\"gridPurchasedYearEnergy\":0,\"gridPurchasedYearEnergyStr\":\"kWh\",\"gridPurchasedMonthEnergy\":0,\"gridPurchasedMonthEnergyStr\":\"kWh\",\"gridPurchasedTodayEnergy\":0,\"gridPurchasedTodayEnergyStr\":\"kWh\",\"gridPurchasedYesterdayEnergy\":0,\"gridPurchasedYesterdayEnergyStr\":\"kWh\",\"gridSellTotalEnergy\":0,\"gridSellTotalEnergyStr\":\"kWh\",\"gridSellYearEnergy\":0,\"gridSellYearEnergyStr\":\"kWh\",\"gridSellMonthEnergy\":0,\"gridSellMonthEnergyStr\":\"kWh\",\"gridSellTodayEnergy\":0,\"gridSellTodayEnergyStr\":\"kWh\",\"gridSellYesterdayEnergy\":0,\"gridSellYesterdayEnergyStr\":\"kWh\",\"homeLoadTotalEnergy\":0,\"homeLoadTotalEnergyStr\":\"kWh\",\"homeLoadTodayEnergy\":0,\"homeLoadTodayEnergyStr\":\"kWh\",\"totalLoadPower\":0,\"totalLoadPowerStr\":\"kW\",\"homeLoadYesterdayEnergy\":0,\"homeLoadYesterdayEnergyStr\":\"kWh\",\"familyLoadPower\":0,\"familyLoadPowerStr\":\"kW\",\"familyLoadPercent\":0,\"homeGridYesterdayEnergy\":0,\"homeGridYesterdayEnergyStr\":\"kWh\",\"homeGridTodayEnergy\":0,\"homeGridTodayEnergyStr\":\"kWh\",\"homeGridMonthEnergy\":0,\"homeGridMonthEnergyStr\":\"kWh\",\"homeGridYearEnergy\":0,\"homeGridYearEnergyStr\":\"kWh\",\"homeGridTotalEnergy\":0,\"homeGridTotalEnergyStr\":\"kWh\",\"bypassLoadPower\":0,\"bypassLoadPowerStr\":\"kW\",\"backupYesterdayEnergy\":0,\"backupYesterdayEnergyStr\":\"kWh\",\"backupTodayEnergy\":0,\"backupTodayEnergyStr\":\"kWh\",\"backupMonthEnergy\":0,\"backupMonthEnergyStr\":\"kWh\",\"backupYearEnergy\":0,\"backupYearEnergyStr\":\"kWh\",\"backupTotalEnergy\":0,\"backupTotalEnergyStr\":\"kWh\",\"bypassAcVoltage\":0,\"bypassAcVoltageB\":0,\"bypassAcVoltageC\":0,\"bypassAcCurrent\":0,\"bypassAcCurrentB\":0,\"bypassAcCurrentC\":0,\"pLimitSet\":110,\"pFactorLimitSet\":10,\"pReactiveLimitSet\":0,\"batteryType\":\"0.0\",\"socDischargeSet\":0,\"socChargingSet\":0,\"pEpmSet\":0,\"pEpmSetStr\":\"kW\",\"epmFailSafe\":0,\"epmSafe\":0,\"pEpm\":0,\"pEpmStr\":\"kW\",\"psumCalPec\":\"1\",\"insulationResistance\":0,\"dispersionRate\":0,\"sirRealtime\":1176,\"iLeakLimt\":0,\"upvTotal\":0,\"upvTotalStr\":\"V\",\"ipvTotal\":0,\"ipvTotalStr\":\"A\",\"powTotal\":0,\"powTotalStr\":\"W\",\"parallelStatus\":0,\"parallelAddr\":0,\"parallelPhase\":0,\"parallelBattery\":0,\"batteryAlarm\":\"0\",\"bypassAcOnoffSet\":0,\"bypassAcVoltageSet\":0,\"bypassAcCurrentSet\":0,\"batteryCDEnableSet\":0,\"batteryCDSet\":0,\"batteryCDISet\":0,\"batteryCMaxiSet\":0,\"batteryDMaxiSet\":0,\"batteryUvpSet\":0,\"batteryFcvSet\":0,\"batteryAcvSet\":0,\"batteryOvpSet\":0,\"batteryOlvEnableSet\":0,\"batteryLaTemp\":0,\"offGridDDepth\":0,\"epsDDepth\":0,\"epsSwitchTime\":\"0\",\"acInType\":0,\"energyStorageControl\":\"0\",\"meter1Type\":0,\"meter2Type\":0,\"meter1SiteHigh\":0,\"meter2SiteHigh\":0,\"meter1TypeLow\":0,\"meter2TypeLow\":0,\"psum\":0,\"dcPacStr\":\"kVA\",\"reactivePowerStr\":\"Var\",\"apparentPowerStr\":\"kVA\",\"psumCal\":8.31,\"familyLoadPowerPec\":\"1\",\"psumStr\":\"kW\",\"psumCalStr\":\"kW\"}";
Map<String, Object> map = JSON.parseObject(JsonString, Map.class);
map.keySet().forEach(s -> System.out.println(s.toLowerCase(Locale.ROOT)+" varchar(100),"));
}
}
......@@ -2,9 +2,6 @@ package com.yeejoin.amos.api.householdapi.face.service.impl;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.alibaba.druid.support.opds.udf.ExportSelectListColumns;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.api.householdapi.Utils.GolangRequestUtil;
import com.yeejoin.amos.api.householdapi.constant.GoLangConstant;
......@@ -13,6 +10,7 @@ import com.yeejoin.amos.api.householdapi.face.dto.CollectorDetailDto;
import com.yeejoin.amos.api.householdapi.face.dto.InverterDetailDto;
import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.hygf.JpCollector;
import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.hygf.JpInverter;
import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.hygf.JpInverterElectricity;
import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.hygf.JpStation;
import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.*;
import com.yeejoin.amos.api.householdapi.face.orm.mapper.hygf.JpCollectorMapper;
......@@ -24,21 +22,22 @@ import com.yeejoin.amos.api.householdapi.face.orm.mapper.hygf.JpStationMapper;
import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum;
import fastjson.JSON;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import javax.lang.model.util.ElementScanner6;
import java.rmi.AlreadyBoundException;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@Async
@Service
public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionService {
private final String dataRequstScheduled = "0 0/10 * * * *";
@Autowired
private GolangRequestUtil golangRequestUtil;
@Autowired
......@@ -71,8 +70,8 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
private HYGFJPInverterElecHistoryMapper hygfjpInverterElecHistoryMapper;
@Scheduled(cron =dataRequstScheduled )
@Override
public void stationList() {
HashMap<String, Object> requestInfo = new HashMap<>();
requestInfo.put("pageNo", 1);
......@@ -86,11 +85,11 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
);
for (int i = 0; i < result.size(); i++) {
GolangStationList golangStationList = result.get(i);
golangStationList.setCreatedTime(new Date());
golangStationList.setCreatedTime(System.currentTimeMillis());
golangStationMapper.insert(golangStationList);
}
}
@Scheduled(cron =dataRequstScheduled )
@Override
public void stationDetail() {
List<String> stationIds = golangStationMapper.getStationIds();
......@@ -111,7 +110,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
);
for (int j = 0; j < result.size(); j++) {
GolangStationDetail golangStationDetail = result.get(j);
golangStationDetail.setCreatedTime(new Date());
golangStationDetail.setCreatedTime(System.currentTimeMillis());
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().
eq("third_code", PVProducerInfoEnum.JLY.getCode()).
eq("third_station_id", stationIds.get(i)));
......@@ -151,7 +150,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
}
HYGFJPStationPowerHistory hygfjpStationPowerHistory = new HYGFJPStationPowerHistory();
hygfjpStationPowerHistory = new HYGFJPStationPowerHistory();
hygfjpStationPowerHistory.setCreatedTime(new Date());
hygfjpStationPowerHistory.setCreatedTime(System.currentTimeMillis());
hygfjpStationPowerHistory.setThirdStationId(jpStation.getThirdStationId());
hygfjpStationPowerHistory.setPower(jpStation.getRealTimePower());
hygfjpStationPowerHistory.setThirdCode(jpStation.getThirdCode());
......@@ -161,7 +160,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
}
}
}
@Scheduled(cron =dataRequstScheduled )
@Override
public void collectorList() {
List<String> stationIds = golangStationMapper.getStationIds();
......@@ -184,12 +183,12 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
);
for (int j = 0; j < result.size(); j++) {
GolangCollectorList golangCollectorList = result.get(j);
golangCollectorList.setCreatedTime(new Date());
golangCollectorList.setCreatedTime(System.currentTimeMillis());
golangCollectorListMapper.insert(golangCollectorList);
}
}
}
@Scheduled(cron =dataRequstScheduled )
@Override
public void collectorDetail() {
List<Long> collectorIds = golangCollectorListMapper.getCollectIds();
......@@ -247,7 +246,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
// td-collector-history
HYGFJPCollectorHistory hygfjpCollectorHistory = new HYGFJPCollectorHistory();
hygfjpCollectorHistory.setTime(System.currentTimeMillis());
hygfjpCollectorHistory.setCreatedTime(new DateTime());
hygfjpCollectorHistory.setCreatedTime(System.currentTimeMillis());
hygfjpCollectorHistory.setSnCode(collectorDetailDto.getSn());
hygfjpCollectorHistory.setSignalStrength(Double.valueOf(collectorDetailDto.getRssiLevel()));
hygfjpCollectorHistory.setThirdStationId(collectorDetailDto.getStationId());
......@@ -256,7 +255,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
}
}
}
@Scheduled(cron =dataRequstScheduled )
@Override
public void inverterList() {
List<String> stationIds = golangStationMapper.getStationIds();
......@@ -279,12 +278,12 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
);
for (int j = 0; j < result.size(); j++) {
GolangInverterList golangInverterList = result.get(j);
golangInverterList.setCreatedTime(new Date());
golangInverterList.setCreatedTime(System.currentTimeMillis());
golangInverterListMapper.insert(golangInverterList);
}
}
}
@Scheduled(cron =dataRequstScheduled )
@Override
public void inverterDetail() {
List<Long> inverterIds = golangInverterListMapper.getInverterIds();
......@@ -336,9 +335,56 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
} else {
jpInverterMapper.insert(jpInverter);
}
String jsonString = JSON.toJSONString(inverterDetailDto);
Map<String, Object> hanlderResult = JSON.parseObject(jsonString, Map.class);
for (int k = 1; k < 4; k++) {
JpInverterElectricity jpInverterElectricity = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>().
eq("sn_code", inverterDetailDto.getSn()).
eq("type", "交流").
eq("name", "AC" + k)
);
if (ObjectUtils.isEmpty(jpInverterElectricity)) {
jpInverterElectricity = new JpInverterElectricity();
}
jpInverterElectricity.setInverterId(inverterDetailDto.getId());
jpInverterElectricity.setSnCode(inverterDetailDto.getSn());
jpInverterElectricity.setThirdCode(PVProducerInfoEnum.JLY.getCode());
jpInverterElectricity.setType("交流");
jpInverterElectricity.setName("AC" + k);
jpInverterElectricity.setVoltage(Double.valueOf(hanlderResult.get("uAc" + k).toString()));
jpInverterElectricity.setCurrent(Double.valueOf(hanlderResult.get("iAc" + k).toString()));
if (ObjectUtils.isEmpty(jpInverterElectricity.getSequenceNbr())) {
jpInverterElectricityMapper.insert(jpInverterElectricity);
} else {
jpInverterElectricityMapper.updateById(jpInverterElectricity);
}
}
for (int k1 = 1; k1 < 33; k1++) {
JpInverterElectricity jpInverterElectricity = jpInverterElectricityMapper.selectOne(new QueryWrapper<JpInverterElectricity>().
eq("sn_code", inverterDetailDto.getSn()).
eq("type", "直流").
eq("name", "PV" + k1)
);
if (ObjectUtils.isEmpty(jpInverterElectricity)) {
jpInverterElectricity = new JpInverterElectricity();
}
jpInverterElectricity.setInverterId(inverterDetailDto.getId());
jpInverterElectricity.setSnCode(inverterDetailDto.getSn());
jpInverterElectricity.setThirdCode(PVProducerInfoEnum.JLY.getCode());
jpInverterElectricity.setType("直流");
jpInverterElectricity.setName("PV" + k1);
jpInverterElectricity.setVoltage(Double.valueOf(hanlderResult.get("uPv" + k1).toString()));
jpInverterElectricity.setCurrent(Double.valueOf(hanlderResult.get("iPv" + k1).toString()));
jpInverterElectricity.setPower(Double.valueOf(hanlderResult.get("pow" + k1).toString()));
if (ObjectUtils.isEmpty(jpInverterElectricity.getSequenceNbr())) {
jpInverterElectricityMapper.insert(jpInverterElectricity);
} else {
jpInverterElectricityMapper.updateById(jpInverterElectricity);
}
}
HYGFJPInverterElecHistory hygfjpInverterElecHistory = new HYGFJPInverterElecHistory();
hygfjpInverterElecHistory.setThirdStationId(String.valueOf(inverterDetailDto.getStationId()));
hygfjpInverterElecHistory.setCreatedTime(new Date());
hygfjpInverterElecHistory.setCreatedTime(System.currentTimeMillis());
hygfjpInverterElecHistory.setSnCode(inverterDetailDto.getSn());
hygfjpInverterElecHistory.setUAcCurrent(inverterDetailDto.getIAc1());
hygfjpInverterElecHistory.setVAcCurrent(inverterDetailDto.getIAc2());
......@@ -351,11 +397,10 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
hygfjpInverterElecHistoryMapper.insert(hygfjpInverterElecHistory);
// 逆变器历史
String today = DateUtil.today();
// HYGFJPInverterHistory hygfjpInverterHistory = hygfjpInverterHistoryMapper.selectOne(new QueryWrapper<HYGFJPInverterHistory>().eq("sn_code", inverterDetailDto.getSn()).eq("date",today));
// if (ObjectUtils.isEmpty(hygfjpInverterHistory)) {
// hygfjpInverterHistory = new HYGFJPInverterHistory();
// }
HYGFJPInverterHistory hygfjpInverterHistory =new HYGFJPInverterHistory();
HYGFJPInverterHistory hygfjpInverterHistory = hygfjpInverterHistoryMapper.selectOne(new QueryWrapper<HYGFJPInverterHistory>().eq("sn_code", inverterDetailDto.getSn()).eq("date", today));
if (ObjectUtils.isEmpty(hygfjpInverterHistory)) {
hygfjpInverterHistory = new HYGFJPInverterHistory();
}
hygfjpInverterHistory.setDate(today);
hygfjpInverterHistory.setThirdStationId(String.valueOf(inverterDetailDto.getStationId()));
hygfjpInverterHistory.setInverterId(inverterDetailDto.getId());
......@@ -365,7 +410,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
hygfjpInverterHistory.setPowerGeneration(inverterDetailDto.getEToday());
SimpleDateFormat format = new SimpleDateFormat(GoLangConstant.datePattern);
if (ObjectUtils.isEmpty(hygfjpInverterHistory.getCreatedTime())) {
hygfjpInverterHistory.setCreatedTime(Timestamp.valueOf(format.format(System.currentTimeMillis())));
hygfjpInverterHistory.setCreatedTime(System.currentTimeMillis());
hygfjpInverterHistoryMapper.insert(hygfjpInverterHistory);
} else {
hygfjpInverterHistoryMapper.insert(hygfjpInverterHistory);
......@@ -373,7 +418,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
}
}
}
@Scheduled(cron =dataRequstScheduled )
@Override
public void inverAlramInfo() {
List<String> inverterIds = golangInverterListMapper.getInverterSns();
......@@ -387,7 +432,7 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
requestInfo.put("pageNo", 1);
requestInfo.put("pageSize", 100);
requestInfo.put("alarmDeviceSn", inverterIds.get(i));
requestInfo.put("alarmBeginTime",DateUtil.today());
requestInfo.put("alarmBeginTime", DateUtil.today());
requestInfo.put("alarmEndTime", DateUtil.today());
String requestParaminfo = JSON.toJSONString(requestInfo);
List<AlarmDto> result = golangRequestUtil.getResPonse(GoLangConstant.alarmListUrl,
......@@ -398,9 +443,10 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
);
for (int j = 0; j < result.size(); j++) {
AlarmDto alarmDto = result.get(j);
HYGFJPInverterWarn hygfjpInverterWarn=new HYGFJPInverterWarn();
hygfjpInverterWarn.setCreatedTime(new Date());
HYGFJPInverterWarn hygfjpInverterWarn = new HYGFJPInverterWarn();
hygfjpInverterWarn.setCreatedTime(System.currentTimeMillis());
hygfjpInverterWarn.setTime(System.currentTimeMillis());
hygfjpInverterWarn.setTimeLong(System.currentTimeMillis());
hygfjpInverterWarn.setSnCode(alarmDto.getAlarmDeviceSn());
hygfjpInverterWarn.setThirdCode(String.valueOf(alarmDto.getStationId()));
hygfjpInverterWarn.setLevel(GoLangConstant.alarmLevel.get(alarmDto.getAlarmLevel()));
......
package com.yeejoin.amos.boot.module.jxiop.biz.constants;
import java.util.HashMap;
public class CommonConstans {
//光伏发电量系数
public static final Double pvGenPoweActor = 0.000001;
// 风电站:
// (日/月/年)发电量=场站所有风机(日/月/年)发电量总和
// 装机容量=场站所有风机装机容量总和
//
// 光伏站:
// (日/月/年)发电量=场站所有逆变器(日/月/年)发电量总和
// 装机容量=场站所有逆变器装机容量总和
//
// 通用:
// 发电量完成率=(月/年)发电量/(月/年)发电量指标
// 小时数完成率=(月/年)可利用小时/(月/年)可利用小时数指标
// 可利用小时(h)=(日/月/年)发电量(万kW·h)/装机容量(万kW)
// 二氧化碳减排量(万t)=发电量(万kW·h)*0.997 * 10 / 10000
public static final Double carbonDioxide = 0.997 * 10 / 10000;
// 节约标准煤(万t)=发电量(万kW·h)*0.29
public static final Double standardCoal = 0.29;
// 炭粉尘减排量(t)=发电量(万kW·h)*0.30
public static final Double toner = 0.30;
// 二氧化硫减排量(t)=发电量(万kW·h)*1.51
public static final Double sulfurDioxide = 1.51;
// 氮氧化物减排量(t)=发电量(万kW·h)*1.69
public static final Double oxynitride = 1.69;
//吨转万吨
public static final Double tToWT = 0.0001;
//万Kwh转MV
public static final Integer wkwhToMv = 10;
// 正常运行 发电状态=1
// 告警运行 报警状态=1
// 正常停机 停机状态=1
// 故障停机 故障状态=1
// 限功率
// 待机状态 待机状态=1
// 维护状态 维护状态=1
// 通讯中断
public static final HashMap<String, String> fanStatus = new HashMap<String, String>() {
{
put("发电状态", "正常运行");
put("报警状态", "报警运行");
put("停机状态", "停机状态");
put("故障状态", "故障状态");
put("待机状态", "待机状态");
put("维护状态", "维护状态");
put("限功率", "限功率");
put("通讯中断", "通讯中断");
}
};
// 正常运行 运行=1
// 正常停机 停机=1
// 限功率 限额运行=1
// 限电停机 降额运行=1
// 告警运行 告警运行=1
// 故障停机 故障停机=1
// 待机状态 待机=1
// 通讯中断 通讯故障=1
public static final HashMap<String, String> pvStatus = new HashMap<String, String>() {
{
put("运行", "正常运行");
put("停机", "正常停机");
put("限额运行", "限功率");
put("降额运行", "限电停机");
put("告警运行", "告警运行");
put("故障停机", "故障停机");
put("待机", "待机状态");
put("通讯故障", "通讯中断");
}
};
//es EquipIndexName 查绚关键字
public static final String QueryStringEquipmentIndexName = "equipmentIndexName.keyword";
//es EquipIndexName 查绚关键字
public static final String QueryStringEquipmentIndexNameNotKeyword = "equipmentIndexName";
//es gatewayId 查绚关键字
public static final String QueryStringGateWayId = "gatewayId.keyword";
public static final String QueryStringFrontMoudle = "frontModule.keyword";
public static final String QueryStringSystemType = "systemType";
public static final String QueryStringSystemTypeKeyword = "systemType.keyword";
public static final String QueryStringEquipmentNumber = "equipmentNumber";
public static final String QueryStringEquipmentNumberKeyword = "equipmentNumber.keyword";
public static final String QueryStringValue = "value";
public static final String QueryStringValueKeyword = "value.keyword";
public static final String QueryStringValueLabel = "valueLabel";
public static final String QueryStringValueLabelKeyword = "valueLabel.keyword";
public static final String QueryStringDataType = "dataType";
public static final String QueryStringDisplayName = "displayName";
public static final String QueryStringDisplayNameKeyword = "displayName.keyword";
public static final String QueryStringIsAlarm = "isAlarm";
public static final String QueryStringIsAlarmKeyword = "isAlarm.keyword";
public static final String Twodecimalplaces= "%.2f";
public static final String Fourdecimalplaces = "%.4f";
public static final String QueryStringFrontMoudleNotKeyWord = "frontModule";
}
package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import cn.hutool.core.text.CharSequenceUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESEquipments;
import com.yeejoin.amos.boot.module.jxiop.biz.constants.CommonConstans;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.ESEquipmentsDTO;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthLevel;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointProcessVariableClassification;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanHealthIndexMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanHealthLevelMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanWarningRecordMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Param;
......@@ -41,10 +49,21 @@ public class BigScreenAnalyseController extends BaseController {
@Autowired
StationBasicMapper stationBasicMapper;
@Autowired
CommonServiceImpl commonServiceImpl;
@Autowired
IdxBizFanHealthLevelMapper idxBizFanHealthLevelMapper;
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "场站设备健康状态指数与趋势 - 仪表盘", notes = "场站设备健康状态指数与趋势 - 仪表盘")
@GetMapping(value = "/getHealthScoreInfo")
public ResponseModel<Map<String, BigDecimal>> getHealthScoreInfo(@RequestParam(required = false) String areaCode, @RequestParam(required = false) String stationCode) {
if (StrUtil.isNotEmpty(stationCode)) {
StationBasic stationBasic = stationBasicMapper.selectById(stationCode);
stationCode = stationBasic.getStationName();
}
HashMap<String, BigDecimal> stringBigDecimalHashMap = new HashMap<>();
stringBigDecimalHashMap.put("value", idxBizFanHealthIndexMapper.getHealthScoreInfo(areaCode, stationCode));
return ResponseHelper.buildResponse(stringBigDecimalHashMap);
......@@ -55,6 +74,12 @@ public class BigScreenAnalyseController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "场站设备健康状态指数与趋势 - 折线图", notes = "场站设备健康状态指数与趋势 - 折线图")
@GetMapping(value = "/getHealthListInfo")
public ResponseModel<Map<String, Object>> getHealthListInfo(@RequestParam(required = false) String areaCode, @RequestParam(required = false) String stationCode) {
if (StrUtil.isNotEmpty(stationCode)) {
StationBasic stationBasic = stationBasicMapper.selectById(stationCode);
stationCode = stationBasic.getStationName();
}
HashMap<String, Object> resultMap = new HashMap<>();
List<Map<String, Object>> healthListInfo = idxBizFanHealthIndexMapper.getHealthListInfo(areaCode, stationCode);
List<String> time = new ArrayList<>();
......@@ -211,7 +236,7 @@ public class BigScreenAnalyseController extends BaseController {
public ResponseModel<Map<String, Object>> getHealthInfoByArea(@RequestParam(required = false) String areaCode) {
Map<String, Object> resultMap = new HashMap<>();
List<Map<String, Object>> healthListInfo = idxBizFanHealthIndexMapper.getHealthInfoByStation(areaCode);
Map<String, BigDecimal> collect = healthListInfo.stream().collect(Collectors.toMap(t -> t.get("area").toString(), t -> new BigDecimal(t.get("healthIndex").toString())));
Map<String, BigDecimal> collect = healthListInfo.stream().collect(Collectors.toMap(t -> t.get("station").toString(), t -> new BigDecimal(t.get("healthIndex").toString())));
......@@ -230,6 +255,10 @@ public class BigScreenAnalyseController extends BaseController {
@ApiOperation(value = "场站预警信息统计图 - 雷达图", httpMethod = "GET")
@GetMapping("/equipWarningRadarMap")
public ResponseModel<Map<String, Object>> assessIndexRadarMap(@RequestParam(required = false, value = "stationCode") String stationCode) {
if (StrUtil.isNotEmpty(stationCode)) {
StationBasic stationBasic = stationBasicMapper.selectById(stationCode);
stationCode = stationBasic.getStationName();
}
List<Map<String, Object>> list = idxBizFanHealthIndexMapper.equipWarningRadarMap(stationCode);
HashMap<String, Object> resultMap = new HashMap<>();
List<List<String>> resultData = new ArrayList<>();
......@@ -305,4 +334,216 @@ public class BigScreenAnalyseController extends BaseController {
return ResponseHelper.buildResponse(resultMap);
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "风站 左侧风机信息列表")
@GetMapping("/getFanInfoByPage")
public ResponseModel<Page<Map<String, Object>>> getFanInfoByPage(@RequestParam(value = "stationId", required = false) String stationId) {
StationBasic stationBasic = stationBasicMapper.selectById(stationId);
List<Map<String, Object>> equipmentList = idxBizFanHealthIndexMapper.getFanInfoByPage(stationBasic.getFanGatewayId());
List<Map<String, Object>> healthInfoList = idxBizFanHealthIndexMapper.getFanHealthInfoList(stationBasic.getFanGatewayId());
Map<Object, Double> equipmentHealthIndexMap = healthInfoList.stream().collect(Collectors.toMap(t -> t.get("equipmentName"), t -> Double.parseDouble(t.get("avgHealthIndex").toString())));
equipmentList.forEach(item -> {
Double equipmentHealthScore = equipmentHealthIndexMap.getOrDefault(item.get("equipmentName"), 100.0);
if (100.0 == equipmentHealthScore) {
item.put("warningName", "安全");
} else {
LambdaQueryWrapper<IdxBizFanHealthLevel> query = new LambdaQueryWrapper<>();
query.eq(IdxBizFanHealthLevel::getAnalysisObjType, "设备");
query.eq(IdxBizFanHealthLevel::getStatus, stationBasic.getStationName());
query.le(IdxBizFanHealthLevel::getGroupLowerLimit, equipmentHealthScore);
query.ge(IdxBizFanHealthLevel::getGroupUpperLimit, equipmentHealthScore);
IdxBizFanHealthLevel idxBizFanHealthLevel = idxBizFanHealthLevelMapper.selectOne(query);
item.put("warningName", idxBizFanHealthLevel.getHealthLevel());
}
item.put("healthIndex", equipmentHealthScore);
String equipmentName = CharSequenceUtil.replace(item.get("equipmentName").toString(), "集电Ⅳ线#", "");
String replace = CharSequenceUtil.replace(equipmentName, "集电Ⅲ线#", "");
String replace1 = CharSequenceUtil.replace(replace, "集电Ⅱ线#", "");
String replace2 = CharSequenceUtil.replace(replace1, "集电Ⅰ线#", "");
String replace3 = CharSequenceUtil.replace(replace2, "风机系统", "");
item.put("equipmentNameSimple", replace3);
});
Page<Map<String, Object>> mapPage = new Page<>();
mapPage.setSize(equipmentList.size());
mapPage.setTotal(equipmentList.size());
mapPage.setCurrent(1);
mapPage.setRecords(equipmentList);
return ResponseHelper.buildResponse(mapPage);
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "风站 风机子系统状态指数 柱状图")
@GetMapping("/getSubSystemInfo")
public ResponseModel<Map<String, Object>> getSubSystemInfo(@RequestParam(value = "equipmentName", required = false) String equipmentName,
@RequestParam(value = "stationId", required = false) String stationId) {
StationBasic stationBasic = stationBasicMapper.selectById(stationId);
Map<String, Object> resultMap = new HashMap<>();
List<Map<String, Object>> healthListInfo = idxBizFanHealthIndexMapper.getSubSystemInfo(equipmentName, stationBasic.getFanGatewayId());
Map<Object, Double> equipmentHealthIndexMap = healthListInfo.stream().collect(Collectors.toMap(t -> t.get("subSystem"), t -> Double.parseDouble(t.get("healthIndex").toString())));
List<Object> seriesData = new ArrayList<>();
List<Object> axisData = new ArrayList<>();
List<Map<String, Object>> equipmentList = idxBizFanHealthIndexMapper.getSumSystemListByEquipment(stationBasic.getFanGatewayId(), equipmentName);
equipmentList.forEach(item -> {
Double equipmentHealthScore = equipmentHealthIndexMap.getOrDefault(item.get("subSystem"), 100.0);
seriesData.add(equipmentHealthScore);
axisData.add(item.get("subSystem"));
});
resultMap.put("axisData", axisData);
resultMap.put("seriesData", seriesData);
return ResponseHelper.buildResponse(resultMap);
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "该子系统各指标预警 - 风站中间 下方列表")
@GetMapping("/getSubSystemPointInfo")
public ResponseModel<Page<Map<String, Object>>> getSubSystemPointInfo(@RequestParam(value = "subSystem", required = false) String subSystem,
@RequestParam(value = "stationId", required = false) String stationId) {
StationBasic stationBasic = stationBasicMapper.selectById(stationId);
List<Map<String, Object>> healthListInfo = idxBizFanHealthIndexMapper.getHealthInfoBySubSystem(subSystem, stationBasic.getFanGatewayId());
Map<Object, Double> equipmentHealthIndexMap = healthListInfo.stream().collect(Collectors.toMap(t -> t.get("pointName"), t -> Double.parseDouble(t.get("healthIndex").toString())));
List<Map<String, Object>> pointNameList = idxBizFanHealthIndexMapper.getPointNameListBySumSystem(stationBasic.getFanGatewayId(), subSystem);
pointNameList.forEach(item -> {
Double equipmentHealthScore = equipmentHealthIndexMap.getOrDefault(item.get("pointName"), 100.0);
if (100.0 == equipmentHealthScore) {
item.put("warningName", "安全");
} else {
LambdaQueryWrapper<IdxBizFanHealthLevel> query = new LambdaQueryWrapper<>();
query.eq(IdxBizFanHealthLevel::getAnalysisObjType, "设备");
query.eq(IdxBizFanHealthLevel::getStatus, stationBasic.getStationName());
query.le(IdxBizFanHealthLevel::getGroupLowerLimit, equipmentHealthScore);
query.ge(IdxBizFanHealthLevel::getGroupUpperLimit, equipmentHealthScore);
IdxBizFanHealthLevel idxBizFanHealthLevel = idxBizFanHealthLevelMapper.selectOne(query);
item.put("warningName", idxBizFanHealthLevel.getHealthLevel());
}
item.put("healthIndex", equipmentHealthScore);
});
Page<Map<String, Object>> mapPage = new Page<>();
mapPage.setSize(pointNameList.size());
mapPage.setTotal(pointNameList.size());
mapPage.setCurrent(1);
mapPage.setRecords(pointNameList);
return ResponseHelper.buildResponse(mapPage);
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "光伏 左侧风机信息列表")
@GetMapping("/getPvInfoByPage")
public ResponseModel<Page<Map<String, Object>>> getPvInfoByPage(@RequestParam(value = "stationId", required = false) String stationId) {
StationBasic stationBasic = stationBasicMapper.selectById(stationId);
List<Map<String, Object>> equipmentList = idxBizFanHealthIndexMapper.getPvInfoByPage(stationBasic.getFanGatewayId());
List<Map<String, Object>> healthInfoList = idxBizFanHealthIndexMapper.getPvHealthInfoList(stationBasic.getFanGatewayId());
Map<Object, Double> equipmentHealthIndexMap = healthInfoList.stream().collect(Collectors.toMap(t -> t.get("subarray"), t -> Double.parseDouble(t.get("avgHealthIndex").toString())));
equipmentList.forEach(item -> {
Double equipmentHealthScore = equipmentHealthIndexMap.getOrDefault(item.get("subarray"), 100.0);
if (100.0 == equipmentHealthScore) {
item.put("warningName", "安全");
} else {
LambdaQueryWrapper<IdxBizFanHealthLevel> query = new LambdaQueryWrapper<>();
query.eq(IdxBizFanHealthLevel::getAnalysisObjType, "设备");
query.eq(IdxBizFanHealthLevel::getStatus, stationBasic.getStationName());
query.le(IdxBizFanHealthLevel::getGroupLowerLimit, equipmentHealthScore);
query.ge(IdxBizFanHealthLevel::getGroupUpperLimit, equipmentHealthScore);
IdxBizFanHealthLevel idxBizFanHealthLevel = idxBizFanHealthLevelMapper.selectOne(query);
item.put("warningName", idxBizFanHealthLevel.getHealthLevel());
}
item.put("healthIndex", equipmentHealthScore);
});
Page<Map<String, Object>> mapPage = new Page<>();
mapPage.setSize(equipmentList.size());
mapPage.setTotal(equipmentList.size());
mapPage.setCurrent(1);
mapPage.setRecords(equipmentList);
return ResponseHelper.buildResponse(mapPage);
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "光伏 子阵下各设备状态指数 柱状图")
@GetMapping("/getPvSubSystemInfo")
public ResponseModel<Map<String, Object>> getPvSubSystemInfo(@RequestParam(value = "subarray", required = false) String subarray,
@RequestParam(value = "stationId", required = false) String stationId) {
StationBasic stationBasic = stationBasicMapper.selectById(stationId);
Map<String, Object> resultMap = new HashMap<>();
List<Map<String, Object>> healthListInfo = idxBizFanHealthIndexMapper.getPvSubSystemInfo(subarray, stationBasic.getFanGatewayId());
Map<Object, Double> equipmentHealthIndexMap = healthListInfo.stream().collect(Collectors.toMap(t -> t.get("equipmentName"), t -> Double.parseDouble(t.get("avgHealthIndex").toString())));
List<Object> seriesData = new ArrayList<>();
List<Object> axisData = new ArrayList<>();
List<Map<String, Object>> equipmentList = idxBizFanHealthIndexMapper.getPvSumSystemListByEquipment(stationBasic.getFanGatewayId(), subarray);
equipmentList.forEach(item -> {
Double equipmentHealthScore = equipmentHealthIndexMap.getOrDefault(item.get("equipmentName"), 100.0);
seriesData.add(equipmentHealthScore);
axisData.add(item.get("equipmentName"));
});
resultMap.put("axisData", axisData);
resultMap.put("seriesData", seriesData);
return ResponseHelper.buildResponse(resultMap);
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "光伏 该装备下各指标预警 - 风站中间 下方列表")
@GetMapping("/getPvSubSystemPointInfo")
public ResponseModel<Page<Map<String, Object>>> getPvSubSystemPointInfo(@RequestParam(value = "equipmentName", required = false) String equipmentName,
@RequestParam(value = "stationId", required = false) String stationId) {
StationBasic stationBasic = stationBasicMapper.selectById(stationId);
List<Map<String, Object>> healthListInfo = idxBizFanHealthIndexMapper.getPvHealthInfoBySubSystem(equipmentName, stationBasic.getFanGatewayId());
Map<Object, Double> equipmentHealthIndexMap = healthListInfo.stream().collect(Collectors.toMap(t -> t.get("pointName"), t -> Double.parseDouble(t.get("healthIndex").toString())));
List<Map<String, Object>> pointNameList = idxBizFanHealthIndexMapper.getPvPointNameListBySumSystem(stationBasic.getFanGatewayId(), equipmentName);
pointNameList.forEach(item -> {
Double equipmentHealthScore = equipmentHealthIndexMap.getOrDefault(item.get("pointName"), 100.0);
if (100.0 == equipmentHealthScore) {
item.put("warningName", "安全");
} else {
LambdaQueryWrapper<IdxBizFanHealthLevel> query = new LambdaQueryWrapper<>();
query.eq(IdxBizFanHealthLevel::getAnalysisObjType, "设备");
query.eq(IdxBizFanHealthLevel::getStatus, stationBasic.getStationName());
query.le(IdxBizFanHealthLevel::getGroupLowerLimit, equipmentHealthScore);
query.ge(IdxBizFanHealthLevel::getGroupUpperLimit, equipmentHealthScore);
IdxBizFanHealthLevel idxBizFanHealthLevel = idxBizFanHealthLevelMapper.selectOne(query);
item.put("warningName", idxBizFanHealthLevel.getHealthLevel());
}
item.put("healthIndex", equipmentHealthScore);
});
Page<Map<String, Object>> mapPage = new Page<>();
mapPage.setSize(pointNameList.size());
mapPage.setTotal(pointNameList.size());
mapPage.setCurrent(1);
mapPage.setRecords(pointNameList);
return ResponseHelper.buildResponse(mapPage);
}
}
package com.yeejoin.amos.boot.module.jxiop.biz.dto;
import lombok.Data;
import java.util.Date;
@Data
public class ESEquipmentsDTO {
private String id;
private String address;
private String dataType;
private String equipmentSpecificName;
private String gatewayId;
private String isAlarm;
private Date createdTime;
private String unit;
private String value;
private Float valueF;
private String valueLabel;
private String traceId;
private String equipmentIndexName;
private String equipmentNumber;
private String frontModule;
private String systemType;
private String pictureName;
private String displayName;
private String state;
private String color;
}
......@@ -153,4 +153,10 @@ public class IdxBizFanHealthIndex {
@TableField("ANOMALY")
private Double ANOMALY;
/**
* 分析变量名称
*/
@TableField("POINT_NAME")
private String pointName;
}
......@@ -162,4 +162,11 @@ public class IdxBizPvHealthIndex{
@TableField("ANOMALY")
private Double ANOMALY;
/**
* 分析变量名称
*/
@TableField("POINT_NAME")
private String pointName;
}
......@@ -37,4 +37,39 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn
List<Map<String, Object>> getAllEquipAlarmInfoAnalysisByArea(@Param("areaCode") String areaCode);
List<Map<String, Object>> getSubSystemInfo(@Param("equipmentName") String equipmentName, @Param("gatewayId") String gatewayId);
List<Map<String, Object>> getFanInfoByPage(@Param("gatewayId") String gatewayId);
List<Map<String, Object>> getFanHealthInfoList(@Param("gatewayId") String gatewayId);
List<Map<String, Object>> getSumSystemListByEquipment(@Param("gatewayId") String gatewayId, @Param("equipmentName") String equipmentName);
List<Map<String, Object>> getPointNameListBySumSystem(@Param("gatewayId") String gatewayId, @Param("subSystem") String subSystem);
List<Map<String, Object>> getHealthInfoBySubSystem(@Param("subSystem") String subSystem, @Param("gatewayId") String gatewayId);
List<Map<String, Object>> getPvInfoByPage(@Param("gatewayId") String gatewayId);
List<Map<String, Object>> getPvHealthInfoList(@Param("gatewayId") String gatewayId);
List<Map<String, Object>> getPvSubSystemInfo(@Param("subarray") String subarray, @Param("gatewayId") String gatewayId);
List<Map<String, Object>> getPvSumSystemListByEquipment(@Param("gatewayId") String gatewayId, @Param("subarray") String subarray);
List<Map<String, Object>> getPvHealthInfoBySubSystem(@Param("equipmentName") String equipmentName, @Param("gatewayId") String gatewayId);
List<Map<String, Object>> getPvPointNameListBySumSystem(@Param("gatewayId") String gatewayId, @Param("equipmentName") String equipmentName);
}
......@@ -27,6 +27,7 @@ import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;
import org.springframework.data.elasticsearch.core.SearchHit;
import org.springframework.data.elasticsearch.core.SearchHits;
import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder;
import org.springframework.data.elasticsearch.core.query.Query;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
......@@ -1225,4 +1226,41 @@ public class CommonServiceImpl {
}
}
}
/**
* 根据查询条件获取列表信息
*
* @param mustQuerCondtion
* @param shouldQuerCondtion
* @param tClass
* @param <T>
* @return
*/
public <T> List<T> getListDataByCondtions(Map<String, List<String>> mustQuerCondtion, Map<String, String> shouldQuerCondtion, Class<T> tClass) {
BoolQueryBuilder queryBuilder = QueryBuilders.boolQuery();
if (!ObjectUtils.isEmpty(mustQuerCondtion)) {
for (String key : mustQuerCondtion.keySet()) {
List<String> va = mustQuerCondtion.get(key);
queryBuilder.must(QueryBuilders.termsQuery(key, va));
}
}
if (!ObjectUtils.isEmpty(shouldQuerCondtion)) {
for (String key : shouldQuerCondtion.keySet()) {
queryBuilder.should(QueryBuilders.wildcardQuery(key, shouldQuerCondtion.get(key)));
}
}
Query query = new NativeSearchQueryBuilder()
.withQuery(queryBuilder)
.build();
query.setTrackTotalHits(true);
SearchHits search = elasticsearchTemplate.search(query, tClass);
if (search.hasSearchHits()) {
List<SearchHit<T>> searchHitList = search.getSearchHits();
List<T> list = searchHitList.stream().map(hit -> hit.getContent()).collect(Collectors.toList());
return list;
}
return null;
}
}
......@@ -15,7 +15,7 @@
AND
DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_FORMAT( NOW(), "%Y-%m-%d" )
<if test="areaCode != null and areaCode != ''">
AND ARAE = #{areaCode}
AND ARAE like concat('%', #{areaCode}, '%')
</if>
<if test="stationCode != null and stationCode != ''">
AND STATION = #{stationCode}
......@@ -34,7 +34,7 @@
ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_FORMAT( NOW(), "%Y-%m-%d" )
<if test="areaCode != null and areaCode != ''">
AND ARAE = #{areaCode}
AND ARAE like concat('%', #{areaCode}, '%')
</if>
<if test="stationCode != null and stationCode != ''">
AND STATION = #{stationCode}
......@@ -71,7 +71,7 @@
<where>
ANALYSIS_TYPE = '按天'
<if test="areaCode != null and areaCode != ''">
AND ARAE = #{areaCode}
AND ARAE like concat('%', #{areaCode}, '%')
</if>
<if test="stationCode != null and stationCode != ''">
AND STATION = #{stationCode}
......@@ -90,7 +90,7 @@
<where>
ANALYSIS_TYPE = '按天'
<if test="areaCode != null and areaCode != ''">
AND ARAE = #{areaCode}
AND ARAE like concat('%', #{areaCode}, '%')
</if>
<if test="stationCode != null and stationCode != ''">
AND STATION = #{stationCode}
......@@ -185,11 +185,12 @@
FROM
idx_biz_fan_health_index
<where>
( STATION IS NOT NULL OR STATION != '' )
STATION IS NOT NULL
AND STATION != ''
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_FORMAT( NOW(), "%Y-%m-%d" )
<if test="areaCode != null and areaCode != ''">
AND ARAE = #{areaCode}
AND ARAE like concat('%', #{areaCode}, '%')
</if>
</where>
GROUP BY
......@@ -197,15 +198,16 @@
(
SELECT
IFNULL( AVG( HEALTH_INDEX ), 0 ) AS avgHealthIndex,
ARAE
STATION
FROM
idx_biz_pv_health_index
<where>
( STATION IS NOT NULL OR STATION != '' )
STATION IS NOT NULL
AND STATION != ''
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_FORMAT( NOW(), "%Y-%m-%d" )
<if test="areaCode != null and areaCode != ''">
AND ARAE = #{areaCode}
AND ARAE like concat('%', #{areaCode}, '%')
</if>
</where>
GROUP BY
......@@ -255,7 +257,7 @@
${tableName} a
<where>
<if test="areaCode != null and areaCode != ''">
a.ARAE = #{areaCode}
a.ARAE like concat('%', #{areaCode}, '%')
</if>
</where>
group by pointName,
......@@ -277,7 +279,7 @@
idx_biz_pv_warning_record
<where>
<if test="areaCode != null and areaCode != ''">
ARAE = #{areaCode}
ARAE like concat('%', #{areaCode}, '%')
</if>
</where>
GROUP BY
......@@ -291,7 +293,7 @@
idx_biz_fan_warning_record
<where>
<if test="areaCode != null and areaCode != ''">
ARAE = #{areaCode}
ARAE like concat('%', #{areaCode}, '%')
</if>
</where>
GROUP BY
......@@ -302,4 +304,242 @@
a.pointName IS NOT NULL
AND a.pointName != ''
</select>
<select id="getSubSystemInfo" resultType="java.util.Map">
SELECT
IFNULL( HEALTH_INDEX, 0 ) AS healthIndex,
SUB_SYSTEM AS subSystem
FROM
idx_biz_fan_health_index
<where>
STATION IS NOT NULL
AND STATION != ''
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = CURRENT_DATE
<if test="equipmentName != null and equipmentName != ''">
AND EQUIPMENT_NAME = #{equipmentName}
</if>
<if test="gatewayId != null and gatewayId != ''">
AND GATEWAY_ID = #{gatewayId}
</if>
</where>
</select>
<select id="getFanInfoByPage" resultType="java.util.Map">
SELECT
EQUIPMENT_NAME as equipmentName
FROM
idx_biz_fan_point_process_variable_classification
<where>
EQUIPMENT_NAME LIKE '%#%'
<if test="gatewayId != null and gatewayId != ''">
AND GATEWAY_ID = #{gatewayId}
</if>
</where>
GROUP BY
EQUIPMENT_NAME
ORDER BY
RIGHT(EQUIPMENT_NAME, 6) ASC
</select>
<select id="getFanHealthInfoList" resultType="java.util.Map">
SELECT
IFNULL( AVG( HEALTH_INDEX ), 0 ) AS avgHealthIndex,
EQUIPMENT_NAME as equipmentName
FROM
idx_biz_fan_health_index
<where>
STATION IS NOT NULL
AND STATION != ''
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_FORMAT( NOW(), "%Y-%m-%d" )
<if test="gatewayId != null and gatewayId != ''">
AND GATEWAY_ID = #{gatewayId}
</if>
</where>
GROUP BY
EQUIPMENT_NAME
</select>
<select id="getSumSystemListByEquipment" resultType="java.util.Map">
SELECT
SUB_SYSTEM as subSystem
FROM
idx_biz_fan_point_process_variable_classification
<where>
EQUIPMENT_NAME = #{equipmentName}
AND GATEWAY_ID = #{gatewayId}
</where>
GROUP BY
SUB_SYSTEM
</select>
<select id="getPointNameListBySumSystem" resultType="java.util.Map">
SELECT
POINT_NAME as pointName
FROM
idx_biz_fan_point_process_variable_classification
<where>
SUB_SYSTEM = #{subSystem}
AND GATEWAY_ID = #{gatewayId}
</where>
GROUP BY
POINT_NAME
</select>
<select id="getHealthInfoBySubSystem" resultType="java.util.Map">
SELECT
IFNULL( avg( HEALTH_INDEX ), 0 ) AS healthIndex,
POINT_NAME AS pointName
FROM
idx_biz_fan_health_index
<where>
STATION IS NOT NULL
AND STATION != ''
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = CURRENT_DATE
AND POINT_NAME IS NOT NULL
AND POINT_NAME != ''
<if test="subSystem != null and subSystem != ''">
AND SUB_SYSTEM = #{subSystem}
</if>
<if test="gatewayId != null and gatewayId != ''">
AND GATEWAY_ID = #{gatewayId}
</if>
</where>
GROUP BY
POINT_NAME
</select>
<select id="getPvInfoByPage" resultType="java.util.Map">
SELECT
SUBARRAY as subarray
FROM
idx_biz_pv_point_process_variable_classification
<where>
<if test="gatewayId != null and gatewayId != ''">
GATEWAY_ID = #{gatewayId}
</if>
</where>
GROUP BY
SUBARRAY
</select>
<select id="getPvHealthInfoList" resultType="java.util.Map">
SELECT
IFNULL( round(AVG( HEALTH_INDEX ), 2), 0 ) AS avgHealthIndex,
SUBARRAY as subarray
FROM
idx_biz_pv_health_index
<where>
STATION IS NOT NULL
AND STATION != ''
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = DATE_FORMAT( NOW(), "%Y-%m-%d" )
<if test="gatewayId != null and gatewayId != ''">
AND GATEWAY_ID = #{gatewayId}
</if>
</where>
GROUP BY SUBARRAY
order by SUBARRAY
</select>
<select id="getPvSubSystemInfo" resultType="java.util.Map">
SELECT
IFNULL( AVG( HEALTH_INDEX ), 0 ) AS avgHealthIndex,
EQUIPMENT_NAME AS equipmentName
FROM
idx_biz_pv_health_index
<where>
STATION IS NOT NULL
AND STATION != ''
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = CURRENT_DATE
<if test="subarray != null and subarray != ''">
AND SUBARRAY = #{subarray}
</if>
<if test="gatewayId != null and gatewayId != ''">
AND GATEWAY_ID = #{gatewayId}
</if>
</where>
group by EQUIPMENT_NAME
</select>
<select id="getPvSumSystemListByEquipment" resultType="java.util.Map">
SELECT
EQUIPMENT_NAME as equipmentName
FROM
idx_biz_pv_point_process_variable_classification
<where>
SUBARRAY = #{subarray}
AND GATEWAY_ID = #{gatewayId}
</where>
GROUP BY
EQUIPMENT_NAME
</select>
<select id="getPvHealthInfoBySubSystem" resultType="java.util.Map">
SELECT
IFNULL( ROUND(avg( HEALTH_INDEX ), 2), 0 ) AS healthIndex,
POINT_NAME AS pointName
FROM
idx_biz_pv_health_index
<where>
STATION IS NOT NULL
AND STATION != ''
AND ANALYSIS_TYPE = '按天'
AND DATE_FORMAT( REC_DATE, "%Y-%m-%d" ) = CURRENT_DATE
AND POINT_NAME IS NOT NULL
AND POINT_NAME != ''
<if test="equipmentName != null and equipmentName != ''">
AND EQUIPMENT_NAME = #{equipmentName}
</if>
<if test="gatewayId != null and gatewayId != ''">
AND GATEWAY_ID = #{gatewayId}
</if>
</where>
GROUP BY
POINT_NAME
</select>
<select id="getPvPointNameListBySumSystem" resultType="java.util.Map">
SELECT
POINT_NAME as pointName
FROM
idx_biz_pv_point_process_variable_classification
<where>
EQUIPMENT_NAME = #{equipmentName}
AND GATEWAY_ID = #{gatewayId}
</where>
GROUP BY
POINT_NAME
</select>
</mapper>
......@@ -78,7 +78,7 @@
) a
<where>
<if test="arae != '' and arae != null">
AND a.arae = #{arae}
AND a.arae like concat('%', #{areaCode}, '%')
</if>
<if test="station != '' and station != null">
AND a.station = #{station}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment