商品列表 结构

耗材库存 列表接口
耗材 库存预警值推送更新
cons.info.change.queue
This commit is contained in:
2026-04-10 13:59:52 +08:00
parent 7e698eee0d
commit b0f0aec94b
23 changed files with 151 additions and 125 deletions

View File

@@ -76,10 +76,6 @@ public class ConsInfoDTO implements Serializable {
* 是否检测耗材: 1 检测 0 不检测
*/
private Integer isStock;
/**
* 是否退款退回: 1 退回 0 不退回
*/
private Integer isRefundStock;
/**
* 第二单位
*/

View File

@@ -41,6 +41,10 @@ public class ProdConsRelationDTO implements Serializable {
*/
@NotNull(message = "使用数量不能为空", groups = DefaultGroup.class)
private BigDecimal surplusStock;
/**
* 耗材预警值
*/
private BigDecimal conWarning;
/**
* 创建时间
*/

View File

@@ -69,10 +69,6 @@ public class ConsInfo implements Serializable {
* 是否检测耗材: 1 检测 0 不检测
*/
private Integer isStock;
/**
* 是否退款退回: 1 退回 0 不退回
*/
private Integer isRefundStock;
/**
* 第二单位
*/

View File

@@ -5,6 +5,7 @@ import com.czg.product.entity.ConsInfo;
import com.czg.product.param.ConsInfoParam;
import com.czg.product.param.ConsSubUnitParam;
import com.czg.product.vo.ConsStatisticsVo;
import com.czg.product.vo.ConsStockRecord;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
@@ -33,6 +34,9 @@ public interface ConsInfoService extends IService<ConsInfo> {
*/
List<ConsInfoDTO> getConsInfoList(ConsInfoDTO param);
List<ConsStockRecord> getConsStockList(Long shopId);
/**
* 获取耗材信息详情
*

View File

@@ -10,6 +10,7 @@ import com.czg.product.vo.ConsCheckStockRecordVo;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import java.math.BigDecimal;
import java.util.List;
/**
@@ -66,6 +67,7 @@ public interface ConsStockFlowService extends IService<ConsStockFlow> {
/**
* 获取耗材库存变动记录
*
* @param param 查询参数
* @return 分页数据
*/
@@ -73,7 +75,16 @@ public interface ConsStockFlowService extends IService<ConsStockFlow> {
/**
* 保存库存变动记录
*
* @param entity 库存变动记录实体
*/
void saveFlow(ConsStockFlow entity);
void saveFlow(ConsStockFlow entity, BigDecimal conWarning);
/**
* 发送库存消息
*
* @param entity 库存变动记录实体
* @param warning 警戒值
*/
boolean sendStockMsg(ConsStockFlow entity, BigDecimal warning);
}

View File

@@ -26,10 +26,10 @@ public interface ProdConsRelationService extends IService<ProdConsRelation> {
* 保存商品耗材绑定关系
*
* @param dto 商品耗材绑定关系DTO
* @return 保存结果
*/
void saveProdConsRelation(ProdConsBindDTO dto);
List<ProdConsRelationDTO> selectListByProdId(Long prodId);
List<ProdConsRelationDTO> selectStockByProdId(Long prodId);
}

View File

@@ -1,7 +1,6 @@
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;
@@ -13,9 +12,7 @@ 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;
/**
* 商品
@@ -49,7 +46,7 @@ public interface ProductService extends IService<Product> {
* @param categoryId 商品分类ID
* @return 商品列表数据
*/
Map<String, Object> getProductCacheList(Long shopId, Long categoryId);
List<ProductDTO> getProductCacheList(Long shopId, Long categoryId);
/**
* 清除某个商品分类的缓存
@@ -133,5 +130,5 @@ public interface ProductService extends IService<Product> {
/**
* 通过商品 进行耗材库存增减
*/
void consStockByProduct(InOutTypeEnum type, InOutItemEnum item, List<ProductStockVO> products, Long orderId, String remark);
void consStockByProduct(Long shopId, InOutTypeEnum type, InOutItemEnum item, List<ProductStockVO> products, Long orderId, String remark);
}

View File

@@ -0,0 +1,6 @@
package com.czg.product.vo;
import java.math.BigDecimal;
public record ConsStockRecord(Long consId, BigDecimal stockNumber) {
}