From 75f29767598ff94e71bdc6baad3dc6326c920c25 Mon Sep 17 00:00:00 2001 From: "DESKTOP-DIHMM3I\\22375" Date: Fri, 10 Feb 2023 10:10:15 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=88=B0=E8=B4=A7=E6=9C=AA?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E9=83=A8=E9=97=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ICSSoft.ERP.WebAPI/ICSSoft.DataProject/CreatePOArrive.cs | 8 ++++---- .../ICSSoft.DataProject/MOIssueDocNegatives.cs | 8 ++++++-- .../ICSSoft.DataProject/OutsourcingIssueDoNegative.cs | 5 ++++- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/CreatePOArrive.cs b/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/CreatePOArrive.cs index 8767a09..2bb24f8 100644 --- a/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/CreatePOArrive.cs +++ b/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/CreatePOArrive.cs @@ -434,8 +434,8 @@ WHERE A.Autoid = '{0}'", iChildId); A.cpocode as POCode,A.cMaker as CreateUser,A.cMakeTime as CreateDateTime, A.cverifier as Checker,A.caudittime as CheckDateTime FROM PU_ArrivalVouch A - INNER JOIN DEPARTMENT C ON A.CDEPCODE=C.CDEPCODE - INNER JOIN VENDOR D ON A.CVENCODE=D.CVENCODE WHERE 1=1 and A.iBillType=0 and A.ID in({0}) + left JOIN DEPARTMENT C ON A.CDEPCODE=C.CDEPCODE + left JOIN VENDOR D ON A.CVENCODE=D.CVENCODE WHERE 1=1 and A.iBillType=0 and A.ID in({0}) SELECT DISTINCT A.ID as IDs,B.Autoid as DetailID,B.ivouchrowno as Sequence,B.cInvCode as InvCode, B.INUM as Amount,B.iQuantity as Quantity,B.fValidInQuan as RCVQuantity,B.iPOsID as PODetailID @@ -454,8 +454,8 @@ isnull(b.cFree9,'') as cFree9, isnull(b.cFree10,'') as cFree10 FROM PU_ArrivalVouch A INNER JOIN PU_ArrivalVouchs B ON A.ID=B.ID - INNER JOIN DEPARTMENT C ON A.CDEPCODE=C.CDEPCODE - INNER JOIN VENDOR D ON A.CVENCODE=D.CVENCODE WHERE 1=1 and A.iBillType=0 and A.ID in({0})"; + left JOIN DEPARTMENT C ON A.CDEPCODE=C.CDEPCODE + left JOIN VENDOR D ON A.CVENCODE=D.CVENCODE WHERE 1=1 and A.iBillType=0 and A.ID in({0})"; sql = string.Format(sql, iFatherIdTwo.TrimEnd(',')); if (ds != null) ds.Merge(DBHelper.SQlReturnDataSet(sql, cmd)); diff --git a/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/MOIssueDocNegatives.cs b/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/MOIssueDocNegatives.cs index 33de5f9..a9aa946 100644 --- a/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/MOIssueDocNegatives.cs +++ b/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/MOIssueDocNegatives.cs @@ -586,6 +586,10 @@ isnull(b.cFree10,'') as cFree10 dnmodifytime =CONVERT(VARCHAR(50),GETDATE(),112),dModifyDate =GETDATE() WHERE ID='{0}'"; sql = string.Format(sql, info.ID); DBHelper.CmdExecuteNonQuery(sql, cmd, "审核生产退料单失败!"); + sql = @"select * from dbo.rdrecords11 a + left join dbo.rdrecord11 on a.ID=b.ID WHERE b.ID='{0}'"; + sql = string.Format(sql, info.ID); + DataTable dtChecks = DBHelper.SQlReturnData(sql, cmd); if (info.UpdateStock) { @@ -616,8 +620,8 @@ isnull(b.cFree10,'') as cFree10 key.TableName = "IA_ST_UnAccountVouch11"; //DBHelper.UpdateCurrentStock(cmd, dtChecks.Rows[i]["cInvCode"].ToString(), dtChecks.Rows[i]["cWhCode"].ToString(),"", -Convert.ToDecimal(dtChecks.Rows[i]["iQuantity"].ToString()), key); //DBHelper.UpdateCurrentStockNEW(cmd, dtChecks.Rows[i]["cInvCode"].ToString(), dtChecks.Rows[i]["cWhCode"].ToString(), dtChecks.Rows[i]["cBatch"].ToString(), -Convert.ToDecimal(dtChecks.Rows[i]["iQuantity"].ToString()), dtChecks.Rows[i]["cFree1"].ToString(), dtChecks.Rows[i]["cFree2"].ToString(), dtChecks.Rows[i]["cFree3"].ToString(), dtChecks.Rows[i]["cFree4"].ToString(), dtChecks.Rows[i]["cFree5"].ToString(), dtChecks.Rows[i]["cFree6"].ToString(), dtChecks.Rows[i]["cFree7"].ToString(), dtChecks.Rows[i]["cFree8"].ToString(), dtChecks.Rows[i]["cFree9"].ToString(), dtChecks.Rows[i]["cFree10"].ToString(), key); - - DBHelper.UpdateCurrentStockCCGC(cmd, dtChecks.Rows[i]["cInvCode"].ToString(), dtChecks.Rows[i]["cWhCode"].ToString(), dtChecks.Rows[i]["cBatch"].ToString(), -Convert.ToDecimal(dtChecks.Rows[i]["iQuantity"].ToString()), dtChecks.Rows[i]["iQuantity"].ToString() == "" ? 0 : -Convert.ToDecimal(inum), dtChecks.Rows[i]["cFree1"].ToString(), + + DBHelper.UpdateCurrentStockCCGC(cmd, dtChecks.Rows[i]["cInvCode"].ToString(), dtChecks.Rows[i]["cWhCode"].ToString(), dtChecks.Rows[i]["cBatch"].ToString(), -Convert.ToDecimal(dtChecks.Rows[i]["iQuantity"].ToString()), dtChecks.Rows[i]["iNum"].ToString() == "" ? 0 : -Convert.ToDecimal(dtChecks.Rows[i]["iNum"].ToString()), dtChecks.Rows[i]["cFree1"].ToString(), dtChecks.Rows[i]["cFree2"].ToString(), dtChecks.Rows[i]["cFree3"].ToString(), dtChecks.Rows[i]["cFree4"].ToString(), dtChecks.Rows[i]["cFree5"].ToString(), dtChecks.Rows[i]["cFree6"].ToString(), dtChecks.Rows[i]["cFree7"].ToString(), dtChecks.Rows[i]["cFree8"].ToString(), dtChecks.Rows[i]["cFree9"].ToString(), dtChecks.Rows[i]["cFree10"].ToString(), "", key, "", "", "", "", 0, 0, 0, 0, 0, 0, 0, 0, Convert.ToInt32(dtChecks.Rows[i]["ID"].ToString()), Convert.ToInt32(dtChecks.Rows[i]["AutoID"].ToString())); diff --git a/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/OutsourcingIssueDoNegative.cs b/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/OutsourcingIssueDoNegative.cs index a20a1d0..d7b407a 100644 --- a/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/OutsourcingIssueDoNegative.cs +++ b/ICSSoft.ERP.WebAPI/ICSSoft.DataProject/OutsourcingIssueDoNegative.cs @@ -899,6 +899,9 @@ isnull(b.cFree10,'') as cFree10 dnmodifytime =CONVERT(VARCHAR(50),GETDATE(),112),dModifyDate =GETDATE() WHERE ID='{0}'"; sql = string.Format(sql, info.ID); DBHelper.CmdExecuteNonQuery(sql, cmd, "未查询到对应数据!"); + sql = @"select * from dbo.rdrecords11 a + left join dbo.rdrecord11 on a.ID=b.ID WHERE b.ID='{0}'"; + sql = string.Format(sql, info.ID); DataTable dtChecks = DBHelper.SQlReturnData(sql, cmd); if (info.UpdateStock) { @@ -930,7 +933,7 @@ isnull(b.cFree10,'') as cFree10 //DBHelper.UpdateCurrentStock(cmd, dtChecks.Rows[i]["cInvCode"].ToString(), dtChecks.Rows[i]["cWhCode"].ToString(),"", -Convert.ToDecimal(dtChecks.Rows[i]["iQuantity"].ToString()), key); //DBHelper.UpdateCurrentStockNEW(cmd, dtChecks.Rows[i]["cInvCode"].ToString(), dtChecks.Rows[i]["cWhCode"].ToString(), dtChecks.Rows[i]["cBatch"].ToString(), -Convert.ToDecimal(dtChecks.Rows[i]["iQuantity"].ToString()), dtChecks.Rows[i]["cFree1"].ToString(), dtChecks.Rows[i]["cFree2"].ToString(), dtChecks.Rows[i]["cFree3"].ToString(), dtChecks.Rows[i]["cFree4"].ToString(), dtChecks.Rows[i]["cFree5"].ToString(), dtChecks.Rows[i]["cFree6"].ToString(), dtChecks.Rows[i]["cFree7"].ToString(), dtChecks.Rows[i]["cFree8"].ToString(), dtChecks.Rows[i]["cFree9"].ToString(), dtChecks.Rows[i]["cFree10"].ToString(), key); - DBHelper.UpdateCurrentStockCCGC(cmd, dtChecks.Rows[i]["cInvCode"].ToString(), dtChecks.Rows[i]["cWhCode"].ToString(), dtChecks.Rows[i]["cBatch"].ToString(), -Convert.ToDecimal(dtChecks.Rows[i]["iQuantity"].ToString()), dtChecks.Rows[i]["iQuantity"].ToString() == "" ? 0 : -Convert.ToDecimal(inum), dtChecks.Rows[i]["cFree1"].ToString(), + DBHelper.UpdateCurrentStockCCGC(cmd, dtChecks.Rows[i]["cInvCode"].ToString(), dtChecks.Rows[i]["cWhCode"].ToString(), dtChecks.Rows[i]["cBatch"].ToString(), -Convert.ToDecimal(dtChecks.Rows[i]["iQuantity"].ToString()), dtChecks.Rows[i]["iNum"].ToString() == "" ? 0 : -Convert.ToDecimal(dtChecks.Rows[i]["iNum"].ToString()), dtChecks.Rows[i]["cFree1"].ToString(), dtChecks.Rows[i]["cFree2"].ToString(), dtChecks.Rows[i]["cFree3"].ToString(), dtChecks.Rows[i]["cFree4"].ToString(), dtChecks.Rows[i]["cFree5"].ToString(), dtChecks.Rows[i]["cFree6"].ToString(), dtChecks.Rows[i]["cFree7"].ToString(), dtChecks.Rows[i]["cFree8"].ToString(), dtChecks.Rows[i]["cFree9"].ToString(), dtChecks.Rows[i]["cFree10"].ToString(), "", key, "", "", "", "", 0, 0, 0, 0, 0, 0, 0, 0, Convert.ToInt32(dtChecks.Rows[i]["ID"].ToString()), Convert.ToInt32(dtChecks.Rows[i]["AutoID"].ToString()));