Commit ac36c220 authored by wangzb's avatar wangzb

feature-wzb :bug修复

parent cac77a8a
......@@ -98,8 +98,6 @@
</sql>
<sql id="tEmployeeRetirement_where">
<if test="searchVo.empName != null and searchVo.empName.trim() != ''">
AND a.EMP_NAME like concat('%',#{searchVo.empName},'%')
</if>
......@@ -148,11 +146,69 @@
</sql>
<select id="getTEmployeeRetirementPage" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
a.ID,a.EMP_NAME,a.EMP_IDCARD,
a.EMP_PHONE,a.EMP_SEX,a.EMP_AGE,
a.EMP_NATRUE,a.FILE_PROVINCE,a.FILE_CITY,
a.FILE_TOWN,a.SOCIAL_PROVINCE,a.SOCIAL_CITY,
a.SOCIAL_TOWN,a.UNIT_NAME,
a.UNIT_NO,a.DEPT_NAME,a.DEPT_NO,a.HANDLE_FLAG,
a.CREATE_BY,a.CREATE_NAME,a.CREATE_TIME,
a.UPDATE_BY,a.UPDATE_TIME
FROM t_employee_retirement a
<where>
<include refid="tEmployeeRetirement_pageWhere"/>
</where>
LEFT JOIN t_cutsomer_data_permisson b ON b.SETTLE_DOMAIN_NO = a.DEPT_NO
WHERE
b.USER_ID = #{userId}
<if test="searchVo.empName != null and searchVo.empName.trim() != ''">
AND a.EMP_NAME like concat('%',#{searchVo.empName},'%')
</if>
<if test="searchVo.empIdcard != null and searchVo.empIdcard.trim() != ''">
AND a.EMP_IDCARD like concat('%',#{searchVo.empIdcard},'%')
</if>
<if test="searchVo.fileProvince != null">
AND a.FILE_PROVINCE = #{searchVo.fileProvince}
</if>
<if test="searchVo.fileCity != null">
AND a.FILE_CITY = #{searchVo.fileCity}
</if>
<if test="searchVo.fileTown != null">
AND a.FILE_TOWN = #{searchVo.fileTown}
</if>
<if test="searchVo.socialProvince != null">
AND a.SOCIAL_PROVINCE = #{searchVo.socialProvince}
</if>
<if test="searchVo.socialCity != null">
AND a.SOCIAL_CITY = #{searchVo.socialCity}
</if>
<if test="searchVo.socialTown != null">
AND a.SOCIAL_TOWN = #{searchVo.socialTown}
</if>
<if test="searchVo.unitName!= null">
AND a.UNIT_NAME = #{searchVo.unitName}
</if>
<if test="searchVo.unitNo!= null and searchVo.unitNo!=''" >
AND a.UNIT_NO = #{searchVo.unitNo}
</if>
<if test="searchVo.deptName!= null">
AND a.DEPT_NAME like concat('%',#{searchVo.deptName},'%')
</if>
<if test="searchVo.deptNo!= null and searchVo.deptNo!=''">
AND a.DEPT_NO =#{searchVo.deptNo}
</if>
<if test="searchVo.handleFlag!= null">
AND a.HANDLE_FLAG =#{searchVo.handleFlag}
</if>
<if test="searchVo.empTypeList != null and searchVo.empTypeList.length>0">
AND a.EMP_NATRUE IN
<foreach collection="searchVo.empTypeList" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="searchVo.idList != null and searchVo.idList.length > 0">
and a.ID in
<foreach collection="searchVo.idList" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
ORDER BY
field(a.HANDLE_FLAG,0,1) asc,
CREATE_TIME desc
......
......@@ -271,7 +271,7 @@
<include refid="Base_Column_List"/>
FROM
t_settle_domain a
LEFT JOIN t_cutsomer_data_permisson b ON b.SETTLE_DOMAIN_NO = a.DEPART_NO
LEFT JOIN t_cutsomer_data_permisson b ON b.SETTLE_DOMAIN_NO = a.DEPT_NO
WHERE
b.USER_ID = #{userId}
AND a.DELETE_FLAG = '0'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment