Commit 5c18bd22 authored by 朱晨阳's avatar 朱晨阳

电站管理列表接口修改

parent 7c4b2462
......@@ -21,7 +21,8 @@ public interface PowerStationMapper extends BaseMapper<PowerStation> {
List<PowerStationDto> queryPage(@Param("powerStationCode") String powerStationCode,
@Param("ownersName") String ownersName, @Param("serviceAgent") String serviceAgent,
@Param("regionalCompaniesName") String regionalCompaniesName, @Param("processStatus") String processStatus,
@Param("province") String province);
@Param("province") String province,
@Param("projectAddress") String projectAddress);
String getInstanceIdByhouseId(String peasantHouseholdId);
......
......@@ -61,6 +61,12 @@
<if test="powerStationCode != null and powerStationCode != ''">
AND ps.power_station_code LIKE CONCAT('%', #{powerStationCode}, '%')
</if>
<if test="projectAddress != null and projectAddress != '' and projectAddress.contains('/'.toString())">
AND ps.project_address LIKE CONCAT('%', #{projectAddress}, '%')
</if>
<if test="projectAddress != null and projectAddress != '' and !projectAddress.contains('/'.toString())">
AND REPLACE(ps.project_address, '/', '') LIKE CONCAT('%', #{projectAddress}, '%')
</if>
<if test="ownersName != null and ownersName != ''">
AND ps.owners_name LIKE CONCAT('%', #{ownersName}, '%')
</if>
......
......@@ -105,12 +105,13 @@ public class PowerStationController extends BaseController {
@RequestParam(value = "serviceAgent",required = false)String serviceAgent,
@RequestParam(value = "processStatus",required = false) String processStatus,
@RequestParam(value = "regionalCompaniesName",required = false)String regionalCompaniesName,
@RequestParam(value = "province",required = false)String province) {
@RequestParam(value = "province",required = false)String province,
@RequestParam(value = "projectAddress",required = false)String projectAddress) {
Page<PowerStationDto> page = new Page<PowerStationDto>();
page.setCurrent(current);
page.setSize(size);
AgencyUserModel userInfo = getUserInfo();
return ResponseHelper.buildResponse(powerStationServiceImpl.queryForPowerStationUserRoles(page,powerStationCode,ownersName,userInfo,serviceAgent,regionalCompaniesName,processStatus,province));
return ResponseHelper.buildResponse(powerStationServiceImpl.queryForPowerStationUserRoles(page,powerStationCode,ownersName,userInfo,serviceAgent,regionalCompaniesName,processStatus,province, projectAddress));
}
/**
......
......@@ -98,7 +98,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
private RedisLockUtil redisLockUtil;
public Page<PowerStationDto> queryForPowerStationUserRoles(Page<PowerStationDto> page, String powerStationCode,
String ownersName, AgencyUserModel userInfo, String serviceAgent, String regionalCompaniesName, String processStatus,String province) {
String ownersName, AgencyUserModel userInfo, String serviceAgent, String regionalCompaniesName, String processStatus,String province, String projectAddress) {
// Map<Long, List<RoleModel>> orgRoles = userInfo.getOrgRoles();
// Collection<List<RoleModel>> roleModels = orgRoles.values();
// if(roleModels !=null){
......@@ -124,7 +124,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
// this.queryForPowerStationPage(page,powerStationCode,ownersName,serviceAgent);
Page<PowerStationDto> powerStationDtoPage = this.queryPage((int) page.getCurrent(), (int) page.getSize(), powerStationCode, ownersName,
serviceAgent, regionalCompaniesName, processStatus,province);
serviceAgent, regionalCompaniesName, processStatus,province, projectAddress);
// if(powerStationDtoPage.getRecords() != null && powerStationDtoPage.getRecords().size() > 0) {
// powerStationDtoPage.getRecords().forEach(e -> {
......@@ -170,10 +170,10 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
// 查询电站审核记录
public Page<PowerStationDto> queryPage(int current, int size, String powerStationCode, String ownersName,
String serviceAgent,String regionalCompaniesName,String processStatus,String province) {
String serviceAgent,String regionalCompaniesName,String processStatus,String province,String projectAddress) {
PageHelper.startPage(current, size);
List<PowerStationDto> list = powerStationMapper.queryPage(powerStationCode, ownersName, serviceAgent,regionalCompaniesName,processStatus,province);
List<PowerStationDto> list = powerStationMapper.queryPage(powerStationCode, ownersName, serviceAgent,regionalCompaniesName,processStatus,province, projectAddress);
PageInfo<PowerStationDto> pages = new PageInfo(list);
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