Commit 8e7e0a00 authored by fangxinjiang's avatar fangxinjiang

社保修复的BUG

parent e7be5828
......@@ -83,6 +83,7 @@ public interface TSocialFundInfoMapper extends BaseMapper<TSocialFundInfo> {
**/
void updateFundInfo(@Param("infoVo") UpdateSocialFoundVo infoVo);
int selectSocialFoundByContract(@Param("tSocialFundInfo") TSocialFundInfo tSocialFundInfo);
String selectSocialByContract(@Param("tSocialFundInfo") TSocialFundInfo tSocialFundInfo);
String selectFundByContract(@Param("tSocialFundInfo") TSocialFundInfo tSocialFundInfo);
}
......@@ -794,7 +794,14 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
@Override
public int selectSocialFoundByContract(TSocialFundInfo sf) {
return baseMapper.selectSocialFoundByContract(sf);
String socials = baseMapper.selectSocialByContract(sf);
String funds = baseMapper.selectFundByContract(sf);
if ((Common.isEmpty(socials) && Common.isNotNull(funds) && CommonConstants.THREE_STRING.equals(funds))
|| (Common.isEmpty(funds) && Common.isNotNull(socials) && CommonConstants.THREE_STRING.equals(socials))
|| (Common.isNotNull(socials) && Common.isNotNull(funds) && CommonConstants.THREE_STRING.equals(socials) && CommonConstants.THREE_STRING.equals(funds))) {
return CommonConstants.ONE_INT;
}
return CommonConstants.ZERO_INT;
}
}
\ No newline at end of file
......@@ -1083,22 +1083,19 @@
</update>
<!--获取count,合同使用-->
<select id="selectSocialFoundByContract" resultType="java.lang.Integer">
select count(1) from
(SELECT
a.EMP_IDCARD,a.HANDLE_STATUS social_status
FROM t_social_info a
where a.EMP_IDCARD = #{tSocialFundInfo.empIdcard} and a.SETTLE_DOMAIN = #{tSocialFundInfo.settleDomain} ORDER BY a.CREATE_TIME desc limit 1) a
left join
(SELECT
a.EMP_IDCARD,a.HANDLE_STATUS fund_status
FROM t_provident_fund a
where a.EMP_IDCARD = #{tSocialFundInfo.empIdcard} and a.SETTLE_DOMAIN = #{tSocialFundInfo.settleDomain} ORDER BY a.CREATE_TIME desc limit 1) b
on a.EMP_IDCARD=b.EMP_IDCARD
where
(a.social_status='3' and b.fund_status='3' )
or (a.social_status='3' and b.fund_status is null )
or (a.social_status is null and b.fund_status ='3' )
<select id="selectSocialByContract" resultType="java.lang.String">
SELECT
HANDLE_STATUS
FROM t_social_info a
where a.EMP_IDCARD = #{tSocialFundInfo.empIdcard} and a.SETTLE_DOMAIN = #{tSocialFundInfo.settleDomain} ORDER BY a.CREATE_TIME desc limit 1
</select>
<!--获取count,合同使用-->
<select id="selectFundByContract" resultType="java.lang.String">
SELECT
HANDLE_STATUS
FROM t_provident_fund a
where a.EMP_IDCARD = #{tSocialFundInfo.empIdcard} and a.SETTLE_DOMAIN = #{tSocialFundInfo.settleDomain} ORDER BY a.CREATE_TIME desc limit 1
</select>
</mapper>
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