|
@@ -52,6 +52,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="perFlag" column="perFlag"/>
|
|
|
<result property="jsSfkn" column="jsSfkn"/>
|
|
|
<result property="perYm" column="per_ym"/>
|
|
|
+ <result property="jdId" column="jd_id"/>
|
|
|
+ <result property="sqId" column="sq_id"/>
|
|
|
+ <result property="wgId" column="wg_id"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<resultMap type="ZhsqPerson" id="ZhsqPersonResult">
|
|
@@ -102,6 +105,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="perFlag" column="perFlag"/>
|
|
|
<result property="jsSfkn" column="jsSfkn"/>
|
|
|
<result property="perYm" column="per_ym"/>
|
|
|
+ <result property="jdId" column="jd_id"/>
|
|
|
+ <result property="sqId" column="sq_id"/>
|
|
|
+ <result property="wgId" column="wg_id"/>
|
|
|
<association property="zhsqFangjian" column="fj_id" javaType="ZhsqFangjian" resultMap="ZhsqFangjianResult" />
|
|
|
<association property="zhsqPerCanji" column="per_id" javaType="ZhsqPerCanji" resultMap="ZhsqPerCanjiResult" />
|
|
|
<association property="zhsqPerJunren" column="per_id" javaType="ZhsqPerJunren" resultMap="ZhsqPerJunrenResult" />
|
|
@@ -406,6 +412,42 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
left join zhsq_per_liudong on zhsq_person.per_id = zhsq_per_liudong.per_id
|
|
|
</sql>
|
|
|
|
|
|
+ <select id="selectZhsqPersonListForKsh" parameterType="ZhsqPerson" resultMap="ZhsqPersonResultNoAssociation">
|
|
|
+ SELECT
|
|
|
+ zhsq_person.per_id,
|
|
|
+ zhsq_person.fj_id,
|
|
|
+ per_name,
|
|
|
+ per_sex,
|
|
|
+ per_nation,
|
|
|
+ per_age,
|
|
|
+ per_fzgx,
|
|
|
+ per_sfkg,
|
|
|
+ per_hzgx,
|
|
|
+ per_tsrq
|
|
|
+ FROM
|
|
|
+ zhsq_person
|
|
|
+ WHERE
|
|
|
+ zhsq_person.del_flag = '0'
|
|
|
+ <if test="tsrqId != null and tsrqId != ''"> and zhsq_person.per_id in (select per_id from zhsq_person_tsrq where tsrq_id in (${tsrqId}))</if>
|
|
|
+ <if test="parentId != null "> and sys_dept.parent_id = #{parentId}</if>
|
|
|
+ <if test="perName != null and perName != ''"> and per_name like concat('%', #{perName}, '%')</if>
|
|
|
+ <if test="perAge != null and perAge != ''"> and per_age = #{perAge}</if>
|
|
|
+ <if test="perIdcard != null and perIdcard != ''"> and per_idcard like concat('%', #{perIdcard}, '%')</if>
|
|
|
+ <if test="perTel != null and perTel != ''"> and per_tel = #{perTel}</if>
|
|
|
+ <if test="perZzmm != null and perZzmm != ''"> and per_zzmm = #{perZzmm}</if>
|
|
|
+ <if test="perDegree != null and perDegree != ''"> and per_degree = #{perDegree}</if>
|
|
|
+ <if test="perFzgx != null and perFzgx != ''"> and per_fzgx = #{perFzgx}</if>
|
|
|
+ <if test="perSfkg != null and perSfkg != ''"> and per_sfkg = #{perSfkg}</if>
|
|
|
+ <if test="perHzgx != null and perHzgx != ''"> and per_hzgx = #{perHzgx}</if>
|
|
|
+ <if test="perHj != null and perHj != ''"> and per_hj = #{perHj}</if>
|
|
|
+ <if test="perDw != null and perDw != ''"> and per_dw = #{perDw}</if>
|
|
|
+ <if test="perYqtx != null and perYqtx != ''"> and per_yqtx = #{perYqtx}</if>
|
|
|
+ <if test="perZjcs != null and perZjcs != ''"> and per_zjcs = #{perZjcs}</if>
|
|
|
+ <if test="perRddb != null and perRddb != ''"> and per_rddb = #{perRddb}</if>
|
|
|
+ <if test="perLdsx != null and perLdsx != ''"> and per_ldsx = #{perLdsx}</if>
|
|
|
+ <if test="perDelState != null and perDelState != ''"> and per_del_state = #{perDelState}</if>
|
|
|
+ group by zhsq_person.per_id
|
|
|
+ </select>
|
|
|
<select id="selectZhsqPersonList" parameterType="ZhsqPerson" resultMap="ZhsqPersonResultNoAssociation">
|
|
|
<include refid="selectZhsqPersonVoNoAssociation"/>
|
|
|
where zhsq_person.del_flag = '0'
|
|
@@ -750,7 +792,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
<if test="updateUser != null">update_user,</if>
|
|
|
<if test="perDelState != null">per_del_state,</if>
|
|
|
- </trim>
|
|
|
+ <if test="jdId != null">jd_id,</if>
|
|
|
+ <if test="sqId != null">sq_id,</if>
|
|
|
+ <if test="wgId != null">wg_id,</if>
|
|
|
+ </trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="fjId != null">#{fjId},</if>
|
|
|
<if test="perName != null">#{perName},</if>
|
|
@@ -771,14 +816,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="perZjcs != null">#{perZjcs},</if>
|
|
|
<if test="perRddb != null">#{perRddb},</if>
|
|
|
<if test="perLdsx != null">#{perLdsx},</if>
|
|
|
- <if test="delFlag != null">#{delFlag},</if>
|
|
|
+ <if test="delFlag != null">'0',</if>
|
|
|
<if test="createId != null">#{createId},</if>
|
|
|
<if test="createUser != null">#{createUser},</if>
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
<if test="updateId != null">#{updateId},</if>
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
<if test="updateUser != null">#{updateUser},</if>
|
|
|
- <if test="perDelState != null">#{perDelState},</if>
|
|
|
+ <if test="perDelState != null">'1',</if>
|
|
|
+ <if test="jdId != null">#{jdId},</if>
|
|
|
+ <if test="sqId != null">#{sqId},</if>
|
|
|
+ <if test="wgId != null">#{wgId},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
@@ -922,7 +970,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
select fj.wg_id as dataId,fj.wg_name as dataName,count(fj.wg_id)as perCou
|
|
|
from zhsq_person per,zhsq_fangjian fj
|
|
|
where per.fj_id = fj.fj_id and fj.del_flag = 0 and per.del_flag = 0 and per.per_del_state=1 and per.per_sfkg = 1
|
|
|
- AND wg_id = #{zhsqFangjian.wgId}
|
|
|
+ AND fj.wg_id = #{zhsqFangjian.wgId}
|
|
|
group by (fj.wg_id);
|
|
|
</if>
|
|
|
|
|
@@ -978,7 +1026,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
LEFT JOIN zhsq_fangjian fj
|
|
|
on per.fj_id = fj.fj_id
|
|
|
where fj.del_flag = 0 and per.del_flag = 0 and per.per_del_state = 1
|
|
|
- fj.wg_id = #{zhsqFangjian.wgId}
|
|
|
+ and fj.wg_id = #{zhsqFangjian.wgId}
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
@@ -1008,7 +1056,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
select b.dict_label as per_yqtx,count(a.per_id) as perCou from zhsq_person a,sys_dict_data b,zhsq_fangjian fj
|
|
|
where a.fj_id = fj.fj_id and a.per_del_state=1
|
|
|
and fj.del_flag = 0 and a.del_flag = 0
|
|
|
- and wg_id = #{zhsqFangjian.wgId}
|
|
|
+ and fj.wg_id = #{zhsqFangjian.wgId}
|
|
|
and a.per_yqtx=b.dict_value and b.dict_type='yes_no'
|
|
|
group by b.dict_label
|
|
|
</if>
|
|
@@ -1055,7 +1103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
WHERE
|
|
|
per.fj_id = fj.fj_id AND per.per_id = pert.per_id AND fj.del_flag = 0
|
|
|
AND per.del_flag = 0 AND per.per_del_state = 1 AND pert.tsrq_id = 8
|
|
|
- AND wg_id = #{zhsqFangjian.wgId}
|
|
|
+ AND fj.wg_id = #{zhsqFangjian.wgId}
|
|
|
GROUP BY (fj.wg_id);
|
|
|
</if>
|
|
|
</select>
|
|
@@ -1142,7 +1190,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
FROM zhsq_person per,zhsq_fangjian fj
|
|
|
WHERE per.fj_id = fj.fj_id
|
|
|
AND fj.del_flag = 0 AND per.del_flag = 0 AND per.per_del_state = 1 AND substring(now(), 1, 4) - substring(per_idcard, 7, 4) >=60
|
|
|
- AND wg_id = #{zhsqFangjian.wgId}
|
|
|
+ AND fj.wg_id = #{zhsqFangjian.wgId}
|
|
|
GROUP BY fj.wg_id
|
|
|
</if>
|
|
|
</select>
|