Commit 3dcd8bbd authored by tangwei's avatar tangwei

解决冲突

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