南骏 池
2025-02-14 2075957d9c0c87e66b0392fdc0a2d5b9290dfee5
service/Wom/MesWorkProdManager.cs
@@ -137,7 +137,7 @@
                        Quantity = reportQty
                    })
                    .Where(x => x.Guid == barcode.Guid)
                    .ExecuteCommandAsync();
                    .ExecuteCommand();
                // 11. 获取或创建报工单
                var workProd = db.Queryable<MesWorkProd>()
@@ -199,11 +199,12 @@
                // 13. 更新工单已报工数量
                db.Updateable<Womdaa>()
                    .SetColumns(x =>
                        x.Daa011 == (x.Daa011 ?? 0) + (int)barcode.Quantity
                    )
                    .Where(x => x.Daa001 == barcode.BillNo)
                    .ExecuteCommandAsync();
                        .SetColumns(x => new Womdaa
                        {
                            Daa011 = (x.Daa011 ?? 0) + (int)barcode.Quantity
                        })
                        .Where(x => x.Daa001 == barcode.BillNo)
                        .ExecuteCommand();
                // 14. 重新获取最新已报工数量
                reportedQty = db.Queryable<MesWorkProd, MesWorkProdCDetails>(
@@ -222,7 +223,7 @@
        // 15. 返回处理结果
        return new ScanWorkResult
        {
            TaskNo = barcode.TaskNo,
            TaskNo = barcode.BillNo,
            ItemNo = item.ItemNo,
            PlanQty = planQty ?? 0,
            ReportedQty = reportedQty ?? 0,