From ece3372b4f7500483092a90f2a1e40f3586f6f1b Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期四, 23 六月 2022 18:47:14 +0800
Subject: [PATCH] 存货档案、工艺路线(新增、编辑、删除、关联工艺路线)

---
 VueWebApi/Controllers/BasicSettingController.cs |   82 ++++++++++++++++++++++++++++++++++++-----
 1 files changed, 72 insertions(+), 10 deletions(-)

diff --git a/VueWebApi/Controllers/BasicSettingController.cs b/VueWebApi/Controllers/BasicSettingController.cs
index 6693381..03964de 100644
--- a/VueWebApi/Controllers/BasicSettingController.cs
+++ b/VueWebApi/Controllers/BasicSettingController.cs
@@ -215,6 +215,13 @@
         #endregion
 
         #region[鐢ㄦ埛娓呭崟瀵煎叆]
+        /// <summary>
+        /// 鐢ㄦ埛娓呭崟瀵煎叆
+        /// </summary>
+        /// <param name="files">涓婁紶鐢ㄦ埛娓呭崟瀵煎叆鏂囦欢</param>
+        /// <returns></returns>
+        [Route(template: "ImportUserExcel")]
+        [HttpPost]
         public HttpResponseMessage ImportUserExcel(HttpPostedFileBase files)
         {
             string savePath;
@@ -274,9 +281,9 @@
 
 
 
-        #region[瑙掕壊绫诲瀷鏌ヨ]
+        #region[瑙掕壊绫诲瀷鍒楄〃鏌ヨ]
         /// <summary>
-        /// 瑙掕壊绫诲瀷鏌ヨ
+        /// 瑙掕壊绫诲瀷鍒楄〃鏌ヨ
         /// </summary>
         /// <param name="page">椤电爜</param>
         /// <param name="rows">姣忛〉鏄剧ず鏉℃暟</param>
@@ -320,6 +327,28 @@
         public HttpResponseMessage RoleTypeDelete(string RoleTypeCode)
         {
             mes = BasicSettingBLL.RoleTypeDelete(RoleTypeCode);
+            return TJson.toJson(mes);
+        }
+        #endregion
+
+        #region[瑙掕壊绫诲瀷涓嬫媺鎺ュ彛]
+        /// <summary>
+        /// 瑙掕壊绫诲瀷涓嬫媺鎺ュ彛
+        /// </summary>
+        /// <returns></returns>
+        [Route(template: "RoleTypeSelect")]
+        [HttpGet]
+        public HttpResponseMessage RoleTypeSelect()
+        {
+            try
+            {
+                mes = BasicSettingBLL.RoleTypeSelect();
+            }
+            catch (Exception e)
+            {
+                mes.code = "300";
+                mes.Message = e.Message;
+            }
             return TJson.toJson(mes);
         }
         #endregion
@@ -410,6 +439,22 @@
         }
         #endregion
 
+        #region[瑙掕壊娓呭崟鍏宠仈鐢ㄦ埛鏌ヨ1]
+        /// <summary>
+        /// 瑙掕壊娓呭崟鍏宠仈鐢ㄦ埛鏌ヨ1
+        /// </summary>
+        /// <param name="rolecode">瑙掕壊缂栫爜</param>
+        /// <returns></returns>
+        [Route(template: "RoleAssociationUserTwo")]
+        [HttpGet]
+        [HiddenApi]
+        public HttpResponseMessage RoleAssociationUserTwo(string rolecode = null)
+        {
+            mes = BasicSettingBLL.RoleAssociationUserTwo(rolecode);
+            return TJson.toJson(mes);
+        }
+        #endregion
+
         #region[瑙掕壊娓呭崟鍏宠仈鐢ㄦ埛淇濆瓨]
         /// <summary>
         /// 瑙掕壊娓呭崟鍏宠仈鐢ㄦ埛淇濆瓨
@@ -417,28 +462,28 @@
         /// <param name="rolecode">瑙掕壊缂栫爜</param>
         /// <param name="json">鎻愪氦鏁版嵁瀵硅薄</param>
         /// <returns></returns>
-        [Route(template: "SaveUserAssoctRole")]
+        [Route(template: "SaveRoleAssoctUser")]
         [HttpPost]
-        public HttpResponseMessage SaveRoleAssociationUser(string rolecode, List<ObjectData> json)
+        public HttpResponseMessage SaveRoleAssoctUser(string rolecode, List<ObjectData> json)
         {
             //JavaScriptSerializer Serializer = new JavaScriptSerializer();
             //List<RoleUserSubmit> objs = new List<RoleUserSubmit>(); 
             //objs = Serializer.Deserialize<List<RoleUserSubmit>>(json);
-            mes = BasicSettingBLL.SaveRoleAssociationUser(rolecode, json);
+            mes = BasicSettingBLL.SaveRoleAssoctUser(rolecode, json);
             return TJson.toJson(mes);
         }
         #endregion
 
         #region[瑙掕壊娓呭崟鍏宠仈鍔熻兘鏌ヨ]
         /// <summary>
-        /// 鐢ㄦ埛娓呭崟鍏宠仈鍔熻兘鏌ヨ
+        /// 瑙掕壊娓呭崟鍏宠仈鍔熻兘鏌ヨ
         /// </summary>
         /// <param name="rolecode">瑙掕壊缂栫爜</param>
         /// <param name="type">鎿嶄綔绔垎绫荤紪鐮�</param>
         /// <returns></returns>
         [Route(template: "RoleAssociationRight")]
         [HttpGet]
-        public HttpResponseMessage RoleAssociationRight(string rolecode,string type)
+        public HttpResponseMessage RoleAssociationRight(string rolecode,string type=null)
         {
             mes = BasicSettingBLL.RoleAssociationRight(rolecode,type);
             return TJson.toJson(mes);
@@ -501,13 +546,30 @@
             string unitid = obj["id"].ToString();    //寰�鏉ュ崟浣峣d(涓婚敭)
             string unitcode = obj["unitcode"].ToString(); //寰�鏉ュ崟浣嶇紪鐮佺紪鐮�
             string unitname = obj["unitname"].ToString(); //寰�鏉ュ崟浣嶅悕绉�
-            string unitattr = obj["unitattr"].ToString(); //寰�鏉ュ崟灞炴��
+            string mtypecode = obj["mtypecode"].ToString(); //澶栬喘渚涙柟缂栫爜
+            string btypecode = obj["btypecode"].ToString(); //澶栧崗渚涙柟缂栫爜
+            string htypecode = obj["htypecode"].ToString(); //瀹㈡埛缂栫爜
             string person = obj["person"].ToString(); //鑱旂郴浜�
             string contact = obj["contact"].ToString(); //鑱旂郴鏂瑰紡
             string description = obj["description"].ToString(); //琛ュ厖鎻忚堪
-            var usercode = HttpContext.Current.Request.Cookies["navTabId"].Value.ToString();
+            var usercode = "Admin";//HttpContext.Current.Request.Cookies["admin"].Value.ToString();
             string OperType = obj["OperType"].ToString();  //鎿嶄綔绫诲瀷
-            mes = BasicSettingBLL.AddUpdateCurrentUnit(unitid, unitcode, unitname, unitattr, person, contact, description, usercode, OperType);
+            mes = BasicSettingBLL.AddUpdateCurrentUnit(unitid, unitcode, unitname, mtypecode, btypecode,htypecode, person, contact, description, usercode, OperType);
+            return TJson.toJson(mes);
+        }
+        #endregion
+
+        #region[寰�鏉ュ崟浣嶅垹闄
+        /// <summary>
+        /// 寰�鏉ュ崟浣嶅垹闄�
+        /// </summary>
+        /// <param name="unitcode">寰�鏉ュ崟浣嶇紪鐮�</param>
+        /// <returns></returns>
+        [Route(template: "DeleteCurrentUnit")]
+        [HttpPost]
+        public HttpResponseMessage DeleteCurrentUnit(string unitcode)
+        {
+            mes = BasicSettingBLL.DeleteCurrentUnit(unitcode);
             return TJson.toJson(mes);
         }
         #endregion

--
Gitblit v1.9.3