Browse Source

修改查询条件

dev_power_axis
YUJT 3 years ago
parent
commit
6820d80040
  1. 37
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerKernelHouseholdDao.xml

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

@ -22,19 +22,15 @@
<select id="getTotal" resultType="java.lang.Long"> <select id="getTotal" resultType="java.lang.Long">
SELECT SELECT
count(*) count(distinct k.HOUSE_ID)
FROM FROM
pli_power_kernel_household k pli_power_kernel_household k
LEFT JOIN LEFT JOIN
pli_power_axis_struct s pli_power_axis_struct s ON s.id = k.STRUCT_REFERENCE_ID AND s.DEL_FLAG = '0'
ON
s.id = k.STRUCT_REFERENCE_ID
WHERE WHERE
s.DEL_FLAG = '0' k.DEL_FLAG = '0'
AND k.DEL_FLAG = '0'
AND k.CUSTOMER_ID = #{customerId} AND k.CUSTOMER_ID = #{customerId}
AND (s.pids LIKE '%${axisStructId}%' AND (s.pids LIKE '%${axisStructId}%' OR s.id = #{axisStructId})
OR s.id = #{axisStructId})
</select> </select>
<select id="getListPosition" <select id="getListPosition"
resultType="com.epmet.plugin.power.dto.axis.result.PowerKernelListPostitionResultDTO"> resultType="com.epmet.plugin.power.dto.axis.result.PowerKernelListPostitionResultDTO">
@ -73,26 +69,19 @@
k.ADDRESS, k.ADDRESS,
m.KERNEL_MEMBER_ID, m.KERNEL_MEMBER_ID,
m.KERNEL_MEMBER_NAME, m.KERNEL_MEMBER_NAME,
concat_ws(',',m.KERNEL_MEMBER_NAME) as kernelMemberNameConcat concat_ws( ',', m.KERNEL_MEMBER_NAME ) AS kernelMemberNameConcat
FROM FROM
pli_power_kernel_household k pli_power_kernel_household k
LEFT JOIN LEFT JOIN pli_power_axis_struct s ON s.id = k.STRUCT_REFERENCE_ID
pli_power_axis_struct s AND s.DEL_FLAG = '0'
ON LEFT JOIN pli_power_kernel_member m ON k.HOUSE_ID = m.HOUSE_ID
s.id = k.STRUCT_REFERENCE_ID
LEFT JOIN
pli_power_kernel_member m
ON
k.HOUSE_ID = m.HOUSE_ID
WHERE
s.DEL_FLAG = '0'
AND k.DEL_FLAG = '0'
AND m.DEL_FLAG = '0' AND m.DEL_FLAG = '0'
WHERE
k.DEL_FLAG = '0'
AND k.CUSTOMER_ID = #{customerId} AND k.CUSTOMER_ID = #{customerId}
AND (s.pids LIKE '%${axisStructId}%' AND (s.pids LIKE '%${axisStructId}%' OR s.id = #{axisStructId})
OR s.id = #{axisStructId}) GROUP BY k.HOUSE_ID
GROUP BY k.id ORDER BY k.CREATED_TIME,s.SORT
ORDER BY s.SORT
limit #{pageNo},#{pageSize} limit #{pageNo},#{pageSize}
</select> </select>
<select id="queryHouseIdList" resultType="java.lang.String"> <select id="queryHouseIdList" resultType="java.lang.String">

Loading…
Cancel
Save