更新报表打印
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -65,7 +65,7 @@ public class BizExportDictServiceImpl extends BaseServiceImpl<BizExportDictMappe
|
||||
}
|
||||
|
||||
for (BizExportDict bizExportDict : level1) {
|
||||
//不含开标阶段
|
||||
//不含开标阶段 100 = 开标阶段
|
||||
if (!toInitialOpenRoom && bizExportDict.getId().equals(100)) {
|
||||
continue;
|
||||
}
|
||||
@ -109,9 +109,11 @@ public class BizExportDictServiceImpl extends BaseServiceImpl<BizExportDictMappe
|
||||
bizExportDict.setUrl(sbl);
|
||||
}
|
||||
});
|
||||
//如果没进行初审或详审 则删除相关报表 length < 5 为虚数
|
||||
value.removeIf(bizExportDict -> bizExportDict.getUrl().length() < 5);
|
||||
});
|
||||
|
||||
|
||||
//删除value为空的key
|
||||
resultsMap.values().removeIf(List::isEmpty);
|
||||
return resultsMap;
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@ public class CbpsExportServiceImpl implements ExportService {
|
||||
sheet.addMergedRegion(region3);
|
||||
Row title3 = sheet.createRow(rowIndex++);
|
||||
Cell titleCell3 = title3.createCell(0);
|
||||
titleCell3.setCellValue("招标编号 : " + list.getData().getBidSectName());
|
||||
titleCell3.setCellValue("招标编号 : " + list.getData().getBidSectBizNum());
|
||||
//4行 列头
|
||||
Row titleRow5 = sheet.createRow(rowIndex++);
|
||||
// 设置高度为30
|
||||
@ -251,7 +251,7 @@ public class CbpsExportServiceImpl implements ExportService {
|
||||
sheet.addMergedRegion(region6);
|
||||
|
||||
|
||||
String filename = "初步评审表.xls";
|
||||
String filename = "初步评审表.xlsx";
|
||||
filename = filename.substring(0, filename.lastIndexOf('.')) + filename.substring(filename.lastIndexOf('.'));
|
||||
response.reset();
|
||||
response.setContentType("application/octet-stream;charset=utf-8");
|
||||
|
@ -1,9 +1,8 @@
|
||||
package com.chinaunicom.mall.ebtp.extend.export.service.impl;
|
||||
|
||||
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.bean.BidEvalDetailDTO;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.bean.BidEvalInfoDTO;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.bean.ExportParame;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.bean.*;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.feign.ProjectFeignService;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.feign.RsmsFeignService;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.service.ExportService;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.vo.BidEvalDetailJudgesSummaryVO;
|
||||
@ -12,6 +11,7 @@ import com.chinaunicom.mall.ebtp.extend.export.vo.MemberVO;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.vo.SupplierRegisterVO;
|
||||
import lombok.SneakyThrows;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.poi.xssf.streaming.SXSSFCell;
|
||||
import org.apache.poi.xssf.streaming.SXSSFRow;
|
||||
import org.apache.poi.xssf.streaming.SXSSFSheet;
|
||||
@ -22,10 +22,11 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.math.BigDecimal;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
@ -34,9 +35,11 @@ import java.util.stream.Collectors;
|
||||
@Service("dfhz")
|
||||
public class DfhzExportServiceImpl implements ExportService {
|
||||
private final RsmsFeignService rsmsFeignService;
|
||||
private final ProjectFeignService projectFeignService;
|
||||
|
||||
public DfhzExportServiceImpl(RsmsFeignService rsmsFeignService) {
|
||||
public DfhzExportServiceImpl(RsmsFeignService rsmsFeignService, ProjectFeignService projectFeignService) {
|
||||
this.rsmsFeignService = rsmsFeignService;
|
||||
this.projectFeignService = projectFeignService;
|
||||
}
|
||||
|
||||
|
||||
@ -50,8 +53,6 @@ public class DfhzExportServiceImpl implements ExportService {
|
||||
@SneakyThrows
|
||||
@Override
|
||||
public void doExport(ExportParame param, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
|
||||
BidEvalInfoDTO bidEvalInfoDTO = new BidEvalInfoDTO();
|
||||
bidEvalInfoDTO.setAssessRoomId(param.getAssessRoomId());
|
||||
bidEvalInfoDTO.setReviewTurnId(param.getReviewTurnId());
|
||||
@ -74,7 +75,6 @@ public class DfhzExportServiceImpl implements ExportService {
|
||||
|
||||
//所有评委
|
||||
List<MemberVO> memberAll = registerVOList.stream().findFirst().get().getMembers();
|
||||
ArrayList<String> strings = memberAll.stream().map(MemberVO::getUserId).collect(Collectors.toCollection(ArrayList::new));
|
||||
// 创建工作簿
|
||||
SXSSFWorkbook wb = new SXSSFWorkbook();
|
||||
//表格样式
|
||||
@ -92,265 +92,228 @@ public class DfhzExportServiceImpl implements ExportService {
|
||||
SXSSFSheet sheet = wb.createSheet();
|
||||
int rowIndex = 0;
|
||||
//头
|
||||
SXSSFRow titleRow = sheet.createRow(rowIndex++);
|
||||
SXSSFRow titleRow = createRow(sheet, rowIndex++);
|
||||
Cell titleCell1 = titleRow.createCell(0);
|
||||
titleRow.setHeightInPoints(35);
|
||||
titleCell1.setCellValue("打分汇总表");
|
||||
titleCell1.setCellStyle(cellStyle);
|
||||
|
||||
//项目和招标名称数据
|
||||
ProjectSectionVO projectSectionVO = new ProjectSectionVO();
|
||||
projectSectionVO.setId(param.getSectionId());
|
||||
ProjectSectionVO proj = projectFeignService.selectById(projectSectionVO).getData();
|
||||
//项目名称
|
||||
SXSSFRow projectNameRow = sheet.createRow(rowIndex++);
|
||||
SXSSFCell projectNameCell0 = projectNameRow.createCell(0);
|
||||
projectNameCell0.setCellValue("项目名称:");
|
||||
SXSSFCell projectNameCell1 = projectNameRow.createCell(1);
|
||||
projectNameCell1.setCellValue("了大方拉酥颗点肌肤");
|
||||
projectNameCell1.setCellValue(proj.getProjectName());
|
||||
//招标编号
|
||||
SXSSFRow projectNumRow = sheet.createRow(rowIndex++);
|
||||
SXSSFCell projectNumCell0 = projectNumRow.createCell(0);
|
||||
projectNumCell0.setCellValue("项目编号:");
|
||||
SXSSFCell projectNumCell1 = projectNumRow.createCell(1);
|
||||
projectNumCell1.setCellValue("1111");
|
||||
|
||||
projectNumCell1.setCellValue(proj.getBidSectBizNum());
|
||||
//列头
|
||||
List<String> titles0 = new ArrayList<>();
|
||||
titles0.add("投标人名称");
|
||||
titles0.add("投标序号");
|
||||
//评委专家信息添加到列头 根据参加打分专家的id到所有专家列表中查询名字
|
||||
memberAll.forEach(x -> titles0.add(x.getName()));
|
||||
//添加最后一列
|
||||
titles0.add("平均分");
|
||||
//商务 技术 服务
|
||||
for (int i = 0; i < 3; i++) {
|
||||
boolean hasContains = false;
|
||||
List<BidEvalDetailSummaryVO> detailScore = new ArrayList<>();
|
||||
if (i == 0) {
|
||||
hasContains = detailList.containsKey("1");
|
||||
if (detailList.containsKey("1")) {
|
||||
detailScore = detailList.get("1");
|
||||
}
|
||||
} else if (i == 1) {
|
||||
hasContains = detailList.containsKey("2");
|
||||
if (detailList.containsKey("2")) {
|
||||
detailScore = detailList.get("2");
|
||||
}
|
||||
} else {
|
||||
hasContains = detailList.containsKey("5");
|
||||
if (detailList.containsKey("5")) {
|
||||
detailScore = detailList.get("5");
|
||||
}
|
||||
}
|
||||
if (!hasContains) {
|
||||
continue;
|
||||
}
|
||||
//列头
|
||||
List<String> titles0 = new ArrayList<>();
|
||||
titles0.add("投标人名称");
|
||||
titles0.add("投标序号");
|
||||
|
||||
//评委专家信息添加到列头 根据参加打分专家的id到所有专家列表中查询名字
|
||||
memberAll.forEach(x -> titles0.add(x.getName()));
|
||||
//添加最后一列
|
||||
titles0.add("平均分");
|
||||
|
||||
SXSSFRow row = sheet.createRow(rowIndex++);
|
||||
SXSSFCell c = row.createCell(0);
|
||||
this.createRow(sheet, rowIndex++);
|
||||
SXSSFRow row = this.createRow(sheet, rowIndex++);
|
||||
if (i == 0) {
|
||||
c.setCellValue("商务分数");
|
||||
SXSSFCell cell = row.createCell(0);
|
||||
cell.setCellValue("商务分数");
|
||||
} else if (i == 1) {
|
||||
c.setCellValue("技术分数");
|
||||
SXSSFCell cell = row.createCell(0);
|
||||
cell.setCellValue("技术分数");
|
||||
} else {
|
||||
c.setCellValue("服务分数");
|
||||
SXSSFCell cell = row.createCell(0);
|
||||
cell.setCellValue("服务分数");
|
||||
}
|
||||
|
||||
|
||||
row = sheet.createRow(rowIndex++);
|
||||
int cellIndex = 0;
|
||||
for (String tit : titles0) {
|
||||
c = row.createCell(cellIndex++);
|
||||
c.setCellValue(tit);
|
||||
this.createCell(row, cellIndex++, cellStyle, tit);
|
||||
}
|
||||
int index = 1;
|
||||
|
||||
for (SupplierRegisterVO vo : registerVOList) {
|
||||
cellIndex = 0;
|
||||
row = sheet.createRow(rowIndex++);
|
||||
c = row.createCell(cellIndex++);
|
||||
c.setCellValue(vo.getSupplierRegisterName());
|
||||
c = row.createCell(cellIndex++);
|
||||
c.setCellValue(index++);
|
||||
this.createCell(row, cellIndex++, cellStyle, vo.getSupplierRegisterName());
|
||||
this.createCell(row, cellIndex++, cellStyle, String.valueOf(index++));
|
||||
|
||||
if (detailScore.isEmpty()) {
|
||||
for (MemberVO memberVO : memberAll) {
|
||||
this.createCell(row, cellIndex++, cellStyle, "-");
|
||||
|
||||
}
|
||||
this.createCell(row, cellIndex, cellStyle, "-");
|
||||
|
||||
BidEvalDetailSummaryVO detailScore;
|
||||
if (i == 0) {
|
||||
detailScore = detailList.get("1").stream().filter(f -> f.getSupplierRegisterId().equals(vo.getSupplierRegisterId())).findFirst().get();
|
||||
} else if (i == 1) {
|
||||
detailScore = detailList.get("2").stream().filter(f -> f.getSupplierRegisterId().equals(vo.getSupplierRegisterId())).findFirst().get();
|
||||
} else {
|
||||
detailScore = detailList.get("5").stream().filter(f -> f.getSupplierRegisterId().equals(vo.getSupplierRegisterId())).findFirst().get();
|
||||
BidEvalDetailSummaryVO detailSummary = detailScore.stream().filter(f -> f.getSupplierRegisterId().equals(vo.getSupplierRegisterId())).findFirst().get();
|
||||
Map<String, BidEvalDetailJudgesSummaryVO> memberScoreMap = detailSummary.getScoreMap();
|
||||
for (MemberVO memberVO : memberAll) {
|
||||
BigDecimal score = memberScoreMap.get(memberVO.getUserId()).getScore();
|
||||
this.createCell(row, cellIndex++, cellStyle, score == null ? "" : String.valueOf(score));
|
||||
}
|
||||
this.createCell(row, cellIndex, cellStyle, detailSummary.getFinalScore() == null ? "" : String.valueOf(detailSummary.getFinalScore()));
|
||||
}
|
||||
|
||||
|
||||
Map<String, BidEvalDetailJudgesSummaryVO> memberScoreMap = detailScore.getScoreMap();
|
||||
for (MemberVO memberVO : memberAll) {
|
||||
BigDecimal score = memberScoreMap.get(memberVO.getUserId()).getScore();
|
||||
c = row.createCell(cellIndex++);
|
||||
c.setCellValue(score == null ? "" : String.valueOf(score));
|
||||
}
|
||||
c = row.createCell(cellIndex);
|
||||
c.setCellValue(detailScore.getFinalScore() == null ? "" : String.valueOf(detailScore.getFinalScore()));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//报价
|
||||
List<BidEvalDetailSummaryVO> detailScore = new ArrayList<>();
|
||||
|
||||
//渲染所有数据表格
|
||||
List<BidEvalDetailSummaryVO> createList = null;
|
||||
/**
|
||||
* 一共4个表,固定循环4次
|
||||
*/
|
||||
// for (int k = 0; k < 4; k++) {
|
||||
// // 创建表格
|
||||
// Sheet sheet = null;
|
||||
// if (k == 0) {
|
||||
// sheet = wb.createSheet("商务得分");
|
||||
// } else if (k == 1) {
|
||||
// sheet = wb.createSheet("服务得分");
|
||||
// } else if (k == 2) {
|
||||
// sheet = wb.createSheet("价格得分");
|
||||
// titles = "投标人名称,投标序号,价格得分";
|
||||
//
|
||||
// } else {
|
||||
// sheet = wb.createSheet("评分汇总表");
|
||||
// titles = "投标人名称,投标序号,商务得分,服务得分,价格得分,综合得分";
|
||||
//
|
||||
// }
|
||||
// sheet.createFreezePane(1, 1);
|
||||
//
|
||||
// //最右侧列值
|
||||
// Integer index = (titles.split(",").length) - 1;
|
||||
// //行
|
||||
// int rowIndex = 0;
|
||||
// //列
|
||||
// int colIndex = 0;
|
||||
//
|
||||
// // 1行 表头
|
||||
// CellRangeAddress region1 = new CellRangeAddress(0, 0, 0, index);
|
||||
// sheet.addMergedRegion(region1);
|
||||
// Row title1 = sheet.createRow(rowIndex++);
|
||||
// Cell titleCell1 = title1.createCell(0);
|
||||
// title1.setHeightInPoints(35);
|
||||
// titleCell1.setCellValue("打分汇总表");
|
||||
// titleCell1.setCellStyle(cellStyle);
|
||||
// // 2行
|
||||
// /* CellRangeAddress region2 = new CellRangeAddress(1, 1, 0, index);
|
||||
// sheet.addMergedRegion(region2);
|
||||
// Row title2 = sheet.createRow(rowIndex++);
|
||||
// Cell titleCell2 = title2.createCell(0);
|
||||
// titleCell2.setCellValue("包名 :bao123456");
|
||||
// //3行
|
||||
// CellRangeAddress region3 = new CellRangeAddress(2, 2, 0, index);
|
||||
// sheet.addMergedRegion(region3);
|
||||
// Row title3 = sheet.createRow(rowIndex++);
|
||||
// Cell titleCell3 = title3.createCell(0);
|
||||
// titleCell3.setCellValue("招标编号 bh123456");*/
|
||||
// //4行 得分标题
|
||||
// CellRangeAddress region4 = new CellRangeAddress(1, 1, 0, index);
|
||||
// sheet.addMergedRegion(region4);
|
||||
// Row title4 = sheet.createRow(rowIndex++);
|
||||
// Cell titleCell4 = title4.createCell(0);
|
||||
// if (k == 0) {
|
||||
// titleCell4.setCellValue("商务得分");
|
||||
// createList = list1;
|
||||
// } else if (k == 1) {
|
||||
// titleCell4.setCellValue("服务得分");
|
||||
// createList = list2;
|
||||
// } else if (k == 2) {
|
||||
// titleCell4.setCellValue("价格得分");
|
||||
// createList = list3;
|
||||
// } else {
|
||||
// titleCell4.setCellValue("评分汇总");
|
||||
// }
|
||||
//
|
||||
// //5行 列头
|
||||
// Row titleRow5 = sheet.createRow(rowIndex++);
|
||||
// // 设置高度为30
|
||||
// titleRow5.setHeightInPoints(30);
|
||||
// for (String title : titles.split(",")) {
|
||||
// sheet.setColumnWidth(colIndex, 17 * 256);
|
||||
// Cell titleCell = titleRow5.createCell(colIndex++);
|
||||
// titleCell.setCellValue(title);
|
||||
// //设置样式
|
||||
// titleCell.setCellStyle(cellStyle);
|
||||
// }
|
||||
// //6行 数据行
|
||||
// int num = 1;
|
||||
// if (k == 3) {
|
||||
// for (int i = 0; i < all.size(); i++) {
|
||||
// //3为最终汇总表
|
||||
// Row titleRowN = sheet.createRow(rowIndex++);
|
||||
// colIndex = 0;
|
||||
// //投标人名称
|
||||
// Cell cell = titleRowN.createCell(colIndex++);
|
||||
// cell.setCellStyle(cellStyle);
|
||||
// cell.setCellValue(all.get(i).getSupplierRegisterName());
|
||||
// //序号
|
||||
// Cell cell1 = titleRowN.createCell(colIndex++);
|
||||
// cell1.setCellStyle(cellStyle);
|
||||
// cell1.setCellValue(num++);
|
||||
// //商务汇总
|
||||
// Cell cell2 = titleRowN.createCell(colIndex++);
|
||||
// cell2.setCellStyle(cellStyle);
|
||||
// cell2.setCellValue(all.get(i).getBusinessAllScore().toString());
|
||||
// //服务汇总
|
||||
// Cell cell3 = titleRowN.createCell(colIndex++);
|
||||
// cell3.setCellStyle(cellStyle);
|
||||
// cell3.setCellValue(all.get(i).getServiceAllScore().toString());
|
||||
// //价格汇总
|
||||
// Cell cell4 = titleRowN.createCell(colIndex++);
|
||||
// cell4.setCellStyle(cellStyle);
|
||||
// cell4.setCellValue(all.get(i).getPriceAllScore().toString());
|
||||
// //综合得分
|
||||
// Cell cell5 = titleRowN.createCell(colIndex++);
|
||||
// cell5.setCellStyle(cellStyle);
|
||||
// cell5.setCellValue(all.get(i).getAllScore().toString());
|
||||
// }
|
||||
// } else {
|
||||
// for (int i = 0; i < createList.size(); i++) {
|
||||
// colIndex = 0;
|
||||
// Row titleRowN = sheet.createRow(rowIndex++);
|
||||
// //投标人名称
|
||||
// Cell cell = titleRowN.createCell(colIndex++);
|
||||
// cell.setCellStyle(cellStyle);
|
||||
// cell.setCellValue(createList.get(i).getSupplierRegisterName());
|
||||
// //序号
|
||||
// Cell cell1 = titleRowN.createCell(colIndex++);
|
||||
// cell1.setCellStyle(cellStyle);
|
||||
// cell1.setCellValue(num++);
|
||||
// if (k == 2) {
|
||||
// //价格得分 2时无专家评分,有最终评分
|
||||
// Cell cellN1 = titleRowN.createCell(colIndex++);
|
||||
// cellN1.setCellStyle(cellStyle);
|
||||
// cellN1.setCellValue(createList.get(i).getFinalScore().toString());
|
||||
// } else {
|
||||
// //所有专家
|
||||
// for (int j = 0; j < createList.get(i).getScoreMap().size(); j++) {
|
||||
// Map<String, BidEvalDetailJudgesSummaryVO> scoreMap = createList.get(i).getScoreMap();
|
||||
// //获取专家的顺序
|
||||
// if (scoreMap != null) {
|
||||
// String score = null;
|
||||
// for (String string : strings) {
|
||||
// if (scoreMap.get(string) != null) {
|
||||
// score = (scoreMap.get(string).getScore()).toString();
|
||||
// } else {
|
||||
// score = "无";
|
||||
// }
|
||||
// Cell cellN = titleRowN.createCell(colIndex++);
|
||||
// cellN.setCellStyle(cellStyle);
|
||||
// cellN.setCellValue(score);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
//
|
||||
// }
|
||||
// //平均分
|
||||
// Cell cellN1 = titleRowN.createCell(colIndex++);
|
||||
// cellN1.setCellStyle(cellStyle);
|
||||
// cellN1.setCellValue(createList.get(i).getFinalScore().toString());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
if (detailList.containsKey("0")) {
|
||||
detailScore = detailList.get("0");
|
||||
}
|
||||
sheet.createRow(rowIndex++);
|
||||
SXSSFRow row = sheet.createRow(rowIndex++);
|
||||
SXSSFCell c = row.createCell(0);
|
||||
c.setCellValue("价格分数");
|
||||
|
||||
row = this.createRow(sheet, rowIndex++);
|
||||
|
||||
this.createCell(row, 0, cellStyle, "投标人名称");
|
||||
this.createCell(row, 1, cellStyle, "投标序号");
|
||||
this.createCell(row, 2, cellStyle, "价格得分");
|
||||
|
||||
int index = 1;
|
||||
for (SupplierRegisterVO vo : registerVOList) {
|
||||
int cellIndex = 0;
|
||||
row = sheet.createRow(rowIndex++);
|
||||
this.createCell(row, cellIndex++, cellStyle, vo.getSupplierRegisterName());
|
||||
this.createCell(row, cellIndex++, cellStyle, String.valueOf(index++));
|
||||
|
||||
if (detailScore.isEmpty()) {
|
||||
this.createCell(row, cellIndex++, cellStyle, "-");
|
||||
|
||||
} else {
|
||||
BidEvalDetailSummaryVO detailSummary = detailScore.stream().filter(f -> f.getSupplierRegisterId().equals(vo.getSupplierRegisterId())).findFirst().get();
|
||||
Map<String, BidEvalDetailJudgesSummaryVO> memberScoreMap = detailSummary.getScoreMap();
|
||||
for (MemberVO memberVO : memberAll) {
|
||||
if (memberScoreMap.containsKey(memberVO.getUserId())) {
|
||||
BigDecimal score = memberScoreMap.get(memberVO.getUserId()).getScore();
|
||||
this.createCell(row, cellIndex++, cellStyle, score == null ? "" : String.valueOf(score));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//汇总
|
||||
sheet.createRow(rowIndex++);
|
||||
row = sheet.createRow(rowIndex++);
|
||||
c = row.createCell(0);
|
||||
c.setCellValue("评分汇总表");
|
||||
|
||||
row = sheet.createRow(rowIndex++);
|
||||
this.createCell(row, 0, cellStyle, "投标人名称");
|
||||
this.createCell(row, 1, cellStyle, "投标序号");
|
||||
this.createCell(row, 2, cellStyle, "商务得分");
|
||||
this.createCell(row, 3, cellStyle, "技术得分");
|
||||
this.createCell(row, 4, cellStyle, "服务得分");
|
||||
this.createCell(row, 5, cellStyle, "价格得分");
|
||||
this.createCell(row, 6, cellStyle, "综合得分");
|
||||
|
||||
index = 1;
|
||||
for (SupplierRegisterVO vo : registerVOList) {
|
||||
int cellIndex = 0;
|
||||
row = sheet.createRow(rowIndex++);
|
||||
this.createCell(row, cellIndex++, cellStyle, vo.getSupplierRegisterName());
|
||||
this.createCell(row, cellIndex++, cellStyle, String.valueOf(index++));
|
||||
|
||||
BigDecimal avgBd =
|
||||
//商务
|
||||
scoreSummaryCell(row, cellIndex++, cellStyle, "1", detailList, vo.getSupplierRegisterId())
|
||||
//技术
|
||||
.add(scoreSummaryCell(row, cellIndex++, cellStyle, "2", detailList, vo.getSupplierRegisterId()))
|
||||
//服务
|
||||
.add(scoreSummaryCell(row, cellIndex++, cellStyle, "5", detailList, vo.getSupplierRegisterId()))
|
||||
//报价
|
||||
.add(scoreSummaryCell(row, cellIndex++, cellStyle, "0", detailList, vo.getSupplierRegisterId()));
|
||||
this.createCell(row, cellIndex, cellStyle, String.valueOf(avgBd));
|
||||
}
|
||||
|
||||
this.createRow(sheet, rowIndex++);
|
||||
row = this.createRow(sheet, rowIndex++);
|
||||
c = row.createCell(0);
|
||||
c.setCellValue("全体评委签名:");
|
||||
|
||||
|
||||
String filename = "打分汇总表.xls";
|
||||
this.createRow(sheet, rowIndex++);
|
||||
row = this.createRow(sheet, rowIndex);
|
||||
c = row.createCell(titles0.size() - 3);
|
||||
c.setCellValue("日期:");
|
||||
c = row.createCell(titles0.size() - 2);
|
||||
c.setCellValue(new SimpleDateFormat("yyyy年MM月dd日").format(new Date()));
|
||||
|
||||
//合并表头
|
||||
CellRangeAddress region = new CellRangeAddress(0, 0, 0, titles0.size() - 1);
|
||||
sheet.addMergedRegion(region);
|
||||
|
||||
String filename = "打分汇总表.xlsx";
|
||||
filename = filename.substring(0, filename.lastIndexOf('.')) + filename.substring(filename.lastIndexOf('.'));
|
||||
response.reset();
|
||||
response.setContentType("application/octet-stream;charset=utf-8");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=".concat(new String(filename.getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1)));
|
||||
wb.write(response.getOutputStream());
|
||||
}
|
||||
|
||||
//return BaseResponse.fail(ERROR_MESSAGE);
|
||||
|
||||
}
|
||||
|
||||
private SXSSFRow createRow(SXSSFSheet sheet, int rowIndex) {
|
||||
return sheet.createRow(rowIndex);
|
||||
}
|
||||
|
||||
private Cell createCell(Row row, int cellIndex, CellStyle style, String val) {
|
||||
Cell cell = row.createCell(cellIndex);
|
||||
cell.setCellStyle(style);
|
||||
cell.setCellValue(val);
|
||||
return cell;
|
||||
}
|
||||
|
||||
|
||||
//汇总表添加cell
|
||||
private BigDecimal scoreSummaryCell(Row row, int cellIndex, CellStyle style, String cage, Map<String, List<BidEvalDetailSummaryVO>> detailList, String supplierRegisterId) {
|
||||
BigDecimal avgBd = new BigDecimal(0);
|
||||
Cell c = row.createCell(cellIndex);
|
||||
c.setCellStyle(style);
|
||||
if (detailList.containsKey(cage)) {
|
||||
BidEvalDetailSummaryVO summaryVO = detailList.get(cage).stream().filter(f -> f.getSupplierRegisterId().equals(supplierRegisterId)).findFirst().get();
|
||||
String score = "-";
|
||||
if (summaryVO.getFinalScore() != null) {
|
||||
score = String.valueOf(summaryVO.getFinalScore());
|
||||
avgBd = avgBd.add(summaryVO.getFinalScore());
|
||||
}
|
||||
c.setCellValue(score);
|
||||
} else {
|
||||
c.setCellValue("-");
|
||||
}
|
||||
|
||||
return avgBd;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,7 @@ public class JgdfExportServiceImpl implements ExportService {
|
||||
sheet.addMergedRegion(region2);
|
||||
Row title2 = sheet.createRow(rowIndex++);
|
||||
Cell titleCell2 = title2.createCell(0);
|
||||
titleCell2.setCellValue("招标编号 : " + list.getData().getBidSectName());
|
||||
titleCell2.setCellValue("招标编号 : " + list.getData().getBidSectBizNum());
|
||||
|
||||
//标题行
|
||||
Row titleRow = sheet.createRow(rowIndex++);
|
||||
@ -229,7 +229,7 @@ public class JgdfExportServiceImpl implements ExportService {
|
||||
CellRangeAddress region7 = new CellRangeAddress(rowIndex - 1, rowIndex - 1, 0, 6);
|
||||
sheet.addMergedRegion(region7);
|
||||
|
||||
String filename = "价格打分.xls";
|
||||
String filename = "价格打分.xlsx";
|
||||
filename = filename.substring(0, filename.lastIndexOf('.')) + filename.substring(filename.lastIndexOf('.'));
|
||||
response.reset();
|
||||
response.setContentType("application/octet-stream;charset=utf-8");
|
||||
|
@ -71,7 +71,7 @@ public class JudgesExportServiceImpl implements ExportService {
|
||||
put("time", "");
|
||||
|
||||
if (list != null) {
|
||||
put("bh", list.getData().getBidSectCode());
|
||||
put("bh", list.getData().getBidSectBizNum());
|
||||
put("mc", list.getData().getProjectName());
|
||||
} else {
|
||||
put("bh", "");
|
||||
|
@ -17,6 +17,8 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -64,7 +66,8 @@ public class KbjlExportServiceImpl implements ExportService {
|
||||
data.put("tbr", (listBaseResponse.getData().get(i).getBidUserName()));
|
||||
data.put("bj", (listBaseResponse.getData().get(i).getNewPrice()));
|
||||
data.put("yy", "");
|
||||
data.put("sign", (listBaseResponse.getData().get(i).getContactName()) + ":" + (listBaseResponse.getData().get(i).getSignTime()));
|
||||
LocalDateTime signTime = listBaseResponse.getData().get(i).getSignTime();
|
||||
data.put("sign", signTime == null ? "" : (listBaseResponse.getData().get(i).getContactName()) + ":" + DateTimeFormatter.ofPattern("yyyy年MM月dd日").format(signTime));
|
||||
maps.add(data);
|
||||
}
|
||||
|
||||
@ -92,8 +95,8 @@ public class KbjlExportServiceImpl implements ExportService {
|
||||
|
||||
if (project.getData() != null) {
|
||||
put("mc", project.getData().getProjectName());
|
||||
put("bh", project.getData().getSectionNumber());
|
||||
put("bao", project.getData().getBidSectBizNum());
|
||||
put("bh", project.getData().getBidSectBizNum());
|
||||
put("bao", project.getData().getBidSectName());
|
||||
} else {
|
||||
put("mc", "");
|
||||
put("bh", "");
|
||||
|
@ -206,7 +206,7 @@ public class PbbgExportServiceImpl implements ExportService {
|
||||
.bind("table7", policy7).bind("table8", policy8).build();
|
||||
|
||||
|
||||
File file = new File("d:/评标报告.docx");
|
||||
File file = getExportTemplet("评标报告.docx");
|
||||
XWPFTemplate template = XWPFTemplate.compile(file, config).render(all);
|
||||
|
||||
String fileName = new String("评标报告.docx".getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1);
|
||||
|
@ -16,6 +16,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -55,7 +56,7 @@ public class PszjExportServiceImpl implements ExportService {
|
||||
data.put("phone", listBaseResponse.getData().get(i).getMobile());
|
||||
data.put("idCard", listBaseResponse.getData().get(i).getCertificate());
|
||||
data.put("isTrue", listBaseResponse.getData().get(i).getAttitude() == 1 ? "是" : "否");
|
||||
data.put("time", listBaseResponse.getData().get(i).getLoginTime());
|
||||
data.put("time", DateTimeFormatter.ofPattern("yyyy年MM月dd日").format(listBaseResponse.getData().get(i).getLoginTime()));
|
||||
maps.add(data);
|
||||
}
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ public class ZjgrExportServiceImpl implements ExportService {
|
||||
}
|
||||
|
||||
|
||||
String filename = "评标打分表.xls";
|
||||
String filename = "评标打分表.xlsx";
|
||||
filename = filename.substring(0, filename.lastIndexOf('.')) + filename.substring(filename.lastIndexOf('.'));
|
||||
response.reset();
|
||||
response.setContentType("application/octet-stream;charset=utf-8");
|
||||
|
@ -1,3 +1,3 @@
|
||||
spring:
|
||||
profiles:
|
||||
active: dev
|
||||
active: test
|
Reference in New Issue
Block a user