自动签收bug
This commit is contained in:
@@ -526,7 +526,16 @@ namespace Tnb.ProductionMgr
|
|||||||
Log.Information($"签收载具信息{JsonConvert.SerializeObject(carryCodes)}");
|
Log.Information($"签收载具信息{JsonConvert.SerializeObject(carryCodes)}");
|
||||||
foreach (var item in carryCodes)
|
foreach (var item in carryCodes)
|
||||||
{
|
{
|
||||||
|
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}");
|
||||||
|
}
|
||||||
|
|
||||||
insertDList.Add(new PrdMaterialReceiptD
|
insertDList.Add(new PrdMaterialReceiptD
|
||||||
{
|
{
|
||||||
material_receipt_id = prdMaterialReceiptH.id,
|
material_receipt_id = prdMaterialReceiptH.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user