Commit cc40bdb8 authored by huyuchen's avatar huyuchen

花名册修改

parent b54ed2c1
...@@ -1216,18 +1216,33 @@ ...@@ -1216,18 +1216,33 @@
<!--tDispatchInfo 社保花名册派单数据count--> <!--tDispatchInfo 社保花名册派单数据count-->
<select id="getSocialDisRecordCount" resultType="java.lang.Integer"> <select id="getSocialDisRecordCount" resultType="java.lang.Integer">
SELECT SELECT count(1) from (
count(1) SELECT 1
FROM t_dispatch_info a FROM t_dispatch_info a
<where> <where>
<include refid="where_getSocialDisRecord"/> <include refid="where_getSocialDisRecord"/>
</where> </where>
group by a.EMP_IDCARD) h
</select> </select>
<!--tDispatchInfo 社保医疗花名册派单数据--> <!--tDispatchInfo 社保医疗花名册派单数据-->
<select id="getSocialDisRecord" resultMap="socialDisExportMap"> <select id="getSocialDisRecord" resultMap="socialDisExportMap">
SELECT SELECT
(@i :=@i+1) as NUM, (@i :=@i+1) as NUM,
h.EMP_NAME,
h.IDCARD_TYPE,
h.EMP_IDCARD,
h.DIS_MONTH,
h.MEDICAL_CARDINAL,
h.CHANGE_TYPE_ONE,
h.CHANGE_TYPE_TWO,
h.CHANGE_TYPE_THREE,
h.CHANGE_TYPE_FOUR,
h.EMP_MOBILE,
h.EDUCATION_NAME,
h.REMARK
from (
select
a.EMP_NAME, a.EMP_NAME,
'身份证' as IDCARD_TYPE, '身份证' as IDCARD_TYPE,
a.EMP_IDCARD, a.EMP_IDCARD,
...@@ -1242,16 +1257,30 @@ ...@@ -1242,16 +1257,30 @@
a.EMP_MOBILE as REMARK a.EMP_MOBILE as REMARK
FROM t_dispatch_info a FROM t_dispatch_info a
left join t_social_info s on s.id=a.SOCIAL_ID left join t_social_info s on s.id=a.SOCIAL_ID
,(select @i:=0) as itable
<where> <where>
<include refid="where_getSocialDisRecord"/> <include refid="where_getSocialDisRecord"/>
</where> </where>
group by a.EMP_IDCARD) h,(select @i:=0) as itable
</select> </select>
<!--tDispatchInfo 社保医疗花名册派单数据--> <!--tDispatchInfo 社保医疗花名册派单数据-->
<select id="getSocialReduceDisRecord" resultMap="socialDisExportMap"> <select id="getSocialReduceDisRecord" resultMap="socialDisExportMap">
SELECT SELECT
(@i :=@i+1) as NUM, (@i :=@i+1) as NUM,
h.EMP_NAME,
h.IDCARD_TYPE,
h.EMP_IDCARD,
h.DIS_MONTH,
h.MEDICAL_CARDINAL,
h.CHANGE_TYPE_ONE,
h.CHANGE_TYPE_TWO,
h.CHANGE_TYPE_THREE,
h.CHANGE_TYPE_FOUR,
h.EMP_MOBILE,
h.EDUCATION_NAME,
h.REMARK
from (
select
a.EMP_NAME, a.EMP_NAME,
'身份证' as IDCARD_TYPE, '身份证' as IDCARD_TYPE,
a.EMP_IDCARD, a.EMP_IDCARD,
...@@ -1266,25 +1295,47 @@ ...@@ -1266,25 +1295,47 @@
a.EMP_MOBILE as REMARK a.EMP_MOBILE as REMARK
FROM t_dispatch_info a FROM t_dispatch_info a
left join t_social_info s on s.id=a.SOCIAL_ID left join t_social_info s on s.id=a.SOCIAL_ID
,(select @i:=0) as itable
<where> <where>
<include refid="where_getSocialDisRecord"/> <include refid="where_getSocialDisRecord"/>
</where> </where>
group by a.EMP_IDCARD) h,(select @i:=0) as itable
</select> </select>
<!--tDispatchInfo 社保养老花名册派单数据--> <!--tDispatchInfo 社保养老花名册派单数据-->
<select id="getSocialPersionDisCount" resultType="java.lang.Integer"> <select id="getSocialPersionDisCount" resultType="java.lang.Integer">
SELECT count(1) SELECT count(1) from (
select 1
FROM t_dispatch_info a FROM t_dispatch_info a
<where> <where>
<include refid="where_getSocialPersionDisRecord"/> <include refid="where_getSocialPersionDisRecord"/>
</where> </where>
group by a.EMP_IDCARD) h
</select> </select>
<!--tDispatchInfo 社保养老花名册派单数据--> <!--tDispatchInfo 社保养老花名册派单数据-->
<select id="getSocialPersionDisRecord" resultMap="socialPersionDisExportMap"> <select id="getSocialPersionDisRecord" resultMap="socialPersionDisExportMap">
SELECT SELECT
(@i :=@i+1) as num, (@i :=@i+1) as num,
h.EMP_NAME,
h.EMP_NO,
h.EMP_IDCARD,
h.sex,
h.EMP_NATIONAL,
h.WORK_DATE,
h.type,
h.SIGNLE_TYPE,
h.INSURANCE_TYPE_ONE,
h.INSURANCE_TYPE_TWO,
h.INSURANCE_TYPE_THREE,
h.INSURANCE_TYPE_FOUR,
h.INSURANCE_TYPE_FIVE,
h.PERSION_CARDINAL,
h.MEDICAL_CARDINAL,
h.DATE_ONE,
h.CONTRACT_ADRESS,
h.REMARK
FROM (
SELECT
a.EMP_NAME, a.EMP_NAME,
'' as EMP_NO, '' as EMP_NO,
a.EMP_IDCARD, a.EMP_IDCARD,
...@@ -1322,25 +1373,52 @@ ...@@ -1322,25 +1373,52 @@
a.EMP_MOBILE as REMARK a.EMP_MOBILE as REMARK
FROM t_dispatch_info a FROM t_dispatch_info a
left join t_social_info s on s.id=a.SOCIAL_ID left join t_social_info s on s.id=a.SOCIAL_ID
,(select @i:=0) as itable
<where> <where>
<include refid="where_getSocialPersionDisRecord"/> <include refid="where_getSocialPersionDisRecord"/>
</where> </where>
group by a.EMP_IDCARD)h,(select @i:=0) as itable
</select> </select>
<!--tDispatchInfo 社保养老花名册派单数据--> <!--tDispatchInfo 社保养老花名册派单数据-->
<select id="getSocialPersionReduceDisCount" resultType="java.lang.Integer"> <select id="getSocialPersionReduceDisCount" resultType="java.lang.Integer">
SELECT count(1) SELECT count(1) from (
SELECT 1
FROM t_dispatch_info a FROM t_dispatch_info a
<where> <where>
<include refid="where_getSocialPersionDisRecord"/> <include refid="where_getSocialPersionDisRecord"/>
</where> </where>
group by a.EMP_IDCARD) h
</select> </select>
<!--tDispatchInfo 社保养老花名册派单数据--> <!--tDispatchInfo 社保养老花名册派单数据-->
<select id="getSocialPersionReduceDisRecord" resultMap="socialPersionReduceDisExportMap"> <select id="getSocialPersionReduceDisRecord" resultMap="socialPersionReduceDisExportMap">
SELECT SELECT
(@i :=@i+1) as num, (@i :=@i+1) as num,
h.EMP_NO,
h.EMP_NAME,
h.EMP_IDCARD,
h.WORK_DATE,
h.typeA,
h.typeB,
h.typeC,
h.typeD,
h.typeE,
h.typeW,
h.typeF,
h.typeG,
h.typeH,
h.typeZ,
h.typeJ,
h.typeK,
h.typeL,
h.typeM,
h.typeN,
h.typeO,
h.typeP,
h.typeQ,
h.REMARK
FROM (
SELECT
'' as EMP_NO, '' as EMP_NO,
a.EMP_NAME, a.EMP_NAME,
a.EMP_IDCARD, a.EMP_IDCARD,
...@@ -1366,10 +1444,10 @@ ...@@ -1366,10 +1444,10 @@
a.EMP_MOBILE as REMARK a.EMP_MOBILE as REMARK
FROM t_dispatch_info a FROM t_dispatch_info a
left join t_social_info s on s.id=a.SOCIAL_ID left join t_social_info s on s.id=a.SOCIAL_ID
,(select @i:=0) as itable
<where> <where>
<include refid="where_getSocialPersionDisRecord"/> <include refid="where_getSocialPersionDisRecord"/>
</where> </where>
group by a.EMP_IDCARD) h,(select @i:=0) as itable
</select> </select>
<!--tDispatchInfo 公积金变更清册查询--> <!--tDispatchInfo 公积金变更清册查询-->
...@@ -1812,8 +1890,8 @@ ...@@ -1812,8 +1890,8 @@
<sql id="where_getSocialPersionDisRecord"> <sql id="where_getSocialPersionDisRecord">
a.DELETE_FLAG = 0 a.DELETE_FLAG = 0
AND a.social_id is not null AND a.social_id is not null
AND a.STATUS = "2" AND a.STATUS in ('2','4')
AND (a.DISPATCH_ITEM like concat('%','工伤','%') or a.DISPATCH_ITEM like concat('%','养老','%')) AND (a.DISPATCH_ITEM like concat('%','工伤','%') or a.DISPATCH_ITEM like concat('%','养老','%') or a.DISPATCH_ITEM like concat('%','失业','%'))
<if test="tDispatchInfo != null"> <if test="tDispatchInfo != null">
<if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''"> <if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''">
AND a.SOCIAL_HOUSEHOLD_NAME = #{tDispatchInfo.socialHouseholdName} AND a.SOCIAL_HOUSEHOLD_NAME = #{tDispatchInfo.socialHouseholdName}
...@@ -1824,9 +1902,12 @@ ...@@ -1824,9 +1902,12 @@
<if test="tDispatchInfo.disMonth != null and tDispatchInfo.disMonth.trim() != ''"> <if test="tDispatchInfo.disMonth != null and tDispatchInfo.disMonth.trim() != ''">
AND replace(DATE_FORMAT(a.CREATE_TIME,"%Y-%m"),'-','') = #{tDispatchInfo.disMonth} AND replace(DATE_FORMAT(a.CREATE_TIME,"%Y-%m"),'-','') = #{tDispatchInfo.disMonth}
</if> </if>
<if test="tDispatchInfo.socialHandleStatus != null and tDispatchInfo.socialHandleStatus.trim() != ''"> <if test="tDispatchInfo.socialHandleStatus != null and tDispatchInfo.socialHandleStatus.trim() != '' and tDispatchInfo.socialHandleStatus != 1">
AND a.SOCIAL_HANDLE_STATUS = #{tDispatchInfo.socialHandleStatus} AND a.SOCIAL_HANDLE_STATUS = #{tDispatchInfo.socialHandleStatus}
</if> </if>
<if test="tDispatchInfo.socialHandleStatus != null and tDispatchInfo.socialHandleStatus.trim() != '' and tDispatchInfo.socialHandleStatus == 1">
AND a.SOCIAL_HANDLE_STATUS in ('1','3')
</if>
<if test="tDispatchInfo.authSql != null and tDispatchInfo.authSql.trim() != ''"> <if test="tDispatchInfo.authSql != null and tDispatchInfo.authSql.trim() != ''">
${tDispatchInfo.authSql} ${tDispatchInfo.authSql}
</if> </if>
......
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