From 4f18572bce174f7d131e11d3f69156183ff7c71d Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期四, 09 二月 2023 21:34:06 +0800
Subject: [PATCH] 采购订单存储过程修改、采购订单明细接口

---
 VueWebApi/Controllers/PurchaseOrderController.cs |   10 ++++++++++
 VueWebApi/DLL/DAL/PurchaseOrderDAL.cs            |   34 +++++++++++++++++++++++++++++++++-
 VueWebApi/DLL/BLL/PurchaseOrderBLL.cs            |    7 +++++++
 .vs/VueWebApi/v16/.suo                           |    0 
 VueWebApi/Controllers/ProductModelController.cs  |    2 +-
 5 files changed, 51 insertions(+), 2 deletions(-)

diff --git a/.vs/VueWebApi/v16/.suo b/.vs/VueWebApi/v16/.suo
index 4da0f16..5f3d865 100644
--- a/.vs/VueWebApi/v16/.suo
+++ b/.vs/VueWebApi/v16/.suo
Binary files differ
diff --git a/VueWebApi/Controllers/ProductModelController.cs b/VueWebApi/Controllers/ProductModelController.cs
index 3eb92be..386be16 100644
--- a/VueWebApi/Controllers/ProductModelController.cs
+++ b/VueWebApi/Controllers/ProductModelController.cs
@@ -245,7 +245,7 @@
             string maxstockqty = obj["maxstockqty"].ToString(); //鏈�澶у簱瀛�
             string is_batchno = obj["is_batchno"].ToString();   //鏄惁鎵规绠$悊
             string is_fifo = obj["is_fifo"].ToString();         //鏄惁鍏堣繘鍏堝嚭
-            string is_incheck = obj["is_incheck"].ToString();   //鏄惁鍏ュ簱妫�楠�
+            string is_incheck = obj["is_incheck"].ToString();   //鏄惁鍏ュ巶妫�楠�
             string is_outcheck = obj["is_outcheck"].ToString(); //鏄惁鍑哄巶妫�楠�
             var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
             string OperType = obj["OperType"].ToString();  //鎿嶄綔绫诲瀷
diff --git a/VueWebApi/Controllers/PurchaseOrderController.cs b/VueWebApi/Controllers/PurchaseOrderController.cs
index 3cdf268..65da27e 100644
--- a/VueWebApi/Controllers/PurchaseOrderController.cs
+++ b/VueWebApi/Controllers/PurchaseOrderController.cs
@@ -61,6 +61,16 @@
         }
         #endregion
 
+        #region[閲囪喘璁㈠崟鏄庣粏]
+        [Route(template: "PurchaseOrderSubSearch")]
+        [HttpGet]
+        public HttpResponseMessage PurchaseOrderSubSearch(string purodercode)
+        {
+            mes = PurchaseOrderBLL.PurchaseOrderSubSearch(purodercode);
+            return TJson.toJson(mes);
+        }
+        #endregion
+
         #region[閲囪喘璁㈠崟鍒犻櫎]
         /// <summary>
         /// 閲囪喘璁㈠崟鍒犻櫎
diff --git a/VueWebApi/DLL/BLL/PurchaseOrderBLL.cs b/VueWebApi/DLL/BLL/PurchaseOrderBLL.cs
index 0281c63..3c80b1f 100644
--- a/VueWebApi/DLL/BLL/PurchaseOrderBLL.cs
+++ b/VueWebApi/DLL/BLL/PurchaseOrderBLL.cs
@@ -16,6 +16,13 @@
         }
         #endregion
 
+        #region[閲囪喘璁㈠崟鏄庣粏]
+        public static ToMessage PurchaseOrderSubSearch(string purodercode)
+        {
+            return PurchaseOrderDAL.PurchaseOrderSubSearch(purodercode);
+        }
+        #endregion
+
         #region[閲囪喘璁㈠崟鍒犻櫎]
         public static ToMessage DeletePurchaseOrder(string po)
         {
diff --git a/VueWebApi/DLL/DAL/PurchaseOrderDAL.cs b/VueWebApi/DLL/DAL/PurchaseOrderDAL.cs
index e811852..5c688df 100644
--- a/VueWebApi/DLL/DAL/PurchaseOrderDAL.cs
+++ b/VueWebApi/DLL/DAL/PurchaseOrderDAL.cs
@@ -80,7 +80,7 @@
                             left join TOrganization T on  A.departmentcode=T.org_code 
                             left join TCustomer C on A.customercode=C.code 
                             left join TUser U on A.auditorusercode=U.usercode
-                            where  T.description='D' and C.mtype='WG' " + search;
+                            where  1=1 " + search;
                 var data = DapperHelper.GetPageList<object>(sql, dynamicParams, prop, order, startNum, endNum, out total);
                 mes.code = "200";
                 mes.Message = "鏌ヨ鎴愬姛!";
@@ -98,6 +98,38 @@
         }
         #endregion
 
+        #region[閲囪喘璁㈠崟鏄庣粏]
+        public static ToMessage PurchaseOrderSubSearch(string purodercode)
+        {
+            string sql = "";
+            var dynamicParams = new DynamicParameters();
+            try
+            {
+                //鑾峰彇閲囪喘璁㈠崟鐗╂枡淇℃伅
+                sql = @"select M.partcode,M.partname,M.partspec,T.name as uomname,A.quantity,A.countarrivalquantity,A.countInquantity,
+                        A.acceptdate,S.name as housename,M.is_incheck
+                        from T_PurchaseOrder_sub A
+                        left join TMateriel_Info M on A.materiel_code=M.partcode
+                        left join TUom T on M.uom_code=T.code
+                        left join T_Sec_Stck S on A.warehousecode=S.code
+                        where A.purchaesorder_code=@purodercode";
+                dynamicParams.Add("@purodercode", purodercode);
+                var data = DapperHelper.selectdata(sql, dynamicParams);
+                mes.code = "200";
+                mes.Message = "鏌ヨ鎴愬姛!";
+                mes.data = data;
+            }
+            catch (Exception e)
+            {
+                mes.code = "300";
+                mes.count = 0;
+                mes.Message = e.Message;
+                mes.data = null;
+            }
+            return mes;
+        }
+        #endregion
+
         #region[閲囪喘璁㈠崟鍒犻櫎]
         public static ToMessage DeletePurchaseOrder(string po)
         {

--
Gitblit v1.9.3