|
@ -46,6 +46,7 @@ import com.yxt.supervise.portal.api.purchaserequisitionpro.PurchaseRequisitionPr |
|
|
import com.yxt.supervise.portal.api.restrictedcategory.RestrictedCategory; |
|
|
import com.yxt.supervise.portal.api.restrictedcategory.RestrictedCategory; |
|
|
import com.yxt.supervise.portal.biz.brandinfo.BrandInfoService; |
|
|
import com.yxt.supervise.portal.biz.brandinfo.BrandInfoService; |
|
|
import com.yxt.supervise.portal.biz.dictcommon.DictCommonService; |
|
|
import com.yxt.supervise.portal.biz.dictcommon.DictCommonService; |
|
|
|
|
|
import com.yxt.supervise.portal.biz.gdinventory.GdInventoryOkService; |
|
|
import com.yxt.supervise.portal.biz.productinformation.ProductInformationService; |
|
|
import com.yxt.supervise.portal.biz.productinformation.ProductInformationService; |
|
|
import com.yxt.supervise.portal.biz.purchaserequisition.PurchaseRequisitionService; |
|
|
import com.yxt.supervise.portal.biz.purchaserequisition.PurchaseRequisitionService; |
|
|
import com.yxt.supervise.portal.biz.purchaserequisitionpro.PurchaseRequisitionProService; |
|
|
import com.yxt.supervise.portal.biz.purchaserequisitionpro.PurchaseRequisitionProService; |
|
@ -81,6 +82,8 @@ import java.util.*; |
|
|
@Slf4j |
|
|
@Slf4j |
|
|
@Service |
|
|
@Service |
|
|
public class ProductNumService extends MybatisBaseService<ProductNumMapper, ProductNum> { |
|
|
public class ProductNumService extends MybatisBaseService<ProductNumMapper, ProductNum> { |
|
|
|
|
|
@Resource |
|
|
|
|
|
private GdInventoryOkService gdInventoryOkService; |
|
|
private QueryWrapper<ProductNum> createQueryWrapper(ProductNumQuery query) { |
|
|
private QueryWrapper<ProductNum> createQueryWrapper(ProductNumQuery query) { |
|
|
// todo: 这里根据具体业务调整查询条件
|
|
|
// todo: 这里根据具体业务调整查询条件
|
|
|
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
|
|
|
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
|
|
@ -475,7 +478,7 @@ public class ProductNumService extends MybatisBaseService<ProductNumMapper, Prod |
|
|
String title = "商品订货明细限定情况"; |
|
|
String title = "商品订货明细限定情况"; |
|
|
String[] col = {"审核单号","状态","合计金额"}; |
|
|
String[] col = {"审核单号","状态","合计金额"}; |
|
|
String[] col1 = {"序号","采购订单编号","厂商编码","厂商名称","商品代码","商品条码","商品名称","单位","进价","箱规", |
|
|
String[] col1 = {"序号","采购订单编号","厂商编码","厂商名称","商品代码","商品条码","商品名称","单位","进价","箱规", |
|
|
"订货数量","订货金额(元)","合计","税票","降价折扣%","判定结果","备注"}; |
|
|
"订货数量","订货金额(元)","合计","税票","降价折扣%","库存","判定结果","备注"}; |
|
|
//sheet名
|
|
|
//sheet名
|
|
|
String sheetName = pc+"商品订货明细限定情况"; |
|
|
String sheetName = pc+"商品订货明细限定情况"; |
|
|
//创建HSSFWorkbook
|
|
|
//创建HSSFWorkbook
|
|
@ -490,7 +493,7 @@ public class ProductNumService extends MybatisBaseService<ProductNumMapper, Prod |
|
|
// 第二步,在workbook中添加一个sheet,对应Excel文件中的sheet
|
|
|
// 第二步,在workbook中添加一个sheet,对应Excel文件中的sheet
|
|
|
HSSFSheet sheet = wb.createSheet(sheetName); |
|
|
HSSFSheet sheet = wb.createSheet(sheetName); |
|
|
// 合并单元格:参数:起始行, 终止行, 起始列, 终止列
|
|
|
// 合并单元格:参数:起始行, 终止行, 起始列, 终止列
|
|
|
CellRangeAddress cra = new CellRangeAddress(0, 0, 0, 17); |
|
|
CellRangeAddress cra = new CellRangeAddress(0, 0, 0, 18); |
|
|
sheet.addMergedRegion(cra); |
|
|
sheet.addMergedRegion(cra); |
|
|
// 第三步,在sheet中添加表头第0行,注意老版本poi对Excel的行数列数有限制
|
|
|
// 第三步,在sheet中添加表头第0行,注意老版本poi对Excel的行数列数有限制
|
|
|
|
|
|
|
|
@ -512,6 +515,7 @@ public class ProductNumService extends MybatisBaseService<ProductNumMapper, Prod |
|
|
String pd="符合"; |
|
|
String pd="符合"; |
|
|
Map<String,Object> map=new HashMap<>(); |
|
|
Map<String,Object> map=new HashMap<>(); |
|
|
map.put("pd",pd); |
|
|
map.put("pd",pd); |
|
|
|
|
|
Map<String, String> numberMapOfProduct = gdInventoryOkService.numberMapOfProduct(); |
|
|
//创建内容
|
|
|
//创建内容
|
|
|
for(int i=0;i<productNums.size();i++){ |
|
|
for(int i=0;i<productNums.size();i++){ |
|
|
row = sheet.createRow(i + 2); |
|
|
row = sheet.createRow(i + 2); |
|
@ -538,8 +542,11 @@ public class ProductNumService extends MybatisBaseService<ProductNumMapper, Prod |
|
|
if(pd.equals("不符合")){ |
|
|
if(pd.equals("不符合")){ |
|
|
map.put("pd",pd); |
|
|
map.put("pd",pd); |
|
|
} |
|
|
} |
|
|
row.createCell(15).setCellValue(pd); |
|
|
String code = productNums.get(i).getCode(); |
|
|
row.createCell(16).setCellValue(productNums.get(i).getRemarks()); |
|
|
String s = numberMapOfProduct.get(code); |
|
|
|
|
|
row.createCell(15).setCellValue(s==null?"0":s);//库存
|
|
|
|
|
|
row.createCell(16).setCellValue(pd); |
|
|
|
|
|
row.createCell(17).setCellValue(productNums.get(i).getRemarks()); |
|
|
} |
|
|
} |
|
|
map.put("wb",wb); |
|
|
map.put("wb",wb); |
|
|
|
|
|
|
|
|