Commit ca1ccb4e authored by chenzhao's avatar chenzhao

修改 分页

parent bb7bfcad
...@@ -20,9 +20,9 @@ public interface JpCollectorMapper extends BaseMapper<JpCollector> { ...@@ -20,9 +20,9 @@ public interface JpCollectorMapper extends BaseMapper<JpCollector> {
List<Map<String,Object>> queryCollectorCountStatus(@Param("dto") JpStationDto reviewDto); List<Map<String,Object>> queryCollectorCountStatus(@Param("dto") JpStationDto reviewDto);
@UserEmpower(field ={"sta.regional_companies_code"} ,dealerField = {"regional_companies_code","amos_company_code"},fieldConditions ={"in","in"} ,relationship="and") @UserEmpower(field ={"sta.regional_companies_code"} ,dealerField = {"sta.amos_company_code","sta.regional_companies_code"},fieldConditions ={"in","in"} ,relationship="and")
List<JpCollectorDto> selectPageData(@Param("dto") JpCollectorDto reviewDto, Integer current, Integer size); List<JpCollectorDto> selectPageData(@Param("dto") JpCollectorDto reviewDto, Integer current, Integer size);
@UserEmpower(field ={"sta.regional_companies_code"} ,dealerField = {"regional_companies_code","amos_company_code"},fieldConditions ={"in","in"} ,relationship="and") @UserEmpower(field ={"sta.regional_companies_code"} ,dealerField = {"sta.amos_company_code","sta.regional_companies_code"},fieldConditions ={"in","in"} ,relationship="and")
int selectPageDataTota(@Param("dto") JpCollectorDto reviewDto); int selectPageDataTota(@Param("dto") JpCollectorDto reviewDto);
} }
...@@ -22,10 +22,10 @@ public interface JpInverterMapper extends BaseMapper<JpInverter> { ...@@ -22,10 +22,10 @@ public interface JpInverterMapper extends BaseMapper<JpInverter> {
List<Map<String,Object>> queryInverterCountStatus(@Param("dto") JpStationDto reviewDto); List<Map<String,Object>> queryInverterCountStatus(@Param("dto") JpStationDto reviewDto);
@UserEmpower(field ={"sta.regional_companies_code"} ,dealerField={"sta.amos_company_code","sta.regional_companies_code","php.developer_user_id"} ,fieldConditions ={"in","in","in"} ,relationship="and") @UserEmpower(field ={"sta.regional_companies_code"} ,dealerField={"sta.amos_company_code","sta.regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and")
// @DealerRestrict(field ={"amos_company_code","regional_companies_code","developer_user_id"},fieldConditions ={"in","in","in"} ,relationship="and") // @DealerRestrict(field ={"amos_company_code","regional_companies_code","developer_user_id"},fieldConditions ={"in","in","in"} ,relationship="and")
List<JpInverterDtoNew> selectPageData(@Param("dto") JpInverterDto reviewDto, int current, int size); List<JpInverterDtoNew> selectPageData(@Param("dto") JpInverterDto reviewDto, int current, int size);
@UserEmpower(field ={"sta.regional_companies_code"} ,dealerField={"sta.amos_company_code","sta.regional_companies_code","php.developer_user_id"} ,fieldConditions ={"in","in","in"} ,relationship="and") @UserEmpower(field ={"sta.regional_companies_code"} ,dealerField={"sta.amos_company_code","sta.regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and")
int selectPageDataTotal(@Param("dto") JpInverterDto reviewDto); int selectPageDataTotal(@Param("dto") JpInverterDto reviewDto);
} }
...@@ -60,7 +60,7 @@ public interface JpStationMapper extends BaseMapper<JpStation> { ...@@ -60,7 +60,7 @@ public interface JpStationMapper extends BaseMapper<JpStation> {
Map<String,Object> getcount( @Param("dto") JpStationDto reviewDto); Map<String,Object> getcount( @Param("dto") JpStationDto reviewDto);
@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") @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<JpStationDto> queryForDealerReviewPagenew(@Param("dto") JpStationDto reviewDto, Page<JpStationDto> pa); List<JpStationDto> queryForDealerReviewPagenew(@Param("dto") JpStationDto reviewDto);
List<DropDown> getDealerNew(@Param("regionalCompaniesSeq") String regionalCompaniesSeq); List<DropDown> getDealerNew(@Param("regionalCompaniesSeq") String regionalCompaniesSeq);
} }
...@@ -76,9 +76,7 @@ ...@@ -76,9 +76,7 @@
from from
hygf_jp_inverter hjc hygf_jp_inverter hjc
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
LEFT JOIN <where>
(select developer_user_id,developer_code FROM hygf_peasant_household ) php ON php.developer_code= sta.amos_company_code
<where>
<if test="dto.snCode != null and dto.snCode != ''"> <if test="dto.snCode != null and dto.snCode != ''">
AND hjc.sn_code like #{dto.snCode} AND hjc.sn_code like #{dto.snCode}
</if> </if>
...@@ -98,8 +96,6 @@ ...@@ -98,8 +96,6 @@
from from
hygf_jp_inverter hjc hygf_jp_inverter hjc
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
LEFT JOIN
(select developer_user_id,developer_code FROM hygf_peasant_household ) php ON php.developer_code= sta.amos_company_code
<where> <where>
<if test="dto.snCode != null and dto.snCode != ''"> <if test="dto.snCode != null and dto.snCode != ''">
......
...@@ -163,9 +163,7 @@ ...@@ -163,9 +163,7 @@
select select
* *
from hygf_jp_station from hygf_jp_station
LEFT JOIN <where>
(select developer_user_id,developer_code FROM hygf_peasant_household ) php ON php.developer_code= hygf_jp_station.amos_company_code
<where>
is_delete=0 is_delete=0
<if test="dto.name!=null"> <if test="dto.name!=null">
and hygf_jp_station.name like concat(concat("%",#{dto.name}),"%") and hygf_jp_station.name like concat(concat("%",#{dto.name}),"%")
...@@ -583,8 +581,6 @@ ...@@ -583,8 +581,6 @@
ROUND(`day_generate`/capacity,3) fullhour, ROUND(`day_generate`/capacity,3) fullhour,
(select privilege_company.COMPANY_NAME from privilege_company where privilege_company.ORG_CODE=hygf_jp_station.regional_companies_code) regionalCompaniesName (select privilege_company.COMPANY_NAME from privilege_company where privilege_company.ORG_CODE=hygf_jp_station.regional_companies_code) regionalCompaniesName
from hygf_jp_station from hygf_jp_station
LEFT JOIN
(select developer_user_id,developer_code FROM hygf_peasant_household ) php ON php.developer_code= hygf_jp_station.amos_company_code
<where> <where>
<if test="dto.name!=null"> <if test="dto.name!=null">
and hygf_jp_station.name like concat(concat("%",#{dto.name}),"%") and hygf_jp_station.name like concat(concat("%",#{dto.name}),"%")
......
...@@ -70,8 +70,8 @@ public class MysqlServerConfig { ...@@ -70,8 +70,8 @@ public class MysqlServerConfig {
bean.setPlugins(new Interceptor[] {interceptor, bean.setPlugins(new Interceptor[] {interceptor,
paginationInterceptor(), userEmpowerInterceptor(),
userEmpowerInterceptor() paginationInterceptor()
}); });
return bean.getObject(); return bean.getObject();
} }
......
...@@ -86,20 +86,16 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS ...@@ -86,20 +86,16 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
*/ */
public Page<JpStationDto> queryForJpStationPagenew(int pageNum, int pageSize, JpStationDto reviewDto) { public Page<JpStationDto> queryForJpStationPagenew(int pageNum, int pageSize, JpStationDto reviewDto) {
Page<JpStationDto> pageNew = new Page<>(pageNum, pageSize);
Page<JpStationDto> page = new Page<>(pageNum, pageSize);
List<JpStationDto> list = jpStationMapper.queryForDealerReviewPagenew(reviewDto, page );
page.setRecords(list);
// PageInfo<JpStationDto> page = new PageInfo(list);
// com.baomidou.mybatisplus.extension.plugins.pagination.Page<JpStationDto> pagenew = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<JpStationDto>(); // com.baomidou.mybatisplus.extension.plugins.pagination.Page<JpStationDto> pagenew = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<JpStationDto>();
// pagenew.setCurrent(pageNum); PageHelper.startPage(pageNum, pageSize);
// pagenew.setTotal(page.getTotal()); List<JpStationDto> list = jpStationMapper.queryForDealerReviewPagenew(reviewDto);
// pagenew.setSize(pageSize); PageInfo<JpStationDto> page = new PageInfo(list);
// pagenew.setRecords(page.getList()); pageNew.setCurrent(pageNum);
return page; pageNew.setTotal(page.getTotal());
pageNew.setSize(pageSize);
pageNew.setRecords(page.getList());
return pageNew;
} }
@Override @Override
......
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