From ca1e339f13fda2ca23fb46c53f2771856eeece3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Tue, 3 Nov 2020 08:33:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/OdbcApiWmsController.cs | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/UniApiGroup/Controller/OdbcApiWmsController.cs b/UniApiGroup/Controller/OdbcApiWmsController.cs index 9052f99..28a2906 100644 --- a/UniApiGroup/Controller/OdbcApiWmsController.cs +++ b/UniApiGroup/Controller/OdbcApiWmsController.cs @@ -207,13 +207,13 @@ namespace CK.SCP.GrupUniApi.Controller -string _recvQty = "SELECT RecQty, AsnBillNum, PoLine, PartCode, PoBillNum,Batch\n" + -"FROM (SELECT SUM(a.Qty) AS RecQty, a.AsnBillNum, a.PoLine, a.PartCode, a.PoBillNum,a.batch\n" + -" FROM V_TB_RECEIVE_DETAIL AS a INNER JOIN\n" + -" V_TB_ASN_DETAIL AS B ON a.AsnBillNum = B.AsnBillNum AND a.PoLine = B.PoLine AND\n" + -" a.PartCode = B.PartCode AND a.PoBillNum = B.PoBillNum and a.Batch=b.Batch\n" + -" GROUP BY a.AsnBillNum, a.PoLine, a.PartCode, a.PoBillNum) AS d\n" + -"WHERE (AsnBillNum = '{0}')"; +//string _recvQty = "SELECT RecQty, AsnBillNum, PoLine, PartCode, PoBillNum,Batch\n" + +//"FROM (SELECT SUM(a.Qty) AS RecQty, a.AsnBillNum, a.PoLine, a.PartCode, a.PoBillNum,a.batch\n" + +//" FROM V_TB_RECEIVE_DETAIL AS a INNER JOIN\n" + +//" V_TB_ASN_DETAIL AS B ON a.AsnBillNum = B.AsnBillNum AND a.PoLine = B.PoLine AND\n" + +//" a.PartCode = B.PartCode AND a.PoBillNum = B.PoBillNum and a.Batch=b.Batch\n" + +//" GROUP BY a.AsnBillNum, a.PoLine, a.PartCode, a.PoBillNum) AS d\n" + +//"WHERE (AsnBillNum = '{0}')"; @@ -279,10 +279,10 @@ string _recvQty = "SELECT RecQty, AsnBillNum, PoLine, PartCode, PoBillNum,Batc BillType = billtype }; scpRcvList.Add(scpRcv); - if (!string.IsNullOrEmpty(scpRcv.AsnBillNum)) - { - _lsQty = wdb.Database.SqlQuery(_recvQty, scpRcv.RecvBillNum).ToList(); - } + //if (!string.IsNullOrEmpty(scpRcv.AsnBillNum)) + //{ + // _lsQty = wdb.Database.SqlQuery(_recvQty, scpRcv.RecvBillNum).ToList(); + //} @@ -361,23 +361,23 @@ string _recvQty = "SELECT RecQty, AsnBillNum, PoLine, PartCode, PoBillNum,Batc BillType = billtype }; scpRcveDetailList.Add(scpRcvDetail); - var _first= wdb.TB_ASN_DETAIL.FirstOrDefault(p => p.AsnBillNum == scpRcv.AsnBillNum - && p.PartCode== qadData.xxwms_rc_part - && p.Batch==qadData.xxwms_rc_lot - && p.PoBillNum==qadData.xxwms_rc_po_nbr - && p.PoLine==qadData.xxwms_rc_po_line - ); - var _fs=_lsQty.FirstOrDefault(p => p.AsnBillNum == scpRcv.AsnBillNum - && p.PartCode == qadData.xxwms_rc_part - && p.Batch == qadData.xxwms_rc_lot - && p.PoBillNum == qadData.xxwms_rc_po_nbr - && p.PoLine == qadData.xxwms_rc_po_line); - - if (_first != null && _fs!=null) - { - _first.Extend1 = (_fs.RecQty!=null?_fs.RecQty.Value:0 + qadData.xxwms_rc_qty_total).ToString(); - wdb.TB_ASN_DETAIL.AddOrUpdate(_first); - } + //var _first= wdb.TB_ASN_DETAIL.FirstOrDefault(p => p.AsnBillNum == scpRcv.AsnBillNum + //&& p.PartCode== qadData.xxwms_rc_part + //&& p.Batch==qadData.xxwms_rc_lot + //&& p.PoBillNum==qadData.xxwms_rc_po_nbr + //&& p.PoLine==qadData.xxwms_rc_po_line + //); + //var _fs=_lsQty.FirstOrDefault(p => p.AsnBillNum == scpRcv.AsnBillNum + // && p.PartCode == qadData.xxwms_rc_part + // && p.Batch == qadData.xxwms_rc_lot + // && p.PoBillNum == qadData.xxwms_rc_po_nbr + // && p.PoLine == qadData.xxwms_rc_po_line); + + //if (_first != null && _fs!=null) + //{ + // _first.Extend1 = (_fs.RecQty!=null?_fs.RecQty.Value:0 + qadData.xxwms_rc_qty_total).ToString(); + // wdb.TB_ASN_DETAIL.AddOrUpdate(_first); + //} } //var scpPoDetail = // wdb.TB_PO_DETAIL.FirstOrDefault(