|
|
|
|
@ -18,6 +18,7 @@ import org.springblade.core.secure.BladeUser; |
|
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
|
import org.springblade.desk.common.feign.IMesNotifyMessageClient; |
|
|
|
|
import org.springblade.desk.common.pojo.entity.MesNotifyMessageEntity; |
|
|
|
|
import org.springblade.desk.order.feign.IMoldDemandClient; |
|
|
|
|
import org.springblade.wms.excel.StRealtimeStockExcel; |
|
|
|
|
import org.springblade.wms.mapper.*; |
|
|
|
|
import org.springblade.wms.pojo.entity.*; |
|
|
|
|
@ -71,6 +72,8 @@ public class StRealtimeStockServiceImpl extends BaseServiceImpl<StRealtimeStockM |
|
|
|
|
private StGlassCakeOutMapper stGlassCakeOutMapper; |
|
|
|
|
@Resource |
|
|
|
|
private IMesNotifyMessageClient mesNotifyMessageClient; |
|
|
|
|
@Resource |
|
|
|
|
private IMoldDemandClient moldDemandClient; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
@ -674,7 +677,7 @@ public class StRealtimeStockServiceImpl extends BaseServiceImpl<StRealtimeStockM |
|
|
|
|
notifyMessage.setReceiveUserId(AuthUtil.getUserId()); |
|
|
|
|
mesNotifyMessageClient.save(notifyMessage); |
|
|
|
|
// 执行模具类物料出库补制
|
|
|
|
|
// generateMoldOutReissueOrder(goodsId, outQuantity);
|
|
|
|
|
moldDemandClient.saveMoldDemand(stGoods.getGoodsCode()); |
|
|
|
|
|
|
|
|
|
} else if ("玻璃饼".equals(goodsCategoryName)) { |
|
|
|
|
reissueMsg = String.format("物料编码:%s 名称:%s(类别:%s)触发【物料出库】补制!出库数量:%.2f,开始生成玻璃饼补制单", |
|
|
|
|
@ -704,7 +707,8 @@ public class StRealtimeStockServiceImpl extends BaseServiceImpl<StRealtimeStockM |
|
|
|
|
Long goodsId = stGoods.getId(); |
|
|
|
|
Double productionBatch = stGoods.getProductionBatch(); |
|
|
|
|
// 计算当前库存(复用原最低库存预警逻辑)
|
|
|
|
|
Double currentStock = stGoods.getCurrentQuantity() - outQuantity; |
|
|
|
|
// Double currentStock = stGoods.getCurrentQuantity() - outQuantity;
|
|
|
|
|
Double currentStock = stGoods.getCurrentQuantity(); |
|
|
|
|
Double minStock = stGoods.getMinNum() == null ? 0.0 : stGoods.getMinNum(); |
|
|
|
|
String reissueMsg; |
|
|
|
|
|
|
|
|
|
@ -730,7 +734,7 @@ public class StRealtimeStockServiceImpl extends BaseServiceImpl<StRealtimeStockM |
|
|
|
|
notifyMessage.setReceiveUserId(AuthUtil.getUserId()); |
|
|
|
|
mesNotifyMessageClient.save(notifyMessage); |
|
|
|
|
// 执行模具类最低库存补制
|
|
|
|
|
// generateMoldMinStockPurchasePlan(goodsId, currentStock, minStock);
|
|
|
|
|
moldDemandClient.saveMoldDemand(stGoods.getGoodsCode()); |
|
|
|
|
|
|
|
|
|
} else if ("玻璃饼".equals(goodsCategoryName)) { |
|
|
|
|
reissueMsg = String.format("物料编码:%s 名称:%s(类别:%s)触发【最低库存】补制!当前库存:%.2f,最低库存:%.2f,开始生成玻璃饼生产订单", |
|
|
|
|
|