物料签收bug修改

This commit is contained in:
2024-06-27 09:10:31 +08:00
parent 560465974a
commit fb9ba4b7a8

View File

@@ -423,6 +423,22 @@ namespace Tnb.ProductionMgr
use_num = 0, use_num = 0,
}); });
Tnb.WarehouseMgr.Entities.Dto.Outputs.Result result = await _wmsCarryBindService.CarryUnbind(new CarryBindInput()
{
org = prdFeedingH.org_id,
create_id = prdFeedingH.create_id,
carry_id = prdFeedingH.carry_id,
carry_code = prdFeedingH.carry_code,
carrystd_id = carry.carrystd_id,
membercarry_code = detail.member_carry_code,
membercarry_id = detail.member_carry_id,
});
if (result.code != JNPF.Common.Enums.HttpStatusCode.OK)
{
throw Oops.Bah(result.msg);
}
if (detail != null) if (detail != null)
{ {
if (detail.feeding_num + num > detail.num) if (detail.feeding_num + num > detail.num)
@@ -447,6 +463,7 @@ namespace Tnb.ProductionMgr
{ {
throw new Exception("没有签收单,无法投料"); throw new Exception("没有签收单,无法投料");
} }
} }
} }
else else
@@ -457,10 +474,6 @@ namespace Tnb.ProductionMgr
_ = await db.Insertable<PrdFeedingH>(prdFeedingH).ExecuteCommandAsync(); _ = await db.Insertable<PrdFeedingH>(prdFeedingH).ExecuteCommandAsync();
_ = await db.Insertable<PrdFeedingD>(list).ExecuteCommandAsync(); _ = await db.Insertable<PrdFeedingD>(list).ExecuteCommandAsync();
_wmsCarryBindService.CarryCodeUnbind(new CarryCodeUnbindInput()
{
carry_id = carry.id
});
}); });