Commit 8bb4c032 authored by hongguangwu's avatar hongguangwu

MVP1.7.10-工资条

parent 8cf37236
...@@ -425,65 +425,69 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper, ...@@ -425,65 +425,69 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
int index = 0; int index = 0;
WriteSheet writeSheet = null; WriteSheet writeSheet = null;
if (count > CommonConstants.ZERO_INT) { if (count > CommonConstants.ZERO_INT) {
searchVo.setLimitStart(0); //int limit = 1000;
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT); int limit = 5;
List<TSalaryAccountExportSpecialVo> baseList = baseMapper.getEmpAccountExport(searchVo); for (int i = 0; i < count; i += limit) {
List<List<String>> listContent = new ArrayList<>(); searchVo.setLimitStart(i);
List<String> contentList = new ArrayList<>(); searchVo.setLimitEnd(limit);
if (baseList != null && !baseList.isEmpty()) { List<TSalaryAccountExportSpecialVo> baseList = baseMapper.getEmpAccountExport(searchVo);
for (TSalaryAccountExportSpecialVo a : baseList) { List<List<String>> listContent = new ArrayList<>();
contentList.add(a.getAccountId()); List<String> contentList = new ArrayList<>();
} if (baseList != null && !baseList.isEmpty()) {
Map<String, Map<String, String>> itemMap = new HashMap<>(); for (TSalaryAccountExportSpecialVo a : baseList) {
Map<String, String> tempMap = new HashMap<>(); contentList.add(a.getAccountId());
if (titleAllList != null && !titleAllList.isEmpty()) {
List<TSalaryAccountExportSpecialItemVo> itemList = baseMapper.getEmpAccountItemExport(searchVo.getSettlementMonth() ,contentList);
for (TSalaryAccountExportSpecialItemVo itemVo : itemList) {
tempMap = itemMap.get(itemVo.getAccountId());
if (tempMap == null) {
tempMap = new HashMap<>();
}
tempMap.put(itemVo.getCnName(), itemVo.getTextValue());
itemMap.put(itemVo.getAccountId(), tempMap);
} }
} Map<String, Map<String, String>> itemMap = new HashMap<>();
for (TSalaryAccountExportSpecialVo a : baseList) { Map<String, String> tempMap = new HashMap<>();
contentList = new ArrayList<>();
contentList.add(a.getExport1());
contentList.add(a.getExport2());
contentList.add(a.getExport3());
contentList.add(a.getExport4());
contentList.add(a.getExport5());
contentList.add(a.getExport6());
contentList.add(a.getExport7());
contentList.add(a.getExport8());
contentList.add(a.getExport9());
contentList.add(a.getExport10());
contentList.add(a.getExport11());
contentList.add(a.getExport12());
contentList.add(a.getExport13());
contentList.add(a.getExport14());
contentList.add(a.getExport15());
contentList.add(a.getExport16());
if (titleAllList != null && !titleAllList.isEmpty()) { if (titleAllList != null && !titleAllList.isEmpty()) {
tempMap = itemMap.get(a.getAccountId()); List<TSalaryAccountExportSpecialItemVo> itemList = baseMapper.getEmpAccountItemExport(searchVo.getSettlementMonth(), contentList);
for (String temp : titleAllList) { for (TSalaryAccountExportSpecialItemVo itemVo : itemList) {
if (tempMap != null) { tempMap = itemMap.get(itemVo.getAccountId());
if (tempMap.get(temp) != null) { if (tempMap == null) {
contentList.add(tempMap.get(temp)); tempMap = new HashMap<>();
}
tempMap.put(itemVo.getCnName(), itemVo.getTextValue());
itemMap.put(itemVo.getAccountId(), tempMap);
}
}
for (TSalaryAccountExportSpecialVo a : baseList) {
contentList = new ArrayList<>();
contentList.add(a.getExport1());
contentList.add(a.getExport2());
contentList.add(a.getExport3());
contentList.add(a.getExport4());
contentList.add(a.getExport5());
contentList.add(a.getExport6());
contentList.add(a.getExport7());
contentList.add(a.getExport8());
contentList.add(a.getExport9());
contentList.add(a.getExport10());
contentList.add(a.getExport11());
contentList.add(a.getExport12());
contentList.add(a.getExport13());
contentList.add(a.getExport14());
contentList.add(a.getExport15());
contentList.add(a.getExport16());
if (titleAllList != null && !titleAllList.isEmpty()) {
tempMap = itemMap.get(a.getAccountId());
for (String temp : titleAllList) {
if (tempMap != null) {
if (tempMap.get(temp) != null) {
contentList.add(tempMap.get(temp));
} else {
contentList.add("");
}
} else { } else {
contentList.add(""); contentList.add("");
} }
} else {
contentList.add("");
} }
} }
listContent.add(contentList);
} }
listContent.add(contentList);
} }
writeSheet = EasyExcelFactory.writerSheet("工资条" + index++).build();
excelWriter.write(listContent, writeSheet);
} }
writeSheet = EasyExcelFactory.writerSheet("工资条" + index).build();
excelWriter.write(listContent, writeSheet);
/*Map<String,TSalaryAccountItemExportVo> itemExportVoMap = new HashMap<>(); /*Map<String,TSalaryAccountItemExportVo> itemExportVoMap = new HashMap<>();
List<String> idList = null; List<String> idList = null;
List<String> idStandardList = null; List<String> idStandardList = null;
......
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