sjz
4 天以前 f1deb7b024e17cba204de5fcb0dac15801436b90
MES.Service/service/Warehouse/OpeningReceiptServer.cs
@@ -77,13 +77,13 @@
        return entity;
    }
    public MesInvItemIns GetMesInvItemIns(decimal? id)
    public MesInvItemIns GetMesInvItemIns(decimal id)
    {
        return Db.Queryable<MesInvItemIns>()
            .Where(s => s.Id == id).Single();
    }
    public List<MesInvItemInCDetails> GetMesInvItemInCDetailsList(decimal? id)
    public List<MesInvItemInCDetails> GetMesInvItemInCDetailsList(decimal id)
    {
        return Db.Queryable<MesInvItemInCDetails, MesUnit>((a, b) =>
                new JoinQueryInfos(JoinType.Inner, a.Unit == b.Id.ToString()))
@@ -136,8 +136,7 @@
            CbillNo = barcodeInfo.BillNo,
            UrgentFlag = barcodeInfo.UrgentFlag,
            BoardStyle = barcodeInfo.BoardStyle,
            TaskNo = barcodeInfo.TaskNo,
            ItemId = barcodeInfo.ItemId,
            TaskNo = barcodeInfo.TaskNo
        }).ExecuteCommand();
        if (executeCommand <= 0) throw new Exception("写入失败");
@@ -206,8 +205,9 @@
    private int CheckBarcodeAlreadyReceived(string itemBarcode)
    {
        // Check if the barcode is already received
        return Db.Queryable<MesInvItemIns, MesInvItemInCDetails>(
                (ins, details) => new JoinQueryInfos(JoinType.Inner,
        return Db
            .Queryable<MesInvItemIns, MesInvItemInCDetails>((ins, details) =>
                new JoinQueryInfos(JoinType.Inner,
                    ins.Id == details.ItemInId))
            .Where((ins, details) => details.ItemBarcode == itemBarcode)
            .Count();
@@ -245,8 +245,7 @@
            BoardStyle = barcodeInfo.BoardStyle,
            WorkNo = barcodeInfo.WorkNo,
            WorkLine = barcodeInfo.WorkLine,
            SuppNo = barcodeInfo.SuppNo,
            ItemId = barcodeInfo.ItemId,
            SuppNo = barcodeInfo.SuppNo
        }).ExecuteCommand();
        if (executeCommand <= 0) throw new Exception("写入失败");
@@ -279,8 +278,7 @@
            BillNo = billNo,
            WorkNo = barcodeInfo.WorkNo,
            WorkLine = barcodeInfo.WorkLine,
            SuppNo = barcodeInfo.SuppNo,
            ItemId = barcodeInfo.ItemId,
            SuppNo = barcodeInfo.SuppNo
        }).ExecuteCommand();
        if (executeCommand <= 0) throw new Exception("写入失败");