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