消息通知
This commit is contained in:
@@ -11,7 +11,11 @@ import com.czg.product.entity.*;
|
|||||||
import com.czg.product.enums.InOutItemEnum;
|
import com.czg.product.enums.InOutItemEnum;
|
||||||
import com.czg.product.enums.InOutTypeEnum;
|
import com.czg.product.enums.InOutTypeEnum;
|
||||||
import com.czg.product.service.ProductRpcService;
|
import com.czg.product.service.ProductRpcService;
|
||||||
import com.czg.service.product.mapper.*;
|
import com.czg.product.service.ProductStockFlowService;
|
||||||
|
import com.czg.service.product.mapper.ConsInfoMapper;
|
||||||
|
import com.czg.service.product.mapper.ConsStockFlowMapper;
|
||||||
|
import com.czg.service.product.mapper.ProdConsRelationMapper;
|
||||||
|
import com.czg.service.product.mapper.ProductMapper;
|
||||||
import com.mybatisflex.core.query.QueryWrapper;
|
import com.mybatisflex.core.query.QueryWrapper;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -46,7 +50,7 @@ public class ProductRpcServiceImpl implements ProductRpcService {
|
|||||||
@Resource
|
@Resource
|
||||||
private ConsStockFlowMapper consStockFlowMapper;
|
private ConsStockFlowMapper consStockFlowMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private ProductStockFlowMapper productStockFlowMapper;
|
private ProductStockFlowService productStockFlowService;
|
||||||
@Resource
|
@Resource
|
||||||
private RabbitPublisher rabbitPublisher;
|
private RabbitPublisher rabbitPublisher;
|
||||||
|
|
||||||
@@ -77,7 +81,7 @@ public class ProductRpcServiceImpl implements ProductRpcService {
|
|||||||
flow.setInOutType(InOutTypeEnum.OUT.value());
|
flow.setInOutType(InOutTypeEnum.OUT.value());
|
||||||
flow.setInOutItem(InOutItemEnum.ORDER_OUT.value());
|
flow.setInOutItem(InOutItemEnum.ORDER_OUT.value());
|
||||||
flow.setOrderId(orderId);
|
flow.setOrderId(orderId);
|
||||||
productStockFlowMapper.insert(flow);
|
productStockFlowService.saveFlow(flow);
|
||||||
// 查询商品绑定耗材信息
|
// 查询商品绑定耗材信息
|
||||||
List<ProdConsRelation> relationList = prodConsRelationMapper.selectListByQuery(QueryWrapper.create().eq(ProdConsRelation::getProductId, dto.getProductId()));
|
List<ProdConsRelation> relationList = prodConsRelationMapper.selectListByQuery(QueryWrapper.create().eq(ProdConsRelation::getProductId, dto.getProductId()));
|
||||||
if (CollUtil.isEmpty(relationList)) {
|
if (CollUtil.isEmpty(relationList)) {
|
||||||
@@ -149,7 +153,7 @@ public class ProductRpcServiceImpl implements ProductRpcService {
|
|||||||
flow.setInOutType(InOutTypeEnum.IN.value());
|
flow.setInOutType(InOutTypeEnum.IN.value());
|
||||||
flow.setInOutItem(InOutItemEnum.ORDER_IN.value());
|
flow.setInOutItem(InOutItemEnum.ORDER_IN.value());
|
||||||
flow.setOrderId(orderId);
|
flow.setOrderId(orderId);
|
||||||
productStockFlowMapper.insert(flow);
|
productStockFlowService.saveFlow(flow);
|
||||||
// 查询商品绑定耗材信息
|
// 查询商品绑定耗材信息
|
||||||
List<ProdConsRelation> relationList = prodConsRelationMapper.selectListByQuery(QueryWrapper.create().eq(ProdConsRelation::getProductId, dto.getProductId()));
|
List<ProdConsRelation> relationList = prodConsRelationMapper.selectListByQuery(QueryWrapper.create().eq(ProdConsRelation::getProductId, dto.getProductId()));
|
||||||
if (CollUtil.isEmpty(relationList)) {
|
if (CollUtil.isEmpty(relationList)) {
|
||||||
@@ -222,7 +226,7 @@ public class ProductRpcServiceImpl implements ProductRpcService {
|
|||||||
flow.setInOutType(InOutTypeEnum.IN.value());
|
flow.setInOutType(InOutTypeEnum.IN.value());
|
||||||
flow.setInOutItem(InOutItemEnum.ORDER_IN.value());
|
flow.setInOutItem(InOutItemEnum.ORDER_IN.value());
|
||||||
flow.setOrderId(orderId);
|
flow.setOrderId(orderId);
|
||||||
productStockFlowMapper.insert(flow);
|
productStockFlowService.saveFlow(flow);
|
||||||
// 查询商品绑定耗材信息
|
// 查询商品绑定耗材信息
|
||||||
List<ProdConsRelation> relationList = prodConsRelationMapper.selectListByQuery(QueryWrapper.create().eq(ProdConsRelation::getProductId, dto.getProductId()));
|
List<ProdConsRelation> relationList = prodConsRelationMapper.selectListByQuery(QueryWrapper.create().eq(ProdConsRelation::getProductId, dto.getProductId()));
|
||||||
if (CollUtil.isEmpty(relationList)) {
|
if (CollUtil.isEmpty(relationList)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user