From 8aad6ba8e082d1fb63bfdd947f7e9da1bc133611 Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期五, 24 六月 2022 23:47:19 +0800
Subject: [PATCH] 工序定义接口开发、节拍工价接口开发

---
 VueWebApi/Controllers/ProductModelController.cs |  164 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 156 insertions(+), 8 deletions(-)

diff --git a/VueWebApi/Controllers/ProductModelController.cs b/VueWebApi/Controllers/ProductModelController.cs
index ab052a6..55b428e 100644
--- a/VueWebApi/Controllers/ProductModelController.cs
+++ b/VueWebApi/Controllers/ProductModelController.cs
@@ -82,7 +82,7 @@
             string stocktypecode = obj["stocktypecode"].ToString(); //瀛樿揣绫诲瀷缂栫爜
             var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
             string OperType = obj["OperType"].ToString();  //鎿嶄綔绫诲瀷
-            mes = ProductModelBLL.AddUpdateMaterialType(materialtypeid,materialtypecode, materialtypename, stocktypecode, username, OperType);
+            mes = ProductModelBLL.AddUpdateMaterialType(materialtypeid, materialtypecode, materialtypename, stocktypecode, username, OperType);
             return TJson.toJson(mes);
         }
         #endregion
@@ -137,7 +137,7 @@
         public HttpResponseMessage UomAdd(List<Uom> json)
         {
             var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
-            mes = ProductModelBLL.UomAdd(username,json);
+            mes = ProductModelBLL.UomAdd(username, json);
             return TJson.toJson(mes);
         }
         #endregion
@@ -197,7 +197,7 @@
         /// <returns></returns>
         [Route(template: "InventoryFileSelect")]
         [HttpGet]
-        public HttpResponseMessage InventoryFileSelect(string partcode = null, string partname = null,string partspec=null,string stocktypecode = null,string materialtypecode=null,string storehousecode=null, int page = 0, int rows = 0, string prop = null, string order = null)
+        public HttpResponseMessage InventoryFileSelect(string partcode = null, string partname = null, string partspec = null, string stocktypecode = null, string materialtypecode = null, string storehousecode = null, int page = 0, int rows = 0, string prop = null, string order = null)
         {
             int startNum = rows * (page - 1) + 1;  //璧峰璁板綍rowNum
             int endNum = rows * page;   //缁撴潫璁板綍 rowNum
@@ -228,7 +228,7 @@
             string maxstockqty = obj["maxstockqty"].ToString(); //鏈�澶у簱瀛�
             var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
             string OperType = obj["OperType"].ToString();  //鎿嶄綔绫诲瀷
-            mes = ProductModelBLL.AddUpdateInventoryFile(materialid, materialcode, materialname, materialspec, uomcode, warehousecode, stocktypecode, materialtypecode, minstockqty, maxstockqty,username, OperType);
+            mes = ProductModelBLL.AddUpdateInventoryFile(materialid, materialcode, materialname, materialspec, uomcode, warehousecode, stocktypecode, materialtypecode, minstockqty, maxstockqty, username, OperType);
             return TJson.toJson(mes);
         }
         #endregion
@@ -275,7 +275,7 @@
         public HttpResponseMessage SaveInventoryFile(string partcode, List<ObjectData> json)
         {
             var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
-            mes = ProductModelBLL.SaveInventoryFile(partcode, username,json);
+            mes = ProductModelBLL.SaveInventoryFile(partcode, username, json);
             return TJson.toJson(mes);
         }
         #endregion
@@ -332,7 +332,7 @@
         /// <returns></returns>
         [Route(template: "AddUpdateRoute")]
         [HttpPost]
-        public HttpResponseMessage AddUpdateRoute(string id,string opertype, RoutEdit json)
+        public HttpResponseMessage AddUpdateRoute(string id, string opertype, RoutEdit json)
         {
             var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
             mes = ProductModelBLL.AddUpdateRoute(id, opertype, username, json);
@@ -373,11 +373,11 @@
         /// <returns></returns>
         [Route(template: "StepSearch")]
         [HttpGet]
-        public HttpResponseMessage StepSearch(string stepcode = null, string stepname = null, string enable = null,string steptypecode=null, string createuser = null, int page = 0, int rows = 0, string prop = null, string order = null)
+        public HttpResponseMessage StepSearch(string stepcode = null, string stepname = null, string enable = null, string steptypecode = null, string createuser = null, int page = 0, int rows = 0, string prop = null, string order = null)
         {
             int startNum = rows * (page - 1) + 1;  //璧峰璁板綍rowNum
             int endNum = rows * page;   //缁撴潫璁板綍 rowNum
-            mes = ProductModelBLL.StepSearch(stepcode, stepname, enable, steptypecode,createuser, startNum, endNum, prop, order);
+            mes = ProductModelBLL.StepSearch(stepcode, stepname, enable, steptypecode, createuser, startNum, endNum, prop, order);
             return TJson.toJson(mes);
         }
         #endregion
@@ -451,5 +451,153 @@
             return TJson.toJson(mes);
         }
         #endregion
+
+        #region[宸ュ簭鍏宠仈缂洪櫡鏌ヨ]
+        /// <summary>
+        /// 宸ュ簭鍏宠仈缂洪櫡鏌ヨ
+        /// </summary>
+        /// <param name="stepcode">宸ュ簭缂栫爜</param>
+        /// <returns></returns>
+        [Route(template: "StepAssociationDefect")]
+        [HttpGet]
+        public HttpResponseMessage StepAssociationDefect(string stepcode)
+        {
+            mes = ProductModelBLL.StepAssociationDefect(stepcode);
+            return TJson.toJson(mes);
+        }
+        #endregion
+
+        #region[宸ュ簭鍏宠仈缂洪櫡鎻愪氦]
+        [Route(template: "SaveStepAssociationDefect")]
+        [HttpPost]
+        public HttpResponseMessage SaveStepAssociationDefect(string stepcode, List<ObjectData> json)
+        {
+            var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
+            mes = ProductModelBLL.SaveStepAssociationDefect(stepcode, username, json);
+            return TJson.toJson(mes);
+        }
+        #endregion
+
+
+
+        #region[浜у搧淇℃伅涓嬫媺妗嗘煡璇
+        /// <summary>
+        /// 浜у搧淇℃伅涓嬫媺妗嗘煡璇�
+        /// </summary>
+        /// <returns></returns>
+        [Route(template: "PartSelect")]
+        [HttpGet]
+        public HttpResponseMessage PartSelect()
+        {
+            try
+            {
+                mes = ProductModelBLL.PartSelect();
+            }
+            catch (Exception e)
+            {
+                mes.code = "300";
+                mes.Message = e.Message;
+            }
+            return TJson.toJson(mes);
+        }
+        #endregion
+
+        #region[浜у搧缂栫爜鏌ユ壘宸ヨ壓璺嚎涓嬫媺妗哴
+        /// <summary>
+        /// 浜у搧缂栫爜鏌ユ壘宸ヨ壓璺嚎涓嬫媺妗�
+        /// </summary>
+        /// <param name="partcode">浜у搧缂栫爜</param>
+        /// <returns></returns>
+        [Route(template: "PartSelectRpute")]
+        [HttpGet]
+        public HttpResponseMessage PartSelectRpute(string partcode)
+        {
+            try
+            {
+                mes = ProductModelBLL.PartSelectRpute(partcode);
+            }
+            catch (Exception e)
+            {
+                mes.code = "300";
+                mes.Message = e.Message;
+            }
+            return TJson.toJson(mes);
+        }
+        #endregion
+
+        #region[鏍规嵁宸ヨ壓璺嚎缂栫爜鏌ユ壘鍏宠仈宸ュ簭闆嗗悎]
+        /// <summary>
+        /// 鏍规嵁宸ヨ壓璺嚎缂栫爜鏌ユ壘鍏宠仈宸ュ簭闆嗗悎
+        /// </summary>
+        /// <param name="routecode">宸ヨ壓璺嚎缂栫爜</param>
+        /// <returns></returns>
+        [Route(template: "RouteSelectStep")]
+        [HttpGet]
+        public HttpResponseMessage RouteSelectStep(string routecode)
+        {
+            try
+            {
+                mes = ProductModelBLL.RouteSelectStep(routecode);
+            }
+            catch (Exception e)
+            {
+                mes.code = "300";
+                mes.Message = e.Message;
+            }
+            return TJson.toJson(mes);
+        }
+        #endregion
+
+        #region[鏍规嵁宸ュ簭绾跨紪鐮佹煡鎵惧叧鑱旇澶囬泦鍚圿
+        /// <summary>
+        /// 鏍规嵁宸ュ簭绾跨紪鐮佹煡鎵惧叧鑱旇澶囬泦鍚�
+        /// </summary>
+        /// <param name="partcode">浜у搧缂栫爜</param>
+        ///  <param name="routecode">宸ヨ壓璺嚎缂栫爜</param>
+        /// <param name="stepcode">宸ュ簭缂栫爜</param>
+        /// <param name="page">椤电爜</param>
+        /// <param name="rows">姣忛〉鏄剧ず鏉℃暟</param>
+        /// <param name="prop">鎺掑簭瀛楁</param>
+        /// <param name="order">鎺掑簭瑙勫垯</param>
+        /// <returns></returns>
+        [Route(template: "StepSelectEqp")]
+        [HttpGet]
+        public HttpResponseMessage StepSelectEqp(string partcode, string routecode, string stepcode, int page = 0, int rows = 0, string prop = null, string order = null)
+        {
+
+            int startNum = rows * (page - 1) + 1;  //璧峰璁板綍rowNum
+            int endNum = rows * page;   //缁撴潫璁板綍 rowNum
+            mes = ProductModelBLL.StepSelectEqp(partcode, routecode, stepcode, startNum, endNum, prop, order);
+            return TJson.toJson(mes);
+        }
+        #endregion
+
+        #region[鑺傛媿宸ヤ环鏌ヨ]
+        /// <summary>
+        /// 鑺傛媿宸ヤ环鏌ヨ
+        /// </summary>
+        /// <param name="partcode">浜у搧缂栫爜</param>
+        /// <param name="partname">浜у搧鍚嶇О</param>
+        /// <param name="partspec">浜у搧瑙勬牸</param>
+        /// <param name="routecode">宸ヨ壓璺嚎缂栫爜</param>
+        /// <param name="stepcode">宸ュ簭缂栫爜</param>
+        /// <param name="eqpcode">璁惧缂栫爜</param>
+        /// <param name="eqpname">璁惧鍚嶇О</param>
+        /// <param name="page">椤电爜</param>
+        /// <param name="rows">姣忛〉鏄剧ず鏉℃暟</param>
+        /// <param name="prop">鎺掑簭瀛楁</param>
+        /// <param name="order">鎺掑簭瑙勫垯</param>
+        /// <returns></returns>
+        [Route(template: "BeatRateSearch")]
+        [HttpGet]
+        public HttpResponseMessage BeatRateSearch(string partcode = null, string partname = null, string partspec = null, string routecode = null, string stepcode = null, string eqpcode = null, string eqpname = null, int page = 0, int rows = 0, string prop = null, string order = null)
+        {
+            int startNum = rows * (page - 1) + 1;  //璧峰璁板綍rowNum
+            int endNum = rows * page;   //缁撴潫璁板綍 rowNum
+            mes = ProductModelBLL.BeatRateSearch(partcode, partname, partspec, routecode, stepcode, eqpcode, eqpname, startNum, endNum, prop, order);
+            return TJson.toJson(mes);
+        }
+        #endregion
+
     }
 }

--
Gitblit v1.9.3