Commit 02bf4ff2 authored by hongguangwu's avatar hongguangwu

MVP1.7.10-工资条暂时提交

parent 98580dfc
...@@ -227,6 +227,32 @@ public class TSalaryAccountController { ...@@ -227,6 +227,32 @@ public class TSalaryAccountController {
tSalaryAccountService.exportAsso(response, searchVo,CommonConstants.ONE_INT); tSalaryAccountService.exportAsso(response, searchVo,CommonConstants.ONE_INT);
} }
/**
* 获取工资条导出
* @author hgw
* @date 2025-4-21 09:30:56
**/
@Operation(description = "获取工资条导出")
@PostMapping("/getEmpAccountExport")
@SysLog("获取工资条导出")
public void getEmpAccountExport(HttpServletResponse response, @RequestBody TSalaryAccountSearchVo searchVo) {
String empIdCard = searchVo.getEmpIdcard();
String settleDepartId = searchVo.getDeptId();
String settlementMonth = searchVo.getSettlementMonth();
String deptNo = searchVo.getDeptNo();
String empName = searchVo.getEmpName();
if (Common.isEmpty(empIdCard) && Common.isEmpty(settleDepartId) && Common.isEmpty(settlementMonth)
&& Common.isEmpty(deptNo) && Common.isEmpty(empName)) {
tSalaryAccountService.exportError(response, "请输入查询条件");
} else if (Common.isNotNull(settlementMonth) && Common.isEmpty(empIdCard) && Common.isEmpty(settleDepartId)
&& Common.isEmpty(deptNo) && Common.isEmpty(empName)) {
tSalaryAccountService.exportError(response, "结算月需配合其他查询条件一起使用,请输入其他查询条件!");
} else {
tSalaryAccountService.exportAsso(response, searchVo, CommonConstants.TWO_INT);
}
}
/** /**
* @Author fxj * @Author fxj
* @Description 获取工资条 * @Description 获取工资条
...@@ -236,68 +262,22 @@ public class TSalaryAccountController { ...@@ -236,68 +262,22 @@ public class TSalaryAccountController {
**/ **/
@Operation(description = "获取工资条") @Operation(description = "获取工资条")
@GetMapping("/getEmpAccount") @GetMapping("/getEmpAccount")
public R<TSalaryDetailVo> getEmpAccount(String empIdcard, String settleDepartId, String settlementMonth public R<IPage<TSalaryAccount>> getEmpAccount(Page<TSalaryAccount> page, TSalaryAccountSearchVo searchVo) {
, String deptNo, String deptName, String empName) { String empIdCard = searchVo.getEmpIdcard();
TSalaryDetailVo salaryDetailVo = new TSalaryDetailVo(); String settleDepartId = searchVo.getDeptId();
if (Common.isEmpty(empIdcard) && Common.isEmpty(settleDepartId) && Common.isEmpty(settlementMonth) String settlementMonth = searchVo.getSettlementMonth();
&& Common.isEmpty(deptNo) && Common.isEmpty(deptName) && Common.isEmpty(empName)) { String deptNo = searchVo.getDeptNo();
String empName = searchVo.getEmpName();
if (Common.isEmpty(empIdCard) && Common.isEmpty(settleDepartId) && Common.isEmpty(settlementMonth)
&& Common.isEmpty(deptNo) && Common.isEmpty(empName)) {
return R.failed("请输入查询条件"); return R.failed("请输入查询条件");
} }
if (Common.isNotNull(settlementMonth) && Common.isEmpty(empIdcard) && Common.isEmpty(settleDepartId) if (Common.isNotNull(settlementMonth) && Common.isEmpty(empIdCard) && Common.isEmpty(settleDepartId)
&& Common.isEmpty(deptNo) && Common.isEmpty(deptName) && Common.isEmpty(empName)) { && Common.isEmpty(deptNo) && Common.isEmpty(empName)) {
return R.failed("结算月需配合其他查询条件一起使用,请输入其他查询条件!"); return R.failed("结算月需配合其他查询条件一起使用,请输入其他查询条件!");
} }
//报账表 return new R<>(tSalaryAccountService.getEmpAccountPage(page, searchVo));
TSalaryAccount salaryAccount = new TSalaryAccount();
salaryAccount.setDeleteFlag(SalaryConstants.NOT_DELETE);
if (Common.isNotNull(empIdcard)) {
salaryAccount.setEmpIdcard(empIdcard);
}
if (Common.isNotNull(settleDepartId)) {
salaryAccount.setDeptId(settleDepartId);
}
if (Common.isNotNull(settlementMonth) && settlementMonth.length() == 6) {
salaryAccount.setSettlementMonth(settlementMonth);
}
QueryWrapper<TSalaryAccount> queryWrapperSa = new QueryWrapper<>();
queryWrapperSa.setEntity(salaryAccount);
if (Common.isNotNull(empName)) {
queryWrapperSa.eq("EMP_NAME", empName);
}
if (Common.isNotNull(deptNo)) {
queryWrapperSa.eq("DEPT_NO", deptNo);
}
if (Common.isNotNull(settleDepartId)) {
queryWrapperSa.eq("DEPT_ID", settleDepartId);
}
if (Common.isNotNull(settlementMonth) && settlementMonth.length() < 6) {
queryWrapperSa.eq("SETTLEMENT_MONTH", settlementMonth);
}
queryWrapperSa.orderByAsc("SETTLEMENT_MONTH");
List<TSalaryAccount> salaryAccountList = tSalaryAccountService.list(queryWrapperSa);
Map<String, String> accountTitle = new HashMap<>();
if (salaryAccountList != null && salaryAccountList.size() > CommonConstants.ZERO_INT) {
//报账表明细
TSalaryAccountItem item;
QueryWrapper<TSalaryAccountItem> queryWrapperAi;
List<TSalaryAccountItem> itemList;
for (TSalaryAccount a : salaryAccountList) {
item = new TSalaryAccountItem();
item.setSalaryAccountId(a.getId());
queryWrapperAi = new QueryWrapper<>();
queryWrapperAi.setEntity(item);
itemList = tSalaryAccountItemService.list(queryWrapperAi);
if (itemList != null && itemList.size() > CommonConstants.ZERO_INT) {
for (TSalaryAccountItem items : itemList) {
accountTitle.put(items.getCnName(), items.getJavaFiedName());
}
}
a.setSaiList(itemList);
}
}
salaryDetailVo.setSalaryAccountList(salaryAccountList);
salaryDetailVo.setAccountTitle(accountTitle);
return new R<>(salaryDetailVo);
} }
......
...@@ -47,6 +47,12 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> { ...@@ -47,6 +47,12 @@ public interface TSalaryAccountMapper extends BaseMapper<TSalaryAccount> {
@Param("tSalaryAccount") TSalaryAccount tSalaryAccount, @Param("tSalaryAccount") TSalaryAccount tSalaryAccount,
@Param("deptNos") List<String> deptNos); @Param("deptNos") List<String> deptNos);
IPage<TSalaryAccount> getEmpAccountPage(Page<TSalaryAccount> page, @Param("tSalaryAccount") TSalaryAccount tSalaryAccount);
int getEmpAccountCount(@Param("tSalaryAccount") TSalaryAccount tSalaryAccount);
List<TSalaryAccount> getEmpAccountExport(@Param("tSalaryAccount") TSalaryAccount tSalaryAccount);
List<TSalaryAccount> getTSalaryAccountPageDataByIds(@Param("tSalaryAccount") TSalaryAccount tSalaryAccount, List<TSalaryAccount> getTSalaryAccountPageDataByIds(@Param("tSalaryAccount") TSalaryAccount tSalaryAccount,
@Param("ids") List<String> ids); @Param("ids") List<String> ids);
......
...@@ -44,6 +44,15 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> { ...@@ -44,6 +44,15 @@ public interface TSalaryAccountService extends IService<TSalaryAccount> {
* @return * @return
*/ */
IPage<TSalaryAccount> getTSalaryAccountPage(Page<TSalaryAccount> page, TSalaryAccountSearchVo tSalaryAccount); IPage<TSalaryAccount> getTSalaryAccountPage(Page<TSalaryAccount> page, TSalaryAccountSearchVo tSalaryAccount);
/**
* @Description: 项目薪酬查询-工资条查询
* @Author: hgw
* @Date: 2025/4/18 14:58
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount>
**/
IPage<TSalaryAccount> getEmpAccountPage(Page<TSalaryAccount> page, TSalaryAccountSearchVo searchVo);
/** /**
* @Author fxj * @Author fxj
* @Description 薪资报账导出统一导出限制 * @Description 薪资报账导出统一导出限制
......
...@@ -27,6 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; ...@@ -27,6 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants;
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.DictConverter;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParamVo; import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParamVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TDeptSee; import com.yifu.cloud.plus.v1.yifu.salary.entity.TDeptSee;
...@@ -39,6 +40,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService; ...@@ -39,6 +40,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.*; import com.yifu.cloud.plus.v1.yifu.salary.vo.*;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.apache.commons.compress.utils.Lists;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -47,10 +49,7 @@ import javax.servlet.http.HttpServletResponse; ...@@ -47,10 +49,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.ArrayList; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -102,11 +101,22 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper, ...@@ -102,11 +101,22 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
} }
/**
* @Description: 项目薪酬查询-工资条查询
* @Author: hgw
* @Date: 2025/4/18 16:01
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount>
**/
@Override
public IPage<TSalaryAccount> getEmpAccountPage(Page<TSalaryAccount> page, TSalaryAccountSearchVo searchVo) {
return baseMapper.getEmpAccountPage(page, searchVo);
}
/** /**
* @Author fxj * @Author fxj
* @Description * @Description
* @Date 15:27 2024/10/23 * @Date 15:27 2024/10/23
* @Param type 0 报账批量导出 1 报账审核人导出 * @Param type 0 报账批量导出 1 报账审核人导出 2: 项目薪酬查询-工资条查询导出
* @return * @return
**/ **/
@Override @Override
...@@ -118,6 +128,8 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper, ...@@ -118,6 +128,8 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
listExport(response, searchVo); listExport(response, searchVo);
}else if (CommonConstants.ONE_INT == type){ }else if (CommonConstants.ONE_INT == type){
auditExport(response, searchVo); auditExport(response, searchVo);
} else if (CommonConstants.TWO_INT == type){
getEmpAccountExport(response, searchVo);
} }
}catch (Exception e){ }catch (Exception e){
log.error("导出异常:",e); log.error("导出异常:",e);
...@@ -362,6 +374,171 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper, ...@@ -362,6 +374,171 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
} }
} }
/**
* @Description: 项目薪酬查询-工资条查询导出
* @Author: hgw
* @Date: 2025-4-21 09:45:46
* @return: void
**/
private void getEmpAccountExport(HttpServletResponse response, TSalaryAccountSearchVo searchVo) {
String fileName = "工资条查询导出" + DateUtil.getThisTime() + CommonConstants.XLSX;
//获取要导出的列表
List<TSalaryAccountExportVo> list = new ArrayList<>();
//long count = baseMapper.auditExportCountDiy(searchVo, searchVo.getIdList());
long count = baseMapper.getEmpAccountCount(searchVo);
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"));
//非管理员导出 大于10W 提示“导出量过大,请选择更多查询条件!如果确定要导出这些数据请联系系统管理员操作”
if (count > 100000) {
out.write(CommonConstants.SOCIAL_EXPORT_LIMIT.getBytes("GBK"));
out.close();
return;
}
List<List<String>> headList = Lists.newArrayList();
String title = "工资月份,发放状态,结算月份,项目名称,员工姓名,银行卡号,开户行,身份证号,工资发放方式,社保扣缴月份" +
",公积金扣缴月份,社保优先级,公积金优先级,年终奖扣税方案,是否扣除社保,是否扣除公积金";
String[] strTemp = title.split(",");
List<String> titleList;
for (String temp : strTemp) {
titleList = new ArrayList<>();
titleList.add(temp);
headList.add(titleList);
}
/*excelWriter = EasyExcelFactory.write(out).registerWriteHandler(ExcelStyle.getNormalStype())
.registerConverter(new DictConverter(nameAndDicTypeMap, redisLabelMap))
.includeColumnFieldNames(titleContent).head(headList).build();*/
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcelFactory.write(out, TSalaryAccountExportVo.class).includeColumnFiledNames(searchVo.getExportFields()).build();
int index = 0;
WriteSheet writeSheet = null;
if (count > CommonConstants.ZERO_INT) {
Map<String,TSalaryAccountItemExportVo> itemExportVoMap = new HashMap<>();
List<String> idList = null;
List<String> idStandardList = null;
List<TAuditExportStandardVo> standardItems = null;
Map<String,TAuditExportStandardVo> itemStandardMap = new HashMap<>();
Map<String,TAuditExportItemVo> itemAnnualBonusMap = new HashMap<>();
Map<String,TAuditExportItemVo> itemPersionTaxMap = new HashMap<>();
Map<String,TAuditExportItemVo> itemAnnuityMap = new HashMap<>();
Map<String,TAuditExportItemVo> itemSubsidyMap = new HashMap<>();
Map<String,TAuditExportItemVo> itemCarNoTaxMap = new HashMap<>();
List<TSalaryAccountItemExportVo> items = null;
List<TAuditExportItemVo> annualBonusItems;
List<TAuditExportItemVo> exemptionPersionTaxItems;
List<TAuditExportItemVo> enterpriseAnnuityItems;
List<TAuditExportItemVo> phoneSubsidyItems;
List<TAuditExportItemVo> carNoTaxItems;
List<String> ids = null;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT_1) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT_1);
if (count < 200000){
list = baseMapper.auditExportDiy(searchVo, searchVo.getIdList());
//list = baseMapper.getEmpAccountExport(searchVo);
}else{
if (Common.isNotNull(searchVo.getIdList())){
ids = searchVo.getIdList();
}else {
ids = baseMapper.auditExportDiyIds(searchVo, searchVo.getIdList());
}
if (Common.isNotNull(ids)){
searchVo.setIdList(null);
list = baseMapper.auditExportDiyByIds(ids);
}else {
list = new ArrayList<>();
}
}
if (Common.isNotNull(ids)){
ids.clear();
}
if (Common.isNotNull(list)) {
//先把数据封装完成
idList = list.stream().map(TSalaryAccountExportVo::getId).collect(Collectors.toList());
idStandardList = list.stream().map(TSalaryAccountExportVo::getSalaryFormId).collect(Collectors.toList());
//初始化明细数据MAP
if (Common.isNotNull(idList)){
items = baseMapper.auditExportSelectItems(idList);
if (Common.isNotNull(items)){
itemExportVoMap = items.stream().collect(Collectors.toMap(TSalaryAccountItemExportVo::getSalaryAccountId,vo -> vo,(k1,k2) -> k1));
}
items.clear();
annualBonusItems = baseMapper.auditExportAnnualBonus(idList);
if (Common.isNotNull(annualBonusItems)){
itemAnnualBonusMap = annualBonusItems.stream().collect(Collectors.toMap(TAuditExportItemVo::getSalaryAccountId,vo -> vo,(k1,k2) -> k1));
}
annualBonusItems.clear();
exemptionPersionTaxItems = baseMapper.auditExportExemptionPersionTax(idList);
if (Common.isNotNull(exemptionPersionTaxItems)){
itemPersionTaxMap = exemptionPersionTaxItems.stream().collect(Collectors.toMap(TAuditExportItemVo::getSalaryAccountId,vo -> vo,(k1,k2) -> k1));
}
exemptionPersionTaxItems.clear();
enterpriseAnnuityItems = baseMapper.auditExportEnterpriseAnnuity(idList);
if (Common.isNotNull(enterpriseAnnuityItems)){
itemAnnuityMap = enterpriseAnnuityItems.stream().collect(Collectors.toMap(TAuditExportItemVo::getSalaryAccountId,vo -> vo,(k1,k2) -> k1));
}
enterpriseAnnuityItems.clear();
phoneSubsidyItems = baseMapper.auditExportPhoneSubsidy(idList);
if (Common.isNotNull(phoneSubsidyItems)){
itemSubsidyMap = phoneSubsidyItems.stream().collect(Collectors.toMap(TAuditExportItemVo::getSalaryAccountId,vo -> vo,(k1,k2) -> k1));
}
phoneSubsidyItems.clear();
carNoTaxItems = baseMapper.auditExportCarNoTax(idList);
if (Common.isNotNull(carNoTaxItems)){
itemCarNoTaxMap = carNoTaxItems.stream().collect(Collectors.toMap(TAuditExportItemVo::getSalaryAccountId,vo -> vo,(k1,k2) -> k1));
}
carNoTaxItems.clear();
}
if (Common.isNotNull(idStandardList)){
standardItems = baseMapper.auditExportStandard(idStandardList);
if (Common.isNotNull(standardItems)){
itemStandardMap = standardItems.stream().collect(Collectors.toMap(TAuditExportStandardVo::getSalaryFormId,vo -> vo,(k1,k2) -> k1));
standardItems.clear();
}
}
//封装信息
initResult(list, itemExportVoMap,itemStandardMap,itemAnnualBonusMap,itemPersionTaxMap,itemAnnuityMap,itemSubsidyMap,itemCarNoTaxMap);
if (i%CommonConstants.EXCEL_EXPORT_LIMIT==0){
writeSheet = EasyExcelFactory.writerSheet("工资条" + index).build();
index++;
}
excelWriter.write(list, writeSheet);
list.clear();
}
clearMap(itemExportVoMap, idList, idStandardList, itemStandardMap, itemAnnualBonusMap, itemPersionTaxMap, itemAnnuityMap, itemSubsidyMap);
}
} 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);
}
}
}
private void clearMap(Map<String, TSalaryAccountItemExportVo> itemExportVoMap, List<String> idList, List<String> idStandardList, Map<String, TAuditExportStandardVo> itemStandardMap, Map<String, TAuditExportItemVo> itemAnnualBonusMap, Map<String, TAuditExportItemVo> itemPersionTaxMap, Map<String, TAuditExportItemVo> itemAnnuityMap, Map<String, TAuditExportItemVo> itemSubsidyMap) { private void clearMap(Map<String, TSalaryAccountItemExportVo> itemExportVoMap, List<String> idList, List<String> idStandardList, Map<String, TAuditExportStandardVo> itemStandardMap, Map<String, TAuditExportItemVo> itemAnnualBonusMap, Map<String, TAuditExportItemVo> itemPersionTaxMap, Map<String, TAuditExportItemVo> itemAnnuityMap, Map<String, TAuditExportItemVo> itemSubsidyMap) {
if (Common.isNotNull(idList)){ if (Common.isNotNull(idList)){
idList.clear(); idList.clear();
......
...@@ -568,6 +568,73 @@ ...@@ -568,6 +568,73 @@
</where> </where>
order by a.CREATE_TIME desc order by a.CREATE_TIME desc
</select> </select>
<!--项目薪酬查询-工资条查询-导出条数-->
<select id="getEmpAccountCount" resultType="java.lang.Integer">
SELECT
count(1)
FROM
<if test="settlementMonth == null or settlementMonth.trim() >= '202201' ">
t_salary_account a
</if>
<if test="settlementMonth != null and settlementMonth.trim() &lt; '202201' ">
t_salary_account_hro_2021 a
</if>
where a.DELETE_FLAG = 0
<include refid="tSalaryAccount_where"/>
</select>
<!--项目薪酬查询-工资条查询-导出-->
<select id="getEmpAccountExport" resultMap="tSalaryAccountMap">
SELECT
a.SALARY_MONTH,
if(a.DISTRIBUTION_FLAG='1','发放成功',if(a.DISTRIBUTION_FLAG='2','发放失败','未发放')) DISTRIBUTION_FLAG,
a.SETTLEMENT_MONTH,
a.DEPT_NAME,
a.EMP_NAME,
a.BANK_NO,
a.BANK_NAME,
a.EMP_IDCARD,
if(a.SALARY_STYLE='0','现金',if(a.SALARY_STYLE='1','转账','线下')) SALARY_STYLE,
a.DEDU_SOCIAL_MONTH,
a.DEDU_PROVIDENT_MONTH,
if(a.SOCIAL_PRIORITY='0','生成','缴纳') SOCIAL_PRIORITY,
if(a.FUND_PRIORITY='0','生成','缴纳') FUND_PRIORITY,
if(a.ANNUAL_BONUS_TYPE='0','合并','单独') ANNUAL_BONUS_TYPE,
if(a.IS_DEDUCT_SOCIAL='0','否','是') IS_DEDUCT_SOCIAL,
if(a.IS_DEDUCT_FUND='0','否','是') IS_DEDUCT_FUND
FROM
<if test="settlementMonth == null or settlementMonth.trim() >= '202201' ">
t_salary_account a
</if>
<if test="settlementMonth != null and settlementMonth.trim() &lt; '202201' ">
t_salary_account_hro_2021 a
</if>
where a.DELETE_FLAG = 0
<include refid="tSalaryAccount_where"/>
order by a.SETTLEMENT_MONTH asc
<if test="searchVo != null">
<if test="searchVo.limitStart != null">
limit #{searchVo.limitStart},#{searchVo.limitEnd}
</if>
</if>
</select>
<!--项目薪酬查询-工资条查询-->
<select id="getEmpAccountPage" resultMap="tSalaryAccountMap">
SELECT
<include refid="Base_Column_List"/>
FROM
<if test="settlementMonth == null or settlementMonth.trim() >= '202201' ">
t_salary_account a
</if>
<if test="settlementMonth != null and settlementMonth.trim() &lt; '202201' ">
t_salary_account_hro_2021 a
</if>
where a.DELETE_FLAG = 0
<include refid="tSalaryAccount_where"/>
order by a.SETTLEMENT_MONTH asc
</select>
<!--tSalaryAccount简单分页查询--> <!--tSalaryAccount简单分页查询-->
<select id="getTSalaryAccountPageDataByIds" resultMap="tSalaryAccountMap"> <select id="getTSalaryAccountPageDataByIds" resultMap="tSalaryAccountMap">
SELECT SELECT
......
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