作者 Win10-2023FDZSZ\Administrator

投标文件下载

@@ -22,6 +22,7 @@ import org.jeecg.modules.erp.trade.entity.TblTradeBidMaterialDetails; @@ -22,6 +22,7 @@ import org.jeecg.modules.erp.trade.entity.TblTradeBidMaterialDetails;
22 import org.jeecg.modules.erp.trade.entity.TblTradeBidSub; 22 import org.jeecg.modules.erp.trade.entity.TblTradeBidSub;
23 import org.jeecg.modules.erp.trade.service.ITblTradeBidMaterialDetailsService; 23 import org.jeecg.modules.erp.trade.service.ITblTradeBidMaterialDetailsService;
24 import org.jeecg.modules.erp.trade.service.ITblTradeBidSubService; 24 import org.jeecg.modules.erp.trade.service.ITblTradeBidSubService;
  25 +import org.jeecg.modules.erp.trade.vo.TblTradeTenderInfoVO;
25 import org.jeecgframework.poi.excel.ExcelImportUtil; 26 import org.jeecgframework.poi.excel.ExcelImportUtil;
26 import org.jeecgframework.poi.excel.def.NormalExcelConstants; 27 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
27 import org.jeecgframework.poi.excel.entity.ExportParams; 28 import org.jeecgframework.poi.excel.entity.ExportParams;
@@ -241,43 +242,63 @@ public class TblTradePriceInquiryController { @@ -241,43 +242,63 @@ public class TblTradePriceInquiryController {
241 return Result.OK(page); 242 return Result.OK(page);
242 } 243 }
243 244
  245 +// /**
  246 +// * 导出excel
  247 +// *
  248 +// * @param request
  249 +// * @param tblTradePriceInquiry
  250 +// */
  251 +// @RequestMapping(value = "/exportXls")
  252 +// public ModelAndView exportXls(HttpServletRequest request, TblTradePriceInquiry tblTradePriceInquiry) {
  253 +// // Step.1 组装查询条件查询数据
  254 +// QueryWrapper<TblTradePriceInquiry> queryWrapper = QueryGenerator.initQueryWrapper(tblTradePriceInquiry, request.getParameterMap());
  255 +// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
  256 +//
  257 +// //配置选中数据查询条件
  258 +// String selections = request.getParameter("selections");
  259 +// if (oConvertUtils.isNotEmpty(selections)) {
  260 +// List<String> selectionList = Arrays.asList(selections.split(","));
  261 +// queryWrapper.in("id", selectionList);
  262 +// }
  263 +// //Step.2 获取导出数据
  264 +// List<TblTradePriceInquiry> tblTradePriceInquiryList = tblTradePriceInquiryService.list(queryWrapper);
  265 +//
  266 +// // Step.3 组装pageList
  267 +// List<TblTradePriceInquiryPage> pageList = new ArrayList<TblTradePriceInquiryPage>();
  268 +// for (TblTradePriceInquiry main : tblTradePriceInquiryList) {
  269 +// TblTradePriceInquiryPage vo = new TblTradePriceInquiryPage();
  270 +// BeanUtils.copyProperties(main, vo);
  271 +// List<TblTradeTenderInfo> tblTradeTenderInfoList = tblTradeTenderInfoService.selectByMainId(main.getId());
  272 +// vo.setTblTradeTenderInfoList(tblTradeTenderInfoList);
  273 +// pageList.add(vo);
  274 +// }
  275 +//
  276 +// // Step.4 AutoPoi 导出Excel
  277 +// ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
  278 +// mv.addObject(NormalExcelConstants.FILE_NAME, "询价表列表");
  279 +// mv.addObject(NormalExcelConstants.CLASS, TblTradePriceInquiryPage.class);
  280 +// mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("询价表数据", "导出人:" + sysUser.getRealname(), "询价表"));
  281 +// mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
  282 +// return mv;
  283 +// }
  284 +
244 /** 285 /**
245 - * 导出excel  
246 - * 286 + * 生成投标文件
247 * @param request 287 * @param request
248 * @param tblTradePriceInquiry 288 * @param tblTradePriceInquiry
249 */ 289 */
250 @RequestMapping(value = "/exportXls") 290 @RequestMapping(value = "/exportXls")
251 public ModelAndView exportXls(HttpServletRequest request, TblTradePriceInquiry tblTradePriceInquiry) { 291 public ModelAndView exportXls(HttpServletRequest request, TblTradePriceInquiry tblTradePriceInquiry) {
252 - // Step.1 组装查询条件查询数据  
253 - QueryWrapper<TblTradePriceInquiry> queryWrapper = QueryGenerator.initQueryWrapper(tblTradePriceInquiry, request.getParameterMap());  
254 LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); 292 LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
  293 + // 获取导出数据
  294 + List<TblTradeTenderInfoVO> bidExcelData = tblTradePriceInquiryService.getBidExcelData(tblTradePriceInquiry.getXjbswjh());
255 295
256 - //配置选中数据查询条件  
257 - String selections = request.getParameter("selections");  
258 - if (oConvertUtils.isNotEmpty(selections)) {  
259 - List<String> selectionList = Arrays.asList(selections.split(","));  
260 - queryWrapper.in("id", selectionList);  
261 - }  
262 - //Step.2 获取导出数据  
263 - List<TblTradePriceInquiry> tblTradePriceInquiryList = tblTradePriceInquiryService.list(queryWrapper);  
264 -  
265 - // Step.3 组装pageList  
266 - List<TblTradePriceInquiryPage> pageList = new ArrayList<TblTradePriceInquiryPage>();  
267 - for (TblTradePriceInquiry main : tblTradePriceInquiryList) {  
268 - TblTradePriceInquiryPage vo = new TblTradePriceInquiryPage();  
269 - BeanUtils.copyProperties(main, vo);  
270 - List<TblTradeTenderInfo> tblTradeTenderInfoList = tblTradeTenderInfoService.selectByMainId(main.getId());  
271 - vo.setTblTradeTenderInfoList(tblTradeTenderInfoList);  
272 - pageList.add(vo);  
273 - }  
274 -  
275 - // Step.4 AutoPoi 导出Excel 296 + // AutoPoi 导出Excel
276 ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); 297 ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
277 - mv.addObject(NormalExcelConstants.FILE_NAME, "询价表列表");  
278 - mv.addObject(NormalExcelConstants.CLASS, TblTradePriceInquiryPage.class);  
279 - mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("询价表数据", "导出人:" + sysUser.getRealname(), "询价表"));  
280 - mv.addObject(NormalExcelConstants.DATA_LIST, pageList); 298 +// mv.addObject(NormalExcelConstants.FILE_NAME, "询价表列表");
  299 + mv.addObject(NormalExcelConstants.CLASS, TblTradeTenderInfoVO.class);
  300 + mv.addObject(NormalExcelConstants.PARAMS, new ExportParams(null, null, "投标表"));
  301 + mv.addObject(NormalExcelConstants.DATA_LIST, bidExcelData);
281 return mv; 302 return mv;
282 } 303 }
283 304
@@ -79,10 +79,12 @@ public class TblTradeBidSub implements Serializable { @@ -79,10 +79,12 @@ public class TblTradeBidSub implements Serializable {
79 /**库存数据*/ 79 /**库存数据*/
80 @Excel(name = "库存数据", width = 15) 80 @Excel(name = "库存数据", width = 15)
81 @ApiModelProperty(value = "库存数据") 81 @ApiModelProperty(value = "库存数据")
  82 + @TableField(exist = false)
82 private java.lang.String kcsj; 83 private java.lang.String kcsj;
83 /**在途库存*/ 84 /**在途库存*/
84 @Excel(name = "在途库存", width = 15) 85 @Excel(name = "在途库存", width = 15)
85 @ApiModelProperty(value = "在途库存") 86 @ApiModelProperty(value = "在途库存")
  87 + @TableField(exist = false)
86 private java.lang.String ztkf; 88 private java.lang.String ztkf;
87 /**库存单价(含税运)(元)*/ 89 /**库存单价(含税运)(元)*/
88 @Excel(name = "库存单价(含税运)(元)", width = 15) 90 @Excel(name = "库存单价(含税运)(元)", width = 15)
@@ -5,6 +5,7 @@ import java.util.List; @@ -5,6 +5,7 @@ import java.util.List;
5 import org.apache.ibatis.annotations.Param; 5 import org.apache.ibatis.annotations.Param;
6 import org.jeecg.modules.erp.trade.entity.TblTradePriceInquiry; 6 import org.jeecg.modules.erp.trade.entity.TblTradePriceInquiry;
7 import com.baomidou.mybatisplus.core.mapper.BaseMapper; 7 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  8 +import org.jeecg.modules.erp.trade.vo.TblTradeTenderInfoVO;
8 9
9 /** 10 /**
10 * @Description: 询价表 11 * @Description: 询价表
@@ -14,4 +15,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -14,4 +15,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
14 */ 15 */
15 public interface TblTradePriceInquiryMapper extends BaseMapper<TblTradePriceInquiry> { 16 public interface TblTradePriceInquiryMapper extends BaseMapper<TblTradePriceInquiry> {
16 17
  18 + List<TblTradeTenderInfoVO> getBidExcelData(String xjbswjh);
17 } 19 }
@@ -2,4 +2,11 @@ @@ -2,4 +2,11 @@
2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> 2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 <mapper namespace="org.jeecg.modules.erp.trade.mapper.TblTradePriceInquiryMapper"> 3 <mapper namespace="org.jeecg.modules.erp.trade.mapper.TblTradePriceInquiryMapper">
4 4
  5 + <select id="getBidExcelData" resultType="org.jeecg.modules.erp.trade.vo.TblTradeTenderInfoVO">
  6 + SELECT b.tender_name,b.`code`,b.miaoshu,b.jldw,b.xqsl,b.xqjhq,b.pinpai,a.sl,a.xydj,b.xysl,b.xyjhq,a.xypp
  7 + from tbl_trade_bid_sub a
  8 + join tbl_trade_tender_info b on b.xjbswjh = a.xjbswjh and b.`code`=a.wlbm
  9 + where a.xjbswjh = #{xjbswjh} and a.status = '3'
  10 + </select>
  11 +
5 </mapper> 12 </mapper>
@@ -3,6 +3,8 @@ package org.jeecg.modules.erp.trade.service; @@ -3,6 +3,8 @@ package org.jeecg.modules.erp.trade.service;
3 import org.jeecg.modules.erp.trade.entity.TblTradeTenderInfo; 3 import org.jeecg.modules.erp.trade.entity.TblTradeTenderInfo;
4 import org.jeecg.modules.erp.trade.entity.TblTradePriceInquiry; 4 import org.jeecg.modules.erp.trade.entity.TblTradePriceInquiry;
5 import com.baomidou.mybatisplus.extension.service.IService; 5 import com.baomidou.mybatisplus.extension.service.IService;
  6 +import org.jeecg.modules.erp.trade.vo.TblTradeTenderInfoVO;
  7 +
6 import java.io.Serializable; 8 import java.io.Serializable;
7 import java.util.Collection; 9 import java.util.Collection;
8 import java.util.List; 10 import java.util.List;
@@ -44,5 +46,11 @@ public interface ITblTradePriceInquiryService extends IService<TblTradePriceInqu @@ -44,5 +46,11 @@ public interface ITblTradePriceInquiryService extends IService<TblTradePriceInqu
44 * @param idList 46 * @param idList
45 */ 47 */
46 public void delBatchMain (Collection<? extends Serializable> idList); 48 public void delBatchMain (Collection<? extends Serializable> idList);
47 - 49 +
  50 + /**
  51 + * 生成投标文件数据
  52 + * @param xjbswjh
  53 + * @return
  54 + */
  55 + List<TblTradeTenderInfoVO> getBidExcelData(String xjbswjh);
48 } 56 }
@@ -5,6 +5,7 @@ import org.jeecg.modules.erp.trade.entity.TblTradeTenderInfo; @@ -5,6 +5,7 @@ import org.jeecg.modules.erp.trade.entity.TblTradeTenderInfo;
5 import org.jeecg.modules.erp.trade.mapper.TblTradeTenderInfoMapper; 5 import org.jeecg.modules.erp.trade.mapper.TblTradeTenderInfoMapper;
6 import org.jeecg.modules.erp.trade.mapper.TblTradePriceInquiryMapper; 6 import org.jeecg.modules.erp.trade.mapper.TblTradePriceInquiryMapper;
7 import org.jeecg.modules.erp.trade.service.ITblTradePriceInquiryService; 7 import org.jeecg.modules.erp.trade.service.ITblTradePriceInquiryService;
  8 +import org.jeecg.modules.erp.trade.vo.TblTradeTenderInfoVO;
8 import org.springframework.stereotype.Service; 9 import org.springframework.stereotype.Service;
9 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 10 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
10 import org.springframework.beans.factory.annotation.Autowired; 11 import org.springframework.beans.factory.annotation.Autowired;
@@ -73,5 +74,10 @@ public class TblTradePriceInquiryServiceImpl extends ServiceImpl<TblTradePriceIn @@ -73,5 +74,10 @@ public class TblTradePriceInquiryServiceImpl extends ServiceImpl<TblTradePriceIn
73 tblTradePriceInquiryMapper.deleteById(id); 74 tblTradePriceInquiryMapper.deleteById(id);
74 } 75 }
75 } 76 }
76 - 77 +
  78 + @Override
  79 + public List<TblTradeTenderInfoVO> getBidExcelData(String xjbswjh) {
  80 + return tblTradePriceInquiryMapper.getBidExcelData(xjbswjh);
  81 + }
  82 +
77 } 83 }
  1 +package org.jeecg.modules.erp.trade.vo;
  2 +
  3 +import com.baomidou.mybatisplus.annotation.IdType;
  4 +import com.baomidou.mybatisplus.annotation.TableField;
  5 +import com.baomidou.mybatisplus.annotation.TableId;
  6 +import com.baomidou.mybatisplus.annotation.TableName;
  7 +import com.fasterxml.jackson.annotation.JsonFormat;
  8 +import io.swagger.annotations.ApiModel;
  9 +import io.swagger.annotations.ApiModelProperty;
  10 +import lombok.Data;
  11 +import org.jeecgframework.poi.excel.annotation.Excel;
  12 +import org.springframework.format.annotation.DateTimeFormat;
  13 +
  14 +import java.io.Serializable;
  15 +import java.util.Date;
  16 +
  17 +/**
  18 + * @Description: 贸易招标信息
  19 + * @Author: jeecg-boot
  20 + * @Date: 2025-02-12
  21 + * @Version: V1.0
  22 + */
  23 +@ApiModel(value="tbl_trade_tender_info对象", description="贸易招标信息")
  24 +@Data
  25 +public class TblTradeTenderInfoVO {
  26 +
  27 + /**主键*/
  28 + @TableId(type = IdType.ASSIGN_ID)
  29 + @ApiModelProperty(value = "主键")
  30 + private String id;
  31 +
  32 + /**标段(包)名称*/
  33 + @Excel(name = "标段(包)名称", width = 15)
  34 + @ApiModelProperty(value = "标段(包)名称")
  35 + private String tenderName;
  36 + /**物料编码*/
  37 + @Excel(name = "物料编码", width = 15)
  38 + @ApiModelProperty(value = "物料编码")
  39 + private String code;
  40 + @Excel(name = "SRM编码", width = 15)
  41 + private String srm;
  42 +
  43 + /**物料长描述*/
  44 + @Excel(name = "物料长描述", width = 30)
  45 + @ApiModelProperty(value = "物料长描述")
  46 + private String miaoshu;
  47 + /**计量单位*/
  48 + @Excel(name = "计量单位", width = 15)
  49 + @ApiModelProperty(value = "计量单位")
  50 + private String jldw;
  51 + /**需求数量*/
  52 + @Excel(name = "需求数量", width = 15)
  53 + @ApiModelProperty(value = "需求数量")
  54 + private String xqsl;
  55 + /**需求交货期*/
  56 + @Excel(name = "需求交货期", width = 15, format = "yyyy-MM-dd")
  57 + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
  58 + @DateTimeFormat(pattern="yyyy-MM-dd")
  59 + @ApiModelProperty(value = "需求交货期")
  60 + private Date xqjhq;
  61 + /**品牌*/
  62 + @Excel(name = "品牌", width = 15)
  63 + @ApiModelProperty(value = "品牌")
  64 + private String pinpai;
  65 +
  66 + @Excel(name = "工作令", width = 15)
  67 + private String zzl;
  68 +
  69 + /**税率*/
  70 + @Excel(name = "税率(%)", width = 15)
  71 + @ApiModelProperty(value = "税率")
  72 + private String sl;
  73 + /**响应单价*/
  74 + @Excel(name = "响应单价(不含税)", width = 20)
  75 + @ApiModelProperty(value = "响应单价")
  76 + private String xydj;
  77 + /**响应数量*/
  78 + @Excel(name = "响应数量", width = 15)
  79 + @ApiModelProperty(value = "响应数量")
  80 + private String xysl;
  81 + /**响应交货期*/
  82 + @Excel(name = "响应交货期", width = 15)
  83 + @ApiModelProperty(value = "响应交货期")
  84 + private String xyjhq;
  85 + /**响应说明*/
  86 + @Excel(name = "响应说明", width = 15)
  87 + @ApiModelProperty(value = "响应说明")
  88 + private String xysm = "无";
  89 + /**响应品牌*/
  90 + @Excel(name = "响应品牌", width = 15)
  91 + @ApiModelProperty(value = "响应品牌")
  92 + private String xypp;
  93 + /**响应币种*/
  94 + @Excel(name = "响应币种", width = 15)
  95 + @ApiModelProperty(value = "响应币种")
  96 + private String xybz = "元";
  97 +// /**交货期否决项*/
  98 +// @Excel(name = "交货期否决项", width = 15)
  99 +// @ApiModelProperty(value = "交货期否决项")
  100 +// private String jhqfjx;
  101 +// /**付款方式否决项*/
  102 +// @Excel(name = "付款方式否决项", width = 15)
  103 +// @ApiModelProperty(value = "付款方式否决项")
  104 +// private String fkfsfjx;
  105 + /**规格型号否决项*/
  106 + @Excel(name = "规格型号否决项*", width = 18)
  107 + @ApiModelProperty(value = "规格型号否决项")
  108 + private String ggxhfjx = "接受";
  109 + /**品牌否决项*/
  110 + @Excel(name = "品牌否决项*", width = 18)
  111 + @ApiModelProperty(value = "品牌否决项")
  112 + private String ppfjx = "接受";
  113 +
  114 + /**询价标书文件号*/
  115 + @ApiModelProperty(value = "询价标书文件号")
  116 + private String xjbswjh;
  117 +
  118 +
  119 +
  120 +
  121 +}