Commit 0e127826 authored by hongguangwu's avatar hongguangwu

MVP1.7.5-薪资提交校验

parent 55e86d63
......@@ -165,4 +165,16 @@ public class SocialDaprUtils {
public R<Boolean> selectExitSocialInjury(TInsuranceUnpurchasePersonCardVo cardVo) {
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tsocialfundinfo/inner/selectExitSocialInjury", JSON.toJSONString(cardVo), Boolean.class, SecurityConstants.FROM_IN);
}
/**
* @Description: 查询社保已购买的身份证
* @Author: hgw
* @Date: 2025/1/15 16:11
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
public R<ListStringVo> selectWorkInjuryHandleAll() {
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId()
,"/tsocialfundinfo/inner/selectWorkInjuryHandleAll", null, ListStringVo.class, SecurityConstants.FROM_IN);
}
}
......@@ -140,5 +140,16 @@ public class SalaryTask {
log.info("------------定时生成【前12月平均工资】-定时任务结束------------");
}
/**
* @Author hgw
* @Description 定时任务刷新【不购买商险申请明细】里的社保状态
* @Date 2025-1-15 16:58:10
**/
public void doSocialWorkInjuryHandleAll() {
log.info("------------定时任务刷新不购买里的社保状态-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprSalarylProperties.getAppUrl(),daprSalarylProperties.getAppId(),"/tinsuranceunpurchaseperson/inner/doSocialWorkInjuryHandleAll","", Object.class, SecurityConstants.FROM_IN);
log.info("------------定时任务刷新不购买里的社保状态-定时任务结束------------");
}
}
\ No newline at end of file
......@@ -3,7 +3,6 @@ package com.yifu.cloud.plus.v1.yifu.salary.vo;
import lombok.Data;
import java.util.List;
import java.util.Map;
/**
* @Description: list String vo
......
......@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TInsuranceUnpurchasePerson;
import com.yifu.cloud.plus.v1.yifu.salary.service.TInsuranceUnpurchasePersonService;
......@@ -84,4 +85,17 @@ public class TInsuranceUnpurchasePersonController {
return tInsuranceUnpurchasePersonService.getSocialWorkInjuryHandleById(id);
}
/**
* @Description: 定时任务刷新不购买里的社保状态
* @Author: hgw
* @Date: 2025/1/15 13:10
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation(description = "定时任务刷新不购买里的社保状态")
@PostMapping("/inner/doSocialWorkInjuryHandleAll")
@Inner
public void doSocialWorkInjuryHandleAll() {
tInsuranceUnpurchasePersonService.doSocialWorkInjuryHandleAll();
}
}
......@@ -51,4 +51,10 @@ public interface TInsuranceUnpurchasePersonMapper extends BaseMapper<TInsuranceU
List<TInsuranceUnpurchasePerson> getBuyList(@Param("deptId") String deptId, @Param("idCardList") List<String> idCardList);
List<String> getSocialBuyList();
void updateSocialStatusZero(@Param("idCardList") List<String> idCardList);
void updateSocialStatusOne(@Param("idCardList") List<String> idCardList);
}
......@@ -40,4 +40,6 @@ public interface TInsuranceUnpurchasePersonService extends IService<TInsuranceUn
**/
R<String> getSocialWorkInjuryHandleById(String id);
void doSocialWorkInjuryHandleAll();
}
......@@ -14,10 +14,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TInsuranceUnpurchasePerson;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TInsuranceUnpurchasePersonMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TInsuranceUnpurchasePersonService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TInsuranceUnpurchasePersonAddVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TInsuranceUnpurchasePersonCardVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TInsuranceUnpurchasePersonSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TInsuranceUnpurchasePersonVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.*;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
......@@ -26,7 +23,10 @@ import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 含风险项目不购买申请明细表
*
......@@ -132,5 +132,50 @@ public class TInsuranceUnpurchasePersonServiceImpl extends ServiceImpl<TInsuranc
return R.ok("成功");
}
/**
* @Description: 刷新社保状态
* @Author: hgw
* @Date: 2025/1/15 13:22
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Override
public void doSocialWorkInjuryHandleAll() {
List<String> personList = baseMapper.getSocialBuyList();
if (personList != null) {
R<ListStringVo> listVoR = socialDaprUtil.selectWorkInjuryHandleAll();
if (listVoR != null && listVoR.getData() != null
&& listVoR.getData().getListVo() != null && !listVoR.getData().getListVo().isEmpty()) {
List<String> socialList = listVoR.getData().getListVo();
Map<String, String> socialMap = new HashMap<>();
for (String s : socialList) {
socialMap.put(s, s);
}
// 更新为是在保
List<String> updateZero = new ArrayList<>();
// 更新为不在保
List<String> updateOne = new ArrayList<>();
for (String idCard : personList) {
if (socialMap.get(idCard) != null) {
updateZero.add(idCard);
} else {
updateOne.add(idCard);
}
}
if (!updateZero.isEmpty()) {
baseMapper.updateSocialStatusZero(updateZero);
}
if (!updateOne.isEmpty()) {
baseMapper.updateSocialStatusOne(updateOne);
}
// 清理信息
updateZero.clear();
updateOne.clear();
personList.clear();
socialList.clear();
socialMap.clear();
}
}
}
}
......@@ -199,4 +199,32 @@
</foreach>
</select>
<!--不购买商险-社保,薪资定时任务刷社保状态使用 hgw-->
<select id="getSocialBuyList" resultType="java.lang.String">
SELECT
EMP_IDCARD_NO
FROM t_insurance_unpurchase_person a
where STATUS = '3' AND REASON_TYPE = '1'
</select>
<!--更新是否在保为0:在保 hgw-->
<update id="updateSocialStatusZero">
update t_insurance_unpurchase_person a
set a.SOCIAL_STATUS = '0'
where STATUS = '3' AND REASON_TYPE = '1' AND EMP_IDCARD_NO in
<foreach item="idStr" index="index" collection="idCardList" open="(" separator="," close=")">
#{idStr}
</foreach>
</update>
<!--更新是否在保为1:不在保 hgw-->
<update id="updateSocialStatusOne">
update t_insurance_unpurchase_person a
set a.SOCIAL_STATUS = '1'
where STATUS = '3' AND REASON_TYPE = '1' AND EMP_IDCARD_NO in
<foreach item="idStr" index="index" collection="idCardList" open="(" separator="," close=")">
#{idStr}
</foreach>
</update>
</mapper>
......@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.vo.ListStringVo;
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.social.entity.TSocialFundInfo;
......@@ -195,4 +196,16 @@ public class TSocialFundInfoController {
return tSocialFundInfoService.selectExitSocialInjury(cardVo);
}
/**
* @Description: 获取存在的工伤社保数据
* @Author: hgw
* @Date: 2025-1-15 16:17:31
* @return:
**/
@Inner
@PostMapping("/inner/selectWorkInjuryHandleAll")
public ListStringVo selectWorkInjuryHandleAll() {
return tSocialFundInfoService.selectWorkInjuryHandleAll();
}
}
......@@ -88,4 +88,12 @@ public interface TSocialFundInfoMapper extends BaseMapper<TSocialFundInfo> {
String selectSocialByContract(@Param("tSocialFundInfo") TSocialFundInfo tSocialFundInfo);
String selectFundByContract(@Param("tSocialFundInfo") TSocialFundInfo tSocialFundInfo);
/**
* @Description: 获取在保的全量数据,定时任务处理不购买商险
* @Author: hgw
* @Date: 2025/1/15 16:24
* @return: java.util.List<java.lang.String>
**/
List<String> getSocialWorkInjuryList();
}
......@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.vo.ListStringVo;
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.social.entity.TSocialFundInfo;
......@@ -84,4 +85,12 @@ public interface TSocialFundInfoService extends IService<TSocialFundInfo> {
Boolean selectExitSocialInjury(TInsuranceUnpurchasePersonCardVo cardVo);
/**
* @Description: 获取在保的全量数据,定时任务处理不购买商险
* @Author: hgw
* @Date: 2025/1/15 16:28
* @return: com.yifu.cloud.plus.v1.yifu.salary.vo.ListStringVo
**/
ListStringVo selectWorkInjuryHandleAll();
}
......@@ -38,6 +38,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.salary.vo.ListStringVo;
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.social.constants.SocialConstants;
......@@ -918,4 +919,18 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
.last(CommonConstants.LAST_ONE_SQL));
return null != socialFundInfo;
}
/**
* @Description: 获取在保的全量数据,定时任务处理不购买商险
* @Author: hgw
* @Date: 2025/1/15 16:28
* @return: com.yifu.cloud.plus.v1.yifu.salary.vo.ListStringVo
**/
@Override
public ListStringVo selectWorkInjuryHandleAll() {
ListStringVo vo = new ListStringVo();
List<String> socialList = baseMapper.getSocialWorkInjuryList();
vo.setListVo(socialList);
return vo;
}
}
\ No newline at end of file
......@@ -1195,4 +1195,9 @@
where a.EMP_IDCARD = #{tSocialFundInfo.empIdcard} and a.SETTLE_DOMAIN = #{tSocialFundInfo.settleDomain} ORDER BY a.CREATE_TIME desc limit 1
</select>
<!-- 获取在保的全量数据,定时任务处理不购买商险 -->
<select id="getSocialWorkInjuryList" resultType="java.lang.String">
SELECT EMP_IDCARD FROM t_social_fund_info s where s.WORK_INJURY_HANDLE in ('0','1','4','5')
</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