From 0ce3c46b53766d9039ae7a5ae969af6a6fefd4e7 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期一, 15 十一月 2021 16:25:14 +0800
Subject: [PATCH] 委外订单

---
 WebAPI/DLL/DAL.dll                           |    0 
 WebAPI/Controllers/EntrustOrderController.cs |   94 +++++++++++++++++++++++++++++++++--------------
 WebAPI/WebAPI.csproj                         |    6 ++-
 WebAPI/DLL/Model.dll                         |    0 
 4 files changed, 70 insertions(+), 30 deletions(-)

diff --git a/WebAPI/Controllers/EntrustOrderController.cs b/WebAPI/Controllers/EntrustOrderController.cs
index 71eb83b..ab022cb 100644
--- a/WebAPI/Controllers/EntrustOrderController.cs
+++ b/WebAPI/Controllers/EntrustOrderController.cs
@@ -18,6 +18,7 @@
     {
         private JsonResult objJsonResult = new JsonResult();
         private json objjson = new json();
+        SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM();
 
         /// <summary>
         /// 閲囪喘鍗曞垪琛�
@@ -224,48 +225,85 @@
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
-                objJsonResult.Message = "鎺ュ彈澶辫触锛�"+e.ToString();
+                objJsonResult.Message = "鎺ュ彈澶辫触锛�" + e.ToString();
                 objJsonResult.data = null;
                 return objJsonResult;
             }
         }
-            [Route("EntrustOrderRefuse")]
-            [HttpGet]
-            /// <summary>
-            /// 璁㈠崟鎷掔粷
-            /// </summary>
-            /// <param name="HInterID"></param>
-            /// <returns></returns>
+        [Route("EntrustOrderRefuse")]
+        [HttpGet]
+        /// <summary>
+        /// 璁㈠崟鎷掔粷
+        /// </summary>
+        /// <param name="HInterID"></param>
+        /// <returns></returns>
         public object EntrustOrderRefuse(string HInterID, string HBillNo, string HUser, string HBackRemark)
+        {
+            try
             {
-                try
-                {
-                    if (DBUtility.ClsPub.isLong(HInterID) == 0)
-                    {
-                        objJsonResult.code = "0";
-                        objJsonResult.count = 0;
-                        objJsonResult.Message = "澶辫触锛�";
-                        objJsonResult.data = null;
-                        return objJsonResult;
-                    }
-                    DAL.ClsWW_EntrustOrderBill oBill = new DAL.ClsWW_EntrustOrderBill();
-                    oBill.WebRefuse(DBUtility.ClsPub.isLong(HInterID), DBUtility.ClsPub.isStrNull(HBillNo), DBUtility.ClsPub.isStrNull(HUser), DBUtility.ClsPub.isStrNull(HBackRemark), ref DBUtility.ClsPub.sExeReturnInfo);
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 1;
-                    objJsonResult.Message = "鎷掔粷鎴愬姛锛�";
-                    objJsonResult.data = 1;
-                    return objJsonResult;
-                }
-                catch (Exception e)
+                if (DBUtility.ClsPub.isLong(HInterID) == 0)
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "澶辫触锛�" + e.ToString();
+                    objJsonResult.Message = "澶辫触锛�";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
+                DAL.ClsWW_EntrustOrderBill oBill = new DAL.ClsWW_EntrustOrderBill();
+                oBill.WebRefuse(DBUtility.ClsPub.isLong(HInterID), DBUtility.ClsPub.isStrNull(HBillNo), DBUtility.ClsPub.isStrNull(HUser), DBUtility.ClsPub.isStrNull(HBackRemark), ref DBUtility.ClsPub.sExeReturnInfo);
+                objJsonResult.code = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鎷掔粷鎴愬姛锛�";
+                objJsonResult.data = 1;
+                return objJsonResult;
             }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
 
+        [Route("EntrustOrderBack")]
+        [HttpGet]
+        /// <summary>
+        /// 璁㈠崟鍙嶉鐘舵��
+        /// </summary>
+        /// <param name=""></param>
+        /// <returns></returns>
+        public object EntrustOrderBack(string HmainidList, string OrderBackId)
+        {
+            try
+            {
+                string sql = "";
+                for (int i = 0; i < HmainidList.Split(',').Length; i++)
+                {
+                    var Hmainid = HmainidList.Split(',')[i];
+                    sql = string.Format(@"
+                update WW_EntrustOrderBillSub set 
+                HFeedback ='{0}'
+                where HInterID = '{1}' and HEntryID = '{2}' ", OrderBackId, Hmainid.Split('-')[0], Hmainid.Split('-')[1]);
+                    oCn.RunProc(sql);
 
+                }
+                objJsonResult.code = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鎿嶄綔鎴愬姛锛�";
+                //objJsonResult.Message = string.Join(",", HmainidList.ToArray());
+                objJsonResult.data = 1;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
     }
 }
\ No newline at end of file
diff --git a/WebAPI/DLL/DAL.dll b/WebAPI/DLL/DAL.dll
index 3ff4c3e..141c6d5 100644
--- a/WebAPI/DLL/DAL.dll
+++ b/WebAPI/DLL/DAL.dll
Binary files differ
diff --git a/WebAPI/DLL/Model.dll b/WebAPI/DLL/Model.dll
index f07ae29..b0529a7 100644
--- a/WebAPI/DLL/Model.dll
+++ b/WebAPI/DLL/Model.dll
Binary files differ
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index e994c68..02aa62a 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -90,8 +90,9 @@
       <HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
       <Private>True</Private>
     </Reference>
-    <Reference Include="Model">
-      <HintPath>..\..\SRM-MES\SRM-MES\Model\bin\Debug\Model.dll</HintPath>
+    <Reference Include="Model, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\SRM-MES\SRM-MES\DAL\bin\Debug\Model.dll</HintPath>
     </Reference>
     <Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
@@ -165,6 +166,7 @@
     <Content Include="DLL\Kingdee.BOS.WebApi.Client.dll" />
     <Content Include="DLL\Kingdee.BOS.WebApi.FormService.dll" />
     <Content Include="DLL\Kingdee.BOS.WebApi.ServicesStub.dll" />
+    <Content Include="DLL\Model.dll" />
     <Content Include="DLL\Newtonsoft.Json.Net35.dll" />
     <Content Include="DLL\Pub_Class.dll" />
     <Content Include="DLL\Pub_Control.dll" />

--
Gitblit v1.9.1