Commit 41b5f3ba authored by wujiang's avatar wujiang

添加电站过滤

parent cc46a3c6
...@@ -32,6 +32,9 @@ public class PowerStationDto extends BaseDto { ...@@ -32,6 +32,9 @@ public class PowerStationDto extends BaseDto {
@ApiModelProperty(value = "服务代理商") @ApiModelProperty(value = "服务代理商")
private String serviceAgent; private String serviceAgent;
@ApiModelProperty(value = "区域公司")
private String regionalCompaniesName;
@ApiModelProperty(value = "电站类型") @ApiModelProperty(value = "电站类型")
private String powerStationType; private String powerStationType;
......
...@@ -19,5 +19,6 @@ public interface PowerStationMapper extends BaseMapper<PowerStation> { ...@@ -19,5 +19,6 @@ public interface PowerStationMapper extends BaseMapper<PowerStation> {
@UserEmpower(field ={"regional_companies_code"} ,dealerField={"a.developer_code","a.regional_companies_code","a.developer_user_id"} ,fieldConditions ={"in","in","in"}, relationship="and") @UserEmpower(field ={"regional_companies_code"} ,dealerField={"a.developer_code","a.regional_companies_code","a.developer_user_id"} ,fieldConditions ={"in","in","in"}, relationship="and")
List<PowerStationDto> queryPage(@Param("powerStationCode") String powerStationCode, List<PowerStationDto> queryPage(@Param("powerStationCode") String powerStationCode,
@Param("ownersName")String ownersName, @Param("ownersName")String ownersName,
@Param("serviceAgent")String serviceAgent); @Param("serviceAgent")String serviceAgent,
@Param("regionalCompaniesName")String regionalCompaniesName);
} }
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
b.initiate_status, b.initiate_status,
b.contract_lock_id, b.contract_lock_id,
hygf_peasant_household.regional_companies_code, hygf_peasant_household.regional_companies_code,
hygf_peasant_household.regional_companies_name,
hygf_peasant_household.developer_code, hygf_peasant_household.developer_code,
hygf_peasant_household.developer_user_id hygf_peasant_household.developer_user_id
from hygf_power_station LEFT JOIN ( select peasant_household_id,initiate_status, contract_lock_id from hygf_household_contract where hygf_household_contract.status !='已作废' from hygf_power_station LEFT JOIN ( select peasant_household_id,initiate_status, contract_lock_id from hygf_household_contract where hygf_household_contract.status !='已作废'
...@@ -21,7 +22,10 @@ ...@@ -21,7 +22,10 @@
and hygf_power_station.owners_name like concat(concat("%",#{ownersName}),"%") and hygf_power_station.owners_name like concat(concat("%",#{ownersName}),"%")
</if> </if>
<if test="serviceAgent!=null and serviceAgent!=''"> <if test="serviceAgent!=null and serviceAgent!=''">
and hygf_power_station.service_agent=#{serviceAgent} and hygf_power_station.service_agent like concat(concat("%",#{serviceAgent}),"%")
</if>
<if test="regionalCompaniesName!=null and regionalCompaniesName!=''">
and hygf_peasant_household.regional_companies_name like concat(concat("%",#{regionalCompaniesName}),"%")
</if> </if>
ORDER BY hygf_power_station.rec_date desc ORDER BY hygf_power_station.rec_date desc
) a ) a
......
...@@ -100,12 +100,14 @@ public class PowerStationController extends BaseController { ...@@ -100,12 +100,14 @@ public class PowerStationController extends BaseController {
public ResponseModel<Page<PowerStationDto>> queryForPage(@RequestParam(value = "current") int current, public ResponseModel<Page<PowerStationDto>> queryForPage(@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size, @RequestParam(value = "size") int size,
@RequestParam(value = "powerStationCode",required = false)String powerStationCode, @RequestParam(value = "powerStationCode",required = false)String powerStationCode,
@RequestParam(value = "ownersName",required = false)String ownersName) { @RequestParam(value = "ownersName",required = false)String ownersName,
@RequestParam(value = "serviceAgent",required = false)String serviceAgent,
@RequestParam(value = "regionalCompaniesName",required = false)String regionalCompaniesName) {
Page<PowerStationDto> page = new Page<PowerStationDto>(); Page<PowerStationDto> page = new Page<PowerStationDto>();
page.setCurrent(current); page.setCurrent(current);
page.setSize(size); page.setSize(size);
AgencyUserModel userInfo = getUserInfo(); AgencyUserModel userInfo = getUserInfo();
return ResponseHelper.buildResponse(powerStationServiceImpl.queryForPowerStationUserRoles(page,powerStationCode,ownersName,userInfo)); return ResponseHelper.buildResponse(powerStationServiceImpl.queryForPowerStationUserRoles(page,powerStationCode,ownersName,userInfo,serviceAgent,regionalCompaniesName));
} }
/** /**
......
...@@ -84,8 +84,8 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS ...@@ -84,8 +84,8 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
@Autowired @Autowired
WorkflowImpl workflow; WorkflowImpl workflow;
public Page<PowerStationDto> queryForPowerStationUserRoles(Page<PowerStationDto> page, String powerStationCode, String ownersName, AgencyUserModel userInfo){ public Page<PowerStationDto> queryForPowerStationUserRoles(Page<PowerStationDto> page, String powerStationCode,
String serviceAgent =null; String ownersName, AgencyUserModel userInfo, String serviceAgent, String regionalCompaniesName) {
// Map<Long, List<RoleModel>> orgRoles = userInfo.getOrgRoles(); // Map<Long, List<RoleModel>> orgRoles = userInfo.getOrgRoles();
// Collection<List<RoleModel>> roleModels = orgRoles.values(); // Collection<List<RoleModel>> roleModels = orgRoles.values();
// if(roleModels !=null){ // if(roleModels !=null){
...@@ -107,18 +107,18 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS ...@@ -107,18 +107,18 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
// serviceAgent=userUnitInformationDto.getAmosDealerName(); // serviceAgent=userUnitInformationDto.getAmosDealerName();
// } // }
//return this.queryForPowerStationPage(page,powerStationCode,ownersName,serviceAgent); // return
return this.queryPage((int) page.getCurrent(), (int) page.getSize(),powerStationCode,ownersName,serviceAgent); // this.queryForPowerStationPage(page,powerStationCode,ownersName,serviceAgent);
} return this.queryPage((int) page.getCurrent(), (int) page.getSize(), powerStationCode, ownersName,
serviceAgent,regionalCompaniesName);
//查询电站审核记录 }
public Page<PowerStationDto> queryPage(int current, int size,
String powerStationCode,
String ownersName,String serviceAgent) {
PageHelper.startPage(current, size); // 查询电站审核记录
List<PowerStationDto> list= powerStationMapper.queryPage(powerStationCode,ownersName,serviceAgent); public Page<PowerStationDto> queryPage(int current, int size, String powerStationCode, String ownersName,
String serviceAgent,String regionalCompaniesName) {
PageHelper.startPage(current, size);
List<PowerStationDto> list = powerStationMapper.queryPage(powerStationCode, ownersName, serviceAgent,regionalCompaniesName);
PageInfo<PowerStationDto> pages = new PageInfo(list); PageInfo<PowerStationDto> pages = new PageInfo(list);
com.baomidou.mybatisplus.extension.plugins.pagination.Page<PowerStationDto> pagenew = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<PowerStationDto>(); com.baomidou.mybatisplus.extension.plugins.pagination.Page<PowerStationDto> pagenew = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<PowerStationDto>();
......
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