Commit 4da9d7bb authored by hongguangwu's avatar hongguangwu

发送EKP2

parent c9a7f6e2
......@@ -12,10 +12,7 @@ import java.io.Serializable;
*/
@Data
public class EkpSalaryParam implements Serializable {
/**
* ID
**/
private String fd_id;
/**
* 项目编码
**/
......@@ -121,7 +118,7 @@ public class EkpSalaryParam implements Serializable {
**/
private String fd_3adfee203f86b2;
/**
* 发合计
* 发合计
**/
private String fd_3adfee20fe5ba4;
/**
......@@ -185,23 +182,23 @@ public class EkpSalaryParam implements Serializable {
**/
private String fd_3aeadee1cf1266;
/**
* 发合计应支出
* 发合计应支出
**/
private String fd_3adfeec730ec44;
/**
* 工资发结算状态
* 工资发结算状态
**/
private String fd_3adfeef9440ab2;
/**
* 发合计付款状态
* 发合计付款状态
**/
private String fd_3adfeedd5f3cb2;
/**
* 发结算单号
* 发结算单号
**/
private String fd_3aeadf17522642;
/**
* 发付款单号
* 发付款单号
**/
private String fd_3aeadf17b7d03a;
/**
......
package com.yifu.cloud.plus.v1.yifu.ekp.vo;
import lombok.Data;
/**
* @Author fxj
* @Date 2022/8/22
* @Description 薪资明细对应参数
* @Version 1.0
*/
@Data
public class EkpSalaryParamVo extends EkpSalaryParam {
/**
* 报账表id
**/
private String salaryAccountId;
}
......@@ -20,7 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParamVo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo;
......@@ -97,7 +97,7 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
* @Date: 2022/8/29 16:52
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam>
**/
List<EkpSalaryParam> getEkpSalaryParamList(@Param("salaryId") String salaryId);
List<EkpSalaryParamVo> getEkpSalaryParamList(@Param("salaryId") String salaryId);
List<TSalaryAccount> noPageDiy(@Param("searchVo") TSalaryAccountSearchVo searchVo,
@Param("idList")List<String> idList);
......
......@@ -20,7 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParamVo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo;
......@@ -95,5 +95,5 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
* @Date: 2022/8/29 16:54
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam>
**/
List<EkpSalaryParam> getEkpSalaryParamList(String salaryId);
List<EkpSalaryParamVo> getEkpSalaryParamList(String salaryId);
}
......@@ -19,16 +19,14 @@ package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParamVo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAccountMapper;
......@@ -203,7 +201,7 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
}
@Override
public List<EkpSalaryParam> getEkpSalaryParamList(String salaryId) {
public List<EkpSalaryParamVo> getEkpSalaryParamList(String salaryId) {
return baseMapper.getEkpSalaryParamList(salaryId);
}
......
......@@ -38,6 +38,7 @@ 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.EkpSalaryUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParamVo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.MSalaryEstimate;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TApprovalRecord;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
......@@ -52,6 +53,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardVo;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Service;
......@@ -415,25 +417,27 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
return R.failed("未找到工资表");
} else if (s.getStatus() == SalaryConstants.STATUS[2] || s.getStatus() == SalaryConstants.STATUS[10]) {
//报账表
List<EkpSalaryParam> salaryAccountList = salaryAccountService.getEkpSalaryParamList(id);
List<EkpSalaryParamVo> ekpList = salaryAccountService.getEkpSalaryParamList(id);
YifuUser user = SecurityUtils.getUser();
if (user != null && salaryAccountList != null && !salaryAccountList.isEmpty()) {
if (user != null && ekpList != null && !ekpList.isEmpty()) {
boolean sendStatus = true;
String sendBack;
List<TSalaryAccount> accountList = new ArrayList<>();
TSalaryAccount account;
Date sendTime = new Date();
String nowMonth = DateUtil.addMonth(0);
for (EkpSalaryParam sendParam : salaryAccountList) {
EkpSalaryParam sendParam;
for (EkpSalaryParamVo sendParamVo : ekpList) {
// 转化报账表的参数
account = new TSalaryAccount();
account.setId(sendParam.getFd_id());
sendParam.setFd_id(null);
account.setId(sendParamVo.getSalaryAccountId());
sendParam = new EkpSalaryParam();
BeanUtils.copyProperties(sendParamVo, sendParam);
sendBack = ekpSalaryUtil.sendToEKP(sendParam);
account.setSendTime(sendTime);
account.setSendUser(user.getId());
account.setSendUserName(user.getNickname());
if (Common.isNotNull(sendBack)) {
if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
account.setSendStatus(CommonConstants.ONE_STRING);
account.setSendMonth(nowMonth);
account.setEkpId(sendBack);
......
......@@ -80,8 +80,8 @@
</resultMap>
<!-- 对接EKP的参数 -->
<resultMap id="ekpSalaryParamMap" type="com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam">
<id property="fd_id" column="fd_id"/>
<resultMap id="ekpSalaryParamVoMap" type="com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParamVo">
<id property="salaryAccountId" column="id"/>
<result property="fd_3adfedf98ccba2" column="fd_3adfedf98ccba2"/>
<result property="fd_3adfedf9d2bf1c" column="fd_3adfedf9d2bf1c"/>
<result property="fd_3adfedfacd65d6" column="fd_3adfedfacd65d6"/>
......@@ -108,6 +108,41 @@
<result property="fd_3adfee20fe5ba4" column="fd_3adfee20fe5ba4"/>
<result property="fd_3af9d49d165e90" column="fd_3af9d49d165e90"/>
<result property="fd_3afab1895feea2" column="fd_3afab1895feea2"/>
<result property="fd_3adfedfa4410aa" column="fd_3adfedfa4410aa"/>
<result property="fd_3adfee1ff1ca6a" column="fd_3adfee1ff1ca6a"/>
<result property="fd_3adfee203f86b2" column="fd_3adfee203f86b2"/>
<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_3aea30866d0c30" column="fd_3aea30866d0c30"/>
<result property="fd_3aea309696d32e" column="fd_3aea309696d32e"/>
<result property="fd_3adfeec6db8766" column="fd_3adfeec6db8766"/>
<result property="fd_3adfeef8ef38fc" column="fd_3adfeef8ef38fc"/>
<result property="fd_3adfeedd08222c" column="fd_3adfeedd08222c"/>
<result property="fd_3aeadede4cea84" column="fd_3aeadede4cea84"/>
<result property="fd_3aeadee1cf1266" column="fd_3aeadee1cf1266"/>
<result property="fd_3adfeec730ec44" column="fd_3adfeec730ec44"/>
<result property="fd_3adfeef9440ab2" column="fd_3adfeef9440ab2"/>
<result property="fd_3adfeedd5f3cb2" column="fd_3adfeedd5f3cb2"/>
<result property="fd_3aeadf17522642" column="fd_3aeadf17522642"/>
<result property="fd_3aeadf17b7d03a" column="fd_3aeadf17b7d03a"/>
<result property="fd_3adfeec782070a" column="fd_3adfeec782070a"/>
<result property="fd_3adfeef9b9fb3e" column="fd_3adfeef9b9fb3e"/>
<result property="fd_3adfeeddacf6d4" column="fd_3adfeeddacf6d4"/>
<result property="fd_3aeadf182ef6a2" column="fd_3aeadf182ef6a2"/>
<result property="fd_3aeadf1892fdb2" column="fd_3aeadf1892fdb2"/>
<result property="fd_3adfeec7ccdd1c" column="fd_3adfeec7ccdd1c"/>
<result property="fd_3adfeefa1eba32" column="fd_3adfeefa1eba32"/>
<result property="fd_3adfeede08d430" column="fd_3adfeede08d430"/>
<result property="fd_3aeadf191c62a0" column="fd_3aeadf191c62a0"/>
<result property="fd_3aeadf1992544c" column="fd_3aeadf1992544c"/>
<result property="fd_3af9d49d165e90" column="fd_3af9d49d165e90"/>
<result property="fd_3afab1895feea2" column="fd_3afab1895feea2"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -399,35 +434,68 @@
</select>
<!-- 获取薪资明细 -->
<select id="getEkpSalaryParamList" resultMap="ekpSalaryParamMap">
<select id="getEkpSalaryParamList" resultMap="ekpSalaryParamVoMap">
select
a.id fd_id
,a.DEPT_NO fd_3adfedf98ccba2
,a.DEPT_NAME fd_3adfedf9d2bf1c
,s.UNIT_NO fd_3adfedfacd65d6
,s.UNIT_NAME fd_3adfedfb174068
,a.EMP_NAME fd_3adfedfb5a68a2
,a.EMP_IDCARD fd_3adfedfb8f76d4
,a.EMP_PHONE fd_3adfedfbd23ab8
,a.BANK_NO fd_3adfedfcb17f1e
,a.BANK_NAME fd_3adfedfc453cc4
,a.SALARY_MONTH fd_3adfee063acff0
,a.SETTLEMENT_MONTH fd_3adfee0690737c
,ifnull(a.DEPT_NO,'') fd_3adfedf98ccba2
,ifnull(a.DEPT_NAME,'') fd_3adfedf9d2bf1c
,'' fd_3adfedfa4410aa
,ifnull(s.UNIT_NO,'') fd_3adfedfacd65d6
,ifnull(s.UNIT_NAME,'') fd_3adfedfb174068
,ifnull(a.EMP_NAME,'') fd_3adfedfb5a68a2
,ifnull(a.EMP_IDCARD,'') fd_3adfedfb8f76d4
,ifnull(a.EMP_PHONE,'') fd_3adfedfbd23ab8
,ifnull(a.BANK_NO,'') fd_3adfedfcb17f1e
,ifnull(a.BANK_NAME,'') fd_3adfedfc453cc4
,ifnull(a.SALARY_MONTH,'') fd_3adfee063acff0
,ifnull(a.SETTLEMENT_MONTH,'') fd_3adfee0690737c
,'1' fd_3adfee01668666
,a.SOCIAL_PRIORITY fd_3adfedfed8bb28
,a.FUND_PRIORITY fd_3adfedff3a7430
,a.OWN_FLAG fd_3adfee0009d070
,a.ANNUAL_BONUS_TYPE fd_3adfee01dea2fa
,a.RELAY_SALARY fd_3adfee12cb8840
,pdeduction.SALARY_MONEY fd_3adfee1374ed7a
,ifnull(withholidingUnitSocial.SALARY_MONEY,unitSocial.SALARY_MONEY) fd_3adfee1e2b2f78
,ifnull(withholidingPersonSocial.SALARY_MONEY,personalSocial.SALARY_MONEY) fd_3adfee1e88723e
,ifnull(withholidingUnitFund.SALARY_MONEY,unitFund.SALARY_MONEY) fd_3adfee1ee24680
,ifnull(withholidingPersonFund.SALARY_MONEY,personalFund.SALARY_MONEY) fd_3adfee1f32fa24
,a.SALARY_TAX fd_3adfee1f901c46
,a.ACTUAL_SALARY fd_3adfee20fe5ba4
,a.SALARY_GIVE_TIME fd_3af9d49d165e90
,a.INVOICE_TITLE fd_3afab1895feea2
,ifnull(a.SOCIAL_PRIORITY,'') fd_3adfedfed8bb28
,ifnull(a.FUND_PRIORITY,'') fd_3adfedff3a7430
,ifnull(a.OWN_FLAG,'') fd_3adfee0009d070
,ifnull(a.ANNUAL_BONUS_TYPE,'') fd_3adfee01dea2fa
,ifnull(a.RELAY_SALARY,'') fd_3adfee12cb8840
,ifnull(pdeduction.SALARY_MONEY,'') fd_3adfee1374ed7a
,ifnull(ifnull(withholidingUnitSocial.SALARY_MONEY,unitSocial.SALARY_MONEY),'') fd_3adfee1e2b2f78
,ifnull(ifnull(withholidingPersonSocial.SALARY_MONEY,personalSocial.SALARY_MONEY),'') fd_3adfee1e88723e
,ifnull(ifnull(withholidingUnitFund.SALARY_MONEY,unitFund.SALARY_MONEY),'') fd_3adfee1ee24680
,ifnull(ifnull(withholidingPersonFund.SALARY_MONEY,personalFund.SALARY_MONEY),'') fd_3adfee1f32fa24
,ifnull(a.SALARY_TAX,'') fd_3adfee1f901c46
,'' fd_3adfee1ff1ca6a
,'' fd_3adfee203f86b2
,ifnull(a.ACTUAL_SALARY,'') fd_3adfee20fe5ba4
,'' fd_3adfee21802434
,'' fd_3adfee4ba5ad36
,'' fd_3adfee4c0c59ee
,'' fd_3adfee5dd14866
,'' fd_3adfee5e3d1638
,'' fd_3adfeeb34ea0ea
,'' fd_3adfeededfb5a6
,'' fd_3adfeed3a20598
,'' fd_3aea30866d0c30
,'' fd_3aea309696d32e
,'' fd_3adfeec6db8766
,'' fd_3adfeef8ef38fc
,'' fd_3adfeedd08222c
,'' fd_3aeadede4cea84
,'' fd_3aeadee1cf1266
,'' fd_3adfeec730ec44
,'' fd_3adfeef9440ab2
,'' fd_3adfeedd5f3cb2
,'' fd_3aeadf17522642
,'' fd_3aeadf17b7d03a
,'' fd_3adfeec782070a
,'' fd_3adfeef9b9fb3e
,'' fd_3adfeeddacf6d4
,'' fd_3aeadf182ef6a2
,'' fd_3aeadf1892fdb2
,'' fd_3adfeec7ccdd1c
,'' fd_3adfeefa1eba32
,'' fd_3adfeede08d430
,'' fd_3aeadf191c62a0
,'' fd_3aeadf1992544c
,ifnull(a.SALARY_GIVE_TIME,'') fd_3af9d49d165e90
,ifnull(a.INVOICE_TITLE,'') fd_3afab1895feea2
from t_salary_account a
LEFT JOIN t_salary_standard s on a.SALARY_FORM_ID=s.ID
left join t_salary_account_item withholidingPersonSocial on withholidingPersonSocial.SALARY_ACCOUNT_ID = a.id and withholidingPersonSocial.JAVA_FIED_NAME='withholidingPersonSocial'
......
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