From d570cdca55f34f8860f48bb30c5bea5b1f61390c Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期二, 10 十月 2023 07:37:48 +0800
Subject: [PATCH] nothing

---
 VueWebApi/Controllers/AppProductionManagementController.cs |  155 +++++++++++++++++++++++++++++++++------------------
 1 files changed, 99 insertions(+), 56 deletions(-)

diff --git a/VueWebApi/Controllers/AppProductionManagementController.cs b/VueWebApi/Controllers/AppProductionManagementController.cs
index 6f75a37..7a084e2 100644
--- a/VueWebApi/Controllers/AppProductionManagementController.cs
+++ b/VueWebApi/Controllers/AppProductionManagementController.cs
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json.Linq;
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -7,6 +8,7 @@
 using System.Web;
 using System.Web.Http;
 using VueWebApi.DLL.BLL;
+using VueWebApi.Models;
 using VueWebApi.Tools;
 
 namespace VueWebApi.Controllers
@@ -25,15 +27,16 @@
         /// <summary>
         /// 鐢熶骇寮�鎶ュ伐锛氬紑宸�(寮�濮�/鎶ュ伐)/澶栧崗(鍙戞枡/鏀舵枡)鏃舵潯浠跺垽鏂強鏁版嵁杩斿洖鎺ュ彛
         /// </summary>
+        /// <param name="stu_torgcode">鎵�灞炵粍缁囩紪鐮�</param>
         /// <param name="OperType">鎿嶄綔绫诲瀷锛氳嚜鍒�(ZZ)/澶栧崗(WX)</param>
         /// <param name="SelectType">鎿嶄綔绫诲瀷锛氬鍗忓彂鏂欐爣璇�(OUT)/澶栧崗鏀舵枡鏍囪瘑(IN)</param>
         /// <param name="orderstepqrcode">鎵弿浜岀淮鐮佷俊鎭�</param>
         /// <returns></returns>
         [Route(template: "MesOrderStepStart")]
         [HttpGet]
-        public HttpResponseMessage MesOrderStepStart(string OperType, string orderstepqrcode, string SelectType = null)
+        public HttpResponseMessage MesOrderStepStart(string stu_torgcode, string OperType, string orderstepqrcode, string SelectType = null)
         {
-            mes = ProductionManagementBLL.MesOrderStepStart(OperType, SelectType, orderstepqrcode);
+            mes = ProductionManagementBLL.MesOrderStepStart(OperType, stu_torgcode, SelectType, orderstepqrcode);
             return TJson.toJson(mes);
         }
         #endregion
@@ -57,12 +60,15 @@
         /// <summary>
         /// 鐢熶骇寮�鎶ュ伐锛氭姤宸ユ椂鑾峰彇鐢熶骇鐝粍涓嬫媺妗�
         /// </summary>
+        /// <param name="stu_torgcode">缁勭粐缂栫爜</param>
+        /// <param name="stu_torgtypecode">缁勭粐绫诲瀷</param>
+        /// <param name="wkshopcode">杞﹂棿缂栫爜</param>
         /// <returns></returns>
         [Route(template: "MesOrderStepReportSelectUserGroup")]
         [HttpGet]
-        public HttpResponseMessage MesOrderStepReportSelectUserGroup()
+        public HttpResponseMessage MesOrderStepReportSelectUserGroup(string stu_torgcode,string stu_torgtypecode, string wkshopcode)
         {
-            mes = ProductionManagementBLL.MesOrderStepReportSelectUserGroup();
+            mes = ProductionManagementBLL.MesOrderStepReportSelectUserGroup(stu_torgcode, stu_torgtypecode,wkshopcode);
             return TJson.toJson(mes);
         }
         #endregion
@@ -71,13 +77,14 @@
         /// <summary>
         /// 鐢熶骇寮�鎶ュ伐锛氭牴鎹敓浜х彮缁勬煡鎵句汉鍛樺垪琛�
         /// </summary>
+        /// <param name="stu_torgcode">缁勭粐缂栫爜</param>
         /// <param name="usergroupcode">鐝粍缂栫爜</param>
         /// <returns></returns>
         [Route(template: "MesOrderGroupSelectUser")]
         [HttpGet]
-        public HttpResponseMessage MesOrderGroupSelectUser(string usergroupcode)
+        public HttpResponseMessage MesOrderGroupSelectUser(string stu_torgcode, string usergroupcode)
         {
-            mes = ProductionManagementBLL.MesOrderGroupSelectUser(usergroupcode);
+            mes = ProductionManagementBLL.MesOrderGroupSelectUser(stu_torgcode,usergroupcode);
             return TJson.toJson(mes);
         }
         #endregion
@@ -135,16 +142,16 @@
         /// <returns></returns>
         [Route(template: "SavaMesOrderStepStart")]
         [HttpPost]
-        public HttpResponseMessage SavaMesOrderStepStart([FromBody] JObject obj)
+        public HttpResponseMessage SavaMesOrderStepStart()
         {
-            string mesordercode = obj["mesordercode"].ToString(); //宸ュ崟缂栧彿
-            string partcode = obj["partcode"].ToString(); //浜у搧缂栫爜
-            string stepseq = obj["stepseq"].ToString(); //宸ュ簭搴忓彿
-            string stepcode = obj["stepcode"].ToString(); //宸ュ簭缂栫爜
-            string eqpcode = obj["eqpcode"].ToString(); //璁惧缂栫爜
-            string taskqty = obj["taskqty"].ToString(); //浠诲姟鏁伴噺
-            string startqty = obj["startqty"].ToString(); //寮�宸ユ暟閲�
-            var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //寮�宸ヤ汉鍛�
+            string mesordercode = HttpContext.Current.Request["mesordercode"].ToString();//宸ュ崟缂栧彿
+            string partcode = HttpContext.Current.Request["partcode"].ToString();//浜у搧缂栫爜
+            string stepseq = HttpContext.Current.Request["stepseq"].ToString();//宸ュ簭搴忓彿
+            string stepcode = HttpContext.Current.Request["stepcode"].ToString();//宸ュ簭缂栫爜
+            string eqpcode = HttpContext.Current.Request["eqpcode"].ToString();//璁惧缂栫爜
+            string taskqty = HttpContext.Current.Request["taskqty"].ToString();//浠诲姟鏁伴噺
+            string startqty = HttpContext.Current.Request["startqty"].ToString();//寮�宸ユ暟閲�
+            var username = HttpContext.Current.Request["admin"].ToString(); //寮�宸ヤ汉鍛�
             mes = ProductionManagementBLL.SavaMesOrderStepStart(mesordercode, partcode, stepseq, stepcode, eqpcode, taskqty, startqty, username);
             return TJson.toJson(mes);
         }
@@ -158,23 +165,25 @@
         /// <returns></returns>
         [Route(template: "SavaMesOrderStepReport")]
         [HttpPost]
-        public HttpResponseMessage SavaMesOrderStepReport([FromBody] JObject obj)
+        public HttpResponseMessage SavaMesOrderStepReport()
         {
-            string mesordercode = obj["mesordercode"].ToString(); //宸ュ崟缂栧彿
-            string partcode = obj["partcode"].ToString(); //浜у搧缂栫爜
-            string stepseq = obj["stepseq"].ToString(); //宸ュ簭搴忓彿
-            string stepcode = obj["stepcode"].ToString(); //宸ュ簭缂栫爜
-            string eqpcode = obj["eqpcode"].ToString(); //璁惧缂栫爜
-            string usergroupcode = obj["usergroupcode"].ToString(); //鐝粍缂栫爜
-            string reportuser = obj["reportuser"].ToString();  //鎶ュ伐浜哄憳
-            string taskqty = obj["taskqty"].ToString(); //浠诲姟鏁伴噺
-            string startqty = obj["startqty"].ToString(); //寮�宸ユ暟閲�
-            string reportqty = obj["reportqty"].ToString(); //鎶ュ伐宸ユ暟閲�
-            string ngqty = obj["ngqty"].ToString(); //涓嶈壇鏁伴噺
-            string badcode = obj["badcode"].ToString(); //涓嶈壇鍘熷洜缂栫爜
-            string remarks = obj["remarks"].ToString(); //澶囨敞
-            var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
-            mes = ProductionManagementBLL.SavaMesOrderStepReport(mesordercode, partcode, stepseq, stepcode, eqpcode, usergroupcode, reportuser, taskqty, startqty, reportqty, ngqty, badcode, remarks, username);
+            string mesordercode = HttpContext.Current.Request["mesordercode"].ToString();//宸ュ崟缂栧彿
+            string partcode = HttpContext.Current.Request["partcode"].ToString();//浜у搧缂栫爜
+            string stepseq = HttpContext.Current.Request["stepseq"].ToString();//宸ュ簭搴忓彿
+            string stepcode = HttpContext.Current.Request["stepcode"].ToString();//宸ュ簭缂栫爜
+            string eqpcode = HttpContext.Current.Request["eqpcode"].ToString();//璁惧缂栫爜
+            string inbarcode = HttpContext.Current.Request["inbarcode"].ToString(); //鍏ュ簱鏉$爜
+            string reckway = HttpContext.Current.Request["reckway"].ToString(); //璁′欢鏂瑰紡(鐝粍:group銆佷釜浜�:person)
+            string usergroupcode = HttpContext.Current.Request["usergroupcode"].ToString();//鐝粍缂栫爜
+            string reportuser = HttpContext.Current.Request["reportuser"].ToString();//鎶ュ伐浜哄憳
+            string taskqty = HttpContext.Current.Request["taskqty"].ToString();//浠诲姟鏁伴噺
+            string startqty = HttpContext.Current.Request["startqty"].ToString();//寮�宸ユ暟閲�
+            string reportqty = HttpContext.Current.Request["reportqty"].ToString();//鎶ュ伐宸ユ暟閲�
+            string defectlist = HttpContext.Current.Request["defectlist"].ToString();//涓嶈壇姹囨��
+            string remarks = HttpContext.Current.Request["remarks"].ToString();//澶囨敞
+            string username = HttpContext.Current.Request["admin"].ToString();//鎿嶄綔浜哄憳
+            List<ReportDefectList> defectobjs = JsonConvert.DeserializeObject<List<ReportDefectList>>(defectlist);
+            mes = ProductionManagementBLL.SavaMesOrderStepReport(mesordercode, partcode, stepseq, stepcode, eqpcode, inbarcode, reckway,usergroupcode, reportuser, taskqty, startqty, reportqty, defectobjs, remarks, username);
             return TJson.toJson(mes);
         }
         #endregion
@@ -187,17 +196,17 @@
         /// <returns></returns>
         [Route(template: "SavaMesOrderStepOut")]
         [HttpPost]
-        public HttpResponseMessage SavaMesOrderStepOut([FromBody] JObject obj)
+        public HttpResponseMessage SavaMesOrderStepOut()
         {
-            string mesordercode = obj["mesordercode"].ToString(); //宸ュ崟缂栧彿
-            string partcode = obj["partcode"].ToString(); //浜у搧缂栫爜
-            string stepseq = obj["stepseq"].ToString(); //宸ュ簭搴忓彿
-            string stepcode = obj["stepcode"].ToString(); //宸ュ簭缂栫爜
-            string wxcode = obj["wxcode"].ToString(); //澶栧崗渚涘簲鍟嗙紪鐮�
-            string outuser = obj["outuser"].ToString();  //鍙戞枡浜哄憳
-            string taskqty = obj["taskqty"].ToString(); //浠诲姟鏁伴噺
-            string fqty = obj["fqty"].ToString(); //鍙戞枡鏁伴噺
-            var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
+            string mesordercode = HttpContext.Current.Request["mesordercode"].ToString();//宸ュ崟缂栧彿
+            string partcode = HttpContext.Current.Request["partcode"].ToString();//浜у搧缂栫爜
+            string stepseq = HttpContext.Current.Request["stepseq"].ToString();//宸ュ簭搴忓彿
+            string stepcode = HttpContext.Current.Request["stepcode"].ToString();//宸ュ簭缂栫爜
+            string wxcode = HttpContext.Current.Request["wxcode"].ToString();//澶栧崗渚涘簲鍟嗙紪鐮�
+            string outuser = HttpContext.Current.Request["outuser"].ToString();//鍙戞枡浜哄憳
+            string taskqty = HttpContext.Current.Request["taskqty"].ToString();//浠诲姟鏁伴噺
+            string fqty = HttpContext.Current.Request["fqty"].ToString();//鍙戞枡鏁伴噺
+            string username = HttpContext.Current.Request["admin"].ToString();//鎿嶄綔浜哄憳
             mes = ProductionManagementBLL.SavaMesOrderStepOut(mesordercode, partcode, stepseq, stepcode, wxcode, outuser, taskqty, fqty, username);
             return TJson.toJson(mes);
         }
@@ -211,21 +220,55 @@
         /// <returns></returns>
         [Route(template: "SavaMesOrderStepIn")]
         [HttpPost]
-        public HttpResponseMessage SavaMesOrderStepIn([FromBody] JObject obj)
+        public HttpResponseMessage SavaMesOrderStepIn()
         {
-            string mesordercode = obj["mesordercode"].ToString(); //宸ュ崟缂栧彿
-            string partcode = obj["partcode"].ToString(); //浜у搧缂栫爜
-            string stepseq = obj["stepseq"].ToString(); //宸ュ簭搴忓彿
-            string stepcode = obj["stepcode"].ToString(); //宸ュ簭缂栫爜
-            string wxcode = obj["wxcode"].ToString(); //澶栧崗渚涘簲鍟嗙紪鐮�
-            string inuser = obj["inuser"].ToString();  //鏀舵枡浜哄憳
-            string taskqty = obj["taskqty"].ToString(); //浠诲姟鏁伴噺
-            string sqty = obj["sqty"].ToString(); //鏀舵枡鏁伴噺
-            string ngqty = obj["ngqty"].ToString(); //涓嶈壇鏁伴噺
-            string badcode = obj["badcode"].ToString(); //涓嶈壇鍘熷洜缂栫爜
-            string remarks = obj["remarks"].ToString(); //澶囨敞
-            var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
-            mes = ProductionManagementBLL.SavaMesOrderStepIn(mesordercode, partcode, stepseq, stepcode, wxcode, inuser, taskqty, sqty, ngqty, badcode, remarks, username);
+            string mesordercode = HttpContext.Current.Request["mesordercode"].ToString();//宸ュ崟缂栧彿
+            string partcode = HttpContext.Current.Request["partcode"].ToString();//浜у搧缂栫爜
+            string stepseq = HttpContext.Current.Request["stepseq"].ToString();//宸ュ簭搴忓彿
+            string stepcode = HttpContext.Current.Request["stepcode"].ToString();//宸ュ簭缂栫爜
+            string wxcode = HttpContext.Current.Request["wxcode"].ToString();//澶栧崗渚涘簲鍟嗙紪鐮�
+            string inbarcode = HttpContext.Current.Request["inbarcode"].ToString(); //鍏ュ簱鏉$爜
+            string inuser = HttpContext.Current.Request["inuser"].ToString();//鏀舵枡浜哄憳
+            string taskqty = HttpContext.Current.Request["taskqty"].ToString();//浠诲姟鏁伴噺
+            string sqty = HttpContext.Current.Request["sqty"].ToString();//鏀舵枡鏁伴噺
+            string defectlist = HttpContext.Current.Request["defectlist"].ToString();//涓嶈壇姹囨��
+            string remarks = HttpContext.Current.Request["remarks"].ToString();//澶囨敞
+            string username = HttpContext.Current.Request["admin"].ToString();//鎿嶄綔浜哄憳
+            List<ReportDefectList> defectobjs = JsonConvert.DeserializeObject<List<ReportDefectList>>(defectlist);
+            mes = ProductionManagementBLL.SavaMesOrderStepIn(mesordercode, partcode, stepseq, stepcode, wxcode, inbarcode, inuser, taskqty, sqty, defectobjs, remarks, username);
+            return TJson.toJson(mes);
+        }
+        #endregion
+
+
+
+        #region[鐢熶骇鍏ュ簱鎵弿鏉$爜]
+        /// <summary>
+        /// 鐢熶骇鍏ュ簱鎵弿鏉$爜
+        /// </summary>
+        /// <param name="labcode">鏉$爜缂栧彿</param>
+        /// <returns></returns>
+        [Route(template: "MesAppProductInHouseOrderBarCodeSearch")]
+        [HttpGet]
+        public HttpResponseMessage MesAppProductInHouseOrderBarCodeSearch(string labcode)
+        {
+            mes = ProductionManagementBLL.MesAppProductInHouseOrderBarCodeSearch(labcode);
+            return TJson.toJson(mes);
+        }
+        #endregion
+
+        #region[鐢熶骇鍏ュ簱鎵弿鏉$爜鎻愪氦]
+        /// <summary>
+        /// 鐢熶骇鍏ュ簱鎵弿鏉$爜鎻愪氦
+        /// </summary>
+        /// <param name="username">鎿嶄綔浜哄憳</param>
+        /// <param name="obj">鎻愪氦鏁版嵁</param>
+        /// <returns></returns>
+        [Route(template: "MesAppProductInHouseOrderBarCodeSave")]
+        [HttpPost]
+        public HttpResponseMessage MesAppProductInHouseOrderBarCodeSave(string username, [FromBody] JObject obj)
+        {
+            mes = ProductionManagementBLL.ProductInHouseOrderSeave(username, obj);
             return TJson.toJson(mes);
         }
         #endregion

--
Gitblit v1.9.3