From 957b51cfdeb4374d817086a2ca761c75545e206d Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期四, 28 十一月 2024 16:59:56 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/Sc_MouldRepairInBillListController.cs |   93 +++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 90 insertions(+), 3 deletions(-)

diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
index b19e5ea..081f353 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -1871,6 +1871,66 @@
                 return objJsonResult;
             }
         }
+
+        #region 閿�鍞嚭搴撳崟鍒楄〃-鍒嗛〉
+        /// <summary>
+        /// 閿�鍞嚭搴撳崟鍒楄〃
+        /// </summary>
+        /// <returns></returns>
+        [Route("Kf_SellOutBill/GetSellOutBillList_byPage")]
+        [HttpGet]
+        public object GetSellOutBillList_byPage(string sWhere, string user, string Organization, int page, int size)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();  //瀹氫箟澹版槑鍙橀噺 锛屾妸閫氳繃 new List<object>()鍒涘缓鐨� 瀹炰緥锛岃祴鍊肩粰鍙橀噺
+                //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+                if (!DBUtility.ClsPub.Security_Log("Kf_SellOutBillQuery", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鏌ヨ鏉冮檺!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                sWhere = sWhere.Replace("'", "''");
+
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("exec h_p_IF_SellOutBillList " + page + "," + size + ",'" + Organization + "'," + "''", "h_p_IF_SellOutBillList");
+                }
+                else
+                {
+                    ds = oCN.RunProcReturn("exec h_p_IF_SellOutBillList " + page + "," + size + ",'" + Organization + "','" + sWhere + "'", "h_p_IF_SellOutBillList");
+                }
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.list = columnNameList;
+                objJsonResult.data = ds.Tables[0];
+                return objJsonResult;
+            }
+            catch (Exception ex)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
         /// <summary>
         ///閿�鍞嚭搴撳崟鍒犻櫎鍔熻兘
         /// </summary>
@@ -4032,7 +4092,7 @@
                 lsmain = oListModels.getObjectByJson_Gy_MouldRepairWorkBillMain(msg2);
                 foreach (Model.ClsSb_MouldRepairWorkBillMain oItem in lsmain)
                 {
-                    //oItem.HMaker = "";
+                    oItem.HMaker = msg4;
                     UserName = msg4;  //鍒跺崟浜�
                     oItem.HBillType = "3807";
                     oItem.HBillSubType = "3807";
@@ -5102,7 +5162,7 @@
             string msg3 = sArray[1].ToString();
             string msg4 = sArray[2].ToString();
             string msg5 = sArray[3].ToString();
-
+            string msg6 = sArray[4].ToString();
 
             string UserName = "";
             ListModels oListModels = new ListModels();
@@ -5136,6 +5196,7 @@
                     //oItem.HBillNo = "";
                     oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));//  --鏃ユ湡
                     oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+                    oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
                     //oItem.HMakeDate = "";
                     //oItem.HYear = "";
                     //oItem.HPeriod = "";
@@ -5222,6 +5283,32 @@
                     oBill.DetailColl.Add(oItemSub);
 
                 }
+
+                //琛ㄤ綋鏁版嵁
+                //鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
+                //濡傛灉鏄紪杈戝氨鍏佽淇濆瓨,鍚﹀垯涓嶅厑璁�
+                if (oBill.omodel.HInterID != 0)
+                {
+                    msg6 = msg6.Substring(1, msg6.Length - 2);
+                    msg6 = msg6.Replace("\\", "");
+                    msg6 = msg6.Replace("\n", "");  
+                    List<Model.ClsSc_MouldMaintainPlanBillSub_Plan> lss = new List<Model.ClsSc_MouldMaintainPlanBillSub_Plan>();
+                    lss = oListModels.getObjectByJson_Sc_MouldMaintainPlanBillSub_Plan(msg6);
+                    int l = 0;
+                    foreach (Model.ClsSc_MouldMaintainPlanBillSub_Plan oItem in lss)
+                    {
+
+                        l++;
+                        oItem.HEntryID = l;
+                        oItem.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+                        oItem.HCloseType = false;   //鍏抽棴绫诲瀷
+                        oItem.HSourceInterID = 0;     // 婧愬崟涓诲唴鐮�
+                        oItem.HSourceEntryID = 0;   //婧愬崟瀛愬唴鐮�
+                        oItem.HRelationQty = 0;     //鍏宠仈鏁伴噺                  
+                        oBill.DetailCol2.Add(oItem);
+                    }
+                }
+                
                 //淇濆瓨
                 //淇濆瓨瀹屾瘯鍚庡鐞�
                 bool bResult;
@@ -5537,7 +5624,7 @@
                 foreach (Model.ClsSc_MouldMaintainBillMain oItem in lsmain)
                 {
                     UserName = oItem.HMaker;  //鍒跺崟浜�
-                    DBUtility.ClsPub.CurUserName = UserName;
+                    DBUtility.ClsPub.CurUserName = msg5;
                     oItem.HBillType = "3819";
                     oItem.HBillSubType = "3819";
 

--
Gitblit v1.9.1