耗材联动更新

This commit is contained in:
2026-04-10 10:49:35 +08:00
parent 799167a26b
commit 7e698eee0d
10 changed files with 160 additions and 232 deletions

View File

@@ -39,10 +39,12 @@ public class ConsStockFlow implements Serializable {
*/
private Long vendorId;
/**
* {@link com.czg.product.enums.InOutTypeEnum}
* 出入库类型 in-入库 out-出库
*/
private String inOutType;
/**
* {@link com.czg.product.enums.InOutItemEnum}
* 出入库名目 manual-in:手动入库 manual-out:手动出库 win-in:盘盈入库 loss-out:盘亏出库 order-in:订单退款入库 order-out:订单消费出库 damage-out:损耗出库
*/
private String inOutItem;

View File

@@ -30,4 +30,6 @@ public interface ProdConsRelationService extends IService<ProdConsRelation> {
*/
void saveProdConsRelation(ProdConsBindDTO dto);
List<ProdConsRelationDTO> selectListByProdId(Long prodId);
}

View File

@@ -1,13 +1,19 @@
package com.czg.product.service;
import com.czg.product.dto.ProductDTO;
import com.czg.product.entity.ConsStockFlow;
import com.czg.product.entity.Product;
import com.czg.product.entity.ProductStockFlow;
import com.czg.product.enums.InOutItemEnum;
import com.czg.product.enums.InOutTypeEnum;
import com.czg.product.param.*;
import com.czg.product.vo.ProductStatisticsVo;
import com.czg.product.vo.ProductStockVO;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import jakarta.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
@@ -39,7 +45,7 @@ public interface ProductService extends IService<Product> {
/**
* 从缓存里面获取商品列表
*
* @param shopId 店铺ID
* @param shopId 店铺ID
* @param categoryId 商品分类ID
* @return 商品列表数据
*/
@@ -115,4 +121,17 @@ public interface ProductService extends IService<Product> {
* @param param 商品统计入参
*/
ProductStatisticsVo getProductStatistics(ProductInfoParam param);
/**
* 商品出入库流水查询
*
* @param param 查询参数
* @return 分页数据
*/
Page<ProductStockFlow> findProductStockFlowPage(ProductStockFlowParam param);
/**
* 通过商品 进行耗材库存增减
*/
void consStockByProduct(InOutTypeEnum type, InOutItemEnum item, List<ProductStockVO> products, Long orderId, String remark);
}

View File

@@ -0,0 +1,10 @@
package com.czg.product.vo;
import java.math.BigDecimal;
/**
* 产品库存VO
* @author ww
*/
public record ProductStockVO(Long productId, BigDecimal number) {
}