Commit b1cb7cf8 authored by 朱晨阳's avatar 朱晨阳

注释无用代码

parent 47b18e62
......@@ -69,16 +69,16 @@ public interface JpStationMapper extends BaseMapper<JpStation> {
List<DropDown> getDealerNew(@Param("regionalCompaniesSeq") String regionalCompaniesSeq);
@UserEmpower(field ={"ORG_CODE"} ,dealerField ={"ORG_CODE"}, fieldConditions ={"in","in"} ,relationship="and",specific=false)
List<PowerStationStatistics> getRegionPage(String regionName);
// @UserEmpower(field ={"ORG_CODE"} ,dealerField ={"ORG_CODE"}, fieldConditions ={"in","in"} ,relationship="and",specific=false)
// List<PowerStationStatistics> getRegionPage(String regionName);
@UserEmpower(field ={"hjs.regional_companies_code"},dealerField ={"hjs.amos_company_code","hjs.regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and")
PowerStationStatistics getRegionStatistics(@Param("regionCode") String regionCode,@Param("code") String code);
// @UserEmpower(field ={"hjs.regional_companies_code"},dealerField ={"hjs.amos_company_code","hjs.regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and")
// 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_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")
List<Map<String,Object>> selectStateCount(String regionalCompaniesCode, String amosCompanyCode, String type);
......
......@@ -36,9 +36,9 @@ public interface IJpStationService {
Map<String, List<Object>> getPowerqxnew(String date, JpStationDto reviewDto);
com.baomidou.mybatisplus.extension.plugins.pagination.Page<PowerStationStatistics> getRegionStatistics(Integer current, Integer size, String regionName);
// com.baomidou.mybatisplus.extension.plugins.pagination.Page<PowerStationStatistics> getRegionStatistics(Integer current, Integer size, String regionName);
com.baomidou.mybatisplus.extension.plugins.pagination.Page<PowerStationStatistics> getDealerStatistics(Integer current, Integer size, String regionalCompaniesCode, String dealerName);
// com.baomidou.mybatisplus.extension.plugins.pagination.Page<PowerStationStatistics> getDealerStatistics(Integer current, Integer size, String regionalCompaniesCode, String dealerName);
......
......@@ -651,51 +651,51 @@
<!-- ========电站监控区域=======-->
<select id="getRegionPage" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationStatistics">
SELECT privilege_company.ORG_CODE code ,
privilege_company.COMPANY_NAME name
FROM privilege_company
<where>
IS_DELETED=0 and privilege_company.COMPANY_TYPE = 'region'
<if test="regionName != null and regionName !=''">
and privilege_company.COMPANY_NAME like concat("%",#{regionName},"%")
</if>
</where>
</select>
<!-- <select id="getRegionPage" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationStatistics">-->
<!-- SELECT privilege_company.ORG_CODE code ,-->
<!-- privilege_company.COMPANY_NAME name-->
<!-- FROM privilege_company-->
<!-- <where>-->
<!-- IS_DELETED=0 and privilege_company.COMPANY_TYPE = 'region'-->
<!-- <if test="regionName != null and regionName !=''">-->
<!-- and privilege_company.COMPANY_NAME like concat("%",#{regionName},"%")-->
<!-- </if>-->
<!-- </where>-->
<!-- </select>-->
<!-- code参数为区域公司orgCode或经销商orgCode-->
<select id="getRegionStatistics" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationStatistics">
SELECT COUNT(*) AS powerStationNumber,
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 !=''">
and hjs.regional_companies_code LIKE CONCAT ('%',#{regionCode})
</if>
<if test="code != null and code !=''">
and hjs.amos_company_code LIKE CONCAT ('%',#{code})
</if>
</where>
</select>
<!-- <select id="getRegionStatistics" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationStatistics">-->
<!-- SELECT COUNT(*) AS powerStationNumber,-->
<!-- 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 !=''">-->
<!-- and hjs.regional_companies_code LIKE CONCAT ('%',#{regionCode}) -->
<!-- </if>-->
<!-- <if test="code != null and code !=''">-->
<!-- and hjs.amos_company_code LIKE CONCAT ('%',#{code})-->
<!-- </if>-->
<!-- </where>-->
<!-- </select>-->
<!-- 根据区域orgCode查询经销商-->
<select id="getDealerPage" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationStatistics">
SELECT hygf_unit_info.`name` name, hygf_unit_info.amos_company_code code, hygf_regional_companies.regional_companies_code FROM hygf_regional_companies LEFT JOIN hygf_unit_info
ON hygf_unit_info.sequence_nbr=hygf_regional_companies.unit_info_id WHERE hygf_unit_info.audit_status='2'
AND hygf_unit_info.blacklist='0' AND hygf_unit_info.is_delete='0'
<if test="regionalCompaniesCode!=null and regionalCompaniesCode!=''">
and hygf_regional_companies.regional_companies_code = #{regionalCompaniesCode}
</if>
<if test="dealerName != null and dealerName!=''">
and hygf_unit_info.`name` like concat("%",#{dealerName},"%")
</if>
and hygf_unit_info.amos_company_code is not null
</select>
<!-- <select id="getDealerPage" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationStatistics">-->
<!-- SELECT hygf_unit_info.`name` name, hygf_unit_info.amos_company_code code, hygf_regional_companies.regional_companies_code FROM hygf_regional_companies LEFT JOIN hygf_unit_info-->
<!-- ON hygf_unit_info.sequence_nbr=hygf_regional_companies.unit_info_id WHERE hygf_unit_info.audit_status='2'-->
<!-- AND hygf_unit_info.blacklist='0' AND hygf_unit_info.is_delete='0'-->
<!-- <if test="regionalCompaniesCode!=null and regionalCompaniesCode!=''">-->
<!-- and hygf_regional_companies.regional_companies_code = #{regionalCompaniesCode}-->
<!-- </if>-->
<!-- <if test="dealerName != null and dealerName!=''">-->
<!-- and hygf_unit_info.`name` like concat("%",#{dealerName},"%")-->
<!-- </if>-->
<!-- and hygf_unit_info.amos_company_code is not null-->
<!-- </select>-->
<!-- 查询所有场站-->
......
......@@ -926,57 +926,57 @@ public class JpStationServiceImpl extends BaseService<JpStationDto, JpStation, J
}
@Override
public Page<PowerStationStatistics> getRegionStatistics(Integer current, Integer size, String regionName) {
PageHelper.startPage(current, size);
List<PowerStationStatistics> regionPage = jpStationMapper.getRegionPage(regionName);
PageInfo<PowerStationStatistics> page = new PageInfo(regionPage);
Page<PowerStationStatistics> pagenew = new Page<PowerStationStatistics>();
List<PowerStationStatistics> resultPage = new ArrayList<>();
page.getList().stream().forEach(powerStationStatistics -> {
PowerStationStatistics regionStatistics = jpStationMapper.getRegionStatistics(powerStationStatistics.getCode(),null);
regionStatistics.setName(powerStationStatistics.getName());
regionStatistics.setCode(powerStationStatistics.getCode());
resultPage.add(regionStatistics);
});
pagenew.setCurrent(current);
pagenew.setTotal(page.getTotal());
pagenew.setSize(size);
pagenew.setRecords(resultPage);
return pagenew;
}
@Override
public Page<PowerStationStatistics> getDealerStatistics(Integer current, Integer size, String regionalCompaniesCode, String dealerName) {
PageHelper.startPage(current, size);
// 根据区域公司orgCode查询区域公司下自己的经销商
List<PowerStationStatistics> dealerPage = jpStationMapper.getDealerPage(regionalCompaniesCode, dealerName);
PageInfo<PowerStationStatistics> page = new PageInfo(dealerPage);
Page<PowerStationStatistics> pagenew = new Page<PowerStationStatistics>();
List<PowerStationStatistics> resultPage = new ArrayList<>();
page.getList().stream().forEach(powerStationStatistics -> {
PowerStationStatistics regionStatistics = jpStationMapper.getRegionStatistics(null,powerStationStatistics.getCode());
regionStatistics.setName(powerStationStatistics.getName());
regionStatistics.setCode(powerStationStatistics.getCode());
resultPage.add(regionStatistics);
});
pagenew.setCurrent(current);
pagenew.setTotal(page.getTotal());
pagenew.setSize(size);
pagenew.setRecords(resultPage);
return pagenew;
// @Override
// public Page<PowerStationStatistics> getRegionStatistics(Integer current, Integer size, String regionName) {
//
//
// PageHelper.startPage(current, size);
// List<PowerStationStatistics> regionPage = jpStationMapper.getRegionPage(regionName);
// PageInfo<PowerStationStatistics> page = new PageInfo(regionPage);
// Page<PowerStationStatistics> pagenew = new Page<PowerStationStatistics>();
//
// List<PowerStationStatistics> resultPage = new ArrayList<>();
// page.getList().stream().forEach(powerStationStatistics -> {
// PowerStationStatistics regionStatistics = jpStationMapper.getRegionStatistics(powerStationStatistics.getCode(),null);
// regionStatistics.setName(powerStationStatistics.getName());
// regionStatistics.setCode(powerStationStatistics.getCode());
// resultPage.add(regionStatistics);
// });
//
// pagenew.setCurrent(current);
// pagenew.setTotal(page.getTotal());
// pagenew.setSize(size);
// pagenew.setRecords(resultPage);
//
//
// return pagenew;
// }
}
// @Override
// public Page<PowerStationStatistics> getDealerStatistics(Integer current, Integer size, String regionalCompaniesCode, String dealerName) {
// PageHelper.startPage(current, size);
//// 根据区域公司orgCode查询区域公司下自己的经销商
// List<PowerStationStatistics> dealerPage = jpStationMapper.getDealerPage(regionalCompaniesCode, dealerName);
// PageInfo<PowerStationStatistics> page = new PageInfo(dealerPage);
// Page<PowerStationStatistics> pagenew = new Page<PowerStationStatistics>();
//
// List<PowerStationStatistics> resultPage = new ArrayList<>();
// page.getList().stream().forEach(powerStationStatistics -> {
// PowerStationStatistics regionStatistics = jpStationMapper.getRegionStatistics(null,powerStationStatistics.getCode());
// regionStatistics.setName(powerStationStatistics.getName());
// regionStatistics.setCode(powerStationStatistics.getCode());
// resultPage.add(regionStatistics);
// });
//
// pagenew.setCurrent(current);
// pagenew.setTotal(page.getTotal());
// pagenew.setSize(size);
// pagenew.setRecords(resultPage);
//
// return pagenew;
//
//
// }
public List<JpStationDto> queryAllPowerStation(String regionalCompaniesCode, String amosCompanyCode, String thirdStationId, String type) {
List<JpStationDto> powerStationList = jpStationMapper.queryAllPowerStation(regionalCompaniesCode, amosCompanyCode, thirdStationId, type);
......
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