退款单返回商品图片url+remark字段
This commit is contained in:
parent
d333f11d34
commit
7bc7523ad5
|
|
@ -51,6 +51,8 @@ public class ReceiptDetailVO {
|
||||||
|
|
||||||
private Integer productNumber;
|
private Integer productNumber;
|
||||||
|
|
||||||
|
private String imageUrl;
|
||||||
|
|
||||||
private Integer stock;
|
private Integer stock;
|
||||||
|
|
||||||
@JsonSerialize(using = BigDecimalSerializerBO.class)
|
@JsonSerialize(using = BigDecimalSerializerBO.class)
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,8 @@ public class RetailRefundVO {
|
||||||
|
|
||||||
private String productInfo;
|
private String productInfo;
|
||||||
|
|
||||||
|
private String remark;
|
||||||
|
|
||||||
private String operator;
|
private String operator;
|
||||||
|
|
||||||
private Integer productNumber;
|
private Integer productNumber;
|
||||||
|
|
|
||||||
|
|
@ -825,6 +825,7 @@ public class ReceiptRetailServiceImpl extends ServiceImpl<ReceiptRetailMainMappe
|
||||||
.receiptNumber(item.getReceiptNumber())
|
.receiptNumber(item.getReceiptNumber())
|
||||||
.receiptDate(item.getReceiptDate())
|
.receiptDate(item.getReceiptDate())
|
||||||
.productInfo(item.getRemark())
|
.productInfo(item.getRemark())
|
||||||
|
.remark(item.getRemark())
|
||||||
.operator(crateBy)
|
.operator(crateBy)
|
||||||
.productNumber(productNumber)
|
.productNumber(productNumber)
|
||||||
.totalPrice(item.getTotalAmount())
|
.totalPrice(item.getTotalAmount())
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ import com.wansenai.entities.financial.FinancialAccount;
|
||||||
import com.wansenai.entities.financial.FinancialMain;
|
import com.wansenai.entities.financial.FinancialMain;
|
||||||
import com.wansenai.entities.financial.FinancialSub;
|
import com.wansenai.entities.financial.FinancialSub;
|
||||||
import com.wansenai.entities.product.Product;
|
import com.wansenai.entities.product.Product;
|
||||||
|
import com.wansenai.entities.product.ProductImage;
|
||||||
import com.wansenai.entities.receipt.*;
|
import com.wansenai.entities.receipt.*;
|
||||||
import com.wansenai.entities.user.SysUser;
|
import com.wansenai.entities.user.SysUser;
|
||||||
import com.wansenai.mappers.financial.FinancialMainMapper;
|
import com.wansenai.mappers.financial.FinancialMainMapper;
|
||||||
|
|
@ -35,6 +36,7 @@ import com.wansenai.service.basic.MemberService;
|
||||||
import com.wansenai.service.basic.SupplierService;
|
import com.wansenai.service.basic.SupplierService;
|
||||||
import com.wansenai.service.common.CommonService;
|
import com.wansenai.service.common.CommonService;
|
||||||
import com.wansenai.service.financial.IFinancialAccountService;
|
import com.wansenai.service.financial.IFinancialAccountService;
|
||||||
|
import com.wansenai.service.product.ProductImageService;
|
||||||
import com.wansenai.service.product.ProductService;
|
import com.wansenai.service.product.ProductService;
|
||||||
import com.wansenai.service.receipt.*;
|
import com.wansenai.service.receipt.*;
|
||||||
import com.wansenai.service.user.ISysUserService;
|
import com.wansenai.service.user.ISysUserService;
|
||||||
|
|
@ -49,6 +51,7 @@ import com.wansenai.vo.receipt.ReceiptVO;
|
||||||
import com.wansenai.vo.receipt.retail.StatisticalDataVO;
|
import com.wansenai.vo.receipt.retail.StatisticalDataVO;
|
||||||
import com.wansenai.vo.report.*;
|
import com.wansenai.vo.report.*;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
@ -89,6 +92,8 @@ public class ReceiptServiceImpl implements ReceiptService {
|
||||||
|
|
||||||
private final ProductService productService;
|
private final ProductService productService;
|
||||||
|
|
||||||
|
private final ProductImageService productImageService;
|
||||||
|
|
||||||
private final ProductStockMapper productStockMapper;
|
private final ProductStockMapper productStockMapper;
|
||||||
|
|
||||||
private final IFinancialAccountService accountService;
|
private final IFinancialAccountService accountService;
|
||||||
|
|
@ -99,7 +104,13 @@ public class ReceiptServiceImpl implements ReceiptService {
|
||||||
|
|
||||||
private final FinancialSubMapper financialSubMapper;
|
private final FinancialSubMapper financialSubMapper;
|
||||||
|
|
||||||
public ReceiptServiceImpl(ReceiptRetailService receiptRetailService, ReceiptRetailSubService receiptRetailSubService, ReceiptSaleService receiptSaleService, ReceiptSaleSubService receiptSaleSubService, ReceiptPurchaseService receiptPurchaseService, ReceiptPurchaseSubService receiptPurchaseSubService, MemberService memberService, CustomerService customerService, SupplierService supplierService, ISysUserService userService, ProductService productService, ProductStockMapper productStockMapper, IFinancialAccountService accountService, CommonService commonService, FinancialMainMapper financialMainMapper, FinancialSubMapper financialSubMapper) {
|
public ReceiptServiceImpl(ReceiptRetailService receiptRetailService, ReceiptRetailSubService receiptRetailSubService,
|
||||||
|
ReceiptSaleService receiptSaleService, ReceiptSaleSubService receiptSaleSubService,
|
||||||
|
ReceiptPurchaseService receiptPurchaseService, ReceiptPurchaseSubService receiptPurchaseSubService,
|
||||||
|
MemberService memberService, CustomerService customerService, SupplierService supplierService,
|
||||||
|
ISysUserService userService, ProductService productService, ProductStockMapper productStockMapper,
|
||||||
|
IFinancialAccountService accountService, CommonService commonService, FinancialMainMapper financialMainMapper,
|
||||||
|
FinancialSubMapper financialSubMapper,ProductImageService productImageService) {
|
||||||
this.receiptRetailService = receiptRetailService;
|
this.receiptRetailService = receiptRetailService;
|
||||||
this.receiptRetailSubService = receiptRetailSubService;
|
this.receiptRetailSubService = receiptRetailSubService;
|
||||||
this.receiptSaleService = receiptSaleService;
|
this.receiptSaleService = receiptSaleService;
|
||||||
|
|
@ -116,6 +127,7 @@ public class ReceiptServiceImpl implements ReceiptService {
|
||||||
this.commonService = commonService;
|
this.commonService = commonService;
|
||||||
this.financialMainMapper = financialMainMapper;
|
this.financialMainMapper = financialMainMapper;
|
||||||
this.financialSubMapper = financialSubMapper;
|
this.financialSubMapper = financialSubMapper;
|
||||||
|
this.productImageService = productImageService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -594,6 +606,14 @@ public class ReceiptServiceImpl implements ReceiptService {
|
||||||
receiptDetailVO.setProductStandard(productVO.getProductStandard());
|
receiptDetailVO.setProductStandard(productVO.getProductStandard());
|
||||||
receiptDetailVO.setProductModel(productVO.getProductModel());
|
receiptDetailVO.setProductModel(productVO.getProductModel());
|
||||||
receiptDetailVO.setUnit(productVO.getProductUnit());
|
receiptDetailVO.setUnit(productVO.getProductUnit());
|
||||||
|
|
||||||
|
// 查图片
|
||||||
|
List<ProductImage> imageUrlList = productImageService.lambdaQuery()
|
||||||
|
.eq(ProductImage::getProductId, productVO.getProductId())
|
||||||
|
.list();
|
||||||
|
if(CollectionUtils.isNotEmpty(imageUrlList)){
|
||||||
|
receiptDetailVO.setImageUrl(imageUrlList.get(0).getImageUrl());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 查询库存
|
// 查询库存
|
||||||
var stock = productStockMapper.getProductSkuByBarCode(item.getProductBarcode(), item.getWarehouseId());
|
var stock = productStockMapper.getProductSkuByBarCode(item.getProductBarcode(), item.getWarehouseId());
|
||||||
|
|
@ -601,6 +621,7 @@ public class ReceiptServiceImpl implements ReceiptService {
|
||||||
receiptDetailVO.setStock(stock.getStock());
|
receiptDetailVO.setStock(stock.getStock());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
receiptDetailVos.add(receiptDetailVO);
|
receiptDetailVos.add(receiptDetailVO);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue