作者 Win10-2023FDZSZ\Administrator

投标文件下载

... ... @@ -22,6 +22,7 @@ import org.jeecg.modules.erp.trade.entity.TblTradeBidMaterialDetails;
import org.jeecg.modules.erp.trade.entity.TblTradeBidSub;
import org.jeecg.modules.erp.trade.service.ITblTradeBidMaterialDetailsService;
import org.jeecg.modules.erp.trade.service.ITblTradeBidSubService;
import org.jeecg.modules.erp.trade.vo.TblTradeTenderInfoVO;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
... ... @@ -241,43 +242,63 @@ public class TblTradePriceInquiryController {
return Result.OK(page);
}
// /**
// * 导出excel
// *
// * @param request
// * @param tblTradePriceInquiry
// */
// @RequestMapping(value = "/exportXls")
// public ModelAndView exportXls(HttpServletRequest request, TblTradePriceInquiry tblTradePriceInquiry) {
// // Step.1 组装查询条件查询数据
// QueryWrapper<TblTradePriceInquiry> queryWrapper = QueryGenerator.initQueryWrapper(tblTradePriceInquiry, request.getParameterMap());
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//
// //配置选中数据查询条件
// String selections = request.getParameter("selections");
// if (oConvertUtils.isNotEmpty(selections)) {
// List<String> selectionList = Arrays.asList(selections.split(","));
// queryWrapper.in("id", selectionList);
// }
// //Step.2 获取导出数据
// List<TblTradePriceInquiry> tblTradePriceInquiryList = tblTradePriceInquiryService.list(queryWrapper);
//
// // Step.3 组装pageList
// List<TblTradePriceInquiryPage> pageList = new ArrayList<TblTradePriceInquiryPage>();
// for (TblTradePriceInquiry main : tblTradePriceInquiryList) {
// TblTradePriceInquiryPage vo = new TblTradePriceInquiryPage();
// BeanUtils.copyProperties(main, vo);
// List<TblTradeTenderInfo> tblTradeTenderInfoList = tblTradeTenderInfoService.selectByMainId(main.getId());
// vo.setTblTradeTenderInfoList(tblTradeTenderInfoList);
// pageList.add(vo);
// }
//
// // Step.4 AutoPoi 导出Excel
// ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
// mv.addObject(NormalExcelConstants.FILE_NAME, "询价表列表");
// mv.addObject(NormalExcelConstants.CLASS, TblTradePriceInquiryPage.class);
// mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("询价表数据", "导出人:" + sysUser.getRealname(), "询价表"));
// mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
// return mv;
// }
/**
* 导出excel
*
* 生成投标文件
* @param request
* @param tblTradePriceInquiry
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TblTradePriceInquiry tblTradePriceInquiry) {
// Step.1 组装查询条件查询数据
QueryWrapper<TblTradePriceInquiry> queryWrapper = QueryGenerator.initQueryWrapper(tblTradePriceInquiry, request.getParameterMap());
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
// 获取导出数据
List<TblTradeTenderInfoVO> bidExcelData = tblTradePriceInquiryService.getBidExcelData(tblTradePriceInquiry.getXjbswjh());
//配置选中数据查询条件
String selections = request.getParameter("selections");
if (oConvertUtils.isNotEmpty(selections)) {
List<String> selectionList = Arrays.asList(selections.split(","));
queryWrapper.in("id", selectionList);
}
//Step.2 获取导出数据
List<TblTradePriceInquiry> tblTradePriceInquiryList = tblTradePriceInquiryService.list(queryWrapper);
// Step.3 组装pageList
List<TblTradePriceInquiryPage> pageList = new ArrayList<TblTradePriceInquiryPage>();
for (TblTradePriceInquiry main : tblTradePriceInquiryList) {
TblTradePriceInquiryPage vo = new TblTradePriceInquiryPage();
BeanUtils.copyProperties(main, vo);
List<TblTradeTenderInfo> tblTradeTenderInfoList = tblTradeTenderInfoService.selectByMainId(main.getId());
vo.setTblTradeTenderInfoList(tblTradeTenderInfoList);
pageList.add(vo);
}
// Step.4 AutoPoi 导出Excel
// AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
mv.addObject(NormalExcelConstants.FILE_NAME, "询价表列表");
mv.addObject(NormalExcelConstants.CLASS, TblTradePriceInquiryPage.class);
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("询价表数据", "导出人:" + sysUser.getRealname(), "询价表"));
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
// mv.addObject(NormalExcelConstants.FILE_NAME, "询价表列表");
mv.addObject(NormalExcelConstants.CLASS, TblTradeTenderInfoVO.class);
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams(null, null, "投标表"));
mv.addObject(NormalExcelConstants.DATA_LIST, bidExcelData);
return mv;
}
... ...
... ... @@ -79,10 +79,12 @@ public class TblTradeBidSub implements Serializable {
/**库存数据*/
@Excel(name = "库存数据", width = 15)
@ApiModelProperty(value = "库存数据")
@TableField(exist = false)
private java.lang.String kcsj;
/**在途库存*/
@Excel(name = "在途库存", width = 15)
@ApiModelProperty(value = "在途库存")
@TableField(exist = false)
private java.lang.String ztkf;
/**库存单价(含税运)(元)*/
@Excel(name = "库存单价(含税运)(元)", width = 15)
... ...
... ... @@ -5,6 +5,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.erp.trade.entity.TblTradePriceInquiry;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.erp.trade.vo.TblTradeTenderInfoVO;
/**
* @Description: 询价表
... ... @@ -14,4 +15,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface TblTradePriceInquiryMapper extends BaseMapper<TblTradePriceInquiry> {
List<TblTradeTenderInfoVO> getBidExcelData(String xjbswjh);
}
... ...
... ... @@ -2,4 +2,11 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.erp.trade.mapper.TblTradePriceInquiryMapper">
<select id="getBidExcelData" resultType="org.jeecg.modules.erp.trade.vo.TblTradeTenderInfoVO">
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
from tbl_trade_bid_sub a
join tbl_trade_tender_info b on b.xjbswjh = a.xjbswjh and b.`code`=a.wlbm
where a.xjbswjh = #{xjbswjh} and a.status = '3'
</select>
</mapper>
\ No newline at end of file
... ...
... ... @@ -3,6 +3,8 @@ package org.jeecg.modules.erp.trade.service;
import org.jeecg.modules.erp.trade.entity.TblTradeTenderInfo;
import org.jeecg.modules.erp.trade.entity.TblTradePriceInquiry;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.erp.trade.vo.TblTradeTenderInfoVO;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
... ... @@ -44,5 +46,11 @@ public interface ITblTradePriceInquiryService extends IService<TblTradePriceInqu
* @param idList
*/
public void delBatchMain (Collection<? extends Serializable> idList);
/**
* 生成投标文件数据
* @param xjbswjh
* @return
*/
List<TblTradeTenderInfoVO> getBidExcelData(String xjbswjh);
}
... ...
... ... @@ -5,6 +5,7 @@ import org.jeecg.modules.erp.trade.entity.TblTradeTenderInfo;
import org.jeecg.modules.erp.trade.mapper.TblTradeTenderInfoMapper;
import org.jeecg.modules.erp.trade.mapper.TblTradePriceInquiryMapper;
import org.jeecg.modules.erp.trade.service.ITblTradePriceInquiryService;
import org.jeecg.modules.erp.trade.vo.TblTradeTenderInfoVO;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -73,5 +74,10 @@ public class TblTradePriceInquiryServiceImpl extends ServiceImpl<TblTradePriceIn
tblTradePriceInquiryMapper.deleteById(id);
}
}
@Override
public List<TblTradeTenderInfoVO> getBidExcelData(String xjbswjh) {
return tblTradePriceInquiryMapper.getBidExcelData(xjbswjh);
}
}
... ...
package org.jeecg.modules.erp.trade.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 贸易招标信息
* @Author: jeecg-boot
* @Date: 2025-02-12
* @Version: V1.0
*/
@ApiModel(value="tbl_trade_tender_info对象", description="贸易招标信息")
@Data
public class TblTradeTenderInfoVO {
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**标段(包)名称*/
@Excel(name = "标段(包)名称", width = 15)
@ApiModelProperty(value = "标段(包)名称")
private String tenderName;
/**物料编码*/
@Excel(name = "物料编码", width = 15)
@ApiModelProperty(value = "物料编码")
private String code;
@Excel(name = "SRM编码", width = 15)
private String srm;
/**物料长描述*/
@Excel(name = "物料长描述", width = 30)
@ApiModelProperty(value = "物料长描述")
private String miaoshu;
/**计量单位*/
@Excel(name = "计量单位", width = 15)
@ApiModelProperty(value = "计量单位")
private String jldw;
/**需求数量*/
@Excel(name = "需求数量", width = 15)
@ApiModelProperty(value = "需求数量")
private String xqsl;
/**需求交货期*/
@Excel(name = "需求交货期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "需求交货期")
private Date xqjhq;
/**品牌*/
@Excel(name = "品牌", width = 15)
@ApiModelProperty(value = "品牌")
private String pinpai;
@Excel(name = "工作令", width = 15)
private String zzl;
/**税率*/
@Excel(name = "税率(%)", width = 15)
@ApiModelProperty(value = "税率")
private String sl;
/**响应单价*/
@Excel(name = "响应单价(不含税)", width = 20)
@ApiModelProperty(value = "响应单价")
private String xydj;
/**响应数量*/
@Excel(name = "响应数量", width = 15)
@ApiModelProperty(value = "响应数量")
private String xysl;
/**响应交货期*/
@Excel(name = "响应交货期", width = 15)
@ApiModelProperty(value = "响应交货期")
private String xyjhq;
/**响应说明*/
@Excel(name = "响应说明", width = 15)
@ApiModelProperty(value = "响应说明")
private String xysm = "无";
/**响应品牌*/
@Excel(name = "响应品牌", width = 15)
@ApiModelProperty(value = "响应品牌")
private String xypp;
/**响应币种*/
@Excel(name = "响应币种", width = 15)
@ApiModelProperty(value = "响应币种")
private String xybz = "元";
// /**交货期否决项*/
// @Excel(name = "交货期否决项", width = 15)
// @ApiModelProperty(value = "交货期否决项")
// private String jhqfjx;
// /**付款方式否决项*/
// @Excel(name = "付款方式否决项", width = 15)
// @ApiModelProperty(value = "付款方式否决项")
// private String fkfsfjx;
/**规格型号否决项*/
@Excel(name = "规格型号否决项*", width = 18)
@ApiModelProperty(value = "规格型号否决项")
private String ggxhfjx = "接受";
/**品牌否决项*/
@Excel(name = "品牌否决项*", width = 18)
@ApiModelProperty(value = "品牌否决项")
private String ppfjx = "接受";
/**询价标书文件号*/
@ApiModelProperty(value = "询价标书文件号")
private String xjbswjh;
}
\ No newline at end of file
... ...