bug
This commit is contained in:
@@ -347,6 +347,7 @@ namespace Tnb.ProductionMgr
|
||||
WmsCarryH carry = await db.Queryable<WmsCarryH>().Where(x=>x.carry_code==input.carry_code).FirstAsync();
|
||||
|
||||
|
||||
|
||||
prdMaterialReceiptH = new PrdMaterialReceiptH()
|
||||
{
|
||||
code = code,
|
||||
@@ -368,11 +369,21 @@ namespace Tnb.ProductionMgr
|
||||
{
|
||||
foreach (var item in input.details)
|
||||
{
|
||||
PrdMaterialReceiptD existD = await db.Queryable<PrdMaterialReceiptD>()
|
||||
.LeftJoin<PrdMaterialReceiptH>((x, y) => x.material_receipt_id == y.id)
|
||||
.Where((x, y) => x.carry_id == carry.id && y.mo_task_id == moTask.id && x.is_all_feeding == 0)
|
||||
.Select((x,y)=>x)
|
||||
.FirstAsync();
|
||||
if (existD != null)
|
||||
{
|
||||
throw new Exception($"{moTask.mo_task_code}任务单存在未投完的签收物料,物料签收子表id{existD.id}");
|
||||
}
|
||||
|
||||
if (!inputMaterials.Contains(item.material_id) && !input.sure)
|
||||
{
|
||||
throw new Exception("存在不属于生产bom的投入物料,确认签收吗");
|
||||
}
|
||||
|
||||
|
||||
list.Add(new PrdMaterialReceiptD
|
||||
{
|
||||
material_receipt_id = prdMaterialReceiptH.id,
|
||||
|
||||
Reference in New Issue
Block a user