Commit 9c878f13 authored by hongguangwu's avatar hongguangwu

MVP1.7.5-薪资提交校验

parent 33371d22
...@@ -59,6 +59,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee; ...@@ -59,6 +59,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import com.yifu.cloud.plus.v1.yifu.salary.vo.ExportErrorVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.ExportErrorVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.ListStringVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.ListStringVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TBankNameMapVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TBankNameMapVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmpMapVo;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
...@@ -3696,6 +3697,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -3696,6 +3697,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
String empId = null; String empId = null;
// 组装1 预入职 档案 // 组装1 预入职 档案
List<TPreEmployeeInfo> preEmployeeInfoList = new ArrayList<>(); List<TPreEmployeeInfo> preEmployeeInfoList = new ArrayList<>();
List<TPreEmployeeInfo> preEmployeeInfoNeedSalaryList = new ArrayList<>();
List<String> needSalaryList = new ArrayList<>();
List<TPreEmployeeProject> preEmployeeProjectList = new ArrayList<>(); List<TPreEmployeeProject> preEmployeeProjectList = new ArrayList<>();
List<TPreEmpBadRecord> preEmpBadRecordList = new ArrayList<>(); List<TPreEmpBadRecord> preEmpBadRecordList = new ArrayList<>();
List<TPreEmpContactInfo> preEmpContactInfoList = new ArrayList<>(); List<TPreEmpContactInfo> preEmpContactInfoList = new ArrayList<>();
...@@ -3812,7 +3815,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -3812,7 +3815,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmployeeInfo.setBankNo(info.getBankNo()); tPreEmployeeInfo.setBankNo(info.getBankNo());
tPreEmployeeInfo.setTaxMonth(info.getTaxMonthValue()); tPreEmployeeInfo.setTaxMonth(info.getTaxMonthValue());
} else { } else {
preEmployeeInfoNeedSalaryList.add(tPreEmployeeInfo);
needSalaryList.add(empIdCard);
} }
tPreEmployeeInfo.setTaxMonthFlag(CommonConstants.ONE_STRING); tPreEmployeeInfo.setTaxMonthFlag(CommonConstants.ONE_STRING);
tPreEmployeeInfo.setContactProvince(info.getContactProvinceValue()); tPreEmployeeInfo.setContactProvince(info.getContactProvinceValue());
...@@ -3997,6 +4001,36 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -3997,6 +4001,36 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
} }
if (!preEmployeeInfoList.isEmpty()) { if (!preEmployeeInfoList.isEmpty()) {
if (!preEmployeeInfoNeedSalaryList.isEmpty()) {
if (!needSalaryList.isEmpty()) {
// 查薪资服务的卡号
R<TSalaryEmpMapVo> salaryEmpBankRes = HttpDaprUtil.invokeMethodPost(salaryProperties.getAppUrl()
, salaryProperties.getAppId(), "/tsalaryemployee/inner/getSalaryEmpMap", needSalaryList, TSalaryEmpMapVo.class, SecurityConstants.FROM_IN);
Map<String, TSalaryEmployee> salaryEmpBankMap;
if (Common.isEmpty(salaryEmpBankRes) || Common.isEmpty(salaryEmpBankRes.getCode()) || salaryEmpBankRes.getCode() != CommonConstants.SUCCESS){
return R.failed("获取薪资服务开户行信息失败!");
} else {
if (salaryEmpBankRes.getData() != null && salaryEmpBankRes.getData().getSalaryEmpMap() != null
&& !salaryEmpBankRes.getData().getSalaryEmpMap().isEmpty()) {
salaryEmpBankMap = salaryEmpBankRes.getData().getSalaryEmpMap();
TSalaryEmployee info;
for (TPreEmployeeInfo emp : preEmployeeInfoNeedSalaryList) {
info = salaryEmpBankMap.get(emp.getEmpIdcard());
if (info != null) {
emp.setBankName(info.getBankName());
emp.setBankProvince(info.getBankProvince());
emp.setBankCity(info.getBankCity());
emp.setBankSubName(info.getBankSubName());
emp.setBankNo(info.getBankNo());
emp.setTaxMonth(info.getTaxMonth());
}
}
}
}
}
}
tPreEmployeeInfoService.saveBatch(preEmployeeInfoList); tPreEmployeeInfoService.saveBatch(preEmployeeInfoList);
} }
if (!preEmployeeProjectList.isEmpty()) { if (!preEmployeeProjectList.isEmpty()) {
......
...@@ -16,6 +16,8 @@ import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants; ...@@ -16,6 +16,8 @@ import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceDetailService; import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*; import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryRiskListVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptVo; import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptVo;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
...@@ -162,7 +164,7 @@ public class TInsuranceDetailController { ...@@ -162,7 +164,7 @@ public class TInsuranceDetailController {
/** /**
* 通过id删除 * 通过id删除
* *
* @author licancan * @author licancan
* @param id * @param id
* @return {@link R<String>} * @return {@link R<String>}
...@@ -811,4 +813,18 @@ public class TInsuranceDetailController { ...@@ -811,4 +813,18 @@ public class TInsuranceDetailController {
public void updateSettleStatus() { public void updateSettleStatus() {
tInsuranceDetailService.updateSettleStatus(); tInsuranceDetailService.updateSettleStatus();
} }
/**
* 重新更新结算状态同步失败的数据
*
* @author licancan
* @param
* @return void
*/
@SysLog("重新更新结算状态同步失败的数据")
@Inner
@PostMapping("/inner/getRiskByIdCard")
public SalaryRiskListVo getRiskByIdCard(@RequestBody List<TSalaryAccount> idCardList) {
return tInsuranceDetailService.getRiskByIdCard(idCardList);
}
} }
...@@ -284,6 +284,15 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> { ...@@ -284,6 +284,15 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
List<TInsuranceDetail> selectByIdCardList(@Param("idCardList") List<String> idCardList List<TInsuranceDetail> selectByIdCardList(@Param("idCardList") List<String> idCardList
, @Param("idList") List<String> idList); , @Param("idList") List<String> idList);
/**
* @param idCardList
* @Description: 根据身份证列表,查找所有商险
* @Author: hgw
* @Date: 2022/11/23 15:17
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail>
**/
List<TInsuranceDetail> selectInUseByIdCardList(@Param("idCardList") List<String> idCardList);
/** /**
* @param ids * @param ids
* @Description: 根据id查找所有商险 * @Description: 根据id查找所有商险
......
...@@ -10,6 +10,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; ...@@ -10,6 +10,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*; import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryRiskListVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptVo; import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptVo;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -540,4 +542,14 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -540,4 +542,14 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
void exportInsurancesWarn(InsuranceSearchVo vo, HttpServletResponse response, List<String> exportFields, String idstr); void exportInsurancesWarn(InsuranceSearchVo vo, HttpServletResponse response, List<String> exportFields, String idstr);
R<Object> expireRemark(TBusinessInsuranceVo vo); R<Object> expireRemark(TBusinessInsuranceVo vo);
/**
* @param idCardList 身份证
* @Description: 获取商险是否在保
* @Author: hgw
* @Date: 2025/1/14 16:00
* @return: com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryRiskListVo
**/
SalaryRiskListVo getRiskByIdCard(List<TSalaryAccount> idCardList);
} }
...@@ -42,6 +42,9 @@ import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.*; ...@@ -42,6 +42,9 @@ import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.*;
import com.yifu.cloud.plus.v1.yifu.insurances.util.BigDecimalUtils; import com.yifu.cloud.plus.v1.yifu.insurances.util.BigDecimalUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.util.*; import com.yifu.cloud.plus.v1.yifu.insurances.util.*;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*; import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryRiskListVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryRiskVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail; import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail;
import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptDetailVo; import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptVo; import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptVo;
...@@ -8195,4 +8198,43 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -8195,4 +8198,43 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
return false; return false;
} }
/**
* @param idCardList 身份证
* @Description: 获取商险是否在保
* @Author: hgw
* @Date: 2025/1/15 9:25
* @return: com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryRiskListVo
**/
@Override
public SalaryRiskListVo getRiskByIdCard(List<TSalaryAccount> idCardList) {
SalaryRiskListVo returnVo = new SalaryRiskListVo();
if (idCardList != null && !idCardList.isEmpty()) {
List<String> cardList = new ArrayList<>();
for (TSalaryAccount a : idCardList) {
cardList.add(a.getEmpIdcard());
}
List<TInsuranceDetail> detailList = baseMapper.selectInUseByIdCardList(cardList);
List<SalaryRiskVo> list = new ArrayList<>();
SalaryRiskVo riskVo;
Map<String, String> idMap = new HashMap<>();
if (detailList != null) {
for (TInsuranceDetail d : detailList) {
idMap.put(d.getEmpIdcardNo(), d.getEmpName());
}
}
for (TSalaryAccount s : idCardList) {
if (idMap.get(s.getEmpIdcard()) == null) {
riskVo = new SalaryRiskVo();
riskVo.setEmpIdCard(s.getEmpIdcard());
riskVo.setEmpName(s.getEmpName());
riskVo.setMsg("不存在商险");
list.add(riskVo);
}
}
returnVo.setList(list);
}
return returnVo;
}
} }
...@@ -1447,7 +1447,6 @@ ...@@ -1447,7 +1447,6 @@
</foreach> </foreach>
</update> </update>
<!--查询所有商险,如果idList 不为空,则不含被替换的本身。 用来改变档案状态--> <!--查询所有商险,如果idList 不为空,则不含被替换的本身。 用来改变档案状态-->
<select id="selectByIdCardList" resultMap="BaseResultMap"> <select id="selectByIdCardList" resultMap="BaseResultMap">
SELECT SELECT
...@@ -1470,6 +1469,27 @@ ...@@ -1470,6 +1469,27 @@
</if> </if>
</select> </select>
<!--查询所有在途商险,判断是否买了商险:【1待投保 2投保中】 或 【3已投保 且 有效】-->
<select id="selectInUseByIdCardList" resultMap="BaseResultMap">
SELECT
ID,
EMP_NAME,
EMP_IDCARD_NO
FROM t_insurance_detail
where DELETE_FLAG = 0
and (d.BUY_HANDLE_STATUS in (1,2) or (d.BUY_HANDLE_STATUS = 3 and d.IS_EFFECT = 0))
and d.POLICY_EFFECT <![CDATA[ <= ]]> NOW() and d.POLICY_END >= NOW()
<if test="idCardList != null and idCardList.size > 0">
AND EMP_IDCARD_NO in
<foreach item="item" index="index" collection="idCardList" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="idCardList == null">
and 1=2
</if>
</select>
<select id="selectByIds" resultMap="UpdateMap"> <select id="selectByIds" resultMap="UpdateMap">
SELECT SELECT
a.ID, a.ID,
......
package com.yifu.cloud.plus.v1.yifu.salary.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 含风险项目不购买申请明细表-与薪资关联表
*
* @author hgw
* @date 2025-1-15 11:52:24
*/
@Data
@TableName("t_insurance_unpurchase_person_salary")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "含风险项目不购买申请明细表-与薪资关联表")
public class TInsuranceUnpurchasePersonSalary extends BaseEntity {
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "id")
private String id;
@Schema(description = "父级id(明细表ID)")
private String parentId;
@Schema(description = "薪资主表ID")
private String salaryId;
@Schema(description = "薪酬单号")
private String applyNo;
@Schema(description = "薪酬月份")
private String salaryMonth;
@Schema(description = "是否未删除:0未删除;1已删除")
private Integer deleteFlag;
}
...@@ -498,6 +498,14 @@ public class TSalaryStandard extends BaseEntity { ...@@ -498,6 +498,14 @@ public class TSalaryStandard extends BaseEntity {
@ExcelProperty("是否固定列") @ExcelProperty("是否固定列")
private Integer isFixedColumn; private Integer isFixedColumn;
/**
* 是否校验商险:0未校验商险;1校验通过
*/
@ExcelAttribute(name = "是否校验商险")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否校验商险")
private Integer isCheckRisk;
/** /**
* 工资月份-起 * 工资月份-起
*/ */
......
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
/**
* @author hgw
* @description 薪资提交判断商险listVo
* @date 2025-1-14 15:54:17
*/
@Getter
@Setter
public class SalaryRiskListVo {
// list
private List<SalaryRiskVo> list;
}
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import lombok.Getter;
import lombok.Setter;
/**
* @author hgw
* @description 薪资提交判断商险Vo
* @date 2025-1-14 11:03:40
*/
@Getter
@Setter
public class SalaryRiskVo {
// 姓名
private String empName;
// 身份证
private String empIdCard;
// 信息
private String msg;
}
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import lombok.Data;
import java.util.Map;
/**
* @Description: 薪资人员map
* @Author: hgw
* @Date: 2025-1-13 17:31:10
* @return:
**/
@Data
public class TSalaryEmpMapVo {
private Map<String, TSalaryEmployee> salaryEmpMap;
}
...@@ -263,4 +263,14 @@ public class TSalaryEmployeeController { ...@@ -263,4 +263,14 @@ public class TSalaryEmployeeController {
return tSalaryEmployeeService.savePreNewEmpInfo(newEmp); return tSalaryEmployeeService.savePreNewEmpInfo(newEmp);
} }
@Operation(description = "获取薪资人员开户行等信息")
@SysLog("获取薪资人员开户行等信息")
@Inner
@PostMapping("/inner/getSalaryEmpMap")
public TSalaryEmpMapVo getSalaryEmpMap(@RequestBody List<String> empIdCardList) {
TSalaryEmpMapVo vo = new TSalaryEmpMapVo();
vo.setSalaryEmpMap(tSalaryEmployeeService.getSalaryEmpMap(empIdCardList));
return vo;
}
} }
...@@ -32,6 +32,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard; ...@@ -32,6 +32,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardService; import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardService;
import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants; import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants;
import com.yifu.cloud.plus.v1.yifu.salary.vo.AccountByEkpDiffVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.AccountByEkpDiffVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryRiskVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
...@@ -178,6 +179,37 @@ public class TSalaryStandardController { ...@@ -178,6 +179,37 @@ public class TSalaryStandardController {
return tSalaryStandardService.salaryStandardAudit(auditFlag, auditRemark, id); return tSalaryStandardService.salaryStandardAudit(auditFlag, auditRemark, id);
} }
/**
* 保存并提交
* @return
*/
@SysLog("校验商险")
@Operation(description = "校验商险")
@PostMapping("/doCheckRisk")
public R<List<SalaryRiskVo>> doCheckRisk(@RequestParam String salaryId) {
TSalaryStandard s = tSalaryStandardService.getById(salaryId);
if (s == null) {
return R.failed("未找到工资表");
} else if (s.getStatus() == SalaryConstants.STATUS[0]
|| s.getStatus() == SalaryConstants.STATUS[5]
|| s.getStatus() == SalaryConstants.STATUS[6]
|| s.getStatus() == SalaryConstants.STATUS[7]) {
// 已校验过了:
if (Common.isNotNull(s.getIsCheckRisk()) && CommonConstants.ONE_INT == s.getIsCheckRisk()) {
return R.ok();
}
YifuUser user = SecurityUtils.getUser();
if (user != null) {
// 2025-1-14 10:59:37 提交前拦截:
return tSalaryStandardService.judegRisk(s, user);
} else {
return R.failed("请登录!");
}
} else {
return R.failed("请刷新后检查薪资表状态!");
}
}
/** /**
* 保存并提交 * 保存并提交
* @return * @return
...@@ -194,8 +226,13 @@ public class TSalaryStandardController { ...@@ -194,8 +226,13 @@ public class TSalaryStandardController {
|| s.getStatus() == SalaryConstants.STATUS[5] || s.getStatus() == SalaryConstants.STATUS[5]
|| s.getStatus() == SalaryConstants.STATUS[6] || s.getStatus() == SalaryConstants.STATUS[6]
|| s.getStatus() == SalaryConstants.STATUS[7]) { || s.getStatus() == SalaryConstants.STATUS[7]) {
if (Common.isEmpty(s.getIsCheckRisk()) || CommonConstants.ZERO_INT == s.getIsCheckRisk()) {
return R.failed("请先校验商险信息!");
}
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
if (user != null) { if (user != null) {
// 添加流程进展明细 // 添加流程进展明细
tSalaryStandardService.saveRecordLog(s, user, CommonConstants.TWO_STRING, "提交,并自动生成收入"); tSalaryStandardService.saveRecordLog(s, user, CommonConstants.TWO_STRING, "提交,并自动生成收入");
tSalaryStandard.setSubmitTime(new Date()); tSalaryStandard.setSubmitTime(new Date());
......
...@@ -48,4 +48,7 @@ public interface TInsuranceUnpurchasePersonMapper extends BaseMapper<TInsuranceU ...@@ -48,4 +48,7 @@ public interface TInsuranceUnpurchasePersonMapper extends BaseMapper<TInsuranceU
* @return * @return
*/ */
List<TInsuranceUnpurchasePersonAddVo> getTInsuranceUnpurchasePersonList(@Param("id") String id); List<TInsuranceUnpurchasePersonAddVo> getTInsuranceUnpurchasePersonList(@Param("id") String id);
List<TInsuranceUnpurchasePerson> getBuyList(@Param("deptId") String deptId, @Param("idCardList") List<String> idCardList);
} }
package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TInsuranceUnpurchasePersonSalary;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 含风险项目不购买申请明细表-薪资关联表
*
* @author hgw
* @date 2025-1-15 11:54:52
*/
@Mapper
public interface TInsuranceUnpurchasePersonSalaryMapper extends BaseMapper<TInsuranceUnpurchasePersonSalary> {
/**
* 含风险项目不购买申请明细表简单分页查询-薪资关联
*
* @param tInsuranceUnpurchasePersonSalary 含风险项目不购买申请明细表-薪资关联
* @return
*/
IPage<TInsuranceUnpurchasePersonSalary> getTInsuranceUnpurchasePersonSalaryPage(Page<TInsuranceUnpurchasePersonSalary> page
, @Param("tInsuranceUnpurchasePersonSalary") TInsuranceUnpurchasePersonSalary tInsuranceUnpurchasePersonSalary);
// 删除关联项
void deletePersonSalaryBySalaryId(@Param("salaryId") String salaryId);
// 更新次数-1
void updatePersonSalaryNumBySalaryId(@Param("salaryId") String salaryId);
}
...@@ -237,4 +237,13 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> { ...@@ -237,4 +237,13 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
**/ **/
int getAccountIdByIdCard(@Param("empIdCard") String empIdCard); int getAccountIdByIdCard(@Param("empIdCard") String empIdCard);
/**
* @param salaryId 主表id
* @Description: 获取报账明细身份证
* @Author: hgw
* @Date: 2025/1/14 15:28
* @return: java.util.List<java.lang.String>
**/
List<TSalaryAccount> getIdCardListBySalaryId(@Param("salaryId") String salaryId);
} }
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.salary.entity.TInsuranceUnpurchasePersonSalary;
/**
* 含风险项目不购买申请明细表-薪资关联
*
* @author hgw
* @date 2025-1-15 12:00:57
*/
public interface TInsuranceUnpurchasePersonSalaryService extends IService<TInsuranceUnpurchasePersonSalary> {
/**
* 含风险项目不购买申请明细表简单分页查询-薪资关联
*
* @param tInsuranceUnpurchasePerson 含风险项目不购买申请明细表-薪资关联
* @return
*/
IPage<TInsuranceUnpurchasePersonSalary> getTInsuranceUnpurchasePersonSalaryPage(Page<TInsuranceUnpurchasePersonSalary> page, TInsuranceUnpurchasePersonSalary tInsuranceUnpurchasePerson);
void deletePersonSalaryBySalaryId(String salaryId);
}
...@@ -27,4 +27,7 @@ public interface TInsuranceUnpurchasePersonService extends IService<TInsuranceUn ...@@ -27,4 +27,7 @@ public interface TInsuranceUnpurchasePersonService extends IService<TInsuranceUn
void listExport(HttpServletResponse response, TInsuranceUnpurchasePersonSearchVo searchVo); void listExport(HttpServletResponse response, TInsuranceUnpurchasePersonSearchVo searchVo);
List<TInsuranceUnpurchasePersonAddVo> getTInsuranceUnpurchasePersonList(String id); List<TInsuranceUnpurchasePersonAddVo> getTInsuranceUnpurchasePersonList(String id);
List<TInsuranceUnpurchasePerson> getBuyList(String deptId, List<String> idCardList);
} }
...@@ -229,4 +229,14 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> { ...@@ -229,4 +229,14 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
List<TSalaryTypeThreeExportEkpVo> getAccountThreeListByApplyNo(String applyNo); List<TSalaryTypeThreeExportEkpVo> getAccountThreeListByApplyNo(String applyNo);
List<TSalaryTypeFourExportEkpVo> getAccountFourListByApplyNo(String applyNo); List<TSalaryTypeFourExportEkpVo> getAccountFourListByApplyNo(String applyNo);
/**
* @param salaryId 主表id
* @Description: 获取报账身份证——提交校验使用
* @Author: hgw
* @Date: 2025/1/14 15:30
* @return: java.util.List<java.lang.String>
**/
List<TSalaryAccount> getIdCardListBySalaryId(String salaryId);
} }
...@@ -160,4 +160,13 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> { ...@@ -160,4 +160,13 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> {
**/ **/
String savePreNewEmpInfo(TSalaryEmployee newEmp); String savePreNewEmpInfo(TSalaryEmployee newEmp);
/**
* @param empIdCardList 身份证
* @Description: 获取薪资人员信息
* @Author: hgw
* @Date: 2025/1/13 17:33
* @return: java.util.Map<java.lang.String, com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee>
**/
Map<String, TSalaryEmployee> getSalaryEmpMap(List<String> empIdCardList);
} }
...@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; ...@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard;
import com.yifu.cloud.plus.v1.yifu.salary.vo.AccountByEkpDiffVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.AccountByEkpDiffVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryRiskVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo;
...@@ -144,4 +145,14 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> { ...@@ -144,4 +145,14 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> {
**/ **/
int getNum(String deptId, String setId, String settleMonth, String nowYear); int getNum(String deptId, String setId, String settleMonth, String nowYear);
/**
* @param s 工资
* @param user 登录人
* @Description: 判断薪资是否购买商险
* @Author: hgw
* @Date: 2025/1/14 11:01
* @return: java.lang.String
**/
R<List<SalaryRiskVo>> judegRisk(TSalaryStandard s, YifuUser user);
} }
package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TInsuranceUnpurchasePersonSalary;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TInsuranceUnpurchasePersonSalaryMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TInsuranceUnpurchasePersonSalaryService;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
/**
* 含风险项目不购买申请明细表
*
* @author huych
* @date 2025-01-10 11:23:21
*/
@Log4j2
@Service
public class TInsuranceUnpurchasePersonSalaryServiceImpl extends ServiceImpl<TInsuranceUnpurchasePersonSalaryMapper
, TInsuranceUnpurchasePersonSalary> implements TInsuranceUnpurchasePersonSalaryService {
/**
* 含风险项目不购买申请明细表简单分页查询-薪资关联
*
* @param tInsuranceUnpurchasePerson 含风险项目不购买申请明细表-薪资关联
* @return
*/
@Override
public IPage<TInsuranceUnpurchasePersonSalary> getTInsuranceUnpurchasePersonSalaryPage(Page<TInsuranceUnpurchasePersonSalary> page, TInsuranceUnpurchasePersonSalary tInsuranceUnpurchasePerson) {
return baseMapper.getTInsuranceUnpurchasePersonSalaryPage(page, tInsuranceUnpurchasePerson);
}
/**
* @param salaryId
* @Description: 删除薪资后,清除关联项与次数
* @Author: hgw
* @Date: 2025/1/15 13:04
* @return: void
**/
@Override
public void deletePersonSalaryBySalaryId(String salaryId) {
baseMapper.deletePersonSalaryBySalaryId(salaryId);
baseMapper.updatePersonSalaryNumBySalaryId(salaryId);
}
}
...@@ -93,4 +93,9 @@ public class TInsuranceUnpurchasePersonServiceImpl extends ServiceImpl<TInsuranc ...@@ -93,4 +93,9 @@ public class TInsuranceUnpurchasePersonServiceImpl extends ServiceImpl<TInsuranc
return baseMapper.getTInsuranceUnpurchasePersonList(id); return baseMapper.getTInsuranceUnpurchasePersonList(id);
} }
@Override
public List<TInsuranceUnpurchasePerson> getBuyList(String deptId, List<String> idCardList) {
return baseMapper.getBuyList(deptId, idCardList);
}
} }
...@@ -642,4 +642,10 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper, ...@@ -642,4 +642,10 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
} }
} }
} }
@Override
public List<TSalaryAccount> getIdCardListBySalaryId(String salaryId) {
return baseMapper.getIdCardListBySalaryId(salaryId);
}
} }
...@@ -1306,4 +1306,16 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -1306,4 +1306,16 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
return CommonConstants.SAVE_SUCCESS; return CommonConstants.SAVE_SUCCESS;
} }
@Override
public Map<String, TSalaryEmployee> getSalaryEmpMap(List<String> empIdCardList) {
List<TSalaryEmployee> list = baseMapper.getListByIdCard(empIdCardList);
Map<String, TSalaryEmployee> salaryEmpMap = new HashMap<>();
if (list != null && !list.isEmpty()) {
for (TSalaryEmployee s : list) {
salaryEmpMap.put(s.getEmpIdcard(), s);
}
}
return salaryEmpMap;
}
} }
...@@ -182,4 +182,21 @@ ...@@ -182,4 +182,21 @@
where a.PARNET_ID = #{id} where a.PARNET_ID = #{id}
</select> </select>
<!--不购买商险,薪资使用 hgw-->
<select id="getBuyList" resultMap="tInsuranceUnpurchasePersonMap">
SELECT
ID,
EMP_NAME,
EMP_IDCARD_NO,
REASON_TYPE,
SOCIAL_STATUS,
SALARY_NUM
FROM t_insurance_unpurchase_person a
where STATUS = '3' AND (REASON_TYPE = '1' or (REASON_TYPE = '2' AND SALARY_NUM = 0) ) AND DEPT_ID = #{deptId} AND EMP_IDCARD_NO in
<foreach item="idStr" index="index" collection="idCardList" open="(" separator="," close=")">
#{idStr}
</foreach>
</select>
</mapper> </mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.salary.mapper.TInsuranceUnpurchasePersonSalaryMapper">
<resultMap id="tInsuranceUnpurchasePersonSalaryMap" type="com.yifu.cloud.plus.v1.yifu.salary.entity.TInsuranceUnpurchasePersonSalary">
<id property="id" column="ID"/>
<result property="parentId" column="PARENT_ID"/>
<result property="salaryId" column="SALARY_ID"/>
<result property="applyNo" column="APPLY_NO"/>
<result property="salaryMonth" column="SALARY_MONTH"/>
<result property="deleteFlag" column="DELETE_FLAG"/>
<result property="createBy" column="CREATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="updateTime" column="UPDATE_TIME"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.PARENT_ID,
a.SALARY_ID,
a.APPLY_NO,
a.SALARY_MONTH,
a.DELETE_FLAG,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME
</sql>
<sql id="tInsuranceUnpurchasePerson_where">
<if test="tInsuranceUnpurchasePerson != null">
<if test="tInsuranceUnpurchasePerson.id != null and tInsuranceUnpurchasePerson.id.trim() != ''">
AND a.ID = #{tInsuranceUnpurchasePerson.id}
</if>
<if test="tInsuranceUnpurchasePerson.parentId != null and tInsuranceUnpurchasePerson.parentId.trim() != ''">
AND a.PARENT_ID = #{tInsuranceUnpurchasePerson.parentId}
</if>
<if test="tInsuranceUnpurchasePerson.salaryId != null and tInsuranceUnpurchasePerson.salaryId.trim() != ''">
AND a.SALARY_ID = #{tInsuranceUnpurchasePerson.salaryId}
</if>
<if test="tInsuranceUnpurchasePerson.applyNo != null and tInsuranceUnpurchasePerson.applyNo.trim() != ''">
AND a.APPLY_NO = #{tInsuranceUnpurchasePerson.applyNo}
</if>
<if test="tInsuranceUnpurchasePerson.salaryMonth != null and tInsuranceUnpurchasePerson.salaryMonth.trim() != ''">
AND a.SALARY_MONTH = #{tInsuranceUnpurchasePerson.salaryMonth}
</if>
</if>
</sql>
<!--tInsuranceUnpurchasePerson简单分页查询-->
<select id="getTInsuranceUnpurchasePersonSalaryPage" resultMap="tInsuranceUnpurchasePersonSalaryMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_insurance_unpurchase_person_salary a
where DELETE_FLAG = 0
<include refid="tInsuranceUnpurchasePerson_where"/>
</select>
<!--删除关联项-->
<update id="deletePersonSalaryBySalaryId">
update t_insurance_unpurchase_person_salary a
set a.DELETE_FLAG = 1
where a.SALARY_ID = #{salaryId}
</update>
<!--更新次数-1-->
<update id="updatePersonSalaryNumBySalaryId">
update t_insurance_unpurchase_person a
left join t_insurance_unpurchase_person_salary b on a.id=b.PARENT_ID
set a.SALARY_NUM = (if(a.SALARY_NUM is null or a.SALARY_NUM = 0,1,a.SALARY_NUM) - 1)
where b.SALARY_ID = #{salaryId}
</update>
</mapper>
...@@ -1737,4 +1737,14 @@ ...@@ -1737,4 +1737,14 @@
<include refid="where_export"/> <include refid="where_export"/>
</where> </where>
</select> </select>
<!-- 获取报账明细的身份证 -->
<select id="getIdCardListBySalaryId" resultMap="tSalaryAccountMap">
SELECT
a.EMP_NAME,
a.EMP_IDCARD
FROM t_salary_account a
where a.DELETE_FLAG = 0 and a.SALARY_FORM_ID = #{salaryId}
</select>
</mapper> </mapper>
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
<result property="originalSetName" column="ORIGINAL_SET_NAME"/> <result property="originalSetName" column="ORIGINAL_SET_NAME"/>
<result property="newEmpUpdateFlag" column="NEW_EMP_UPDATE_FLAG"/> <result property="newEmpUpdateFlag" column="NEW_EMP_UPDATE_FLAG"/>
<result property="isFixedColumn" column="IS_FIXED_COLUMN"/> <result property="isFixedColumn" column="IS_FIXED_COLUMN"/>
<result property="isCheckRisk" column="IS_CHECK_RISK"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -155,7 +156,8 @@ ...@@ -155,7 +156,8 @@
a.SET_NAME, a.SET_NAME,
a.ORIGINAL_SET_NAME, a.ORIGINAL_SET_NAME,
a.NEW_EMP_UPDATE_FLAG, a.NEW_EMP_UPDATE_FLAG,
a.IS_FIXED_COLUMN a.IS_FIXED_COLUMN,
a.IS_CHECK_RISK
</sql> </sql>
<sql id="tSalaryStandard_where"> <sql id="tSalaryStandard_where">
<if test="tSalaryStandard != null"> <if test="tSalaryStandard != null">
...@@ -312,6 +314,9 @@ ...@@ -312,6 +314,9 @@
<if test="tSalaryStandard.originalSetName != null and tSalaryStandard.originalSetName.trim() != ''"> <if test="tSalaryStandard.originalSetName != null and tSalaryStandard.originalSetName.trim() != ''">
AND a.ORIGINAL_SET_NAME = #{tSalaryStandard.originalSetName} AND a.ORIGINAL_SET_NAME = #{tSalaryStandard.originalSetName}
</if> </if>
<if test="tSalaryStandard.isCheckRisk != null ">
AND a.IS_CHECK_RISK = #{tSalaryStandard.isCheckRisk}
</if>
</if> </if>
</sql> </sql>
<!--tSalaryStandard简单分页查询--> <!--tSalaryStandard简单分页查询-->
......
...@@ -285,7 +285,8 @@ public class SocialFriendConfig { ...@@ -285,7 +285,8 @@ public class SocialFriendConfig {
// 户口所在地地址 // 户口所在地地址
cbrymdOne.put("hkszddz", areaName); cbrymdOne.put("hkszddz", areaName);
// 户口性质 // 户口性质
cbrymdOne.put("hkxz", "居民户口(含农业户口、非农业户口)"); //cbrymdOne.put("hkxz", "居民户口(含农业户口、非农业户口)")
cbrymdOne.put("hkxz", "本地居民户口");
// 居住地址 // 居住地址
cbrymdOne.put("jzdz", areaName); cbrymdOne.put("jzdz", areaName);
// 居住地行政区 // 居住地行政区
......
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