Commit 8e490f2f authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/fxj-dev' into fxj-dev

parents d9098b57 a3c30738
......@@ -7,6 +7,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprEkpProperties;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushFundParam;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
......@@ -47,4 +48,15 @@ public class EkpDaprUtils {
public R<EkpSocialPushInfoVo> pushFundInfoToEkp(List<EkpPushFundParam> unPushList) {
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/ekpFundPush/inner/pushFundInfoToEkp", JSON.toJSONString(unPushList), EkpSocialPushInfoVo.class, SecurityConstants.FROM_IN);
}
/**
* @Author huyc
* @Description 新增工资明细数据
* @Date 10:23 2024/03/11
* @Param
* @return
**/
public R<Boolean> pushSalaryInfoToEkp(List<EkpSalaryParam> unPushList) {
return HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/ekpSalaryPush/inner/pushSalaryInfoToEkp", JSON.toJSONString(unPushList), Boolean.class, SecurityConstants.FROM_IN);
}
}
/*
* 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.ekp.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 工资明细表
*
* @author fxj
* @date 2024-03-08 18:05:39
*/
@Data
@TableName("ekp_salary_info")
@EqualsAndHashCode()
@Schema(description = "工资明细表")
public class EkpSalaryInfo {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "fd_id")
private String fd_id;
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String fd_3adfedf98ccba2;
/**
* 项目名称
*/
@Schema(description = "项目名称")
private String fd_3adfedf9d2bf1c;
/**
* 单号
*/
@Schema(description = "单号")
private String fd_3adfedfa4410aa;
/**
* 客户编码
*/
@Schema(description = "客户编码")
private String fd_3adfedfacd65d6;
/**
* 客户名称
*/
@Schema(description = "客户名称")
private String fd_3adfedfb174068;
/**
* 姓名
*/
@Schema(description = "姓名")
private String fd_3adfedfb5a68a2;
/**
* 身份证号
*/
@Schema(description = "身份证号")
private String fd_3adfedfb8f76d4;
/**
* 手机号
*/
@Schema(description = "手机号")
private String fd_3adfedfbd23ab8;
/**
* 银行卡号
*/
@Schema(description = "银行卡号")
private String fd_3adfedfcb17f1e;
/**
* 开户行
*/
@Schema(description = "开户行")
private String fd_3adfedfc453cc4;
/**
* 工资月份
*/
@Schema(description = "工资月份")
private String fd_3adfee063acff0;
/**
* 实际结算月份
*/
@Schema(description = "实际结算月份")
private String fd_3adfee0690737c;
/**
* 是否薪资扣税
*/
@Schema(description = "是否薪资扣税")
private String fd_3adfee01668666;
/**
* 社保优先级
*/
@Schema(description = "社保优先级")
private String fd_3adfedfed8bb28;
/**
* 公积金优先级
*/
@Schema(description = "公积金优先级")
private String fd_3adfedff3a7430;
/**
* 是否自有员工
*/
@Schema(description = "是否自有员工")
private String fd_3adfee0009d070;
/**
* 年终奖扣税方案
*/
@Schema(description = "年终奖扣税方案")
private String fd_3adfee01dea2fa;
/**
* 应发工资
*/
@Schema(description = "应发工资")
private Double fd_3adfee12cb8840;
/**
* 个人代扣
*/
@Schema(description = "个人代扣")
private Double fd_3adfee1374ed7a;
/**
* 单位社保
*/
@Schema(description = "单位社保")
private Double fd_3adfee1e2b2f78;
/**
* 个人社保
*/
@Schema(description = "个人社保")
private Double fd_3adfee1e88723e;
/**
* 单位公积金
*/
@Schema(description = "单位公积金")
private Double fd_3adfee1ee24680;
/**
* 个人公积金
*/
@Schema(description = "个人公积金")
private Double fd_3adfee1f32fa24;
/**
* 个税
*/
@Schema(description = "个税")
private Double fd_3adfee1f901c46;
/**
* 企业年金单位
*/
@Schema(description = "企业年金单位")
private Double fd_3adfee1ff1ca6a;
/**
* 企业年金个人
*/
@Schema(description = "企业年金个人")
private Double fd_3adfee203f86b2;
/**
* 实发合计
*/
@Schema(description = "实发合计")
private Double fd_3adfee20fe5ba4;
/**
* 应收
*/
@Schema(description = "应收")
private Double fd_3adfee21802434;
/**
* 收入结算状态
*/
@Schema(description = "收入结算状态")
private String fd_3adfee4ba5ad36;
/**
* 收款状态
*/
@Schema(description = "收款状态")
private String fd_3adfee4c0c59ee;
/**
* 收入结算单号
*/
@Schema(description = "收入结算单号")
private String fd_3adfee5dd14866;
/**
* 收款单号
*/
@Schema(description = " 收款单号")
private String fd_3adfee5e3d1638;
/**
* 代扣费用应支出
*/
@Schema(description = "代扣费用应支出")
private Double fd_3adfeeb34ea0ea;
/**
* 代扣费用结算状态
*/
@Schema(description = "代扣费用结算状态")
private String fd_3adfeededfb5a6;
/**
* 代扣费用付款状态
*/
@Schema(description = "代扣费用付款状态")
private String fd_3adfeed3a20598;
/**
* 个税应支出
*/
@Schema(description = "个税应支出")
private Double fd_3adfeec6db8766;
/**
* 个税结算状态
*/
@Schema(description = "个税结算状态")
private String fd_3adfeef8ef38fc;
/**
* 个税付款状态
*/
@Schema(description = "个税付款状态")
private String fd_3adfeedd08222c;
/**
* 实发合计应支出
*/
@Schema(description = " 实发合计应支出")
private Double fd_3adfeec730ec44;
/**
* 工资实发结算状态
*/
@Schema(description = "工资实发结算状态")
private String fd_3adfeef9440ab2;
/**
* 实发合计付款状态
*/
@Schema(description = "实发合计付款状态")
private String fd_3adfeedd5f3cb2;
/**
* 企业年金单位应支出
*/
@Schema(description = "企业年金单位应支出")
private Double fd_3adfeec782070a;
/**
* 企业年金单位结算状态
*/
@Schema(description = "企业年金单位结算状态")
private String fd_3adfeef9b9fb3e;
/**
* 企业年金单位付款状态
*/
@Schema(description = "企业年金单位付款状态")
private String fd_3adfeeddacf6d4;
/**
* 企业年金个人应支出
*/
@Schema(description = "企业年金个人应支出")
private Double fd_3adfeec7ccdd1c;
/**
* 企业年金个人结算状态
*/
@Schema(description = "企业年金个人结算状态")
private String fd_3adfeefa1eba32;
/**
* 企业年金个人付款状态
*/
@Schema(description = "企业年金个人付款状态")
private String fd_3adfeede08d430;
/**
* 代扣费用付款单号
*/
@Schema(description = "代扣费用付款单号")
private String fd_3aea309696d32e;
/**
* 代扣费用结算单号
*/
@Schema(description = "代扣费用结算单号")
private String fd_3aea30866d0c30;
/**
* 年金单位结算单号
*/
@Schema(description = "年金单位结算单号")
private String fd_3aeadf182ef6a2;
/**
* 年金个人付款单号
*/
@Schema(description = "年金个人付款单号")
private String fd_3aeadf1992544c;
/**
* 实发结算单号
*/
@Schema(description = "实发结算单号")
private String fd_3aeadf17522642;
/**
* 年金个人结算单号
*/
@Schema(description = "年金个人结算单号")
private String fd_3aeadf191c62a0;
/**
* 个税支出结算单号
*/
@Schema(description = "个税支出结算单号")
private String fd_3aeadede4cea84;
/**
* 个税支出付款单号
*/
@Schema(description = "个税支出付款单号")
private String fd_3aeadee1cf1266;
/**
* 年金单位付款单号
*/
@Schema(description = "年金单位付款单号")
private String fd_3aeadf1892fdb2;
/**
* 实发付款单号
*/
@Schema(description = "实发付款单号")
private String fd_3aeadf17b7d03a;
/**
* 暂停发
*/
@Schema(description = "暂停发")
private String fd_3af9d5874f8166;
/**
* 是否垫付
*/
@Schema(description = "是否垫付")
private String fd_3afaa69ad4d16a;
/**
* 税务主体
*/
@Schema(description = "税务主体")
private String fd_3afab16f356672;
/**
* 工资id
*/
@Schema(description = "工资id")
private String fd_3b10afe8c70742;
/**
* 是否全部结算
*/
@Schema(description = "是否全部结算")
private String fd_3b13b1b91f5b34;
/**
* HRO结算月份
*/
@Schema(description = "HRO结算月份")
private String fd_3b13b1d1ff9678;
/**
* 代扣个人社保
*/
@Schema(description = "代扣个人社保")
private Double fd_3b16cecc2bbd16;
/**
* 代扣个人公积金
*/
@Schema(description = "代扣个人公积金")
private Double fd_3b16cecd47a856;
/**
* 项目台账ID(ID)
*/
@Schema(description = "项目台账ID(ID)")
private String fd_3b16e418905f52;
/**
* 项目台账ID
*/
@Schema(description = "项目台账ID")
private String fd_3b16e418905f52_text;
/**
* 是否为BPO业务
*/
@Schema(description = "是否为BPO业务")
private String fd_3b178f3e24cc32;
/**
* 薪酬申请编号
*/
@Schema(description = "薪酬申请编号")
private String fd_3b3beee3ec7e12;
/**
* 开户行支行
*/
@Schema(description = "开户行支行")
private String fd_3b73c214e52982;
/**
* 初始化导入
*/
@Schema(description = "初始化导入")
private String fd_3b84d6a6c7b8f0;
/**
* 变更说明
*/
@Schema(description = "变更说明")
private String fd_3b9893328ffb46;
/**
* 发放方式
*/
@Schema(description = "发放方式")
private String fd_3bbc0711464020;
/**
* 实发工资(现金)
*/
@Schema(description = "实发工资(现金)")
private String fd_3bcd2e63600446;
/**
* 单位待补足
*/
@Schema(description = "单位待补足")
private String fd_3bcd2e64868de6;
/**
* 实发工资(银付)
*/
@Schema(description = "实发工资(银付)")
private String fd_3bcd2e6259fdbe;
/**
* 代扣单位社保
*/
@Schema(description = "代扣单位社保")
private String fd_3bcd2f1a073260;
/**
* 个人代扣明细
*/
@Schema(description = "个人代扣明细")
private String fd_3bcd2f180f2a8c;
/**
* 代扣单位公积金
*/
@Schema(description = "代扣单位公积金")
private String fd_3bcd3102f612ea;
/**
* 免个税个人代扣
*/
@Schema(description = "免个税个人代扣")
private String fd_3bcd2ef618ee54;
/**
* 个人社保(不含代扣)
*/
@Schema(description = "个人社保(不含代扣)")
private String fd_3bcd3119a295be;
/**
* 应发工资(导表金额)
*/
@Schema(description = "应发工资(导表金额)")
private String fd_3bcdeed22ec8dc;
/**
* 暂停发金额
*/
@Schema(description = "暂停发金额")
private String fd_3bcd34a8c296c8;
/**
* 代扣个人年终奖税
*/
@Schema(description = "代扣个人年终奖税")
private String fd_3bcd2ef8728fe0;
/**
* 个人代扣合计
*/
@Schema(description = "个人代扣合计")
private String fd_3bcd2f18fd1840;
/**
* 单位社保(不含代扣)
*/
@Schema(description = "单位社保(不含代扣)")
private String fd_3bcd3100f45ca2;
/**
* 代扣当月个人税
*/
@Schema(description = "代扣当月个人税")
private String fd_3bcd2ef727ac6a;
/**
* 单位公积金(不含代扣)
*/
@Schema(description = "单位公积金(不含代扣)")
private String fd_3bcd3101d95dd8;
/**
* 个人公积金(不含代扣)
*/
@Schema(description = "个人公积金(不含代扣)")
private String fd_3bcd311a72d000;
/**
* 前端客服
*/
@Schema(description = "前端客服")
private String fd_3bee2056eeb800;
/**
* 创建人
*/
@Schema(description = "创建人")
private String fd_3c3e5ff65115a2;
@Schema(description ="创建时间")
private Date createTime;
}
package com.yifu.cloud.plus.v1.ekp.controller;
import com.yifu.cloud.plus.v1.ekp.service.EkpSalaryInfoService;
import com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 工资明细推送
* @author huyc
* @date 2024-03-11 10:04:12
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/ekpSalaryPush" )
@Tag(name = "工资明细推送")
public class TEkpSalaryInfoController {
private final EkpSalaryInfoService salaryInfoService;
/**
* @param unPushList
* @Description: 推送工资明细数据
* @Author: huyc
* @Date: 2024/2/29
* @return:
**/
@Inner
@PostMapping("/inner/pushSalaryInfoToEkp")
public Boolean pushSalaryInfoToEkp(@RequestBody List<EkpSalaryParam> unPushList) {
return salaryInfoService.pushSalaryInfoToEkp(unPushList);
}
}
package com.yifu.cloud.plus.v1.ekp.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.ekp.entity.EkpSalaryInfo;
import com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo;
import com.yifu.cloud.plus.v1.ekp.vo.EkpSocialSumInfoVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 工资明细表
*
* @author huyc
* @date 2024-03-11 11:21:56
*/
@Mapper
public interface EkpSalaryInfoMapper extends BaseMapper<EkpSalaryInfo> {
/**
* 获取所有项目信息
* @param
* @return
*/
List<EkpDeptInfoVo> getAllEkpDeptInfo();
/**
* 根据身份证和生成月份获取费用合计
* @param
* @return
*/
EkpSocialSumInfoVo getCostSumInfo(@Param("card") String empIdCard, @Param("month") String createMonth);
}
package com.yifu.cloud.plus.v1.ekp.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.ekp.entity.EkpSalaryInfo;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam;
import org.apache.shardingsphere.transaction.annotation.ShardingTransactionType;
import org.apache.shardingsphere.transaction.core.TransactionType;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* 工资明细表
*
* @author huyc
* @date 2024-03-11 11:21:56
*/
public interface EkpSalaryInfoService extends IService<EkpSalaryInfo> {
@Transactional
@ShardingTransactionType(TransactionType.BASE)
Boolean pushSalaryInfoToEkp(List<EkpSalaryParam> unPushList);
}
......@@ -8,12 +8,14 @@ import com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo;
import com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo;
import com.yifu.cloud.plus.v1.ekp.vo.EkpSocialSumInfoVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.BigDecimalUtils;
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.ekp.vo.EkpPushFundParam;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
......@@ -86,36 +88,36 @@ public class EkpFundInfoServiceImpl extends ServiceImpl<EkpFundInfoMapper, EkpFu
socialSumInfo = baseMapper.getCostSumInfo(fundInfo.getFd_3adfe8c7e4cf7a(), fundInfo.getFd_3adfe8cb96c41e());
//预估个人合计
Double ygPersonSum = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getYgPersonSum();
BigDecimal ygPersonSum = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getYgPersonSum());
//预估单位合计
Double ygDwSum = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getYgDwSum();
BigDecimal ygDwSum = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getYgDwSum());
//实缴单位合计
Double sjDwSum = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getSjDwSum();
BigDecimal sjDwSum = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getSjDwSum());
//实缴个人合计
Double sjPersonSum = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getSjPersonSum();
BigDecimal sjPersonSum = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getSjPersonSum());
//应收
Double ys = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getYs();
BigDecimal ys = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getYs());
//个人应收
Double personYs = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getPersonYs();
BigDecimal personYs = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getPersonYs());
//单位应收
Double dwYs = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getDwYs();
BigDecimal dwYs = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getDwYs());
//预估个人部分
Double yggr = Common.isEmpty(fundInfo.getFd_3adfeb52a4d2e2()) ? 0 : fundInfo.getFd_3adfeb52a4d2e2();
BigDecimal yggr = Common.isEmpty(fundInfo.getFd_3adfeb52a4d2e2()) ? BigDecimal.ZERO : BigDecimal.valueOf(fundInfo.getFd_3adfeb52a4d2e2());
//预估单位部分
Double ygdw = Common.isEmpty(fundInfo.getFd_3adfeb4e8064a8()) ? 0 : fundInfo.getFd_3adfeb4e8064a8();
BigDecimal ygdw = Common.isEmpty(fundInfo.getFd_3adfeb4e8064a8()) ? BigDecimal.ZERO : BigDecimal.valueOf(fundInfo.getFd_3adfeb4e8064a8());
//实缴单位部分
Double sjdw = Common.isEmpty(fundInfo.getFd_3adfeb52fbe966()) ? 0 : fundInfo.getFd_3adfeb52fbe966();
BigDecimal sjdw = Common.isEmpty(fundInfo.getFd_3adfeb52fbe966()) ? BigDecimal.ZERO : BigDecimal.valueOf(fundInfo.getFd_3adfeb52fbe966());
//实缴个人部分
Double sjgr = Common.isEmpty(fundInfo.getFd_3adfeb5366dd82()) ? 0 : fundInfo.getFd_3adfeb5366dd82();
BigDecimal sjgr = Common.isEmpty(fundInfo.getFd_3adfeb5366dd82()) ? BigDecimal.ZERO : BigDecimal.valueOf(fundInfo.getFd_3adfeb5366dd82());
//单位差异
if ("是".equals(fundInfo.getFd_3add9de0be85e4()) && "实缴".equals(fundInfo.getFd_3add9dd7833db8())) {
//单位差异
//$列表.求总和$($公积金订单明细*总数(单位代缴)$)+$单位代缴$) -($列表.求总和$($公积金订单明细*总数(预估单位代缴)$) + $预估单位代缴$)
fundInfo.setFd_3adfeb53c70f72(Double.sum(Double.sum(sjDwSum, sjdw), -Double.sum(ygDwSum,yggr)));
fundInfo.setFd_3adfeb53c70f72(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjDwSum,sjdw),BigDecimalUtils.safeAdd(ygDwSum,yggr)).doubleValue());
//个人差异
//$列表.求总和$($公积金订单明细*总数(个人代缴)$)+ $个人代缴$ - $列表.求总和$($公积金订单明细*总数(预估个人代缴)$)
fundInfo.setFd_3adfeb5413fb44(Double.sum(Double.sum(sjPersonSum, sjgr), -ygPersonSum));
fundInfo.setFd_3adfeb5413fb44(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjPersonSum,sjgr),ygPersonSum).doubleValue());
}
//Fd_3adfeb7b624f06应收;Fd_3b35a65138a7fc个人应收;fd_3b35a6518b73b2单位应收
......@@ -130,13 +132,13 @@ public class EkpFundInfoServiceImpl extends ServiceImpl<EkpFundInfoMapper, EkpFu
if ("实缴".equals(deptInfo.getSettleType())) {
if ("预估".equals(fundInfo.getFd_3add9dd7833db8())) {
//$列表.求总和$($公积金订单明细*总数(预估单位代缴)$) + $列表.求总和$($公积金订单明细*总数(预估个人代缴)$) + $预估个人代缴$ + $预估单位代缴$ - $列表.求总和$($公积金订单明细*总数(应收)$)
fundInfo.setFd_3adfeb7b624f06(Double.sum(Double.sum(ygDwSum, ygPersonSum),Double.sum(yggr,ygdw) -ys));
fundInfo.setFd_3adfeb7b624f06(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(ygDwSum,ygPersonSum,yggr,ygdw),ys).doubleValue());
//$列表.求总和$($公积金订单明细*总数(预估个人代缴)$) + $预估个人代缴$ - $列表.求总和$($公积金订单明细*总数(个人应收)$)
fundInfo.setFd_3b35a65138a7fc(Double.sum(Double.sum(ygPersonSum, yggr), -personYs));
fundInfo.setFd_3b35a65138a7fc(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(ygPersonSum, yggr),personYs).doubleValue());
//$列表.求总和$($公积金订单明细*总数(预估单位代缴)$) + $预估单位代缴$ - $列表.求总和$($公积金订单明细*总数(单位应收)$)
fundInfo.setFd_3b35a6518b73b2(Double.sum(Double.sum(ygDwSum, ygdw), -dwYs));
fundInfo.setFd_3b35a6518b73b2(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(ygDwSum, ygdw),dwYs).doubleValue());
} else {
if (Double.sum(ygDwSum, ygPersonSum) > 0) {
if (BigDecimalUtils.safeAdd(ygDwSum, ygPersonSum).doubleValue() > 0) {
//应收
fundInfo.setFd_3adfeb7b624f06(CommonConstants.ZERO_INTEGER.doubleValue());
//个人应收
......@@ -145,28 +147,28 @@ public class EkpFundInfoServiceImpl extends ServiceImpl<EkpFundInfoMapper, EkpFu
fundInfo.setFd_3b35a6518b73b2(CommonConstants.ZERO_INTEGER.doubleValue());
} else {
// $列表.求总和$($公积金订单明细*总数(单位代缴)$) +$列表.求总和$($公积金订单明细*总数(个人代缴)$) + $单位代缴$ + $个人代缴$ - $列表.求总和$($公积金订单明细*总数(应收)$)
fundInfo.setFd_3adfeb7b624f06(Double.sum(Double.sum(sjDwSum, sjPersonSum),Double.sum(sjdw,sjgr) -ys));
fundInfo.setFd_3adfeb7b624f06(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjDwSum,sjPersonSum,sjdw,sjgr),ys).doubleValue());
//$列表.求总和$($公积金订单明细*总数(个人代缴)$) + $个人代缴$ - $列表.求总和$($公积金订单明细*总数(个人应收)$)
fundInfo.setFd_3b35a65138a7fc(Double.sum(Double.sum(sjPersonSum, sjgr), -personYs));
fundInfo.setFd_3b35a65138a7fc(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjPersonSum,sjgr),personYs).doubleValue());
//$列表.求总和$($公积金订单明细*总数(单位代缴)$) + $单位代缴$ - $列表.求总和$($公积金订单明细*总数(单位应收)$)
fundInfo.setFd_3b35a6518b73b2(Double.sum(Double.sum(sjDwSum, sjdw), -dwYs));
fundInfo.setFd_3b35a6518b73b2(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjDwSum,sjdw),dwYs).doubleValue());
}
}
} else {
if ("预估".equals(fundInfo.getFd_3add9dd7833db8())) {
// $列表.求总和$($公积金订单明细*总数(预估个人代缴)$) + $列表.求总和$($公积金订单明细*总数(预估单位代缴)$) + $预估个人代缴$ + $预估单位代缴$ -$列表.求总和$($公积金订单明细*总数(应收)$)
fundInfo.setFd_3adfeb7b624f06(Double.sum(Double.sum(ygPersonSum, ygDwSum),Double.sum(yggr,ygdw) -ys));
fundInfo.setFd_3adfeb7b624f06(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(ygPersonSum,ygDwSum,yggr,ygdw),ys).doubleValue());
//$列表.求总和$($公积金订单明细*总数(预估个人代缴)$) + $预估个人代缴$ -$列表.求总和$($公积金订单明细*总数(个人应收)$)
fundInfo.setFd_3b35a65138a7fc(Double.sum(Double.sum(ygPersonSum, yggr), -personYs));
fundInfo.setFd_3b35a65138a7fc(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(ygPersonSum,yggr),personYs).doubleValue());
// $列表.求总和$($公积金订单明细*总数(预估单位代缴)$) + $预估单位代缴$ -$列表.求总和$($公积金订单明细*总数(单位应收)$)
fundInfo.setFd_3b35a6518b73b2(Double.sum(Double.sum(ygDwSum, ygdw), -dwYs));
fundInfo.setFd_3b35a6518b73b2(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(ygDwSum,ygdw),dwYs).doubleValue());
} else {
//$列表.求总和$($公积金订单明细*总数(单位代缴)$) +$列表.求总和$($公积金订单明细*总数(个人代缴)$) + $单位代缴$ + $个人代缴$ - $列表.求总和$($公积金订单明细*总数(应收)$)
fundInfo.setFd_3adfeb7b624f06(Double.sum(Double.sum(sjDwSum, sjPersonSum),Double.sum(sjdw,sjgr) -ys));
fundInfo.setFd_3adfeb7b624f06(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjDwSum,sjPersonSum,sjdw,sjgr),ys).doubleValue());
//$列表.求总和$($公积金订单明细*总数(个人代缴)$) + $个人代缴$ - $列表.求总和$($公积金订单明细*总数(个人应收)$)
fundInfo.setFd_3b35a65138a7fc(Double.sum(Double.sum(sjPersonSum, sjgr), -personYs));
fundInfo.setFd_3b35a65138a7fc(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjPersonSum,sjgr),personYs).doubleValue());
//$列表.求总和$($公积金订单明细*总数(单位代缴)$) + $单位代缴$ - $列表.求总和$($公积金订单明细*总数(单位应收)$)
fundInfo.setFd_3b35a6518b73b2(Double.sum(Double.sum(sjDwSum, sjdw), -dwYs));
fundInfo.setFd_3b35a6518b73b2(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjDwSum,sjdw),dwYs).doubleValue());
}
}
}
......@@ -201,7 +203,7 @@ public class EkpFundInfoServiceImpl extends ServiceImpl<EkpFundInfoMapper, EkpFu
}
}
} catch (Exception e) {
log.error("公积金明细推送失败");
log.error("公积金明细推送失败",e);
return null;
}
return null;
......
package com.yifu.cloud.plus.v1.ekp.service.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.ekp.entity.EkpSalaryInfo;
import com.yifu.cloud.plus.v1.ekp.mapper.EkpSalaryInfoMapper;
import com.yifu.cloud.plus.v1.ekp.service.EkpSalaryInfoService;
import com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.BigDecimalUtils;
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.ekp.vo.EkpSalaryParam;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
/**
//工资明细表
*
//@author huyc
//@date 2024-03-11 11:21:56
*/
@Log4j2
@Service
public class EkpSalaryInfoServiceImpl extends ServiceImpl<EkpSalaryInfoMapper, EkpSalaryInfo> implements EkpSalaryInfoService {
/**
//@Description: 社保明细推送至ekp
//@Author: huyc
//@Date: 2024-3-11
//@return: void
**/
public Boolean pushSalaryInfoToEkp(List<EkpSalaryParam> unPushList) {
//插入数据集合
List<EkpSalaryInfo> salaryInfoList = new ArrayList<>();
//获取ekp所有项目信息
List<EkpDeptInfoVo> deptInfoVoList = baseMapper.getAllEkpDeptInfo();
Map<String,EkpDeptInfoVo> map = new HashMap<>();
EkpDeptInfoVo deptInfo;
if (Optional.ofNullable(deptInfoVoList).isPresent()) {
map = deptInfoVoList.stream().collect(Collectors.toMap(EkpDeptInfoVo::getDeptNo, k->k));
}
EkpSalaryInfo salaryInfoCount;
try {
for (EkpSalaryParam salaryParam : unPushList) {
//去重 防止重复推送
salaryInfoCount = baseMapper.selectOne(Wrappers.<EkpSalaryInfo>query().lambda()
.eq(EkpSalaryInfo::getFd_3b10afe8c70742, salaryParam.getFd_3b10af838eab5c())
.last(CommonConstants.LAST_ONE_SQL));
if (Optional.ofNullable(salaryInfoCount).isPresent()) {
continue;
}
EkpSalaryInfo salaryInfo = new EkpSalaryInfo();
//对象信息赋值
copySocialProperties(salaryParam, salaryInfo);
//项目信息
deptInfo = map.get(salaryInfo.getFd_3adfedf98ccba2());
salaryInfo.setFd_3b16e418905f52_text(deptInfo.getDeptName());
salaryInfo.setFd_3b16e418905f52(deptInfo.getFdId());
//实际结算月份
salaryInfo.setFd_3adfee0690737c(!"全量未结算数据".equals(deptInfo.getSocialType()) ? salaryInfo.getFd_3adfee0690737c() : "");
//是否全部结算
salaryInfo.setFd_3b13b1b91f5b34("全量未结算数据".equals(deptInfo.getSocialType()) ? "是" : "否");
//应收
salaryInfo.setFd_3adfee21802434("是".equals(salaryInfo.getFd_3b178f3e24cc32()) ? CommonConstants.ZERO_INTEGER.doubleValue() : salaryInfo.getFd_3adfee20fe5ba4());
//代扣费用应支出 = $个人社保$ Fd_3adfee1e88723e + $单位公积金$ Fd_3adfee1ee24680 + $个人公积金$ Fd_3adfee1f32fa24 + $单位社保$ Fd_3adfee1e2b2f78 + $个人代扣$ Fd_3adfee1374ed7a
BigDecimal zhichu1 = Common.isEmpty(salaryInfo.getFd_3adfee1e88723e()) ? BigDecimal.ZERO : BigDecimal.valueOf(salaryInfo.getFd_3adfee1e88723e());
BigDecimal zhichu2 = Common.isEmpty(salaryInfo.getFd_3adfee1ee24680()) ? BigDecimal.ZERO : BigDecimal.valueOf(salaryInfo.getFd_3adfee1ee24680());
BigDecimal zhichu3 = Common.isEmpty(salaryInfo.getFd_3adfee1f32fa24()) ? BigDecimal.ZERO : BigDecimal.valueOf(salaryInfo.getFd_3adfee1f32fa24());
BigDecimal zhichu4 = Common.isEmpty(salaryInfo.getFd_3adfee1e2b2f78()) ? BigDecimal.ZERO : BigDecimal.valueOf(salaryInfo.getFd_3adfee1e2b2f78());
BigDecimal zhichu5 = Common.isEmpty(salaryInfo.getFd_3adfee1374ed7a()) ? BigDecimal.ZERO : BigDecimal.valueOf(salaryInfo.getFd_3adfee1374ed7a());
// salaryInfo.setFd_3adfeeb34ea0ea(Arrays.stream(numbers).reduce(Double::sum).orElse(0.0));
salaryInfo.setFd_3adfeeb34ea0ea(BigDecimalUtils.safeAdd(zhichu1,zhichu2,zhichu3,zhichu4,zhichu5).doubleValue());
//创建时间
salaryInfo.setCreateTime(DateUtil.getCurrentDateTime());
salaryInfoList.add(salaryInfo);
}
if (!salaryInfoList.isEmpty()) {
boolean flag = this.saveBatch(salaryInfoList);
if (flag) {
//推送成功
return true;
}
}
}catch (Exception e) {
log.error("工资明细推送失败");
return false;
}
return false;
}
private void copySocialProperties(EkpSalaryParam salaryParam,EkpSalaryInfo salaryInfo) {
//项目编码
salaryInfo.setFd_3adfedf98ccba2(salaryParam.getFd_3adfedf98ccba2());
//项目名称
salaryInfo.setFd_3adfedf9d2bf1c(salaryParam.getFd_3adfedf9d2bf1c());
//单号
salaryInfo.setFd_3adfedfa4410aa(salaryParam.getFd_3adfedfa4410aa());
//客户编码
salaryInfo.setFd_3adfedfacd65d6(salaryParam.getFd_3adfedfacd65d6());
//客户名称
salaryInfo.setFd_3adfedfb174068(salaryParam.getFd_3adfedfb174068());
//税务主体
salaryInfo.setFd_3afab16f356672(salaryParam.getFd_3afab1895feea2());
//姓名
salaryInfo.setFd_3adfedfb5a68a2(salaryParam.getFd_3adfedfb5a68a2());
//身份证号
salaryInfo.setFd_3adfedfb8f76d4(salaryParam.getFd_3adfedfb8f76d4());
//手机号
salaryInfo.setFd_3adfedfbd23ab8(salaryParam.getFd_3adfedfbd23ab8());
//银行卡号
salaryInfo.setFd_3adfedfcb17f1e(salaryParam.getFd_3adfedfcb17f1e());
//开户行
salaryInfo.setFd_3adfedfc453cc4(salaryParam.getFd_3adfedfc453cc4());
//暂停发
salaryInfo.setFd_3af9d5874f8166(salaryParam.getFd_3af9d49d165e90());
//工资月份
salaryInfo.setFd_3adfee063acff0(salaryParam.getFd_3adfee063acff0());
//是否薪资扣税
salaryInfo.setFd_3adfee01668666(salaryParam.getFd_3adfee01668666());
//社保优先级
salaryInfo.setFd_3adfedfed8bb28(salaryParam.getFd_3adfedfed8bb28());
//公积金优先级
salaryInfo.setFd_3adfedff3a7430(salaryParam.getFd_3adfedff3a7430());
//是否自有员工
salaryInfo.setFd_3adfee0009d070(salaryParam.getFd_3adfee0009d070());
//年终奖扣税方案
salaryInfo.setFd_3adfee01dea2fa(salaryParam.getFd_3adfee01dea2fa());
//工资id
salaryInfo.setFd_3b10afe8c70742(salaryParam.getFd_3b10af838eab5c());
//HRO结算月份
salaryInfo.setFd_3b13b1d1ff9678(salaryParam.getFd_3adfee0690737c());
//是否为BPO业务
salaryInfo.setFd_3b178f3e24cc32(salaryParam.getFd_3b178f0ded2114());
//结算月份
salaryInfo.setFd_3adfee0690737c(salaryParam.getFd_3adfee0690737c());
//薪酬申请编号
salaryInfo.setFd_3b3beee3ec7e12(salaryParam.getFd_3b3bef19b61c38());
//开户行支行
salaryInfo.setFd_3b73c214e52982(salaryParam.getFd_3b73de2809465a());
//初始化导入
salaryInfo.setFd_3b84d6a6c7b8f0("");
//发放方式
salaryInfo.setFd_3bbc0711464020(salaryParam.getFd_3bbbfdd1fc2950());
//创建人
salaryInfo.setFd_3c3e5ff65115a2(salaryParam.getFd_3c3e5ff65115a2());
//应发工资
salaryInfo.setFd_3adfee12cb8840(CommonConstants.EMPTY_STRING.equals(salaryParam.getFd_3adfee12cb8840()) ? null : Double.parseDouble(salaryParam.getFd_3adfee12cb8840()));
//个人代扣
salaryInfo.setFd_3adfee1374ed7a(CommonConstants.EMPTY_STRING.equals(salaryParam.getFd_3adfee1374ed7a()) ? null : Double.parseDouble(salaryParam.getFd_3adfee1374ed7a()));
//单位社保
salaryInfo.setFd_3adfee1e2b2f78(CommonConstants.EMPTY_STRING.equals(salaryParam.getFd_3adfee1e2b2f78()) ? null : Double.parseDouble(salaryParam.getFd_3adfee1e2b2f78()));
//个人社保
salaryInfo.setFd_3adfee1e88723e(CommonConstants.EMPTY_STRING.equals(salaryParam.getFd_3adfee1e88723e()) ? null : Double.parseDouble(salaryParam.getFd_3adfee1e88723e()));
//代扣个人社保
salaryInfo.setFd_3b16cecc2bbd16(CommonConstants.EMPTY_STRING.equals(salaryParam.getFd_3b16ce48a9735c()) ? null : Double.parseDouble(salaryParam.getFd_3b16ce48a9735c()));
//单位公积金
salaryInfo.setFd_3adfee1ee24680(CommonConstants.EMPTY_STRING.equals(salaryParam.getFd_3adfee1ee24680()) ? null : Double.parseDouble(salaryParam.getFd_3adfee1ee24680()));
//个人公积金
salaryInfo.setFd_3adfee1f32fa24(CommonConstants.EMPTY_STRING.equals(salaryParam.getFd_3adfee1f32fa24()) ? null : Double.parseDouble(salaryParam.getFd_3adfee1f32fa24()));
//代扣个人公积金
salaryInfo.setFd_3b16cecd47a856(CommonConstants.EMPTY_STRING.equals(salaryParam.getFd_3b16ce4b7fc42a()) ? null : Double.parseDouble(salaryParam.getFd_3b16ce4b7fc42a()));
//个税
salaryInfo.setFd_3adfee1f901c46(CommonConstants.EMPTY_STRING.equals(salaryParam.getFd_3adfee1f901c46()) ? null : Double.parseDouble(salaryParam.getFd_3adfee1f901c46()));
//企业年金单位
salaryInfo.setFd_3adfee1ff1ca6a(CommonConstants.EMPTY_STRING.equals(salaryParam.getFd_3adfee1ff1ca6a()) ? null : Double.parseDouble(salaryParam.getFd_3adfee1ff1ca6a()));
//企业年金个人
salaryInfo.setFd_3adfee203f86b2(CommonConstants.EMPTY_STRING.equals(salaryParam.getFd_3adfee203f86b2()) ? null : Double.parseDouble(salaryParam.getFd_3adfee203f86b2()));
//实发合计
salaryInfo.setFd_3adfee20fe5ba4(CommonConstants.EMPTY_STRING.equals(salaryParam.getFd_3adfee20fe5ba4()) ? null : Double.parseDouble(salaryParam.getFd_3adfee20fe5ba4()));
//应发工资(导表金额)
salaryInfo.setFd_3bcdeed22ec8dc(salaryParam.getFd_3bcdee91cacb6c());
//个人社保(不含代扣)
salaryInfo.setFd_3bcd3119a295be(salaryParam.getFd_3bcd41d0ae6648());
//个人公积金(不含代扣)
salaryInfo.setFd_3bcd311a72d000(salaryParam.getFd_3bcd41d65d5bb2());
//暂停发金额
salaryInfo.setFd_3bcd34a8c296c8(salaryParam.getFd_3bcd41de98a582());
//单位社保(不含代扣)
salaryInfo.setFd_3bcd3100f45ca2(salaryParam.getFd_3bcd41db081b72());
//单位公积金(不含代扣)
salaryInfo.setFd_3bcd3101d95dd8(salaryParam.getFd_3bcd41d1f6f58a());
//代扣单位公积金
salaryInfo.setFd_3bcd3102f612ea(salaryParam.getFd_3bcd41d77e4812());
//个人代扣明细
salaryInfo.setFd_3bcd2f180f2a8c(salaryParam.getFd_3bcd41dc41cf6a());
//个人代扣合计
salaryInfo.setFd_3bcd2f18fd1840(salaryParam.getFd_3bcd41d361534e());
//代扣单位社保
salaryInfo.setFd_3bcd2f1a073260(salaryParam.getFd_3bcd41d857b764());
//免个税个人代扣
salaryInfo.setFd_3bcd2ef618ee54(salaryParam.getFd_3bcd41dd8b4232());
//代扣当月个人税
salaryInfo.setFd_3bcd2ef727ac6a(salaryParam.getFd_3bcd41d453de50());
//代扣个人年终奖税
salaryInfo.setFd_3bcd2ef8728fe0(salaryParam.getFd_3bcd41d939aa64());
//实发工资(银付)
salaryInfo.setFd_3bcd2e6259fdbe(salaryParam.getFd_3bcd41d550a756());
//实发工资(现金)
salaryInfo.setFd_3bcd2e63600446(salaryParam.getFd_3bcd41da212afe());
//单位待补足
salaryInfo.setFd_3bcd2e64868de6(salaryParam.getFd_3bcd41dfb9f00e());
//收入结算状态
salaryInfo.setFd_3adfee4ba5ad36("未结算");
//收款状态
salaryInfo.setFd_3adfee4c0c59ee("未收");
//代扣费用结算状态
salaryInfo.setFd_3adfeededfb5a6("未结算");
//代扣费用付款状态
salaryInfo.setFd_3adfeed3a20598("未收");
//个税结算状态
salaryInfo.setFd_3adfeef8ef38fc("未结算");
//个税付款状态
salaryInfo.setFd_3adfeedd08222c("未收");
//工资实发结算状态
salaryInfo.setFd_3adfeef9440ab2("未结算");
//实发合计付款状态
salaryInfo.setFd_3adfeedd5f3cb2("未收");
//企业年金单位结算状态
salaryInfo.setFd_3adfeef9b9fb3e("未结算");
//企业年金单位付款状态
salaryInfo.setFd_3adfeeddacf6d4("未收");
//企业年金个人结算状态
salaryInfo.setFd_3adfeefa1eba32("未结算");
//企业年金个人付款状态
salaryInfo.setFd_3adfeede08d430("未收");
//个税应支出
salaryInfo.setFd_3adfeec6db8766(CommonConstants.EMPTY_STRING.equals(salaryParam.getFd_3adfee1f901c46()) ? null : Double.parseDouble(salaryParam.getFd_3adfee1f901c46()));
//实发合计应支出
salaryInfo.setFd_3adfeec730ec44(CommonConstants.EMPTY_STRING.equals(salaryParam.getFd_3adfee20fe5ba4()) ? null : Double.parseDouble(salaryParam.getFd_3adfee20fe5ba4()));
//企业年金单位应支出
salaryInfo.setFd_3adfeec782070a(CommonConstants.EMPTY_STRING.equals(salaryParam.getFd_3adfeec782070a()) ? null : Double.parseDouble(salaryParam.getFd_3adfeec782070a()));
//企业年金个人应支出
salaryInfo.setFd_3adfeec7ccdd1c(CommonConstants.EMPTY_STRING.equals(salaryParam.getFd_3adfee203f86b2()) ? null : Double.parseDouble(salaryParam.getFd_3adfee203f86b2()));
}
/**
* @Description: 推送ekp时更改日期格式
* @Author: huyc
**/
public String dateStringInsert(String month) {
StringBuilder sb = new StringBuilder(month);
sb.insert(4, "-");
return sb.toString();
}
}
......@@ -9,6 +9,7 @@ import com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo;
import com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo;
import com.yifu.cloud.plus.v1.ekp.vo.EkpSocialSumInfoVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.BigDecimalUtils;
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.ekp.vo.EkpPushSocialParam;
......@@ -16,6 +17,7 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentSocialPush;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
......@@ -92,36 +94,44 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
//获取社保订单明细合计
socialSumInfo = baseMapper.getCostSumInfo(socialInfo.getFd_3adfe8c7e4cf7a(), socialInfo.getFd_3adfe8cb96c41e());
//预估合计
Double ygSum = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getYgSum();
BigDecimal ygSum = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getYgSum());
//预估个人合计
Double ygPersonSum = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getYgPersonSum();
BigDecimal ygPersonSum = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getYgPersonSum());
//实缴合计
Double sjSum = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getSjSum();
BigDecimal sjSum = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getSjSum());
//预估单位合计
Double ygDwSum = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getYgDwSum();
BigDecimal ygDwSum = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getYgDwSum());
//实缴单位合计
Double sjDwSum = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getSjDwSum();
BigDecimal sjDwSum = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getSjDwSum());
//实缴个人合计
Double sjPersonSum = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getSjPersonSum();
BigDecimal sjPersonSum = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getSjPersonSum());
//应收
Double ys = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getYs();
BigDecimal ys = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getYs());
//个人应收
Double personYs = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getPersonYs();
BigDecimal personYs = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getPersonYs());
//单位应收
Double dwYs = Common.isEmpty(socialSumInfo) ? 0 : socialSumInfo.getDwYs();
BigDecimal dwYs = Common.isEmpty(socialSumInfo) ? BigDecimal.ZERO : BigDecimal.valueOf(socialSumInfo.getDwYs());
//实缴单位合计
Double shdw = Common.isEmpty(socialInfo.getFd_3af9f2e9208e4e()) ? 0 : socialInfo.getFd_3af9f2e9208e4e();
BigDecimal shdw = Common.isEmpty(socialInfo.getFd_3af9f2e9208e4e()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3af9f2e9208e4e());
//实缴个人合计
Double shgr = Common.isEmpty(socialInfo.getFd_3af9f303037214()) ? 0 : socialInfo.getFd_3af9f303037214();
BigDecimal shgr = Common.isEmpty(socialInfo.getFd_3af9f303037214()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3af9f303037214());
//预估合计
BigDecimal yghj = Common.isEmpty(socialInfo.getFd_3af9f2883941b4()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3af9f2883941b4());
//预估个人合计
BigDecimal yggrhj = Common.isEmpty(socialInfo.getFd_3af9f285ee1e38()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3af9f285ee1e38());
//预估单位部分
BigDecimal ygdwbf = Common.isEmpty(socialInfo.getFd_3adfeb4e8064a8()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3adfeb4e8064a8());
//实缴合计
BigDecimal sjhj = Common.isEmpty(socialInfo.getFd_3af9f3059e5b9c()) ? BigDecimal.ZERO : BigDecimal.valueOf(socialInfo.getFd_3af9f3059e5b9c());
//单位差异
if ("是".equals(socialInfo.getFd_3add9de0be85e4()) && "实缴".equals(socialInfo.getFd_3add9dd7833db8())) {
//单位差异
//$列表.求总和$($社保订单明细*总数(实缴单位合计)$)+ $实缴单位合计$ - $列表.求总和$($社保订单明细*总数(预估单位合计)$)
socialInfo.setFd_3adfeb53c70f72(Double.sum(Double.sum(sjDwSum, shdw), -ygDwSum));
socialInfo.setFd_3adfeb53c70f72(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjDwSum, shdw),ygDwSum).doubleValue());
//个人差异
//$列表.求总和$($社保订单明细*总数(实缴个人合计)$)+ $实缴个人合计$ - $列表.求总和$($社保订单明细*总数(预估个人合计)$)
socialInfo.setFd_3adfeb5413fb44(Double.sum(Double.sum(sjPersonSum, shgr), -ygPersonSum));
socialInfo.setFd_3adfeb5413fb44(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjPersonSum, shgr),ygPersonSum).doubleValue());
}
//Fd_3adfeb7b624f06应收;Fd_3b35a57aee1428个人应收;fd_3b35a57b6e9d0a单位应收
......@@ -136,13 +146,13 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
if ("实缴".equals(deptInfo.getSettleType())) {
if ("预估".equals(socialInfo.getFd_3add9dd7833db8())) {
//$列表.求总和$($社保订单明细*总数(预估合计)$) + $预估合计$ - $列表.求总和$($社保订单明细*总数(应收)$)
socialInfo.setFd_3adfeb7b624f06(Double.sum(Double.sum(ygSum, socialInfo.getFd_3af9f2883941b4()), -ys));
socialInfo.setFd_3adfeb7b624f06(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(ygSum, yghj),ys).doubleValue());
//$列表.求总和$($社保订单明细*总数(预估个人合计)$) + $预估个人合计$ - $列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo.setFd_3b35a57aee1428(Double.sum(Double.sum(ygPersonSum, socialInfo.getFd_3af9f285ee1e38()), -personYs));
socialInfo.setFd_3b35a57aee1428(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(ygPersonSum, yggrhj),personYs).doubleValue());
//$列表.求总和$($社保订单明细*总数(预估单位合计)$) + $预估单位合计$ - $列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo.setFd_3b35a57b6e9d0a(Double.sum(Double.sum(ygDwSum, socialInfo.getFd_3adfeb4e8064a8()), -dwYs));
socialInfo.setFd_3b35a57b6e9d0a(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(ygDwSum, ygdwbf),dwYs).doubleValue());
} else {
if (ygSum > 0) {
if (ygSum.doubleValue() > 0) {
//应收
socialInfo.setFd_3adfeb7b624f06(CommonConstants.ZERO_INTEGER.doubleValue());
//个人应收
......@@ -151,28 +161,28 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
socialInfo.setFd_3b35a57b6e9d0a(CommonConstants.ZERO_INTEGER.doubleValue());
} else {
//$列表.求总和$($社保订单明细*总数(实缴合计)$)+ $实缴合计$ - $列表.求总和$($社保订单明细*总数(应收)$)
socialInfo.setFd_3adfeb7b624f06(Double.sum(Double.sum(sjSum, socialInfo.getFd_3af9f3059e5b9c()), -ys));
socialInfo.setFd_3adfeb7b624f06(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjSum, sjhj),ys).doubleValue());
//$列表.求总和$($社保订单明细*总数(实缴个人合计)$)+ $实缴个人合计$ - $列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo.setFd_3b35a57aee1428(Double.sum(Double.sum(sjPersonSum, shgr), -personYs));
socialInfo.setFd_3b35a57aee1428(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjPersonSum, shgr),personYs).doubleValue());
//列表.求总和$($社保订单明细*总数(实缴单位合计)$)+ $实缴单位合计$ - $列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo.setFd_3b35a57b6e9d0a(Double.sum(Double.sum(sjDwSum, shdw), -dwYs));
socialInfo.setFd_3b35a57b6e9d0a(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjDwSum, shdw),dwYs).doubleValue());
}
}
} else {
if ("预估".equals(socialInfo.getFd_3add9dd7833db8())) {
//$列表.求总和$($社保订单明细*总数(预估合计)$) + $预估合计$-$列表.求总和$($社保订单明细*总数(应收)$)
socialInfo.setFd_3adfeb7b624f06(Double.sum(Double.sum(ygSum, socialInfo.getFd_3af9f2883941b4()), -ys));
socialInfo.setFd_3adfeb7b624f06(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(ygSum, yghj),ys).doubleValue());
//$列表.求总和$( $社保订单明细*总数(预估个人合计)$) + $预估个人合计$-$列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo.setFd_3b35a57aee1428(Double.sum(Double.sum(ygPersonSum, socialInfo.getFd_3af9f285ee1e38()), -personYs));
socialInfo.setFd_3b35a57aee1428(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(ygPersonSum, yggrhj),personYs).doubleValue());
//$列表.求总和$($社保订单明细*总数(预估单位合计)$) + $预估单位合计$-$列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo.setFd_3b35a57b6e9d0a(Double.sum(Double.sum(ygDwSum, socialInfo.getFd_3adfeb4e8064a8()), -dwYs));
socialInfo.setFd_3b35a57b6e9d0a(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(ygDwSum, ygdwbf),dwYs).doubleValue());
} else {
//$列表.求总和$($社保订单明细*总数(实缴合计)$)+ $实缴合计$ - $列表.求总和$($社保订单明细*总数(应收)$)
socialInfo.setFd_3adfeb7b624f06(Double.sum(Double.sum(sjSum, socialInfo.getFd_3af9f3059e5b9c()), -ys));
socialInfo.setFd_3adfeb7b624f06(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjSum, sjhj),ys).doubleValue());
//$列表.求总和$($社保订单明细*总数(实缴个人合计)$)+ $实缴个人合计$ - $列表.求总和$($社保订单明细*总数(个人应收)$)
socialInfo.setFd_3b35a57aee1428(Double.sum(Double.sum(sjPersonSum, shgr), -personYs));
socialInfo.setFd_3b35a57aee1428(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjPersonSum, shgr),personYs).doubleValue());
//$列表.求总和$($社保订单明细*总数(实缴单位合计)$)+ $实缴单位合计$ - $列表.求总和$($社保订单明细*总数(单位应收)$)
socialInfo.setFd_3b35a57b6e9d0a(Double.sum(Double.sum(sjDwSum, shdw), -dwYs));
socialInfo.setFd_3b35a57b6e9d0a(BigDecimalUtils.safeSubtract(false,BigDecimalUtils.safeAdd(sjDwSum, shdw),dwYs).doubleValue());
}
}
}
......@@ -217,7 +227,7 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
}
}
}catch (Exception e) {
log.error("社保明细推送失败");
log.error("社保明细推送失败",e);
return null;
}
return null;
......@@ -328,6 +338,8 @@ public class EkpSocialInfoServiceImpl extends ServiceImpl<EkpSocialInfoMapper, E
socialInfo.setFd_3add9ea428879a(socialParam.getFd_3add9ea428879a());
//收款状态
socialInfo.setFd_3add9eaeed2560("未收");
//支出结算状态
socialInfo.setFd_3add9edfbc6f7e("未结算");
//付款状态
socialInfo.setFd_3add9eed23894a("未付");
}
......
<?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.ekp.mapper.EkpSalaryInfoMapper">
<resultMap id="ekpSalaryInfoMap" type="com.yifu.cloud.plus.v1.ekp.entity.EkpSalaryInfo">
<id property="fd_id" column="fd_id"/>
<result property="fd_3adfedf98ccba2" column="fd_3adfedf98ccba2"/>
<result property="fd_3adfedf9d2bf1c" column="fd_3adfedf9d2bf1c"/>
<result property="fd_3adfedfa4410aa" column="fd_3adfedfa4410aa"/>
<result property="fd_3adfedfacd65d6" column="fd_3adfedfacd65d6"/>
<result property="fd_3adfedfb174068" column="fd_3adfedfb174068"/>
<result property="fd_3adfedfb5a68a2" column="fd_3adfedfb5a68a2"/>
<result property="fd_3adfedfb8f76d4" column="fd_3adfedfb8f76d4"/>
<result property="fd_3adfedfbd23ab8" column="fd_3adfedfbd23ab8"/>
<result property="fd_3adfedfcb17f1e" column="fd_3adfedfcb17f1e"/>
<result property="fd_3adfedfc453cc4" column="fd_3adfedfc453cc4"/>
<result property="fd_3adfee063acff0" column="fd_3adfee063acff0"/>
<result property="fd_3adfee0690737c" column="fd_3adfee0690737c"/>
<result property="fd_3adfee01668666" column="fd_3adfee01668666"/>
<result property="fd_3adfedfed8bb28" column="fd_3adfedfed8bb28"/>
<result property="fd_3adfedff3a7430" column="fd_3adfedff3a7430"/>
<result property="fd_3adfee0009d070" column="fd_3adfee0009d070"/>
<result property="fd_3adfee01dea2fa" column="fd_3adfee01dea2fa"/>
<result property="fd_3adfee12cb8840" column="fd_3adfee12cb8840"/>
<result property="fd_3adfee1374ed7a" column="fd_3adfee1374ed7a"/>
<result property="fd_3adfee1e2b2f78" column="fd_3adfee1e2b2f78"/>
<result property="fd_3adfee1e88723e" column="fd_3adfee1e88723e"/>
<result property="fd_3adfee1ee24680" column="fd_3adfee1ee24680"/>
<result property="fd_3adfee1f32fa24" column="fd_3adfee1f32fa24"/>
<result property="fd_3adfee1f901c46" column="fd_3adfee1f901c46"/>
<result property="fd_3adfee1ff1ca6a" column="fd_3adfee1ff1ca6a"/>
<result property="fd_3adfee203f86b2" column="fd_3adfee203f86b2"/>
<result property="fd_3adfee20fe5ba4" column="fd_3adfee20fe5ba4"/>
<result property="fd_3adfee21802434" column="fd_3adfee21802434"/>
<result property="fd_3adfee4ba5ad36" column="fd_3adfee4ba5ad36"/>
<result property="fd_3adfee4c0c59ee" column="fd_3adfee4c0c59ee"/>
<result property="fd_3adfee5dd14866" column="fd_3adfee5dd14866"/>
<result property="fd_3adfee5e3d1638" column="fd_3adfee5e3d1638"/>
<result property="fd_3adfeeb34ea0ea" column="fd_3adfeeb34ea0ea"/>
<result property="fd_3adfeededfb5a6" column="fd_3adfeededfb5a6"/>
<result property="fd_3adfeed3a20598" column="fd_3adfeed3a20598"/>
<result property="fd_3adfeec6db8766" column="fd_3adfeec6db8766"/>
<result property="fd_3adfeef8ef38fc" column="fd_3adfeef8ef38fc"/>
<result property="fd_3adfeedd08222c" column="fd_3adfeedd08222c"/>
<result property="fd_3adfeec730ec44" column="fd_3adfeec730ec44"/>
<result property="fd_3adfeef9440ab2" column="fd_3adfeef9440ab2"/>
<result property="fd_3adfeedd5f3cb2" column="fd_3adfeedd5f3cb2"/>
<result property="fd_3adfeec782070a" column="fd_3adfeec782070a"/>
<result property="fd_3adfeef9b9fb3e" column="fd_3adfeef9b9fb3e"/>
<result property="fd_3adfeeddacf6d4" column="fd_3adfeeddacf6d4"/>
<result property="fd_3adfeec7ccdd1c" column="fd_3adfeec7ccdd1c"/>
<result property="fd_3adfeefa1eba32" column="fd_3adfeefa1eba32"/>
<result property="fd_3adfeede08d430" column="fd_3adfeede08d430"/>
<result property="fd_3aea309696d32e" column="fd_3aea309696d32e"/>
<result property="fd_3aea30866d0c30" column="fd_3aea30866d0c30"/>
<result property="fd_3aeadf182ef6a2" column="fd_3aeadf182ef6a2"/>
<result property="fd_3aeadf1992544c" column="fd_3aeadf1992544c"/>
<result property="fd_3aeadf17522642" column="fd_3aeadf17522642"/>
<result property="fd_3aeadf191c62a0" column="fd_3aeadf191c62a0"/>
<result property="fd_3aeadede4cea84" column="fd_3aeadede4cea84"/>
<result property="fd_3aeadee1cf1266" column="fd_3aeadee1cf1266"/>
<result property="fd_3aeadf1892fdb2" column="fd_3aeadf1892fdb2"/>
<result property="fd_3aeadf17b7d03a" column="fd_3aeadf17b7d03a"/>
<result property="fd_3af9d5874f8166" column="fd_3af9d5874f8166"/>
<result property="fd_3afaa69ad4d16a" column="fd_3afaa69ad4d16a"/>
<result property="fd_3afab16f356672" column="fd_3afab16f356672"/>
<result property="fd_3b10afe8c70742" column="fd_3b10afe8c70742"/>
<result property="fd_3b13b1b91f5b34" column="fd_3b13b1b91f5b34"/>
<result property="fd_3b13b1d1ff9678" column="fd_3b13b1d1ff9678"/>
<result property="fd_3b16cecc2bbd16" column="fd_3b16cecc2bbd16"/>
<result property="fd_3b16cecd47a856" column="fd_3b16cecd47a856"/>
<result property="fd_3b16e418905f52" column="fd_3b16e418905f52"/>
<result property="fd_3b16e418905f52_text" column="fd_3b16e418905f52_text"/>
<result property="fd_3b178f3e24cc32" column="fd_3b178f3e24cc32"/>
<result property="fd_3b3beee3ec7e12" column="fd_3b3beee3ec7e12"/>
<result property="fd_3b73c214e52982" column="fd_3b73c214e52982"/>
<result property="fd_3b84d6a6c7b8f0" column="fd_3b84d6a6c7b8f0"/>
<result property="fd_3b9893328ffb46" column="fd_3b9893328ffb46"/>
<result property="fd_3bbc0711464020" column="fd_3bbc0711464020"/>
<result property="fd_3bcd2e63600446" column="fd_3bcd2e63600446"/>
<result property="fd_3bcd2e64868de6" column="fd_3bcd2e64868de6"/>
<result property="fd_3bcd2e6259fdbe" column="fd_3bcd2e6259fdbe"/>
<result property="fd_3bcd2f1a073260" column="fd_3bcd2f1a073260"/>
<result property="fd_3bcd2f180f2a8c" column="fd_3bcd2f180f2a8c"/>
<result property="fd_3bcd3102f612ea" column="fd_3bcd3102f612ea"/>
<result property="fd_3bcd2ef618ee54" column="fd_3bcd2ef618ee54"/>
<result property="fd_3bcd3119a295be" column="fd_3bcd3119a295be"/>
<result property="fd_3bcdeed22ec8dc" column="fd_3bcdeed22ec8dc"/>
<result property="fd_3bcd34a8c296c8" column="fd_3bcd34a8c296c8"/>
<result property="fd_3bcd2ef8728fe0" column="fd_3bcd2ef8728fe0"/>
<result property="fd_3bcd2f18fd1840" column="fd_3bcd2f18fd1840"/>
<result property="fd_3bcd3100f45ca2" column="fd_3bcd3100f45ca2"/>
<result property="fd_3bcd2ef727ac6a" column="fd_3bcd2ef727ac6a"/>
<result property="fd_3bcd3101d95dd8" column="fd_3bcd3101d95dd8"/>
<result property="fd_3bcd311a72d000" column="fd_3bcd311a72d000"/>
<result property="fd_3bee2056eeb800" column="fd_3bee2056eeb800"/>
<result property="fd_3c3e5ff65115a2" column="fd_3c3e5ff65115a2"/>
</resultMap>
<!--tPaymentInfo合并查询-->
<select id="getAllEkpDeptInfo" resultType="com.yifu.cloud.plus.v1.ekp.vo.EkpDeptInfoVo">
SELECT
a.fd_id as fdId,
a.fd_3b1480cd9dcb60 as settleType,
a.fd_3b15f64dd59a28 as isBpo,
a.fd_3b13b28d4123ee as socialType,
a.fd_3a2b38c61ef9aa as deptName,
a.fd_3a37fe508071fe as deptNo
from ekp_24a8e6a7fc143bb8c48a a
group by fd_3a37fe508071fe
</select>
<!--tPaymentInfo合并查询-->
<select id="getCostSumInfo" resultType="com.yifu.cloud.plus.v1.ekp.vo.EkpSocialSumInfoVo">
SELECT
round(sum(ifnull(fd_3af9f2883941b4,0)),2) as ygSum,
round(sum(ifnull(fd_3af9f285ee1e38,0)),2) as ygPersonSum,
round(sum(ifnull(fd_3af9f3059e5b9c,0)),2) as sjSum,
round(sum(ifnull(fd_3adfeb4e8064a8,0)),2) as ygDwSum,
round(sum(ifnull(fd_3af9f2e9208e4e,0)),2) as sjDwSum,
round(sum(ifnull(fd_3af9f303037214,0)),2) as sjPersonSum,
round(sum(ifnull(fd_3adfeb7b624f06,0)),2) as ys,
round(sum(ifnull(fd_3b35a57aee1428,0)),2) as personYs,
round(sum(ifnull(fd_3b35a57b6e9d0a,0)),2) as dwYs,
round(sum(ifnull(fd_3adfeb7bd97464,0)),2) as yzc,
round(sum(ifnull(fd_3b35a5b03100c4,0)),2) as personYzc,
round(sum(ifnull(fd_3b35a5b0b04d54,0)),2) as dwYzc
from ekp_social_info
where fd_3adfe8c7e4cf7a = #{card} and fd_3adfe8cb96c41e = #{month}
</select>
</mapper>
......@@ -26,6 +26,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.ekp.vo.EkpSocialPushInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpIdCardAndDeptVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpStatusVo;
......@@ -38,6 +39,7 @@ 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.config.DaprArchivesProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.EkpDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpFundUtil;
......@@ -96,6 +98,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
@Lazy
private final DoJointSalaryAsyncTask doSalaryAsync;
private final EkpDaprUtils ekpDaprUtil;
/**
* 标准薪酬工资表简单分页查询
*
......@@ -404,6 +408,14 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
EkpSalaryParam salaryParam;
EmpIdCardAndDeptVo empIdCardAndDeptVo;
List<EmpIdCardAndDeptVo> voList = new ArrayList<>();
//社保推送集合
List<EkpPushSocialParam> socialPushList = new ArrayList<>();
//公积金推送集合
List<EkpPushFundParam> fundPushList = new ArrayList<>();
//薪资推送集合
List<EkpSalaryParam> salaryPushList = new ArrayList<>();
for (EkpSalaryParamVo sendParam : ekpList) {
salaryParam = new EkpSalaryParam();
BeanUtils.copyProperties(sendParam, salaryParam);
......@@ -416,54 +428,84 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
&& !CommonConstants.ZERO_STRING.equals(sendParam.getFd_3bcd41d857b764()))
|| (Common.isNotNull(sendParam.getFd_3b16ce48a9735c())
&& !CommonConstants.ZERO_STRING.equals(sendParam.getFd_3b16ce48a9735c()))) {
doSendForecastSocialToEkp(sendParam, s);
doSendForecastSocialToEkp(sendParam, s, socialPushList);
}
// 公积金
if ((Common.isNotNull(sendParam.getFd_3bcd41d77e4812())
&& !CommonConstants.ZERO_STRING.equals(sendParam.getFd_3bcd41d77e4812()))
|| (Common.isNotNull(sendParam.getFd_3b16ce4b7fc42a())
&& !CommonConstants.ZERO_STRING.equals(sendParam.getFd_3b16ce4b7fc42a()))) {
doSendForecastFundToEkp(sendParam, s);
}
sendBack = ekpSalaryUtil.sendToEKP(salaryParam);
if (Common.isEmpty(sendBack) || sendBack.length() != 32) {
sendBack = ekpSalaryUtil.sendToEKP(salaryParam);
doSendForecastFundToEkp(sendParam, s, fundPushList);
}
salaryPushList.add(salaryParam);
account.setSendTime(sendTime);
account.setSendUser(user.getId());
account.setSendUserName(user.getNickname());
if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
account.setSendStatus(CommonConstants.ONE_STRING);
account.setSendMonth(nowMonth);
account.setEkpId(sendBack);
empIdCardAndDeptVo = new EmpIdCardAndDeptVo();
empIdCardAndDeptVo.setIdCard(sendParam.getFd_3adfedfb8f76d4());
empIdCardAndDeptVo.setDeptNo(sendParam.getFd_3adfedf98ccba2());
empIdCardAndDeptVo.setStatus(CommonConstants.ONE_STRING);
voList.add(empIdCardAndDeptVo);
} else {
account.setSendStatus(CommonConstants.ONE_STRING);
account.setSendMonth(nowMonth);
empIdCardAndDeptVo = new EmpIdCardAndDeptVo();
empIdCardAndDeptVo.setIdCard(sendParam.getFd_3adfedfb8f76d4());
empIdCardAndDeptVo.setDeptNo(sendParam.getFd_3adfedf98ccba2());
empIdCardAndDeptVo.setStatus(CommonConstants.ONE_STRING);
voList.add(empIdCardAndDeptVo);
accountList.add(account);
}
//社保预估明细数据推送
if (!socialPushList.isEmpty()) {
R<EkpSocialPushInfoVo> info = ekpDaprUtil.pushSocialInfoToEkp(socialPushList);
if (Common.isEmpty(info) || Common.isEmpty(info.getData())) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.ZERO_STRING);
error.setCreateUserName(s.getCreateName());
error.setLinkId(socialPushList.get(0).getFd_3b0afbe1f94a08());
error.setTitle("薪资社保预估批量生成失败");
error.setNums(CommonConstants.ONE_INT);
HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tsendekperror/inner/saveError", error, Boolean.class, SecurityConstants.FROM_IN);
}
}
//公积金明细数据推送
if (!fundPushList.isEmpty()) {
R<EkpSocialPushInfoVo> info = ekpDaprUtil.pushFundInfoToEkp(fundPushList);
if (Common.isEmpty(info) || Common.isEmpty(info.getData())) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.ZERO_STRING);
error.setCreateUserName(s.getCreateName());
error.setLinkId(fundPushList.get(0).getFd_3b0afbaf10df2c());
error.setTitle("薪资公积金批量生成失败");
error.setNums(CommonConstants.ONE_INT);
HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tsendekperror/inner/saveError", error, Boolean.class, SecurityConstants.FROM_IN);
}
}
//工资报账明细推送
if (!salaryPushList.isEmpty()) {
R<Boolean> info = ekpDaprUtil.pushSalaryInfoToEkp(salaryPushList);
if (Common.isEmpty(info) || Common.isEmpty(info.getData())) {
sendStatus = false;
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.ONE_STRING);
error.setCreateUserName(s.getCreateName());
error.setLinkId(account.getId());
error.setTitle(sendBack == null ? SalaryConstants.EKP_NO_RETURN : sendBack);
error.setLinkId(salaryPushList.get(0).getFd_3b10af838eab5c());
error.setTitle("批量生成工资明细失败");
error.setNums(CommonConstants.ONE_INT);
HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tsendekperror/inner/saveError", error, Boolean.class, SecurityConstants.FROM_IN);
} else {
salaryAccountService.updateBatchById(accountList);
// 改变档案状态
EmpStatusVo empStatusVo = new EmpStatusVo();
empStatusVo.setEmpInfo(voList);
HttpDaprUtil.invokeMethodPost(archivesProperties.getAppUrl(), archivesProperties.getAppId()
, "/temployeeproject/inner/updateEmployeeSalaryStatus"
, JSON.toJSONString(empStatusVo), Boolean.class, SecurityConstants.FROM_IN);
}
accountList.add(account);
}
salaryAccountService.updateBatchById(accountList);
if (!voList.isEmpty()) {
// 改变档案状态
EmpStatusVo empStatusVo = new EmpStatusVo();
empStatusVo.setEmpInfo(voList);
HttpDaprUtil.invokeMethodPost(archivesProperties.getAppUrl(), archivesProperties.getAppId()
, "/temployeeproject/inner/updateEmployeeSalaryStatus"
, JSON.toJSONString(empStatusVo), Boolean.class, SecurityConstants.FROM_IN);
}
if (sendStatus) {
......@@ -603,7 +645,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
auditLogService.save(tApprovalRecord);
}
private void doSendForecastSocialToEkp(EkpSalaryParamVo account, TSalaryStandard s) {
private void doSendForecastSocialToEkp(EkpSalaryParamVo account, TSalaryStandard s,
List<EkpPushSocialParam> socialPushList) {
EkpPushSocialParam socialParam = new EkpPushSocialParam();
//订单类型
socialParam.setFd_3add9dd7833db8("预估");
......@@ -630,7 +673,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
// 缴纳月份
socialParam.setFd_3adfe8cf632700(account.getDeduSocialMonth());
// 生成月份
socialParam.setFd_3adfe8cb96c41e(account.getDeduSocialMonth());
socialParam.setFd_3adfe8cb96c41e(null != account.getDeduSocialMonth() ? account.getDeduSocialMonth().replace("-","") : null);
// 预估单位合计
socialParam.setFd_3adfeb4e8064a8(account.getFd_3bcd41d857b764());
// 预估个人合计
......@@ -725,26 +768,14 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
socialParam.setFd_3b178dfcf9e3e6(s.getBpoFlag());
// 薪酬申请编号
socialParam.setFd_3b3cab77923f44(s.getApplyNo() == null ? "" : s.getApplyNo());
String sendBack = ekpSocialUtil.sendToEKP(socialParam);
if (Common.isEmpty(sendBack) || sendBack.length() != 32) {
sendBack = ekpSocialUtil.sendToEKP(socialParam);
}
if (Common.isEmpty(sendBack) || sendBack.length() != 32) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.ZERO_STRING);
error.setCreateUserName(s.getCreateName());
error.setLinkId(account.getFd_3b10af838eab5c());
error.setTitle(sendBack == null ? SalaryConstants.EKP_NO_RETURN : sendBack);
error.setNums(CommonConstants.ONE_INT);
HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tsendekperror/inner/saveError", error, Boolean.class, SecurityConstants.FROM_IN);
log.error("薪资预估推送:" + JSON.toJSON(socialParam));
}
//预估
socialParam.setYgFlag(CommonConstants.ONE_STRING);
//创建人姓名
socialParam.setFd_3b438e33f37378(account.getFd_3c3e5ff65115a2());
socialPushList.add(socialParam);
}
private void doSendForecastFundToEkp(EkpSalaryParamVo account, TSalaryStandard s) {
private void doSendForecastFundToEkp(EkpSalaryParamVo account, TSalaryStandard s,List<EkpPushFundParam> fundPushList) {
EkpPushFundParam socialParam = new EkpPushFundParam();
//订单类型
socialParam.setFd_3add9dd7833db8("预估");
......@@ -777,7 +808,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
// 缴纳月份
socialParam.setFd_3adfe8cf632700(account.getDeduProvidentMonth());
// 生成月份
socialParam.setFd_3adfe8cb96c41e(account.getDeduProvidentMonth());
socialParam.setFd_3adfe8cb96c41e(null != account.getDeduProvidentMonth() ? account.getDeduProvidentMonth().replace("-","") : null);
//结算状态
socialParam.setFd_3add9ea428879a(CommonConstants.SALARY_UNFLAG);
//单位代缴
......@@ -814,22 +845,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
socialParam.setFd_3b178ea361cabe(s.getBpoFlag());
// 薪酬申请编号
socialParam.setFd_3b3cabde83d1d0(s.getApplyNo() == null ? "" : s.getApplyNo());
String sendBack = ekpFundUtil.sendToEKP(socialParam);
if (Common.isEmpty(sendBack) || sendBack.length() != 32) {
sendBack = ekpFundUtil.sendToEKP(socialParam);
}
if (Common.isEmpty(sendBack) || sendBack.length() != 32) {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.ZERO_STRING);
error.setCreateUserName(s.getCreateName());
error.setLinkId(account.getFd_3b10af838eab5c());
error.setTitle(sendBack == null ? SalaryConstants.EKP_NO_RETURN : sendBack);
error.setNums(CommonConstants.ONE_INT);
HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tsendekperror/inner/saveError", error, Boolean.class, SecurityConstants.FROM_IN);
}
//创建人姓名
socialParam.setFd_3b43922217c6f8(account.getFd_3c3e5ff65115a2());
fundPushList.add(socialParam);
}
/**
......
......@@ -98,4 +98,8 @@ public interface TForecastLibraryMapper extends BaseMapper<TForecastLibrary> {
int updateForecastStatusById(@Param("tForecastLibrary") TForecastLibrary tForecastLibrary);
List<TForecastLibrary> selectTForecastSocialInfoList();
List<TForecastLibrary> selectTForecastFundInfoList();
}
......@@ -259,6 +259,8 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
void updateBySocialPayment(@Param("id")String id);
void batchUpdateFundPaymentByList(@Param("idList") List<String> idList);
void updateBySocialPaymentList(@Param("idStr")String idStr);
void batchUpdateSocialPaymentByList(@Param("details") List<String> idStr);
......
......@@ -2416,22 +2416,26 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
.eq(TForecastLibrary::getDataPush, CommonConstants.ZERO_INT)
.eq(TForecastLibrary::getDataType, CommonConstants.ZERO_INT));
if (count > 0) {
Map<String,TSettleDomainSelectVo> selectVoMap = this.getSelectVoMap();
Map<String, TSettleDomainSelectVo> selectVoMap = this.getSelectVoMap();
//获取所有未推送的社保预估明细数据
List<TForecastLibrary> unPushInfo = null;
int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT);
for (int j = 0; j < i; j++) {
unPushInfo= baseMapper.selectList(Wrappers.<TForecastLibrary>query().lambda()
.eq(TForecastLibrary::getDataPush, CommonConstants.ZERO_INT)
.eq(TForecastLibrary::getDataType, CommonConstants.ZERO_INT)
.last(" limit 0, 10000"));
if (Common.isNotNull(unPushInfo)){
//推送数据封装并推送
initEkpPushSocialParam(unPushInfo,true,selectVoMap);
List<TForecastLibrary> unPushInfo = baseMapper.selectTForecastSocialInfoList();
int i = (int) Math.ceil((double) count / CommonConstants.ONE_THOUSAND_INT);
if (!unPushInfo.isEmpty()) {
List<TForecastLibrary> pushList;
int k = 0;
for (int j = 0; j < i; j++) {
if (j == i - 1) {
pushList = unPushInfo.subList(k, unPushInfo.size());
} else {
pushList = unPushInfo.subList(k, k + 1000);
}
k = k + 1000;
if (Common.isNotNull(pushList)) {
//推送数据封装并推送
initEkpPushSocialParam(pushList, true, selectVoMap);
}
}
}
// unPushInfo.clear();
// selectVoMap.clear();
}
}
......@@ -2453,22 +2457,26 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
.eq(TForecastLibrary::getDataPush, CommonConstants.ZERO_INT)
.eq(TForecastLibrary::getDataType, CommonConstants.ONE_INT));
if (count > 0) {
Map<String,TSettleDomainSelectVo> selectVoMap = this.getSelectVoMap();
//获取所有未推送的公积金预估明细数据
List<TForecastLibrary> unPushInfo = null;
int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT);
for (int j = 0; j < i; j++) {
unPushInfo= baseMapper.selectList(Wrappers.<TForecastLibrary>query().lambda()
.eq(TForecastLibrary::getDataPush, CommonConstants.ZERO_INT)
.eq(TForecastLibrary::getDataType, CommonConstants.ONE_INT)
.last(" limit 0, 10000"));
if (Common.isNotNull(unPushInfo)){
//推送数据封装并推送
initEkpPushFundParam(unPushInfo,true,selectVoMap);
Map<String, TSettleDomainSelectVo> selectVoMap = this.getSelectVoMap();
//获取所有未推送的社保预估明细数据
List<TForecastLibrary> unPushInfo = baseMapper.selectTForecastFundInfoList();
int i = (int) Math.ceil((double) count / CommonConstants.ONE_THOUSAND_INT);
if (!unPushInfo.isEmpty()) {
List<TForecastLibrary> pushList;
int k = 0;
for (int j = 0; j < i; j++) {
if (j == i - 1) {
pushList = unPushInfo.subList(k, unPushInfo.size());
} else {
pushList = unPushInfo.subList(k, k + 1000);
}
k = k + 1000;
if (Common.isNotNull(pushList)) {
//推送数据封装并推送
initEkpPushFundParam(pushList, true, selectVoMap);
}
}
}
// unPushInfo.clear();
// selectVoMap.clear();
}
}
......@@ -2483,7 +2491,23 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
} else {
selectVoMap = this.getSelectVoMap();
}
initEkpPushSocialParam(library,synFlag, selectVoMap);
int i = (int) Math.ceil((double) library.size() / CommonConstants.ONE_THOUSAND_INT);
if (!library.isEmpty()) {
List<TForecastLibrary> pushList;
int k = 0;
for (int j = 0; j < i; j++) {
if (j == i - 1) {
pushList = library.subList(k, library.size());
} else {
pushList = library.subList(k, k + 1000);
}
k = k + 1000;
if (Common.isNotNull(pushList)) {
//推送数据封装并推送
initEkpPushSocialParam(pushList,synFlag, selectVoMap);
}
}
}
}
}
......@@ -2498,7 +2522,23 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
selectVoMap = this.getSelectVoMap();
}
//推送数据封装并推送
initEkpPushFundParam(library,synFlag, selectVoMap);
int i = (int) Math.ceil((double) library.size() / CommonConstants.ONE_THOUSAND_INT);
if (!library.isEmpty()) {
List<TForecastLibrary> pushList;
int k = 0;
for (int j = 0; j < i; j++) {
if (j == i - 1) {
pushList = library.subList(k, library.size());
} else {
pushList = library.subList(k, k + 1000);
}
k = k + 1000;
if (Common.isNotNull(pushList)) {
//推送数据封装并推送
initEkpPushFundParam(pushList,synFlag, selectVoMap);
}
}
}
}
}
......
......@@ -692,7 +692,7 @@ public class DoJointSocialTask {
error.setLinkId(unPushInfo.get(0).getId());
error.setTitle("社保明细批量保存失败");
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
tSendEkpErrorService.save(error);
}
} catch (Exception e) {
TSendEkpError error = new TSendEkpError();
......@@ -703,7 +703,7 @@ public class DoJointSocialTask {
error.setLinkId(unPushInfo.get(0).getId());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
tSendEkpErrorService.save(error);
log.error("推送社保实缴费用到EKP错误", e);
}
log.info("推送社保实缴费用到EKP结束");
......@@ -845,9 +845,8 @@ public class DoJointSocialTask {
R<EkpSocialPushInfoVo> info = ekpDaprUtil.pushFundInfoToEkp(paramList);
if (Common.isNotNull(info) && Common.isNotNull(info.getData())) {
EkpSocialPushInfoVo vo = info.getData();
List<String> idList = vo.getPaymentIds();
for (String id : idList) {
paymentInfoMapper.updateBySocialPayment(id);
if (!Common.isEmpty(vo.getPaymentIds())) {
paymentInfoMapper.batchUpdateFundPaymentByList(vo.getPaymentIds());
}
} else {
TSendEkpError error = new TSendEkpError();
......@@ -858,7 +857,7 @@ public class DoJointSocialTask {
error.setLinkId(unPushInfo.get(0).getId());
error.setTitle("公积金批量插入失败");
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
tSendEkpErrorService.save(error);
}
} catch (Exception e) {
TSendEkpError error = new TSendEkpError();
......@@ -869,7 +868,7 @@ public class DoJointSocialTask {
error.setLinkId(unPushInfo.get(0).getId());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
tSendEkpErrorService.save(error);
log.error("公积金推送实缴费用到EKP错误", e);
}
log.info("公积金推送实缴费用到EKP结束");
......@@ -1151,7 +1150,7 @@ public class DoJointSocialTask {
error.setLinkId(unPushInfo.get(0).getId());
error.setTitle("社保预估明细批量保存失败");
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
tSendEkpErrorService.save(error);
}
} catch (Exception e) {
TSendEkpError error = new TSendEkpError();
......@@ -1162,7 +1161,7 @@ public class DoJointSocialTask {
error.setLinkId(unPushInfo.get(0).getId());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
tSendEkpErrorService.save(error);
log.error("推送社保预估费用到EKP错误", e);
}
log.info("推送社保预估费预估用到EKP结束");
......@@ -1335,7 +1334,7 @@ public class DoJointSocialTask {
error.setLinkId(unPushInfo.get(0).getId());
error.setTitle("公积金预估明细批量保存失败");
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
tSendEkpErrorService.save(error);
}
} catch (Exception e) {
TSendEkpError error = new TSendEkpError();
......@@ -1346,7 +1345,7 @@ public class DoJointSocialTask {
error.setLinkId(unPushInfo.get(0).getId());
error.setTitle(e.getMessage());
error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error);
tSendEkpErrorService.save(error);
log.error("推送公积金预估费用到EKP错误", e);
}
log.info("推送公积金预估费用到EKP结束");
......
......@@ -947,4 +947,15 @@
ID = #{tForecastLibrary.id}
</update>
<select id="selectTForecastSocialInfoList" resultMap="tForecastLibraryMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_forecast_library a where a.data_push = 0 and a.data_type = 0
</select>
<select id="selectTForecastFundInfoList" resultMap="tForecastLibraryMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_forecast_library a where a.data_push = 0 and a.data_type = 1
</select>
</mapper>
......@@ -2526,6 +2526,14 @@
</foreach>
</update>
<!-- 批量更改社保公积金推送状态 -->
<update id="batchUpdateFundPaymentByList">
update t_payment_info a set a.PUSH_STATUS = '0',a.UPDATE_TIME = NOW() where a.id in
<foreach item="item" index="index" collection="idList" open="(" separator="," close=")">
#{item}
</foreach>
</update>
<!-- 更改社保公积金推送状态 -->
<update id="updateBySocialIncomePayment">
......
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