Commit 064de39b authored by fangxinjiang's avatar fangxinjiang

入职确认修改社保及公积金是的时候逻辑调整-fxj

parent dcc34958
...@@ -233,8 +233,9 @@ public class TSocialFundInfoController { ...@@ -233,8 +233,9 @@ public class TSocialFundInfoController {
@Operation(summary = "通过身份证查询在途或在保的数据", description = "通过身份证查询在途或在保的数据") @Operation(summary = "通过身份证查询在途或在保的数据", description = "通过身份证查询在途或在保的数据")
@PostMapping("/selectUnSocialFundInfoByEmpIdcard" ) @PostMapping("/selectUnSocialFundInfoByEmpIdcard" )
public R<List<UnSocialFundInfoVo>> selectUnSocialFundInfoByEmpIdcard(@RequestParam String empIdcard, public R<List<UnSocialFundInfoVo>> selectUnSocialFundInfoByEmpIdcard(@RequestParam String empIdcard,
@RequestParam(required = false) String type) { @RequestParam(required = false) String type,
return R.ok(tSocialFundInfoService.selectUnSocialFundInfoByEmpIdcard(empIdcard, type)); @RequestParam(required = false) String socialPreId) {
return R.ok(tSocialFundInfoService.selectUnSocialFundInfoByEmpIdcard(empIdcard, type,socialPreId));
} }
/** /**
...@@ -246,8 +247,9 @@ public class TSocialFundInfoController { ...@@ -246,8 +247,9 @@ public class TSocialFundInfoController {
@Operation(summary = "通过身份证查询在途或在保的公积金数据", description = "通过身份证查询在途或在保的公积金数据") @Operation(summary = "通过身份证查询在途或在保的公积金数据", description = "通过身份证查询在途或在保的公积金数据")
@PostMapping("/selectUnFundInfoByEmpIdcard" ) @PostMapping("/selectUnFundInfoByEmpIdcard" )
public R<List<UnFundInfoVo>> selectUnFundInfoByEmpIdcard(@RequestParam String empIdcard, public R<List<UnFundInfoVo>> selectUnFundInfoByEmpIdcard(@RequestParam String empIdcard,
@RequestParam(required = false) String type) { @RequestParam(required = false) String type,
return R.ok(tSocialFundInfoService.selectUnFundInfoByEmpIdcard(empIdcard, type)); @RequestParam(required = false) String fundPreId) {
return R.ok(tSocialFundInfoService.selectUnFundInfoByEmpIdcard(empIdcard, type,fundPreId));
} }
......
...@@ -98,13 +98,15 @@ public interface TSocialFundInfoMapper extends BaseMapper<TSocialFundInfo> { ...@@ -98,13 +98,15 @@ public interface TSocialFundInfoMapper extends BaseMapper<TSocialFundInfo> {
**/ **/
List<String> getSocialWorkInjuryList(); List<String> getSocialWorkInjuryList();
List<UnSocialFundInfoVo> selectUnSocialFundInfoByEmpIdcard(@Param("empIdcard") String empIdcard,@Param("type") String type); List<UnSocialFundInfoVo> selectUnSocialFundInfoByEmpIdcard(@Param("empIdcard") String empIdcard,
@Param("dispatchId") String dispatchId);
long selectSocialFundInfoCountByEmpIdcard(@Param("empIdcard") String empIdcard); long selectSocialFundInfoCountByEmpIdcard(@Param("empIdcard") String empIdcard);
long selectFundCountByEmpIdcard(@Param("empIdcard") String empIdcard); long selectFundCountByEmpIdcard(@Param("empIdcard") String empIdcard);
List<UnFundInfoVo> selectUnFundInfoByEmpIdcard(@Param("empIdcard")String empIdcard,@Param("type") String type); List<UnFundInfoVo> selectUnFundInfoByEmpIdcard(@Param("empIdcard")String empIdcard,
@Param("dispatchId") String dispatchId);
// 离职待办专用,查询社保ID与状态(主要派增部分失败与成功的) // 离职待办专用,查询社保ID与状态(主要派增部分失败与成功的)
TSocialFundInfo getSocialStatus(@Param("empIdCard") String empIdCard, @Param("deptNo") String deptNo); TSocialFundInfo getSocialStatus(@Param("empIdCard") String empIdCard, @Param("deptNo") String deptNo);
......
...@@ -96,7 +96,9 @@ public interface TSocialFundInfoService extends IService<TSocialFundInfo> { ...@@ -96,7 +96,9 @@ public interface TSocialFundInfoService extends IService<TSocialFundInfo> {
SocialFundVo getSocialAndFundReduceListByEmpIdCardSet(Set<String> empIdCardSet); SocialFundVo getSocialAndFundReduceListByEmpIdCardSet(Set<String> empIdCardSet);
List<UnSocialFundInfoVo> selectUnSocialFundInfoByEmpIdcard(String empIdcard,String type); List<UnSocialFundInfoVo> selectUnSocialFundInfoByEmpIdcard(String empIdcard,String type,String socialPreId);
List<UnFundInfoVo> selectUnFundInfoByEmpIdcard(String empIdcard, String type, String fundPreId);
Boolean selectExitEmpSocail(TEmployeeAutoRegistCheckVo cardVo); Boolean selectExitEmpSocail(TEmployeeAutoRegistCheckVo cardVo);
...@@ -109,8 +111,6 @@ public interface TSocialFundInfoService extends IService<TSocialFundInfo> { ...@@ -109,8 +111,6 @@ public interface TSocialFundInfoService extends IService<TSocialFundInfo> {
**/ **/
Boolean selectExitEmpFund(TEmployeeAutoRegistCheckVo cardVo); Boolean selectExitEmpFund(TEmployeeAutoRegistCheckVo cardVo);
List<UnFundInfoVo> selectUnFundInfoByEmpIdcard(String empIdcard,String type);
/** /**
* @param paramVo * @param paramVo
* @Description: 查询正常的社保、公积金 * @Description: 查询正常的社保、公积金
......
...@@ -46,6 +46,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TInsuranceUnpurchasePersonCardVo; ...@@ -46,6 +46,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TInsuranceUnpurchasePersonCardVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
import com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants; import com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants;
import com.yifu.cloud.plus.v1.yifu.social.entity.*; import com.yifu.cloud.plus.v1.yifu.social.entity.*;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TDispatchInfoPreMapper;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialFundInfoMapper; import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialFundInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.*; import com.yifu.cloud.plus.v1.yifu.social.service.*;
import com.yifu.cloud.plus.v1.yifu.social.vo.*; import com.yifu.cloud.plus.v1.yifu.social.vo.*;
...@@ -83,6 +84,8 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe ...@@ -83,6 +84,8 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
private final SysBaseSetInfoService sysBaseSetInfoService; private final SysBaseSetInfoService sysBaseSetInfoService;
private final TSocialFundHistoryService tSocialFundHistoryService; private final TSocialFundHistoryService tSocialFundHistoryService;
private final TDispatchInfoPreMapper tDispatchInfoPreMapper;
/** /**
* 社保公积金查询表简单分页查询 * 社保公积金查询表简单分页查询
* *
...@@ -954,12 +957,28 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe ...@@ -954,12 +957,28 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
} }
@Override @Override
public List<UnSocialFundInfoVo> selectUnSocialFundInfoByEmpIdcard(String empIdcard,String type) { public List<UnSocialFundInfoVo> selectUnSocialFundInfoByEmpIdcard(String empIdcard,String type,String socialPreId) {
return baseMapper.selectUnSocialFundInfoByEmpIdcard(empIdcard, type); String dispatchId = null;
if (Common.isNotNull(socialPreId)){
TDispatchInfoPre socialPre = tDispatchInfoPreMapper.selectOne(Wrappers.<TDispatchInfoPre>query().lambda()
.eq(TDispatchInfoPre::getId, socialPreId).last(CommonConstants.LAST_ONE_SQL));
if (null != socialPre){
dispatchId = socialPre.getDispatcherId();
}
}
return baseMapper.selectUnSocialFundInfoByEmpIdcard(empIdcard, dispatchId);
} }
@Override @Override
public List<UnFundInfoVo> selectUnFundInfoByEmpIdcard(String empIdcard,String type) { public List<UnFundInfoVo> selectUnFundInfoByEmpIdcard(String empIdcard, String type, String fundPreId) {
return baseMapper.selectUnFundInfoByEmpIdcard(empIdcard, type); String dispatchId = null;
if (Common.isNotNull(fundPreId)) {
TDispatchInfoPre fundPre = tDispatchInfoPreMapper.selectOne(Wrappers.<TDispatchInfoPre>query().lambda()
.eq(TDispatchInfoPre::getId, fundPreId).last(CommonConstants.LAST_ONE_SQL));
if (null != fundPre){
dispatchId = fundPre.getDispatcherId();
}
}
return baseMapper.selectUnFundInfoByEmpIdcard(empIdcard, dispatchId);
} }
@Override @Override
public Boolean selectExitEmpSocail(TEmployeeAutoRegistCheckVo cardVo) { public Boolean selectExitEmpSocail(TEmployeeAutoRegistCheckVo cardVo) {
......
...@@ -1245,32 +1245,46 @@ ...@@ -1245,32 +1245,46 @@
<!--tSocialFundInfo简单分页查询--> <!--tSocialFundInfo简单分页查询-->
<select id="selectUnSocialFundInfoByEmpIdcard" resultMap="unSocialFundInfoMap"> <select id="selectUnSocialFundInfoByEmpIdcard" resultMap="unSocialFundInfoMap">
SELECT a.ID, SELECT a.ID,
a.SOCIAL_HOUSEHOLD_NAME, a.SOCIAL_HOUSEHOLD_NAME,
a.PAYMENT_TYPE, a.PAYMENT_TYPE,
a.SOCIAL_STATUS, a.SOCIAL_STATUS,
a.SETTLE_DOMAIN_CODE, a.SETTLE_DOMAIN_CODE,
a.SETTLE_DOMAIN_NAME, a.SETTLE_DOMAIN_NAME,
a.SOCIAL_PROVINCE, a.SOCIAL_PROVINCE,
a.SOCIAL_CITY, a.SOCIAL_CITY,
a.SOCIAL_TOWN, a.SOCIAL_TOWN,
d.CREATE_NAME as dispatchName, d.CREATE_NAME as dispatchName,
a.PENSION_START, a.PENSION_START,
a.MEDICAL_START, a.MEDICAL_START,
a.UNEMPLOY_START, a.UNEMPLOY_START,
a.WORK_INJURY_START, a.WORK_INJURY_START,
a.BIRTH_START, a.BIRTH_START,
a.BIGAILMENT_START, a.BIGAILMENT_START,
a.RECORD_BASE, a.RECORD_BASE,
a.TRUST_REMARK, a.TRUST_REMARK,
DATE_FORMAT(d.CREATE_TIME, '%Y-%m-%d %H:%i:%s') as dispatchTime DATE_FORMAT(d.CREATE_TIME, '%Y-%m-%d %H:%i:%s') as dispatchTime
FROM t_social_fund_info a FROM t_social_fund_info a
inner join t_dispatch_info d on a.EMP_IDCARD = d.EMP_IDCARD inner join
where a.EMP_IDCARD = #{empIdcard} and d.DELETE_FLAG = '0' and d.type = '0' and d.SOCIAL_ID is not null (
SELECT
t.CREATE_NAME,t.CREATE_TIME,t.EMP_IDCARD
FROM
t_dispatch_info t
WHERE
t.DELETE_FLAG = '0'
AND t.type = '0'
AND t.SOCIAL_ID IS NOT NULL
AND t.`STATUS` != '3'
<!-- 社保办理状态 0 未办理 1 全部办理成功(原-已办理) 2 全部办理失败(原-办理失败) 3 部分办理成功 4 办理中 -->
AND t.SOCIAL_HANDLE_STATUS IN ('0','1','3','4')
AND t.EMP_IDCARD =#{empIdcard}
<if test="dispatchId != null and dispatchId != ''">
AND t.id != #{dispatchId}
</if>
) d on a.EMP_IDCARD = d.EMP_IDCARD
where a.EMP_IDCARD = #{empIdcard}
<!-- 社保状态:派增(0待审核、1待办理、2办理中 3办理成功、4部分办理失败 5 办理失败 10 审核不通过)、派减(6待审核 7待办理 8办理成功 9 办理失败 11派减办理中 12 派减部分办理失败) --> <!-- 社保状态:派增(0待审核、1待办理、2办理中 3办理成功、4部分办理失败 5 办理失败 10 审核不通过)、派减(6待审核 7待办理 8办理成功 9 办理失败 11派减办理中 12 派减部分办理失败) -->
and a.social_status in ('0', '1', '2', '3', '4', '6', '7', '9', '11', '12') and a.social_status in ('0', '1', '2', '3', '4', '6', '7', '9', '11', '12')
<if test="type != null and type != '' and type == 1">
and d.create_name not like '自动化%'
</if>
group by a.ID group by a.ID
</select> </select>
<!--tSocialFundInfo简单分页查询--> <!--tSocialFundInfo简单分页查询-->
...@@ -1291,13 +1305,26 @@ ...@@ -1291,13 +1305,26 @@
a.PROVIDENT_START, a.PROVIDENT_START,
a.UNIT_PROVIDENG_CARDINAL a.UNIT_PROVIDENG_CARDINAL
FROM t_social_fund_info a FROM t_social_fund_info a
inner join t_dispatch_info d on a.EMP_IDCARD = d.EMP_IDCARD inner join (
where a.EMP_IDCARD = #{empIdcard} and d.DELETE_FLAG = '0' and d.type = '0' and d.FUND_ID is not null SELECT
t.CREATE_NAME,t.CREATE_TIME,t.EMP_IDCARD
FROM
t_dispatch_info t
WHERE
t.DELETE_FLAG = '0'
AND t.type = '0'
AND t.FUND_ID IS NOT NULL
AND t.`STATUS` != '3'
<!-- 公积金办理状态:0 未办理 1办理成功 2 办理失败 -->
AND t.FUND_HANDLE_STATUS IN ('0','1')
AND t.EMP_IDCARD =#{empIdcard}
<if test="dispatchId != null and dispatchId != ''">
AND t.id != #{dispatchId}
</if>
) d on a.EMP_IDCARD = d.EMP_IDCARD
where a.EMP_IDCARD = #{empIdcard}
<!-- 派增(0待审核、1待办理、3办理成功、4办理失败9 审核不通过)、派减(5待审核 6待办理 7 办理成功 8 办理失败 ) --> <!-- 派增(0待审核、1待办理、3办理成功、4办理失败9 审核不通过)、派减(5待审核 6待办理 7 办理成功 8 办理失败 ) -->
and a.fund_status in ('0', '1', '3', '5', '6', '8') and a.fund_status in ('0', '1', '3', '5', '6', '8')
<if test="type != null and type != '' and type == 1">
and d.create_name not like '自动化%'
</if>
group by a.ID group by a.ID
</select> </select>
<select id="selectSocialFundInfoCountByEmpIdcard" resultType="java.lang.Long"> <select id="selectSocialFundInfoCountByEmpIdcard" resultType="java.lang.Long">
......
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