|
|
@ -27,22 +27,41 @@ |
|
|
|
<result property="updatedBy" column="UPDATED_BY"/> |
|
|
|
<result property="updatedTime" column="UPDATED_TIME"/> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<select id="selectGridOperatorInfoPageFromPc" resultType="com.elink.esua.epdc.dto.consult.GridOperatorInfoDTO"> |
|
|
|
select * from epdc_grid_operator_info t |
|
|
|
where DEL_FLAG = '0' |
|
|
|
<if test="streetId != null and streetId != ''"> |
|
|
|
AND (find_in_set(#{streetId},PARENT_DEPT_IDS) |
|
|
|
OR find_in_set(#{streetId},ALL_DEPT_IDS)) |
|
|
|
</if> |
|
|
|
<if test="communityId != null and communityId != ''"> |
|
|
|
AND (find_in_set(#{communityId},PARENT_DEPT_IDS) |
|
|
|
OR find_in_set(#{communityId},ALL_DEPT_IDS)) |
|
|
|
</if> |
|
|
|
<if test="gridId != null and gridId != ''"> |
|
|
|
AND (find_in_set(#{gridId},PARENT_DEPT_IDS) |
|
|
|
OR find_in_set(#{gridId},ALL_DEPT_IDS)) |
|
|
|
</if> |
|
|
|
ORDER BY |
|
|
|
CREATED_TIME DESC |
|
|
|
</select> |
|
|
|
<select id="selectListGridOperator" resultType="com.elink.esua.epdc.dto.consult.result.GridOperatorListResultDTO"> |
|
|
|
SELECT |
|
|
|
*,ec.DUTY_CATEGORY_NAME |
|
|
|
*,ec.DUTY_CATEGORY_NAME |
|
|
|
FROM |
|
|
|
epdc_grid_operator_info ei |
|
|
|
epdc_grid_operator_info ei |
|
|
|
LEFT JOIN epdc_grid_operator_duty_category ec ON ec.ID = ei.DUTY_CATEGORY_ID |
|
|
|
AND ec.DEL_FLAG = '0' |
|
|
|
WHERE |
|
|
|
ei.DEL_FLAG = '0' |
|
|
|
ei.DEL_FLAG = '0' |
|
|
|
<if test="timestamp != null and timestamp != ''"> |
|
|
|
AND DATE_FORMAT( ei.CREATED_TIME, '%Y-%m-%d %H:%i:%s' ) <= #{timestamp} |
|
|
|
</if> |
|
|
|
AND ei.DEPT_ID = #{deptId} |
|
|
|
ORDER BY |
|
|
|
ei.CREATED_TIME DESC |
|
|
|
LIMIT #{pageIndex}, #{pageSize} |
|
|
|
ei.CREATED_TIME DESC |
|
|
|
LIMIT #{pageIndex}, #{pageSize} |
|
|
|
</select> |
|
|
|
|
|
|
|
</mapper> |