Commit 4c9e250e authored by hongguangwu's avatar hongguangwu

MVP1.5.1-审核人导出、客户信息等

parent 6222b37d
......@@ -126,8 +126,9 @@ public class TEmpChangeInfoController {
@Operation(description = "分页查询")
@GetMapping("/getAllDeptPage" )
public R<IPage<TSettleDomain>> getItemNamePage(Page page,@RequestParam(required = false) String departName
,@RequestParam(required = false) String nameOrNo
, @RequestParam(required = false) String customerId, @RequestParam(required = false) String flag) {
return new R<>(tEmpChangeInfoService.getAllDeptPage(page, departName, customerId,flag));
return new R<>(tEmpChangeInfoService.getAllDeptPage(page, departName, nameOrNo, customerId,flag));
}
/**
......
......@@ -70,5 +70,5 @@ public interface TEmpChangeInfoService extends IService<TEmpChangeInfo> {
*/
R<List<TCustomerInfo>> getAllUint(String customerName);
IPage<TSettleDomain> getAllDeptPage(Page page, String deptName, String customerId,String flag);
IPage<TSettleDomain> getAllDeptPage(Page page, String deptName, String nameOrNo, String customerId,String flag);
}
......@@ -23,10 +23,7 @@ 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.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpChangeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpChangeInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TSettleDomainMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TCustomerInfoService;
......@@ -315,16 +312,21 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
* @Date 2022-07-26
*/
@Override
public IPage<TSettleDomain> getAllDeptPage(Page page, String deptName, String customerId,String flag) {
LambdaQueryWrapper<TSettleDomain> wrapper = buildQueryWrapper(deptName, customerId,flag);
public IPage<TSettleDomain> getAllDeptPage(Page page, String deptName, String nameOrNo, String customerId,String flag) {
LambdaQueryWrapper<TSettleDomain> wrapper = buildQueryWrapper(deptName, nameOrNo, customerId,flag);
return tSettleDomainMapper.selectPage(page,wrapper);
}
private LambdaQueryWrapper buildQueryWrapper(String deptName, String customerId,String flag) {
private LambdaQueryWrapper buildQueryWrapper(String deptName, String nameOrNo, String customerId,String flag) {
LambdaQueryWrapper<TSettleDomain> wrapper = Wrappers.lambdaQuery();
if (Common.isNotNull(deptName)) {
wrapper.like(TSettleDomain::getDepartName, deptName);
}
if (Common.isNotNull(nameOrNo)) {
wrapper.and(obj->obj.like(TSettleDomain::getDepartName, nameOrNo)
.or()
.like(TSettleDomain::getDepartNo, nameOrNo));
}
if (Common.isNotNull(customerId)) {
wrapper.eq(TSettleDomain::getCustomerId, customerId);
}
......
......@@ -73,6 +73,34 @@ public class TSalaryAccount extends BaseEntity {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("项目编码")
private String deptNo;
/**
* 客户ID
*/
@ExcelAttribute(name = "客户ID", isNotEmpty = true, errorInfo = "客户ID不能为空", maxLength = 32)
@NotBlank(message = "客户ID不能为空")
@Length(max = 32, message = "客户ID不能超过32个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("客户ID")
private String unitId;
/**
* 客户名称
*/
@ExcelAttribute(name = "客户名称", isNotEmpty = true, errorInfo = "客户名称不能为空", maxLength = 50)
@NotBlank(message = "客户名称不能为空")
@Length(max = 50, message = "客户名称不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("客户名称")
private String unitName;
/**
* 客户编码
*/
@ExcelAttribute(name = "客户编码", maxLength = 32)
@Length(max = 32, message = "客户编码不能超过32个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("客户编码")
private String unitNo;
/**
* 封面抬头
*/
......@@ -552,6 +580,17 @@ public class TSalaryAccount extends BaseEntity {
@TableField(exist = false)
private String salaryMonthEnd;
/**
* 结算月份-起
*/
@TableField(exist = false)
private String settleMonthStart;
/**
* 结算月份-止
*/
@TableField(exist = false)
private String settleMonthEnd;
@ExcelProperty(value = "导入行号")
private Integer rowIndex;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
/**
* 工资报账主表(工资条)
*
* @author hgw
* @date 2023-2-17 17:41:43
*/
@Data
@Schema(description = "工资报账导出-审核人专用")
@HeadFontStyle(fontHeightInPoints = 11)
public class TSalaryAccountExportVo {
// 是否劳务费 手机号 计税月份 发放时间 结算月份 工资月份 出账单位 结算单位 结算单位编码
// 结算部门 部门编码 人员类型 在职状态 员工姓名 身份证号 工资应发 实发工资合计
// 年终奖 薪资个税 年终奖扣税 代扣个人社保 代扣个人公积金 个人社保 个人公积金
// 免个税个人代扣 企业(职业)年金 单位社保 单位公积金 代扣单位社保 代扣单位公积金
// 子女教育专项扣除 住房贷款利息专项扣除 住房租金专项扣除 继续教育专项扣除 赡养老人专项扣除 婴幼儿照护费 累计个人养老金
// 减除费用 表单上传人
@ExcelProperty("是否劳务费")
private String formType;
@ExcelProperty("手机号码")
private String empPhone;
@ExcelProperty("计税月份")
private String taxMonth;
@ExcelProperty("结算月份")
private String settlementMonth;
@ExcelProperty("工资月份")
private String salaryMonth;
@ExcelProperty("出账单位")
private String invoiceTitle;
@ExcelProperty("结算单位")
private String unitName;
@ExcelProperty("结算单位编码")
private String unitNo;
@ExcelProperty("结算部门")
private String deptName;
@ExcelProperty("部门编码")
private String deptNo;
@ExcelProperty("员工姓名")
private String empName;
@ExcelProperty("身份证号")
private String empIdcard;
@ExcelProperty("工资应发")
private BigDecimal relaySalary;
@ExcelProperty("实发工资合计")
private BigDecimal actualSalary;
@ExcelProperty("年终奖")
private BigDecimal annualBonus;
@ExcelProperty("薪资个税")
private BigDecimal salaryTax;
@ExcelProperty(value = "年终奖扣税")
private BigDecimal annualBonusTax;
@ExcelProperty(value = "代扣个人社保")
private BigDecimal withholidingPersonSocial;
@ExcelProperty(value = "代扣个人公积金")
private BigDecimal withholidingPersonFund;
@ExcelProperty("个人社保")
private BigDecimal personSocial;
@ExcelProperty("个人公积金")
private BigDecimal personFund;
@ExcelProperty("免个税个人代扣")
private BigDecimal exemptionPersionTax;
@ExcelProperty("企业(职业)年金")
private BigDecimal enterpriseAnnuity;
@ExcelProperty("单位社保")
private BigDecimal unitSocial;
@ExcelProperty("单位公积金")
private BigDecimal unitFund;
@ExcelProperty("代扣单位社保")
private BigDecimal withholidingUnitSocial;
@ExcelProperty("代扣单位公积金")
private BigDecimal withholidingUnitFund;
// 子女教育专项扣除 住房贷款利息专项扣除 住房租金专项扣除 继续教育专项扣除 赡养老人专项扣除 婴幼儿照护费 累计个人养老金
@ExcelProperty(value = "子女教育专项扣除")
private BigDecimal sumChildEduMoney;
@ExcelProperty(value = "住房贷款利息专项扣除")
private BigDecimal sumHousingLoanMoney;
@ExcelProperty(value = "住房租金专项扣除")
private BigDecimal sumHousingRentMoney;
@ExcelProperty(value = "继续教育专项扣除")
private BigDecimal sumContinuingEducationMoney;
@ExcelProperty(value = "赡养老人专项扣除")
private BigDecimal sumSupportElderlyMoney;
@ExcelProperty(value = "婴幼儿照护费")
private BigDecimal sumBabyMoney;
@ExcelProperty(value = "累计个人养老金")
private BigDecimal sumPrivatePension;
@ExcelProperty("减除费用")
private BigDecimal costReduction;
@ExcelProperty("表单上传人")
private String createName;
}
......@@ -104,6 +104,33 @@ public class TSalaryAccountVo implements Serializable {
@ExcelProperty("项目名称")
private String deptName;
/**
* 客户ID
*/
@ExcelAttribute(name = "客户ID", isNotEmpty = true, errorInfo = "客户ID不能为空", maxLength = 32)
@NotBlank(message = "客户ID不能为空")
@Length(max = 32, message = "客户ID不能超过32个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("客户ID")
private String unitId;
/**
* 客户名称
*/
@ExcelAttribute(name = "客户名称", isNotEmpty = true, errorInfo = "客户名称不能为空", maxLength = 50)
@NotBlank(message = "客户名称不能为空")
@Length(max = 50, message = "客户名称不能超过50个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("客户名称")
private String unitName;
/**
* 客户编码
*/
@ExcelAttribute(name = "客户编码", maxLength = 32)
@Length(max = 32, message = "客户编码不能超过32个字符")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("客户编码")
private String unitNo;
/**
* 身份证号
*/
......
......@@ -205,6 +205,18 @@ public class TSalaryAccountController {
tSalaryAccountService.listExport(response, searchVo);
}
/**
* 审核人导出
* @author hgw
* @date 2023-2-17 11:17:48
**/
@Operation(description = "审核人导出 hasPermission('account_audit_export')")
@PostMapping("/auditExport")
@PreAuthorize("@pms.hasPermission('account_audit_export')")
public void auditExport(HttpServletResponse response, @RequestBody TSalaryAccountSearchVo searchVo) {
tSalaryAccountService.auditExport(response, searchVo);
}
/**
* @Author fxj
* @Description 获取工资条
......
......@@ -23,10 +23,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryAccountAndItemVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SettlementFormVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -110,6 +107,9 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
List<TSalaryAccount> noPageDiy(@Param("searchVo") TSalaryAccountSearchVo searchVo,
@Param("idList") List<String> idList);
List<TSalaryAccountExportVo> auditExport(@Param("searchVo") TSalaryAccountSearchVo searchVo,
@Param("idList") List<String> idList);
List<TSalaryAccount> getAccountListBySalaryId(@Param("searchVo") TSalaryAccountSearchVo searchVo);
/**
......@@ -123,6 +123,9 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
int noPageCountDiy(@Param("searchVo") TSalaryAccountSearchVo searchVo,
@Param("idList") List<String> idList);
int auditExportCount(@Param("searchVo") TSalaryAccountSearchVo searchVo,
@Param("idList") List<String> idList);
/**
* @param salaryId 工资表id
* @Description: 退表回退状态
......
......@@ -49,6 +49,14 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
void listExport(HttpServletResponse response, TSalaryAccountSearchVo searchVo);
/**
* @Description: 审核人导出
* @Author: hgw
* @Date: 2023/2/17 11:57
* @return: void
**/
void auditExport(HttpServletResponse response, TSalaryAccountSearchVo searchVo);
/**
* @param salaryId
* @Description: 根据工资id,返回报账明细(字段较少且有计算,其他地方勿用)
......
......@@ -32,10 +32,7 @@ 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;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryAccountAndItemVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SettlementFormVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.*;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
......@@ -125,6 +122,62 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
}
}
/**
* 审核人导出
*
* @return
*/
@Override
public void auditExport(HttpServletResponse response, TSalaryAccountSearchVo searchVo) {
String fileName = "员工报账导出" + DateUtil.getThisTime() + CommonConstants.XLSX;
//获取要导出的列表
List<TSalaryAccountExportVo> list = new ArrayList<>();
long count = baseMapper.auditExportCount(searchVo, searchVo.getIdList());
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcelFactory.write(out, TSalaryAccountExportVo.class).includeColumnFiledNames(searchVo.getExportFields()).build();
int index = 0;
WriteSheet writeSheet;
if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT_3) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT_3);
list = baseMapper.auditExport(searchVo, searchVo.getIdList());
if (Common.isNotNull(list)) {
writeSheet = EasyExcelFactory.writerSheet("工资报账" + index).build();
excelWriter.write(list, writeSheet);
index++;
list.clear();
}
}
} else {
writeSheet = EasyExcelFactory.writerSheet("工资报账" + index).build();
excelWriter.write(list, writeSheet);
}
if (Common.isNotNull(list)) {
list.clear();
}
out.flush();
excelWriter.finish();
} catch (Exception e) {
log.error("执行异常", e);
} finally {
try {
if (null != out) {
out.close();
}
} catch (IOException e) {
log.error("执行异常", e);
}
}
}
/**
* @Description: 根据工资id,返回报账明细(字段较少且有计算,其他地方勿用)
* @Author: hgw
......@@ -152,7 +205,7 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
@Override
public Map<String, Integer> getAccountCheckMap(String settleId, String settleMonth, String salaryType) {
List<AccountCheckVo> list = new ArrayList<>();
List<AccountCheckVo> list;
if (CommonConstants.ZERO_STRING.equals(salaryType)) {
list = baseMapper.getAccountCheckList(settleId, settleMonth);
} else {
......
......@@ -518,6 +518,9 @@ public class SalaryCommonUtil implements Serializable {
entity.setDeptId(dept.getId());
entity.setDeptNo(dept.getDepartNo());
entity.setDeptName(dept.getDepartName());
entity.setUnitId(dept.getCustomerId());
entity.setUnitName(dept.getCustomerName());
entity.setUnitNo(dept.getCustomerCode());
entity.setFormType(salaryType);
}
......
......@@ -36,6 +36,9 @@
<result property="deptId" column="DEPT_ID"/>
<result property="deptNo" column="DEPT_NO"/>
<result property="deptName" column="DEPT_NAME"/>
<result property="unitId" column="UNIT_ID"/>
<result property="unitName" column="UNIT_NAME"/>
<result property="unitNo" column="UNIT_NO"/>
<result property="salaryStyle" column="SALARY_STYLE"/>
<result property="salaryGiveTime" column="SALARY_GIVE_TIME"/>
<result property="distributionFlag" column="DISTRIBUTION_FLAG"/>
......@@ -218,6 +221,9 @@
a.DEPT_ID,
a.DEPT_NO,
a.DEPT_NAME,
a.UNIT_ID,
a.UNIT_NAME,
a.UNIT_NO,
a.SALARY_STYLE,
a.SALARY_GIVE_TIME,
a.DISTRIBUTION_FLAG,
......@@ -298,6 +304,12 @@
<if test="tSalaryAccount.salaryMonthEnd != null and tSalaryAccount.salaryMonthEnd.trim() != ''">
AND a.SALARY_MONTH <![CDATA[<=]]> #{tSalaryAccount.salaryMonthEnd}
</if>
<if test="tSalaryAccount.settleMonthStart != null and tSalaryAccount.settleMonthStart.trim() != ''">
AND a.SETTLEMENT_MONTH >= #{tSalaryAccount.settleMonthStart}
</if>
<if test="tSalaryAccount.settleMonthEnd != null and tSalaryAccount.settleMonthEnd.trim() != ''">
AND a.SETTLEMENT_MONTH <![CDATA[<=]]> #{tSalaryAccount.settleMonthEnd}
</if>
<if test="tSalaryAccount.empId != null and tSalaryAccount.empId.trim() != ''">
AND a.EMP_ID = #{tSalaryAccount.empId}
</if>
......@@ -322,6 +334,15 @@
<if test="tSalaryAccount.deptName != null and tSalaryAccount.deptName.trim() != ''">
AND a.DEPT_NAME = #{tSalaryAccount.deptName}
</if>
<if test="tSalaryAccount.unitId != null and tSalaryAccount.unitId.trim() != ''">
AND a.UNIT_ID = #{tSalaryAccount.unitId}
</if>
<if test="tSalaryAccount.unitName != null and tSalaryAccount.unitName.trim() != ''">
AND a.UNIT_NAME = #{tSalaryAccount.unitName}
</if>
<if test="tSalaryAccount.unitNo != null and tSalaryAccount.unitNo.trim() != ''">
AND a.UNIT_NO = #{tSalaryAccount.unitNo}
</if>
<if test="tSalaryAccount.salaryStyle != null and tSalaryAccount.salaryStyle.trim() != ''">
AND a.SALARY_STYLE = #{tSalaryAccount.salaryStyle}
</if>
......@@ -682,7 +703,7 @@
ap.AREA_NAME BANK_PROVINCE,
ac.AREA_NAME BANK_CITY,
a.IS_PERSON_TAX,
ifnull(a.RELAY_SALARY,0) + ifnull(a.RELAY_SALARY_UNIT,0) RELAY_SALARY,
if(a.RELAY_SALARY_UNIT is not null and a.RELAY_SALARY_UNIT != 0,a.RELAY_SALARY_UNIT,ifnull(a.RELAY_SALARY,0)) RELAY_SALARY,
a.ACTUAL_SALARY,
ifnull(a.SALARY_TAX,0) + ifnull(a.SALARY_TAX_UNIT,0) SALARY_TAX,
a.CREATE_NAME,
......@@ -699,7 +720,8 @@
a.SUM_SUPPORT_ELDERLY_MONEY,
a.SUM_CONTINUING_EDUCATION_MONEY,
a.SUM_BABY_MONEY,
a.SUM_PRIVATE_PENSION
a.SUM_PRIVATE_PENSION,
case a.FORM_TYPE when '0' then '薪资' when '1' then '绩效' when '3' then '劳务费' when '4' then '稿酬' else '其他' end as FORM_TYPE
FROM
<if test="searchVo.salaryMonthStart == null or searchVo.salaryMonthStart.trim() >= '202201'">
t_salary_account a
......@@ -727,6 +749,67 @@
</select>
<select id="auditExport" resultType="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountExportVo"
parameterType="com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount">
select
case a.FORM_TYPE when '0' then '薪资' when '1' then '绩效' when '3' then '劳务费' when '4' then '稿酬' else '其他' end as formType,
a.EMP_PHONE as empPhone,
a.TAX_MONTH as taxMonth,
a.SETTLEMENT_MONTH as settlementMonth,
a.SALARY_MONTH as salaryMonth,
a.INVOICE_TITLE as invoiceTitle,
a.UNIT_NAME as unitName,
a.UNIT_NO as unitNo,
a.DEPT_NAME as deptName,
a.DEPT_NO as deptNo,
a.EMP_NAME as empName,
a.EMP_IDCARD as empIdcard,
if(a.RELAY_SALARY_UNIT is not null and a.RELAY_SALARY_UNIT != 0, a.RELAY_SALARY_UNIT, ifnull(a.RELAY_SALARY,0)) as relaySalary,
a.ACTUAL_SALARY as actualSalary,
annualBonus.SALARY_MONEY as annualBonus,
ifnull(a.SALARY_TAX,0) + ifnull(a.SALARY_TAX_UNIT,0) as salaryTax,
a.ANNUAL_BONUS_TAX as annualBonusTax,
withholidingPersonSocial.SALARY_MONEY as withholidingPersonSocial,
withholidingPersonFund.SALARY_MONEY as withholidingPersonFund,
a.PERSON_SOCIAL as personSocial,
a.PERSON_FUND as personFund,
exemptionPersionTax.SALARY_MONEY as exemptionPersionTax,
enterpriseAnnuity.SALARY_MONEY as enterpriseAnnuity,
a.UNIT_SOCIAL as unitSocial,
a.UNIT_FUND as unitFund,
withholidingUnitSocial.SALARY_MONEY as withholidingUnitSocial,
withholidingUnitFund.SALARY_MONEY as withholidingUnitFund,
a.SUM_BABY_MONEY as sumBabyMoney,
a.SUM_CHILD_EDU_MONEY as sumChildEduMoney,
a.SUM_CONTINUING_EDUCATION_MONEY as sumContinuingEducationMoney,
a.SUM_HOUSING_LOAN_MONEY as sumHousingLoanMoney,
a.SUM_HOUSING_RENT_MONEY as sumHousingRentMoney,
a.SUM_PRIVATE_PENSION as sumPrivatePension,
a.SUM_SUPPORT_ELDERLY_MONEY as sumSupportElderlyMoney,
a.COST_REDUCTION as costReduction,
a.CREATE_NAME as createName
from
t_salary_account a
left join t_salary_account_item annualBonus on annualBonus.SALARY_ACCOUNT_ID = a.id and annualBonus.JAVA_FIED_NAME = 'annualBonus'
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 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 exemptionPersionTax on exemptionPersionTax.SALARY_ACCOUNT_ID = a.id and exemptionPersionTax.JAVA_FIED_NAME='exemptionPersionTax'
left join t_salary_account_item enterpriseAnnuity on enterpriseAnnuity.SALARY_ACCOUNT_ID = a.id and enterpriseAnnuity.JAVA_FIED_NAME='enterpriseAnnuity'
<where>
a.DELETE_FLAG = 0
<include refid="where_export"/>
ORDER BY a.CREATE_TIME desc
<if test="searchVo != null">
<if test="searchVo.limitStart != null">
limit #{searchVo.limitStart},#{searchVo.limitEnd}
</if>
</if>
</where>
</select>
<select id="getAccountListBySalaryId" resultMap="tSalaryAccountMap" parameterType="com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount">
SELECT
<include refid="Base_Column_List"/>
......@@ -779,6 +862,16 @@
</if>
</where>
</select>
<select id="auditExportCount" resultType="java.lang.Integer">
SELECT
count(1)
FROM
t_salary_account a
<where>
a.DELETE_FLAG = 0
<include refid="where_export"/>
</where>
</select>
<sql id="where_export">
<if test="idList != null and idList.size>0">
AND a.id in
......@@ -805,6 +898,12 @@
<if test="searchVo.salaryMonthEnd != null and searchVo.salaryMonthEnd.trim() != ''">
AND a.SALARY_MONTH <![CDATA[<=]]> #{searchVo.salaryMonthEnd}
</if>
<if test="searchVo.settleMonthStart != null and searchVo.settleMonthStart.trim() != ''">
AND a.SETTLEMENT_MONTH >= #{searchVo.settleMonthStart}
</if>
<if test="searchVo.settleMonthEnd != null and searchVo.settleMonthEnd.trim() != ''">
AND a.SETTLEMENT_MONTH <![CDATA[<=]]> #{searchVo.settleMonthEnd}
</if>
<if test="searchVo.empId != null and searchVo.empId.trim() != ''">
AND a.EMP_ID = #{searchVo.empId}
</if>
......@@ -829,6 +928,15 @@
<if test="searchVo.deptName != null and searchVo.deptName.trim() != ''">
AND a.DEPT_NAME = #{searchVo.deptName}
</if>
<if test="searchVo.unitId != null and searchVo.unitId.trim() != ''">
AND a.UNIT_ID = #{searchVo.unitId}
</if>
<if test="searchVo.unitName != null and searchVo.unitName.trim() != ''">
AND a.UNIT_NAME = #{searchVo.unitName}
</if>
<if test="searchVo.unitNo != null and searchVo.unitNo.trim() != ''">
AND a.UNIT_NO = #{searchVo.unitNo}
</if>
<if test="searchVo.salaryStyle != null and searchVo.salaryStyle.trim() != ''">
AND a.SALARY_STYLE = #{searchVo.salaryStyle}
</if>
......
......@@ -61,6 +61,7 @@
<result property="updateTime" column="UPDATE_TIME"/>
<result property="unitId" column="UNIT_ID"/>
<result property="unitName" column="UNIT_NAME"/>
<result property="unitNo" column="UNIT_NO"/>
<result property="sendTime" column="SEND_TIME"/>
<result property="sendMonth" column="SEND_MONTH"/>
<result property="invoiceTitle" column="INVOICE_TITLE"/>
......
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