Commit 445ae06e by liuyang

2024-06-06 销售出库单-提交和调拨单逻辑调整

parent cccf4025
...@@ -158,11 +158,14 @@ public class ServiceHGKC004 extends ServiceEPBase { ...@@ -158,11 +158,14 @@ public class ServiceHGKC004 extends ServiceEPBase {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
HGKC004 hgkc004 = new HGKC004(); HGKC004 hgkc004 = new HGKC004();
hgkc004.fromMap(map); hgkc004.fromMap(map);
DaoUtils.update(HGKC004.UPDATE_STATUS, hgkc004);
HGKC004 kc004 = HGKCTools.HgKc004.getId(hgkc004.getId()); HGKC004 kc004 = HGKCTools.HgKc004.getId(hgkc004.getId());
List<HGKC004A> hgkc004s = HGKCTools.HgKc004.getDetailById(hgkc004.getId()); List<HGKC004A> hgkc004s = HGKCTools.HgKc004.getDetailById(hgkc004.getId());
AssertUtils.isEmpty(hgkc004s, "销售出库单明细不存在!"); AssertUtils.isEmpty(hgkc004s, "销售出库单明细不存在!");
for (HGKC004A hgkc004A : hgkc004s) { for (HGKC004A hgkc004A : hgkc004s) {
if (hgkc004A.getPrice().compareTo(BigDecimal.ZERO)<=0 || hgkc004A.getAmount().compareTo(BigDecimal.ZERO)<=0){
throw new PlatException("单价和金额不能小于0!");
}
HGKC010 hgkc010 = HGKCTools.HgKc010.get(kc004.getCompanyCode(), kc004.getWhCode(), hgkc004A.getInventRecordId()); HGKC010 hgkc010 = HGKCTools.HgKc010.get(kc004.getCompanyCode(), kc004.getWhCode(), hgkc004A.getInventRecordId());
if (hgkc010 == null) { if (hgkc010 == null) {
throw new PlatException("库存不足!"); throw new PlatException("库存不足!");
...@@ -178,6 +181,7 @@ public class ServiceHGKC004 extends ServiceEPBase { ...@@ -178,6 +181,7 @@ public class ServiceHGKC004 extends ServiceEPBase {
} }
DaoUtils.update(HGKC010.UPDATE_INV, hgkc010); DaoUtils.update(HGKC010.UPDATE_INV, hgkc010);
} }
DaoUtils.update(HGKC004.UPDATE_STATUS, hgkc004);
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "修改")}); inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "修改")});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment