|
|
@ -702,7 +702,7 @@ public class WmsShelfBillService extends MybatisBaseService<WmsShelfBillMapper, |
|
|
|
} |
|
|
|
createOrgSid = sysStaffOrgFeign.getOrgSidByPath(orgPath).getData(); |
|
|
|
} |
|
|
|
String shelvesId = dto.getShelvesSid(); |
|
|
|
String shelvesId = dto.getSid(); |
|
|
|
WmsShelfBill wmsShelfBill = fetchBySid(shelvesId); |
|
|
|
String sourceBillSid = wmsShelfBill.getSourceBillSid(); |
|
|
|
List<AppSaveBillRecordDto.AppSaveBillRecordDetailsDto> goodsList = dto.getGoodsList(); |
|
|
@ -728,7 +728,10 @@ public class WmsShelfBillService extends MybatisBaseService<WmsShelfBillMapper, |
|
|
|
WmsGoodsTag wmsGoodsTag = wmsGoodsTagService.selByBillSidAndGoodsID(sourceBillSid, goodsID); |
|
|
|
String goodsSkuCode = wmsGoodsTag.getGoodsSkuCode(); |
|
|
|
WmsShelfBillDetail shelfBillGoods = wmsShelfBillDetailService.selByBillSidAndSkuCode(shelvesId, goodsSkuCode); |
|
|
|
BigDecimal actualCount = shelfBillGoods.getActualCount(); |
|
|
|
BigDecimal actualCount = BigDecimal.ZERO; |
|
|
|
if (null != shelfBillGoods.getActualCount()) { |
|
|
|
actualCount = shelfBillGoods.getActualCount(); |
|
|
|
} |
|
|
|
BigDecimal subtract = shelfBillGoods.getCount().subtract(actualCount); |
|
|
|
if (subtract.compareTo(map.get(goodsID)) < 0) { |
|
|
|
return rb.setMsg("请勿超过商品上架最大数量"); |
|
|
@ -741,7 +744,10 @@ public class WmsShelfBillService extends MybatisBaseService<WmsShelfBillMapper, |
|
|
|
WmsGoodsTag wmsGoodsTag = wmsGoodsTagService.selByBillSidAndGoodsID(sourceBillSid, goodsID); |
|
|
|
String goodsSkuCode = wmsGoodsTag.getGoodsSkuCode(); |
|
|
|
WmsShelfBillDetail shelfBillGoods = wmsShelfBillDetailService.selByBillSidAndSkuCode(shelvesId, goodsSkuCode); |
|
|
|
BigDecimal actualCount = shelfBillGoods.getActualCount(); |
|
|
|
BigDecimal actualCount = BigDecimal.ZERO; |
|
|
|
if (null != shelfBillGoods.getActualCount()) { |
|
|
|
actualCount = shelfBillGoods.getActualCount(); |
|
|
|
} |
|
|
|
BigDecimal add = actualCount.add(new BigDecimal(count)); |
|
|
|
shelfBillGoods.setActualCount(add); |
|
|
|
wmsShelfBillDetailService.updateById(shelfBillGoods); |
|
|
@ -810,7 +816,7 @@ public class WmsShelfBillService extends MybatisBaseService<WmsShelfBillMapper, |
|
|
|
} |
|
|
|
wmsInventoryRecordService.saveRecord(recordDto); |
|
|
|
} |
|
|
|
List<WmsShelfBillDetail> vos = wmsShelfBillDetailService.selectByMainSid(dto.getShelvesSid()); |
|
|
|
List<WmsShelfBillDetail> vos = wmsShelfBillDetailService.selectByMainSid(dto.getSid()); |
|
|
|
if (!vos.isEmpty()) { |
|
|
|
HashSet<Integer> integers = new HashSet<>(); |
|
|
|
for (WmsShelfBillDetail vo : vos) { |
|
|
|