Commit 3dcd8bbd authored by tangwei's avatar tangwei

解决冲突

parents 3b7db286 310e12e9
...@@ -33,24 +33,24 @@ public class DayGenerateEX { ...@@ -33,24 +33,24 @@ public class DayGenerateEX {
* 满发小时数 * 满发小时数
* *
* */ * */
@ExcelProperty(value = "满发小时数", index = 5) @ExcelProperty(value = "满发小时数(h)", index = 5)
private Double fullhour; private Double fullhour;
@ExcelProperty(value = "日发电量", index = 6) @ExcelProperty(value = "日发电量(kWh)", index = 6)
// 日发电量 // 日发电量
private Double dayGenerate; private Double dayGenerate;
@ExcelProperty(value = "日收益", index = 7) @ExcelProperty(value = "日收益(元)", index = 7)
// 日收益 // 日收益
private Double dayIncome; private Double dayIncome;
/** /**
* 累计发电量 * 累计发电量
*/ */
@ExcelProperty(value = "累计发电量", index = 8) @ExcelProperty(value = "累计发电量(kWh)", index = 8)
private Double accumulatedPower; private Double accumulatedPower;
/** /**
* 状态 * 状态
......
package com.yeejoin.amos.boot.module.hygf.api.dto; package com.yeejoin.amos.boot.module.hygf.api.dto;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.yeejoin.amos.boot.module.hygf.api.entity.JpCollector;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto; import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
...@@ -97,6 +98,8 @@ public class JpInverterDto extends BaseDto { ...@@ -97,6 +98,8 @@ public class JpInverterDto extends BaseDto {
private List<String> stationIds; private List<String> stationIds;
private List<JpCollector> jpCollectors;
@ApiModelProperty(value = "所属电站名称") @ApiModelProperty(value = "所属电站名称")
private String name; private String name;
......
...@@ -96,7 +96,7 @@ public class JpStationDto extends BaseDto { ...@@ -96,7 +96,7 @@ public class JpStationDto extends BaseDto {
/** /**
* 累计发电量 * 累计发电量
*/ */
@ExcelProperty(value = "累计发电量", index = 6) @ExcelProperty(value = "累计发电量(mWh)", index = 6)
private Double accumulatedPower; private Double accumulatedPower;
@ExcelIgnore @ExcelIgnore
/** /**
...@@ -136,7 +136,7 @@ public class JpStationDto extends BaseDto { ...@@ -136,7 +136,7 @@ public class JpStationDto extends BaseDto {
private String area; private String area;
@ExcelIgnore @ExcelIgnore
List<JpPersonStation> statioId; List<JpPersonStation> statioId;
@ExcelProperty(value = "累计收益", index = 7) @ExcelProperty(value = "累计收益(元)", index = 7)
// 累计收益 // 累计收益
private Double cumulativeIncome; private Double cumulativeIncome;
@ExcelIgnore @ExcelIgnore
...@@ -177,7 +177,7 @@ public class JpStationDto extends BaseDto { ...@@ -177,7 +177,7 @@ public class JpStationDto extends BaseDto {
* 满发小时数 * 满发小时数
* *
* */ * */
@ExcelProperty(value = "满发小时数", index = 5) @ExcelProperty(value = "满发小时数(h)", index = 5)
private Double fullhour; private Double fullhour;
......
...@@ -35,7 +35,7 @@ public class MonthGenerateEX { ...@@ -35,7 +35,7 @@ public class MonthGenerateEX {
* 满发小时数 * 满发小时数
* *
* */ * */
@ExcelProperty(value = "满发小时数", index = 5) @ExcelProperty(value = "满发小时数(h)", index = 5)
private Double fullhour; private Double fullhour;
...@@ -43,15 +43,15 @@ public class MonthGenerateEX { ...@@ -43,15 +43,15 @@ public class MonthGenerateEX {
// 月发电量 // 月发电量
@ExcelProperty(value = "月发电量", index = 6) @ExcelProperty(value = "月发电量(kWh)", index = 6)
private Double monthGenerate; private Double monthGenerate;
// 月收益 // 月收益
@ExcelProperty(value = "月收益", index = 7) @ExcelProperty(value = "月收益(元)", index = 7)
private Double monthIncome; private Double monthIncome;
/** /**
* 累计发电量 * 累计发电量
*/ */
@ExcelProperty(value = "累计发电量", index = 8) @ExcelProperty(value = "累计发电量(kWh)", index = 8)
private Double accumulatedPower; private Double accumulatedPower;
} }
...@@ -30,22 +30,22 @@ public class YearGenerateEX { ...@@ -30,22 +30,22 @@ public class YearGenerateEX {
* 满发小时数 * 满发小时数
* *
* */ * */
@ExcelProperty(value = "满发小时数", index = 5) @ExcelProperty(value = "满发小时数(h)", index = 5)
private Double fullhour; private Double fullhour;
// 年发电量 // 年发电量
@ExcelProperty(value = "年发电量", index = 6) @ExcelProperty(value = "年发电量(kWh)", index = 6)
private Double yearGenerate; private Double yearGenerate;
// 年收益 // 年收益
@ExcelProperty(value = "年收益", index = 7) @ExcelProperty(value = "年收益(元)", index = 7)
private Double yearIncome; private Double yearIncome;
/** /**
* 累计发电量 * 累计发电量
*/ */
@ExcelProperty(value = "累计发电量", index = 8) @ExcelProperty(value = "累计发电量(kWh)", index = 8)
private Double accumulatedPower; private Double accumulatedPower;
} }
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
left join privilege_company pc on sta.regional_companies_code = pc.ORG_CODE left join privilege_company pc on sta.regional_companies_code = pc.ORG_CODE
<where> <where>
<if test="dto.snCode != null and dto.snCode != ''"> <if test="dto.snCode != null and dto.snCode != ''">
hjc.sn_code = #{dto.snCode} hjc.sn_code like #{dto.snCode}
</if> </if>
<if test="dto.type != null and dto.type !=''"> <if test="dto.type != null and dto.type !=''">
hjc.type = #{dto.type} hjc.type = #{dto.type}
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
left join privilege_company pc on sta.regional_companies_code = pc.ORG_CODE left join privilege_company pc on sta.regional_companies_code = pc.ORG_CODE
<where> <where>
<if test="dto.snCode != null and dto.snCode != ''"> <if test="dto.snCode != null and dto.snCode != ''">
hjc.sn_code = #{dto.snCode} hjc.sn_code like #{dto.snCode}
</if> </if>
<if test="dto.type != null and dto.type !=''"> <if test="dto.type != null and dto.type !=''">
hjc.type = #{dto.type} hjc.type = #{dto.type}
......
...@@ -45,13 +45,13 @@ ...@@ -45,13 +45,13 @@
left join hygf_jp_station sta on sta.third_station_id = hjc.third_station_id left join hygf_jp_station sta on sta.third_station_id = hjc.third_station_id
<where> <where>
<if test="dto.snCode != null and dto.snCode != ''"> <if test="dto.snCode != null and dto.snCode != ''">
sn_code = #{dto.snCode} AND hjc.sn_code like #{dto.snCode}
</if> </if>
<if test="dto.minValue != null and dto.minValue !=''"> <if test="dto.minValue != null and dto.minValue !=''">
capacity >= #{dto.type} AND hjc.capacity >= #{dto.type}
</if> </if>
<if test="dto.maxValue != null and dto.maxValue !=''"> <if test="dto.maxValue != null and dto.maxValue !=''">
capacity <![CDATA[<=]]> #{dto.maxValue} AND hjc.capacity <![CDATA[<=]]> #{dto.maxValue}
</if> </if>
</where> </where>
limit #{current},#{size} limit #{current},#{size}
...@@ -65,13 +65,13 @@ ...@@ -65,13 +65,13 @@
left join hygf_jp_station sta on sta.third_station_id = hjc.third_station_id left join hygf_jp_station sta on sta.third_station_id = hjc.third_station_id
<where> <where>
<if test="dto.snCode != null and dto.snCode != ''"> <if test="dto.snCode != null and dto.snCode != ''">
sn_code = #{dto.snCode} AND hjc.sn_code like #{dto.snCode}
</if> </if>
<if test="dto.minValue != null and dto.minValue !=''"> <if test="dto.minValue != null and dto.minValue !=''">
capacity >= #{dto.type} AND hjc. capacity >= #{dto.type}
</if> </if>
<if test="dto.maxValue != null and dto.maxValue !=''"> <if test="dto.maxValue != null and dto.maxValue !=''">
capacity <![CDATA[<=]]> #{dto.maxValue} AND hjc.capacity <![CDATA[<=]]> #{dto.maxValue}
</if> </if>
</where> </where>
</select> </select>
......
...@@ -5,6 +5,7 @@ import com.yeejoin.amos.boot.module.hygf.api.config.UserLimits; ...@@ -5,6 +5,7 @@ import com.yeejoin.amos.boot.module.hygf.api.config.UserLimits;
import com.yeejoin.amos.boot.module.hygf.api.dto.JpInverterDto; import com.yeejoin.amos.boot.module.hygf.api.dto.JpInverterDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.JpInverter; import com.yeejoin.amos.boot.module.hygf.api.entity.JpInverter;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpInverterServiceImpl; import com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpInverterServiceImpl;
import org.apache.commons.lang.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -185,6 +186,11 @@ public class JpCollectorController extends BaseController { ...@@ -185,6 +186,11 @@ public class JpCollectorController extends BaseController {
Page<JpCollectorDto> page = new Page<JpCollectorDto>(); Page<JpCollectorDto> page = new Page<JpCollectorDto>();
page.setCurrent(current); page.setCurrent(current);
page.setSize(size); page.setSize(size);
if (StringUtils.isNotEmpty(jpCollectorDto.getSnCode())){
jpCollectorDto.setSnCode("%"+jpCollectorDto.getSnCode()+"%");
}
page.setTotal(jpCollectorServiceImpl.selectPageDataTota(jpCollectorDto)); page.setTotal(jpCollectorServiceImpl.selectPageDataTota(jpCollectorDto));
page.setRecords(jpCollectorServiceImpl.selectPageData(jpCollectorDto,(current-1)*size,size)); page.setRecords(jpCollectorServiceImpl.selectPageData(jpCollectorDto,(current-1)*size,size));
return ResponseHelper.buildResponse(page); return ResponseHelper.buildResponse(page);
......
...@@ -7,10 +7,13 @@ import com.alibaba.fastjson.JSON; ...@@ -7,10 +7,13 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.module.hygf.api.dto.*; import com.yeejoin.amos.boot.module.hygf.api.dto.*;
import com.yeejoin.amos.boot.module.hygf.api.entity.*; import com.yeejoin.amos.boot.module.hygf.api.entity.*;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpCollectorServiceImpl;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpStationServiceImpl; import com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpStationServiceImpl;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -60,6 +63,8 @@ public class JpInverterController extends BaseController { ...@@ -60,6 +63,8 @@ public class JpInverterController extends BaseController {
JpInverterServiceImpl jpInverterServiceImpl; JpInverterServiceImpl jpInverterServiceImpl;
@Autowired @Autowired
JpStationServiceImpl jpStationServiceImpl; JpStationServiceImpl jpStationServiceImpl;
@Autowired
JpCollectorServiceImpl jpCollectorService;
@Autowired @Autowired
JpPersonStationMapper pPersonStationMapper; JpPersonStationMapper pPersonStationMapper;
...@@ -186,6 +191,10 @@ public class JpInverterController extends BaseController { ...@@ -186,6 +191,10 @@ public class JpInverterController extends BaseController {
Page<JpInverterDtoNew> page = new Page<JpInverterDtoNew>(); Page<JpInverterDtoNew> page = new Page<JpInverterDtoNew>();
page.setCurrent(current); page.setCurrent(current);
page.setSize(size); page.setSize(size);
if (StringUtils.isNotEmpty(jpInverterDto.getSnCode())){
jpInverterDto.setSnCode("%"+jpInverterDto.getSnCode()+"%");
}
page.setTotal(jpInverterServiceImpl.selectPageDataTota(jpInverterDto)); page.setTotal(jpInverterServiceImpl.selectPageDataTota(jpInverterDto));
page.setRecords(jpInverterServiceImpl.selectPageData(jpInverterDto, (current - 1) * size, size)); page.setRecords(jpInverterServiceImpl.selectPageData(jpInverterDto, (current - 1) * size, size));
return ResponseHelper.buildResponse(page); return ResponseHelper.buildResponse(page);
...@@ -375,10 +384,7 @@ public class JpInverterController extends BaseController { ...@@ -375,10 +384,7 @@ public class JpInverterController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/snCode/{snCode}") @GetMapping(value = "/snCode/{snCode}")
@ApiOperation(httpMethod = "GET", value = "根据sequenceNbr查询单个户用光伏监盘逆变器表", notes = "根据sequenceNbr查询单个户用光伏监盘逆变器表") @ApiOperation(httpMethod = "GET", value = "根据sequenceNbr查询单个户用光伏监盘逆变器表", notes = "根据sequenceNbr查询单个户用光伏监盘逆变器表")
public ResponseModel<JpInverter> selectOneBySnCode(@PathVariable String snCode) { public ResponseModel<JpInverterDto> selectOneBySnCode(@PathVariable String snCode) {
// JpInverterDto jpInverter= jpInverterServiceImpl.queryBySeq(sequenceNbr);
LambdaQueryWrapper<JpInverter> query = new LambdaQueryWrapper<>(); LambdaQueryWrapper<JpInverter> query = new LambdaQueryWrapper<>();
query.eq(JpInverter::getSnCode,snCode); query.eq(JpInverter::getSnCode,snCode);
JpInverter jpInverter = jpInverterServiceImpl.getBaseMapper().selectOne(query); JpInverter jpInverter = jpInverterServiceImpl.getBaseMapper().selectOne(query);
...@@ -387,7 +393,18 @@ public class JpInverterController extends BaseController { ...@@ -387,7 +393,18 @@ public class JpInverterController extends BaseController {
jpInverter.setMonthPowerGeneration(jpInverter.getMonthPowerGeneration()!=null?jpInverter.getMonthPowerGeneration()/1000:0); jpInverter.setMonthPowerGeneration(jpInverter.getMonthPowerGeneration()!=null?jpInverter.getMonthPowerGeneration()/1000:0);
jpInverter.setYearPowerGeneration(jpInverter.getYearPowerGeneration()!=null?jpInverter.getYearPowerGeneration()/1000:0); jpInverter.setYearPowerGeneration(jpInverter.getYearPowerGeneration()!=null?jpInverter.getYearPowerGeneration()/1000:0);
jpInverter.setTotalPowerGeneration(jpInverter.getTotalPowerGeneration()!=null?jpInverter.getTotalPowerGeneration()/1000:0); jpInverter.setTotalPowerGeneration(jpInverter.getTotalPowerGeneration()!=null?jpInverter.getTotalPowerGeneration()/1000:0);
return ResponseHelper.buildResponse(jpInverter);
JpInverterDto jpInverterDto = new JpInverterDto();
LambdaQueryWrapper<JpCollector> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(JpCollector::getSnCode,jpInverter.getCollectorSnCode());
wrapper.eq(BaseEntity::getIsDelete, false);
List<JpCollector> jpCollector = jpCollectorService.getBaseMapper().selectList(wrapper);
BeanUtils.copyProperties(jpInverter,jpInverterDto);
jpInverterDto.setJpCollectors(jpCollector);
return ResponseHelper.buildResponse(jpInverterDto);
} }
} }
...@@ -44,23 +44,6 @@ ...@@ -44,23 +44,6 @@
] ]
}, },
{ {
"name": "直流功率",
"key": "power",
"children": [
{"name":"直流功率PV1",
"key": "power_PV1"
},
{"name":"直流功率PV2",
"key": "power_PV2"
},
{"name":"直流功率PV3",
"key": "power_PV3"
},
{"name":"直流功率PV4",
"key": "power_PV4"
}
]},
{
"name": "U_交流电压", "name": "U_交流电压",
"key": "acv1", "key": "acv1",
"unit": "V", "unit": "V",
......
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