Browse Source

修改上架单保存

master
fanzongzhe 8 months ago
parent
commit
8c299fa698
  1. 14
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBillService.java
  2. 2
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/app/AppSaveBillRecordDto.java

14
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/WmsShelfBillService.java

@ -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) {

2
yxt-wms-biz/src/main/java/com/yxt/wms/biz/inventory/wmsshelfbill/app/AppSaveBillRecordDto.java

@ -21,7 +21,7 @@ public class AppSaveBillRecordDto implements Dto {
/**
* 上架单sid
*/
private String shelvesSid;
private String sid;
private String userSid;
@Data

Loading…
Cancel
Save