feat: 统一修改到内存分页

This commit is contained in:
fcli 2022-12-12 10:25:55 +08:00
parent 309cb2047d
commit b58e71989d
23 changed files with 86 additions and 93 deletions

View File

@ -119,11 +119,12 @@ public class SIAccountBiz extends Service {
}
public PageInfo<InsuranceAccountBatchPO> listPage(InsuranceAccountBatchParam queryParam) {
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List<InsuranceAccountBatchPO> list = getInsuranceAccountBatchMapper().list(queryParam);
list = SiAccountEncrypt.decryptInsuranceAccountBatchList(list);
PageInfo<InsuranceAccountBatchPO> pageInfo = new PageInfo<>(list, InsuranceAccountBatchPO.class);
return pageInfo;
PageInfo<InsuranceAccountBatchPO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
list, InsuranceAccountBatchPO.class);
SiAccountEncrypt.decryptInsuranceAccountBatchList(page.getList());
return page;
}
public PageInfo<InsuranceAccountDetailPO> listCommonPage(InsuranceAccountDetailParam queryParam) {
@ -141,11 +142,11 @@ public class SIAccountBiz extends Service {
OrderRuleVO orderRule = getSalarySysConfService(user).orderRule();
queryParam.setOrderRule(orderRule);
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List<InsuranceAccountDetailPO> list = getInsuranceAccountDetailMapper().list(queryParam);
InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(list);
PageInfo<InsuranceAccountDetailPO> pageInfo = new PageInfo<>(list, InsuranceAccountDetailPO.class);
PageInfo<InsuranceAccountDetailPO> pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
list, InsuranceAccountDetailPO.class);
InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(pageInfo.getList());
return pageInfo;
}

View File

@ -967,14 +967,13 @@ public class SIArchivesBiz {
pageInfo.setTotal(page.size());
pageInfo.setList(SalaryPageUtil.subList(pageInfo.getPageNum(), pageInfo.getPageSize(), page));
} else {
SalaryPageUtil.start(param.getCurrent(), param.getPageSize());
// List<InsuranceArchivesEmployeePO> page = socialSchemeMapper.listPageEmployeePOS(param);
log.info("从数据库获取档案列表数据开始");
sw.start("获取档案列表数据");
page = socialSchemeMapper.queryEmployeeList(param);
sw.stop();
log.info("从数据库获取档案列表数据完成!");
pageInfo = new PageInfo<>(page, InsuranceArchivesEmployeePO.class);
pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(),
page, InsuranceArchivesEmployeePO.class);
}
List<Map<String, Object>> records = null;
log.info("buildTableData方法处理福利档案列表数据开始");

View File

@ -160,11 +160,12 @@ public class SalaryArchiveItemBiz {
public PageInfo<SalaryItemAdjustRecordListDTO> salaryItemAdjustRecordListPage(SalaryItemAdjustRecordQueryParam queryParam, List<Long> salaryItemIds) {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
SalaryArchiveItemMapper mapper = sqlSession.getMapper(SalaryArchiveItemMapper.class);
List<SalaryItemAdjustRecordListDTO> salaryItemAdjustRecordListDTOS = mapper.salaryItemAdjustRecordList(queryParam, salaryItemIds);
SalaryItemAdjustRecordListDTOEncrypt.decryptSalaryItemAdjustRecordListDTOList(salaryItemAdjustRecordListDTOS);
PageInfo<SalaryItemAdjustRecordListDTO> page = new PageInfo<SalaryItemAdjustRecordListDTO>(salaryItemAdjustRecordListDTOS, SalaryItemAdjustRecordListDTO.class);
PageInfo<SalaryItemAdjustRecordListDTO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
salaryItemAdjustRecordListDTOS,
SalaryItemAdjustRecordListDTO.class);
SalaryItemAdjustRecordListDTOEncrypt.decryptSalaryItemAdjustRecordListDTOList(page.getList());
return page;
} finally {
sqlSession.close();

View File

@ -5,7 +5,7 @@ import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
import com.engine.salary.enums.SalaryOnOffEnum;
import com.engine.salary.mapper.salaryitem.SalaryItemMapper;
import com.engine.salary.util.page.PageInfo;
import com.github.pagehelper.PageHelper;
import com.engine.salary.util.page.SalaryPageUtil;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.ibatis.session.SqlSession;
@ -98,10 +98,9 @@ public class SalaryItemBiz {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
SalaryItemMapper mapper = sqlSession.getMapper(SalaryItemMapper.class);
// SalaryPageUtil.start(searchParam.getCurrent(), searchParam.getPageSize());
PageHelper.startPage(searchParam.getCurrent(), searchParam.getPageSize());
List<SalaryItemPO> salaryItemPOList = mapper.listByParam(searchParam);
return new PageInfo<SalaryItemPO>(salaryItemPOList);
return SalaryPageUtil.buildPage(searchParam.getCurrent(), searchParam.getPageSize(),
salaryItemPOList, SalaryItemPO.class);
} finally {
sqlSession.close();
}

View File

@ -4,10 +4,9 @@ import com.engine.salary.entity.salarysob.param.SalarySobCheckRuleQueryParam;
import com.engine.salary.entity.salarysob.po.SalarySobCheckRulePO;
import com.engine.salary.mapper.salarysob.SalarySobCheckRuleMapper;
import com.engine.salary.util.page.PageInfo;
import com.engine.salary.util.page.SalaryPageUtil;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;
import com.engine.salary.util.page.SalaryPageUtil;
import org.apache.ibatis.session.SqlSession;
import weaver.conn.mybatis.MyBatisFactory;
@ -100,10 +99,9 @@ public class SalarySobCheckRuleBiz {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
SalarySobCheckRuleMapper mapper = sqlSession.getMapper(SalarySobCheckRuleMapper.class);
SalaryPageUtil.start(param.getCurrent(), param.getPageSize());
List<SalarySobCheckRulePO> list = mapper.listByParam(param);
PageInfo<SalarySobCheckRulePO> pageInfo = new PageInfo<SalarySobCheckRulePO>(list, SalarySobCheckRulePO.class);
return pageInfo;
return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(),
list, SalarySobCheckRulePO.class);
} finally {
sqlSession.close();
}

View File

@ -873,10 +873,11 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
queryParam.setTaxAgentIds(taxAgentIdsAsAdmin);
}
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List<AddUpDeductionRecordDTO> list = getAddUpDeductionMapper().recordList(queryParam);
AddUpDeductionRecordStrDTOEncrypt.decryptAddUpDeductionRecordDTO(list);
return new PageInfo<>(list, AddUpDeductionRecordDTO.class);
PageInfo<AddUpDeductionRecordDTO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
list, AddUpDeductionRecordDTO.class);
AddUpDeductionRecordStrDTOEncrypt.decryptAddUpDeductionRecordDTO(page.getList());
return page;
}

View File

@ -218,11 +218,11 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
queryParam.setTaxAgentIds(taxAgentIdsAsAdmin);
}
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List<AddUpSituationRecordDTO> list = getAddUpSituationMapper().recordList(queryParam);
AddUpSituationRecordDTOEncrypt.decryptAddUpSituationRecordDTOList(list);
return new PageInfo<>(list, AddUpSituationRecordDTO.class);
PageInfo<AddUpSituationRecordDTO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
list, AddUpSituationRecordDTO.class);
AddUpSituationRecordDTOEncrypt.decryptAddUpSituationRecordDTOList(page.getList());
return page;
}
@Override

View File

@ -65,9 +65,8 @@ public class AttendQuoteFieldServiceImpl extends Service implements AttendQuoteF
@Override
public PageInfo<AttendQuoteFieldListDTO> listPage(AttendQuoteFieldQueryParam queryParam) {
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List<AttendQuoteFieldListDTO> list = getAttendQuoteFieldMapper().list(queryParam);
return new PageInfo<>(list);
return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), list, AttendQuoteFieldListDTO.class);
}

View File

@ -79,9 +79,9 @@ public class AttendQuoteServiceImpl extends Service implements AttendQuoteServic
queryParam.setSalarySobIds(salarySobIds);
}
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List<AttendQuoteListDTO> list = getAttendQuoteMapper().list(queryParam);
return new PageInfo<>(list, AttendQuoteListDTO.class);
return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
list, AttendQuoteListDTO.class);
}
@Override

View File

@ -117,10 +117,11 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
}
queryParam.setTaxAgentIds(taxAgentIdsAsAdmin);
}
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List<OtherDeductionListDTO> list = getOtherDeductionMapper().list(queryParam);
OtherDeductionListDTOEncrypt.decryptOtherDeductionListDTOList(list);
return new PageInfo<>(list, OtherDeductionListDTO.class);
PageInfo<OtherDeductionListDTO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
list, OtherDeductionListDTO.class);
OtherDeductionListDTOEncrypt.decryptOtherDeductionListDTOList(page.getList());
return page;
}
@Override
@ -142,10 +143,11 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
}
queryParam.setTaxAgentIds(taxAgentIdsAsAdmin);
}
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List<OtherDeductionRecordDTO> list = getOtherDeductionMapper().recordList(queryParam);
OtherDeductionRecordDTOEncrypt.decryptOtherDeductionRecordDTOList(list);
return new PageInfo<>(list, OtherDeductionRecordDTO.class);
PageInfo<OtherDeductionRecordDTO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
list, OtherDeductionRecordDTO.class);
OtherDeductionRecordDTOEncrypt.decryptOtherDeductionRecordDTOList(page.getList());
return page;
}

View File

@ -310,9 +310,9 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
OrderRuleVO orderRule = getSalarySysConfService(user).orderRule();
queryParam.setOrderRule(orderRule);
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List<InsuranceAccountDetailPO> list = getInsuranceAccountDetailMapper().list(queryParam);
PageInfo<InsuranceAccountDetailPO> pageInfo = new PageInfo<>(list, InsuranceAccountDetailPO.class);
PageInfo<InsuranceAccountDetailPO> pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(),queryParam.getPageSize(),
list, InsuranceAccountDetailPO.class);
List<InsuranceAccountDetailPO> insuranceAccountDetailPOS = pageInfo.getList();
InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(insuranceAccountDetailPOS);
//数据组装
@ -376,9 +376,9 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
OrderRuleVO orderRule = getSalarySysConfService(user).orderRule();
queryParam.setOrderRule(orderRule);
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List<InsuranceAccountDetailPO> list = getInsuranceAccountDetailMapper().list(queryParam);
PageInfo<InsuranceAccountDetailPO> pageInfo = new PageInfo<>(list, InsuranceAccountDetailPO.class);
PageInfo<InsuranceAccountDetailPO> pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(),queryParam.getPageSize(),
list, InsuranceAccountDetailPO.class);
List<InsuranceAccountDetailPO> insuranceAccountDetailPOS = pageInfo.getList();
InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(insuranceAccountDetailPOS);
//数据组装
@ -585,9 +585,9 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
public Map<String, Object> changeList(InsuranceAccountDetailParam param) {
Map<String, Object> datas = new HashMap<>();
Long employeeId = (long) user.getUID();
SalaryPageUtil.start(param.getCurrent(), param.getPageSize());
List<InsuranceArchivesEmployeePO> insuranceArchivesEmployeePOS = getInsuranceAccountDetailMapper().changeList(param.getUserName());
PageInfo<InsuranceArchivesEmployeePO> pageInfo = new PageInfo<>(insuranceArchivesEmployeePOS);
PageInfo<InsuranceArchivesEmployeePO> pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(),
insuranceArchivesEmployeePOS, InsuranceArchivesEmployeePO.class);
List<Map<String, Object>> records = siArchivesBiz.buildTableData(insuranceArchivesEmployeePOS);
PageInfo<Map<String, Object>> pageInfos = new PageInfo<>(records);
@ -647,11 +647,10 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
public Map<String, Object> getInspectTable(InsuranceAccountDetailParam param) {
Map<String, Object> datas = new HashMap<>();
SalaryPageUtil.start(param.getCurrent(), param.getPageSize());
List<InsuranceAccountInspectPO> insuranceAccountInspectPOS = MapperProxyFactory.getProxy(InsuranceAccountInspectMapper.class).getByBillMonth(param.getBillMonth());
List<Map<String, Object>> records = getService(user).buildInspectRecords(insuranceAccountInspectPOS, Long.valueOf(param.getPaymentOrganization()));
PageInfo<Map<String, Object>> pageInfos = new PageInfo<>(records);
List<Map<String, Object>> paged = SalaryPageUtil.subList(param.getCurrent(), param.getPageSize(), records);
PageInfo<Map<String, Object>> pageInfos = new PageInfo<>(paged);
pageInfos.setTotal(records.size());
pageInfos.setPageNum(param.getCurrent());
pageInfos.setPageSize(param.getPageSize());

View File

@ -98,9 +98,9 @@ public class SIImportServiceImpl extends Service implements SIImportService {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
SocialSchemeMapper socialSchemeMapper = sqlSession.getMapper(SocialSchemeMapper.class);
List<InsuranceArchivesEmployeePO> page = new ArrayList<>();
SalaryPageUtil.start(param.getCurrent(), param.getPageSize());
page = socialSchemeMapper.queryEmployeeList(param);
PageInfo<InsuranceArchivesEmployeePO> pageInfo = new PageInfo<>(page, InsuranceArchivesEmployeePO.class);
PageInfo<InsuranceArchivesEmployeePO> pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(),
page, InsuranceArchivesEmployeePO.class);
int total = (int)pageInfo.getTotal();
param.setPageSize(total);
param.setCurrent(1);

View File

@ -21,9 +21,9 @@ public class SIReportServiceImpl extends Service implements SIReportService {
@Override
public PageInfo<InsuranceAccountDetailPO> welfareList(QueryAccountDetailParam param) {
SalaryPageUtil.start(param.getCurrent(),param.getPageSize());
List<InsuranceAccountDetailPO> insuranceAccountDetailPOS = getSIAccountDetailMapper().listSome(param);
PageInfo<InsuranceAccountDetailPO> page = new PageInfo<>(insuranceAccountDetailPOS ,InsuranceAccountDetailPO.class);
PageInfo<InsuranceAccountDetailPO> page = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(),
insuranceAccountDetailPOS ,InsuranceAccountDetailPO.class);
List<InsuranceAccountDetailPO> list = page.getList();
InsuranceAccountDetailPOEncrypt.decryptInsuranceAccountDetailPOList(list);
page.setList(list);

View File

@ -190,10 +190,10 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct
queryParam.setOrderRule(orderRule);
// 分页参数
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
// 查询薪资核算人员
List<SalaryAcctEmployeePO> salaryAcctEmployeePOS = getSalaryAcctEmployeeMapper().listPage(queryParam);
return new PageInfo<>(salaryAcctEmployeePOS);
return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
salaryAcctEmployeePOS, SalaryAcctEmployeePO.class);
}
@Override
@ -322,10 +322,9 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct
// 查询合并计税的薪资核算人员
Set<Long> otherSalaryAcctRecordIds = SalaryEntityUtil.properties(otherSalaryAcctRecordPOS, SalaryAcctRecordPO::getId);
// 分页参数
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List<SalaryAcctEmployeePO> salaryAcctEmployeePOS = getSalaryAcctEmployeeMapper().listPage4ConsolidatedTax(otherSalaryAcctRecordIds, queryParam);
PageInfo<SalaryAcctEmployeePO> salaryAcctEmployeePOPageInfo = new PageInfo<>(salaryAcctEmployeePOS);
return salaryAcctEmployeePOPageInfo;
return SalaryPageUtil.buildPage(queryParam.getCurrent(),queryParam.getPageSize(),
salaryAcctEmployeePOS, SalaryAcctEmployeePO.class);
}
@Override

View File

@ -172,9 +172,9 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe
}
// 查询薪资核算记录
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List<SalaryAcctRecordPO> salaryAcctRecordPOS = getSalaryAcctRecordMapper().listSome(po);
return new PageInfo<>(salaryAcctRecordPOS, SalaryAcctRecordPO.class);
return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
salaryAcctRecordPOS, SalaryAcctRecordPO.class);
}
@Override

View File

@ -60,10 +60,9 @@ public class SalaryArchiveTaxAgentServiceImpl extends Service implements SalaryA
@Override
public PageInfo<TaxAgentAdjustRecordListDTO> taxAgentAdjustRecordListPage(TaxAgentAdjustRecordQueryParam queryParam) {
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List<TaxAgentAdjustRecordListDTO> taxAgentAdjustRecordListDTOS = getSalaryArchiveTaxAgentMapper().taxAgentAdjustRecordList(queryParam);
PageInfo<TaxAgentAdjustRecordListDTO> pageInfo = new PageInfo<TaxAgentAdjustRecordListDTO>(taxAgentAdjustRecordListDTOS, TaxAgentAdjustRecordListDTO.class);
return pageInfo;
return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
taxAgentAdjustRecordListDTOS, TaxAgentAdjustRecordListDTO.class);
}
@Override

View File

@ -94,9 +94,6 @@ public class SalarySendRangeServiceImpl extends Service implements SalarySendRan
@Override
public PageInfo<SalarySendRangeListDTO> listPage(SalarySendRangeQueryParam queryParam) {
if (StrUtil.isEmpty(queryParam.getTargetName())) {
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
}
SalarySendRangeMapper mapper = MapperProxyFactory.getProxy(SalarySendRangeMapper.class);
List<SalarySendRangeListDTO> listDTOs = mapper.selectByParam(queryParam);
PageInfo<SalarySendRangeListDTO> page = new PageInfo<>(listDTOs, SalarySendRangeListDTO.class);
@ -164,11 +161,9 @@ public class SalarySendRangeServiceImpl extends Service implements SalarySendRan
return s;
}).filter(Objects::nonNull)
.collect(Collectors.toList());
if (StrUtil.isNotEmpty(queryParam.getTargetName())) {
page.setTotal(listDTOs.size());
List<SalarySendRangeListDTO> list = SalaryPageUtil.subList(queryParam.getCurrent(), queryParam.getPageSize(), listDTOs);
page.setList(list);
}
page.setTotal(listDTOs.size());
List<SalarySendRangeListDTO> list = SalaryPageUtil.subList(queryParam.getCurrent(), queryParam.getPageSize(), listDTOs);
page.setList(list);
return page;
}
@ -179,7 +174,7 @@ public class SalarySendRangeServiceImpl extends Service implements SalarySendRan
@Override
public void deleteByIds(List<Long> sendRangeIds) {
runMapper(mapper-> {
runMapper(mapper -> {
for (Long sendRangeId : sendRangeIds) {
mapper.deleteByPrimaryKey(sendRangeId);
}

View File

@ -453,10 +453,9 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
OrderRuleVO orderRule = getSalarySysConfService(user).orderRule();
queryParam.setOrderRule(orderRule);
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List<SalarySendInfoListDTO> page = salarySendInfoMapper.list(queryParam);
PageInfo<SalarySendInfoListDTO> result = new PageInfo<>(page, SalarySendInfoListDTO.class);
return result;
return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
page, SalarySendInfoListDTO.class);
}
@Override
@ -493,10 +492,9 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
return new PageInfo<>();
}
}
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List<SalarySendDetailListDTO> list = MapperProxyFactory.getProxy(SalarySendInfoMapper.class).detailList(queryParam, otherSalaryAcctRecordIds);
PageInfo<SalarySendDetailListDTO> pageInfo = new PageInfo<>(list, SalarySendDetailListDTO.class);
return pageInfo;
return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
list, SalarySendDetailListDTO.class);
}
/**

View File

@ -190,9 +190,9 @@ public class SalarySobServiceImpl extends Service implements SalarySobService {
page.setList(subSalarySobs);
return page;
} else {
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List<SalarySobPO> salarySobPOS = salarySobMapper.listSome(build);
return new PageInfo<>(salarySobPOS, SalarySobPO.class);
return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
salarySobPOS, SalarySobPO.class);
}
}

View File

@ -9,7 +9,10 @@ import com.engine.salary.encrypt.datacollection.SpecialAddDeductionEncrypt;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.datacollection.dto.SpecialAddDeductionListDTO;
import com.engine.salary.entity.datacollection.dto.SpecialAddDeductionRecordDTO;
import com.engine.salary.entity.datacollection.param.*;
import com.engine.salary.entity.datacollection.param.SpecialAddDeductionImportParam;
import com.engine.salary.entity.datacollection.param.SpecialAddDeductionParam;
import com.engine.salary.entity.datacollection.param.SpecialAddDeductionQueryParam;
import com.engine.salary.entity.datacollection.param.SpecialAddDeductionRecordDeleteParam;
import com.engine.salary.entity.datacollection.po.SpecialAddDeductionPO;
import com.engine.salary.entity.taxagent.dto.TaxAgentEmployeeTaxAgentDTO;
import com.engine.salary.entity.taxagent.dto.TaxAgentManageRangeEmployeeDTO;
@ -99,10 +102,11 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
if (needAuth) {
putQueryRange(queryParam);
}
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List<SpecialAddDeductionListDTO> list = getSpecialAddDeductionMapper().listByParam(queryParam);
SpecialAddDeductionEncrypt.decrypt(list);
return new PageInfo<>(list, SpecialAddDeductionListDTO.class);
PageInfo<SpecialAddDeductionListDTO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
list, SpecialAddDeductionListDTO.class);
SpecialAddDeductionEncrypt.decrypt(page.getList());
return page;
}
@Override
@ -113,11 +117,11 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
if (needAuth) {
putQueryRange(queryParam);
}
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List<SpecialAddDeductionRecordDTO> list = getSpecialAddDeductionMapper().listDtoByParam(queryParam);
SpecialAddDeductionEncrypt.decrypt(list);
return new PageInfo<>(list, SpecialAddDeductionRecordDTO.class);
PageInfo<SpecialAddDeductionRecordDTO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
list, SpecialAddDeductionRecordDTO.class);
SpecialAddDeductionEncrypt.decrypt(page.getList());
return page;
}
private void putQueryRange(SpecialAddDeductionQueryParam queryParam) {

View File

@ -215,9 +215,9 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService {
@Override
public PageInfo<TaxAgentPO> listPage(TaxAgentQueryParam queryParam) {
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List<TaxAgentPO> taxAgentPOS = getTaxAgentMapper().listBySome(queryParam);
return new PageInfo<>(taxAgentPOS);
return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
taxAgentPOS, TaxAgentPO.class);
}
@Override

View File

@ -122,9 +122,9 @@ public class TaxDeclarationServiceImpl extends Service implements TaxDeclaration
}
// 查询个税申报表
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List<TaxDeclarationPO> taxDeclarationPOS = getTaxDeclarationMapper().listSome(po);
return new PageInfo<>(taxDeclarationPOS, TaxDeclarationPO.class);
return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
taxDeclarationPOS, TaxDeclarationPO.class);
}

View File

@ -94,16 +94,15 @@ public class SalarySendWrapper extends Service {
if (CollectionUtils.isNotEmpty(salarySobIds)) {
queryParam.setSalarySobIds(salarySobIds);
SalarySendMapper salarySendMapper = sqlSession.getMapper(SalarySendMapper.class);
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
list = salarySendMapper.list(queryParam);
}
} else {
SalarySendMapper salarySendMapper = sqlSession.getMapper(SalarySendMapper.class);
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
list = salarySendMapper.list(queryParam);
}
PageInfo<SalarySendListDTO> pageInfo = new PageInfo<>(list, SalarySendListDTO.class);
PageInfo<SalarySendListDTO> pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
list, SalarySendListDTO.class);
List<SalarySendListDTO> pageList = pageInfo.getList();
List<Long> salarySobIds = pageList.stream().map(SalarySendListDTO::getSalarySobId).distinct().collect(Collectors.toList());
// 获取默认模板