1.耗材推送预警值改为等于

2. 耗材数量为消耗完毕数量
This commit is contained in:
SongZhang 2024-07-26 10:10:29 +08:00
parent 839a7fe3a6
commit 2b71560995
2 changed files with 7 additions and 8 deletions

View File

@ -117,7 +117,7 @@ public class ConsMsgConsumer {
} }
log.info("conwarning:{},stockNumber:{}",tbConsInfo.getConWarning(),tbConsInfo.getStockNumber().subtract(tbConsInfo.getStockConsume()).abs()); log.info("conwarning:{},stockNumber:{}",tbConsInfo.getConWarning(),tbConsInfo.getStockNumber().subtract(tbConsInfo.getStockConsume()).abs());
if (N.gt(tbConsInfo.getConWarning(), tbConsInfo.getStockNumber().subtract(tbConsInfo.getStockConsume()).abs())) { if (N.egt(tbConsInfo.getConWarning(), tbConsInfo.getStockNumber().subtract(tbConsInfo.getStockConsume()).abs())) {
List<TbUserShopMsg> tbUserShopMsgs = tbUserShopMsgMapper.selectAllByShopId(tbConsInfo.getShopId()); List<TbUserShopMsg> tbUserShopMsgs = tbUserShopMsgMapper.selectAllByShopId(tbConsInfo.getShopId());

View File

@ -410,13 +410,6 @@ public class OrderService {
} }
for (TbCashierCart cashierCart : list) { for (TbCashierCart cashierCart : list) {
JSONObject objectMsg=new JSONObject();
objectMsg.put("skuId",Integer.valueOf(cashierCart.getSkuId()));
objectMsg.put("shopId",Integer.valueOf(cashierCart.getShopId()));
producer.con_msg(objectMsg.toString());
TbProductSkuWithBLOBs tbProduct = tbProductSkuMapper.selectByPrimaryKey(Integer.valueOf(cashierCart.getSkuId())); TbProductSkuWithBLOBs tbProduct = tbProductSkuMapper.selectByPrimaryKey(Integer.valueOf(cashierCart.getSkuId()));
totalAmount = totalAmount.add(cashierCart.getTotalAmount()); totalAmount = totalAmount.add(cashierCart.getTotalAmount());
packAMount = packAMount.add(cashierCart.getPackFee()); packAMount = packAMount.add(cashierCart.getPackFee());
@ -576,6 +569,12 @@ public class OrderService {
jsonObject.put("type","create"); jsonObject.put("type","create");
producer.cons(jsonObject.toString()); producer.cons(jsonObject.toString());
for (TbCashierCart cashierCart : list) {
JSONObject objectMsg = new JSONObject();
objectMsg.put("skuId", Integer.valueOf(cashierCart.getSkuId()));
objectMsg.put("shopId", Integer.valueOf(cashierCart.getShopId()));
producer.con_msg(objectMsg.toString());
}
return Result.success(CodeEnum.SUCCESS, orderInfo); return Result.success(CodeEnum.SUCCESS, orderInfo);
} }