Commit fb33c4da authored by huyuchen's avatar huyuchen

消息提醒修改

parent 39519a70
...@@ -5166,7 +5166,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -5166,7 +5166,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
} else { } else {
writeSheet = EasyExcel.writerSheet("增员").build(); writeSheet = EasyExcel.writerSheet("增员").build();
excelWriter.write(list,writeSheet); excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
// 第二次写如也会创建头,然后在第一次的后面写入数据
excelWriter.write(new ArrayList<>(), writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable4);
} }
//派减的数据 //派减的数据
searchVo.setType(CommonConstants.ONE_STRING); searchVo.setType(CommonConstants.ONE_STRING);
...@@ -5196,7 +5201,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -5196,7 +5201,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
} else { } else {
writeSheet = EasyExcel.writerSheet("减员").build(); writeSheet = EasyExcel.writerSheet("减员").build();
excelWriter.write(list,writeSheet); excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
// 第二次写如也会创建头,然后在第一次的后面写入数据
excelWriter.write(new ArrayList<>(), writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable4);
} }
if (excelWriter!= null) { if (excelWriter!= null) {
excelWriter.finish(); excelWriter.finish();
...@@ -5234,6 +5244,39 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -5234,6 +5244,39 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//派增的数据 //派增的数据
searchVo.setType(CommonConstants.ZERO_STRING); searchVo.setType(CommonConstants.ZERO_STRING);
long count = getSocialPersionDisCount(searchVo); long count = getSocialPersionDisCount(searchVo);
List<Integer> columnIndexes = Arrays.asList(0,17);
CustomCellStyleStrategy customCellStyleStrategy = new CustomCellStyleStrategy(columnIndexes);
CustomCellStyleOneStrategy customCellStyleStrategyOne = new CustomCellStyleOneStrategy(columnIndexes);
CustomCellStyleTwoStrategy customCellStyleStrategyTwo = new CustomCellStyleTwoStrategy(columnIndexes);
CustomCellStyleThreeStrategy customCellStyleStrategyThree = new CustomCellStyleThreeStrategy(columnIndexes);
writeTable0 = EasyExcel.writerTable(0).
head(persionHeadOne()).
registerWriteHandler(customCellStyleStrategy).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)40,(short)20)).
build();
writeTable1 = EasyExcel.writerTable(1).
head(persionHeadTwo(searchVo.getSocialHouseholdName(),searchVo.getCustomerNo())).
registerWriteHandler(customCellStyleStrategyOne).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)20,(short)20)).
build();
writeTable2 = EasyExcel.writerTable(2).
head(persionHead()).
registerWriteHandler(customCellStyleStrategyThree).
registerWriteHandler(new CustomCellWriteWidthOneConfig()).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)30,(short)20))
.build();
writeTable3 = EasyExcel.writerTable(3).
head(persionHeadThree()).
registerWriteHandler(customCellStyleStrategyTwo).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)150,(short)20))
.build();
writeTable4 = EasyExcel.writerTable(4).
head(persionHead1()).
registerWriteHandler(customCellStyleStrategyTwo).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)20,(short)20))
.build();
if (count > CommonConstants.ZERO_INT){ if (count > CommonConstants.ZERO_INT){
list = getSocialPersionDisRecord(searchVo); list = getSocialPersionDisRecord(searchVo);
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
...@@ -5248,38 +5291,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -5248,38 +5291,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
list.add(vo); list.add(vo);
} }
} }
List<Integer> columnIndexes = Arrays.asList(0,17);
CustomCellStyleStrategy customCellStyleStrategy = new CustomCellStyleStrategy(columnIndexes);
CustomCellStyleOneStrategy customCellStyleStrategyOne = new CustomCellStyleOneStrategy(columnIndexes);
CustomCellStyleTwoStrategy customCellStyleStrategyTwo = new CustomCellStyleTwoStrategy(columnIndexes);
CustomCellStyleThreeStrategy customCellStyleStrategyThree = new CustomCellStyleThreeStrategy(columnIndexes);
writeTable0 = EasyExcel.writerTable(0).
head(persionHeadOne()).
registerWriteHandler(customCellStyleStrategy).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)40,(short)20)).
build();
writeTable1 = EasyExcel.writerTable(1).
head(persionHeadTwo(searchVo.getSocialHouseholdName(),searchVo.getCustomerNo())).
registerWriteHandler(customCellStyleStrategyOne).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)20,(short)20)).
build();
writeTable2 = EasyExcel.writerTable(2).
head(persionHead()).
registerWriteHandler(customCellStyleStrategyThree).
registerWriteHandler(new CustomCellWriteWidthOneConfig()).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)30,(short)20))
.build();
writeTable3 = EasyExcel.writerTable(3).
head(persionHeadThree()).
registerWriteHandler(customCellStyleStrategyTwo).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)150,(short)20))
.build();
writeTable4 = EasyExcel.writerTable(4).
head(persionHead1()).
registerWriteHandler(customCellStyleStrategyTwo).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)20,(short)20))
.build();
writeSheet = EasyExcel.writerSheet("增员").build(); writeSheet = EasyExcel.writerSheet("增员").build();
// 第一次写入会创建头 // 第一次写入会创建头
// 第二次写如也会创建头,然后在第一次的后面写入数据 // 第二次写如也会创建头,然后在第一次的后面写入数据
...@@ -5291,13 +5302,45 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -5291,13 +5302,45 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
} else { } else {
writeSheet = EasyExcel.writerSheet("增员").build(); writeSheet = EasyExcel.writerSheet("增员").build();
excelWriter.write(list,writeSheet); excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable4);
} }
//派减的数据 //派减的数据
searchVo.setType(CommonConstants.ONE_STRING); searchVo.setType(CommonConstants.ONE_STRING);
long count1 = getSocialPersionReduceDisCount(searchVo); long count1 = getSocialPersionReduceDisCount(searchVo);
//获取要导出的列表 //获取要导出的列表
List<TDispatchSocialPersionReduceExportVo> listReduce = new ArrayList<>(); List<TDispatchSocialPersionReduceExportVo> listReduce = new ArrayList<>();
List<Integer> columnIndex = Arrays.asList(0,23);
CustomCellStyleStrategy customCellStyleStrategy1 = new CustomCellStyleStrategy(columnIndex);
CustomCellStyleOneStrategy customCellStyleStrategy2 = new CustomCellStyleOneStrategy(columnIndex);
CustomCellStyleTwoStrategy customCellStyleStrategy3 = new CustomCellStyleTwoStrategy(columnIndex);
CustomCellStyleThreeStrategy customCellStyleStrategy4 = new CustomCellStyleThreeStrategy(columnIndex);
writeTable0 = EasyExcel.writerTable(0).
head(persionReduceHeadOne()).
registerWriteHandler(customCellStyleStrategy1).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)40,(short)20)).
build();
writeTable1 = EasyExcel.writerTable(1).
head(persionReduceHeadTwo(searchVo.getSocialHouseholdName(),searchVo.getCustomerNo())).
registerWriteHandler(customCellStyleStrategy2).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)20,(short)20)).
build();
writeTable2 = EasyExcel.writerTable(2).
head(persionReduceHead()).
registerWriteHandler(customCellStyleStrategy4).
registerWriteHandler(new CustomCellWriteWidthTwoConfig()).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)50,(short)20))
.build();
writeTable3 = EasyExcel.writerTable(3).
head(persionReduceHead1()).
registerWriteHandler(customCellStyleStrategy3).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)40,(short)20))
.build();
if (count1 > CommonConstants.ZERO_INT){ if (count1 > CommonConstants.ZERO_INT){
listReduce = getSocialPersionReduceDisRecord(searchVo); listReduce = getSocialPersionReduceDisRecord(searchVo);
if (Common.isNotNull(listReduce)) { if (Common.isNotNull(listReduce)) {
...@@ -5312,33 +5355,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -5312,33 +5355,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
listReduce.add(reduceVo); listReduce.add(reduceVo);
} }
} }
List<Integer> columnIndexes = Arrays.asList(0,23);
CustomCellStyleStrategy customCellStyleStrategy = new CustomCellStyleStrategy(columnIndexes);
CustomCellStyleOneStrategy customCellStyleStrategyOne = new CustomCellStyleOneStrategy(columnIndexes);
CustomCellStyleTwoStrategy customCellStyleStrategyTwo = new CustomCellStyleTwoStrategy(columnIndexes);
CustomCellStyleThreeStrategy customCellStyleStrategyThree = new CustomCellStyleThreeStrategy(columnIndexes);
writeTable0 = EasyExcel.writerTable(0).
head(persionReduceHeadOne()).
registerWriteHandler(customCellStyleStrategy).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)40,(short)20)).
build();
writeTable1 = EasyExcel.writerTable(1).
head(persionReduceHeadTwo(searchVo.getSocialHouseholdName(),searchVo.getCustomerNo())).
registerWriteHandler(customCellStyleStrategyOne).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)20,(short)20)).
build();
writeTable2 = EasyExcel.writerTable(2).
head(persionReduceHead()).
registerWriteHandler(customCellStyleStrategyThree).
registerWriteHandler(new CustomCellWriteWidthTwoConfig()).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)50,(short)20))
.build();
writeTable3 = EasyExcel.writerTable(3).
head(persionReduceHead1()).
registerWriteHandler(customCellStyleStrategyTwo).
registerWriteHandler(new SimpleRowHeightStyleStrategy((short)40,(short)20))
.build();
writeSheet = EasyExcel.writerSheet("减员").build(); writeSheet = EasyExcel.writerSheet("减员").build();
// 第一次写入会创建头 // 第一次写入会创建头
// 第二次写如也会创建头,然后在第一次的后面写入数据 // 第二次写如也会创建头,然后在第一次的后面写入数据
...@@ -5349,7 +5365,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -5349,7 +5365,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
} else { } else {
writeSheet = EasyExcel.writerSheet("减员").build(); writeSheet = EasyExcel.writerSheet("减员").build();
excelWriter.write(listReduce,writeSheet); excelWriter.write(new ArrayList<>(), writeSheet, writeTable0);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable1);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable2);
excelWriter.write(new ArrayList<>(), writeSheet, writeTable3);
} }
if (excelWriter!= null) { if (excelWriter!= null) {
excelWriter.finish(); excelWriter.finish();
......
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