Commit 4cb241c7 authored by hongguangwu's avatar hongguangwu

费用划转,EKP同步HRO

parent 3ccd3fdd
......@@ -5,6 +5,7 @@ import com.alibaba.fastjson.TypeReference;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
......@@ -12,6 +13,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
......@@ -141,6 +143,25 @@ public class ArchivesDaprUtil {
return res;
}
/**
* @param deptNo 部门编码
* @Description: 获取部门信息
* @Author: hgw
* @Date: 2022/11/16 14:50
* @return: com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
**/
public TSettleDomainSelectVo selectDeptByNo(String deptNo){
TSettleDomainSelectVo dept = new TSettleDomainSelectVo();
dept.setDepartNo(deptNo);
R<TSettleDomainListVo> listVo = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl()
, daprArchivesProperties.getAppId(),"/tsettledomain/selectSettleDomainSelectVoByNo"
, dept, TSettleDomainListVo.class, SecurityConstants.FROM_IN);
if (Common.isNotNull(listVo) && listVo.getData() != null && listVo.getData().getListSelectVO() != null && !listVo.getData().getListSelectVO().isEmpty()) {
dept = listVo.getData().getListSelectVO().get(0);
}
return dept;
}
public R<EmpDispatchAddVo> addDispatchInfo(EmpDispatchAddVo addVo) {
R<EmpDispatchAddVo> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/temployeeinfo/addDispatchInfo" , JSON.toJSONString(addVo), EmpDispatchAddVo.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
......
package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprInsurancesProperties;
import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptVo;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
/**
* @Author hgw
* @Date 2022-11-17 10:16:59
* @Description
* @Version 1.0
*/
@Log4j2
@EnableConfigurationProperties(DaprInsurancesProperties.class)
public class InsuranceDaprUtil {
@Autowired
private DaprInsurancesProperties daprInsurancesProperties;
/**
* @Author hgw
* @Description ekp费用划转,商险划转项目
* @Date 2022-11-17 11:03:08
* @Param
* @return
**/
public void ekpUpdateInsuranceDept(ChangeDeptVo changeDeptVo){
HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl()
, daprInsurancesProperties.getAppId(),"/insuranceDetail/inner/ekpUpdateInsuranceDept" , changeDeptVo
, Object.class, SecurityConstants.FROM_IN);
}
}
......@@ -4,4 +4,5 @@ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.CheckDaprUtil,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.InsuranceDaprUtil,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SalaryDaprUtil
......@@ -13,6 +13,7 @@ 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.service.insurance.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
......@@ -625,5 +626,18 @@ public class TInsuranceDetailController {
return tInsuranceDetailService.getOrderInsuredListPage(page,param);
}
/**
* @param changeDeptVo
* @Description: ekp费用划转,商险划转项目
* @Author: hgw
* @Date: 2022/11/17 10:56
* @return: void
**/
@Operation(summary = "ekp费用划转,商险划转项目", description = "ekp费用划转,商险划转项目")
@Inner
@PostMapping("/inner/ekpUpdateInsuranceDept")
public void ekpUpdateInsuranceDept(@RequestBody ChangeDeptVo changeDeptVo) {
tInsuranceDetailService.ekpUpdateInsuranceDept(changeDeptVo);
}
}
......@@ -3,12 +3,14 @@ package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
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.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
/**
* @author licancan
......@@ -224,5 +226,14 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*/
IPage<InsuredOrderListVo> getOrderInsuredListPage(Page<InsuredOrderListVo> page, @Param("param") InsuredOrderParam param);
/**
* @param idSet
* @param dept
* @Description: ekp费用划转-商险
* @Author: hgw
* @Date: 2022/11/17 11:01
* @return: int
**/
int ekpUpdateInsuranceDept(@Param("idSet") Set<String> idSet, @Param("dept") TSettleDomainSelectVo dept);
}
......@@ -9,6 +9,7 @@ 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.TInsuranceOperate;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptVo;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
......@@ -398,4 +399,13 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
R getOrderInsuredListPage(Page<InsuredOrderListVo> page, InsuredOrderParam param);
SettleVo getInsuranceDetailSettleStatus(String detailId, String defaultSettleId);
/**
* @param changeDeptVo
* @Description: ekp费用划转,商险划转项目
* @Author: hgw
* @Date: 2022/11/17 10:56
* @return: void
**/
void ekpUpdateInsuranceDept(ChangeDeptVo changeDeptVo);
}
......@@ -34,6 +34,8 @@ import com.yifu.cloud.plus.v1.yifu.insurances.util.LocalDateUtil;
import com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
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.ChangeDeptVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeDetailReturnVo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
......@@ -6352,4 +6354,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
@Override
public void ekpUpdateInsuranceDept(ChangeDeptVo changeDeptVo) {
Set<String> detailIdSet = new HashSet<>();
for (ChangeDeptDetailVo vo : changeDeptVo.getShangxian()) {
if (Common.isNotNull(vo.getId())) {
detailIdSet.add(vo.getId().split(CommonConstants.DOWN_LINE_STRING)[0]);
}
}
if (!detailIdSet.isEmpty()) {
baseMapper.ekpUpdateInsuranceDept(detailIdSet, changeDeptVo.getDept());
}
}
}
......@@ -1170,4 +1170,20 @@
order by createTime desc
</select>
<!-- ekp费用划转-商险-->
<update id="ekpUpdateInsuranceDept">
update t_insurance_detail p
set
p.DEPT_ID = #{dept.id}
,p.DEPT_NAME = #{dept.departName}
,p.DEPT_NO = #{dept.departNo}
,p.UNIT_ID = #{dept.customerId}
,p.UNIT_NAME = #{dept.customerName}
,p.UNIT_NO = #{dept.customerCode}
where p.id in
<foreach item="item" index="index" collection="idSet" open="(" separator="," close=")">
#{item}
</foreach>
</update>
</mapper>
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.entity;
import com.alibaba.excel.annotation.ExcelProperty;
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.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
/**
* EKP费用划转,改变缴费库、预估库、收入、收入明细、商险明细(订单表没有项目信息,不划转)
*
* @author hgw
* @date 2022-11-17 15:58:59
*/
@Data
@TableName("t_ekp_change_dept_log")
@Schema(description = "EKP费用划转,改变缴费库、预估库、收入、收入明细、商险明细(订单表没有项目信息,不划转)")
public class TEkpChangeDeptLog {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("id")
@Schema(description = "id")
private String id;
/**
* 创建人-EKP传过来的
*/
@ExcelAttribute(name = "创建人-EKP传过来的", maxLength = 50)
@Length(max = 50, message = "创建人-EKP传过来的不能超过50个字符")
@ExcelProperty("创建人-EKP传过来的")
@Schema(description = "创建人-EKP传过来的")
private String createName;
/**
* 创建时间
*/
@ExcelAttribute(name = "创建时间", isDate = true)
@ExcelProperty("创建时间")
@Schema(description = "创建时间")
private Date createTime;
/**
* 老项目名称
*/
@ExcelAttribute(name = "老项目名称", maxLength = 50)
@Length(max = 50, message = "老项目名称不能超过50个字符")
@ExcelProperty("老项目名称")
@Schema(description = "老项目名称")
private String preDeptName;
/**
* 老项目编码
*/
@ExcelAttribute(name = "老项目编码", maxLength = 32)
@Length(max = 32, message = "老项目编码不能超过32个字符")
@ExcelProperty("老项目编码")
@Schema(description = "老项目编码")
private String preDeptNo;
/**
* 新项目名称
*/
@ExcelAttribute(name = "新项目名称", maxLength = 50)
@Length(max = 50, message = "新项目名称不能超过50个字符")
@ExcelProperty("新项目名称")
@Schema(description = "新项目名称")
private String newDeptName;
/**
* 新项目编码
*/
@ExcelAttribute(name = "新项目编码", maxLength = 32)
@Length(max = 32, message = "新项目编码不能超过32个字符")
@ExcelProperty("新项目编码")
@Schema(description = "新项目编码")
private String newDeptNo;
/**
* 划转类型:类型1;类型2;类型3
*/
@ExcelAttribute(name = "划转类型:类型1;类型2;类型3", maxLength = 32)
@Length(max = 32, message = "划转类型:类型1;类型2;类型3不能超过32个字符")
@ExcelProperty("划转类型:类型1;类型2;类型3")
@Schema(description = "划转类型:类型1;类型2;类型3")
private String transferType;
/**
* 缴费库预估库id(社保)
*/
@ExcelAttribute(name = "缴费库预估库id(社保)", maxLength = 2000)
@Length(max = 2000, message = "缴费库预估库id(社保)不能超过2000个字符")
@ExcelProperty("缴费库预估库id(社保)")
@Schema(description = "缴费库预估库id(社保)")
private String socialId;
/**
* 缴费库预估库id(公积金)
*/
@ExcelAttribute(name = "缴费库预估库id(公积金)", maxLength = 2000)
@Length(max = 2000, message = "缴费库预估库id(公积金)不能超过2000个字符")
@ExcelProperty("缴费库预估库id(公积金)")
@Schema(description = "缴费库预估库id(公积金)")
private String fundId;
/**
* 收入id(管理费)
*/
@ExcelAttribute(name = "收入id(管理费)", maxLength = 2000)
@Length(max = 2000, message = "收入id(管理费)不能超过2000个字符")
@ExcelProperty("收入id(管理费)")
@Schema(description = "收入id(管理费)")
private String manageId;
/**
* 收入id(风险金)
*/
@ExcelAttribute(name = "收入id(风险金)", maxLength = 2000)
@Length(max = 2000, message = "收入id(风险金)不能超过2000个字符")
@ExcelProperty("收入id(风险金)")
@Schema(description = "收入id(风险金)")
private String riskId;
/**
* 商险id
*/
@ExcelAttribute(name = "商险id", maxLength = 2000)
@Length(max = 2000, message = "商险id不能超过2000个字符")
@ExcelProperty("商险id")
@Schema(description = "商险id")
private String insuranceId;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.vo;
import lombok.Data;
import java.io.Serializable;
/**
* 费用划转明细vo
* @author hgw
* @date 2022-11-16 10:35:30
*/
@Data
public class ChangeDeptDetailVo implements Serializable {
// id
private String id;
// 姓名
private String name;
// 身份证号
private String idCard;
// 订单类型
private String orderType;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 费用划转vo
* @author hgw
* @date 2022-11-16 10:35:30
*/
@Data
public class ChangeDeptVo implements Serializable {
// 申请人账号
private String creator;
// 划转前项目名称
private String preProjectname;
// 划转前项目编码
private String preProjectno;
// 划转前客户名称
private String preCustomername;
// 划转前客户编码
private String preCustomerno;
// 划转后项目名称
private String nowProjectname;
// 划转后项目编码
private String nowProjectno;
// 划转后客户名称
private String nowCustomername;
// 划转后客户编码
private String nowCustomerno;
// 划转类型:类型1;类型2;类型3
private String transferType;
// 社保明细
private List<ChangeDeptDetailVo> shebao;
// 公积金明细
private List<ChangeDeptDetailVo> gongjijin;
// 商险明细
private List<ChangeDeptDetailVo> shangxian;
// 管理费明细
private List<ChangeDeptDetailVo> guanlifei;
// 风险金明细
private List<ChangeDeptDetailVo> fenxianjin;
// 商险使用的项目信息
private TSettleDomainSelectVo dept;
}
......@@ -29,14 +29,13 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.service.TPaymentInfoService;
import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
......@@ -54,7 +53,6 @@ import java.util.List;
@RequiredArgsConstructor
@RequestMapping("/tpaymentinfo" )
@Tag(name = "缴费库管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TPaymentInfoController {
private final TPaymentInfoService tPaymentInfoService;
......@@ -408,4 +406,16 @@ public class TPaymentInfoController {
tPaymentInfoService.pushPaymentSocialFundInfo();
return R.ok();
}
/**
* 费用划转,EKP通知MVP跟着一起划转
* @author hgw
* @return R
*/
@Operation(summary = "费用划转--EKP调用接口", description = "费用划转--EKP调用接口")
@SysLog("费用划转--EKP调用接口")
@PostMapping("/changeDeptByEkp")
public R<String> changeDeptByEkp(@RequestBody ChangeDeptVo changeDeptVo) {
return tPaymentInfoService.changeDeptByEkp(changeDeptVo);
}
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.social.entity.TEkpChangeDeptLog;
import org.apache.ibatis.annotations.Mapper;
/**
* EKP费用划转,改变缴费库、预估库、收入、收入明细、商险明细(订单表没有项目信息,不划转)
*
* @author hgw
* @date 2022-11-17 15:58:59
*/
@Mapper
public interface TEkpChangeDeptLogMapper extends BaseMapper<TEkpChangeDeptLog> {
}
......@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.social.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.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TForecastLibrary;
......@@ -28,6 +29,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
/**
* 预估费用
......@@ -77,4 +79,16 @@ public interface TForecastLibraryMapper extends BaseMapper<TForecastLibrary> {
* @return
**/
int updatePushStatus(@Param("idList") List<String> idList);
int checkForecastChange(@Param("idSet") Set<String> idSet);
/**
* @param idSet
* @Description: 修改缴费库
* @Author: hgw
* @Date: 2022-11-16 17:51:41
* @return: int
**/
int changeForecastDept(@Param("idSet") Set<String> idSet, @Param("dept") TSettleDomainSelectVo dept);
}
......@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.social.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.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncome;
import com.yifu.cloud.plus.v1.yifu.social.vo.IncomeExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo;
......@@ -27,6 +28,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
/**
* 收入明细表
......@@ -71,4 +73,24 @@ public interface TIncomeMapper extends BaseMapper<TIncome> {
**/
int deleteIncomeDetailByApplyNo(@Param("applyNo") String applyNo);
/**
* @param idSet
* @param dept
* @Description: ekp费用划转-收入
* @Author: hgw
* @Date: 2022/11/17 9:43
* @return: int
**/
int changeIncomeDept(@Param("idSet") Set<String> idSet, @Param("dept") TSettleDomainSelectVo dept);
/**
* @param idSet
* @param dept
* @Description: ekp费用划转-明细
* @Author: hgw
* @Date: 2022/11/17 9:43
* @return: int
**/
int changeIncomeDetailDept(@Param("idSet") Set<String> idSet, @Param("dept") TSettleDomainSelectVo dept);
}
......@@ -20,9 +20,11 @@ package com.yifu.cloud.plus.v1.yifu.social.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.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoVo;
......@@ -30,6 +32,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
/**
* 缴费库
......@@ -143,4 +146,22 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
**/
int updatePushStatus(@Param("idList") List<String> idList);
/**
* @param idSet
* @Description: 校验缴费库是否有已结算的数据,有,则不允许ekp费用划转
* @Author: hgw
* @Date: 2022/11/16 17:32
* @return: int
**/
int checkPaymentChange(@Param("idSet") Set<String> idSet);
/**
* @param idSet
* @Description: 修改缴费库
* @Author: hgw
* @Date: 2022-11-16 17:51:41
* @return: int
**/
int changePaymentDept(@Param("idSet") Set<String> idSet, @Param("dept") TSettleDomainSelectVo dept);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.social.entity.TEkpChangeDeptLog;
/**
* EKP费用划转,改变缴费库、预估库、收入、收入明细、商险明细(订单表没有项目信息,不划转)
*
* @author hgw
* @date 2022-11-17 15:58:59
*/
public interface TEkpChangeDeptLogService extends IService<TEkpChangeDeptLog> {
}
......@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.social.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.archives.vo.TSettleDomainSelectVo;
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.social.entity.TIncome;
......@@ -29,6 +30,7 @@ import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
import java.util.Set;
/**
* 收入明细表
......@@ -76,4 +78,14 @@ public interface TIncomeService extends IService<TIncome> {
**/
void deleteIncomeAndDetailByApplyNo(String applyNo);
/**
* @param idSet
* @param dept
* @Description: ekp费用划转-收入
* @Author: hgw
* @Date: 2022/11/17 9:42
* @return: void
**/
void changeIncomeAndDetailDept(Set<String> idSet, TSettleDomainSelectVo dept);
}
......@@ -24,6 +24,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoVo;
......@@ -149,4 +150,13 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
void pushPaymentSocialFundInfo();
/**
* @param changeDeptVo
* @Description: 费用划转-ekp同步hro
* @Author: hgw
* @Date: 2022/11/16 10:38
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R<String> changeDeptByEkp(ChangeDeptVo changeDeptVo);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.social.entity.TEkpChangeDeptLog;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TEkpChangeDeptLogMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TEkpChangeDeptLogService;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
/**
* EKP费用划转,改变缴费库、预估库、收入、收入明细、商险明细(订单表没有项目信息,不划转)
*
* @author hgw
* @date 2022-11-17 15:58:59
*/
@Log4j2
@Service
public class TEkpChangeDeptLogServiceImpl extends ServiceImpl<TEkpChangeDeptLogMapper, TEkpChangeDeptLog> implements TEkpChangeDeptLogService {
}
......@@ -28,6 +28,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpIncomeUtil;
......@@ -1072,4 +1073,17 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
baseMapper.deleteIncomeDetailByApplyNo(applyNo);
}
/**
* @param idSet
* @param dept
* @Description: ekp费用划转-收入
* @Author: hgw
* @Date: 2022/11/17 9:42
* @return: void
**/
public void changeIncomeAndDetailDept(Set<String> idSet, TSettleDomainSelectVo dept) {
baseMapper.changeIncomeDept(idSet, dept);
baseMapper.changeIncomeDetailDept(idSet, dept);
}
}
......@@ -39,6 +39,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.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.InsuranceDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpFundUtil;
......@@ -53,13 +54,11 @@ import com.yifu.cloud.plus.v1.yifu.social.constants.PaymentConstants;
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.mapper.*;
import com.yifu.cloud.plus.v1.yifu.social.service.TEkpChangeDeptLogService;
import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService;
import com.yifu.cloud.plus.v1.yifu.social.service.TPaymentInfoService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSendEkpErrorService;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentHeFeiVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -130,6 +129,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Autowired
private TSendEkpErrorService tSendEkpErrorService;
@Autowired
private TForecastLibraryMapper tForecastLibraryMapper;
@Autowired
private InsuranceDaprUtil insuranceDaprUtil;
@Autowired
private TEkpChangeDeptLogService tEkpChangeDeptLogService;
/**
* 缴费库简单分页查询
*
......@@ -3262,4 +3270,127 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
sb.insert(4, "-");
return sb.toString();
}
/**
* @param changeDeptVo 变更主体数据
* @Description: 费用划转-ekp同步hro
* @Author: hgw
* @Date: 2022/11/16 10:39
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Override
public R<String> changeDeptByEkp(ChangeDeptVo changeDeptVo) {
// 获取项目信息:
TSettleDomainSelectVo dept = archivesDaprUtil.selectDeptByNo(changeDeptVo.getNowProjectno());
if (dept != null && dept.getId() != null) {
// 变更数据的主键id
Set<String> idSet;
// 存储日志使用的
StringBuilder socialId = new StringBuilder();
StringBuilder fundId = new StringBuilder();
StringBuilder manageId = new StringBuilder();
StringBuilder riskId = new StringBuilder();
StringBuilder insuranceId = new StringBuilder();
// 如果选择了社保公积金信息要划转,则校验。
// 否则跳过这一步,直接划转
if ((changeDeptVo.getShebao() != null && !changeDeptVo.getShebao().isEmpty())
|| (changeDeptVo.getGongjijin() != null && !changeDeptVo.getGongjijin().isEmpty())) {
idSet = new HashSet<>();
if (changeDeptVo.getShebao() != null && !changeDeptVo.getShebao().isEmpty()) {
for (ChangeDeptDetailVo vo : changeDeptVo.getShebao()) {
idSet.add(vo.getId());
socialId.append(vo.getId()).append(CommonConstants.DUNHAO_STRING);
}
}
if (changeDeptVo.getGongjijin() != null && !changeDeptVo.getGongjijin().isEmpty()) {
for (ChangeDeptDetailVo vo : changeDeptVo.getGongjijin()) {
idSet.add(vo.getId());
fundId.append(vo.getId()).append(CommonConstants.DUNHAO_STRING);
}
}
if (!idSet.isEmpty()) {
// 查询是否允许划转缴费库、预估库 的 社保、公积金
boolean flag = this.checkChange(idSet);
if (!flag) {
return R.failed("社保公积金已被结算,请先退回并删除工资表!");
}
// 1划转缴费率、预估库的项目(社保公积金)
baseMapper.changePaymentDept(idSet, dept);
tForecastLibraryMapper.changeForecastDept(idSet, dept);
}
}
// 2划转管理费、风险金
if ((changeDeptVo.getGuanlifei() != null && !changeDeptVo.getGuanlifei().isEmpty())
|| (changeDeptVo.getFenxianjin() != null && !changeDeptVo.getFenxianjin().isEmpty())) {
idSet = new HashSet<>();
if (changeDeptVo.getGuanlifei() != null && !changeDeptVo.getGuanlifei().isEmpty()) {
for (ChangeDeptDetailVo vo : changeDeptVo.getGuanlifei()) {
idSet.add(vo.getId());
manageId.append(vo.getId()).append(CommonConstants.DUNHAO_STRING);
}
}
if (changeDeptVo.getFenxianjin() != null && !changeDeptVo.getFenxianjin().isEmpty()) {
for (ChangeDeptDetailVo vo : changeDeptVo.getFenxianjin()) {
idSet.add(vo.getId());
riskId.append(vo.getId()).append(CommonConstants.DUNHAO_STRING);
}
}
if (!idSet.isEmpty()) {
incomeService.changeIncomeAndDetailDept(idSet, dept);
}
}
// 3划转商险
if (changeDeptVo.getShangxian() != null && !changeDeptVo.getShangxian().isEmpty()) {
idSet = new HashSet<>();
for (ChangeDeptDetailVo vo : changeDeptVo.getShangxian()) {
idSet.add(vo.getId());
insuranceId.append(vo.getId()).append(CommonConstants.DUNHAO_STRING);
}
if (!idSet.isEmpty()) {
insuranceDaprUtil.ekpUpdateInsuranceDept(changeDeptVo);
}
}
// 4 记录日志
TEkpChangeDeptLog log = new TEkpChangeDeptLog();
log.setCreateName(changeDeptVo.getCreator());
log.setCreateTime(new Date());
log.setPreDeptName(changeDeptVo.getPreProjectname());
log.setPreDeptNo(changeDeptVo.getPreProjectno());
log.setNewDeptName(changeDeptVo.getNowProjectname());
log.setNewDeptNo(changeDeptVo.getNowProjectno());
log.setTransferType(changeDeptVo.getTransferType());
log.setSocialId(socialId.toString());
log.setFundId(fundId.toString());
log.setManageId(manageId.toString());
log.setRiskId(riskId.toString());
log.setInsuranceId(insuranceId.toString());
// 4记录费用划转日志
tEkpChangeDeptLogService.save(log);
return R.ok();
} else {
return R.failed("根据新编码未获取到项目信息");
}
}
/**
* @param idSet
* @Description: 校验是否存在已结算薪资的数据
* @Author: hgw
* @Date: 2022/11/16 17:30
* @return: boolean
**/
private boolean checkChange(Set<String> idSet) {
int settleCount = baseMapper.checkPaymentChange(idSet);
if (settleCount == 0) {
settleCount = tForecastLibraryMapper.checkForecastChange(idSet);
return settleCount == 0;
} else {
return false;
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!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.social.mapper.TEkpChangeDeptLogMapper">
<resultMap id="tEkpChangeDeptLogMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TEkpChangeDeptLog">
<id property="id" column="ID"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="preDeptName" column="PRE_DEPT_NAME"/>
<result property="preDeptNo" column="PRE_DEPT_NO"/>
<result property="newDeptName" column="NEW_DEPT_NAME"/>
<result property="newDeptNo" column="NEW_DEPT_NO"/>
<result property="transferType" column="TRANSFER_TYPE"/>
<result property="socialId" column="SOCIAL_ID"/>
<result property="fundId" column="FUND_ID"/>
<result property="manageId" column="MANAGE_ID"/>
<result property="riskId" column="RISK_ID"/>
<result property="insuranceId" column="INSURANCE_ID"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.CREATE_NAME,
a.CREATE_TIME,
a.PRE_DEPT_NAME,
a.PRE_DEPT_NO,
a.NEW_DEPT_NAME,
a.NEW_DEPT_NO,
a.TRANSFER_TYPE,
a.SOCIAL_ID,
a.FUND_ID,
a.MANAGE_ID,
a.RISK_ID,
a.INSURANCE_ID
</sql>
<sql id="tEkpChangeDeptLog_where">
<if test="tEkpChangeDeptLog != null">
<if test="tEkpChangeDeptLog.id != null and tEkpChangeDeptLog.id.trim() != ''">
AND a.ID = #{tEkpChangeDeptLog.id}
</if>
<if test="tEkpChangeDeptLog.createName != null and tEkpChangeDeptLog.createName.trim() != ''">
AND a.CREATE_NAME = #{tEkpChangeDeptLog.createName}
</if>
<if test="tEkpChangeDeptLog.createTime != null">
AND a.CREATE_TIME = #{tEkpChangeDeptLog.createTime}
</if>
<if test="tEkpChangeDeptLog.preDeptName != null and tEkpChangeDeptLog.preDeptName.trim() != ''">
AND a.PRE_DEPT_NAME = #{tEkpChangeDeptLog.preDeptName}
</if>
<if test="tEkpChangeDeptLog.preDeptNo != null and tEkpChangeDeptLog.preDeptNo.trim() != ''">
AND a.PRE_DEPT_NO = #{tEkpChangeDeptLog.preDeptNo}
</if>
<if test="tEkpChangeDeptLog.newDeptName != null and tEkpChangeDeptLog.newDeptName.trim() != ''">
AND a.NEW_DEPT_NAME = #{tEkpChangeDeptLog.newDeptName}
</if>
<if test="tEkpChangeDeptLog.newDeptNo != null and tEkpChangeDeptLog.newDeptNo.trim() != ''">
AND a.NEW_DEPT_NO = #{tEkpChangeDeptLog.newDeptNo}
</if>
<if test="tEkpChangeDeptLog.transferType != null and tEkpChangeDeptLog.transferType.trim() != ''">
AND a.TRANSFER_TYPE = #{tEkpChangeDeptLog.transferType}
</if>
<if test="tEkpChangeDeptLog.socialId != null and tEkpChangeDeptLog.socialId.trim() != ''">
AND a.SOCIAL_ID = #{tEkpChangeDeptLog.socialId}
</if>
<if test="tEkpChangeDeptLog.fundId != null and tEkpChangeDeptLog.fundId.trim() != ''">
AND a.FUND_ID = #{tEkpChangeDeptLog.fundId}
</if>
<if test="tEkpChangeDeptLog.manageId != null and tEkpChangeDeptLog.manageId.trim() != ''">
AND a.MANAGE_ID = #{tEkpChangeDeptLog.manageId}
</if>
<if test="tEkpChangeDeptLog.riskId != null and tEkpChangeDeptLog.riskId.trim() != ''">
AND a.RISK_ID = #{tEkpChangeDeptLog.riskId}
</if>
<if test="tEkpChangeDeptLog.insuranceId != null and tEkpChangeDeptLog.insuranceId.trim() != ''">
AND a.INSURANCE_ID = #{tEkpChangeDeptLog.insuranceId}
</if>
</if>
</sql>
</mapper>
......@@ -689,4 +689,27 @@
</foreach>
</update>
<!-- 校验预估库库是否有已结算的数据,有,则不允许ekp费用划转 -->
<select id="checkForecastChange" resultType="java.lang.Integer">
select count(1) from t_forecast_library p
where (p.SALARY_SOCIAL_FLAG = '1' or p.SALARY_FUND_FLAG = '1') and p.id in
<foreach item="item" index="index" collection="idSet" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<!-- ekp费用划转 -->
<update id="changeForecastDept">
update t_forecast_library p
set p.SETTLE_DOMAIN_ID = #{dept.id}
,p.DEPT_NAME = #{dept.departName}
,p.DEPT_NO = #{dept.departNo}
,p.UNIT_ID = #{dept.customerId}
,p.UNIT_NAME = #{dept.customerName}
where (p.SALARY_SOCIAL_FLAG = '0' and p.SALARY_FUND_FLAG = '0') and p.id in
<foreach item="item" index="index" collection="idSet" open="(" separator="," close=")">
#{item}
</foreach>
</update>
</mapper>
......@@ -268,4 +268,35 @@
<delete id="deleteIncomeDetailByApplyNo">
delete from t_income where APPLY_NO = #{applyNo}
</delete>
<!-- ekp费用划转-收入 -->
<update id="changeIncomeDept">
update t_income p
set p.DEPT_ID = #{dept.id}
,p.DEPT_NAME = #{dept.departName}
,p.DEPT_NO = #{dept.departNo}
,p.UNIT_ID = #{dept.customerId}
,p.UNIT_NAME = #{dept.customerName}
,p.UNIT_NO = #{dept.customerCode}
where p.id in
<foreach item="item" index="index" collection="idSet" open="(" separator="," close=")">
#{item}
</foreach>
</update>
<!-- ekp费用划转-明细 -->
<update id="changeIncomeDetailDept">
update t_income_detail p
set p.DEPT_ID = #{dept.id}
,p.DEPT_NAME = #{dept.departName}
,p.DEPT_NO = #{dept.departNo}
,p.UNIT_ID = #{dept.customerId}
,p.UNIT_NAME = #{dept.customerName}
,p.UNIT_NO = #{dept.customerCode}
where p.id in
<foreach item="item" index="index" collection="idSet" open="(" separator="," close=")">
#{item}
</foreach>
</update>
</mapper>
......@@ -1149,4 +1149,28 @@
</foreach>
</update>
<!-- 校验缴费库是否有已结算的数据,有,则不允许ekp费用划转 -->
<select id="checkPaymentChange" resultType="java.lang.Integer">
select count(1) from t_payment_info p
where (p.SALARY_SOCIAL_FLAG = '1' or p.SALARY_FUND_FLAG = '1') and p.id in
<foreach item="item" index="index" collection="idSet" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<!-- ekp费用划转-->
<update id="changePaymentDept">
update t_payment_info p
set
p.SETTLE_DOMAIN_ID = #{dept.id}
,p.SETTLE_DOMAIN_NAME = #{dept.departName}
,p.SETTLE_DOMAIN_CODE = #{dept.departNo}
,p.UNIT_ID = #{dept.customerId}
,p.UNIT_NAME = #{dept.customerName}
where (p.SALARY_SOCIAL_FLAG = '0' and p.SALARY_FUND_FLAG = '0') and p.id in
<foreach item="item" index="index" collection="idSet" open="(" separator="," close=")">
#{item}
</foreach>
</update>
</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