Browse Source

列表查询添加客户id筛选

dev_zufangUpdate
Jackwang 3 years ago
parent
commit
3dccab567f
  1. 6
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisStructLeaderFormDTO.java
  2. 1
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisStructController.java
  3. 19
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml

6
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisStructLeaderFormDTO.java

@ -3,7 +3,6 @@ package com.epmet.plugin.power.dto.axis.form;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
@ -32,5 +31,10 @@ public class PowerAxisStructLeaderFormDTO implements Serializable {
*/
private String leaderName;
/**
* 客户id
*/
private String customerId;
}

1
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisStructController.java

@ -108,6 +108,7 @@ public class PowerAxisStructController {
formDto.setAgencyId(staffInfo.getAgencyId());
}
}
formDto.setCustomerId(tokenDto.getCustomerId());
return new Result().ok(powerAxisStructService.selectAllForTree(formDto));
}

19
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml

@ -51,15 +51,16 @@
left join pli_power_axis_leader l on l.ID = sl.LEADER_ID and l.del_flag = '0'
left join pli_power_axis_tag t on s.CATEGORY_CODE = t.CATEGORY_CODE and t.DEL_FLAG = '0'
where s.DEL_FLAG = '0'
<if test="agencyId != null and agencyId != ''">
and s.AGENCY_ID = #{agencyId}
</if>
<if test="axisName != null and axisName != ''">
and s.NAME like '%${axisName}%'
</if>
<if test="leaderName != null and leaderName != ''">
and l.NAME like '%${leaderName}%'
</if>
and s.CUSTOMER_ID = #{customerId}
<if test="agencyId != null and agencyId != ''">
and s.AGENCY_ID = #{agencyId}
</if>
<if test="axisName != null and axisName != ''">
and s.NAME like '%${axisName}%'
</if>
<if test="leaderName != null and leaderName != ''">
and l.NAME like '%${leaderName}%'
</if>
order by s.sort,s.CREATED_TIME,l.CREATED_TIME
</select>

Loading…
Cancel
Save