From efa57c53b1b4c94e188a52f5a35d0a4ca8a82cb5 Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期四, 29 六月 2023 14:55:30 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/基础资料/基础资料/Xt_CheckFlowBillController.cs | 62 +++++++++++++++++------------- 1 files changed, 35 insertions(+), 27 deletions(-) diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Xt_CheckFlowBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Xt_CheckFlowBillController.cs" index b22ae29..9e9e8ab 100644 --- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Xt_CheckFlowBillController.cs" +++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Xt_CheckFlowBillController.cs" @@ -126,34 +126,21 @@ ",HRemark,HStandard,HName" + ") " + " values('" + main.HBillTypeID.ToString() + "'," + main.HInterID.ToString() + "," + main.HDeptID.ToString() + ",'" + main.HRemark + "'," + Convert.ToString(main.HStandard ? 1 : 0) + ",'" + main.HName.ToString() + "') "); - - int i = 0; - foreach (Xt_CheckFlowSub oSub in lsmain) - { - i++; - bool bResult = false; - - oCN.RunProc("Insert into Xt_CheckFlowSub " + - " (HInterID,HEntryID,HCheckMan" + - ",HFlowNo,HJumpFlag,HMakerSelf,HCheckItemID" + - " )values(" - + main.HInterID.ToString() + "," + i + ",'" + oSub.HCheckMan + "'" + - "," + oSub.HFlowNo + "," + Convert.ToString(oSub.HJumpFlag ? 1 : 0) + "," + Convert.ToString(oSub.HMakerSelf ? 1 : 0) + "," + oSub.HCheckItemID + ") "); - - bResult = true; - - - if (!bResult) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo; - objJsonResult.data = 1; - return objJsonResult; - } - - } } + else + { + //鏇存柊涓昏〃 + oCN.RunProc("UpDate Xt_CheckFlowMain set " + + "HRemark='" + main.HRemark + "'" + + ",HName='" + main.HName + "'" + + ",HDeptID=" + main.HDeptID.ToString() + + ",HBillTypeID='" + main.HBillTypeID + "'" + + ",HStandard='" + Convert.ToString(main.HStandard ? 1 : 0) + "'" + + " where HInterID=" + main.HInterID.ToString()); + //鍒犻櫎瀛愯〃 + oCN.RunProc("delete from Xt_CheckFlowSub where HInterID=" + main.HInterID.ToString()); + } + AddBillSub(lsmain, main.HInterID); oCN.Commit(); @@ -174,6 +161,27 @@ } } + public json AddBillSub(List<Xt_CheckFlowSub> DetailColl, long HInterID) + { + int i = 1; + foreach (Xt_CheckFlowSub oSub in DetailColl) + { + + oCN.RunProc("Insert into Xt_CheckFlowSub " + + " (HInterID,HEntryID,HCheckMan" + + ",HFlowNo,HJumpFlag,HMakerSelf,HCheckItemID" + + " )values(" + + HInterID + "," + i + ",'" + oSub.HCheckMan + "'" + + "," + oSub.HFlowNo + "," + Convert.ToString(oSub.HJumpFlag ? 1 : 0) + "," + Convert.ToString(oSub.HMakerSelf ? 1 : 0) + "," + oSub.HCheckItemID + ") "); + i++; + } + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = null; + objJsonResult.data = null; + return objJsonResult; + } + #endregion #region 瀹℃牳娴佺▼鍗� 鍒犻櫎 -- Gitblit v1.9.1