From 6d82dc270e1e1c597e2df48e3fc46243b6a4eb79 Mon Sep 17 00:00:00 2001
From: YL <YL@LAPTOP-SE03PLUR>
Date: 星期五, 03 九月 2021 18:07:33 +0800
Subject: [PATCH] nothing

---
 WebAPI/Controllers/BaseSet/Gy_ProcessController.cs |   94 ++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 92 insertions(+), 2 deletions(-)

diff --git a/WebAPI/Controllers/BaseSet/Gy_ProcessController.cs b/WebAPI/Controllers/BaseSet/Gy_ProcessController.cs
index c6baa4b..dc4e727 100644
--- a/WebAPI/Controllers/BaseSet/Gy_ProcessController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_ProcessController.cs
@@ -104,6 +104,7 @@
                 //    ",'" + HBarCode + "'," + HProcessID_K3 + ",'" + HBillSubType + "'," + Convert.ToString(HAutoTrunFlag ? 1 : 0) +
                 //    "," + HFixPrice.ToString() + "," +HOverFixPrice.ToString() + "," + HProcMulID.ToString() + ",'" + HProcCheckNote.ToString() + "')", ref DBUtility.ClsPub.sExeReturnInfo);
 
+
                 oCN.BeginTran();
                 oCN.RunProc("Update Gy_Process set " +
                     " HNumber='" + HNumber + "'" +
@@ -127,8 +128,7 @@
                     ",HFixPrice= " + HFixPrice +
                     ",HOverFixPrice= " + HOverFixPrice +
                     ",HProcMulID= " + HProcMulID +
-                    ",HProcCheckNote='" + HProcCheckNote + "'" +
-                    " Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo);
+                    ",HProcCheckNote='" + HProcCheckNote + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo);
                 //淇敼涓婄骇涓洪潪鏈骇浠g爜
                 oCN.RunProc("Update Gy_Process set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
                 //return true;
@@ -242,6 +242,96 @@
                 return objJsonResult;
             }
         }
+        /// <summary>Gy_Process/cx
+        /// 宸ュ簭鍒楄〃鍒犻櫎鍔熻兘
+        /// </summary>
+        /// <returns></returns>
+        [Route("DeltetGy_Process")]
+        [HttpGet]
+        public object DeltetGy_Process(string HItemID)
+        {
+            DataSet ds;
+            DataSet ds1;
+            //string ModRightNameCheck = "Sc_ProcessReport_check";
+            try
+            {
+                //鍒犻櫎鏉冮檺
+                //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName))
+                //{
+                //    objJsonResult.code = "0";
+                //    objJsonResult.count = 0;
+                //    objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+                //    objJsonResult.data = null;
+                //    return objJsonResult;
+                //}
+
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                if (string.IsNullOrWhiteSpace(HItemID))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "HItemID涓虹┖锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                oCN.BeginTran();//寮�濮嬩簨鍔�
+                ds = oCN.RunProcReturn("select * from Gy_Process where HItemID=" + HItemID, "Gy_Process");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鏁版嵁锛屾棤娉曞垹闄わ紒";
+                    objJsonResult.data = null;
+                    return objJsonResult; ;
+                }
+                //var HStopflag = Convert.ToBoolean(ds.Tables[0].Rows[0]["HStopflag"]);
+                //if (HStopflag)
+                //{
+                //    oCN.RollBack();//鍥炴粴浜嬪姟
+                //    objJsonResult.code = "0";
+                //    objJsonResult.count = 0;
+                //    objJsonResult.Message = "鏁版嵁宸插垹闄ゆ棤娉曞啀娆″垹闄わ紒";
+                //    objJsonResult.data = null;
+                //    return objJsonResult;
+                //}
+                ds1 = oCN.RunProcReturn("Select HItemID from  Gy_Process  Where HParentID='" + HItemID + "'", " Gy_Process");
+                if (ds1.Tables[0].Rows.Count != 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "姝ら」鐩瓨鍦ㄥ瓙椤圭洰锛屼笉鑳藉垹闄わ紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                string HUseFlag = Convert.ToString(ds.Tables[0].Rows[0]["HUseFlag"]);
+                if (HUseFlag == "宸蹭娇鐢�")
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "姝ら」鐩凡浣跨敤锛屼笉鑳藉垹闄わ紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                oCN.RunProc("delete from  Gy_Process  where HItemID=" + HItemID);
+                oCN.Commit();//鎻愪氦浜嬪姟
+                objJsonResult.code = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "* 鏁版嵁鍒犻櫎鎴愬姛锛�";
+                objJsonResult.data = null;
+                return objJsonResult; ;
+
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
 
         //
     }

--
Gitblit v1.9.1