菜单功能开发
1.开标结束页面功能
功能:页面上增加导出Excel按钮,将开标一览表格绘制成Excel进行导出。
2.实现
1.1前台页面增加按钮、点击事件
//前台开标结束页面修改代码内容 KaiBiaoEnd.html<div class="page-loading"></div>
<div class="fui-toolbar"><div id="btnExcelClick" class="mini-button" onclick="btnExcelClick">导出到Excel</div>
</div><!--和fui-content平级-->
<form id="download_form" method="post" enctype="multipart/form-data"/> function btnExcelClick() {var form = document.getElementById('download_form');form.action = "kaibiaoendcommonaction.action?cmd=btnExcelClick";form.submit();
}
1.2后台修改action方法
import org.apache.poi.ss.usermodel.Workbook;/*** 点击*/public void btnExcelClick() {String fileName = "开标记录表.xls";// 客户端保存的文件名String firstKB = getRequestParameter("FirstKB");Workbook workBook = ExcelUtils.generateExcel(biaoDuanGuid, pbbf, firstKB);// 以字符流的形式下载文件try (ByteArrayOutputStream fs = new ByteArrayOutputStream()) {workBook.write(fs);workBook.close();sendRespose(fs.toByteArray(), fileName, "application/x-msdownload;charset=UTF-8");}catch (IOException e) {log.error("生成开标记录表Excel出错", e);}}
1.3下载ExcelUtils类
package com.epoint.PingBiao.Bizlogic2.Common.Main;import org.apache.log4j.Logger;
import Epoint.PingBiao.Core.BaseDB.PingBiaoBiaoDuanService;
import Epoint.PingBiao.Core.BaseDB.PingBiaoKaiBiaoTouBiaoService;
import Epoint.PingBiao.Core.ClsEnum;
import Epoint.PingBiao.Core.Common.CommonFunction;
import Epoint.PingBiao.Core.Common.ReNameAction;
import Epoint.PingBiao.Core.PBCommonDao;
import Epoint.PingBiao.Core.domain.PingBiaoKaiBiaoTouBiao;
import Epoint.PingBiao.Core.domain.PingbiaoBiaoduan;
import com.epoint.Eco.domain.PingbiaoEvalBiaojiabjb;
import com.epoint.PingBiao.Bizlogic2.Common.BaseDB.PingbiaoTbinfomxService;
import com.epoint.PingBiao.domain.PingbiaoTbinfomx;
import com.epoint.ZtbCommon.ZtbCommonDao;
import com.epoint.basic.bizlogic.sysconf.systemparameters.service.FrameConfigService9;
import com.epoint.basic.controller.BaseController;
import com.epoint.core.grammar.Record;
import com.epoint.core.utils.config.ConfigUtil;
import com.epoint.core.utils.string.StringUtil;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.VerticalAlignment;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.util.CellRangeAddress;import java.util.List;
import java.util.Optional;
import java.util.function.Predicate;
import java.util.stream.Collectors;/*** [一句话功能简述]** @author 徐海南* @version [版本号, 2021-03-23]* @see [相关类/方法]* @since [产品/模块版本]*/
public class ExcelUtils {private static final transient Logger log = Logger.getLogger(BaseController.class);private static final short VerticalAlignment_LEFT = 0;private static final short VerticalAlignment_CENTER = 1;private static final short VerticalAlignment_RIGHT = 2;private static final short HorizontalAlignment_LEFT = 0;private static final short HorizontalAlignment_CENTER = 1;private static final short HorizontalAlignment_RIGHT = 2;private static final int NUMBER2 = 2;private static final int NUMBER8 = 8;private static final int NUMBER5 = 5;private static final int NUMBER6 = 6;private static final int NUMBER3 = 3;private static final int NUMBER4000 = 4000;private static final int NUMBER6000 = 6000;private static final int NUMBER8000 = 8000;private static final int NUMBER10000 = 10000;private static final int NUMBER4 = 4;private static final int NUMBER7 = 7;private static final int NUMBER9 = 9;private static final int NUMBER2000 = 2000;private static final int NUMBER12000 = 12000;private static ZtbCommonDao service = ZtbCommonDao.getInstance();private static PingBiaoBiaoDuanService biaoDuanService = new PingBiaoBiaoDuanService();private static PingBiaoKaiBiaoTouBiaoService pingBiaoKaiBiaoTouBiaoService = new PingBiaoKaiBiaoTouBiaoService();private static PingbiaoTbinfomxService pingbiaoTbinfomxService = new PingbiaoTbinfomxService();/*** 开标结束阶段生成Excel** @param biaoDuanGuid biaoDuanGuid* @param pbbf pbbf* @param firstKB firstKB* @return Workbook* @author 徐海南*/public static Workbook generateExcel(String biaoDuanGuid, String pbbf, String firstKB) {String kaiBiaoEndExcel = ConfigUtil.getConfigValue("parameter", "kaiBiaoEndExcel");String conditionNum = "";if (kaiBiaoEndExcel != null) {String[] kaiBiaoEndExcelNum = kaiBiaoEndExcel.split(";");for (String pbbfs : kaiBiaoEndExcelNum) {if (pbbfs.contains(pbbf)) {conditionNum = pbbfs.split(":")[0];break;}}}String sql = "select BaoZhengJin,DanWeiName,DanWeiGuid,TouBiaoTotal,Zlcn,FileMiFeng,GongQi,XiangMuJL,KaiBiaoReMark,isnull( UPR_Date,'2099-09-09') AAA from PingBiao_KaiBiaoTouBiao where BiaoDuanGuid=? and IsTouBiao='1' and TuiHuiTime is null order by Row_ID";if ("JLHYXZDJ".equals(pbbf)) {if (biaoDuanService.isPFEnd(biaoDuanGuid, String.valueOf(ClsEnum.PFDType.技术标评审))) {sql = "select BaoZhengJin,DanWeiName,DanWeiGuid,TouBiaoTotal,Zlcn,FileMiFeng,GongQi,XiangMuJL,KaiBiaoReMark,ISNULL( UPR_Date,'2099-09-09') AAA from PingBiao_KaiBiaoTouBiao where BiaoDuanGuid=? and IsTouBiao='1' and (isnull(feibiaojd,' ')=' ' or feibiaojd>3) and isnull(isfeibiao,'0')=0 and TuiHuiTime is null order by Row_ID ";}else {sql = "select BaoZhengJin,DanWeiName,DanWeiGuid,'' as TouBiaoTotal,Zlcn,FileMiFeng,GongQi,XiangMuJL,KaiBiaoReMark,ISNULL( UPR_Date,'2099-09-09') AAA from PingBiao_KaiBiaoTouBiao where BiaoDuanGuid=? and IsTouBiao='1' and TuiHuiTime is null and (isnull(feibiaojd,' ')=' ' or feibiaojd>3) order by Row_ID ";}}if ("AQCGJLHYXZDJ_FL".equals(pbbf)) {if (biaoDuanService.isPFEnd(biaoDuanGuid, String.valueOf(ClsEnum.PFDType.技术标评审))) {sql = "select BaoZhengJin,DanWeiName,DanWeiGuid,TouBiaoTotal,Zlcn,FileMiFeng,GongQi,XiangMuJL,KaiBiaoReMark,isnull( UPR_Date,'2099-09-09') AAA from PingBiao_KaiBiaoTouBiao where BiaoDuanGuid=? and IsTouBiao='1' and TuiHuiTime is null and (isnull(feibiaojd,' ')=' ' or feibiaojd>3) and TuiHuiTime is null order by Row_ID ";}else {sql = "select BaoZhengJin,DanWeiName,DanWeiGuid,'' as TouBiaoTotal,Zlcn,FileMiFeng,GongQi,XiangMuJL,KaiBiaoReMark,isnull( UPR_Date,'2099-09-09') AAA from PingBiao_KaiBiaoTouBiao where BiaoDuanGuid=? and IsTouBiao='1' and TuiHuiTime is null and (isnull(feibiaojd,' ')=' ' or feibiaojd>2) order by Row_ID ";}}if ("AQFJLJDZWZ".equals(pbbf) && biaoDuanService.isPFEnd(biaoDuanGuid, String.valueOf(ClsEnum.PFDType.技术标评审))) {sql = "select BaoZhengJin,DanWeiName,DanWeiGuid,TouBiaoTotal,Zlcn,FileMiFeng,GongQi,XiangMuJL,KaiBiaoReMark,isnull( UPR_Date,'2099-09-09') AAA from PingBiao_KaiBiaoTouBiao where BiaoDuanGuid=? and IsTouBiao='1' and (isnull(isfeibiao,'0')=0 or feibiaojd>2) and issucceed=1 order by Row_ID ";}if (!new FrameConfigService9().getFrameConfigValue("非两阶段办法").contains(pbbf + ";") && !biaoDuanService.isPFEnd(biaoDuanGuid, String.valueOf(ClsEnum.PFDType.技术标评审))) {sql = "select BaoZhengJin,DanWeiName,DanWeiGuid,'' as TouBiaoTotal,Zlcn,FileMiFeng,GongQi,XiangMuJL,KaiBiaoReMark,isnull( UPR_Date,'2099-09-09') AAA from PingBiao_KaiBiaoTouBiao where BiaoDuanGuid=? and IsTouBiao='1' and TuiHuiTime is null order by Row_ID";}List<PingBiaoKaiBiaoTouBiao> pingbiaokaibiaoList = service.findList(sql, PingBiaoKaiBiaoTouBiao.class, biaoDuanGuid);// KaiBiaoDatePingbiaoBiaoduan biaoduan = biaoDuanService.getBean("*", biaoDuanGuid);String kaiBiaoDate = biaoDuanService.getKaiBiaoDate(biaoduan);CommonFunction.InsertLog("查询", "", "查询开标时间");// top 3sql = "SELECT Row_id,RowGuid,Last_TotalPrice,DanWeiName,DanWeiGuid FROM PingBiao_Eval_BiaoJiaBJB WHERE TYPE='0' and biaoduanguid=? and danweiguid not in (select DanWeiguid from pingbiao_kaibiaotoubiao where isfeibiao='1' and BiaoDuanGuid=?) order by Last_TotalPrice asc";List<PingbiaoEvalBiaojiabjb> biaojiabjbList = service.findList(sql, PingbiaoEvalBiaojiabjb.class, biaoDuanGuid, biaoDuanGuid);// TBInfoMxsql = "select * from PingBiao_TBInfoMx where biaoduanguid=?";List<PingbiaoTbinfomx> dvTBInfoMx = PBCommonDao.getInstance(biaoDuanGuid).findList(sql, PingbiaoTbinfomx.class, biaoDuanGuid);try {Workbook workBook;switch (StringUtil.isNotBlank(conditionNum) ? conditionNum : "") {case "0":workBook = GetWorkBook(pingbiaokaibiaoList, biaojiabjbList, biaoduan, dvTBInfoMx, kaiBiaoDate,biaoDuanGuid);break;case "1":workBook = GetWorkBook1(pingbiaokaibiaoList, biaojiabjbList, biaoduan, dvTBInfoMx, kaiBiaoDate,biaoDuanGuid, pbbf);break;case "2":workBook = GetWorkBook2(pingbiaokaibiaoList, biaojiabjbList, biaoduan, dvTBInfoMx, kaiBiaoDate,biaoDuanGuid);break;case "3":workBook = GetWorkBook_FJ(pingbiaokaibiaoList, dvTBInfoMx, biaoduan, dvTBInfoMx, kaiBiaoDate,biaoDuanGuid, pbbf);break;case "4":workBook = GetWorkBook_JT(pingbiaokaibiaoList, dvTBInfoMx, biaoduan, dvTBInfoMx, kaiBiaoDate, pbbf);break;case "5":workBook = GetWorkBook_JLHYXZDJ(pingbiaokaibiaoList, dvTBInfoMx, biaoduan, dvTBInfoMx, kaiBiaoDate,pbbf);break;case "6":workBook = GetWorkBook_SLSG(pingbiaokaibiaoList, dvTBInfoMx, biaoduan, dvTBInfoMx, kaiBiaoDate,biaoDuanGuid, pbbf);break;case "7":workBook = GetWorkBook_JLJDZWZ(pingbiaokaibiaoList, dvTBInfoMx, biaoduan, dvTBInfoMx, kaiBiaoDate,biaoDuanGuid, pbbf);break;case "8":workBook = GetWorkBook_XEBF(pingbiaokaibiaoList, dvTBInfoMx, biaoduan, dvTBInfoMx, kaiBiaoDate);break;default:workBook = GetWorkBookDefault(biaoduan, kaiBiaoDate, biaoDuanGuid, pbbf, firstKB);}return workBook;}catch (Exception ex) {log.error("导出开标记录表失败", ex);CommonFunction.InsertLog("导出", "开标记录表", ex.getMessage());return null;}}/*** 将dataview的数据转成Excel* 默认导出唱标列** @param biaoduan 标段* @param kaiBiaoDate 开标日期* @param biaoDuanGuid biaoDuanGuid* @param pbbf pbbf* @param firstKB firstKB* @return workbook*/public static Workbook GetWorkBookDefault(PingbiaoBiaoduan biaoduan, String kaiBiaoDate, String biaoDuanGuid,String pbbf, String firstKB) {String isCBFilter1 = ConfigUtil.getConfigValue("parameter", "isCBFilter1");String isCBFilter2 = ConfigUtil.getConfigValue("parameter", "isCBFilter2");// 两阶段未到商务标不唱标String isEcoCB = ConfigUtil.getConfigValue("parameter", "isEcoCB");List<Record> dwList = pingBiaoKaiBiaoTouBiaoService.selectAllKBDanWei4Cb(biaoDuanGuid);String isTechEnd = biaoDuanService.getColumnValue("istechend", biaoDuanGuid);if ("1".equals(isCBFilter1)) {if ("1".equals(isTechEnd) && "1".equals(biaoDuanService.getBiaoDuanExtValue(biaoDuanGuid, "EconSucceed"))) {String strSql = "SELECT row_id,RowGuid,danweiguid,danweiName,TechKBRemark,KaiBiaoReMark,ispayforbzj,IsTechSucceedShow,TBImportPercent," + "IsTechSucceed,IsSucceed,isecosucceed,tbhb,bcbj,zzbj,TBFileAttchGuid,TBFileAttachConnectionstring,UPR_Date,iscanyupb " + "FROM PingBiao_KaibiaoTouBiao WHERE BiaoDuanGuid=? and IsTouBiao='1' and TuiHuiTime is null and (isnull(feibiaojd,' ')=' ' or feibiaojd>3)";dwList = ZtbCommonDao.getInstance().findList(strSql, PingBiaoKaiBiaoTouBiao.class, biaoDuanGuid).stream().sorted().collect(Collectors.toList());}}else if ("1".equals(isCBFilter2) && "1".equals(isTechEnd)) {String strSql = "SELECT row_id,RowGuid,danweiguid,danweiName,TechKBRemark,KaiBiaoReMark,ispayforbzj,IsTechSucceedShow,TBImportPercent," + "IsTechSucceed,IsSucceed,isecosucceed,tbhb,bcbj,zzbj,TBFileAttchGuid,TBFileAttachConnectionstring,UPR_Date,iscanyupb " + "FROM PingBiao_KaibiaoTouBiao WHERE BiaoDuanGuid=? and issucceed='1' and TuiHuiTime is null and (isnull(isfeibiao,'0')='0' or feibiaojd>2)";dwList = ZtbCommonDao.getInstance().findList(strSql, PingBiaoKaiBiaoTouBiao.class, biaoDuanGuid).stream().sorted().collect(Collectors.toList());}else if ("1".equals(isEcoCB)) {String strSql = "SELECT row_id,RowGuid,danweiguid,danweiName,TechKBRemark,KaiBiaoReMark,ispayforbzj,IsTechSucceedShow,TBImportPercent,IsTechSucceed,IsSucceed,isecosucceed,tbhb,bcbj,zzbj,TBFileAttchGuid,TBFileAttachConnectionstring,UPR_Date,iscanyupb FROM PingBiao_KaibiaoTouBiao WHERE BiaoDuanGuid=? and IsTouBiao='1' and TuiHuiTime is null and (isecosucceed='1' or issucceed='1') and isruwei=1 and isfeibiao<>1 order by Row_ID ";dwList = ZtbCommonDao.getInstance().findList(strSql, PingBiaoKaiBiaoTouBiao.class, biaoDuanGuid).stream().sorted().collect(Collectors.toList());}List<Record> cbHeads = pingbiaoTbinfomxService.listCBHeads(biaoDuanGuid);// 获取投标单位响应值List<Record> dvKeysTB = pingbiaoTbinfomxService.listCBValue(biaoDuanGuid);CommonFunction.InsertLog("查询", "", "查询唱标项");for (Record cbHead : cbHeads) {String bookMarkName = cbHead.getStr("bookmarkname");if ("单位名称".equals(cbHead.getStr("BookMarkName")) || "投标人名称".equals(cbHead.getStr("BookMarkName")) || "投标单位".equals(cbHead.getStr("BookMarkName")) || "投标单位名称".equals(cbHead.getStr("BookMarkName"))) {continue;}for (Record dw : dwList) {Predicate<Record> filter = (p) -> (bookMarkName.equals(p.getStr("BookMarkName")) && dw.getStr("DanWeiGuid").equals(p.getStr("DanWeiGuid")));Optional<Record> firstA = dvKeysTB.stream().filter(filter).findFirst();firstA.ifPresent(record -> dw.put(cbHead.getStr("bookmarkname"), record.getStr("markvalue")));}}HSSFWorkbook workBook = new HSSFWorkbook();HSSFSheet sheet = workBook.createSheet("开标记录表");sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, NUMBER8));sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, NUMBER5));sheet.addMergedRegion(new CellRangeAddress(1, 1, NUMBER6, NUMBER8));// TitleHSSFFont font = workBook.createFont();// 逃避sonar检测font.setFontName("宋a".replace("a", "体"));font.setBold(true);font.setFontHeight(Short.parseShort("250"));// 居中单元格HSSFCellStyle cellCellStyle = workBook.createCellStyle();cellCellStyle.setVerticalAlignment(VerticalAlignment_CENTER);// 垂直居中cellCellStyle.setAlignment(VerticalAlignment_CENTER);cellCellStyle.setFont(font);// 水平居左单元格HSSFCellStyle leftCellStyle = workBook.createCellStyle();leftCellStyle.setVerticalAlignment(VerticalAlignment_CENTER);// 垂直居中leftCellStyle.setAlignment(HorizontalAlignment_LEFT);leftCellStyle.setFont(font);// 标题HSSFRow titleRow = sheet.createRow(0);HSSFCell titleCell = titleRow.createCell(0);titleCell.setCellValue("开标记录表");titleCell.setCellStyle(cellCellStyle);titleRow.setHeight(Short.parseShort("700"));HSSFRow rowZBR = sheet.createRow(1);HSSFCell cellZBR = rowZBR.createCell(0);cellZBR.setCellValue("招标人:" + (StringUtil.isBlank(biaoduan.getJianshedanwei()) ? "" : biaoduan.getJianshedanwei()));cellZBR.setCellStyle(leftCellStyle);rowZBR.setHeight(Short.parseShort("700"));HSSFCell cellKBTime = rowZBR.createCell(NUMBER6);cellKBTime.setCellValue("开标时间:" + kaiBiaoDate);cellKBTime.setCellStyle(leftCellStyle);// 单位信息标题HSSFRow dwRow = sheet.createRow(NUMBER2);HSSFCell xhCell = dwRow.createCell(0);xhCell.setCellValue("序号");xhCell.setCellStyle(cellCellStyle);dwRow.setHeight(Short.parseShort("500"));HSSFCell tbrCell = dwRow.createCell(1);tbrCell.setCellValue(new ReNameAction().getTbdw() + "名称");tbrCell.setCellStyle(cellCellStyle);int i = NUMBER2;for (Record cbHead : cbHeads) {if ("单位名称".equals(cbHead.getStr("BookMarkName")) || "投标人名称".equals(cbHead.getStr("BookMarkName")) || "投标单位".equals(cbHead.getStr("BookMarkName")) || "投标单位名称".equals(cbHead.getStr("BookMarkName"))) {continue;}HSSFCell cell = dwRow.createCell(i);cell.setCellValue(cbHead.getStr("TableHead"));cell.setCellStyle(cellCellStyle);i++;}HSSFCell kbRemarkCell = dwRow.createCell(i);kbRemarkCell.setCellValue("开标备注");kbRemarkCell.setCellStyle(cellCellStyle);// 从第四行开始int rowIndex = NUMBER3;int cellIndex = 0;for (Record dw : dwList) {HSSFRow dvDetail = sheet.createRow(rowIndex);dvDetail.setHeight(Short.parseShort("500"));xhCell = dvDetail.createCell(0);xhCell.setCellValue(Double.valueOf(rowIndex) - NUMBER2);xhCell.setCellStyle(cellCellStyle);tbrCell = dvDetail.createCell(1);tbrCell.setCellValue(dw.getStr("DanWeiName"));tbrCell.setCellStyle(leftCellStyle);cellIndex = NUMBER2;for (Record drvKey : cbHeads) {String bookMarkName = drvKey.getStr("BookMarkName");if ("单位名称".equals(bookMarkName) || "投标人名称".equals(bookMarkName) || "投标单位".equals(bookMarkName) || "投标单位名称".equals(bookMarkName)) {continue;}HSSFCell cell = dvDetail.createCell(cellIndex);cell.setCellStyle(cellCellStyle);if (dw.getStr(drvKey.getStr("BookMarkName")) != null) {cell.setCellValue(dw.getStr(drvKey.getStr("BookMarkName")));}else {cell.setCellValue("");}cellIndex++;}kbRemarkCell = dvDetail.createCell(cellIndex);kbRemarkCell.setCellValue(dw.getStr("kaibiaoremark") != null ? dw.getStr("kaibiaoremark") : "");kbRemarkCell.setCellStyle(leftCellStyle);rowIndex++;}sheet.setColumnWidth(0, NUMBER4000);sheet.setColumnWidth(1, NUMBER10000);for (int n = NUMBER2; n < cellIndex + 1; n++) {sheet.setColumnWidth(n, NUMBER6000);}return workBook;}/*** 将dataview的数据转成Excel** @param pingbiaokaibiaoList 单位* @param biaojiabjbList 报价* @param biaoduan 标段* @param tbinfomxes 投标文件明细* @param kaiBiaoDate 开标日期* @param biaoDuanGuid biaoDuanGuid* @return workbook*/public static Workbook GetWorkBook(List<PingBiaoKaiBiaoTouBiao> pingbiaokaibiaoList,List<PingbiaoEvalBiaojiabjb> biaojiabjbList, PingbiaoBiaoduan biaoduan, List<PingbiaoTbinfomx> tbinfomxes,String kaiBiaoDate, String biaoDuanGuid) {HSSFWorkbook workBook = new HSSFWorkbook();HSSFSheet sheet = workBook.createSheet("开标记录表");sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, NUMBER8));sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, NUMBER5));sheet.addMergedRegion(new CellRangeAddress(1, 1, NUMBER6, NUMBER8));// TitleHSSFFont font = workBook.createFont();// 逃避sonar检测font.setFontName("宋a".replace("a", "体"));font.setBold(true);font.setFontHeight(Short.parseShort("250"));// 居中单元格HSSFCellStyle cellCellStyle = workBook.createCellStyle();cellCellStyle.setVerticalAlignment(VerticalAlignment_CENTER);// 垂直居中cellCellStyle.setAlignment(HorizontalAlignment_CENTER);cellCellStyle.setFont(font);// 水平居左单元格HSSFCellStyle leftCellStyle = workBook.createCellStyle();leftCellStyle.setVerticalAlignment(VerticalAlignment_CENTER);// 垂直居中leftCellStyle.setAlignment(HorizontalAlignment_LEFT);leftCellStyle.setFont(font);// 标题HSSFRow titleRow = sheet.createRow(0);HSSFCell titleCell = titleRow.createCell(0);titleCell.setCellValue("开标记录表");titleCell.setCellStyle(cellCellStyle);titleRow.setHeight(Short.parseShort("700"));HSSFRow rowZBR = sheet.createRow(1);HSSFCell cellZBR = rowZBR.createCell(0);cellZBR.setCellValue("招标人:" + (StringUtil.isBlank(biaoduan.getJianshedanwei()) ? "" : biaoduan.getJianshedanwei()));cellZBR.setCellStyle(leftCellStyle);rowZBR.setHeight(Short.parseShort("700"));HSSFCell cellKBTime = rowZBR.createCell(NUMBER6);cellKBTime.setCellValue("开标时间:" + kaiBiaoDate);cellKBTime.setCellStyle(leftCellStyle);// 单位信息标题HSSFRow dwRow = sheet.createRow(NUMBER2);HSSFCell xhCell = dwRow.createCell(0);xhCell.setCellValue("序号");xhCell.setCellStyle(cellCellStyle);dwRow.setHeight(Short.parseShort("500"));HSSFCell tbrCell = dwRow.createCell(1);tbrCell.setCellValue("投标人");tbrCell.setCellStyle(cellCellStyle);HSSFCell mfqkCell = dwRow.createCell(NUMBER2);mfqkCell.setCellValue("密封情况");mfqkCell.setCellStyle(cellCellStyle);HSSFCell totalPriceCell = dwRow.createCell(NUMBER3);totalPriceCell.setCellValue("投标总报价(元)");totalPriceCell.setCellStyle(cellCellStyle);HSSFCell gczlCell = dwRow.createCell(NUMBER4);gczlCell.setCellValue("工程质量");gczlCell.setCellStyle(cellCellStyle);HSSFCell gqCell = dwRow.createCell(NUMBER5);gqCell.setCellValue("工期(日历天)");gqCell.setCellStyle(cellCellStyle);HSSFCell projectManagerCell = dwRow.createCell(NUMBER6);projectManagerCell.setCellValue("项目经理");projectManagerCell.setCellStyle(cellCellStyle);HSSFCell tbrConfirmCell = dwRow.createCell(NUMBER7);tbrConfirmCell.setCellValue("投标人确认");tbrConfirmCell.setCellStyle(cellCellStyle);HSSFCell remarkCell = dwRow.createCell(NUMBER8);remarkCell.setCellValue("备注");remarkCell.setCellStyle(cellCellStyle);// 从第四行开始int rowIndex = NUMBER3;if (pingbiaokaibiaoList != null && !pingbiaokaibiaoList.isEmpty()) {for (PingBiaoKaiBiaoTouBiao dw : pingbiaokaibiaoList) {HSSFRow dvDetail = sheet.createRow(rowIndex);dvDetail.setHeight(Short.parseShort("500"));xhCell = dvDetail.createCell(0);xhCell.setCellValue(Double.valueOf(rowIndex) - NUMBER2);xhCell.setCellStyle(cellCellStyle);tbrCell = dvDetail.createCell(1);tbrCell.setCellValue(dw.getDanweiname());tbrCell.setCellStyle(cellCellStyle);mfqkCell = dvDetail.createCell(NUMBER2);mfqkCell.setCellValue(dw.getFilemifeng());mfqkCell.setCellStyle(cellCellStyle);String totalPrice = "";if (!"1".equals(biaoduan.getIstechend())) {totalPrice = dw.getToubiaototal();}totalPriceCell = dvDetail.createCell(NUMBER3);totalPriceCell.setCellValue(totalPrice);totalPriceCell.setCellStyle(cellCellStyle);gczlCell = dvDetail.createCell(NUMBER4);String gczl = dw.getZlcn();if (StringUtil.isBlank(gczl)) {List<PingbiaoTbinfomx> tbinfomx = tbinfomxes.stream().filter(p -> dw.getDanweiguid().equals(p.getDanweiguid()) && "Zlcn".equals(p.getMarktype())).collect(Collectors.toList());if (!tbinfomx.isEmpty()) {gczl = tbinfomx.get(0).getMarkvalue();}}gczlCell.setCellValue(gczl);gczlCell.setCellStyle(cellCellStyle);gqCell = dvDetail.createCell(NUMBER5);gqCell.setCellValue(dw.getGongqi());gqCell.setCellStyle(cellCellStyle);projectManagerCell = dvDetail.createCell(NUMBER6);projectManagerCell.setCellValue(dw.getXiangmujl());projectManagerCell.setCellStyle(cellCellStyle);tbrConfirmCell = dvDetail.createCell(NUMBER7);tbrConfirmCell.setCellValue("");tbrConfirmCell.setCellStyle(cellCellStyle);remarkCell = dvDetail.createCell(NUMBER8);remarkCell.setCellValue(dw.getKaibiaoremark());remarkCell.setCellStyle(cellCellStyle);rowIndex++;}}String sql = "SELECT TouBiaoTotal FROM PingBiao_TouBiao_DetailBaoJia WHERE BiaoDuanGuid=? AND DanWeiGuid='bd001'";String toubiaoTotal = service.queryString(sql, biaoDuanGuid);toubiaoTotal = StringUtil.isBlank(toubiaoTotal) ? " " : toubiaoTotal;HSSFRow baoJiaDetail = sheet.createRow(rowIndex);baoJiaDetail.setHeight(Short.parseShort("500"));HSSFRow firstHXRDetail = sheet.createRow(rowIndex + 1);firstHXRDetail.setHeight(Short.parseShort("500"));HSSFRow secondHXRDetail = sheet.createRow(rowIndex + NUMBER2);secondHXRDetail.setHeight(Short.parseShort("500"));HSSFRow thirdHXRDetail = sheet.createRow(rowIndex + NUMBER3);thirdHXRDetail.setHeight(Short.parseShort("500"));HSSFRow forthDetail = sheet.createRow(rowIndex + NUMBER4);forthDetail.setHeight(Short.parseShort("500"));HSSFRow fifthDetail = sheet.createRow(rowIndex + NUMBER5);fifthDetail.setHeight(Short.parseShort("500"));HSSFRow sixthDetail = sheet.createRow(rowIndex + NUMBER6);sixthDetail.setHeight(Short.parseShort("500"));// 合并单元格sheet.addMergedRegion(new CellRangeAddress(rowIndex, rowIndex, 0, NUMBER8));sheet.addMergedRegion(new CellRangeAddress(rowIndex + 1, rowIndex + 1, 0, NUMBER8));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER2, rowIndex + NUMBER2, 0, NUMBER8));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER3, rowIndex + NUMBER3, 0, NUMBER8));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER4, rowIndex + NUMBER4, 0, NUMBER8));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER5, rowIndex + NUMBER5, 0, NUMBER8));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER6, rowIndex + NUMBER6, 0, NUMBER8));// 填充数据HSSFCell baoJiaCell = baoJiaDetail.createCell(0);baoJiaCell.setCellValue("招标控制价:" + toubiaoTotal + "元,其中暂列金额(含税): 元、暂估价(含税): 元");baoJiaCell.setCellStyle(leftCellStyle);HSSFCell firstHXRCell = firstHXRDetail.createCell(0);firstHXRCell.setCellValue("第一中标候选人: 中标价: 元,其中暂列金额(含税): 元、暂估价(含税): 元");firstHXRCell.setCellStyle(leftCellStyle);HSSFCell secondHXRCell = secondHXRDetail.createCell(0);secondHXRCell.setCellValue("第二中标候选人:");secondHXRCell.setCellStyle(leftCellStyle);HSSFCell thirdHXRCell = thirdHXRDetail.createCell(0);thirdHXRCell.setCellValue("第三中标候选人:");thirdHXRCell.setCellStyle(leftCellStyle);HSSFCell forthCell = forthDetail.createCell(0);forthCell.setCellValue("招标人: 监督人员: 项目负责人: 特邀监督员: 公证人员:");forthCell.setCellStyle(leftCellStyle);String sqlXiShu = "select * from PingBiao_YouXiaoPanD where biaoduanguid=?";Record xiShu = service.find(sqlXiShu, Record.class, biaoDuanGuid);String canShuC = xiShu == null ? "" : xiShu.getStr("CanShuC");String canShuF = xiShu == null ? "" : xiShu.getStr("CanShuF");HSSFCell fifthCell = fifthDetail.createCell(0);fifthCell.setCellValue("C值:" + canShuC + " F值:" + canShuF);fifthCell.setCellStyle(leftCellStyle);HSSFCell sixthCell = sixthDetail.createCell(0);sixthCell.setCellValue("本系统抓取的投标报价数字为各投标单位投标函中小写数字");sixthCell.setCellStyle(leftCellStyle);sheet.setColumnWidth(0, NUMBER4000);sheet.setColumnWidth(1, NUMBER8000);sheet.setColumnWidth(NUMBER2, NUMBER4000);sheet.setColumnWidth(NUMBER3, NUMBER6000);sheet.setColumnWidth(NUMBER4, NUMBER6000);sheet.setColumnWidth(NUMBER5, NUMBER6000);sheet.setColumnWidth(NUMBER6, NUMBER6000);sheet.setColumnWidth(NUMBER7, NUMBER4000);sheet.setColumnWidth(NUMBER8, NUMBER4000);return workBook;}/*** 将dataview的数据转成Excel** @param pingbiaokaibiaoList 单位* @param biaojiabjbList 报价* @param biaoduan 标段* @param tbinfomxes 投标文件明细* @param kaiBiaoDate 开标日期* @param biaoDuanGuid biaoDuanGuid* @param pbbf pbbf* @return workbook*/public static Workbook GetWorkBook1(List<PingBiaoKaiBiaoTouBiao> pingbiaokaibiaoList,List<PingbiaoEvalBiaojiabjb> biaojiabjbList, PingbiaoBiaoduan biaoduan, List<PingbiaoTbinfomx> tbinfomxes,String kaiBiaoDate, String biaoDuanGuid, String pbbf) {HSSFWorkbook workBook = new HSSFWorkbook();HSSFSheet sheet = workBook.createSheet("唱标表");sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, NUMBER6));sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, NUMBER6));sheet.addMergedRegion(new CellRangeAddress(NUMBER2, NUMBER2, 0, NUMBER6));sheet.addMergedRegion(new CellRangeAddress(NUMBER3, NUMBER3, 0, NUMBER6));// TitleHSSFFont font = workBook.createFont();// 逃避sonar检测font.setFontName("宋a".replace("a", "体"));font.setBold(true);font.setFontHeight(Short.parseShort("250"));// 居中单元格HSSFCellStyle cellStyle = workBook.createCellStyle();cellStyle.setVerticalAlignment(VerticalAlignment_CENTER);// 垂直居中cellStyle.setAlignment(HorizontalAlignment_CENTER);cellStyle.setFont(font);// 水平居左单元格HSSFCellStyle leftCellStyle = workBook.createCellStyle();leftCellStyle.setVerticalAlignment(VerticalAlignment_CENTER);// 垂直居中leftCellStyle.setAlignment(HorizontalAlignment_LEFT);leftCellStyle.setFont(font);// 标题HSSFRow titleRow = sheet.createRow(0);HSSFCell titleCell = titleRow.createCell(0);titleCell.setCellValue("唱标表");titleCell.setCellStyle(cellStyle);titleRow.setHeight(Short.parseShort("700"));HSSFRow rowProjectName = sheet.createRow(1);HSSFCell cellProjectName = rowProjectName.createCell(0);cellProjectName.setCellValue("项目名称:" + (StringUtil.isBlank(biaoduan.getBiaoduanname()) ? "" : biaoduan.getBiaoduanname()));cellProjectName.setCellStyle(leftCellStyle);HSSFRow rowCGR = sheet.createRow(NUMBER2);HSSFCell cellCGR = rowCGR.createCell(0);cellCGR.setCellValue("采购人:" + (StringUtil.isBlank(biaoduan.getJianshedanwei()) ? "" : biaoduan.getJianshedanwei()));cellCGR.setCellStyle(leftCellStyle);HSSFRow rowKBTime = sheet.createRow(NUMBER3);HSSFCell cellKBTime = rowKBTime.createCell(0);cellKBTime.setCellValue("开标日期:" + kaiBiaoDate);cellKBTime.setCellStyle(leftCellStyle);// 单位信息标题HSSFRow dwRow = sheet.createRow(NUMBER5);HSSFCell xhCell = dwRow.createCell(0);xhCell.setCellValue("序号");xhCell.setCellStyle(cellStyle);dwRow.setHeight(Short.parseShort("600"));HSSFCell tbrCell = dwRow.createCell(1);tbrCell.setCellValue("投标单位名称");tbrCell.setCellStyle(cellStyle);HSSFCell totalPriceCell = dwRow.createCell(NUMBER2);String baojiaLabel = "总报价(元)";if ("CGYXZDJ_TBHFL".equals(pbbf) || "ZFCGFWYXZDJ_TBHFL".equals(pbbf)) {baojiaLabel = "投标报价";}else if ("AQZFCGJZXCSZHPFF".equals(pbbf)) {baojiaLabel = "投标报价(元)";}else if ("ZFCGFWZHPFF_FL".equals(pbbf)) {baojiaLabel = "投标报价(%)";}totalPriceCell.setCellValue(baojiaLabel);totalPriceCell.setCellStyle(cellStyle);String gongQiLabel = "交货、安装、调试期(日历天)";if ("ZFCGFWYXZDJ".equals(pbbf) || "ZFCGFWZHPFF".equals(pbbf)) {gongQiLabel = "服务期限(个月)";}else if ("ZFCGFWYXZDJ_TBHFL".equals(pbbf) || "AQCGFWTPYXZDJ".equals(pbbf)) {gongQiLabel = "服务期限";}else if ("AQCGXJ[XJ]".equals(pbbf) || "ZFCGFWZHPFF_FL".equals(pbbf)) {gongQiLabel = "服务期";}else if ("CGYXZDJ_TBHFL".equals(pbbf)) {gongQiLabel = "交货、安装、调试期";}else if ("AQZFCGJZXCSZHPFF".equals(pbbf)) {gongQiLabel = "工期(日历天)";}HSSFCell gqCell = dwRow.createCell(NUMBER3);gqCell.setCellValue(gongQiLabel);gqCell.setCellStyle(cellStyle);HSSFCell fileMiFengCell = dwRow.createCell(NUMBER4);fileMiFengCell.setCellValue("密封性");fileMiFengCell.setCellStyle(cellStyle);HSSFCell remarkCell = dwRow.createCell(NUMBER5);remarkCell.setCellValue("备注");remarkCell.setCellStyle(cellStyle);HSSFCell tbdwSignCell = dwRow.createCell(NUMBER6);tbdwSignCell.setCellValue("投标单位代表签字");tbdwSignCell.setCellStyle(cellStyle);// 从第六行开始int rowIndex = NUMBER6;if (pingbiaokaibiaoList != null && !pingbiaokaibiaoList.isEmpty()) {for (PingBiaoKaiBiaoTouBiao dw : pingbiaokaibiaoList) {HSSFRow dvDetail = sheet.createRow(rowIndex);dvDetail.setHeight(Short.parseShort("500"));xhCell = dvDetail.createCell(0);xhCell.setCellValue(Double.valueOf(rowIndex) - NUMBER5);xhCell.setCellStyle(cellStyle);tbrCell = dvDetail.createCell(1);tbrCell.setCellValue(dw.getDanweiname());tbrCell.setCellStyle(cellStyle);totalPriceCell = dvDetail.createCell(NUMBER2);totalPriceCell.setCellValue(dw.getToubiaototal());totalPriceCell.setCellStyle(cellStyle);gqCell = dvDetail.createCell(NUMBER3);gqCell.setCellValue(dw.getGongqi());gqCell.setCellStyle(cellStyle);fileMiFengCell = dvDetail.createCell(NUMBER4);fileMiFengCell.setCellValue(dw.getFilemifeng());fileMiFengCell.setCellStyle(cellStyle);remarkCell = dvDetail.createCell(NUMBER5);remarkCell.setCellValue(dw.getKaibiaoremark());remarkCell.setCellStyle(cellStyle);tbdwSignCell = dvDetail.createCell(NUMBER6);tbdwSignCell.setCellValue("");tbdwSignCell.setCellStyle(cellStyle);rowIndex++;}}sheet.addMergedRegion(new CellRangeAddress(rowIndex, rowIndex, 0, NUMBER6));sheet.addMergedRegion(new CellRangeAddress(rowIndex + 1, rowIndex + 1, 0, NUMBER6));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER2, rowIndex + NUMBER2, 0, NUMBER6));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER3, rowIndex + NUMBER3, 0, NUMBER6));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER4, rowIndex + NUMBER4, 0, NUMBER6));String sql = "SELECT TouBiaoTotal FROM PingBiao_TouBiao_DetailBaoJia WHERE BiaoDuanGuid=? AND DanWeiGuid='bd001'";String toubiaoTotal = service.queryString(sql, biaoDuanGuid);toubiaoTotal = StringUtil.isBlank(toubiaoTotal) ? " " : toubiaoTotal;HSSFRow firstHXRDetail = sheet.createRow(rowIndex);firstHXRDetail.setHeight(Short.parseShort("500"));HSSFRow secondHXRDetail = sheet.createRow(rowIndex + 1);secondHXRDetail.setHeight(Short.parseShort("500"));HSSFRow thirdHXRDetail = sheet.createRow(rowIndex + NUMBER2);thirdHXRDetail.setHeight(Short.parseShort("500"));HSSFRow forthDetail = sheet.createRow(rowIndex + NUMBER3);forthDetail.setHeight(Short.parseShort("500"));HSSFRow fifthDetail = sheet.createRow(rowIndex + NUMBER4);fifthDetail.setHeight(Short.parseShort("500"));// 填充数据HSSFCell firstHXRCell = firstHXRDetail.createCell(0);firstHXRCell.setCellValue("第一中标候选人: 中标价: 元");firstHXRCell.setCellStyle(leftCellStyle);HSSFCell secondHXRCell = secondHXRDetail.createCell(0);secondHXRCell.setCellValue("第二中标候选人: 中标价: 元");secondHXRCell.setCellStyle(leftCellStyle);HSSFCell thirdHXRCell = thirdHXRDetail.createCell(0);thirdHXRCell.setCellValue("第三中标候选人: 中标价: 元");thirdHXRCell.setCellStyle(leftCellStyle);HSSFCell forthCell = forthDetail.createCell(0);forthCell.setCellValue("最高投标限价:" + toubiaoTotal);forthCell.setCellStyle(leftCellStyle);HSSFCell fifthCell = fifthDetail.createCell(0);fifthCell.setCellValue("本系统抓取的投标报价数字为各投标单位投标函中小写数字");fifthCell.setCellStyle(leftCellStyle);sheet.setColumnWidth(0, NUMBER4000);sheet.setColumnWidth(1, NUMBER8000);sheet.setColumnWidth(NUMBER2, NUMBER6000);sheet.setColumnWidth(NUMBER3, NUMBER6000);sheet.setColumnWidth(NUMBER4, NUMBER6000);sheet.setColumnWidth(NUMBER5, NUMBER6000);sheet.setColumnWidth(NUMBER6, NUMBER6000);return workBook;}/*** 将dataview的数据转成Excel** @param pingbiaokaibiaoList 单位* @param biaojiabjbList 报价* @param biaoduan 标段* @param tbinfomxes 投标文件明细* @param kaiBiaoDate 开标日期* @param biaoDuanGuid biaoDuanGuid* @return workbook*/public static Workbook GetWorkBook2(List<PingBiaoKaiBiaoTouBiao> pingbiaokaibiaoList,List<PingbiaoEvalBiaojiabjb> biaojiabjbList, PingbiaoBiaoduan biaoduan, List<PingbiaoTbinfomx> tbinfomxes,String kaiBiaoDate, String biaoDuanGuid) {HSSFWorkbook workBook = new HSSFWorkbook();HSSFSheet sheet = workBook.createSheet("招标现场记录表");sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, NUMBER9));sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, NUMBER5));sheet.addMergedRegion(new CellRangeAddress(1, 1, NUMBER6, NUMBER9));// TitleHSSFFont font = workBook.createFont();// 逃避sonar检测font.setFontName("宋a".replace("a", "体"));font.setBold(true);font.setFontHeight(Short.parseShort("250"));// 居中单元格HSSFCellStyle cellCellStyle = workBook.createCellStyle();cellCellStyle.setVerticalAlignment(VerticalAlignment_CENTER);// 垂直居中cellCellStyle.setAlignment(HorizontalAlignment_CENTER);cellCellStyle.setFont(font);// 水平居左单元格HSSFCellStyle leftCellStyle = workBook.createCellStyle();leftCellStyle.setVerticalAlignment(VerticalAlignment_CENTER);// 垂直居中leftCellStyle.setAlignment(HorizontalAlignment_LEFT);leftCellStyle.setFont(font);// 标题HSSFRow titleRow = sheet.createRow(0);HSSFCell titleCell = titleRow.createCell(0);titleCell.setCellValue(biaoduan.getBiaoduanname() + "招标现场记录表");titleCell.setCellStyle(cellCellStyle);titleRow.setHeight(Short.parseShort("700"));HSSFRow rowProjectName = sheet.createRow(1);rowProjectName.setHeight(Short.parseShort("500"));HSSFCell cellProjectName = rowProjectName.createCell(0);cellProjectName.setCellValue("招标人:" + (StringUtil.isBlank(biaoduan.getJianshedanwei()) ? "" : biaoduan.getJianshedanwei()));cellProjectName.setCellStyle(leftCellStyle);HSSFCell cellKBTime = rowProjectName.createCell(NUMBER6);cellKBTime.setCellValue("开标时间:" + kaiBiaoDate);cellKBTime.setCellStyle(leftCellStyle);// 单位信息标题HSSFRow dwRow = sheet.createRow(NUMBER2);HSSFCell xhCell = dwRow.createCell(0);xhCell.setCellValue("序号");xhCell.setCellStyle(cellCellStyle);dwRow.setHeight(Short.parseShort("500"));HSSFCell tbrCell = dwRow.createCell(1);tbrCell.setCellValue("投标人");tbrCell.setCellStyle(cellCellStyle);HSSFCell fileMiFengCell = dwRow.createCell(NUMBER2);fileMiFengCell.setCellValue("密封情况");fileMiFengCell.setCellStyle(cellCellStyle);HSSFCell toubiaoBZJCell = dwRow.createCell(NUMBER3);toubiaoBZJCell.setCellValue("投标保证金");toubiaoBZJCell.setCellStyle(cellCellStyle);HSSFCell touBiaoTotalCell = dwRow.createCell(NUMBER4);touBiaoTotalCell.setCellValue("投标费率(%)");touBiaoTotalCell.setCellStyle(cellCellStyle);HSSFCell zongJianCell = dwRow.createCell(NUMBER5);zongJianCell.setCellValue("总监");zongJianCell.setCellStyle(cellCellStyle);HSSFCell n1Cell = dwRow.createCell(NUMBER6);n1Cell.setCellValue("N1");n1Cell.setCellStyle(cellCellStyle);HSSFCell n2Cell = dwRow.createCell(NUMBER7);n2Cell.setCellValue("N2");n2Cell.setCellStyle(cellCellStyle);HSSFCell n3Cell = dwRow.createCell(NUMBER8);n3Cell.setCellValue("N3");n3Cell.setCellStyle(cellCellStyle);HSSFCell tbrConfirmCell = dwRow.createCell(NUMBER9);tbrConfirmCell.setCellValue("投标人确认");tbrConfirmCell.setCellStyle(cellCellStyle);// 从第三行开始int rowIndex = NUMBER3;if (pingbiaokaibiaoList != null && !pingbiaokaibiaoList.isEmpty()) {for (PingBiaoKaiBiaoTouBiao dw : pingbiaokaibiaoList) {HSSFRow dvDetail = sheet.createRow(rowIndex);dvDetail.setHeight(Short.parseShort("500"));xhCell = dvDetail.createCell(0);xhCell.setCellValue(Double.valueOf(rowIndex) - NUMBER2);xhCell.setCellStyle(cellCellStyle);tbrCell = dvDetail.createCell(1);tbrCell.setCellValue(dw.getDanweiname());tbrCell.setCellStyle(cellCellStyle);fileMiFengCell = dvDetail.createCell(NUMBER2);fileMiFengCell.setCellValue(dw.getFilemifeng());fileMiFengCell.setCellStyle(cellCellStyle);toubiaoBZJCell = dvDetail.createCell(NUMBER3);toubiaoBZJCell.setCellValue(dw.getBaozhengjin());toubiaoBZJCell.setCellStyle(cellCellStyle);touBiaoTotalCell = dvDetail.createCell(NUMBER4);touBiaoTotalCell.setCellValue(dw.getToubiaototal());touBiaoTotalCell.setCellStyle(cellCellStyle);String xiangMuJL = dw.getXiangmujl();if (StringUtil.isBlank(xiangMuJL)) {String sql = "select markvalue from PingBiao_TBInfoMx where BiaoDuanGuid=? and danweiguid=? and marktype='Zjxm'";xiangMuJL = service.queryString(sql, biaoDuanGuid, dw.getDanweiguid());}zongJianCell = dvDetail.createCell(NUMBER5);zongJianCell.setCellValue(xiangMuJL);zongJianCell.setCellStyle(cellCellStyle);n1Cell = dvDetail.createCell(NUMBER6);n1Cell.setCellValue(biaoDuanService.getBiaoDuanExtValue(biaoDuanGuid, "N1"));n1Cell.setCellStyle(cellCellStyle);n2Cell = dvDetail.createCell(NUMBER7);n2Cell.setCellValue(biaoDuanService.getBiaoDuanExtValue(biaoDuanGuid, "N2"));n2Cell.setCellStyle(cellCellStyle);n3Cell = dvDetail.createCell(NUMBER8);n3Cell.setCellValue(biaoDuanService.getBiaoDuanExtValue(biaoDuanGuid, "N3"));CommonFunction.InsertLog("查询", "", "查询biaoduanext表N3");n3Cell.setCellStyle(cellCellStyle);tbrConfirmCell = dvDetail.createCell(NUMBER9);tbrConfirmCell.setCellValue("");tbrConfirmCell.setCellStyle(cellCellStyle);rowIndex++;}}sheet.addMergedRegion(new CellRangeAddress(rowIndex, rowIndex, 0, NUMBER9));sheet.addMergedRegion(new CellRangeAddress(rowIndex + 1, rowIndex + 1, 0, NUMBER9));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER2, rowIndex + NUMBER2, 0, NUMBER9));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER3, rowIndex + NUMBER3, 0, NUMBER9));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER4, rowIndex + NUMBER4, 0, NUMBER9));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER5, rowIndex + NUMBER5, 0, NUMBER9));String sql = "SELECT TouBiaoTotal FROM PingBiao_TouBiao_DetailBaoJia WHERE BiaoDuanGuid=? AND DanWeiGuid='bd001'";String toubiaoTotal = service.queryString(sql, biaoDuanGuid);toubiaoTotal = StringUtil.isBlank(toubiaoTotal) ? " " : toubiaoTotal;HSSFRow toubiaoTotalDetail = sheet.createRow(rowIndex);toubiaoTotalDetail.setHeight(Short.parseShort("500"));HSSFRow firstHXRDetail = sheet.createRow(rowIndex);firstHXRDetail.setHeight(Short.parseShort("500"));HSSFRow secondHXRDetail = sheet.createRow(rowIndex + 1);secondHXRDetail.setHeight(Short.parseShort("500"));HSSFRow thirdHXRDetail = sheet.createRow(rowIndex + NUMBER2);thirdHXRDetail.setHeight(Short.parseShort("500"));HSSFRow forthDetail = sheet.createRow(rowIndex + NUMBER3);forthDetail.setHeight(Short.parseShort("500"));HSSFRow fifthDetail = sheet.createRow(rowIndex + NUMBER4);fifthDetail.setHeight(Short.parseShort("500"));// 填充数据HSSFCell toubiaoTotalCell = toubiaoTotalDetail.createCell(0);toubiaoTotalCell.setCellValue("监理服务费最高投标报价(或费率):" + toubiaoTotal);toubiaoTotalCell.setCellStyle(leftCellStyle);HSSFCell firstHXRCell = firstHXRDetail.createCell(0);firstHXRCell.setCellValue("第一中标候选人: 中标价(或中标费率):");firstHXRCell.setCellStyle(leftCellStyle);HSSFCell secondHXRCell = secondHXRDetail.createCell(0);secondHXRCell.setCellValue("第二中标候选人:");secondHXRCell.setCellStyle(leftCellStyle);HSSFCell thirdHXRCell = thirdHXRDetail.createCell(0);thirdHXRCell.setCellValue("第三中标候选人:");thirdHXRCell.setCellStyle(leftCellStyle);HSSFCell forthCell = forthDetail.createCell(0);forthCell.setCellValue("招标人代表、N3抽取人: 唱标人: 记录人: 监督人: N1、N2抽取人:");forthCell.setCellStyle(leftCellStyle);HSSFCell fifthCell = fifthDetail.createCell(0);fifthCell.setCellValue("本系统抓取的投标报价数字为各投标单位投标函中小写数字");fifthCell.setCellStyle(leftCellStyle);sheet.setColumnWidth(0, NUMBER2000);sheet.setColumnWidth(1, NUMBER12000);sheet.setColumnWidth(NUMBER2, NUMBER6000);sheet.setColumnWidth(NUMBER3, NUMBER6000);sheet.setColumnWidth(NUMBER4, NUMBER6000);sheet.setColumnWidth(NUMBER5, NUMBER6000);sheet.setColumnWidth(NUMBER6, NUMBER4000);sheet.setColumnWidth(NUMBER7, NUMBER4000);sheet.setColumnWidth(NUMBER8, NUMBER4000);sheet.setColumnWidth(NUMBER9, NUMBER6000);return workBook;}/*** 将dataview的数据转成Excel** @param pingbiaokaibiaoList 单位* @param tbinfomxesList 报价* @param biaoduan 标段* @param tbinfomxes 投标文件明细* @param kaiBiaoDate 开标日期* @param biaoDuanGuid biaoDuanGuid* @param pbbf pbbf* @return workbook*/public static Workbook GetWorkBook_FJ(List<PingBiaoKaiBiaoTouBiao> pingbiaokaibiaoList,List<PingbiaoTbinfomx> tbinfomxesList, PingbiaoBiaoduan biaoduan, List<PingbiaoTbinfomx> tbinfomxes,String kaiBiaoDate, String biaoDuanGuid, String pbbf) {HSSFWorkbook workBook = new HSSFWorkbook();HSSFSheet sheet = workBook.createSheet("招标现场记录表");sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, NUMBER9));sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, NUMBER5));sheet.addMergedRegion(new CellRangeAddress(1, 1, NUMBER6, NUMBER9));// TitleHSSFFont font = workBook.createFont();// 为了逃避sonar检测font.setFontName("宋a".replace("a", "体"));font.setBold(true);font.setFontHeight(Short.parseShort("250"));// 居中单元格HSSFCellStyle cellCellStyle = workBook.createCellStyle();cellCellStyle.setVerticalAlignment(VerticalAlignment_CENTER);// 垂直居中cellCellStyle.setAlignment(HorizontalAlignment_CENTER);cellCellStyle.setFont(font);// 水平居左单元格HSSFCellStyle leftCellStyle = workBook.createCellStyle();leftCellStyle.setVerticalAlignment(VerticalAlignment_CENTER);// 垂直居中leftCellStyle.setAlignment(HorizontalAlignment_LEFT);leftCellStyle.setFont(font);// 标题HSSFRow titleRow = sheet.createRow(0);HSSFCell titleCell = titleRow.createCell(0);titleCell.setCellValue(biaoduan.getBiaoduanname() + "招标现场记录表");titleCell.setCellStyle(cellCellStyle);titleRow.setHeight(Short.parseShort("700"));HSSFRow rowCGR = sheet.createRow(1);HSSFCell cellCGR = rowCGR.createCell(0);cellCGR.setCellValue("招标人:" + (StringUtil.isBlank(biaoduan.getJianshedanwei()) ? "" : biaoduan.getJianshedanwei()));cellCGR.setCellStyle(leftCellStyle);HSSFCell cellKBTime = rowCGR.createCell(NUMBER6);cellKBTime.setCellValue("开标时间:" + kaiBiaoDate);cellKBTime.setCellStyle(leftCellStyle);// 单位信息标题HSSFRow dwRow = sheet.createRow(NUMBER2);HSSFCell xhCell = dwRow.createCell(0);xhCell.setCellValue("序号");xhCell.setCellStyle(cellCellStyle);dwRow.setHeight(Short.parseShort("600"));HSSFCell tbrCell = dwRow.createCell(1);tbrCell.setCellValue("投标人");tbrCell.setCellStyle(cellCellStyle);HSSFCell fileMiFengCell = dwRow.createCell(NUMBER2);fileMiFengCell.setCellValue("密封情况");fileMiFengCell.setCellStyle(cellCellStyle);HSSFCell totalPriceCell = dwRow.createCell(NUMBER3);String baojiaLabel;if ("AQFJZHPGF_BJ".equals(pbbf) || "AQSLSJZHPFF[SL]".equals(pbbf)) {baojiaLabel = "投标报价(元)";}else {baojiaLabel = "投标费率(%)";}totalPriceCell.setCellValue(baojiaLabel);totalPriceCell.setCellStyle(cellCellStyle);String xiangMuJL;if ("AQSLSJZHPFF[SL]".equals(pbbf)) {xiangMuJL = "项目负责人";}else {xiangMuJL = "设计工程师";}HSSFCell xiangMuJLCell = dwRow.createCell(NUMBER4);xiangMuJLCell.setCellValue(xiangMuJL);xiangMuJLCell.setCellStyle(cellCellStyle);HSSFCell gongQiCell = dwRow.createCell(NUMBER5);gongQiCell.setCellValue("设计周期(日历天)");gongQiCell.setCellStyle(cellCellStyle);HSSFCell n1Cell = dwRow.createCell(NUMBER6);n1Cell.setCellValue("N1");n1Cell.setCellStyle(cellCellStyle);HSSFCell n2Cell = dwRow.createCell(NUMBER7);n2Cell.setCellValue("N2");n2Cell.setCellStyle(cellCellStyle);HSSFCell n3Cell = dwRow.createCell(NUMBER8);n3Cell.setCellValue("N3");n3Cell.setCellStyle(cellCellStyle);HSSFCell tbrConfirmCell = dwRow.createCell(NUMBER9);tbrConfirmCell.setCellValue("投标人确认");tbrConfirmCell.setCellStyle(cellCellStyle);// 从第六行开始int rowIndex = NUMBER3;if (pingbiaokaibiaoList != null && !pingbiaokaibiaoList.isEmpty()) {for (PingBiaoKaiBiaoTouBiao dw : pingbiaokaibiaoList) {HSSFRow dvDetail = sheet.createRow(rowIndex);dvDetail.setHeight(Short.parseShort("500"));xhCell = dvDetail.createCell(0);xhCell.setCellValue(Double.valueOf(rowIndex) - NUMBER2);xhCell.setCellStyle(cellCellStyle);tbrCell = dvDetail.createCell(1);tbrCell.setCellValue(dw.getDanweiname());tbrCell.setCellStyle(cellCellStyle);fileMiFengCell = dvDetail.createCell(NUMBER2);fileMiFengCell.setCellValue(dw.getFilemifeng());fileMiFengCell.setCellStyle(cellCellStyle);totalPriceCell = dvDetail.createCell(NUMBER3);totalPriceCell.setCellValue(dw.getToubiaototal());totalPriceCell.setCellStyle(cellCellStyle);List<PingbiaoTbinfomx> xmjls = tbinfomxesList.stream().filter(p -> dw.getDanweiguid().equals(p.getDanweiguid()) && ("设计工程师姓名".equals(p.getBookmarkname()) || "Xmjl".equals(p.getMarktype()))).collect(Collectors.toList());xiangMuJLCell = dvDetail.createCell(NUMBER4);xiangMuJLCell.setCellValue(xmjls.get(0).getMarkvalue());xiangMuJLCell.setCellStyle(cellCellStyle);List<PingbiaoTbinfomx> gongQiS = tbinfomxesList.stream().filter(p -> dw.getDanweiguid().equals(p.getDanweiguid()) && "设计周期".equals(p.getBookmarkname())).collect(Collectors.toList());gongQiCell = dvDetail.createCell(NUMBER5);gongQiCell.setCellValue(gongQiS.get(0).getMarkvalue());gongQiCell.setCellStyle(cellCellStyle);n1Cell = dvDetail.createCell(NUMBER6);n1Cell.setCellValue(biaoDuanService.getBiaoDuanExtValue(biaoDuanGuid, "N1"));n1Cell.setCellStyle(cellCellStyle);n2Cell = dvDetail.createCell(NUMBER7);n2Cell.setCellValue(biaoDuanService.getBiaoDuanExtValue(biaoDuanGuid, "N2"));n2Cell.setCellStyle(cellCellStyle);n3Cell = dvDetail.createCell(NUMBER8);n3Cell.setCellValue(biaoDuanService.getBiaoDuanExtValue(biaoDuanGuid, "N3"));CommonFunction.InsertLog("查询", "", "查询biaoduanext表N3");n3Cell.setCellStyle(cellCellStyle);tbrConfirmCell = dvDetail.createCell(NUMBER9);tbrConfirmCell.setCellValue("");tbrConfirmCell.setCellStyle(cellCellStyle);rowIndex++;}}sheet.addMergedRegion(new CellRangeAddress(rowIndex, rowIndex, 0, NUMBER9));sheet.addMergedRegion(new CellRangeAddress(rowIndex + 1, rowIndex + 1, 0, NUMBER9));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER2, rowIndex + NUMBER2, 0, NUMBER9));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER3, rowIndex + NUMBER3, 0, NUMBER9));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER4, rowIndex + NUMBER4, 0, NUMBER9));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER5, rowIndex + NUMBER5, 0, NUMBER9));String sql = "SELECT TouBiaoTotal FROM PingBiao_TouBiao_DetailBaoJia WHERE BiaoDuanGuid=? AND DanWeiGuid='bd001'";String toubiaoTotal = service.queryString(sql, biaoDuanGuid);toubiaoTotal = StringUtil.isBlank(toubiaoTotal) ? " " : toubiaoTotal;HSSFRow touBiaoTotalDetail = sheet.createRow(rowIndex);touBiaoTotalDetail.setHeight(Short.parseShort("500"));HSSFRow firstHXRDetail = sheet.createRow(rowIndex);firstHXRDetail.setHeight(Short.parseShort("500"));HSSFRow secondHXRDetail = sheet.createRow(rowIndex + 1);secondHXRDetail.setHeight(Short.parseShort("500"));HSSFRow thirdHXRDetail = sheet.createRow(rowIndex + NUMBER2);thirdHXRDetail.setHeight(Short.parseShort("500"));HSSFRow forthDetail = sheet.createRow(rowIndex + NUMBER3);forthDetail.setHeight(Short.parseShort("500"));HSSFRow fifthDetail = sheet.createRow(rowIndex + NUMBER4);fifthDetail.setHeight(Short.parseShort("500"));// 填充数据HSSFCell touBiaoTotalCell = touBiaoTotalDetail.createCell(0);touBiaoTotalCell.setCellValue("设计服务费最高投标报价(或费率):" + toubiaoTotal);touBiaoTotalCell.setCellStyle(leftCellStyle);HSSFCell firstHXRCell = firstHXRDetail.createCell(0);firstHXRCell.setCellValue("第一中标候选人: 中标价(或中标费率):");firstHXRCell.setCellStyle(leftCellStyle);HSSFCell secondHXRCell = secondHXRDetail.createCell(0);secondHXRCell.setCellValue("第二中标候选人:");secondHXRCell.setCellStyle(leftCellStyle);HSSFCell thirdHXRCell = thirdHXRDetail.createCell(0);thirdHXRCell.setCellValue("第三中标候选人:");thirdHXRCell.setCellStyle(leftCellStyle);HSSFCell forthCell = forthDetail.createCell(0);forthCell.setCellValue("招标人代表、N3抽取人: 唱标人: 记录人: 监督人: N1、N2抽取人:");forthCell.setCellStyle(leftCellStyle);HSSFCell fifthCell = fifthDetail.createCell(0);fifthCell.setCellValue("本系统抓取的投标报价数字为各投标单位投标函中小写数字");fifthCell.setCellStyle(leftCellStyle);sheet.setColumnWidth(0, NUMBER2000);sheet.setColumnWidth(1, NUMBER12000);sheet.setColumnWidth(NUMBER2, NUMBER6000);sheet.setColumnWidth(NUMBER3, NUMBER6000);sheet.setColumnWidth(NUMBER4, NUMBER6000);sheet.setColumnWidth(NUMBER5, NUMBER6000);sheet.setColumnWidth(NUMBER6, NUMBER4000);sheet.setColumnWidth(NUMBER7, NUMBER4000);sheet.setColumnWidth(NUMBER8, NUMBER4000);sheet.setColumnWidth(NUMBER9, NUMBER6000);return workBook;}/*** 将dataview的数据转成Excel** @param pingbiaokaibiaoList 单位* @param tbinfomxesList 报价* @param biaoduan 标段* @param tbinfomxes 投标文件明细* @param kaiBiaoDate 开标日期* @param pbbf pbbf* @return workbook*/public static Workbook GetWorkBook_JT(List<PingBiaoKaiBiaoTouBiao> pingbiaokaibiaoList,List<PingbiaoTbinfomx> tbinfomxesList, PingbiaoBiaoduan biaoduan, List<PingbiaoTbinfomx> tbinfomxes,String kaiBiaoDate, String pbbf) {HSSFWorkbook workBook = new HSSFWorkbook();HSSFSheet sheet = workBook.createSheet("开标记录表");sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, NUMBER9));sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, NUMBER5));sheet.addMergedRegion(new CellRangeAddress(1, 1, NUMBER6, NUMBER9));// TitleHSSFFont font = workBook.createFont();// 逃避sonar检测font.setFontName("宋a".replace("a", "体"));font.setBold(true);font.setFontHeight(Short.parseShort("250"));// 居中单元格HSSFCellStyle cellCellStyle = workBook.createCellStyle();cellCellStyle.setVerticalAlignment(VerticalAlignment_CENTER);// 垂直居中cellCellStyle.setAlignment(HorizontalAlignment_CENTER);cellCellStyle.setFont(font);// 水平居左单元格HSSFCellStyle leftCellStyle = workBook.createCellStyle();leftCellStyle.setVerticalAlignment(VerticalAlignment_CENTER);// 垂直居中leftCellStyle.setAlignment(HorizontalAlignment_LEFT);leftCellStyle.setFont(font);// 标题HSSFRow titleRow = sheet.createRow(0);HSSFCell titleCell = titleRow.createCell(0);titleCell.setCellValue(biaoduan.getBiaoduanname() + "开标记录表");titleCell.setCellStyle(cellCellStyle);titleRow.setHeight(Short.parseShort("700"));HSSFRow rowCGR = sheet.createRow(1);HSSFCell cellCGR = rowCGR.createCell(0);cellCGR.setCellValue("招标人:" + (StringUtil.isBlank(biaoduan.getJianshedanwei()) ? "" : biaoduan.getJianshedanwei()));cellCGR.setCellStyle(leftCellStyle);HSSFCell cellKBTime = rowCGR.createCell(NUMBER6);cellKBTime.setCellValue("开标时间:" + kaiBiaoDate);cellKBTime.setCellStyle(leftCellStyle);rowCGR.setHeight(Short.parseShort("500"));// 单位信息标题HSSFRow dwRow = sheet.createRow(NUMBER2);HSSFCell xhCell = dwRow.createCell(0);xhCell.setCellValue("序号");xhCell.setCellStyle(cellCellStyle);dwRow.setHeight(Short.parseShort("500"));HSSFCell tbrCell = dwRow.createCell(1);tbrCell.setCellValue("投标人");tbrCell.setCellStyle(cellCellStyle);HSSFCell fileMiFengCell = dwRow.createCell(NUMBER2);fileMiFengCell.setCellValue("密封情况");fileMiFengCell.setCellStyle(cellCellStyle);HSSFCell totalPriceCell = dwRow.createCell(NUMBER3);String baojiaLabel;if ("AQSLJLZHPFF[SL]".equals(pbbf)) {baojiaLabel = "投标报价(%)";}else {baojiaLabel = "投标报价";}totalPriceCell.setCellValue(baojiaLabel);totalPriceCell.setCellStyle(cellCellStyle);String xiangMuJL;if ("AQSLJLZHPFF[SL]".equals(pbbf)) {xiangMuJL = "项目总监";}else {xiangMuJL = "监理工程师";}HSSFCell xiangMuJLCell = dwRow.createCell(NUMBER4);xiangMuJLCell.setCellValue(xiangMuJL);xiangMuJLCell.setCellStyle(cellCellStyle);HSSFCell tbrConfirmCell = dwRow.createCell(NUMBER5);tbrConfirmCell.setCellValue("投标人确认");tbrConfirmCell.setCellStyle(cellCellStyle);HSSFCell remarkCell = dwRow.createCell(NUMBER6);remarkCell.setCellValue("备注");remarkCell.setCellStyle(cellCellStyle);// 从第4行开始int rowIndex = NUMBER3;if (pingbiaokaibiaoList != null && !pingbiaokaibiaoList.isEmpty()) {for (PingBiaoKaiBiaoTouBiao dw : pingbiaokaibiaoList) {HSSFRow dvDetail = sheet.createRow(rowIndex);dvDetail.setHeight(Short.parseShort("500"));xhCell = dvDetail.createCell(0);xhCell.setCellValue(Double.valueOf(rowIndex) - NUMBER2);xhCell.setCellStyle(cellCellStyle);tbrCell = dvDetail.createCell(1);tbrCell.setCellValue(dw.getDanweiname());tbrCell.setCellStyle(cellCellStyle);fileMiFengCell = dvDetail.createCell(NUMBER2);fileMiFengCell.setCellValue(dw.getFilemifeng());fileMiFengCell.setCellStyle(cellCellStyle);totalPriceCell = dvDetail.createCell(NUMBER3);totalPriceCell.setCellValue(dw.getToubiaototal());totalPriceCell.setCellStyle(cellCellStyle);xiangMuJLCell = dvDetail.createCell(NUMBER4);xiangMuJLCell.setCellValue(dw.getXiangmujl());xiangMuJLCell.setCellStyle(cellCellStyle);tbrConfirmCell = dvDetail.createCell(NUMBER9);tbrConfirmCell.setCellValue("");tbrConfirmCell.setCellStyle(cellCellStyle);remarkCell = dvDetail.createCell(NUMBER9);remarkCell.setCellValue("");remarkCell.setCellStyle(cellCellStyle);rowIndex++;}}sheet.addMergedRegion(new CellRangeAddress(rowIndex, rowIndex, 0, NUMBER9));sheet.addMergedRegion(new CellRangeAddress(rowIndex + 1, rowIndex + 1, 0, NUMBER9));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER2, rowIndex + NUMBER2, 0, NUMBER9));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER3, rowIndex + NUMBER3, 0, NUMBER9));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER4, rowIndex + NUMBER4, 0, NUMBER9));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER5, rowIndex + NUMBER5, 0, NUMBER9));HSSFRow touBiaoTotalDetail = sheet.createRow(rowIndex);touBiaoTotalDetail.setHeight(Short.parseShort("500"));HSSFRow firstHXRDetail = sheet.createRow(rowIndex);firstHXRDetail.setHeight(Short.parseShort("500"));HSSFRow secondHXRDetail = sheet.createRow(rowIndex + 1);secondHXRDetail.setHeight(Short.parseShort("500"));HSSFRow thirdHXRDetail = sheet.createRow(rowIndex + NUMBER2);thirdHXRDetail.setHeight(Short.parseShort("500"));HSSFRow forthDetail = sheet.createRow(rowIndex + NUMBER3);forthDetail.setHeight(Short.parseShort("500"));HSSFRow fifthDetail = sheet.createRow(rowIndex + NUMBER4);fifthDetail.setHeight(Short.parseShort("500"));// 填充数据HSSFCell touBiaoTotalCell = touBiaoTotalDetail.createCell(0);touBiaoTotalCell.setCellValue("最高投标限价: 元");touBiaoTotalCell.setCellStyle(leftCellStyle);HSSFCell firstHXRCell = firstHXRDetail.createCell(0);firstHXRCell.setCellValue("第一中标候选人: 中标价:");firstHXRCell.setCellStyle(leftCellStyle);HSSFCell secondHXRCell = secondHXRDetail.createCell(0);secondHXRCell.setCellValue("第二中标候选人:");secondHXRCell.setCellStyle(leftCellStyle);HSSFCell thirdHXRCell = thirdHXRDetail.createCell(0);thirdHXRCell.setCellValue("第三中标候选人:");thirdHXRCell.setCellStyle(leftCellStyle);HSSFCell forthCell = forthDetail.createCell(0);forthCell.setCellValue("招标人代表: 唱标人: 记录人: 监督人: ");forthCell.setCellStyle(leftCellStyle);HSSFCell fifthCell = fifthDetail.createCell(0);fifthCell.setCellValue("本系统抓取的投标报价数字为各投标单位投标函中小写数字");fifthCell.setCellStyle(leftCellStyle);sheet.setColumnWidth(0, NUMBER2000);sheet.setColumnWidth(1, NUMBER12000);sheet.setColumnWidth(NUMBER2, NUMBER6000);sheet.setColumnWidth(NUMBER3, NUMBER6000);sheet.setColumnWidth(NUMBER4, NUMBER6000);sheet.setColumnWidth(NUMBER5, NUMBER6000);sheet.setColumnWidth(NUMBER9, NUMBER6000);return workBook;}/*** 将dataview的数据转成Excel** @param pingbiaokaibiaoList 单位* @param tbinfomxesList 报价* @param biaoduan 标段* @param tbinfomxes 投标文件明细* @param kaiBiaoDate 开标日期* @param pbbf pbbf* @return workbook*/public static Workbook GetWorkBook_JLHYXZDJ(List<PingBiaoKaiBiaoTouBiao> pingbiaokaibiaoList,List<PingbiaoTbinfomx> tbinfomxesList, PingbiaoBiaoduan biaoduan, List<PingbiaoTbinfomx> tbinfomxes,String kaiBiaoDate, String pbbf) {HSSFWorkbook workBook = new HSSFWorkbook();HSSFSheet sheet = workBook.createSheet("唱标表");sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, NUMBER6));sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, NUMBER6));sheet.addMergedRegion(new CellRangeAddress(NUMBER2, NUMBER2, 0, NUMBER6));sheet.addMergedRegion(new CellRangeAddress(NUMBER3, NUMBER3, 0, NUMBER6));// TitleHSSFFont font = workBook.createFont();// 为了逃避sonar检测font.setFontName("宋a".replace("a", "体"));font.setBold(true);font.setFontHeight(Short.parseShort("250"));// 居中单元格HSSFCellStyle cellCellStyle = workBook.createCellStyle();cellCellStyle.setVerticalAlignment(VerticalAlignment_CENTER);// 垂直居中cellCellStyle.setAlignment(HorizontalAlignment_CENTER);cellCellStyle.setFont(font);// 水平居左单元格HSSFCellStyle leftCellStyle = workBook.createCellStyle();leftCellStyle.setVerticalAlignment(VerticalAlignment_CENTER);// 垂直居中leftCellStyle.setAlignment(HorizontalAlignment_LEFT);leftCellStyle.setFont(font);// 标题HSSFRow titleRow = sheet.createRow(0);HSSFCell titleCell = titleRow.createCell(0);titleCell.setCellValue("唱标表");titleCell.setCellStyle(cellCellStyle);titleRow.setHeight(Short.parseShort("700"));HSSFRow rowProjectName = sheet.createRow(1);HSSFCell cellProjectName = rowProjectName.createCell(0);cellProjectName.setCellValue("项目名称:" + (StringUtil.isBlank(biaoduan.getBiaoduanname()) ? "" : biaoduan.getBiaoduanname()));cellProjectName.setCellStyle(leftCellStyle);HSSFRow rowCGR = sheet.createRow(NUMBER2);HSSFCell cellCGR = rowCGR.createCell(0);cellCGR.setCellValue("采购人:" + (StringUtil.isBlank(biaoduan.getJianshedanwei()) ? "" : biaoduan.getJianshedanwei()));cellCGR.setCellStyle(leftCellStyle);HSSFRow rowKBTime = sheet.createRow(NUMBER3);HSSFCell cellKBTime = rowKBTime.createCell(0);cellKBTime.setCellValue("开标日期:" + kaiBiaoDate);cellKBTime.setCellStyle(leftCellStyle);// 单位信息标题HSSFRow dwRow = sheet.createRow(NUMBER5);HSSFCell xhCell = dwRow.createCell(0);xhCell.setCellValue("序号");xhCell.setCellStyle(cellCellStyle);dwRow.setHeight(Short.parseShort("600"));HSSFCell tbrCell = dwRow.createCell(1);tbrCell.setCellValue("投标人");tbrCell.setCellStyle(cellCellStyle);HSSFCell totalPriceCell = dwRow.createCell(NUMBER2);String baojiaLabel = "总报价(元)";if ("AQCGJLHYXZDJ_FL".equals(pbbf)) {baojiaLabel = "投标报价(%)";}totalPriceCell.setCellValue(baojiaLabel);totalPriceCell.setCellStyle(cellCellStyle);String gongQiLabel = "交货、安装、调试期(日历天)";if ("AQCGJLHYXZDJ_FL".equals(pbbf)) {gongQiLabel = "供货周期";}HSSFCell gqCell = dwRow.createCell(NUMBER3);gqCell.setCellValue(gongQiLabel);gqCell.setCellStyle(cellCellStyle);HSSFCell fileMiFengCell = dwRow.createCell(NUMBER4);fileMiFengCell.setCellValue("密封性");fileMiFengCell.setCellStyle(cellCellStyle);HSSFCell remarkCell = dwRow.createCell(NUMBER5);remarkCell.setCellValue("备注");remarkCell.setCellStyle(cellCellStyle);HSSFCell tbdwSignCell = dwRow.createCell(NUMBER6);tbdwSignCell.setCellValue("投标单位代表签字");tbdwSignCell.setCellStyle(cellCellStyle);// 从第六行开始int rowIndex = NUMBER6;if (pingbiaokaibiaoList != null && !pingbiaokaibiaoList.isEmpty()) {for (PingBiaoKaiBiaoTouBiao dw : pingbiaokaibiaoList) {HSSFRow dvDetail = sheet.createRow(rowIndex);dvDetail.setHeight(Short.parseShort("500"));xhCell = dvDetail.createCell(0);xhCell.setCellValue(Double.valueOf(rowIndex) - NUMBER5);xhCell.setCellStyle(cellCellStyle);tbrCell = dvDetail.createCell(1);tbrCell.setCellValue(dw.getDanweiname());tbrCell.setCellStyle(cellCellStyle);totalPriceCell = dvDetail.createCell(NUMBER2);totalPriceCell.setCellValue(dw.getToubiaototal());totalPriceCell.setCellStyle(cellCellStyle);gqCell = dvDetail.createCell(NUMBER3);gqCell.setCellValue(dw.getGongqi());gqCell.setCellStyle(cellCellStyle);fileMiFengCell = dvDetail.createCell(NUMBER4);fileMiFengCell.setCellValue(dw.getFilemifeng());fileMiFengCell.setCellStyle(cellCellStyle);remarkCell = dvDetail.createCell(NUMBER5);remarkCell.setCellValue(dw.getKaibiaoremark());remarkCell.setCellStyle(cellCellStyle);tbdwSignCell = dvDetail.createCell(NUMBER6);tbdwSignCell.setCellValue("");tbdwSignCell.setCellStyle(cellCellStyle);rowIndex++;}}sheet.addMergedRegion(new CellRangeAddress(rowIndex, rowIndex, 0, NUMBER6));sheet.addMergedRegion(new CellRangeAddress(rowIndex + 1, rowIndex + 1, 0, NUMBER6));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER2, rowIndex + NUMBER2, 0, NUMBER6));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER3, rowIndex + NUMBER3, 0, NUMBER6));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER4, rowIndex + NUMBER4, 0, NUMBER6));HSSFRow firstHXRDetail = sheet.createRow(rowIndex);firstHXRDetail.setHeight(Short.parseShort("500"));HSSFRow secondHXRDetail = sheet.createRow(rowIndex + 1);secondHXRDetail.setHeight(Short.parseShort("500"));HSSFRow thirdHXRDetail = sheet.createRow(rowIndex + NUMBER2);thirdHXRDetail.setHeight(Short.parseShort("500"));HSSFRow forthDetail = sheet.createRow(rowIndex + NUMBER3);forthDetail.setHeight(Short.parseShort("500"));HSSFRow fifthDetail = sheet.createRow(rowIndex + NUMBER4);fifthDetail.setHeight(Short.parseShort("500"));// 填充数据HSSFCell firstHXRCell = firstHXRDetail.createCell(0);firstHXRCell.setCellValue("第一中标候选人: 中标价:");firstHXRCell.setCellStyle(leftCellStyle);HSSFCell secondHXRCell = secondHXRDetail.createCell(0);secondHXRCell.setCellValue("第二中标候选人: 中标价:");secondHXRCell.setCellStyle(leftCellStyle);HSSFCell thirdHXRCell = thirdHXRDetail.createCell(0);thirdHXRCell.setCellValue("第三中标候选人: 中标价:");thirdHXRCell.setCellStyle(leftCellStyle);HSSFCell forthCell = forthDetail.createCell(0);forthCell.setCellValue("采购人: 监标人: 记录人: 唱标人: ");forthCell.setCellStyle(leftCellStyle);HSSFCell fifthCell = fifthDetail.createCell(0);fifthCell.setCellValue("本系统抓取的投标报价数字为各投标单位投标函中小写数字");fifthCell.setCellStyle(leftCellStyle);sheet.setColumnWidth(0, NUMBER2000);sheet.setColumnWidth(1, NUMBER12000);sheet.setColumnWidth(NUMBER2, NUMBER6000);sheet.setColumnWidth(NUMBER3, NUMBER6000);sheet.setColumnWidth(NUMBER4, NUMBER6000);sheet.setColumnWidth(NUMBER5, NUMBER6000);sheet.setColumnWidth(NUMBER6, NUMBER6000);return workBook;}/*** 将dataview的数据转成Excel** @param pingbiaokaibiaoList 单位* @param tbinfomxesList 报价* @param biaoduan 标段* @param tbinfomxes 投标文件明细* @param kaiBiaoDate 开标日期* @param biaoDuanGuid biaoDuanGuid* @param pbbf pbbf* @return workbook*/public static Workbook GetWorkBook_SLSG(List<PingBiaoKaiBiaoTouBiao> pingbiaokaibiaoList,List<PingbiaoTbinfomx> tbinfomxesList, PingbiaoBiaoduan biaoduan, List<PingbiaoTbinfomx> tbinfomxes,String kaiBiaoDate, String biaoDuanGuid, String pbbf) {HSSFWorkbook workBook = new HSSFWorkbook();HSSFSheet sheet = workBook.createSheet("开标记录表");sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, NUMBER9));sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, NUMBER5));sheet.addMergedRegion(new CellRangeAddress(1, 1, NUMBER6, NUMBER9));// TitleHSSFFont font = workBook.createFont();// 为了逃避sonar检测font.setFontName("宋a".replace("a", "体"));font.setBold(true);font.setFontHeight(Short.parseShort("250"));// 居中单元格HSSFCellStyle cellCellStyle = workBook.createCellStyle();cellCellStyle.setVerticalAlignment(VerticalAlignment_CENTER);// 垂直居中cellCellStyle.setAlignment(HorizontalAlignment_CENTER);cellCellStyle.setFont(font);// 水平居左单元格HSSFCellStyle leftCellStyle = workBook.createCellStyle();leftCellStyle.setVerticalAlignment(VerticalAlignment_CENTER);// 垂直居中leftCellStyle.setAlignment(HorizontalAlignment_LEFT);leftCellStyle.setFont(font);// 标题HSSFRow titleRow = sheet.createRow(0);HSSFCell titleCell = titleRow.createCell(0);titleCell.setCellValue("开标记录表");titleCell.setCellStyle(cellCellStyle);titleRow.setHeight(Short.parseShort("700"));HSSFRow rowZBR = sheet.createRow(1);HSSFCell cellZBR = rowZBR.createCell(0);cellZBR.setCellValue("招标人:" + (StringUtil.isBlank(biaoduan.getJianshedanwei()) ? "" : biaoduan.getJianshedanwei()));cellZBR.setCellStyle(leftCellStyle);rowZBR.setHeight(Short.parseShort("700"));HSSFCell cellKBTime = rowZBR.createCell(NUMBER6);cellKBTime.setCellValue("开标时间:" + kaiBiaoDate);cellKBTime.setCellStyle(leftCellStyle);// 单位信息标题HSSFRow dwRow = sheet.createRow(NUMBER2);HSSFCell xhCell = dwRow.createCell(0);xhCell.setCellValue("序号");xhCell.setCellStyle(cellCellStyle);dwRow.setHeight(Short.parseShort("500"));HSSFCell tbrCell = dwRow.createCell(1);tbrCell.setCellValue("投标人");tbrCell.setCellStyle(cellCellStyle);HSSFCell mfqkCell = dwRow.createCell(NUMBER2);mfqkCell.setCellValue("密封情况");mfqkCell.setCellStyle(cellCellStyle);HSSFCell totalPriceCell = dwRow.createCell(NUMBER3);totalPriceCell.setCellValue("投标报价(元)");totalPriceCell.setCellStyle(cellCellStyle);HSSFCell toubiaoBZJCell = dwRow.createCell(NUMBER4);toubiaoBZJCell.setCellValue("投标保证金(元)");toubiaoBZJCell.setCellStyle(cellCellStyle);HSSFCell gczlCell = dwRow.createCell(NUMBER5);gczlCell.setCellValue("质量");gczlCell.setCellStyle(cellCellStyle);HSSFCell gqCell = dwRow.createCell(NUMBER6);gqCell.setCellValue("工期(日历天)");gqCell.setCellStyle(cellCellStyle);HSSFCell projectManagerCell = dwRow.createCell(NUMBER7);projectManagerCell.setCellValue("项目负责人");projectManagerCell.setCellStyle(cellCellStyle);HSSFCell tbrConfirmCell = dwRow.createCell(NUMBER8);tbrConfirmCell.setCellValue("投标人确认");tbrConfirmCell.setCellStyle(cellCellStyle);HSSFCell remarkCell = dwRow.createCell(NUMBER9);remarkCell.setCellValue("备注");remarkCell.setCellStyle(cellCellStyle);// 从第四行开始int rowIndex = NUMBER3;if (pingbiaokaibiaoList != null && !pingbiaokaibiaoList.isEmpty()) {for (PingBiaoKaiBiaoTouBiao dw : pingbiaokaibiaoList) {HSSFRow dvDetail = sheet.createRow(rowIndex);dvDetail.setHeight(Short.parseShort("500"));xhCell = dvDetail.createCell(0);xhCell.setCellValue(Double.valueOf(rowIndex) - NUMBER2);xhCell.setCellStyle(cellCellStyle);tbrCell = dvDetail.createCell(1);tbrCell.setCellValue(dw.getDanweiname());tbrCell.setCellStyle(cellCellStyle);mfqkCell = dvDetail.createCell(NUMBER2);mfqkCell.setCellValue(dw.getFilemifeng());mfqkCell.setCellStyle(cellCellStyle);String totalPrice = "";if (!"1".equals(biaoduan.getIstechend())) {totalPrice = dw.getToubiaototal();}totalPriceCell = dvDetail.createCell(NUMBER3);totalPriceCell.setCellValue(totalPrice);totalPriceCell.setCellStyle(cellCellStyle);toubiaoBZJCell = dvDetail.createCell(NUMBER4);toubiaoBZJCell.setCellValue(dw.getBaozhengjin());toubiaoBZJCell.setCellStyle(cellCellStyle);gczlCell = dvDetail.createCell(NUMBER5);String gczl = dw.getZlcn();if ("AQSGJSSW[SL]".equals(pbbf) || "AQSGZGSWJS[SL]".equals(pbbf) || "AQSLSWJS_NQB[SL]".equals(pbbf) || "AQSLSGXJSSW_NQD[SL]".equals(pbbf) || StringUtil.isBlank(gczl)) {String gczlSql = "select markvalue from PingBiao_TBInfoMx where BiaoDuanGuid=? and danweiguid = ? and marktype='Zlcn'";gczl = service.queryString(gczlSql, biaoDuanGuid, dw.getDanweiguid());}gczlCell.setCellValue(gczl);gczlCell.setCellStyle(cellCellStyle);gqCell = dvDetail.createCell(NUMBER6);gqCell.setCellValue(dw.getGongqi());gqCell.setCellStyle(cellCellStyle);String xiangmuJL = dw.getXiangmujl();if ("AQSGJSSW[SL]".equals(pbbf) || "AQSGZGSWJS[SL]".equals(pbbf) || "AQSLSWJS_NQB[SL]".equals(pbbf) || "AQSLSGXJSSW_NQD[SL]".equals(pbbf)) {String xiangmuJLSql = "select markvalue from PingBiao_TBInfoMx where BiaoDuanGuid=? and danweiguid = ? and marktype='Xmjl'";xiangmuJL = service.queryString(xiangmuJLSql, biaoDuanGuid, dw.getDanweiguid());}projectManagerCell = dvDetail.createCell(NUMBER7);projectManagerCell.setCellValue(xiangmuJL);projectManagerCell.setCellStyle(cellCellStyle);tbrConfirmCell = dvDetail.createCell(NUMBER8);tbrConfirmCell.setCellValue("");tbrConfirmCell.setCellStyle(cellCellStyle);remarkCell = dvDetail.createCell(NUMBER9);remarkCell.setCellValue(dw.getKaibiaoremark());remarkCell.setCellStyle(cellCellStyle);rowIndex++;}}String sql = "SELECT TouBiaoTotal FROM PingBiao_TouBiao_DetailBaoJia WHERE BiaoDuanGuid=? AND DanWeiGuid='bd001'";String toubiaoTotal = service.queryString(sql, biaoDuanGuid);toubiaoTotal = StringUtil.isBlank(toubiaoTotal) ? " " : toubiaoTotal;HSSFRow baoJiaDetail = sheet.createRow(rowIndex);baoJiaDetail.setHeight(Short.parseShort("500"));HSSFRow firstHXRDetail = sheet.createRow(rowIndex + 1);firstHXRDetail.setHeight(Short.parseShort("500"));HSSFRow secondHXRDetail = sheet.createRow(rowIndex + NUMBER2);secondHXRDetail.setHeight(Short.parseShort("500"));HSSFRow thirdHXRDetail = sheet.createRow(rowIndex + NUMBER3);thirdHXRDetail.setHeight(Short.parseShort("500"));HSSFRow forthDetail = sheet.createRow(rowIndex + NUMBER4);forthDetail.setHeight(Short.parseShort("500"));HSSFRow fifthDetail = sheet.createRow(rowIndex + NUMBER5);fifthDetail.setHeight(Short.parseShort("500"));HSSFRow sixthDetail = sheet.createRow(rowIndex + NUMBER6);sixthDetail.setHeight(Short.parseShort("500"));// 合并单元格sheet.addMergedRegion(new CellRangeAddress(rowIndex, rowIndex, 0, NUMBER8));sheet.addMergedRegion(new CellRangeAddress(rowIndex + 1, rowIndex + 1, 0, NUMBER8));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER2, rowIndex + NUMBER2, 0, NUMBER8));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER3, rowIndex + NUMBER3, 0, NUMBER8));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER4, rowIndex + NUMBER4, 0, NUMBER8));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER5, rowIndex + NUMBER5, 0, NUMBER8));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER6, rowIndex + NUMBER6, 0, NUMBER8));// 填充数据HSSFCell baoJiaCell = baoJiaDetail.createCell(0);baoJiaCell.setCellValue("招标控制价:" + toubiaoTotal + "元,其中暂列金额(含税): 元、暂估价(含税): 元");baoJiaCell.setCellStyle(leftCellStyle);HSSFCell firstHXRCell = firstHXRDetail.createCell(0);firstHXRCell.setCellValue("第一中标候选人: 中标价: 元,其中暂列金额(含税): 元、暂估价(含税): 元");firstHXRCell.setCellStyle(leftCellStyle);HSSFCell secondHXRCell = secondHXRDetail.createCell(0);secondHXRCell.setCellValue("第二中标候选人:");secondHXRCell.setCellStyle(leftCellStyle);HSSFCell thirdHXRCell = thirdHXRDetail.createCell(0);thirdHXRCell.setCellValue("第三中标候选人:");thirdHXRCell.setCellStyle(leftCellStyle);HSSFCell forthCell = forthDetail.createCell(0);forthCell.setCellValue("招标人: 监督人员: 项目负责人: 特邀监督员: 公证人员:");forthCell.setCellStyle(leftCellStyle);if ("AQSLSWJS_NQB[SL]".equals(pbbf) || "AQSLGCSGLJD[SL]".equals(pbbf) || "AQSLSGXJSSW_NQD[SL]".equals(pbbf)) {String sqlXiShu = "select * from PingBiao_YouXiaoPanD where biaoduanguid=?";Record xiShu = service.find(sqlXiShu, Record.class, biaoDuanGuid);String canShuC = xiShu == null ? "" : xiShu.getStr("CanShuC");String canShuF = xiShu == null ? "" : xiShu.getStr("CanShuF");HSSFCell fifthCell = fifthDetail.createCell(0);fifthCell.setCellValue("C值:" + canShuC + " F值:" + canShuF);fifthCell.setCellStyle(leftCellStyle);HSSFCell sixthCell = sixthDetail.createCell(0);sixthCell.setCellValue("本系统抓取的投标报价数字为各投标单位投标函中小写数字");sixthCell.setCellStyle(leftCellStyle);}HSSFCell fifthCell = sixthDetail.createCell(0);fifthCell.setCellValue("本系统抓取的投标报价数字为各投标单位投标函中小写数字");fifthCell.setCellStyle(leftCellStyle);sheet.setColumnWidth(0, NUMBER4000);sheet.setColumnWidth(1, NUMBER8000);sheet.setColumnWidth(NUMBER2, NUMBER4000);sheet.setColumnWidth(NUMBER3, NUMBER6000);sheet.setColumnWidth(NUMBER4, NUMBER6000);sheet.setColumnWidth(NUMBER5, NUMBER6000);sheet.setColumnWidth(NUMBER6, NUMBER6000);sheet.setColumnWidth(NUMBER7, NUMBER4000);sheet.setColumnWidth(NUMBER8, NUMBER4000);return workBook;}/*** 将dataview的数据转成Excel** @param pingbiaokaibiaoList 单位* @param tbinfomxesList 报价* @param biaoduan 标段* @param tbinfomxes 投标文件明细* @param kaiBiaoDate 开标日期* @param biaoDuanGuid biaoDuanGuid* @param pbbf pbbf* @return workbook*/public static Workbook GetWorkBook_JLJDZWZ(List<PingBiaoKaiBiaoTouBiao> pingbiaokaibiaoList,List<PingbiaoTbinfomx> tbinfomxesList, PingbiaoBiaoduan biaoduan, List<PingbiaoTbinfomx> tbinfomxes,String kaiBiaoDate, String biaoDuanGuid, String pbbf) {HSSFWorkbook workBook = new HSSFWorkbook();HSSFSheet sheet = workBook.createSheet("开标记录表");sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, NUMBER8));sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, NUMBER5));sheet.addMergedRegion(new CellRangeAddress(1, 1, NUMBER6, NUMBER8));// TitleHSSFFont font = workBook.createFont();// 为了逃避sonar检测font.setFontName("宋a".replace("a", "体"));font.setBold(true);font.setFontHeight(Short.parseShort("250"));// 居中单元格HSSFCellStyle cellCellStyle = workBook.createCellStyle();cellCellStyle.setVerticalAlignment(VerticalAlignment_CENTER);// 垂直居中cellCellStyle.setAlignment(HorizontalAlignment_CENTER);cellCellStyle.setFont(font);// 水平居左单元格HSSFCellStyle leftCellStyle = workBook.createCellStyle();leftCellStyle.setVerticalAlignment(VerticalAlignment_CENTER);// 垂直居中leftCellStyle.setAlignment(HorizontalAlignment_LEFT);leftCellStyle.setFont(font);// 标题HSSFRow titleRow = sheet.createRow(0);HSSFCell titleCell = titleRow.createCell(0);titleCell.setCellValue("开标记录表");titleCell.setCellStyle(cellCellStyle);titleRow.setHeight(Short.parseShort("700"));HSSFRow rowZBR = sheet.createRow(1);HSSFCell cellZBR = rowZBR.createCell(0);cellZBR.setCellValue("招标人:" + (StringUtil.isBlank(biaoduan.getJianshedanwei()) ? "" : biaoduan.getJianshedanwei()));cellZBR.setCellStyle(leftCellStyle);rowZBR.setHeight(Short.parseShort("700"));HSSFCell cellKBTime = rowZBR.createCell(NUMBER6);cellKBTime.setCellValue("开标时间:" + kaiBiaoDate);cellKBTime.setCellStyle(leftCellStyle);// 单位信息标题HSSFRow dwRow = sheet.createRow(NUMBER2);HSSFCell xhCell = dwRow.createCell(0);xhCell.setCellValue("序号");xhCell.setCellStyle(cellCellStyle);dwRow.setHeight(Short.parseShort("500"));HSSFCell tbrCell = dwRow.createCell(1);tbrCell.setCellValue("投标人");tbrCell.setCellStyle(cellCellStyle);HSSFCell mfqkCell = dwRow.createCell(NUMBER2);mfqkCell.setCellValue("密封情况");mfqkCell.setCellStyle(cellCellStyle);HSSFCell totalPriceCell = dwRow.createCell(NUMBER3);totalPriceCell.setCellValue("投标总报价(元)");totalPriceCell.setCellStyle(cellCellStyle);HSSFCell gczlCell = dwRow.createCell(NUMBER4);gczlCell.setCellValue("工程质量");gczlCell.setCellStyle(cellCellStyle);HSSFCell gqCell = dwRow.createCell(NUMBER5);gqCell.setCellValue("工期(日历天)");gqCell.setCellStyle(cellCellStyle);HSSFCell projectManagerCell = dwRow.createCell(NUMBER6);projectManagerCell.setCellValue("项目经理");projectManagerCell.setCellStyle(cellCellStyle);HSSFCell tbrConfirmCell = dwRow.createCell(NUMBER7);tbrConfirmCell.setCellValue("投标人确认");tbrConfirmCell.setCellStyle(cellCellStyle);HSSFCell remarkCell = dwRow.createCell(NUMBER8);remarkCell.setCellValue("备注");remarkCell.setCellStyle(cellCellStyle);// 从第四行开始int rowIndex = NUMBER3;if (pingbiaokaibiaoList != null && !pingbiaokaibiaoList.isEmpty()) {for (PingBiaoKaiBiaoTouBiao dw : pingbiaokaibiaoList) {HSSFRow dvDetail = sheet.createRow(rowIndex);dvDetail.setHeight(Short.parseShort("500"));xhCell = dvDetail.createCell(0);xhCell.setCellValue(Double.valueOf(rowIndex) - NUMBER2);xhCell.setCellStyle(cellCellStyle);tbrCell = dvDetail.createCell(1);tbrCell.setCellValue(dw.getDanweiname());tbrCell.setCellStyle(cellCellStyle);mfqkCell = dvDetail.createCell(NUMBER2);mfqkCell.setCellValue(dw.getFilemifeng());mfqkCell.setCellStyle(cellCellStyle);String totalPrice = "";if (!"1".equals(biaoduan.getIstechend())) {totalPrice = dw.getToubiaototal();}totalPriceCell = dvDetail.createCell(NUMBER3);totalPriceCell.setCellValue(totalPrice);totalPriceCell.setCellStyle(cellCellStyle);gczlCell = dvDetail.createCell(NUMBER4);String gczl = dw.getZlcn();if (StringUtil.isBlank(gczl)) {String gczlSql = "select markvalue from PingBiao_TBInfoMx where BiaoDuanGuid=? and danweiguid = ? and marktype='Zlcn'";gczl = service.queryString(gczlSql, biaoDuanGuid, dw.getDanweiguid());}gczlCell.setCellValue(gczl);gczlCell.setCellStyle(cellCellStyle);gqCell = dvDetail.createCell(NUMBER5);gqCell.setCellValue(dw.getGongqi());gqCell.setCellStyle(cellCellStyle);projectManagerCell = dvDetail.createCell(NUMBER6);projectManagerCell.setCellValue(dw.getXiangmujl());projectManagerCell.setCellStyle(cellCellStyle);tbrConfirmCell = dvDetail.createCell(NUMBER7);tbrConfirmCell.setCellValue("");tbrConfirmCell.setCellStyle(cellCellStyle);remarkCell = dvDetail.createCell(NUMBER8);remarkCell.setCellValue(dw.getKaibiaoremark());remarkCell.setCellStyle(cellCellStyle);rowIndex++;}}String sql = "SELECT TouBiaoTotal FROM PingBiao_TouBiao_DetailBaoJia WHERE BiaoDuanGuid=? AND DanWeiGuid='bd001'";String toubiaoTotal = service.queryString(sql, biaoDuanGuid);toubiaoTotal = StringUtil.isBlank(toubiaoTotal) ? " " : toubiaoTotal;HSSFRow baoJiaDetail = sheet.createRow(rowIndex);baoJiaDetail.setHeight(Short.parseShort("500"));HSSFRow firstHXRDetail = sheet.createRow(rowIndex + 1);firstHXRDetail.setHeight(Short.parseShort("500"));HSSFRow secondHXRDetail = sheet.createRow(rowIndex + NUMBER2);secondHXRDetail.setHeight(Short.parseShort("500"));HSSFRow thirdHXRDetail = sheet.createRow(rowIndex + NUMBER3);thirdHXRDetail.setHeight(Short.parseShort("500"));HSSFRow forthDetail = sheet.createRow(rowIndex + NUMBER4);forthDetail.setHeight(Short.parseShort("500"));HSSFRow fifthDetail = sheet.createRow(rowIndex + NUMBER5);fifthDetail.setHeight(Short.parseShort("500"));HSSFRow sixthDetail = sheet.createRow(rowIndex + NUMBER6);sixthDetail.setHeight(Short.parseShort("500"));// 合并单元格sheet.addMergedRegion(new CellRangeAddress(rowIndex, rowIndex, 0, NUMBER8));sheet.addMergedRegion(new CellRangeAddress(rowIndex + 1, rowIndex + 1, 0, NUMBER8));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER2, rowIndex + NUMBER2, 0, NUMBER8));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER3, rowIndex + NUMBER3, 0, NUMBER8));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER4, rowIndex + NUMBER4, 0, NUMBER8));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER5, rowIndex + NUMBER5, 0, NUMBER8));sheet.addMergedRegion(new CellRangeAddress(rowIndex + NUMBER6, rowIndex + NUMBER6, 0, NUMBER8));// 填充数据HSSFCell baoJiaCell = baoJiaDetail.createCell(0);baoJiaCell.setCellValue("招标控制价:" + toubiaoTotal + "元,其中暂列金额(含税): 元、暂估价(含税): 元");baoJiaCell.setCellStyle(leftCellStyle);HSSFCell firstHXRCell = firstHXRDetail.createCell(0);firstHXRCell.setCellValue("第一中标候选人: 中标价: 元,其中暂列金额(含税): 元、暂估价(含税): 元");firstHXRCell.setCellStyle(leftCellStyle);HSSFCell secondHXRCell = secondHXRDetail.createCell(0);secondHXRCell.setCellValue("第二中标候选人:");secondHXRCell.setCellStyle(leftCellStyle);HSSFCell thirdHXRCell = thirdHXRDetail.createCell(0);thirdHXRCell.setCellValue("第三中标候选人:");thirdHXRCell.setCellStyle(leftCellStyle);HSSFCell forthCell = forthDetail.createCell(0);forthCell.setCellValue("招标人: 监督人员: 项目负责人: 特邀监督员: 公证人员:");forthCell.setCellStyle(leftCellStyle);if ("ZJZWZF_SG_GL".equals(pbbf) || "AQXZSZJZWZF".equals(pbbf) || "AQFJLJDZWZ".equals(pbbf) || "AQZJZWZF".equals(pbbf)) {String sqlXiShu = "select * from PingBiao_YouXiaoPanD where biaoduanguid=?";Record xiShu = service.find(sqlXiShu, Record.class, biaoDuanGuid);String canShuC = xiShu == null ? "" : xiShu.getStr("CanShuC");String canShuF = xiShu == null ? "" : xiShu.getStr("CanShuF");HSSFCell fifthCell = fifthDetail.createCell(0);fifthCell.setCellValue("C值:" + canShuC + " F值:" + canShuF);fifthCell.setCellStyle(leftCellStyle);HSSFCell sixthCell = sixthDetail.createCell(0);sixthCell.setCellValue("本系统抓取的投标报价数字为各投标单位投标函中小写数字");sixthCell.setCellStyle(leftCellStyle);}HSSFCell fifthCell = fifthDetail.createCell(0);fifthCell.setCellValue("本系统抓取的投标报价数字为各投标单位投标函中小写数字");fifthCell.setCellStyle(leftCellStyle);sheet.setColumnWidth(0, NUMBER4000);sheet.setColumnWidth(1, NUMBER8000);sheet.setColumnWidth(NUMBER2, NUMBER4000);sheet.setColumnWidth(NUMBER3, NUMBER6000);sheet.setColumnWidth(NUMBER4, NUMBER6000);sheet.setColumnWidth(NUMBER5, NUMBER6000);sheet.setColumnWidth(NUMBER6, NUMBER6000);sheet.setColumnWidth(NUMBER7, NUMBER4000);sheet.setColumnWidth(NUMBER8, NUMBER4000);return workBook;}/*** 将dataview的数据转成Excel** @param pingbiaokaibiaoList 单位* @param tbinfomxesList 报价* @param biaoduan 标段* @param tbinfomxes 投标文件明细* @param kaiBiaoDate 开标日期* @return workbook*/public static Workbook GetWorkBook_XEBF(List<PingBiaoKaiBiaoTouBiao> pingbiaokaibiaoList,List<PingbiaoTbinfomx> tbinfomxesList, PingbiaoBiaoduan biaoduan, List<PingbiaoTbinfomx> tbinfomxes,String kaiBiaoDate) {HSSFWorkbook workBook = new HSSFWorkbook();HSSFSheet sheet = workBook.createSheet("开标记录表");sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, NUMBER6));sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, NUMBER6));// TitleHSSFFont font = workBook.createFont();// 为了逃避sonar检测font.setFontName("宋a".replace("a", "体"));font.setBold(true);font.setFontHeight(Short.parseShort("250"));// 居中单元格HSSFCellStyle cellCellStyle = workBook.createCellStyle();cellCellStyle.setVerticalAlignment(VerticalAlignment_CENTER);// 垂直居中cellCellStyle.setAlignment(HorizontalAlignment_CENTER);cellCellStyle.setFont(font);// 水平居左单元格HSSFCellStyle leftCellStyle = workBook.createCellStyle();leftCellStyle.setVerticalAlignment(VerticalAlignment_CENTER);// 垂直居中leftCellStyle.setAlignment(HorizontalAlignment_LEFT);leftCellStyle.setFont(font);// 标题HSSFRow titleRow = sheet.createRow(0);HSSFCell titleCell = titleRow.createCell(0);titleCell.setCellValue(biaoduan.getBiaoduanname() + "开标记录表");titleCell.setCellStyle(cellCellStyle);titleRow.setHeight(Short.parseShort("700"));HSSFRow rowZBR = sheet.createRow(1);HSSFCell cellZBR = rowZBR.createCell(0);cellZBR.setCellValue("招标人:" + (StringUtil.isBlank(biaoduan.getJianshedanwei()) ? "" : biaoduan.getJianshedanwei()));cellZBR.setCellStyle(leftCellStyle);rowZBR.setHeight(Short.parseShort("700"));// 单位信息标题HSSFRow dwRow = sheet.createRow(NUMBER3);HSSFCell xhCell = dwRow.createCell(0);xhCell.setCellValue("序号");xhCell.setCellStyle(cellCellStyle);dwRow.setHeight(Short.parseShort("500"));HSSFCell tbrCell = dwRow.createCell(1);tbrCell.setCellValue("投标单位");tbrCell.setCellStyle(cellCellStyle);HSSFCell mfqkCell = dwRow.createCell(NUMBER2);mfqkCell.setCellValue("密封情况");mfqkCell.setCellStyle(cellCellStyle);HSSFCell totalPriceCell = dwRow.createCell(NUMBER3);totalPriceCell.setCellValue("是否响应计价、结算方式");totalPriceCell.setCellStyle(cellCellStyle);HSSFCell toubiaoBZJCell = dwRow.createCell(NUMBER4);toubiaoBZJCell.setCellValue("是否响应招标文件服务要求");toubiaoBZJCell.setCellStyle(cellCellStyle);HSSFCell gczlCell = dwRow.createCell(NUMBER5);gczlCell.setCellValue("是否响应招标文件中列明的抽签方式(包括特殊项目的抽签方式)");gczlCell.setCellStyle(cellCellStyle);HSSFCell remarkCell = dwRow.createCell(NUMBER6);remarkCell.setCellValue("备注");remarkCell.setCellStyle(cellCellStyle);// 从第四行开始int rowIndex = NUMBER4;if (pingbiaokaibiaoList != null && !pingbiaokaibiaoList.isEmpty()) {for (PingBiaoKaiBiaoTouBiao dw : pingbiaokaibiaoList) {HSSFRow dvDetail = sheet.createRow(rowIndex);dvDetail.setHeight(Short.parseShort("500"));xhCell = dvDetail.createCell(0);xhCell.setCellValue(Double.valueOf(rowIndex) - NUMBER2);xhCell.setCellStyle(cellCellStyle);tbrCell = dvDetail.createCell(1);tbrCell.setCellValue(dw.getDanweiname());tbrCell.setCellStyle(cellCellStyle);mfqkCell = dvDetail.createCell(NUMBER2);mfqkCell.setCellValue(dw.getFilemifeng());mfqkCell.setCellStyle(cellCellStyle);totalPriceCell = dvDetail.createCell(NUMBER3);totalPriceCell.setCellValue("");totalPriceCell.setCellStyle(cellCellStyle);toubiaoBZJCell = dvDetail.createCell(NUMBER4);toubiaoBZJCell.setCellValue("");toubiaoBZJCell.setCellStyle(cellCellStyle);gczlCell = dvDetail.createCell(NUMBER5);gczlCell.setCellValue("");gczlCell.setCellStyle(cellCellStyle);remarkCell = dvDetail.createCell(NUMBER9);remarkCell.setCellValue("");remarkCell.setCellStyle(cellCellStyle);rowIndex++;}}HSSFRow baoJiaDetail = sheet.createRow(rowIndex);baoJiaDetail.setHeight(Short.parseShort("500"));HSSFRow firstHXRDetail = sheet.createRow(rowIndex + 1);firstHXRDetail.setHeight(Short.parseShort("500"));// 合并单元格sheet.addMergedRegion(new CellRangeAddress(rowIndex, rowIndex, 0, NUMBER6));sheet.addMergedRegion(new CellRangeAddress(rowIndex + 1, rowIndex + 1, 0, NUMBER6));// 填充数据HSSFCell baoJiaCell = baoJiaDetail.createCell(0);baoJiaCell.setCellValue("招标人: 监督人: 项目负责人: ");baoJiaCell.setCellStyle(leftCellStyle);HSSFCell firstCell = firstHXRDetail.createCell(0);firstCell.setCellValue("本系统抓取的投标报价数字为各投标单位投标函中小写数字");firstCell.setCellStyle(leftCellStyle);sheet.setColumnWidth(0, NUMBER4000);sheet.setColumnWidth(1, NUMBER8000);sheet.setColumnWidth(NUMBER2, NUMBER6000);sheet.setColumnWidth(NUMBER3, NUMBER6000);sheet.setColumnWidth(NUMBER4, NUMBER6000);sheet.setColumnWidth(NUMBER5, NUMBER6000);sheet.setColumnWidth(NUMBER6, NUMBER6000);return workBook;}
}
如若内容造成侵权/违法违规/事实不符,请联系编程学习网邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
相关文章
- PAT乙级 1096 大美数
PAT乙级 1096 大美数 1096 大美数 (15 分) 若正整数 N 可以整除它的 4 个不同正因数之和,则称这样的正整数为“大美数”。本题就要求你判断任一给定的正整数是否是“大美数”。 输入格式: 输入在第一行中给出正整数 K(≤10)&…...
2024/4/27 5:54:28 - 浅谈String str = ““ 和 new String()的区别
关于String类的知识经常出现在面试题中,在此先记录自己的理解。 首先明白一个事,java存在一个常量池,可以用来存储字符串常量。 1 创建的字符串变量在内存中的区别 两者看似都是创建了一个字符串对象,但在内存中确是各有各的想…...
2024/4/13 12:40:45 - 使用函数式编程优化代码
原来的代码逻辑: Component Slf4j JobHandler(value "wechatSettlementHandler") public class WechatSettlementHandler extends IJobHandler {Autowiredprivate SettlementBatchResource settlementBatchResource;Overridepublic ReturnT<String> execute(…...
2024/4/20 9:00:04 - 2019-3 CCF 小中大(100分)
感想: 按理说这道题思路并不难,很容易写出来。但是我花了几乎一上午的时间改错。在格式上的错误太难找了。最后根据其他人的代码比对才发现,在判断中位数是否为整数上出了点问题。导致分数一直不是满分。 #include<iostream> #includ…...
2024/5/3 12:59:29 - es5实现继承
JavaScript语言本身并没有提供继承的机制,即使es6推出的extends关键字也是通过prototype实现的继承,所以核心就是通过prototype继承到父类的原型成员,通过子类调用父类构造函数达到继承父类实例成员,两者的结合使用完成继承的目的. es5实现继承的方法有很多,比较好的方式为组合…...
2024/4/25 20:30:15 - Vue数组的展开(...this.XXX)
...就是把数组展开为对象,作用类似于合并成一个数组的作用,这样会使数组处理使用更加规范性。...
2024/4/13 12:40:55 - 【Spring 微服务】微服务简介与分布式引入
项目结构变化分布式与集群的区别微服务简介...
2024/4/18 23:33:42 - 24.FastAPI静态文件
24.FastAPI静态文件 在FastAPI中,如果需要使用静态文件, 可以使用StaticFiles,将它挂载到应用程序中。 挂载StaticFiles的方法: app.mount("/static", StaticFiles(directory"static"), name"static&q…...
2024/4/25 1:04:50 - Qt中使用QXmlStreamReader处理XML文件
QXmlStreamReader:一种快速的基于流的方式访问XML格式文档,比较适合实现一次解析。即我们只需要读取文档一次,然后像一个遍历器从头到尾一次性处理XML文档,读取期间不会出现读完第一个标签,然后读第二个标签࿰…...
2024/4/17 21:27:18 - 机器学习_深度学习毕设题目汇总——运动活动动作
下面是该类的一些题目: 题目4D人体动作识别中的关键技术研究基于判别相关性滤波器的运动目标跟踪方法研究基于双向脑机闭环接口的机器人动作指导与评判及其计算实现基于微波技术的急性紧张性痛觉脑活动信号的检测与识别方法研究基于时域分析的视频动作定位和识别研…...
2024/4/19 16:46:31 - 机器学习_深度学习毕设题目汇总——姿势姿态步态
下面是该类的一些题目: 题目基于卷积神经网络的人体行为分析与步态识别研究基于标签分布的头部姿态估计算法研究及其应用基于深度网络的步态识别技术研究基于特征子空间的跨视角步态识别研究姿态自适应的人体行为识别研究自底向上的多人姿态估计方法研究视频步态特…...
2024/4/19 12:17:18 - Advance Python 04 :自定义序列类型
Introduce python中的序列分类序列的abc继承关系序列中、和extend的区别实现可切片的对象bisect维护已排序序列什么时候我们不该用列表列表推导式、生成器表达式和字典推导式 一、Python中的序列分类 序列是 python 中重要的协议 所谓序列,即成员有序排列,可通过下标访问. …...
2024/4/13 12:41:00 - Hadoop集群搭建
Hadoop运行环境搭建 1、模板虚拟机环境准备 安装模板虚拟机,IP地址192.168.10.100、主机名称hadoop100、内存4G、硬盘50G 「自定义安装CentOS全过程」https://www.aliyundrive.com/s/QAibtB7RwxC 安装epel-release 注:Extra Packages for Enterprise Li…...
2024/4/13 12:40:50 - 4 java锁
Java锁 1.1 公平锁与非公平锁 并发包中ReentrantLock的创建可以指定构造函数的boolean类型来得到公平锁或非公平锁,默认是非公平锁 关于两者区别: 公平锁:Threads acquire a fair lock in the order in which they requested it 公平锁&…...
2024/4/19 10:54:07 - QML笔记(五):QML语法
1,QML是一种声明语言,用于描述程序界面 2,QMl将用户界面分割成一块块小的元素,每一块元素都由很多组件构成 3,QML定义了用户界面的外观和行为,更复杂的逻辑可以结合JavaScript脚本实现,或者在c里…...
2024/4/14 5:27:30 - 玩转Git三剑客01:Git基础
1 版本管理演变 VCS(Version Control System):版本控制系统,是一种记录一个或若干个文件内容变化,以便将来查阅特定修订情况的系统 1.1 VCS出现之前 1. 使用目录拷贝区分不同版本 2. 开发过程中,公共文件…...
2024/4/13 23:10:54 - 【动态规划】01背包
关于二维数组的空间压缩问题(滚动数组): 当我们使用二维数组时,dp数组为—— dp[i][j] max(dp[i-1],dp[i-1][j-weight[i]] value[i]),dp[i][j]的含义是从0-i个物品中选择能装入容量为j的最大物品价值。 其中分为两种…...
2024/4/17 21:27:06 - OpenCV 学习笔记-day13 像素值统计 统计计算最大最小值,平均值和标准差 (minMaxLoc()和meanStdDev()函数的使用)
OpenCV 学习笔记day13 像素值统计函数minMaxLoc(); 最大值最小值统计meanStdDev();平均值和标准方差统计代码day13 像素值统计 函数 minMaxLoc(); 最大值最小值统计 CV_EXPORTS_W void minMaxLoc(InputArray src, CV_OUT double* minVal,CV_OUT double* maxVal 0, CV_OUT P…...
2024/4/13 12:41:35 - 可执行MIPS指令的单周期CPU
可执行MIPS指令的单周期CPU Marphownio原创 文章目录可执行MIPS指令的单周期CPU一、任务说明二、部件设计及其仿真1、程序计数器PC1)代码2)部件功能3)实现思路4)仿真代码5)仿真波形图6)仿真说明2、PC地址改…...
2024/5/3 12:17:53 - 2021年全球沥青搅拌站收入大约2341.3百万美元,预计2028年达到2691.2百万美元
本文研究全球市场、主要地区和主要国家沥青搅拌站的销量、销售收入等,同时也重点分析全球范围内主要厂商(品牌)竞争态势,沥青搅拌站销量、价格、收入和市场份额等。 针对过去五年(2017-2021)年的历史情况&a…...
2024/4/28 13:20:54
最新文章
- Python的使用
1、打印:print(‘hello’) 2、Python的除法是数学意义上的除法 print(2/3) 输出:0.6666... 3、a18 a‘hello’ print(a) 可以直接输出 4、**2 表示2的平方 5、打印类型 print(type&am…...
2024/5/3 20:49:52 - 梯度消失和梯度爆炸的一些处理方法
在这里是记录一下梯度消失或梯度爆炸的一些处理技巧。全当学习总结了如有错误还请留言,在此感激不尽。 权重和梯度的更新公式如下: w w − η ⋅ ∇ w w w - \eta \cdot \nabla w ww−η⋅∇w 个人通俗的理解梯度消失就是网络模型在反向求导的时候出…...
2024/3/20 10:50:27 - ChatGPT 赚钱初学者指南(上)
原文:The Beginner’s Guide to Earning Money Online with ChatGPT 译者:飞龙 协议:CC BY-NC-SA 4.0 第一章:理解基础知识 什么是 ChatGPT? 在人工智能与人类对话相遇的数字织锦中,ChatGPT 作为一个突出…...
2024/5/3 4:17:57 - 【ARM 嵌入式 C 文件操作系列 20 -- 文件删除函数 remove 详细介绍】
请阅读【嵌入式开发学习必备专栏 】 文章目录 文件删除函数 remove 文件删除函数 remove 在 C 语言中, 可以使用 remove 函数来删除一个文件,但在删除之前 可能想确认该文件是否存在。 可以使用 stat 函数来检查文件是否存在。 以下是如何实现这个功能…...
2024/5/1 18:15:01 - 【外汇早评】美通胀数据走低,美元调整
原标题:【外汇早评】美通胀数据走低,美元调整昨日美国方面公布了新一期的核心PCE物价指数数据,同比增长1.6%,低于前值和预期值的1.7%,距离美联储的通胀目标2%继续走低,通胀压力较低,且此前美国一季度GDP初值中的消费部分下滑明显,因此市场对美联储后续更可能降息的政策…...
2024/5/1 17:30:59 - 【原油贵金属周评】原油多头拥挤,价格调整
原标题:【原油贵金属周评】原油多头拥挤,价格调整本周国际劳动节,我们喜迎四天假期,但是整个金融市场确实流动性充沛,大事频发,各个商品波动剧烈。美国方面,在本周四凌晨公布5月份的利率决议和新闻发布会,维持联邦基金利率在2.25%-2.50%不变,符合市场预期。同时美联储…...
2024/5/2 16:16:39 - 【外汇周评】靓丽非农不及疲软通胀影响
原标题:【外汇周评】靓丽非农不及疲软通胀影响在刚结束的周五,美国方面公布了新一期的非农就业数据,大幅好于前值和预期,新增就业重新回到20万以上。具体数据: 美国4月非农就业人口变动 26.3万人,预期 19万人,前值 19.6万人。 美国4月失业率 3.6%,预期 3.8%,前值 3…...
2024/4/29 2:29:43 - 【原油贵金属早评】库存继续增加,油价收跌
原标题:【原油贵金属早评】库存继续增加,油价收跌周三清晨公布美国当周API原油库存数据,上周原油库存增加281万桶至4.692亿桶,增幅超过预期的74.4万桶。且有消息人士称,沙特阿美据悉将于6月向亚洲炼油厂额外出售更多原油,印度炼油商预计将每日获得至多20万桶的额外原油供…...
2024/5/2 9:28:15 - 【外汇早评】日本央行会议纪要不改日元强势
原标题:【外汇早评】日本央行会议纪要不改日元强势近两日日元大幅走强与近期市场风险情绪上升,避险资金回流日元有关,也与前一段时间的美日贸易谈判给日本缓冲期,日本方面对汇率问题也避免继续贬值有关。虽然今日早间日本央行公布的利率会议纪要仍然是支持宽松政策,但这符…...
2024/4/27 17:58:04 - 【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响
原标题:【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响近日伊朗局势升温,导致市场担忧影响原油供给,油价试图反弹。此时OPEC表态稳定市场。据消息人士透露,沙特6月石油出口料将低于700万桶/日,沙特已经收到石油消费国提出的6月份扩大出口的“适度要求”,沙特将满…...
2024/4/27 14:22:49 - 【外汇早评】美欲与伊朗重谈协议
原标题:【外汇早评】美欲与伊朗重谈协议美国对伊朗的制裁遭到伊朗的抗议,昨日伊朗方面提出将部分退出伊核协议。而此行为又遭到欧洲方面对伊朗的谴责和警告,伊朗外长昨日回应称,欧洲国家履行它们的义务,伊核协议就能保证存续。据传闻伊朗的导弹已经对准了以色列和美国的航…...
2024/4/28 1:28:33 - 【原油贵金属早评】波动率飙升,市场情绪动荡
原标题:【原油贵金属早评】波动率飙升,市场情绪动荡因中美贸易谈判不安情绪影响,金融市场各资产品种出现明显的波动。随着美国与中方开启第十一轮谈判之际,美国按照既定计划向中国2000亿商品征收25%的关税,市场情绪有所平复,已经开始接受这一事实。虽然波动率-恐慌指数VI…...
2024/4/30 9:43:09 - 【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试
原标题:【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试美国和伊朗的局势继续升温,市场风险情绪上升,避险黄金有向上突破阻力的迹象。原油方面稍显平稳,近期美国和OPEC加大供给及市场需求回落的影响,伊朗局势并未推升油价走强。近期中美贸易谈判摩擦再度升级,美国对中…...
2024/4/27 17:59:30 - 【原油贵金属早评】市场情绪继续恶化,黄金上破
原标题:【原油贵金属早评】市场情绪继续恶化,黄金上破周初中国针对于美国加征关税的进行的反制措施引发市场情绪的大幅波动,人民币汇率出现大幅的贬值动能,金融市场受到非常明显的冲击。尤其是波动率起来之后,对于股市的表现尤其不安。隔夜美国股市出现明显的下行走势,这…...
2024/5/2 15:04:34 - 【外汇早评】美伊僵持,风险情绪继续升温
原标题:【外汇早评】美伊僵持,风险情绪继续升温昨日沙特两艘油轮再次发生爆炸事件,导致波斯湾局势进一步恶化,市场担忧美伊可能会出现摩擦生火,避险品种获得支撑,黄金和日元大幅走强。美指受中美贸易问题影响而在低位震荡。继5月12日,四艘商船在阿联酋领海附近的阿曼湾、…...
2024/4/28 1:34:08 - 【原油贵金属早评】贸易冲突导致需求低迷,油价弱势
原标题:【原油贵金属早评】贸易冲突导致需求低迷,油价弱势近日虽然伊朗局势升温,中东地区几起油船被袭击事件影响,但油价并未走高,而是出于调整结构中。由于市场预期局势失控的可能性较低,而中美贸易问题导致的全球经济衰退风险更大,需求会持续低迷,因此油价调整压力较…...
2024/4/26 19:03:37 - 氧生福地 玩美北湖(上)——为时光守候两千年
原标题:氧生福地 玩美北湖(上)——为时光守候两千年一次说走就走的旅行,只有一张高铁票的距离~ 所以,湖南郴州,我来了~ 从广州南站出发,一个半小时就到达郴州西站了。在动车上,同时改票的南风兄和我居然被分到了一个车厢,所以一路非常愉快地聊了过来。 挺好,最起…...
2024/4/29 20:46:55 - 氧生福地 玩美北湖(中)——永春梯田里的美与鲜
原标题:氧生福地 玩美北湖(中)——永春梯田里的美与鲜一觉醒来,因为大家太爱“美”照,在柳毅山庄去寻找龙女而错过了早餐时间。近十点,向导坏坏还是带着饥肠辘辘的我们去吃郴州最富有盛名的“鱼头粉”。说这是“十二分推荐”,到郴州必吃的美食之一。 哇塞!那个味美香甜…...
2024/4/30 22:21:04 - 氧生福地 玩美北湖(下)——奔跑吧骚年!
原标题:氧生福地 玩美北湖(下)——奔跑吧骚年!让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 啊……啊……啊 两…...
2024/5/1 4:32:01 - 扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!
原标题:扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!扒开伪装医用面膜,翻六倍价格宰客!当行业里的某一品项火爆了,就会有很多商家蹭热度,装逼忽悠,最近火爆朋友圈的医用面膜,被沾上了污点,到底怎么回事呢? “比普通面膜安全、效果好!痘痘、痘印、敏感肌都能用…...
2024/4/27 23:24:42 - 「发现」铁皮石斛仙草之神奇功效用于医用面膜
原标题:「发现」铁皮石斛仙草之神奇功效用于医用面膜丽彦妆铁皮石斛医用面膜|石斛多糖无菌修护补水贴19大优势: 1、铁皮石斛:自唐宋以来,一直被列为皇室贡品,铁皮石斛生于海拔1600米的悬崖峭壁之上,繁殖力差,产量极低,所以古代仅供皇室、贵族享用 2、铁皮石斛自古民间…...
2024/4/28 5:48:52 - 丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者
原标题:丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者【公司简介】 广州华彬企业隶属香港华彬集团有限公司,专注美业21年,其旗下品牌: 「圣茵美」私密荷尔蒙抗衰,产后修复 「圣仪轩」私密荷尔蒙抗衰,产后修复 「花茵莳」私密荷尔蒙抗衰,产后修复 「丽彦妆」专注医学护…...
2024/4/30 9:42:22 - 广州械字号面膜生产厂家OEM/ODM4项须知!
原标题:广州械字号面膜生产厂家OEM/ODM4项须知!广州械字号面膜生产厂家OEM/ODM流程及注意事项解读: 械字号医用面膜,其实在我国并没有严格的定义,通常我们说的医美面膜指的应该是一种「医用敷料」,也就是说,医用面膜其实算作「医疗器械」的一种,又称「医用冷敷贴」。 …...
2024/5/2 9:07:46 - 械字号医用眼膜缓解用眼过度到底有无作用?
原标题:械字号医用眼膜缓解用眼过度到底有无作用?医用眼膜/械字号眼膜/医用冷敷眼贴 凝胶层为亲水高分子材料,含70%以上的水分。体表皮肤温度传导到本产品的凝胶层,热量被凝胶内水分子吸收,通过水分的蒸发带走大量的热量,可迅速地降低体表皮肤局部温度,减轻局部皮肤的灼…...
2024/4/30 9:42:49 - 配置失败还原请勿关闭计算机,电脑开机屏幕上面显示,配置失败还原更改 请勿关闭计算机 开不了机 这个问题怎么办...
解析如下:1、长按电脑电源键直至关机,然后再按一次电源健重启电脑,按F8健进入安全模式2、安全模式下进入Windows系统桌面后,按住“winR”打开运行窗口,输入“services.msc”打开服务设置3、在服务界面,选中…...
2022/11/19 21:17:18 - 错误使用 reshape要执行 RESHAPE,请勿更改元素数目。
%读入6幅图像(每一幅图像的大小是564*564) f1 imread(WashingtonDC_Band1_564.tif); subplot(3,2,1),imshow(f1); f2 imread(WashingtonDC_Band2_564.tif); subplot(3,2,2),imshow(f2); f3 imread(WashingtonDC_Band3_564.tif); subplot(3,2,3),imsho…...
2022/11/19 21:17:16 - 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机...
win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”问题的解决方法在win7系统关机时如果有升级系统的或者其他需要会直接进入一个 等待界面,在等待界面中我们需要等待操作结束才能关机,虽然这比较麻烦,但是对系统进行配置和升级…...
2022/11/19 21:17:15 - 台式电脑显示配置100%请勿关闭计算机,“准备配置windows 请勿关闭计算机”的解决方法...
有不少用户在重装Win7系统或更新系统后会遇到“准备配置windows,请勿关闭计算机”的提示,要过很久才能进入系统,有的用户甚至几个小时也无法进入,下面就教大家这个问题的解决方法。第一种方法:我们首先在左下角的“开始…...
2022/11/19 21:17:14 - win7 正在配置 请勿关闭计算机,怎么办Win7开机显示正在配置Windows Update请勿关机...
置信有很多用户都跟小编一样遇到过这样的问题,电脑时发现开机屏幕显现“正在配置Windows Update,请勿关机”(如下图所示),而且还需求等大约5分钟才干进入系统。这是怎样回事呢?一切都是正常操作的,为什么开时机呈现“正…...
2022/11/19 21:17:13 - 准备配置windows 请勿关闭计算机 蓝屏,Win7开机总是出现提示“配置Windows请勿关机”...
Win7系统开机启动时总是出现“配置Windows请勿关机”的提示,没过几秒后电脑自动重启,每次开机都这样无法进入系统,此时碰到这种现象的用户就可以使用以下5种方法解决问题。方法一:开机按下F8,在出现的Windows高级启动选…...
2022/11/19 21:17:12 - 准备windows请勿关闭计算机要多久,windows10系统提示正在准备windows请勿关闭计算机怎么办...
有不少windows10系统用户反映说碰到这样一个情况,就是电脑提示正在准备windows请勿关闭计算机,碰到这样的问题该怎么解决呢,现在小编就给大家分享一下windows10系统提示正在准备windows请勿关闭计算机的具体第一种方法:1、2、依次…...
2022/11/19 21:17:11 - 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”的解决方法...
今天和大家分享一下win7系统重装了Win7旗舰版系统后,每次关机的时候桌面上都会显示一个“配置Windows Update的界面,提示请勿关闭计算机”,每次停留好几分钟才能正常关机,导致什么情况引起的呢?出现配置Windows Update…...
2022/11/19 21:17:10 - 电脑桌面一直是清理请关闭计算机,windows7一直卡在清理 请勿关闭计算机-win7清理请勿关机,win7配置更新35%不动...
只能是等着,别无他法。说是卡着如果你看硬盘灯应该在读写。如果从 Win 10 无法正常回滚,只能是考虑备份数据后重装系统了。解决来方案一:管理员运行cmd:net stop WuAuServcd %windir%ren SoftwareDistribution SDoldnet start WuA…...
2022/11/19 21:17:09 - 计算机配置更新不起,电脑提示“配置Windows Update请勿关闭计算机”怎么办?
原标题:电脑提示“配置Windows Update请勿关闭计算机”怎么办?win7系统中在开机与关闭的时候总是显示“配置windows update请勿关闭计算机”相信有不少朋友都曾遇到过一次两次还能忍但经常遇到就叫人感到心烦了遇到这种问题怎么办呢?一般的方…...
2022/11/19 21:17:08 - 计算机正在配置无法关机,关机提示 windows7 正在配置windows 请勿关闭计算机 ,然后等了一晚上也没有关掉。现在电脑无法正常关机...
关机提示 windows7 正在配置windows 请勿关闭计算机 ,然后等了一晚上也没有关掉。现在电脑无法正常关机以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!关机提示 windows7 正在配…...
2022/11/19 21:17:05 - 钉钉提示请勿通过开发者调试模式_钉钉请勿通过开发者调试模式是真的吗好不好用...
钉钉请勿通过开发者调试模式是真的吗好不好用 更新时间:2020-04-20 22:24:19 浏览次数:729次 区域: 南阳 > 卧龙 列举网提醒您:为保障您的权益,请不要提前支付任何费用! 虚拟位置外设器!!轨迹模拟&虚拟位置外设神器 专业用于:钉钉,外勤365,红圈通,企业微信和…...
2022/11/19 21:17:05 - 配置失败还原请勿关闭计算机怎么办,win7系统出现“配置windows update失败 还原更改 请勿关闭计算机”,长时间没反应,无法进入系统的解决方案...
前几天班里有位学生电脑(windows 7系统)出问题了,具体表现是开机时一直停留在“配置windows update失败 还原更改 请勿关闭计算机”这个界面,长时间没反应,无法进入系统。这个问题原来帮其他同学也解决过,网上搜了不少资料&#x…...
2022/11/19 21:17:04 - 一个电脑无法关闭计算机你应该怎么办,电脑显示“清理请勿关闭计算机”怎么办?...
本文为你提供了3个有效解决电脑显示“清理请勿关闭计算机”问题的方法,并在最后教给你1种保护系统安全的好方法,一起来看看!电脑出现“清理请勿关闭计算机”在Windows 7(SP1)和Windows Server 2008 R2 SP1中,添加了1个新功能在“磁…...
2022/11/19 21:17:03 - 请勿关闭计算机还原更改要多久,电脑显示:配置windows更新失败,正在还原更改,请勿关闭计算机怎么办...
许多用户在长期不使用电脑的时候,开启电脑发现电脑显示:配置windows更新失败,正在还原更改,请勿关闭计算机。。.这要怎么办呢?下面小编就带着大家一起看看吧!如果能够正常进入系统,建议您暂时移…...
2022/11/19 21:17:02 - 还原更改请勿关闭计算机 要多久,配置windows update失败 还原更改 请勿关闭计算机,电脑开机后一直显示以...
配置windows update失败 还原更改 请勿关闭计算机,电脑开机后一直显示以以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!配置windows update失败 还原更改 请勿关闭计算机&#x…...
2022/11/19 21:17:01 - 电脑配置中请勿关闭计算机怎么办,准备配置windows请勿关闭计算机一直显示怎么办【图解】...
不知道大家有没有遇到过这样的一个问题,就是我们的win7系统在关机的时候,总是喜欢显示“准备配置windows,请勿关机”这样的一个页面,没有什么大碍,但是如果一直等着的话就要两个小时甚至更久都关不了机,非常…...
2022/11/19 21:17:00 - 正在准备配置请勿关闭计算机,正在准备配置windows请勿关闭计算机时间长了解决教程...
当电脑出现正在准备配置windows请勿关闭计算机时,一般是您正对windows进行升级,但是这个要是长时间没有反应,我们不能再傻等下去了。可能是电脑出了别的问题了,来看看教程的说法。正在准备配置windows请勿关闭计算机时间长了方法一…...
2022/11/19 21:16:59 - 配置失败还原请勿关闭计算机,配置Windows Update失败,还原更改请勿关闭计算机...
我们使用电脑的过程中有时会遇到这种情况,当我们打开电脑之后,发现一直停留在一个界面:“配置Windows Update失败,还原更改请勿关闭计算机”,等了许久还是无法进入系统。如果我们遇到此类问题应该如何解决呢࿰…...
2022/11/19 21:16:58 - 如何在iPhone上关闭“请勿打扰”
Apple’s “Do Not Disturb While Driving” is a potentially lifesaving iPhone feature, but it doesn’t always turn on automatically at the appropriate time. For example, you might be a passenger in a moving car, but your iPhone may think you’re the one dri…...
2022/11/19 21:16:57