From 494c68c9ad1cc3b085c27e87865269c4593c24e8 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期五, 25 十一月 2022 09:08:48 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/EntrustOutController.cs |  101 ++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 81 insertions(+), 20 deletions(-)

diff --git a/WebAPI/Controllers/EntrustOutController.cs b/WebAPI/Controllers/EntrustOutController.cs
index 9fd45b4..d4ee36e 100644
--- a/WebAPI/Controllers/EntrustOutController.cs
+++ b/WebAPI/Controllers/EntrustOutController.cs
@@ -100,6 +100,71 @@
         }
 
 
+        ///// <summary>
+        ///// 鍐欏叆涓存椂琛�  鎵簮鍗曠殑鏂规硶
+        ///// </summary>
+        ///// <param name="HSourceBillNo"></param>
+        ///// <returns></returns>
+        //[Route("EntrustOut/set_SavePonderationBillMain_Temp_Entrust_Source_Fast_Json")]
+        //[HttpGet]
+        //public object set_SavePonderationBillMain_Temp_Entrust_Source_Fast_Json(long sNewInterID, string sNewBillNo,string sSourceBillNo, string HSourceBillType )
+        //{
+        //    string sNewBillType = "1211";
+        //    string sSourceBillType = "1604";
+        //    string sRedBlueflag = "钃濆瓧";
+        //    try
+        //    {
+
+        //        string sWhere = "where 鍗曟嵁鍙� like '%" + sSourceBillNo + "%'";
+        //        //ds = BLL.ClsSourceBill.getSourceBillList(sWhere, HSourceBillType);
+        //        ds = new BLL.ClsKf_EntrustOutBill().GetWW_WWPPBomList(sWhere, ref DBUtility.ClsPub.sExeReturnInfo);
+        //        if (ds == null)
+        //        {
+        //            objJsonResult.code = "0";
+        //            objJsonResult.count = 0;
+        //            objJsonResult.Message = "鏃犳婧愬崟鍙凤紒";
+        //            objJsonResult.data = null;
+        //            return objJsonResult;
+        //        }
+
+        //        //else
+        //        //{
+        //        //    objJsonResult.code = "0";
+        //        //    objJsonResult.count = 1;
+        //        //    objJsonResult.Message = "Success";
+        //        //    objJsonResult.data = ds;
+        //        //    return objJsonResult;
+        //        //}
+        //        DAL.ClsKF_PonderationBillMain_Temp_Ctl dal = new DAL.ClsKF_PonderationBillMain_Temp_Ctl();
+        //        if (dal.AddNew_Source(sNewInterID, sNewBillNo, sNewBillType, sSourceBillNo, sSourceBillType, sRedBlueflag, ref DBUtility.ClsPub.sExeReturnInfo))
+        //        {
+        //            objJsonResult.code = "0";
+        //            objJsonResult.count = 1;
+        //            objJsonResult.Message = "淇濆瓨鍒板嚭鍏ュ簱鏉$爜涓存椂琛ㄦ垚鍔燂紒";
+        //            objJsonResult.data = ds;
+        //            return objJsonResult;
+        //        }
+        //        else
+        //        {
+        //            objJsonResult.code = "0";
+        //            objJsonResult.count = 0;
+        //            objJsonResult.Message = "淇濆瓨鍒板嚭鍏ュ簱鏉$爜涓存椂琛ㄥけ璐ワ紒";
+        //            objJsonResult.data = null;
+        //            return objJsonResult;
+        //        }
+        //    }
+        //    catch (Exception ex)
+        //    {
+        //        objJsonResult.code = "0";
+        //        objJsonResult.count = 0;
+        //        objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛佸紓甯�"+ex.ToString();
+        //        objJsonResult.data = null;
+        //        return objJsonResult;
+        //    }
+        //}
+
+
+
         /// <summary>
         /// 鍐欏叆涓存椂琛�  鎵簮鍗曠殑鏂规硶
         /// </summary>
@@ -107,7 +172,7 @@
         /// <returns></returns>
         [Route("EntrustOut/set_SavePonderationBillMain_Temp_Entrust_Source_Fast_Json")]
         [HttpGet]
-        public object set_SavePonderationBillMain_Temp_Entrust_Source_Fast_Json(long sNewInterID, string sNewBillNo,string sSourceBillNo, string HSourceBillType )
+        public object set_SavePonderationBillMain_Temp_Entrust_Source_Fast_Json(string HSourceBillType, string HSourceBillNo, Int64 sInterID, string sBillNo)
         {
             string sNewBillType = "1211";
             string sSourceBillType = "1604";
@@ -115,40 +180,34 @@
             try
             {
 
-                string sWhere = "where 鍗曟嵁鍙� like '%" + sSourceBillNo + "%'";
-                //ds = BLL.ClsSourceBill.getSourceBillList(sWhere, HSourceBillType);
-                ds = new BLL.ClsKf_EntrustOutBill().GetWW_WWPPBomList(sWhere, ref DBUtility.ClsPub.sExeReturnInfo);
-                if (ds == null)
+                string sWhere = "where 鍗曟嵁鍙� like '%" + HSourceBillNo.Trim() + "%'";
+                ds = webserver.GetWW_WWPPBomList(sWhere);
+                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犳婧愬崟鍙凤紒";
+                    objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍,婧愬崟绫诲瀷鏈夐敊璇紒";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
+                HSupID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HSupID"]);
+                HSupName = Convert.ToString(ds.Tables[0].Rows[0]["HSupName"]);
+                HDeptID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HDeptID"]);
+                HDeptName = Convert.ToString(ds.Tables[0].Rows[0]["HDeptName"]);
 
-                //else
-                //{
-                //    objJsonResult.code = "0";
-                //    objJsonResult.count = 1;
-                //    objJsonResult.Message = "Success";
-                //    objJsonResult.data = ds;
-                //    return objJsonResult;
-                //}
-                DAL.ClsKF_PonderationBillMain_Temp_Ctl dal = new DAL.ClsKF_PonderationBillMain_Temp_Ctl();
-                if (dal.AddNew_Source(sNewInterID, sNewBillNo, sNewBillType, sSourceBillNo, sSourceBillType, sRedBlueflag, ref DBUtility.ClsPub.sExeReturnInfo))
+                if (webserver.set_SavePonderationBillMain_Temp_Source_Fast(sInterID, sBillNo, HBillType, HSourceBillNo, HSourceBillType, "钃濆瓧", ref DBUtility.ClsPub.sErrInfo))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 1;
-                    objJsonResult.Message = "淇濆瓨鍒板嚭鍏ュ簱鏉$爜涓存椂琛ㄦ垚鍔燂紒";
-                    objJsonResult.data = ds;
+                    objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+                    objJsonResult.data = ds.Tables[0];
                     return objJsonResult;
                 }
                 else
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "淇濆瓨鍒板嚭鍏ュ簱鏉$爜涓存椂琛ㄥけ璐ワ紒";
+                    objJsonResult.Message = "鍐欏叆涓存椂琛ㄥけ璐ワ紒" + DBUtility.ClsPub.sErrInfo;
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -157,11 +216,12 @@
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
-                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛佸紓甯�"+ex.ToString();
+                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛佸紓甯�" + ex.ToString();
                 objJsonResult.data = null;
                 return objJsonResult;
             }
         }
+
 
         public bool AddNew_Source(long sNewInterID, string sNewBillNo, string sNewBillType, string sSourceBillNo, string sSourceBillType, string sRedBlueflag, ref string sReturn)
         {
@@ -405,6 +465,7 @@
                 websLsmain.HWHID = lsmain[0].HWHID;
                 websLsmain.HMainSourceBillType = "濮斿璁㈠崟-鎶曟枡";
                 websLsmain.HSupID = lsmain[0].HSupID;
+                websLsmain.HBillType = "1211";//鍥哄畾鍊�
 
                 if (webserver.set_SaveEntrustOutBill_New(websLsmain, sSourceBillType, ref DBUtility.ClsPub.sErrInfo))
                 {

--
Gitblit v1.9.1