领料带数量

This commit is contained in:
2026-01-27 17:18:51 +08:00
parent a43550ab28
commit 3895195b1b
2 changed files with 12 additions and 5 deletions

View File

@@ -395,7 +395,11 @@ namespace DOAN.Service.BZFM
}
if (inboundInfo.Remarks == "已撤销")
{
return "该记录已撤销,无法领料";
return "该记录已撤销,无法领料";
}
if(parm.Quantity > inboundInfo.Quantity)
{
return "领料数量超过记录最大值!";
}
var workorderInfo = Context.Queryable<ProWorkorder>()
.Where(it => it.Workorder == inboundInfo.Workorder)
@@ -406,7 +410,7 @@ namespace DOAN.Service.BZFM
}
Context.Ado.BeginTran();
inboundInfo.WorkorderRaw = parm.WorkorderRow;
inboundInfo.Remarks += "[已领料]";
inboundInfo.Remarks += $"[已领料{parm.Quantity}]";
Context.Updateable(inboundInfo).ExecuteCommand();
// 填写出库单
//做出库红单
@@ -423,9 +427,9 @@ namespace DOAN.Service.BZFM
// 产成品工单号
WorkorderRaw = parm.WorkorderRow,
Operator = parm.Operator,
Quantity = inboundInfo.Quantity,
Quantity = parm.Quantity,
TransactionType = "领料出库",
Remarks = $"领料出库,产成品领料出库,原材料工单{inboundInfo.Workorder},产成品工单{parm.WorkorderRow}",
Remarks = $"领料出库,产成品领料出库,原入库单号{inboundInfo.InboundNo},原工单{inboundInfo.Workorder}",
};
MmInventoryService mmInventoryService = new MmInventoryService();
string result = mmInventoryService.CreateOutboundReceipt(revokeRecepitDto);