Commit 039f0a58 authored by hongguangwu's avatar hongguangwu

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

parent 08ca9876
...@@ -253,13 +253,14 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -253,13 +253,14 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
if (count > CommonConstants.ZERO_INT) { if (count > CommonConstants.ZERO_INT) {
// 1:主表+紧急联系人 // 1:主表+紧急联系人
WriteSheet writeSheet; WriteSheet writeSheet;
int sheetIndex = 1;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) { for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录 // 获取实际记录
searchVo.setLimitStart(i); searchVo.setLimitStart(i);
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(index, "基础信息" + index) writeSheet = EasyExcelFactory.writerSheet(index, "基础信息" + (sheetIndex++))
.head(TGzEmpInfoExportMain.class) .head(TGzEmpInfoExportMain.class)
.registerConverter(new DictConverter(nameAndDicTypeMap, redisLabelMap)).build(); .registerConverter(new DictConverter(nameAndDicTypeMap, redisLabelMap)).build();
excelWriter.write(list, writeSheet); excelWriter.write(list, writeSheet);
...@@ -274,6 +275,7 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -274,6 +275,7 @@ 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) {
sheetIndex = 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) {
// 获取实际记录 // 获取实际记录
...@@ -281,7 +283,7 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -281,7 +283,7 @@ 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,"教育经历" + index).head(TGzEmpInfoExportEducation.class) writeSheet = EasyExcelFactory.writerSheet(index,"教育经历" + (sheetIndex++)).head(TGzEmpInfoExportEducation.class)
.registerConverter(new DictConverter(nameAndDicTypeMap, redisLabelMap)).build(); .registerConverter(new DictConverter(nameAndDicTypeMap, redisLabelMap)).build();
excelWriter.write(listEducation, writeSheet); excelWriter.write(listEducation, writeSheet);
index++; index++;
...@@ -294,6 +296,7 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -294,6 +296,7 @@ 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) {
sheetIndex = 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) {
// 获取实际记录 // 获取实际记录
...@@ -301,7 +304,7 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -301,7 +304,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,"工作经历" + index).head(TGzEmpInfoExportWork.class).build(); writeSheet = EasyExcelFactory.writerSheet(index,"工作经历" + (sheetIndex++)).head(TGzEmpInfoExportWork.class).build();
excelWriter.write(listWork, writeSheet); excelWriter.write(listWork, writeSheet);
index++; index++;
} }
...@@ -313,6 +316,7 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -313,6 +316,7 @@ 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) {
sheetIndex = 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) {
// 获取实际记录 // 获取实际记录
...@@ -320,7 +324,7 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -320,7 +324,7 @@ 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,"家庭成员" + index).head(TGzEmpInfoExportFamily.class) writeSheet = EasyExcelFactory.writerSheet(index,"家庭成员" + (sheetIndex++)).head(TGzEmpInfoExportFamily.class)
.registerConverter(new DictConverter(nameAndDicTypeMap, redisLabelMap)).build(); .registerConverter(new DictConverter(nameAndDicTypeMap, redisLabelMap)).build();
excelWriter.write(listFamily, writeSheet); excelWriter.write(listFamily, writeSheet);
index++; index++;
...@@ -333,6 +337,7 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -333,6 +337,7 @@ 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) {
sheetIndex = 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) {
// 获取实际记录 // 获取实际记录
...@@ -340,7 +345,7 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -340,7 +345,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,"技能证书" + index).head(TGzEmpInfoExportSkill.class).build(); writeSheet = EasyExcelFactory.writerSheet(index,"技能证书" + (sheetIndex++)).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