Commit 649b04fe authored by hongguangwu's avatar hongguangwu

MVP1.7.5-薪资提交校验

parent 9c878f13
......@@ -70,4 +70,18 @@ public class TInsuranceUnpurchasePersonController {
menuUtil.setAuthSql(user, searchVo);
tInsuranceUnpurchasePersonService.listExport(response,searchVo);
}
/**
* @param id 明细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("/getSocialWorkInjuryHandleById")
public R<String> getSocialWorkInjuryHandleById(@RequestParam String id) {
return tInsuranceUnpurchasePersonService.getSocialWorkInjuryHandleById(id);
}
}
......@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
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.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TInsuranceUnpurchasePerson;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TInsuranceUnpurchasePersonAddVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TInsuranceUnpurchasePersonSearchVo;
......@@ -30,4 +31,13 @@ public interface TInsuranceUnpurchasePersonService extends IService<TInsuranceUn
List<TInsuranceUnpurchasePerson> getBuyList(String deptId, List<String> idCardList);
/**
* @param id 明细id
* @Description: 刷新社保状态
* @Author: hgw
* @Date: 2025/1/15 13:13
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R<String> getSocialWorkInjuryHandleById(String id);
}
......@@ -9,15 +9,19 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
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 lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.net.URLEncoder;
......@@ -32,6 +36,10 @@ import java.util.List;
@Log4j2
@Service
public class TInsuranceUnpurchasePersonServiceImpl extends ServiceImpl<TInsuranceUnpurchasePersonMapper, TInsuranceUnpurchasePerson> implements TInsuranceUnpurchasePersonService {
@Resource
private SocialDaprUtils socialDaprUtil;
/**
* 含风险项目不购买申请明细表简单分页查询
* @param tInsuranceUnpurchasePerson 含风险项目不购买申请明细表
......@@ -98,4 +106,31 @@ public class TInsuranceUnpurchasePersonServiceImpl extends ServiceImpl<TInsuranc
return baseMapper.getBuyList(deptId, idCardList);
}
/**
* @param id 明细id
* @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 R<String> getSocialWorkInjuryHandleById(String id) {
TInsuranceUnpurchasePerson person = this.getById(id);
if (person == null || Common.isEmpty(person.getEmpIdcardNo())|| Common.isEmpty(person.getEmpName())) {
return R.failed("未找到数据");
}
TInsuranceUnpurchasePersonCardVo cardVo = new TInsuranceUnpurchasePersonCardVo();
cardVo.setEmpIdcardNo(person.getEmpIdcardNo());
cardVo.setEmpName(person.getEmpName());
R<Boolean> flag = socialDaprUtil.selectExitSocialInjury(cardVo);
if (Common.isEmpty(flag) || Boolean.FALSE.equals(flag.getData())) {
person.setSocialStatus(CommonConstants.ONE_STRING);
} else {
person.setSocialStatus(CommonConstants.ZERO_STRING);
}
this.updateById(person);
return R.ok("成功");
}
}
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