Merge branch 'feature/变更分页' into feature/加密方法&分页merge
# Conflicts: # src/com/engine/salary/biz/SIAccountBiz.java # src/com/engine/salary/biz/SalaryArchiveItemBiz.java # src/com/engine/salary/service/impl/AddUpDeductionServiceImpl.java # src/com/engine/salary/service/impl/AddUpSituationServiceImpl.java # src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java # src/com/engine/salary/service/impl/SpecialAddDeductionServiceImpl.java
This commit is contained in:
commit
dea2353ef2
|
|
@ -9,7 +9,6 @@
|
|||
</settings>
|
||||
<plugins>
|
||||
<plugin interceptor="weaver.conn.mybatis.MyBatisCachePlugin"></plugin>
|
||||
<plugin interceptor="com.github.pagehelper.PageInterceptor"></plugin>
|
||||
</plugins>
|
||||
<environments default="development">
|
||||
<environment id="development">
|
||||
|
|
|
|||
|
|
@ -118,11 +118,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 = encryptUtil.decryptList(list, InsuranceAccountBatchPO.class);
|
||||
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) {
|
||||
|
|
@ -140,10 +141,10 @@ 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);
|
||||
|
||||
PageInfo<InsuranceAccountDetailPO> pageInfo = new PageInfo<>(list, InsuranceAccountDetailPO.class);
|
||||
PageInfo<InsuranceAccountDetailPO> pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
|
||||
list, InsuranceAccountDetailPO.class);
|
||||
encryptUtil.decryptList(pageInfo.getList(), InsuranceAccountDetailPO.class);
|
||||
return pageInfo;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -966,14 +966,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方法处理福利档案列表数据开始");
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
encryptUtil.decryptList(salaryItemAdjustRecordListDTOS, SalaryItemAdjustRecordListDTO.class);
|
||||
PageInfo<SalaryItemAdjustRecordListDTO> page = new PageInfo<SalaryItemAdjustRecordListDTO>(salaryItemAdjustRecordListDTOS, SalaryItemAdjustRecordListDTO.class);
|
||||
PageInfo<SalaryItemAdjustRecordListDTO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
|
||||
salaryItemAdjustRecordListDTOS,
|
||||
SalaryItemAdjustRecordListDTO.class);
|
||||
encryptUtil.decryptList(page.getList(), SalaryItemAdjustRecordListDTO.class);
|
||||
return page;
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -854,10 +854,9 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
OrderRuleVO orderRule = getSalarySysConfService(user).orderRule();
|
||||
queryParam.setOrderRule(orderRule);
|
||||
|
||||
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
List<AddUpDeductionDTO> list = getAddUpDeductionMapper().list(queryParam);
|
||||
List<AddUpDeductionDTO> addUpDeductionDTOS = new EncryptUtil().decryptList(list, AddUpDeductionDTO.class);
|
||||
return new PageInfo<>(addUpDeductionDTOS, AddUpDeductionDTO.class);
|
||||
List<AddUpDeductionDTO> addUpDeductionDTOS = encryptUtil.decryptList(list, AddUpDeductionDTO.class);
|
||||
return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), addUpDeductionDTOS, AddUpDeductionDTO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -873,10 +872,11 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
|||
queryParam.setTaxAgentIds(taxAgentIdsAsAdmin);
|
||||
}
|
||||
|
||||
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
List<AddUpDeductionRecordDTO> list = getAddUpDeductionMapper().recordList(queryParam);
|
||||
encryptUtil.decryptList(list, AddUpDeductionRecordDTO.class);
|
||||
return new PageInfo<>(list, AddUpDeductionRecordDTO.class);
|
||||
PageInfo<AddUpDeductionRecordDTO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
|
||||
list, AddUpDeductionRecordDTO.class);
|
||||
encryptUtil.decryptList(page.getList(), AddUpDeductionRecordDTO.class);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -199,10 +199,9 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
}
|
||||
queryParam.setTaxAgentIds(taxAgentIdsAsAdmin);
|
||||
}
|
||||
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
List<AddUpSituationDTO> list = getAddUpSituationMapper().list(queryParam);
|
||||
encryptUtil.decryptList(list, AddUpSituationDTO.class);
|
||||
return new PageInfo<>(list, AddUpSituationDTO.class);
|
||||
return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), list, AddUpSituationDTO.class);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -219,11 +218,12 @@ public class AddUpSituationServiceImpl extends Service implements AddUpSituation
|
|||
queryParam.setTaxAgentIds(taxAgentIdsAsAdmin);
|
||||
}
|
||||
|
||||
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
List<AddUpSituationRecordDTO> list = getAddUpSituationMapper().recordList(queryParam);
|
||||
encryptUtil.decryptList(list, AddUpSituationRecordDTO.class);
|
||||
return new PageInfo<>(list, AddUpSituationRecordDTO.class);
|
||||
|
||||
PageInfo<AddUpSituationRecordDTO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
|
||||
list, AddUpSituationRecordDTO.class);
|
||||
encryptUtil.decryptList(page.getList(), AddUpSituationRecordDTO.class);
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -134,9 +134,8 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
OrderRuleVO orderRule = getSalarySysConfService(user).orderRule();
|
||||
queryParam.setOrderRule(orderRule);
|
||||
|
||||
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
List<AttendQuoteDataBaseDTO> list = getAttendQuoteDataMapper().list(queryParam);
|
||||
PageInfo<AttendQuoteDataBaseDTO> page = new PageInfo<AttendQuoteDataBaseDTO>(list);
|
||||
PageInfo<AttendQuoteDataBaseDTO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), list, AttendQuoteDataBaseDTO.class);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
|
@ -487,7 +486,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
if (CollectionUtils.isNotEmpty(values)) {
|
||||
log.info("考勤数据:{}", values);
|
||||
//去除空值
|
||||
values = values.stream().filter(po->StringUtils.isNotBlank(po.getDataValue())).collect(Collectors.toList());
|
||||
values = values.stream().filter(po -> StringUtils.isNotBlank(po.getDataValue())).collect(Collectors.toList());
|
||||
dataValueBiz.insertData(values);
|
||||
}
|
||||
}
|
||||
|
|
@ -785,8 +784,8 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
}
|
||||
|
||||
/**
|
||||
* @description 编辑数据
|
||||
* @return null
|
||||
* @description 编辑数据
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/28 14:40
|
||||
*/
|
||||
|
|
@ -799,33 +798,33 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
ids.add(attendQuoteDataEditParam.getId());
|
||||
AttendQuoteDataQueryParam build = AttendQuoteDataQueryParam.builder().ids(ids).build();
|
||||
List<AttendQuoteDataBaseDTO> list = dataBiz.list(build);
|
||||
if(list == null || list.size() == 0){
|
||||
if (list == null || list.size() == 0) {
|
||||
throw new SalaryRunTimeException("该数据不存在!");
|
||||
}
|
||||
Map<String, String> attendQuoteFieldData = new HashMap<>();
|
||||
for(Map.Entry<String, String> entrySet:attendQuoteData.entrySet()){
|
||||
for (Map.Entry<String, String> entrySet : attendQuoteData.entrySet()) {
|
||||
String[] s = entrySet.getKey().split("_");
|
||||
attendQuoteFieldData.put(s[0],entrySet.getValue());
|
||||
attendQuoteFieldData.put(s[0], entrySet.getValue());
|
||||
}
|
||||
for(Map.Entry<String, String> entrySet : attendQuoteFieldData.entrySet()){
|
||||
for (Map.Entry<String, String> entrySet : attendQuoteFieldData.entrySet()) {
|
||||
AttendQuoteDataValuePO updatePO = AttendQuoteDataValuePO.builder().employeeId(list.get(0).getEmployeeId()).attendQuoteFieldId(SalaryEntityUtil.string2Long(entrySet.getKey())).dataValue(entrySet.getValue()).build();
|
||||
attendQuoteDataValueBiz.updateDataValue(updatePO);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取数据
|
||||
* @return void
|
||||
* @description 获取数据
|
||||
* @author Harryxzy
|
||||
* @date 2022/10/31 14:12
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> getData(AttendQuoteDataEditParam attendQuoteDataEditParam) {
|
||||
public Map<String, Object> getData(AttendQuoteDataEditParam attendQuoteDataEditParam) {
|
||||
ArrayList<Long> ids = new ArrayList<>();
|
||||
ids.add(attendQuoteDataEditParam.getId());
|
||||
AttendQuoteDataQueryParam build = AttendQuoteDataQueryParam.builder().ids(ids).build();
|
||||
List<AttendQuoteDataBaseDTO> list = dataBiz.list(build);
|
||||
if(list==null || list.size()==0){
|
||||
if (list == null || list.size() == 0) {
|
||||
throw new SalaryRunTimeException("该数据不存在!");
|
||||
}
|
||||
// 所有考勤字段
|
||||
|
|
@ -853,7 +852,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
result.putAll(weaTable.makeDataResult());
|
||||
result.success();
|
||||
Map<String, Object> datas = new HashMap<>();
|
||||
datas.put("data",listMaps.get(0));
|
||||
datas.put("data", listMaps.get(0));
|
||||
datas.put("dataKey", result.getResultMap());
|
||||
return datas;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -117,9 +117,9 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
|
|||
}
|
||||
queryParam.setTaxAgentIds(taxAgentIdsAsAdmin);
|
||||
}
|
||||
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
List<OtherDeductionListDTO> list = getOtherDeductionMapper().list(queryParam);
|
||||
PageInfo<OtherDeductionListDTO> page = new PageInfo<>(list, OtherDeductionListDTO.class);
|
||||
PageInfo<OtherDeductionListDTO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
|
||||
list, OtherDeductionListDTO.class);
|
||||
encryptUtil.decryptList(page.getList(), OtherDeductionListDTO.class);
|
||||
return page;
|
||||
}
|
||||
|
|
@ -143,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);
|
||||
encryptUtil.decryptList(list, OtherDeductionRecordDTO.class);
|
||||
return new PageInfo<>(list, OtherDeductionRecordDTO.class);
|
||||
PageInfo<OtherDeductionRecordDTO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
|
||||
list, OtherDeductionRecordDTO.class);
|
||||
encryptUtil.decryptList(page.getList(), OtherDeductionRecordDTO.class);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
encryptUtil.decryptList(insuranceAccountDetailPOS, InsuranceAccountDetailPO.class);
|
||||
//数据组装
|
||||
|
|
@ -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();
|
||||
encryptUtil.decryptList(insuranceAccountDetailPOS, InsuranceAccountDetailPO.class);
|
||||
//数据组装
|
||||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -97,9 +97,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);
|
||||
|
|
|
|||
|
|
@ -23,9 +23,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();
|
||||
encryptUtil.decryptList(list, InsuranceAccountDetailPO.class);
|
||||
page.setList(list);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -455,10 +455,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
|
||||
|
|
@ -495,10 +494,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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -103,10 +103,11 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
|
|||
if (needAuth) {
|
||||
putQueryRange(queryParam);
|
||||
}
|
||||
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
List<SpecialAddDeductionListDTO> list = getSpecialAddDeductionMapper().listByParam(queryParam);
|
||||
encryptUtil.decryptList(list, SpecialAddDeductionListDTO.class);
|
||||
return new PageInfo<>(list, SpecialAddDeductionListDTO.class);
|
||||
PageInfo<SpecialAddDeductionListDTO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
|
||||
list, SpecialAddDeductionListDTO.class);
|
||||
encryptUtil.decryptList(page.getList(), SpecialAddDeductionListDTO.class);
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -117,11 +118,11 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
|
|||
if (needAuth) {
|
||||
putQueryRange(queryParam);
|
||||
}
|
||||
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
List<SpecialAddDeductionRecordDTO> list = getSpecialAddDeductionMapper().listDtoByParam(queryParam);
|
||||
encryptUtil.decryptList(list, SpecialAddDeductionRecordDTO.class);
|
||||
|
||||
return new PageInfo<>(list, SpecialAddDeductionRecordDTO.class);
|
||||
PageInfo<SpecialAddDeductionRecordDTO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
|
||||
list, SpecialAddDeductionRecordDTO.class);
|
||||
encryptUtil.decryptList(page.getList(), SpecialAddDeductionRecordDTO.class);
|
||||
return page;
|
||||
}
|
||||
|
||||
private void putQueryRange(SpecialAddDeductionQueryParam queryParam) {
|
||||
|
|
|
|||
|
|
@ -212,9 +212,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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public class SalaryPageUtil {
|
|||
return pageInfo;
|
||||
}
|
||||
|
||||
public static <T> PageInfo<T> buildPage(Integer pageNo, Integer pageSize,Class<T> clazz) {
|
||||
public static <T> PageInfo<T> buildPage(Integer pageNo, Integer pageSize, Class<T> clazz) {
|
||||
pageNo = pageNo == null || pageNo <= 0 ? 1 : pageNo;
|
||||
pageSize = pageSize == null || pageSize <= 0 ? 10 : pageSize;
|
||||
PageInfo<T> pageInfo = new PageInfo<>(clazz);
|
||||
|
|
@ -37,6 +37,28 @@ public class SalaryPageUtil {
|
|||
return pageInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 内存分页
|
||||
*
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param source
|
||||
* @param clazz
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> PageInfo<T> buildPage(Integer pageNo, Integer pageSize, List<T> source, Class<T> clazz) {
|
||||
pageNo = pageNo == null || pageNo <= 0 ? 1 : pageNo;
|
||||
pageSize = pageSize == null || pageSize <= 0 ? 10 : pageSize;
|
||||
PageInfo<T> pageInfo = new PageInfo<>(clazz);
|
||||
pageInfo.setPageNum(pageNo);
|
||||
pageInfo.setPageSize(pageSize);
|
||||
pageInfo.setTotal(source == null ? 0 : source.size());
|
||||
pageInfo.setList(subList(pageNo, pageSize, source));
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
// 获取默认模板
|
||||
|
|
|
|||
Loading…
Reference in New Issue