|
|
@ -55,22 +55,12 @@ |
|
|
|
customer_id = #{customerId} |
|
|
|
limit #{limit} |
|
|
|
</select> |
|
|
|
<select id="getListTotal" resultType="java.lang.Long"> |
|
|
|
SELECT |
|
|
|
count(*) |
|
|
|
FROM |
|
|
|
pli_power_axis_struct AS s |
|
|
|
LEFT JOIN pli_power_kernel_household h ON s.id = h.STRUCT_REFERENCE_ID |
|
|
|
WHERE |
|
|
|
s.DEL_FLAG = '0' |
|
|
|
AND h.DEL_FLAG = '0' AND h.CUSTOMER_ID = #{customerId} |
|
|
|
and s.pids LIKE '%${axisStructId}%' |
|
|
|
</select> |
|
|
|
|
|
|
|
<resultMap id="ListOfKernelMember" type="com.epmet.plugin.power.dto.axis.result.PowerKernelHouseHoldViewListResultDTO"> |
|
|
|
<result property="ownerName" column="OWNER_NAME" /> |
|
|
|
<result property="houseId" column="HOUSE_ID" /> |
|
|
|
<result property="address" column="ADDRESS" /> |
|
|
|
<result property="kernelMemberNameConcat" column="KERNEL_MEMBER_NAME" /> |
|
|
|
<result property="kernelMemberNameConcat" column="kernelMemberNameConcat" /> |
|
|
|
<collection property="kernelMemberList" ofType="com.epmet.plugin.power.dto.axis.result.PowerkernelMemberListResultDTO"> |
|
|
|
<result property="kernelMemberId" column="KERNEL_MEMBER_ID" /> |
|
|
|
<result property="kernelMemberName" column="KERNEL_MEMBER_NAME" /> |
|
|
@ -163,7 +153,7 @@ |
|
|
|
<result property="kernelMemberId" column="KERNEL_MEMBER_ID" /> |
|
|
|
<result property="kernelMemberName" column="KERNEL_MEMBER_NAME" /> |
|
|
|
</collection> |
|
|
|
<result property="kernelMemberNameConcat" column="KERNEL_MEMBER_NAME" /> |
|
|
|
<result property="kernelMemberNameConcat" column="kernelMemberNameConcat" /> |
|
|
|
<result property="houseId" column="HOUSE_ID" /> |
|
|
|
<result property="address" column="ADDRESS" /> |
|
|
|
</resultMap> |
|
|
@ -182,29 +172,18 @@ |
|
|
|
h.ADDRESS |
|
|
|
FROM |
|
|
|
pli_power_kernel_household h |
|
|
|
LEFT JOIN pli_power_kernel_member m ON h.HOUSE_ID = m.HOUSE_ID |
|
|
|
LEFT JOIN pli_power_kernel_member m ON h.HOUSE_ID = m.HOUSE_ID AND m.DEL_FLAG = '0' |
|
|
|
WHERE |
|
|
|
h.STRUCT_REFERENCE_ID = #{axisStructId} |
|
|
|
AND KERNEL_MEMBER_NAME LIKE '%${kernelMemberName}%' |
|
|
|
h.DEL_FLAG = '0' |
|
|
|
<if test="axisStructId != null and axisStructId != ''"> |
|
|
|
AND h.STRUCT_REFERENCE_ID = #{axisStructId} |
|
|
|
</if> |
|
|
|
<if test="kernelMemberName != null and kernelMemberName != ''"> |
|
|
|
AND KERNEL_MEMBER_NAME LIKE '%${kernelMemberName}%' |
|
|
|
</if> |
|
|
|
AND CUSTOMER_ID = #{customerId} |
|
|
|
AND h.DEL_FLAG = '0' |
|
|
|
AND m.DEL_FLAG = '0' |
|
|
|
ORDER BY |
|
|
|
h.CREATED_TIME |
|
|
|
LIMIT #{page},#{limit} |
|
|
|
</select> |
|
|
|
<select id="getPageTotal" resultType="java.lang.Long"> |
|
|
|
SELECT |
|
|
|
count(*) |
|
|
|
FROM |
|
|
|
pli_power_kernel_household h |
|
|
|
LEFT JOIN pli_power_kernel_member m ON h.HOUSE_ID = m.HOUSE_ID |
|
|
|
WHERE |
|
|
|
h.STRUCT_REFERENCE_ID = #{axisStructId} |
|
|
|
AND KERNEL_MEMBER_NAME LIKE '%${kernelMemberName}%' |
|
|
|
AND h.DEL_FLAG = '0' |
|
|
|
AND m.DEL_FLAG = '0' |
|
|
|
LIMIT #{page},#{limit} |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|