Commit 8bb4c032 authored by hongguangwu's avatar hongguangwu

MVP1.7.10-工资条

parent 8cf37236
......@@ -425,65 +425,69 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
int index = 0;
WriteSheet writeSheet = null;
if (count > CommonConstants.ZERO_INT) {
searchVo.setLimitStart(0);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
List<TSalaryAccountExportSpecialVo> baseList = baseMapper.getEmpAccountExport(searchVo);
List<List<String>> listContent = new ArrayList<>();
List<String> contentList = new ArrayList<>();
if (baseList != null && !baseList.isEmpty()) {
for (TSalaryAccountExportSpecialVo a : baseList) {
contentList.add(a.getAccountId());
}
Map<String, Map<String, String>> itemMap = new HashMap<>();
Map<String, String> tempMap = new HashMap<>();
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);
//int limit = 1000;
int limit = 5;
for (int i = 0; i < count; i += limit) {
searchVo.setLimitStart(i);
searchVo.setLimitEnd(limit);
List<TSalaryAccountExportSpecialVo> baseList = baseMapper.getEmpAccountExport(searchVo);
List<List<String>> listContent = new ArrayList<>();
List<String> contentList = new ArrayList<>();
if (baseList != null && !baseList.isEmpty()) {
for (TSalaryAccountExportSpecialVo a : baseList) {
contentList.add(a.getAccountId());
}
}
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());
Map<String, Map<String, String>> itemMap = new HashMap<>();
Map<String, String> tempMap = new HashMap<>();
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));
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);
}
}
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 {
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<>();
List<String> idList = 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