Commit aaaf1477 authored by huyuchen's avatar huyuchen

明细接口改造

parent ca665b22
......@@ -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), EkpSocialPushInfoVo.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);
}
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.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.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()) ? dateStringInsert(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
Double[] numbers = {Common.isEmpty(salaryInfo.getFd_3adfee1e88723e()) ? 0 :salaryInfo.getFd_3adfee1e88723e(),
Common.isEmpty(salaryInfo.getFd_3adfee1ee24680()) ? 0 :salaryInfo.getFd_3adfee1e88723e(),
Common.isEmpty(salaryInfo.getFd_3adfee1f32fa24()) ? 0 :salaryInfo.getFd_3adfee1f32fa24(),
Common.isEmpty(salaryInfo.getFd_3adfee1e2b2f78()) ? 0 :salaryInfo.getFd_3adfee1e2b2f78(),
Common.isEmpty(salaryInfo.getFd_3adfee1374ed7a()) ? 0 :salaryInfo.getFd_3adfee1374ed7a()};
salaryInfo.setFd_3adfeeb34ea0ea(Arrays.stream(numbers).reduce(Double::sum).orElse(0.0));
//创建时间
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_3adfedf9d2bf1c());
//HRO结算月份
salaryInfo.setFd_3b13b1d1ff9678(salaryParam.getFd_3adfee0690737c());
//是否为BPO业务
salaryInfo.setFd_3b178f3e24cc32(salaryParam.getFd_3b178f0ded2114());
//结算月份
salaryInfo.setFd_3adfee0690737c(salaryParam.getFd_3adfee0690737c());
//薪酬申请编号
salaryInfo.setFd_3b13b1d1ff9678(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_3adfeec730ec44()) ? null : Double.parseDouble(salaryParam.getFd_3adfeec730ec44()));
//企业年金单位应支出
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();
}
}
......@@ -328,6 +328,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,48 +428,77 @@ 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 {
sendStatus = false;
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.ONE_STRING);
error.setType(CommonConstants.ZERO_STRING);
error.setCreateUserName(s.getCreateName());
error.setLinkId(account.getId());
error.setTitle(sendBack == null ? SalaryConstants.EKP_NO_RETURN : sendBack);
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);
}
accountList.add(account);
}
//公积金明细数据推送
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) || Boolean.TRUE.equals(!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(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);
if (!voList.isEmpty()) {
// 改变档案状态
EmpStatusVo empStatusVo = new EmpStatusVo();
empStatusVo.setEmpInfo(voList);
......@@ -465,6 +506,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
, "/temployeeproject/inner/updateEmployeeSalaryStatus"
, JSON.toJSONString(empStatusVo), Boolean.class, SecurityConstants.FROM_IN);
}
}
if (sendStatus) {
HashMap<String, Object> sendMap = this.setSendEkpStandardParam(s);
......@@ -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("预估");
......@@ -725,26 +768,12 @@ 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);
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("预估");
......@@ -814,22 +843,7 @@ 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);
}
fundPushList.add(socialParam);
}
/**
......
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