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 lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
/** /**
@ -32,5 +31,10 @@ public class PowerAxisStructLeaderFormDTO implements Serializable {
*/ */
private String leaderName; 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.setAgencyId(staffInfo.getAgencyId());
} }
} }
formDto.setCustomerId(tokenDto.getCustomerId());
return new Result().ok(powerAxisStructService.selectAllForTree(formDto)); 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_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' left join pli_power_axis_tag t on s.CATEGORY_CODE = t.CATEGORY_CODE and t.DEL_FLAG = '0'
where s.DEL_FLAG = '0' where s.DEL_FLAG = '0'
<if test="agencyId != null and agencyId != ''"> and s.CUSTOMER_ID = #{customerId}
and s.AGENCY_ID = #{agencyId} <if test="agencyId != null and agencyId != ''">
</if> and s.AGENCY_ID = #{agencyId}
<if test="axisName != null and axisName != ''"> </if>
and s.NAME like '%${axisName}%' <if test="axisName != null and axisName != ''">
</if> and s.NAME like '%${axisName}%'
<if test="leaderName != null and leaderName != ''"> </if>
and l.NAME like '%${leaderName}%' <if test="leaderName != null and leaderName != ''">
</if> and l.NAME like '%${leaderName}%'
</if>
order by s.sort,s.CREATED_TIME,l.CREATED_TIME order by s.sort,s.CREATED_TIME,l.CREATED_TIME
</select> </select>

Loading…
Cancel
Save