Commit ca1ccb4e authored by chenzhao's avatar chenzhao

修改 分页

parent bb7bfcad
......@@ -20,9 +20,9 @@ public interface JpCollectorMapper extends BaseMapper<JpCollector> {
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);
@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);
}
......@@ -22,10 +22,10 @@ public interface JpInverterMapper extends BaseMapper<JpInverter> {
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")
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);
}
......@@ -60,7 +60,7 @@ public interface JpStationMapper extends BaseMapper<JpStation> {
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")
List<JpStationDto> queryForDealerReviewPagenew(@Param("dto") JpStationDto reviewDto, Page<JpStationDto> pa);
List<JpStationDto> queryForDealerReviewPagenew(@Param("dto") JpStationDto reviewDto);
List<DropDown> getDealerNew(@Param("regionalCompaniesSeq") String regionalCompaniesSeq);
}
......@@ -76,9 +76,7 @@
from
hygf_jp_inverter hjc
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 != ''">
AND hjc.sn_code like #{dto.snCode}
</if>
......@@ -98,8 +96,6 @@
from
hygf_jp_inverter hjc
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>
<if test="dto.snCode != null and dto.snCode != ''">
......
......@@ -163,9 +163,7 @@
select
*
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>
is_delete=0
<if test="dto.name!=null">
and hygf_jp_station.name like concat(concat("%",#{dto.name}),"%")
......@@ -583,8 +581,6 @@
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
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>
<if test="dto.name!=null">
and hygf_jp_station.name like concat(concat("%",#{dto.name}),"%")
......
......@@ -70,8 +70,8 @@ public class MysqlServerConfig {
bean.setPlugins(new Interceptor[] {interceptor,
paginationInterceptor(),
userEmpowerInterceptor()
userEmpowerInterceptor(),
paginationInterceptor()
});
return bean.getObject();
}
......
......@@ -86,20 +86,16 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
*/
public Page<JpStationDto> queryForJpStationPagenew(int pageNum, int pageSize, JpStationDto reviewDto) {
Page<JpStationDto> page = new Page<>(pageNum, pageSize);
List<JpStationDto> list = jpStationMapper.queryForDealerReviewPagenew(reviewDto, page );
page.setRecords(list);
// PageInfo<JpStationDto> page = new PageInfo(list);
Page<JpStationDto> pageNew = new Page<>(pageNum, pageSize);
// com.baomidou.mybatisplus.extension.plugins.pagination.Page<JpStationDto> pagenew = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<JpStationDto>();
// pagenew.setCurrent(pageNum);
// pagenew.setTotal(page.getTotal());
// pagenew.setSize(pageSize);
// pagenew.setRecords(page.getList());
return page;
PageHelper.startPage(pageNum, pageSize);
List<JpStationDto> list = jpStationMapper.queryForDealerReviewPagenew(reviewDto);
PageInfo<JpStationDto> page = new PageInfo(list);
pageNew.setCurrent(pageNum);
pageNew.setTotal(page.getTotal());
pageNew.setSize(pageSize);
pageNew.setRecords(page.getList());
return pageNew;
}
@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