From 925394b1b7f61a2c2a15fdaa0ecd0763214ccda1 Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期二, 30 五月 2023 18:01:29 +0800
Subject: [PATCH] 增加App报工、工序检验功能

---
 VueWebApi/DLL/BLL/ProductionManagementBLL.cs |  315 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 307 insertions(+), 8 deletions(-)

diff --git a/VueWebApi/DLL/BLL/ProductionManagementBLL.cs b/VueWebApi/DLL/BLL/ProductionManagementBLL.cs
index ddc9fe7..90bf30c 100644
--- a/VueWebApi/DLL/BLL/ProductionManagementBLL.cs
+++ b/VueWebApi/DLL/BLL/ProductionManagementBLL.cs
@@ -1,8 +1,10 @@
 锘縰sing System;
 using System.Collections.Generic;
+using System.Data;
 using System.Linq;
 using System.Web;
 using VueWebApi.DLL.DAL;
+using VueWebApi.Models;
 using VueWebApi.Tools;
 
 namespace VueWebApi.DLL.BLL
@@ -10,33 +12,330 @@
     public class ProductionManagementBLL
     {
         #region[ERP璁㈠崟鏌ヨ]
-        public static ToMessage ErpOrderSearch(string erporderstus, string erpordercode, string partcode, string partname, string partspec, int startNum, string paydatestartdate, string paydateenddate, string creatuser, string createstartdate, string createenddate, int endNum, string prop, string order)
+        public static ToMessage ErpOrderSearch(string erporderstus, string erpordercode, string partcode, string partname, string partspec, int startNum, string paydatestartdate, string paydateenddate, string paydatestartdate1, string paydateenddate2, string creatuser, int endNum, string prop, string order)
         {
-            return ProductionManagementDAL.ErpOrderSearch(erporderstus, erpordercode, partcode, partname, partspec, startNum, paydatestartdate, paydateenddate, creatuser, createstartdate, createenddate, endNum, prop, order);
+            return ProductionManagementDAL.ErpOrderSearch(erporderstus, erpordercode, partcode, partname, partspec, startNum, paydatestartdate, paydateenddate, paydatestartdate1, paydateenddate2, creatuser, endNum, prop, order);
         }
         #endregion
 
         #region[ERP璁㈠崟涓嬭揪]
-        public static ToMessage MarkSaveErpOrder(string erporderstus, string erpordercode, string partcode, string wkshopcode, string warehousecode, string erpqty, string markqty, string ordernum, string relse_qty, string username)
+        public static ToMessage MarkSaveErpOrder(string erporderid, string erpordercode, string partcode, string wkshopcode, string warehousecode, string erpqty, string markqty, string ordernum, string relse_qty, string username)
         {
-            return ProductionManagementDAL.MarkSaveErpOrder(erporderstus, erpordercode, partcode, wkshopcode, warehousecode, erpqty, markqty, ordernum, relse_qty, username);
+            return ProductionManagementDAL.MarkSaveErpOrder(erporderid,erpordercode, partcode, wkshopcode, warehousecode, erpqty, markqty, ordernum, relse_qty, username);
         }
         #endregion
 
         #region[ERP璁㈠崟鍏抽棴]
-        public static ToMessage ClosedErpOrder(string erpordercode, string username)
+        public static ToMessage ClosedErpOrder(string erporderid, string erpordercode, string username)
         {
-            return ProductionManagementDAL.ClosedErpOrder(erpordercode,username);
+            return ProductionManagementDAL.ClosedErpOrder(erporderid,erpordercode, username);
         }
         #endregion
 
 
 
         #region[MES宸ュ崟鏌ヨ]
-        public static ToMessage MesOrderSearch(string mesorderstus, string mesordercode, string partcode, string partname, string partspec, int startNum, string creatuser, string createdate, int endNum, string prop, string order)
+        public static ToMessage MesOrderSearch(string mesorderstus, string mesordercode,string sourceorder,string ordertype, string partcode, string partname, string partspec, int startNum, string creatuser, string createdate, int endNum, string prop, string order)
         {
-            return ProductionManagementDAL.ErpOrderSearch(mesorderstus, mesordercode, partcode, partname, partspec, startNum, creatuser, createdate, endNum, prop, order);
+            return ProductionManagementDAL.MesOrderSearch(mesorderstus, mesordercode, sourceorder, ordertype, partcode, partname, partspec, startNum, creatuser, createdate, endNum, prop, order);
         }
         #endregion
+
+        #region[MES鎶ュ簾琛ュ崟宸ュ崟鏌ヨ]
+        public static ToMessage MesBadOrderSearch(string mesordercode, string sourceorder, string partcode, string partname, string partspec, int startNum, string creatuser, string createdate, int endNum, string prop, string order)
+        {
+            return ProductionManagementDAL.MesBadOrderSearch(mesordercode, sourceorder, partcode, partname, partspec, startNum, creatuser, createdate, endNum, prop, order);
+        }
+        #endregion
+
+        #region[浜у搧缂栫爜鏌ユ壘宸ヨ壓璺嚎涓嬫媺鎺ュ彛]
+        public static ToMessage PartSelectRoute(string partcode)
+        {
+            return ProductionManagementDAL.PartSelectRoute(partcode);
+        }
+        #endregion
+
+        #region[宸ヨ壓璺嚎鏌ユ壘杞﹂棿涓嬫媺鎺ュ彛]
+        public static ToMessage RouteSelectWkshop(string partcode, string routecode)
+        {
+            return ProductionManagementDAL.RouteSelectWkshop(partcode,routecode);
+        }
+        #endregion
+
+        #region[鏍规嵁閫夋嫨宸ヨ壓璺嚎鏌ョ湅宸ュ簭鎺ュ彛]
+        public static ToMessage SelectRouteStep(string routecode)
+        {
+            return ProductionManagementDAL.SelectRouteStep(routecode);
+        }
+        #endregion
+
+        #region[宸ュ崟娲惧彂閫夋嫨宸ヨ壓璺嚎鎴栭�夋嫨鐢熶骇杞﹂棿鏃跺垽鏂粦瀹氭潯浠禲
+        public static ToMessage SelectRouteOrWkshop(string partcode, string routecode, string wkshopcode)
+        {
+            return ProductionManagementDAL.SelectRouteOrWkshop(partcode, routecode, wkshopcode);
+        }
+        #endregion
+
+        #region[MES宸ュ崟鏂板銆佽幏鍙栧伐鍗曞彿]
+        public static ToMessage AddMesOrderCodeSearch()
+        {
+            return ProductionManagementDAL.AddMesOrderCodeSearch();
+        }
+        #endregion
+
+        #region[MES宸ュ崟鏂板銆佺紪杈戞彁浜
+        public static ToMessage AddUpdateMesOrder(string mesorderstus, string mesordercode,string sourceorder,string ordertype, string partcode, string mesqty, string routecode, string wkshopcode, string planstartdate, string planenddate, string orderlev, string username, string opertype)
+        {
+            return ProductionManagementDAL.AddUpdateMesOrder(mesorderstus,mesordercode, sourceorder,ordertype,partcode, mesqty, routecode, wkshopcode, planstartdate, planenddate, orderlev, username, opertype);
+        }
+        #endregion
+
+        #region[MES宸ュ崟鍒犻櫎]
+        public static ToMessage DeleteMesOrder(string souceid, string wocode,string m_po,string orderqty)
+        {
+            return ProductionManagementDAL.DeleteMesOrder(souceid,wocode, m_po, orderqty);
+        }
+        #endregion
+
+        #region[MES宸ュ崟鍏抽棴]
+        public static ToMessage ClosedMesOrder(string username, string wocode, string m_po)
+        {
+            return ProductionManagementDAL.ClosedMesOrder(username,wocode, m_po);
+        }
+        #endregion
+
+        #region[MES宸ュ崟鏌ョ湅宸ュ簭浠诲姟]
+        public static ToMessage SearchWorkStep(string wo_code)
+        {
+            return ProductionManagementDAL.SearchWorkStep(wo_code);
+        }
+        #endregion
+
+
+
+
+
+        #region[鐢熶骇寮�鎶ュ伐鎵爜鑾峰彇宸ュ崟瀵瑰簲宸ュ簭浠诲姟]
+        public static ToMessage MesOrderStepSearch(string orderstepqrcode, int startNum, int endNum, string prop, string order)
+        {
+            return ProductionManagementDAL.MesOrderStepSearch(orderstepqrcode, startNum, endNum, prop, order);
+        }
+        #endregion
+
+        #region[鐢熶骇寮�鎶ュ伐鎵爜鑾峰彇宸ュ崟瀵瑰簲宸ュ簭浠诲姟(澶栧崗)]
+        public static ToMessage MesOrderWxStepSearch(string orderstepqrcode, int startNum, int endNum, string prop, string order)
+        {
+            return ProductionManagementDAL.MesOrderWxStepSearch(orderstepqrcode, startNum, endNum, prop, order);
+        }
+        #endregion
+
+        #region[鐢熶骇寮�鎶ュ伐鎵爜鑾峰彇宸ュ崟瀵瑰簲宸ュ簭浠诲姟(涓嶈壇)]
+        public static ToMessage MesOrderNgStepSearch(string orderstepqrcode, int startNum, int endNum, string prop, string order)
+        {
+            return ProductionManagementDAL.MesOrderNgStepSearch(orderstepqrcode, startNum, endNum, prop, order);
+        }
+        #endregion
+
+        #region[鐢熶骇寮�鎶ュ伐鎵爜鑾峰彇宸ュ崟瀵瑰簲宸ュ簭浠诲姟(涓嶈壇鏄庣粏)]
+        public static ToMessage MesOrderNgSubStepSearch(string orderstepqrcode)
+        {
+            return ProductionManagementDAL.MesOrderNgSubStepSearch(orderstepqrcode);
+        }
+        #endregion
+
+        #region [鐢熶骇寮�鎶ュ伐锛氬紑宸�(寮�濮�/鎶ュ伐)/澶栧崗鍙戞枡鏃舵潯浠跺垽鏂強鏁版嵁杩斿洖鎺ュ彛]
+        public static ToMessage MesOrderStepStart(string OperType,string SelectType, string orderstepqrcode)
+        {
+            return ProductionManagementDAL.MesOrderStepStart(OperType, SelectType, orderstepqrcode);
+        }
+        #endregion
+
+        #region[鐢熶骇寮�鎶ュ伐锛氬紑宸ユ椂鑾峰彇璁惧涓嬫媺鍒楄〃]
+        public static ToMessage MesOrderStepStartSelectEqp(string orderstepqrcode)
+        {
+            return ProductionManagementDAL.MesOrderStepStartSelectEqp(orderstepqrcode);
+        }
+        #endregion
+
+        #region[鐢熶骇寮�鎶ュ伐锛氭姤宸ユ椂鑾峰彇鐢熶骇鐝粍涓嬫媺妗哴
+        public static ToMessage MesOrderStepReportSelectUserGroup()
+        {
+            return ProductionManagementDAL.MesOrderStepReportSelectUserGroup();
+        }
+        #endregion
+
+        #region[鐢熶骇寮�鎶ュ伐锛氭牴鎹敓浜х彮缁勬煡鎵句汉鍛樺垪琛╙
+        public static ToMessage MesOrderGroupSelectUser(string usergroupcode)
+        {
+            return ProductionManagementDAL.MesOrderGroupSelectUser(usergroupcode);
+        }
+        #endregion
+
+        #region[鐢熶骇寮�鎶ュ伐锛氫汉鍛樹笅鎷夊垪琛╙
+        public static ToMessage MesOrderSelectUser(string usercode)
+        {
+            return ProductionManagementDAL.MesOrderSelectUser(usercode);
+        }
+        #endregion
+
+        #region[鐢熶骇寮�鎶ュ伐锛氬彂鏂�/鏀舵枡鏃惰幏鍙栧鍗忎笅鎷夊垪琛╙
+        public static ToMessage MesOrderStepSelectWX(string orderstepqrcode)
+        {
+            return ProductionManagementDAL.MesOrderStepSelectWX(orderstepqrcode);
+        }
+        #endregion
+
+        #region[鐢熶骇鎶ュ伐锛氭姤宸�/澶栧崗鏀舵枡 鑾峰彇涓嶈壇鍘熷洜涓嬫媺鍒楄〃]
+        public static ToMessage MesOrderStepSelectCause(string orderstepqrcode)
+        {
+            return ProductionManagementDAL.MesOrderStepSelectCause(orderstepqrcode);
+        }
+        #endregion
+
+        #region[鐢熶骇寮�鎶ュ伐,寮�宸�(寮�濮�)鎻愪氦]
+        public static ToMessage SavaMesOrderStepStart(string mesordercode,string partcode,string stepseq,string stepcode,string eqpcode,string taskqty,string startqty,string username)
+        {
+            return ProductionManagementDAL.SavaMesOrderStepStart(mesordercode, partcode, stepseq, stepcode, eqpcode, taskqty, startqty, username);
+        }
+        #endregion
+
+        #region[鐢熶骇寮�鎶ュ伐,鎶ュ伐鎻愪氦]
+        public static ToMessage SavaMesOrderStepReport(string mesordercode, string partcode, string stepseq, string stepcode, string eqpcode, string usergroupcode, string reportuser, string taskqty,string startqty, string reportqty,string ngqty, string badcode,string remarks, string username)
+        {
+            return ProductionManagementDAL.SavaMesOrderStepReport(mesordercode, partcode, stepseq, stepcode, eqpcode, usergroupcode, reportuser, taskqty, startqty, reportqty, ngqty, badcode, remarks, username);
+        }
+        #endregion
+
+        #region[鐢熶骇寮�鎶ュ伐,鍙戞枡鎻愪氦]
+        public static ToMessage SavaMesOrderStepOut(string mesordercode, string partcode, string stepseq, string stepcode, string wxcode, string outuser, string taskqty, string fqty, string username)
+        {
+            return ProductionManagementDAL.SavaMesOrderStepOut(mesordercode, partcode, stepseq, stepcode, wxcode, outuser, taskqty, fqty, username);
+        }
+        #endregion
+
+        #region[鐢熶骇寮�鎶ュ伐, 鏀舵枡鎻愪氦]
+        public static ToMessage SavaMesOrderStepIn(string mesordercode, string partcode, string stepseq, string stepcode, string wxcode, string inuser, string taskqty, string sqty, string ngqty, string badcode,string remarks, string username)
+        {
+            return ProductionManagementDAL.SavaMesOrderStepIn(mesordercode, partcode, stepseq, stepcode, wxcode, inuser, taskqty, sqty, ngqty, badcode, remarks, username);
+        }
+        #endregion
+
+        #region[涓嶈壇澶勭悊,鎻愪氦]
+        public static ToMessage EditOrderNgStepSeave(ReportDefectHandle json, string username)
+        {
+            return ProductionManagementDAL.EditOrderNgStepSeave(json, username);
+        }
+        #endregion
+
+
+        #region[宸ュ簭妫�楠屾壂鐮佽幏鍙栦换鍔′俊鎭痌
+        public static ToMessage MesOrderStepCheckSearch(string orderstepqrcode, string checktype)
+        {
+            return ProductionManagementDAL.MesOrderStepCheckSearch(orderstepqrcode, checktype);
+        }
+        #endregion
+
+        #region[宸ュ簭妫�楠屾牴鎹�夋嫨鐨勬楠屾柟妗堟煡鎵炬楠岄」鐩甝
+        public static ToMessage MesOrderStepCheckItemList(string checkstandcode)
+        {
+            return ProductionManagementDAL.MesOrderStepCheckItemList(checkstandcode);
+        }
+        #endregion
+
+        #region[宸ュ簭妫�楠�,鎻愪氦]
+        public static ToMessage SaveMesOrderStepCheckItem(string wocode, string partcode, string stepcode, string checkstandcode, string check_type, string sampmethod, string qualitystatus, string labqty, string sampleqty, string goodqty, string ngqty, string checkitemcont, string username)
+        {
+            return ProductionManagementDAL.SaveMesOrderStepCheckItem(wocode, partcode, stepcode, checkstandcode, check_type, sampmethod, qualitystatus, labqty, sampleqty, goodqty, ngqty, checkitemcont, username);
+        }
+        #endregion
+
+
+        #region[MES宸ュ崟鎵归噺鍏抽棴鏌ヨ]
+        public static ToMessage MesOrderBitchClosedSearch(string mesorderstus, string mesordercode, string sourceorder, string ordertype, string partcode, string partname, string partspec, int startNum, string creatuser, string createdate, int endNum, string prop, string order)
+        {
+            return ProductionManagementDAL.MesOrderBitchClosedSearch(mesorderstus, mesordercode, sourceorder, ordertype, partcode, partname, partspec, startNum, creatuser, createdate, endNum, prop, order);
+        }
+        #endregion
+
+        #region[MES宸ュ崟鎵归噺鍏抽棴鎻愪氦]
+        public static ToMessage MesOrderBitchClosedSeave(string username, DataTable dt)
+        {
+            return ProductionManagementDAL.MesOrderBitchClosedSeave(username,dt);
+        }
+        #endregion
+
+        #region[MES宸ュ崟鎵归噺鍙嶅叧闂璢
+        public static ToMessage MesOrderBitchAntiClosedSeave(string username, DataTable dt)
+        {
+            return ProductionManagementDAL.MesOrderBitchAntiClosedSeave(username, dt);
+        }
+        #endregion
+
+
+
+        #region[浜ц兘瑙勫垝鏌ヨ]
+        public static ToMessage CapacityPlanningSearch(string workshop, string devicetype, string stustype, int startNum, int endNum, string prop, string order)
+        {
+            return ProductionManagementDAL.CapacityPlanningSearch(workshop, devicetype, stustype, startNum, endNum, prop, order);
+        }
+        #endregion
+
+        #region[浜ц兘瑙勫垝榛樿鏂规淇濆瓨鎻愪氦]
+        public static ToMessage CapacityPlanSubmit(string type, string captplanid, string wkshopcode, string capunitcode, string capsetupcode,string captplantype, string username)
+        {
+            return ProductionManagementDAL.CapacityPlanSubmit(type, captplanid, wkshopcode, capunitcode, capsetupcode, captplantype, username);
+        }
+        #endregion
+
+        #region[浜ц兘瑙勫垝鐐瑰嚮鏃ュ巻缁勪欢鏌ユ壘宸插叧鑱旂殑鏃ユ湡鏂规]
+        public static ToMessage CapacityPlanningCalendar(string captplanid)
+        {
+            return ProductionManagementDAL.CapacityPlanningCalendar(captplanid);
+        }
+        #endregion
+
+        #region[浜ц兘瑙勫垝鏃ュ巻鍙屽嚮鏃跺甫鍑哄搴旂殑鏂规]
+        public static ToMessage CapacityPlanningOnclickSelect(string captplanid, string datetime)
+        {
+            return ProductionManagementDAL.CapacityPlanningOnclickSelect(captplanid,datetime);
+        }
+        #endregion
+
+        #region[浜ц兘瑙勫垝宸ヤ綔鏃ュ巻閫夋嫨鎻愪氦]
+        public static ToMessage CapacityPlanningGivePlanSubmit(string captplanid, string wkshopcode, string capunitcode, string capsetupcode, string captplantype, List<CapaPlan> objs, string type, string username)
+        {
+            return ProductionManagementDAL.CapacityPlanningGivePlanSubmit(captplanid, wkshopcode, capunitcode, capsetupcode, captplantype, objs, type, username);
+        }
+        #endregion
+
+
+        #region[鑷姩鎺掔▼宸ュ崟鏌ヨ]
+        public static ToMessage AdvancedSchedulingSearch(string workshop, string wocode, string partcode, string partname, int startNum, int endNum, string prop, string order)
+        {
+            return ProductionManagementDAL.AdvancedSchedulingSearch(workshop, wocode, partcode, partname, startNum, endNum, prop, order);
+        }
+        #endregion
+
+        #region[鎺掍骇璁惧淇℃伅]
+        public static List<AdvancedSchedulingDevice> OnclickAdvancedSchedulingDevice(string wocode, string wkshpcode, string partcode, string startdate, string enddate, ref ToMessage mes)
+        {
+            return ProductionManagementDAL.OnclickAdvancedSchedulingDevice(wocode, wkshpcode, partcode, startdate, enddate, ref mes);
+        }
+        #endregion
+
+        #region[璁惧宸叉帓绋嬩俊鎭痌
+        public static DataTable AlreadyScheduling(string wocode, string wkshpcode, string partcode, string botproccode, string startdate, string enddate)
+        {
+            return ProductionManagementDAL.AlreadyScheduling(wocode, wkshpcode, partcode, botproccode, startdate, enddate);
+        }
+        #endregion
+
+        #region[鎺掔▼鏁版嵁鎻愪氦]
+        public static ToMessage SubmitAlreadyScheduling(string username, string wocode, string botprocecode, List<AlreadyScheduling> objs)
+        {
+            return ProductionManagementDAL.SubmitAlreadyScheduling(username, wocode, botprocecode, objs);
+        }
+        #endregion
+
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3