|
@@ -135,52 +135,6 @@ public class ProductInvoiceServiceImpl implements IProductInvoiceService
|
|
|
vo.setCustomerNo(saleOrder.getSaleCustomNo());
|
|
|
}
|
|
|
|
|
|
- // 查询销售单信息
|
|
|
- SaleOrder saleOrder = saleOrderMapper.selectSaleOrderBySaleNo(saleOrderNo);
|
|
|
-
|
|
|
-// if(saleOrder.getOrderType().equals("1")){
|
|
|
-// List<ProductInvoiceVO.SaleProductInfo> saleProductInfoList = saleProductsMapper.selectSaleProductsInfo1(saleOrderNo);
|
|
|
-// if(productInvoice != null){
|
|
|
-// for (ProductInvoiceVO.SaleProductInfo saleProductInfo : saleProductInfoList){
|
|
|
-//
|
|
|
-// //获取已出库箱数和重量
|
|
|
-// ProductOutboundRecord productOutboundRecord = productOutboundRecordMapper
|
|
|
-// .statisticsBoxNumSuttle1(saleProductInfo.getProductId(), productInvoice.getNoticeNumber(),saleProductInfo.getProductColor());
|
|
|
-//
|
|
|
-// if(productOutboundRecord != null){
|
|
|
-// saleProductInfo.setBoxNum(productOutboundRecord.getBoxNum());
|
|
|
-// saleProductInfo.setWeight(handlingWeight(productOutboundRecord.getSuttle() == null ? 0 : productOutboundRecord.getSuttle()));
|
|
|
-// }else {
|
|
|
-// saleProductInfo.setBoxNum(0);
|
|
|
-// saleProductInfo.setWeight(0.0);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }else {
|
|
|
-// for (ProductInvoiceVO.SaleProductInfo saleProductInfo : saleProductInfoList){
|
|
|
-// saleProductInfo.setBoxNum(0);
|
|
|
-// saleProductInfo.setWeight(0.0);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// //查询当前批号库存箱数,重量
|
|
|
-// ProductInventory productInventory1 = new ProductInventory();
|
|
|
-// productInventory1.setProductId(saleProductInfoList.get(0).getProductId());
|
|
|
-// productInventory1.setLotNum(saleProductInfoList.get(0).getLotNum());
|
|
|
-// ProductInventory productInventory = productInventoryMapper.selectProductInventoryByLotNumAndProductId(productInventory1);
|
|
|
-// if(productInventory != null){
|
|
|
-// vo.setInventoryBoxNum(productInventory.getTotalBoxNum());
|
|
|
-// vo.setInventoryWeight(handlingWeight(productInventory.getTotalSuttle()));
|
|
|
-// }else {
|
|
|
-// vo.setInventoryBoxNum(0);
|
|
|
-// vo.setInventoryWeight(0.0);
|
|
|
-// }
|
|
|
-//
|
|
|
-// //客户编号
|
|
|
-// vo.setCustomerId(saleOrderMapper.selectCustomerIdBySaleNo(saleOrderNo));
|
|
|
-// vo.setSaleProductInfoList(saleProductInfoList);
|
|
|
-//
|
|
|
-//
|
|
|
-// }else {
|
|
|
-
|
|
|
//表格数据
|
|
|
|
|
|
//查询所有订单货品信息
|
|
@@ -232,74 +186,13 @@ public class ProductInvoiceServiceImpl implements IProductInvoiceService
|
|
|
vo.setInventoryWeight(0.0);
|
|
|
vo.setSaleProductInfoList(saleProductInfoList);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
//客户编号
|
|
|
vo.setCustomerId(saleOrderMapper.selectCustomerIdBySaleNo(saleOrderNo));
|
|
|
|
|
|
-// }
|
|
|
-
|
|
|
return vo;
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-// @Override
|
|
|
-// public ProductInvoiceVO productInvoiceInfo(String saleOrderNo) {
|
|
|
-// ProductInvoiceVO vo = new ProductInvoiceVO();
|
|
|
-// // 顶部数据回显
|
|
|
-// ProductInvoice productInvoice = productInvoiceMapper.selectProductInvoiceBySaleOrderNo(saleOrderNo);
|
|
|
-// if(productInvoice != null){
|
|
|
-// BeanUtils.copyProperties(productInvoice, vo);
|
|
|
-// }else {
|
|
|
-// SaleOrder saleOrder = saleOrderMapper.selectSaleOrderBySaleNo(saleOrderNo);
|
|
|
-// vo.setCustomerNo(saleOrder.getSaleCustomNo());
|
|
|
-// }
|
|
|
-// //表格数据
|
|
|
-// //根据销售单编号查询货品信息
|
|
|
-// List<ProductInvoiceVO.SaleProductInfo> saleProductInfoList = saleProductsMapper.selectSaleProductsInfo(saleOrderNo);
|
|
|
-//
|
|
|
-//
|
|
|
-// if(productInvoice != null){
|
|
|
-// for (ProductInvoiceVO.SaleProductInfo saleProductInfo : saleProductInfoList){
|
|
|
-//
|
|
|
-// //获取已出库箱数和重量
|
|
|
-// ProductOutboundRecord productOutboundRecord = productOutboundRecordMapper
|
|
|
-// .statisticsBoxNumSuttle(saleProductInfo.getProductId(), productInvoice.getNoticeNumber(),saleProductInfo.getQrCode());
|
|
|
-//
|
|
|
-// if(productOutboundRecord != null){
|
|
|
-// saleProductInfo.setBoxNum(productOutboundRecord.getBoxNum());
|
|
|
-// saleProductInfo.setWeight(handlingWeight(productOutboundRecord.getSuttle() == null ? 0 : productOutboundRecord.getSuttle()));
|
|
|
-// }else {
|
|
|
-// saleProductInfo.setBoxNum(0);
|
|
|
-// saleProductInfo.setWeight(0.0);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }else {
|
|
|
-// for (ProductInvoiceVO.SaleProductInfo saleProductInfo : saleProductInfoList){
|
|
|
-// saleProductInfo.setBoxNum(0);
|
|
|
-// saleProductInfo.setWeight(0.0);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// //查询当前批号库存箱数,重量
|
|
|
-// ProductInventory productInventory1 = new ProductInventory();
|
|
|
-// productInventory1.setProductId(saleProductInfoList.get(0).getProductId());
|
|
|
-// productInventory1.setLotNum(saleProductInfoList.get(0).getLotNum());
|
|
|
-// ProductInventory productInventory = productInventoryMapper.selectProductInventoryByLotNumAndProductId(productInventory1);
|
|
|
-// if(productInventory != null){
|
|
|
-// vo.setInventoryBoxNum(productInventory.getTotalBoxNum());
|
|
|
-// vo.setInventoryWeight(handlingWeight(productInventory.getTotalSuttle()));
|
|
|
-// }else {
|
|
|
-// vo.setInventoryBoxNum(0);
|
|
|
-// vo.setInventoryWeight(0.0);
|
|
|
-// }
|
|
|
-//
|
|
|
-// //客户编号
|
|
|
-// vo.setCustomerId(saleOrderMapper.selectCustomerIdBySaleNo(saleOrderNo));
|
|
|
-// vo.setSaleProductInfoList(saleProductInfoList);
|
|
|
-// return vo;
|
|
|
-// }
|
|
|
-
|
|
|
@Override
|
|
|
public ProductInvoiceVO saleStorageDetails(Long id) {
|
|
|
ProductInvoiceVO vo = new ProductInvoiceVO();
|
|
@@ -334,63 +227,12 @@ public class ProductInvoiceServiceImpl implements IProductInvoiceService
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-// List<ProductInvoiceVO.SaleProductInfo> saleProductInfoList = new ArrayList<>();
|
|
|
-//
|
|
|
-// if(saleOrder.getOrderType().equals("1")){
|
|
|
-// //查询发货单货品详情,循环得到货品实发箱数、重量
|
|
|
-// saleProductInfoList = saleProductsMapper.selectSaleProductsInfo1(productInvoice.getSaleOrderNo());
|
|
|
-// }else {
|
|
|
-//
|
|
|
-//
|
|
|
-// saleProductInfoList = saleProductsMapper.selectSaleProductsInfo(productInvoice.getSaleOrderNo());
|
|
|
-// }
|
|
|
-//
|
|
|
-// for (ProductInvoiceVO.SaleProductInfo saleProductInfo : saleProductInfoList){
|
|
|
-// //实发箱数、重量
|
|
|
-// ProductHandsetOutboundRecord productHandsetOutboundRecord =
|
|
|
-// productHandsetOutboundRecordMapper.selectBoxNumSuttle1(saleProductInfo.getProductId(), productInvoice.getNoticeNumber(),saleProductInfo.getProductColor());
|
|
|
-// if(productHandsetOutboundRecord != null){
|
|
|
-// saleProductInfo.setBoxNum(productHandsetOutboundRecord.getBoxNum());
|
|
|
-// saleProductInfo.setWeight(handlingWeight(productHandsetOutboundRecord.getSuttle() == null ? 0 : productHandsetOutboundRecord.getSuttle()));
|
|
|
-// }
|
|
|
-// }
|
|
|
-
|
|
|
//客户编号
|
|
|
vo.setCustomerId(saleOrderMapper.selectCustomerIdBySaleNo(productInvoice.getSaleOrderNo()));
|
|
|
vo.setSaleProductInfoList(saleProductInfoList1);
|
|
|
return vo;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-// @Override
|
|
|
-// public ProductInvoiceVO saleStorageDetails(Long id) {
|
|
|
-// ProductInvoiceVO vo = new ProductInvoiceVO();
|
|
|
-// //查询发货通知单详情
|
|
|
-// ProductInvoice productInvoice = productInvoiceMapper.selectProductInvoiceById(id);
|
|
|
-// BeanUtils.copyProperties(productInvoice, vo);
|
|
|
-//
|
|
|
-//
|
|
|
-// //查询发货单货品详情,循环得到货品实发箱数、重量
|
|
|
-// List<ProductInvoiceVO.SaleProductInfo> saleProductInfoList = saleProductsMapper.selectSaleProductsInfo(productInvoice.getSaleOrderNo());
|
|
|
-//
|
|
|
-//
|
|
|
-// for (ProductInvoiceVO.SaleProductInfo saleProductInfo : saleProductInfoList){
|
|
|
-// //实发箱数、重量
|
|
|
-// ProductHandsetOutboundRecord productHandsetOutboundRecord =
|
|
|
-// productHandsetOutboundRecordMapper.selectBoxNumSuttle(saleProductInfo.getProductId(), productInvoice.getNoticeNumber(), saleProductInfo.getQrCode());
|
|
|
-// if(productHandsetOutboundRecord != null){
|
|
|
-// saleProductInfo.setBoxNum(productHandsetOutboundRecord.getBoxNum());
|
|
|
-// saleProductInfo.setWeight(handlingWeight(productHandsetOutboundRecord.getSuttle() == null ? 0 : productHandsetOutboundRecord.getSuttle()));
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// //客户编号
|
|
|
-// vo.setCustomerId(saleOrderMapper.selectCustomerIdBySaleNo(productInvoice.getSaleOrderNo()));
|
|
|
-// vo.setSaleProductInfoList(saleProductInfoList);
|
|
|
-// return vo;
|
|
|
-// }
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public ProductInvoice selectProductInvoiceBySaleOrderNo(String saleOrderNo) {
|