Commit ce53a2e9 authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.7.5' into MVP1.7.5

parents d4b75b36 c0d7d920
......@@ -45,6 +45,10 @@ public interface TInsuranceUnpurchaseApplyMapper extends BaseMapper<TInsuranceUn
String getMaxInusuranceDetailCode();
long selectSocialCount(@Param("deptNo") String deptNo,@Param("cardNo") String cardNo,@Param("id") String id);
long selectArchCount(@Param("deptNo") String deptNo,@Param("cardNo") String cardNo,@Param("id") String id);
/**
* 待审核分页查询
* @param page 分页信息
......
......@@ -118,6 +118,34 @@
</where>
</select>
<select id="selectSocialCount" resultType="java.lang.Long">
SELECT
count(1)
FROM t_insurance_unpurchase_apply a
inner join t_insurance_unpurchase_person b
on a.id = b.PARNET_ID
where
1=1 and a.DELETE_FLAG = '0' and a.reason_type = '1' and a.status in ('2','3')
<if test="id != null ">
AND a.id != #{id}
</if>
and a.DEPT_NO = #{deptNo} and b.EMP_IDCARD_NO = #{cardNo}
</select>
<select id="selectArchCount" resultType="java.lang.Long">
SELECT
count(1)
FROM t_insurance_unpurchase_apply a
inner join t_insurance_unpurchase_person b
on a.id = b.PARNET_ID
where
1=1 and a.DELETE_FLAG = '0' and a.reason_type = '2' and a.status in ('2','3') and b.SALARY_NUM = 0
<if test="id != null ">
AND a.id != #{id}
</if>
and a.DEPT_NO = #{deptNo} and b.EMP_IDCARD_NO = #{cardNo}
</select>
<!-- tInsuranceUnpurchaseApply简单分页查询 -->
<select id="getTInsuranceUnpurchaseApplyExportList" resultMap="tInsuranceUnpurchaseApplyExportMap">
SELECT
......@@ -126,7 +154,7 @@
a.DEPT_NO,
a.CREATE_NAME,
a.CREATE_USER_DEPT_NAME,
a.CREATE_TIME,
a.CREATE_TIME_ZC as CREATE_TIME,
a.AUDIT_USER,
if(a.REASON_TYPE = '1','已购买社保','人员已离职') REASON_TYPE,
CASE WHEN a.STATUS=0 THEN "草稿"
......
......@@ -130,7 +130,31 @@
<!--tInsuranceUnpurchasePerson简单分页查询-->
<select id="getTInsuranceUnpurchasePersonPage" resultMap="tInsuranceUnpurchasePersonMap">
SELECT
<include refid="Base_Column_List"/>
a.ID,
a.PARNET_ID,
a.EMP_NAME,
a.EMP_IDCARD_NO,
a.POST,
a.APPLY_NO_DETAIL,
a.DEPT_ID,
a.DEPT_NO,
a.DEPT_NAME,
a.CREATE_USER_DEPT_ID,
a.CREATE_USER_DEPT_NAME,
a.REASON_TYPE,
a.REASON_INFO,
a.APPLY_NO,
if(a.REASON_TYPE = '2','',a.SOCIAL_STATUS) SOCIAL_STATUS,
a.SALARY_NUM,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME,
a.HAS_CONTAIN_RISKS,
a.NEW_LINE,
a.DIVISION,
a.INSURANCE_FLAG
FROM t_insurance_unpurchase_person a
<where>
1=1 and STATUS = '3'
......@@ -162,7 +186,7 @@
EMP_NAME,
EMP_IDCARD_NO,
if(a.REASON_TYPE = '1','已购买社保','人员已离职') REASON_TYPE,
if(a.SOCIAL_STATUS='0','在保','不在保') SOCIAL_STATUS,
if(a.REASON_TYPE = '2','',if(a.SOCIAL_STATUS='0','在保','不在保')) SOCIAL_STATUS,
SALARY_NUM,
CREATE_NAME,
CREATE_TIME
......
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