From 6a2a02e183b0c0a8b01bebd0452bd0ac0bbed445 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 03 十一月 2025 16:26:34 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs |   80 ++++++++++++++++++++++++++++++++++++++--
 1 files changed, 76 insertions(+), 4 deletions(-)

diff --git a/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs b/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
index efadec9..0129950 100644
--- a/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
+++ b/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
@@ -179,6 +179,31 @@
                 }
                 if (bResult)
                 {
+
+                    //鑷姩瀹℃牳璁剧疆
+                    if (msg5 == "xz")
+                    {
+                        objJsonResult.HInterID = oBill.omodel.HInterID.ToString(); //杩斿洖涓籌D
+                        //绯荤粺鍙傛暟  鑷姩瀹℃牳
+                        string sReturn = "";
+                        if (oSystemParameter.ShowBill(ref sReturn) == true)
+                        {
+                            if (oSystemParameter.omodel.Sc_ProcessExchangeBill_AutoCheck == "Y") //绯荤粺鍙傛暟  鑷姩瀹℃牳 
+                            {
+                                objJsonResult.Verify = "Y";
+                            }
+                            else
+                            {
+                                objJsonResult.Verify = "N";
+                            }
+                        }
+                    }
+                    else                   
+                    {
+                        objJsonResult.HInterID = oBill.omodel.HInterID.ToString(); //杩斿洖涓籌D
+                        objJsonResult.Verify = "N";
+                    }
+
                     objJsonResult.code = "0";
                     objJsonResult.count = 1;
                     objJsonResult.Message = "[0000-1-050]淇濆瓨鎴愬姛锛�";
@@ -2210,6 +2235,9 @@
                         oBill.omodel.HPeriod = DBUtility.ClsPub.isLong(oItemSub.HDate.Month);
                         oBill.omodel.HRemark = "";
                         oBill.omodel.HBatchNo = oItemSub.HBatchNo;
+                        oBill.omodel.HProjectNum = oItemSub.HProjectNum;
+                        oBill.omodel.HMateOutBatchNo = oItemSub.HMateOutBatchNo;
+                        oBill.omodel.HMouldNum = oItemSub.HMouldNum;
                         oBill.omodel.HMainMaterID = 0;
                         oBill.omodel.HKeyMaterID = 0;
                         oBill.omodel.HNo = 0;
@@ -2222,10 +2250,8 @@
                         oBill.omodel.HMaterID = oItemSub.HMaterID;
                         oBill.omodel.HMaterNumber = ds.Tables[0].Rows[0]["HMaterNumber"].ToString();
                         oBill.omodel.HUnitID = Pub_Class.ClsPub.isLong(ds.Tables[0].Rows[0]["HUnitID"]);
-                        oBill.omodel.HMateOutBatchNo = "";
                         oBill.omodel.HUnitNumber = ds.Tables[0].Rows[0]["HUnitNumber"].ToString();
                         oBill.omodel.HMaterID2 = oItemSub.HMaterID;
-                        oBill.omodel.HProjectNum = "";
                         oBill.omodel.HPlanQty = oItemSub.HQty;
                         oBill.omodel.HQty = oItemSub.HProQty;
                         oBill.omodel.HPlanBeginDate = Convert.ToDateTime(dt.ToShortDateString().ToString());
@@ -2301,8 +2327,7 @@
                         oBill.omodel.HWidth_New = 0;
                         oBill.omodel.HRemark_New = "";
                         oBill.omodel.HWeight_New = 0;
-                        oBill.omodel.HPlanOrderProcNo = ds.Tables[0].Rows[0]["HPlanOrderProcNo"].ToString();
-                        oBill.omodel.HMouldNum = "0";                        
+                        oBill.omodel.HPlanOrderProcNo = ds.Tables[0].Rows[0]["HPlanOrderProcNo"].ToString();                     
                     }   
                     //瀛愯〃璧嬪��
                     for(int i = 0; i < ds.Tables[0].Rows.Count; i++)
@@ -2418,5 +2443,52 @@
             }
         }
         #endregion
+
+        #region 鍙墦鍗板鏂欏崟鎶ヨ〃锛堟坊搴凤級
+
+        [Route("Sc_ProcessExchangeBill/AllowedPrint")]
+        [HttpGet]
+        public object AllowedPrint(string sWhere, string user, string Organization, int page, int size)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                sWhere = sWhere.Replace("'", "''");
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("exec h_p_Sc_ProcessExchangeBillList_AllowedPrint " + page + "," + size + ",'" + Organization + "'," + "''", "h_p_Sc_ProcessExchangeBillList_AllowedPrint");                   
+                }
+                else
+                {
+                    ds = oCN.RunProcReturn("exec h_p_Sc_ProcessExchangeBillList_AllowedPrint " + page + "," + size + ",'" + Organization + "','" + sWhere + "'", "h_p_Sc_ProcessExchangeBillList_AllowedPrint");
+                }
+
+                //娣诲姞鍒楀悕
+                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.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
+
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1