Commit cce7558e authored by hongguangwu's avatar hongguangwu

发送EKP

parent 1393bede
ekp.url=http://119.96.227.251:8080/api/sys-modeling/appModelRestService/addModel ekp.url=http://119.96.227.251:8080/api/sys-modeling/appModelRestService/addModel
ekp.fdModelId='181d7633ff8bc797276d0d3a54e80ad6' ekp.fdModelId=181d7633ff8bc797276d0d3a54e80ad6
ekp.fdFlowId='182b40249c1bc940d7226b941c7a4183' ekp.fdFlowId=182b40249c1bc940d7226b941c7a4183
ekp.docStatus='20' ekp.docStatus=20
ekp.LoginName='admin' ekp.LoginName=admin
ekp.docSubject='\u85AA\u8D44\u8BA2\u5355\u660E\u7EC6\u6570\u636E\u63A5\u53E3' ekp.docSubject=\u85AA\u8D44\u8BA2\u5355\u660E\u7EC6\u6570\u636E\u63A5\u53E3
...@@ -32,6 +32,7 @@ import org.hibernate.validator.constraints.Length; ...@@ -32,6 +32,7 @@ import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
...@@ -358,6 +359,30 @@ public class TSalaryAccount extends BaseEntity { ...@@ -358,6 +359,30 @@ public class TSalaryAccount extends BaseEntity {
@ExcelProperty("个税-单位承担") @ExcelProperty("个税-单位承担")
private BigDecimal salaryTaxUnit; private BigDecimal salaryTaxUnit;
@ExcelAttribute(name = "发送状态:0未发送,1已发送")
@ExcelProperty("发送状态:0未发送,1已发送")
private String sendStatus;
@ExcelAttribute(name = "发送月份")
@ExcelProperty("发送月份")
private String sendMonth;
@ExcelAttribute(name = "发送时间")
@ExcelProperty("发送时间")
private Date sendTime;
@ExcelAttribute(name = "发送人id")
@ExcelProperty("发送人id")
private String sendUser;
@ExcelAttribute(name = "发送人姓名")
@ExcelProperty("发送人姓名")
private String sendUserName;
@ExcelAttribute(name = "发送返回的EKPID")
@ExcelProperty("发送返回的EKPID")
private String ekpId;
@TableField(exist = false) @TableField(exist = false)
private List<TSalaryAccountItem> saiList = new ArrayList<>(); //工资组成部分明细 private List<TSalaryAccountItem> saiList = new ArrayList<>(); //工资组成部分明细
......
...@@ -22,6 +22,11 @@ ...@@ -22,6 +22,11 @@
<groupId>com.yifu.cloud.plus.v1</groupId> <groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-seata</artifactId> <artifactId>yifu-common-seata</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-ekp</artifactId>
<version>1.0.0</version>
</dependency>
<dependency> <dependency>
<groupId>com.yifu.cloud.plus.v1</groupId> <groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-salary-api</artifactId> <artifactId>yifu-salary-api</artifactId>
......
...@@ -192,4 +192,17 @@ public class TSalaryStandardController { ...@@ -192,4 +192,17 @@ public class TSalaryStandardController {
return R.failed("请传参!"); return R.failed("请传参!");
} }
} }
/**
* @param id 主键
* @Description: 发送至EKP
* @Author: hgw
* @Date: 2022/8/26 11:40
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R
**/
@Operation(description = "发送至EKP")
@PostMapping("/doSend")
public R<String> doSend(@RequestParam String id) {
return tSalaryStandardService.doSend(id);
}
} }
...@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.mapper; ...@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 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.salary.entity.THaveSalaryNosocial; 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.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo;
...@@ -88,4 +89,13 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> { ...@@ -88,4 +89,13 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
**/ **/
List<String> getAccountYearCheckList(); List<String> getAccountYearCheckList();
/**
* @param salaryId
* @Description: 获取薪资明细
* @Author: hgw
* @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);
} }
...@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.service; ...@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial; 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.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo;
...@@ -86,4 +87,13 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> { ...@@ -86,4 +87,13 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
* @return: * @return:
**/ **/
List<String> getAccountYearCheckMap(); List<String> getAccountYearCheckMap();
/**
* @param salaryId
* @Description: 获取薪资数据
* @Author: hgw
* @Date: 2022/8/29 16:54
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam>
**/
List<EkpSalaryParam> getEkpSalaryParamList(String salaryId);
} }
...@@ -74,4 +74,13 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> { ...@@ -74,4 +74,13 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> {
**/ **/
R<String> deleteSalaryById(String id); R<String> deleteSalaryById(String id);
/**
* @param id
* @Description: 推送至ekp
* @Author: hgw
* @Date: 2022/8/26 11:56
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R<String> doSend(String id);
} }
...@@ -13,18 +13,17 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties; ...@@ -13,18 +13,17 @@ 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.config.DaprSocialProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil; 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.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.constants.SalaryConstants;
import com.yifu.cloud.plus.v1.yifu.salary.entity.*; import com.yifu.cloud.plus.v1.yifu.salary.entity.*;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardMapper; import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.*; import com.yifu.cloud.plus.v1.yifu.salary.service.*;
import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryAccountUtil; import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryAccountUtil;
import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants;
import com.yifu.cloud.plus.v1.yifu.salary.vo.*; import com.yifu.cloud.plus.v1.yifu.salary.vo.*;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestParam;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.net.URLDecoder; import java.net.URLDecoder;
......
...@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; ...@@ -28,6 +28,7 @@ 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.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil; 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.common.core.util.ExcelUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial; 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.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAccountMapper; import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAccountMapper;
...@@ -217,4 +218,10 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper, ...@@ -217,4 +218,10 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
public List<String> getAccountYearCheckMap() { public List<String> getAccountYearCheckMap() {
return baseMapper.getAccountYearCheckList(); return baseMapper.getAccountYearCheckList();
} }
@Override
public List<EkpSalaryParam> getEkpSalaryParamList(String salaryId) {
return baseMapper.getEkpSalaryParamList(salaryId);
}
} }
...@@ -36,7 +36,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; ...@@ -36,7 +36,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil; 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.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.constants.SalaryConstants; 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.salary.entity.MSalaryEstimate; 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.TApprovalRecord;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
...@@ -46,6 +47,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.MSalaryEstimateService; ...@@ -46,6 +47,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.MSalaryEstimateService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TApprovalRecordService; import com.yifu.cloud.plus.v1.yifu.salary.service.TApprovalRecordService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService; import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardService; import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardService;
import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardVo;
...@@ -60,6 +62,7 @@ import java.io.IOException; ...@@ -60,6 +62,7 @@ import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
...@@ -84,6 +87,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -84,6 +87,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
@Autowired @Autowired
private DaprSocialProperties socialProperties; private DaprSocialProperties socialProperties;
@Autowired
private EkpSalaryUtil ekpSalaryUtil;
/** /**
* 标准薪酬工资表简单分页查询 * 标准薪酬工资表简单分页查询
* *
...@@ -393,4 +399,58 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -393,4 +399,58 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
return R.failed("id 不可为空"); return R.failed("id 不可为空");
} }
@Override
public R<String> doSend(String id) {
TSalaryStandard s = this.getById(id);
if (s == null) {
return R.failed("未找到工资表");
} else if (s.getStatus() == SalaryConstants.STATUS[2] || s.getStatus() == SalaryConstants.STATUS[10]) {
//报账表
List<EkpSalaryParam> salaryAccountList = salaryAccountService.getEkpSalaryParamList(id);
YifuUser user = SecurityUtils.getUser();
if (user != null && salaryAccountList != null && !salaryAccountList.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) {
// 转化报账表的参数
account = new TSalaryAccount();
account.setId(sendParam.getFd_id());
sendParam.setFd_id(null);
sendBack = ekpSalaryUtil.sendToEKP(sendParam);
account.setSendTime(sendTime);
account.setSendUser(user.getId());
account.setSendUserName(user.getNickname());
if (Common.isNotNull(sendBack)) {
account.setSendStatus(CommonConstants.ONE_STRING);
account.setSendMonth(nowMonth);
account.setEkpId(sendBack);
} else {
sendStatus = false;
}
accountList.add(account);
}
salaryAccountService.updateBatchById(accountList);
if (sendStatus) {
s.setSendTime(new Date());
s.setSendMonth(DateUtil.addMonth(0));
s.setStatus(SalaryConstants.STATUS[3]);
this.updateById(s);
return R.ok("发送成功!");
} else {
s.setStatus(SalaryConstants.STATUS[10]);
this.updateById(s);
return R.ok("发送失败!");
}
} else {
return R.failed("请登录!");
}
} else {
return R.failed("请刷新后检查薪资表状态!");
}
}
} }
...@@ -33,7 +33,7 @@ public class SalaryConstants { ...@@ -33,7 +33,7 @@ public class SalaryConstants {
* @return: * @return:
**/ **/
public static final Integer[] AUDIT_STATUS = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; public static final Integer[] AUDIT_STATUS = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
public static final int[] STATUS = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; public static final int[] STATUS = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
public static final String[] AUDIT_STATUS_STRING = {"待提交", "待审核", "-", "待发放", "已发放", "审核不通过", "确认不通过", "财务退回", "结算单调整待审核", "结算单调整待打印"}; public static final String[] AUDIT_STATUS_STRING = {"待提交", "待审核", "-", "待发放", "已发放", "审核不通过", "确认不通过", "财务退回", "结算单调整待审核", "结算单调整待打印"};
//发放失败-认领状态 0待认领1待出账2已发放3再次失败待认领 //发放失败-认领状态 0待认领1待出账2已发放3再次失败待认领
public static final Integer[] LOST_STATUS = {0, 1, 2, 3}; public static final Integer[] LOST_STATUS = {0, 1, 2, 3};
......
...@@ -72,7 +72,43 @@ ...@@ -72,7 +72,43 @@
<result property="createTime" column="CREATE_TIME"/> <result property="createTime" column="CREATE_TIME"/>
<result property="updateBy" column="UPDATE_BY"/> <result property="updateBy" column="UPDATE_BY"/>
<result property="updateTime" column="UPDATE_TIME"/> <result property="updateTime" column="UPDATE_TIME"/>
<result property="sendStatus" column="SEND_STATUS"/>
<result property="sendTime" column="SEND_TIME"/>
<result property="sendUser" column="SEND_USER"/>
<result property="sendUserName" column="SEND_USER_NAME"/>
<result property="sendMonth" column="SEND_MONTH"/>
</resultMap> </resultMap>
<!-- 对接EKP的参数 -->
<resultMap id="ekpSalaryParamMap" type="com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam">
<id property="fd_id" column="fd_id"/>
<result property="fd_3adfedf98ccba2" column="fd_3adfedf98ccba2"/>
<result property="fd_3adfedf9d2bf1c" column="fd_3adfedf9d2bf1c"/>
<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_3adfee20fe5ba4" column="fd_3adfee20fe5ba4"/>
<result property="fd_3af9d49d165e90" column="fd_3af9d49d165e90"/>
<result property="fd_3afab1895feea2" column="fd_3afab1895feea2"/>
</resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
a.INVOICE_TITLE, a.INVOICE_TITLE,
...@@ -121,7 +157,12 @@ ...@@ -121,7 +157,12 @@
a.CREATE_NAME, a.CREATE_NAME,
a.CREATE_TIME, a.CREATE_TIME,
a.UPDATE_BY, a.UPDATE_BY,
a.UPDATE_TIME a.UPDATE_TIME,
a.SEND_STATUS,
a.SEND_TIME,
a.SEND_USER,
a.SEND_USER_NAME,
a.SEND_MONTH
</sql> </sql>
<sql id="tSalaryAccount_where"> <sql id="tSalaryAccount_where">
<if test="tSalaryAccount != null"> <if test="tSalaryAccount != null">
...@@ -247,6 +288,9 @@ ...@@ -247,6 +288,9 @@
</if> </if>
<if test="tSalaryAccount.salaryTaxUnit != null"> <if test="tSalaryAccount.salaryTaxUnit != null">
AND a.SALARY_TAX_UNIT = #{tSalaryAccount.salaryTaxUnit} AND a.SALARY_TAX_UNIT = #{tSalaryAccount.salaryTaxUnit}
</if>
<if test="tSalaryAccount.sendStatus != null">
AND a.SEND_STATUS = #{tSalaryAccount.sendStatus}
</if> </if>
</if> </if>
</sql> </sql>
...@@ -352,4 +396,50 @@ ...@@ -352,4 +396,50 @@
from t_salary_account a from t_salary_account a
where a.DELETE_FLAG = 0 and a.FORM_TYPE = '0' and a.SALARY_MONTH like concat(DATE_FORMAT(NOW(), '%Y'), '%') where a.DELETE_FLAG = 0 and a.FORM_TYPE = '0' and a.SALARY_MONTH like concat(DATE_FORMAT(NOW(), '%Y'), '%')
</select> </select>
<!-- 获取薪资明细 -->
<select id="getEkpSalaryParamList" resultMap="ekpSalaryParamMap">
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
,'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
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'
left join t_salary_account_item withholidingPersonFund on withholidingPersonFund.SALARY_ACCOUNT_ID = a.id and withholidingPersonFund.JAVA_FIED_NAME='withholidingPersonFund'
left join t_salary_account_item personalSocial on personalSocial.SALARY_ACCOUNT_ID = a.id and personalSocial.JAVA_FIED_NAME='personalSocial'
left join t_salary_account_item personalFund on personalFund.SALARY_ACCOUNT_ID = a.id and personalFund.JAVA_FIED_NAME='personalFund'
left join t_salary_account_item exemptionPersionTax on exemptionPersionTax.SALARY_ACCOUNT_ID = a.id and exemptionPersionTax.JAVA_FIED_NAME='exemptionPersionTax'
left join t_salary_account_item unitSocial on unitSocial.SALARY_ACCOUNT_ID = a.id and unitSocial.JAVA_FIED_NAME='unitSocial'
left join t_salary_account_item unitFund on unitFund.SALARY_ACCOUNT_ID = a.id and unitFund.JAVA_FIED_NAME='unitFund'
left join t_salary_account_item withholidingUnitSocial on withholidingUnitSocial.SALARY_ACCOUNT_ID = a.id and withholidingUnitSocial.JAVA_FIED_NAME='withholidingUnitSocial'
left join t_salary_account_item withholidingUnitFund on withholidingUnitFund.SALARY_ACCOUNT_ID = a.id and withholidingUnitFund.JAVA_FIED_NAME='withholidingUnitFund'
left join t_salary_account_item pdeduction on pdeduction.SALARY_ACCOUNT_ID = a.id and pdeduction.JAVA_FIED_NAME='pdeduction'
where a.DELETE_FLAG = 0 and a.SALARY_FORM_ID = #{salaryId} and a.SEND_STATUS = '0'
</select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment