Commit 720b4f69 authored by 朱晨阳's avatar 朱晨阳

修改电站监控区域公司/经销商列表数据错误问题

parent 567b5c0d
......@@ -19,5 +19,6 @@ public class PowerStationStatistics {
private Double totalCapacity; // 装机容量
private Double totalDayGenerate; // 日发电量
private Double totalRatedPower; // 额定功率
private Double totalRealTimePower; // 功率
private Double totalDayIncome; // 日收益
}
......@@ -76,6 +76,7 @@ public interface JpStationMapper extends BaseMapper<JpStation> {
PowerStationStatistics getRegionStatistics(@Param("regionCode") String regionCode,@Param("code") String code);
@UserEmpower(field ={"hygf_regional_companies.regional_companies_code"},dealerField ={"hygf_unit_info.amos_company_code","hygf_regional_companies.regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and")
List<PowerStationStatistics> getDealerPage(String regionalCompaniesCode, String dealerName);
@UserEmpower(field ={"hygf_jp_station.regional_companies_code"},dealerField ={"hygf_jp_station.amos_company_code","hygf_jp_station.regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and")
......
......@@ -659,10 +659,11 @@
<!-- code参数为区域公司orgCode或经销商orgCode-->
<select id="getRegionStatistics" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationStatistics">
SELECT COUNT(*) AS powerStationNumber,
ROUND(SUM(capacity), 2) AS totalCapacity,
ROUND(SUM(day_generate), 2) AS totalDayGenerate,
ROUND(SUM(rated_power), 2) AS totalRatedPower,
ROUND(SUM(day_income), 2) AS totalDayIncome
ROUND(SUM(capacity)/1000, 3) AS totalCapacity,
ROUND(SUM(day_generate)/1000, 3) AS totalDayGenerate,
ROUND(SUM(rated_power), 3) AS totalRatedPower,
ROUND(SUM(real_time_power), 3) AS totalRealTimePower,
ROUND(SUM(day_income), 3) AS totalDayIncome
FROM hygf_jp_station hjs
<where>
<if test="regionCode != null and regionCode !=''">
......
......@@ -955,7 +955,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto, JpStation, J
@Override
public Page<PowerStationStatistics> getDealerStatistics(Integer current, Integer size, String regionalCompaniesCode, String dealerName) {
PageHelper.startPage(current, size);
// 根据区域公司orgCode查询区域公司下所有的经销商
// 根据区域公司orgCode查询区域公司下自己的经销商
List<PowerStationStatistics> dealerPage = jpStationMapper.getDealerPage(regionalCompaniesCode, dealerName);
PageInfo<PowerStationStatistics> page = new PageInfo(dealerPage);
Page<PowerStationStatistics> pagenew = new Page<PowerStationStatistics>();
......
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