Commit 92256f90 authored by hongguangwu's avatar hongguangwu

MVP1.7.12-瓜子导出档案_附属表

parent f7357ea3
...@@ -242,9 +242,13 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -242,9 +242,13 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
if (redisLabelMap != null && idLabelMap != null) { if (redisLabelMap != null && idLabelMap != null) {
redisLabelMap.putAll(idLabelMap); redisLabelMap.putAll(idLabelMap);
} }
Map<String,String> nameAndDicTypeMap = new HashMap<>(); Map<String,String> nameAndDicTypeMap = new HashMap<>();
ExcelUtil.getDictMapAndExp(TGzEmpInfoExportMain.class, nameAndDicTypeMap, redisLabelMap); ExcelUtil.getDictMapAndExp(TGzEmpInfoExportMain.class, nameAndDicTypeMap, redisLabelMap);
ExcelWriter excelWriter = EasyExcelFactory.write(out, TGzEmpInfoExportMain.class).registerConverter(new DictConverter(nameAndDicTypeMap, redisLabelMap)).build(); ExcelUtil.getDictMapAndExp(TGzEmpInfoExportEducation.class, nameAndDicTypeMap, redisLabelMap);
ExcelUtil.getDictMapAndExp(TGzEmpInfoExportFamily.class, nameAndDicTypeMap, redisLabelMap);
// ExcelWriter excelWriter = EasyExcelFactory.write(out, TGzEmpInfoExportMain.class).registerConverter(new DictConverter(nameAndDicTypeMap, redisLabelMap)).build()
ExcelWriter excelWriter = EasyExcelFactory.write(out).build();
int index = 0; int index = 0;
if (count > CommonConstants.ZERO_INT) { if (count > CommonConstants.ZERO_INT) {
// 1:主表+紧急联系人 // 1:主表+紧急联系人
...@@ -255,7 +259,9 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -255,7 +259,9 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT); searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = baseMapper.getTGzEmpInfoList(searchVo); list = baseMapper.getTGzEmpInfoList(searchVo);
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
writeSheet = EasyExcelFactory.writerSheet(prfName + index).build(); writeSheet = EasyExcelFactory.writerSheet(index, prfName + index)
.head(TGzEmpInfoExportMain.class)
.registerConverter(new DictConverter(nameAndDicTypeMap, redisLabelMap)).build();
excelWriter.write(list, writeSheet); excelWriter.write(list, writeSheet);
index++; index++;
} }
...@@ -268,7 +274,6 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -268,7 +274,6 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
// 2.1教育经历 // 2.1教育经历
count = baseMapper.getTGzEmpInfoCountEducation(searchVo); count = baseMapper.getTGzEmpInfoCountEducation(searchVo);
if (count > CommonConstants.ZERO_INT) { if (count > CommonConstants.ZERO_INT) {
index = 1;
List<TGzEmpInfoExportEducation> listEducation; List<TGzEmpInfoExportEducation> listEducation;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) { for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录 // 获取实际记录
...@@ -276,7 +281,8 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -276,7 +281,8 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT); searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
listEducation = baseMapper.getTGzEmpInfoListEducation(searchVo); listEducation = baseMapper.getTGzEmpInfoListEducation(searchVo);
if (Common.isNotNull(listEducation)) { if (Common.isNotNull(listEducation)) {
writeSheet = EasyExcelFactory.writerSheet("教育经历" + index).build(); writeSheet = EasyExcelFactory.writerSheet(index,"教育经历" + index).head(TGzEmpInfoExportEducation.class)
.registerConverter(new DictConverter(nameAndDicTypeMap, redisLabelMap)).build();
excelWriter.write(listEducation, writeSheet); excelWriter.write(listEducation, writeSheet);
index++; index++;
} }
...@@ -288,7 +294,6 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -288,7 +294,6 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
// 2.2工作经历 // 2.2工作经历
count = baseMapper.getTGzEmpInfoCountWork(searchVo); count = baseMapper.getTGzEmpInfoCountWork(searchVo);
if (count > CommonConstants.ZERO_INT) { if (count > CommonConstants.ZERO_INT) {
index = 1;
List<TGzEmpInfoExportWork> listWork; List<TGzEmpInfoExportWork> listWork;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) { for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录 // 获取实际记录
...@@ -296,7 +301,7 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -296,7 +301,7 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT); searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
listWork = baseMapper.getTGzEmpInfoListWork(searchVo); listWork = baseMapper.getTGzEmpInfoListWork(searchVo);
if (Common.isNotNull(listWork)) { if (Common.isNotNull(listWork)) {
writeSheet = EasyExcelFactory.writerSheet("工作经历" + index).build(); writeSheet = EasyExcelFactory.writerSheet(index,"工作经历" + index).head(TGzEmpInfoExportWork.class).build();
excelWriter.write(listWork, writeSheet); excelWriter.write(listWork, writeSheet);
index++; index++;
} }
...@@ -308,7 +313,6 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -308,7 +313,6 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
// 2.3家庭成员 // 2.3家庭成员
count = baseMapper.getTGzEmpInfoCountFamily(searchVo); count = baseMapper.getTGzEmpInfoCountFamily(searchVo);
if (count > CommonConstants.ZERO_INT) { if (count > CommonConstants.ZERO_INT) {
index = 1;
List<TGzEmpInfoExportFamily> listFamily; List<TGzEmpInfoExportFamily> listFamily;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) { for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录 // 获取实际记录
...@@ -316,7 +320,8 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -316,7 +320,8 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT); searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
listFamily = baseMapper.getTGzEmpInfoListFamily(searchVo); listFamily = baseMapper.getTGzEmpInfoListFamily(searchVo);
if (Common.isNotNull(listFamily)) { if (Common.isNotNull(listFamily)) {
writeSheet = EasyExcelFactory.writerSheet("家庭成员" + index).build(); writeSheet = EasyExcelFactory.writerSheet(index,"家庭成员" + index).head(TGzEmpInfoExportFamily.class)
.registerConverter(new DictConverter(nameAndDicTypeMap, redisLabelMap)).build();
excelWriter.write(listFamily, writeSheet); excelWriter.write(listFamily, writeSheet);
index++; index++;
} }
...@@ -328,7 +333,6 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -328,7 +333,6 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
// 2.4技能证书 // 2.4技能证书
count = baseMapper.getTGzEmpInfoCountSkill(searchVo); count = baseMapper.getTGzEmpInfoCountSkill(searchVo);
if (count > CommonConstants.ZERO_INT) { if (count > CommonConstants.ZERO_INT) {
index = 1;
List<TGzEmpInfoExportSkill> listSkill; List<TGzEmpInfoExportSkill> listSkill;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) { for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录 // 获取实际记录
...@@ -336,7 +340,7 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -336,7 +340,7 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT); searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
listSkill = baseMapper.getTGzEmpInfoListSkill(searchVo); listSkill = baseMapper.getTGzEmpInfoListSkill(searchVo);
if (Common.isNotNull(listSkill)) { if (Common.isNotNull(listSkill)) {
writeSheet = EasyExcelFactory.writerSheet("技能证书" + index).build(); writeSheet = EasyExcelFactory.writerSheet(index,"技能证书" + index).head(TGzEmpInfoExportSkill.class).build();
excelWriter.write(listSkill, writeSheet); excelWriter.write(listSkill, writeSheet);
index++; index++;
} }
......
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