Commit 5958c8d6 authored by xinglei's avatar xinglei

*)修改导出报表bug

parent a3cfa3e0
......@@ -1332,12 +1332,55 @@ public class CheckServiceImpl implements ICheckService {
String pointName = StringUtil.setStr(checkInputBo.getPlanTaskId(), checkInputBo.getPointName());
String classifyName = StringUtil.setStr(checkInputBo.getPlanTaskId(), checkInputBo.getClassifyName());
String beginTime = checkInputBo.getBeginTime();
String checkDate = checkInputBo.getCheckDate();
if (ObjectUtils.isEmpty(beginTime)){
if (flag1) {
lastDate = checkDate;
flag1 = false;
}
if (i != 0 && (lastDate.equals(checkDate))) {
endRow1++;
} else {
//两者不相同时,融合之前相同的行
if (endRow1 > startRow1) {
sheet.addMergedRegion(new CellRangeAddress(startRow1, endRow1, 0, 0));
}
startRow1 = temNum1;
endRow1 = startRow1;
lastDate = checkDate;
}
temNum1++;
if (i == checkInfoList.size() - 1 && startRow1 != endRow1) {
//融合最后相同的行
sheet.addMergedRegion(new CellRangeAddress(startRow1, endRow1, 0, 0));
}
pointName = StringUtil.setStr(checkInputBo.getCheckDate(), checkInputBo.getPointName());
if (flag2) {
lastPointName = pointName;
flag2 = false;
}
if (i != 0 && lastPointName.equals(pointName)) {
endRow2++;
} else {
//两者不相同时,融合之前相同的行
if (endRow2 > startRow2) {
sheet.addMergedRegion(new CellRangeAddress(startRow2, endRow2, 1, 1));
}
startRow2 = temNum2;
endRow2 = startRow2;
lastPointName = pointName;
}
temNum2++;
if (i == checkInfoList.size() - 1 && startRow2 != endRow2) {
//融合最后相同的行
sheet.addMergedRegion(new CellRangeAddress(startRow2, endRow2, 1, 1));
}
} else {
if (flag1) {
lastDate = beginTime;
flag1 = false;
}
if (i != 0 && (null == lastDate ? null == beginTime : lastDate.equals(beginTime))) {
if (i != 0 && (lastDate.equals(beginTime))) {
endRow1++;
} else {
//两者不相同时,融合之前相同的行
......@@ -1374,6 +1417,7 @@ public class CheckServiceImpl implements ICheckService {
//融合最后相同的行
sheet.addMergedRegion(new CellRangeAddress(startRow2, endRow2, 1, 1));
}
}
if (flag3) {
lastClassifyName = classifyName;
......
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