From 2ec1b01d8a5e076eba607d83b902846876957a3e Mon Sep 17 00:00:00 2001
From: pzy <2829717936@qq.com>
Date: 星期四, 03 十月 2024 23:00:03 +0800
Subject: [PATCH] 111

---
 WebAPI/Controllers/Sc_MouldRepairInBillListController.cs |  111 +++++++++++++++++++++++++------------------------------
 1 files changed, 50 insertions(+), 61 deletions(-)

diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
index 19cdea6..b19e5ea 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -606,6 +606,49 @@
         }
         #endregion
 
+        #region 鍣ㄥ叿瀵垮懡鑰楃敤鍒嗘瀽鎶ヨ〃 
+        [Route("Sc_MouldRepairInBillList/Get_Sc_MouldLifeUsePicReport")]
+        [HttpGet]
+        public object Get_Sc_MouldLifeUsePicReport(string sWhere)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("select * from h_v_Sc_MouldLifeUsePicReport order by 鏈堜唤 desc", "h_v_Sc_MouldLifeUsePicReport");
+                }
+                else
+                {
+                    string sql1 = "select * from h_v_Sc_MouldLifeUsePicReport where 1 = 1 ";
+                    string sql = sql1 + sWhere + " order by 鏃ユ湡 ";
+                    ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldLifeUsePicReport");
+                }
+                //娣诲姞鍒楀悕
+                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 = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
 
 
         /// <summary>
@@ -1248,8 +1291,6 @@
                     }
                     //================================================================================== 
 
-                    //鏇存柊鍙婃椂搴撳瓨琛�   鍑忓皯璋冨叆搴撳瓨,澧炲姞璋冨嚭搴撳瓨
-                    ds = oCN.RunProcReturn("exec h_KF_UPDateICinventory_Move  '"+ oBill.omodel.HInterID + "','"+ oBill.omodel.HBillType+ "','1'", "h_KF_UPDateICinventory_Move");
 
                     //瀹℃牳鍗曟嵁
                     if (!oBill.CheckBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Kf_MoveStockBill_AfterCheckCtrl", user, ref DBUtility.ClsPub.sExeReturnInfo) == true)
@@ -1301,9 +1342,6 @@
                         return objJsonResult;
                     }
                     //===========================================================          
-
-                    //鏇存柊鍙婃椂搴撳瓨琛�   澧炲姞璋冨叆搴撳瓨,鍑忓皯璋冨嚭搴撳瓨
-                    ds = oCN.RunProcReturn("exec h_KF_UPDateICinventory_Move  '" + oBill.omodel.HInterID + "','" + oBill.omodel.HBillType + "','2'", "h_KF_UPDateICinventory_Move");
 
                     //鍙嶅鏍稿崟鎹�
                     if (oBill.AbandonCheck(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Kf_MoveStockBill_AfterUnCheckCtrl", user, ref DBUtility.ClsPub.sExeReturnInfo) == true)
@@ -6495,8 +6533,6 @@
             string msg2 = sArray[0].ToString();
             string msg3 = sArray[1].ToString();
             string msg4 = sArray[2].ToString();
-            //string msg5 = sArray[3].ToString();
-
 
             string UserName = "";
             ListModels oListModels = new ListModels();
@@ -6517,28 +6553,14 @@
                 msg2 = msg2.Replace("\n", "");  //\n
                 lsmain = oListModels.getObjectByJson_Sc_MouldDotCheckPlanBillMain(msg2);
                 foreach (Model.ClsSc_MouldDotCheckPlanBillMain oItem in lsmain)
-                {
-                    //oItem.HMaker = "";
+                {                  
                     UserName = oItem.HMaker;  //鍒跺崟浜�
                     oItem.HBillType = "3820";
                     oItem.HBillSubType = "3820";
-
-                    //oItem.HInterID =0;
-                    //oItem.HBillNo = "";
+                 
                     oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));//  --鏃ユ湡
-                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
-                    //oItem.HMakeDate = "";
-                    //oItem.HYear = "";
-                    //oItem.HPeriod = "";
-                    //oItem.HRemark = "";
-                    //oItem.HCycleUnit = "";
-                    //oItem.HCheckCycle = "";
-                    //oItem.HBeginDate = "";
-                    //oItem.HEndDate = "";
-                    //oItem.HInnerBillNo = "";
-                    //oItem.HExplanation = "";
-
-                    //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo);
+                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);                   
+                  
                     if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
                     {
                         objJsonResult.code = "0";
@@ -6563,7 +6585,7 @@
 
                     i++;
                     oItemSub.HEntryID = i;
-                    //oItemSub.HCloseMan = "";       //琛屽叧闂�
+
                     oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
                     oItemSub.HCloseType = false;   //鍏抽棴绫诲瀷
                     //oItemSub.HRemark = "";         //澶囨敞
@@ -6571,43 +6593,10 @@
                     oItemSub.HSourceEntryID = 0;   //婧愬崟瀛愬唴鐮�
                     //oItemSub.HSourceBillNo = "";  //婧愬崟鍗曞彿
                     //oItemSub.HSourceBillType = ""; //婧愬崟绫诲瀷
-                    oItemSub.HRelationQty = 0;     //鍏宠仈鏁伴噺
-                                                   //oItemSub.HRelationMoney = 0;   //鍏宠仈閲戦
-                                                   //HMaterID = "";//閰嶄欢浠g爜
-                                                   //HUnitID = "";//鍗曚綅浠g爜
-                                                   //HQty = "";//瀹為檯鐢ㄩ噺
-                                                   //HQtyMust = "";//鍗曚綅鐢ㄩ噺
-                                                   //HRemark = "";//澶囨敞
+                    oItemSub.HRelationQty = 0;     //鍏宠仈鏁伴噺                                                
 
                     oBill.DetailColl.Add(oItemSub);
-
-                }
-
-                ////閰嶄欢椤硅〃浣撴暟鎹�
-                ////鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
-                //msg5 = msg5.Substring(1, msg5.Length - 2);
-                //msg5 = msg5.Replace("\\", "");
-                //msg5 = msg5.Replace("\n", "");  //\n
-                //                                //msg2 = msg2.Replace("'", "鈥�");
-                //List<Model.ClsSc_MouldDotCheckPlanBillSub_Item> ls1 = new List<Model.ClsSc_MouldDotCheckPlanBillSub_Item>();
-                //ls1 = oListModels.getObjectByJson_Sc_MouldDotCheckPlanBillSub_Item(msg5);
-                //int j = 0;
-                //foreach (Model.ClsSc_MouldDotCheckPlanBillSub_Item oItemSub in ls1)
-                //{
-
-                //    j++;
-                //    oItemSub.HEntryID = j;
-                //    //oItemSub.HCloseMan = "";       //琛屽叧闂�
-                //    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
-                //    oItemSub.HCloseType = false;   //鍏抽棴绫诲瀷
-
-                //    oItemSub.HSourceInterID = 0;     // 婧愬崟涓诲唴鐮�
-                //    oItemSub.HSourceEntryID = 0;   //婧愬崟瀛愬唴鐮�
-
-                //    oItemSub.HRelationQty = 0;     //鍏宠仈鏁伴噺
-                //    oBill.DetailCol.Add(oItemSub);
-                //}
-
+                }                
                 //淇濆瓨
                 //淇濆瓨瀹屾瘯鍚庡鐞�
                 bool bResult;

--
Gitblit v1.9.1