Commit aee9ff54 authored by tangwei's avatar tangwei

解决冲突

parents 4896a847 b8818df8
......@@ -6,3 +6,9 @@ target/
/org.eclipse
.settings
log/
/amos-boot-system-jxiop/amos-boot-module-hygf-api/bin/
/amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/bin/
/amos-boot-system-jxiop/amos-boot-module-hygf-biz/bin/
/amos-boot-system-jxiop/amos-boot-module-jxiop-api/bin/
/amos-boot-system-jxiop/amos-boot-module-jxiop-biz/bin/
/amos-boot-system-jxiop/amos-boot-module-jxiop-warn-biz/bin/
package com.yeejoin.amos.api.householdapi.constant;
import java.util.HashMap;
/**
* 北向-华为常量
*/
public class ImasterConstant {
public static final HashMap<String, String> stationStaus = new HashMap<String, String>() {
{
put("1", "离线");
put("2", "告警");
put("3", "在线");
}
};
public static final HashMap<String, String> alarmstatus = new HashMap<String, String>() {
{
put("1", "未处理");
}
};
public static final HashMap<String, String> alarmLevel = new HashMap<String, String>() {
{
put("1", "严重");
put("2", "重要");
put("3", "次要");
put("4", "提示");
}
};
public static String baseurl ="https://cn.fusionsolar.huawei.com";
public static String account ="ahsjmg-API";
public static String password ="huawei123";
public static String tokenUrl ="/thirdData/login";
public static String requestPOST="POST";
public static String requestGET="GET";
public static String stationListUrl="/thirdData/stations";
public static String stationDetailUrl = "/thirdData/getStationRealKpi";
public static String collectorListUrl = "/thirdData/getDevList";
public static String collectorDetailUrl = "/thirdData/getDevRealKpi";
public static String alarmListUrl = "/thirdData/getAlarmList";
public static String resovleRule_data_page_records = "data";
public static String resovle_rows="rows";
public static int devTypeC=62;
public static int devTypeI=1;
}
......@@ -2,7 +2,10 @@ package com.yeejoin.amos.api.householdapi.controller;
import com.yeejoin.amos.api.householdapi.Utils.HouseholdPvUtils;
import com.yeejoin.amos.api.householdapi.face.service.GoLangDataAcquisitionService;
import com.yeejoin.amos.api.householdapi.face.service.ImasterDataService;
import com.yeejoin.amos.api.householdapi.face.service.KSolarDataAcquisitionService;
import com.yeejoin.amos.api.householdapi.face.service.impl.ImasterDataServiceImpl;
import fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -31,6 +34,8 @@ public class HouseholdTestController {
private GoLangDataAcquisitionService goLangDataAcquisitionService;
@Autowired
private KSolarDataAcquisitionService kSolarDataAcquisitionService;
@Autowired
private ImasterDataService imasterDataService;
/**
......@@ -119,4 +124,27 @@ public class HouseholdTestController {
// goLangDataAcquisitionService.inverAlramInfo();
}
/**
* 新增户用光伏-厂商API haders
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@PostMapping(value = "/imasterNew")
@ApiOperation(httpMethod = "POST", value = "北向", notes = "北向")
public void imasterNew() throws IOException {
// imasterDataService.stationList();
// imasterDataService.stationDetail();
// imasterDataService.collectorList();
// imasterDataService.inverterList();
imasterDataService.inverterDetail();
// goLangDataAcquisitionService.collectorList();
//// goLangDataAcquisitionService.inverterList();
// goLangDataAcquisitionService.collectorDetail();
// goLangDataAcquisitionService.inverterDetail();
// goLangDataAcquisitionService.inverAlramInfo();
}
}
package com.yeejoin.amos.api.householdapi.face.dto;
import lombok.Data;
@Data
public class ImasterAlarmDto {
private Integer alarmId;
private Integer alarmType;
private Long raiseTime;
private String stationName;
private Integer lev;
private Integer devTypeId;
private String stationCode;
private String alarmName;
private String alarmCause;
private String devName;
private String repairSuggestion;
private String esnCode;
private Integer status;
}
......@@ -16,7 +16,7 @@ import java.util.Date;
@Data
@Accessors(chain = true)
@TableName("hygf_jp_inverter")
public class JpInverter implements Serializable {
public class JpInverter implements Serializable {
private static final long serialVersionUID = 1L;
......
package com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data
@TableName(value = "imaster_collector_list", autoResultMap = true)
public class ImasterCollectorList {
private Long createdTime;
private Long id;
private String stationCode;
private String stationName;
private String devName;
private String esnCode;
private Integer devTypeId;
private String softwareVersion;
private String invType;
private Double longitude;
private Double latitude;
}
package com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data
@TableName(value = "imaster_inverter_list", autoResultMap = true)
public class ImasterInverterList {
private Long createdTime;
private Long id;
private String stationCode;
private String stationName;
private String collectorSnCode;
private String devName;
private String esnCode;
private Integer devTypeId;
private String softwareVersion;
private String invType;
private Double longitude;
private Double latitude;
}
package com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data
@TableName(value = "imaster_inverter_list_details", autoResultMap = true)
public class ImasterInverterListDetails {
private Long createdTime;
private String inverterId;
Double pv26_i ;
Double pv2_u ;
Double pv28_i ;
Double pv4_u ;
Double pv22_i ;
Double power_factor ;
Double pv6_u ;
Double mppt_total_cap ;
Double pv24_i ;
Double pv8_u ;
Double open_time ;
Double pv22_u ;
Double a_i ;
Double pv24_u ;
Double mppt_9_cap ;
Double c_i ;
Double pv20_u ;
Double pv19_u ;
Double pv15_u ;
Double reactive_power ;
Double a_u ;
Double pv17_u ;
Double c_u ;
Double mppt_8_cap ;
Double pv20_i ;
Double pv15_i ;
Double efficiency ;
Double pv17_i ;
Double pv11_i ;
Double pv13_i ;
Double pv11_u ;
Double mppt_power ;
Double pv13_u ;
Double run_state ;
Double close_time ;
Double pv19_i ;
Double mppt_7_cap ;
Double mppt_5_cap ;
Double pv27_u ;
Double pv2_i ;
Double active_power ;
Double pv4_i ;
Double pv6_i ;
Double pv8_i ;
Double mppt_6_cap ;
Double pv27_i ;
Double pv1_u ;
Double pv3_u ;
Double pv23_i ;
Double pv5_u ;
Double pv25_i ;
Double pv7_u ;
Double pv23_u ;
Double inverter_state ;
Double pv9_u ;
Double pv25_u ;
Double total_cap ;
Double mppt_3_cap ;
Double b_i ;
Double pv21_u ;
Double mppt_10_cap ;
Double pv16_u ;
Double pv18_u ;
Double temperature ;
Double bc_u ;
Double b_u ;
Double pv21_i ;
Double elec_freq ;
Double mppt_4_cap ;
Double pv16_i ;
Double pv18_i ;
Double day_cap ;
Double pv12_i ;
Double pv14_i ;
Double pv12_u ;
Double mppt_1_cap ;
Double pv14_u ;
Double pv10_u ;
Double pv26_u ;
Double pv1_i ;
Double pv28_u ;
Double pv3_i ;
Double mppt_2_cap ;
Double pv5_i ;
Double ab_u ;
Double ca_u ;
Double pv7_i ;
Double pv10_i ;
Double pv9_i ;
}
package com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data
@TableName(value = "imaster_station_details" ,autoResultMap = true)
public class ImasterStationDetail {
private Long createdTime;
private String stationCode ;
private Double day_power ;
private Double month_power;
private Double total_power;
private Double day_income ;
private Double total_income ;
private Integer real_health_state;
}
package com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data
@TableName(value = "imaster_station_details_day" ,autoResultMap = true)
public class ImasterStationDetailsDay {
private Long createdTime;
private String stationCode ;
private Double installedCapacity ;
private Double radiationIntensity;
private Double theoryPower ;
private Double performanceRatio ;
private Double inverterPower ;
private Double ongridPower ;
private Double usePower ;
private Double powerProfit ;
private Double perpowerRatio;
private Double reductionTotalCo2 ;
private Double reductionTotalCoal ;
private Double reductionTotalTree;
}
package com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data
@TableName(value = "imaster_station_details_month" ,autoResultMap = true)
public class ImasterStationDetailsMonth {
private Long createdTime;
private String stationCode ;
private Double installedCapacity ;
private Double radiationIntensity;
private Double theoryPower ;
private Double performanceRatio ;
private Double inverterPower ;
private Double ongridPower ;
private Double usePower ;
private Double powerProfit ;
private Double perpowerRatio;
private Double reductionTotalCo2 ;
private Double reductionTotalCoal ;
private Double reductionTotalTree;
}
package com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data
@TableName(value = "imaster_station_details_year" ,autoResultMap = true)
public class ImasterStationDetailsYear {
private Long createdTime;
private String stationCode ;
private Double installedCapacity ;
private Double radiationIntensity;
private Double theoryPower ;
private Double performanceRatio ;
private Double inverterPower ;
private Double ongridPower ;
private Double usePower ;
private Double powerProfit ;
private Double perpowerRatio;
private Double reductionTotalCo2 ;
private Double reductionTotalCoal ;
private Double reductionTotalTree;
}
package com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
@TableName(value = "imaster_station_list" ,autoResultMap = true)
public class ImasterStationList implements Serializable {
private Long createdTime;
private String latitude;
private String longitude;
private String plantAddress;
private String plantName;
private String plantCode;
private String contactPerson;
private String contactMethod;
private String gridConnectionDate;
private Double capacity;
}
package com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.ImasterCollectorList;
import org.apache.ibatis.annotations.Select;
import java.util.List;
public interface ImasterCollectorListMapper extends BaseMapper<ImasterCollectorList> {
@Select("select id from imaster_collector_list where esn_code is not null group by id")
List<Long> getCollectIds();
}
package com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.ImasterInverterListDetails;
public interface ImasterInverterListDetailsMapper extends BaseMapper<ImasterInverterListDetails> {
}
package com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.ImasterInverterList;
import org.apache.ibatis.annotations.Select;
import java.util.List;
public interface ImasterInverterListMapper extends BaseMapper<ImasterInverterList> {
@Select("select esn_code from imaster_inverter_list where esn_code is not null group by esn_code")
List<String> getCollectIds();
}
package com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.ImasterInverterListDetails;
import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.ImasterStationDetail;
public interface ImasterStationDetailsMapper extends BaseMapper<ImasterStationDetail> {
}
package com.yeejoin.amos.api.householdapi.face.orm.mapper.tdengine;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.ImasterStationList;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;
import java.util.List;
public interface ImasterStationMapper extends BaseMapper<ImasterStationList> {
@Select("select * from imaster_station_list")
List<ImasterStationList> getStationInfo();
@Select("select plant_code as plantCode from imaster_station_list group by plant_code")
List<String> getStationIds();
}
package com.yeejoin.amos.api.householdapi.face.service;
public interface ImasterDataService {
/**
* @descrption 场站列表数据入库
*/
void stationList();
/**
* @descrption 场站详情数据入库
*/
void stationDetail();
/**
* @descrption 采集器列表数据入库
*/
void collectorList();
/**
* @descrption 采集器详情数据入库
*/
void collectorDetail();
/**
* @descrption 逆变器列表数据入库
*/
void inverterList();
/**
* @descrption 逆变器详情数据入库
*/
void inverterDetail();
/**
* @descrption 采集器告警列表数据入库
*/
void inverAlramInfo();
}
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-system-jxiop</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>amos-boot-module-hygf-api</artifactId>
<name>amos-boot-module-hygf-api</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-module-common-api</artifactId>
<version>${amos-biz-boot.version}</version>
</dependency>
<dependency>
<groupId>com.taosdata.jdbc</groupId>
<artifactId>taos-jdbcdriver</artifactId>
<version>2.0.30</version>
</dependency>
</dependencies>
</project>
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