代码升级
This commit is contained in:
@ -8,13 +8,20 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
public class ExportParame {
|
||||
|
||||
private String assessRoomId;
|
||||
|
||||
private String reviewTurnId;
|
||||
|
||||
private String reviewTurnSort;
|
||||
|
||||
private String projectId;
|
||||
@ApiModelProperty(value = "标段id")
|
||||
private String sectionId;
|
||||
@ApiModelProperty(value="类型id")
|
||||
private String reviewType;
|
||||
|
||||
|
||||
|
||||
|
||||
public String getAssessRoomId() {
|
||||
return assessRoomId;
|
||||
}
|
||||
@ -54,4 +61,12 @@ public class ExportParame {
|
||||
public void setReviewType(String reviewType) {
|
||||
this.reviewType = reviewType;
|
||||
}
|
||||
|
||||
public String getReviewTurnSort() {
|
||||
return reviewTurnSort;
|
||||
}
|
||||
|
||||
public void setReviewTurnSort(String reviewTurnSort) {
|
||||
this.reviewTurnSort = reviewTurnSort;
|
||||
}
|
||||
}
|
||||
|
@ -1,63 +1,29 @@
|
||||
package com.chinaunicom.mall.ebtp.extend.export.controller;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.poi.ss.usermodel.BorderStyle;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.CellStyle;
|
||||
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.ss.usermodel.VerticalAlignment;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
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.BizBidOpenroom;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.bean.BizSupplierRegister;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.bean.ExportParame;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.bean.ProjectSectionVO;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.bean.ReviewConfigCategoryDTO;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.bean.ReviewConfigDetailDTO;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.bean.Tdoc;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.bean.*;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.services.ExportService;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.services.ExportServiceOpen;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.services.ExportServiceProject;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.services.ExportServiceResps;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.vo.BidEvalDetailJudgesSummaryVO;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.vo.BidEvalDetailSummaryVO;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.vo.BidEvalDetailVO;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.vo.BidEvalEarlyJudgesSummaryVO;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.vo.JuryPrintVO;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.vo.MemberVO;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.vo.SupplierRegisterPriceScoreVO;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.vo.SupplierRegisterVO;
|
||||
import com.chinaunicom.mall.ebtp.extend.export.vo.*;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.policy.HackLoopTableRenderPolicy;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@RestController
|
||||
@ -74,7 +40,7 @@ public class ExportController {
|
||||
@Resource
|
||||
private ExportServiceOpen exportServiceOpen;
|
||||
|
||||
|
||||
private final String ERROR_MESSAGE="导出失败,请联系管理员";
|
||||
/**
|
||||
* 1
|
||||
* 导出方法
|
||||
@ -86,19 +52,19 @@ public class ExportController {
|
||||
|
||||
Tdoc tdocPara = new Tdoc();
|
||||
tdocPara.setAssessRoomId(parame.getAssessRoomId());
|
||||
tdocPara.setTurnSort(Integer.parseInt(parame.getReviewTurnId()));
|
||||
|
||||
tdocPara.setTurnSort(Integer.parseInt(parame.getReviewTurnSort()));
|
||||
//开标记录数据
|
||||
BaseResponse<List<BizSupplierRegister>> listBaseResponse = exportServiceResps.getTenderQuoteList(tdocPara);
|
||||
List<BizSupplierRegister> list = listBaseResponse.getData();
|
||||
ArrayList<Map<String, Object>> maps = new ArrayList<>();
|
||||
if (list != null) {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
|
||||
if (listBaseResponse != null) {
|
||||
for (int i = 0; i < listBaseResponse.getData().size(); i++) {
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("num", (i + 1));
|
||||
data.put("tbr", list.get(i).getBidUserName());
|
||||
data.put("bj", list.get(i).getNewPrice());
|
||||
data.put("tbr", (listBaseResponse.getData().get(i).getBidUserName()));
|
||||
data.put("bj", (listBaseResponse.getData().get(i).getNewPrice()));
|
||||
data.put("yy", "");
|
||||
data.put("sign", list.get(i).getContactName() + ":" + list.get(i).getSignTime());
|
||||
data.put("sign", (listBaseResponse.getData().get(i).getContactName()) + ":" + (listBaseResponse.getData().get(i).getSignTime()));
|
||||
maps.add(data);
|
||||
}
|
||||
|
||||
@ -117,10 +83,23 @@ public class ExportController {
|
||||
File file = new File("d:/开标记录表.docx");
|
||||
Map<String, Object> all = new HashMap<String, Object>() {{
|
||||
put("Record", maps);
|
||||
|
||||
if (timeList.getData() != null) {
|
||||
put("time", timeList.getData().get(0).getOpingTime());
|
||||
} else {
|
||||
put("time", "");
|
||||
}
|
||||
|
||||
if (project.getData() != null) {
|
||||
put("mc", project.getData().getProjectName());
|
||||
put("bh", project.getData().getSectionNumber());
|
||||
put("bao", project.getData().getBidSectBizNum());
|
||||
} else {
|
||||
put("mc", "");
|
||||
put("bh", "");
|
||||
put("bao", "");
|
||||
}
|
||||
|
||||
put("yuan", "");
|
||||
}};
|
||||
|
||||
@ -129,7 +108,6 @@ public class ExportController {
|
||||
XWPFTemplate template = XWPFTemplate.compile(file, config).render(all);
|
||||
|
||||
String fileName = new String("开标记录表.docx".getBytes("UTF-8"), "iso-8859-1");
|
||||
|
||||
OutputStream os = response.getOutputStream();
|
||||
response.setHeader("Content-disposition", "attachment; filename=" + fileName);
|
||||
template.write(os);
|
||||
@ -140,38 +118,40 @@ public class ExportController {
|
||||
* 2
|
||||
* 导出方法
|
||||
* 评标委员会签字表
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/judges", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public void exportJudgesMessage(ExportParame parame, HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
|
||||
//项目和招标名称处理
|
||||
//项目和招标名称数据
|
||||
ProjectSectionVO projectSectionVO = new ProjectSectionVO();
|
||||
projectSectionVO.setId(parame.getSectionId());
|
||||
BaseResponse<ProjectSectionVO> list = exportServiceProject.selectById(projectSectionVO);
|
||||
|
||||
//专家人员数据
|
||||
BaseResponse<List<JuryPrintVO>> listBaseResponse = exportService.queryReportPrintByRoomId(parame.getAssessRoomId());
|
||||
ArrayList<Map<String, Object>> maps = new ArrayList<>();
|
||||
if (listBaseResponse != null && list != null) {
|
||||
for (int i = 0; i < listBaseResponse.getData().size(); i++) {
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("name", listBaseResponse.getData().get(i).getName());
|
||||
data.put("name", (listBaseResponse.getData().get(i).getName()));
|
||||
data.put("phone", listBaseResponse.getData().get(i).getMobile());
|
||||
maps.add(data);
|
||||
}
|
||||
|
||||
}
|
||||
//获取模板
|
||||
File file = new File("d:/评标委员会签字表.docx");
|
||||
|
||||
//当前时间
|
||||
Date date = new Date();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy 年 MM 月 dd 日 ");
|
||||
|
||||
Map<String, Object> all = new HashMap<String, Object>() {{
|
||||
put("Judges", maps);
|
||||
put("time", sdf.format(date));
|
||||
put("time", "");
|
||||
|
||||
if (list != null) {
|
||||
put("bh", list.getData().getBidSectCode());
|
||||
put("mc", list.getData().getProjectName());
|
||||
} else {
|
||||
put("bh", "");
|
||||
put("mc", "");
|
||||
}
|
||||
}};
|
||||
|
||||
HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy();
|
||||
@ -183,6 +163,9 @@ public class ExportController {
|
||||
OutputStream os = response.getOutputStream();
|
||||
response.setHeader("Content-disposition", "attachment; filename=" + fileName);
|
||||
template.write(os);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -195,16 +178,11 @@ public class ExportController {
|
||||
@ResponseBody
|
||||
public void exportPszjMessage(ExportParame parame, HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
|
||||
|
||||
//项目和招标名称处理
|
||||
ProjectSectionVO projectSectionVO = new ProjectSectionVO();
|
||||
projectSectionVO.setId(parame.getSectionId());
|
||||
BaseResponse<ProjectSectionVO> list = exportServiceProject.selectById(projectSectionVO);
|
||||
|
||||
//专家人员数据
|
||||
BaseResponse<List<JuryPrintVO>> listBaseResponse = exportService.queryReportPrintByRoomId(parame.getAssessRoomId());
|
||||
|
||||
ArrayList<Map<String, Object>> maps = new ArrayList<>();
|
||||
if (listBaseResponse != null && listBaseResponse.getData() != null) {
|
||||
for (int i = 0; i < listBaseResponse.getData().size(); i++) {
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("name", listBaseResponse.getData().get(i).getName());
|
||||
@ -214,6 +192,8 @@ public class ExportController {
|
||||
data.put("time", listBaseResponse.getData().get(i).getLoginTime());
|
||||
maps.add(data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File file = new File("d:/评审专家签到表.docx");
|
||||
Map<String, Object> all = new HashMap<String, Object>() {{
|
||||
@ -239,7 +219,6 @@ public class ExportController {
|
||||
*/
|
||||
@RequestMapping(value = "/pbbg", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
//todo 暂未完成
|
||||
public void exportAllMessage(ExportParame parame, HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
|
||||
//表一假数据
|
||||
@ -266,6 +245,7 @@ public class ExportController {
|
||||
//专家人员数据
|
||||
BaseResponse<List<JuryPrintVO>> listBaseResponse = exportService.queryReportPrintByRoomId(parame.getAssessRoomId());
|
||||
ArrayList<Map<String, Object>> list3 = new ArrayList<>();
|
||||
if (listBaseResponse != null && listBaseResponse.getData() != null) {
|
||||
for (int i = 0; i < listBaseResponse.getData().size(); i++) {
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("num", (i + 1));
|
||||
@ -273,6 +253,8 @@ public class ExportController {
|
||||
list3.add(data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//表四假数据
|
||||
List<Map<String, Object>> list4 = new ArrayList<>();
|
||||
@ -295,7 +277,6 @@ public class ExportController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
BidEvalDetailDTO bidEvalDetailDTO = new BidEvalDetailDTO();
|
||||
bidEvalDetailDTO.setAssessRoomId(parame.getAssessRoomId());
|
||||
bidEvalDetailDTO.setReviewTurnId(parame.getReviewTurnId());
|
||||
@ -341,7 +322,7 @@ public class ExportController {
|
||||
List<Map<String, Object>> list6 = new ArrayList<>();
|
||||
for (int i = 0; i < all1.size(); i++) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("num", (i+1));
|
||||
map.put("num", (i + 1));
|
||||
map.put("tbr", all1.get(i).getSupplierRegisterName());
|
||||
map.put("js", all1.get(i).getServiceAllScore());
|
||||
map.put("sw", all1.get(i).getBusinessAllScore());
|
||||
@ -365,7 +346,7 @@ public class ExportController {
|
||||
List<Map<String, Object>> list8 = new ArrayList<>();
|
||||
for (int i = 0; i < all1.size(); i++) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("num", (i+1));
|
||||
map.put("num", (i + 1));
|
||||
map.put("tbr", all1.get(i).getSupplierRegisterName());
|
||||
map.put("sw", all1.get(i).getBusinessAllScore());
|
||||
map.put("js", all1.get(i).getServiceAllScore());
|
||||
@ -424,11 +405,9 @@ public class ExportController {
|
||||
|
||||
//文件模板从数据库或者项目位置取得
|
||||
File file = new File("d:/评标专家承诺书.docx");
|
||||
|
||||
XWPFTemplate template = XWPFTemplate.compile(file);
|
||||
|
||||
String fileName = new String("评标专家承诺书.docx".getBytes("UTF-8"), "iso-8859-1");
|
||||
|
||||
OutputStream os = response.getOutputStream();
|
||||
response.setHeader("Content-disposition", "attachment; filename=" + fileName);
|
||||
template.write(os);
|
||||
@ -439,36 +418,38 @@ public class ExportController {
|
||||
* 6
|
||||
* 导出方法
|
||||
* 打分汇总
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "dfhz", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public void exportDfMessage(ExportParame parame, HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
public BaseResponse<String> exportDfMessage(ExportParame parame, HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
|
||||
BidEvalInfoDTO bidEvalInfoDTO = new BidEvalInfoDTO();
|
||||
bidEvalInfoDTO.setAssessRoomId(parame.getAssessRoomId());
|
||||
bidEvalInfoDTO.setReviewTurnId(parame.getReviewTurnId());
|
||||
bidEvalInfoDTO.setReviewType(parame.getReviewType());
|
||||
//所有评委数据源
|
||||
BaseResponse<List<SupplierRegisterVO>> judges = exportService.findRegisterAndUser(bidEvalInfoDTO);
|
||||
// List<MemberVO> memberall= exportService.findRegisterAndUser(bidEvalInfoDTO).getData().stream().findFirst().get().getMembers();
|
||||
|
||||
BidEvalDetailDTO bidEvalDetailDTO = new BidEvalDetailDTO();
|
||||
bidEvalDetailDTO.setAssessRoomId(parame.getAssessRoomId());
|
||||
bidEvalDetailDTO.setReviewTurnId(parame.getReviewTurnId());
|
||||
bidEvalDetailDTO.setReviewType(parame.getReviewType());
|
||||
//所有类型打分数据源
|
||||
BaseResponse<Map<String, List<BidEvalDetailSummaryVO>>> list = exportService.findCategoryResultSummary(bidEvalDetailDTO);
|
||||
|
||||
|
||||
if (list != null && judges != null) {
|
||||
//所有评委
|
||||
List<MemberVO> memberall = judges.getData().stream().findFirst().get().getMembers();
|
||||
//商务数据
|
||||
List<BidEvalDetailSummaryVO> list1 = list.getData().get("1");
|
||||
//服务数据
|
||||
List<BidEvalDetailSummaryVO> list2 = list.getData().get("5");
|
||||
//价格数据
|
||||
List<BidEvalDetailSummaryVO> list3 = list.getData().get("0");
|
||||
|
||||
|
||||
BidEvalInfoDTO bidEvalInfoDTO = new BidEvalInfoDTO();
|
||||
bidEvalInfoDTO.setAssessRoomId(parame.getAssessRoomId());
|
||||
bidEvalInfoDTO.setReviewTurnId(parame.getReviewTurnId());
|
||||
bidEvalInfoDTO.setReviewType(parame.getReviewType());
|
||||
|
||||
//所有评委
|
||||
List<MemberVO> memberall = exportService.findRegisterAndUser(bidEvalInfoDTO).getData().stream().findFirst().get().getMembers();
|
||||
|
||||
// 综合汇总
|
||||
// 打分综合汇总
|
||||
List<BidEvalDetailSummaryVO> all = new ArrayList<>();
|
||||
|
||||
list1.stream().forEach(o -> {
|
||||
BidEvalDetailSummaryVO object = new BidEvalDetailSummaryVO();
|
||||
object.setSupplierRegisterId(o.getSupplierRegisterId());
|
||||
@ -476,6 +457,7 @@ public class ExportController {
|
||||
object.setBusinessAllScore(o.getFinalScore());
|
||||
all.add(object);
|
||||
});
|
||||
|
||||
all.stream().forEach(x -> {
|
||||
|
||||
list2.stream().forEach(y -> {
|
||||
@ -497,15 +479,15 @@ public class ExportController {
|
||||
});
|
||||
|
||||
|
||||
//所有专家
|
||||
//参与打分评委
|
||||
Map<String, BidEvalDetailJudgesSummaryVO> members = list1.get(0).getScoreMap();
|
||||
//列头
|
||||
StringBuffer titles0 = new StringBuffer("投标人名称,投标序号");
|
||||
ArrayList<String> strings = new ArrayList<>();
|
||||
//专家信息 添加到列头
|
||||
//评委专家信息添加到列头 根据参加打分专家的id到所有专家列表中查询名字
|
||||
List<MemberVO> finalMemberall = memberall;
|
||||
members.forEach((k, v) -> {
|
||||
// titles0.append("," + k);
|
||||
memberall.forEach(x -> {
|
||||
finalMemberall.forEach(x -> {
|
||||
if (k.equals(x.getUserId())) {
|
||||
titles0.append("," + x.getName());
|
||||
}
|
||||
@ -517,6 +499,7 @@ public class ExportController {
|
||||
//最终的列头
|
||||
String titles = titles0.toString();
|
||||
|
||||
|
||||
// 创建工作簿
|
||||
SXSSFWorkbook wb = new SXSSFWorkbook();
|
||||
//表格样式
|
||||
@ -689,12 +672,19 @@ public class ExportController {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
String filename = "打分汇总表.xls";
|
||||
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("UTF-8"), "ISO8859-1")));
|
||||
wb.write(response.getOutputStream());
|
||||
}
|
||||
|
||||
return BaseResponse.fail(ERROR_MESSAGE);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -706,7 +696,7 @@ public class ExportController {
|
||||
*/
|
||||
@RequestMapping(value = "/jgdf", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public void exportJgdfMessage(ExportParame parame, HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
public BaseResponse<String> exportJgdfMessage(ExportParame parame, HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||
|
||||
List<String> titles = new LinkedList<String>();
|
||||
titles.add("序号");
|
||||
@ -731,20 +721,27 @@ public class ExportController {
|
||||
projectSectionVO.setId(parame.getSectionId());
|
||||
BaseResponse<ProjectSectionVO> list = exportServiceProject.selectById(projectSectionVO);
|
||||
|
||||
//价格数据
|
||||
|
||||
BidEvalDetailDTO bidEvalDetailDTO = new BidEvalDetailDTO();
|
||||
bidEvalDetailDTO.setReviewTurnId(parame.getReviewTurnId());
|
||||
bidEvalDetailDTO.setReviewType(parame.getReviewType());
|
||||
bidEvalDetailDTO.setAssessRoomId(parame.getAssessRoomId());
|
||||
|
||||
//价格数据
|
||||
BaseResponse<List<SupplierRegisterPriceScoreVO>> listBaseResponse = exportService.findPriceScoreRecord(bidEvalDetailDTO);
|
||||
|
||||
|
||||
//组装价格数据
|
||||
|
||||
if(listBaseResponse!=null && listBaseResponse.getData() !=null){
|
||||
|
||||
//最小价格
|
||||
BigDecimal minPrice = listBaseResponse.getData().stream().map(SupplierRegisterPriceScoreVO::getBidContent).min((x1, x2) -> x1.compareTo(x2)).get();
|
||||
//平均价格
|
||||
BigDecimal avgPrice = listBaseResponse.getData().stream().map(SupplierRegisterPriceScoreVO::getBidContent).reduce(BigDecimal.ZERO, BigDecimal::add).divide(BigDecimal.valueOf(listBaseResponse.getData().size()), 2, BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal avgPrice = listBaseResponse.getData().stream().map(SupplierRegisterPriceScoreVO::getBidContent).reduce(BigDecimal.ZERO, BigDecimal::add).
|
||||
divide(BigDecimal.valueOf(listBaseResponse.getData().size()), 2, BigDecimal.ROUND_HALF_UP);
|
||||
|
||||
//组装价格数据
|
||||
ArrayList<Map<String, Object>> maps = new ArrayList<>();
|
||||
|
||||
for (int i = 0; i < listBaseResponse.getData().size(); i++) {
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("num", i + 1);
|
||||
@ -760,10 +757,8 @@ public class ExportController {
|
||||
}
|
||||
data.put("jgScore", listBaseResponse.getData().get(i).getPriceScore());
|
||||
maps.add(data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 创建工作簿
|
||||
SXSSFWorkbook wb = new SXSSFWorkbook();
|
||||
//表格样式
|
||||
@ -893,6 +888,9 @@ public class ExportController {
|
||||
response.setHeader("Content-Disposition", "attachment;filename=".concat(new String(filename.getBytes("UTF-8"), "ISO8859-1")));
|
||||
wb.write(response.getOutputStream());
|
||||
|
||||
}
|
||||
|
||||
return BaseResponse.fail(ERROR_MESSAGE);
|
||||
|
||||
}
|
||||
|
||||
@ -918,6 +916,7 @@ public class ExportController {
|
||||
bidEvalInfoDTO.setReviewType(parame.getReviewType());
|
||||
//供应商
|
||||
List<SupplierRegisterVO> listBaseResponse = exportService.findRegisterAndUser(bidEvalInfoDTO).getData();
|
||||
|
||||
//列头
|
||||
StringBuffer titles0 = new StringBuffer("序号,评审因素,评审标准");
|
||||
//供应商 顺序
|
||||
|
Binary file not shown.
@ -36,7 +36,6 @@ public interface ExportServiceOpen {
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("查询数据")
|
||||
// @GetMapping("/v1/bizbidopenroom/list")
|
||||
@PostMapping ("/v1/bizbidopenroom/getPostlist")
|
||||
BaseResponse<List<BizBidOpenroom>> list(@ApiParam(value = "查询对象数据", required = false) BizBidOpenroom bizBidOpenroom);
|
||||
|
||||
|
Reference in New Issue
Block a user