From 15c6d7dec741a03bd7a84c3948fdc2a89e036395 Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期五, 10 十一月 2023 13:24:24 +0800
Subject: [PATCH] 1.生产加工单打印次数接口 2.工艺路线批量关联产品接口 3.修复用户所属班组绑定关系写入关系表

---
 VueWebApi/DLL/DAL/ProductionManagementDAL.cs |   45 ++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 42 insertions(+), 3 deletions(-)

diff --git a/VueWebApi/DLL/DAL/ProductionManagementDAL.cs b/VueWebApi/DLL/DAL/ProductionManagementDAL.cs
index 0c06fc5..65a66de 100644
--- a/VueWebApi/DLL/DAL/ProductionManagementDAL.cs
+++ b/VueWebApi/DLL/DAL/ProductionManagementDAL.cs
@@ -334,7 +334,7 @@
                 }
 
 
-              
+
                 bool aa = DapperHelper.DoTransaction(list);
                 if (aa)
                 {
@@ -576,7 +576,7 @@
                 }
                 // --------------鏌ヨ鎸囧畾鏁版嵁--------------
                 var total = 0; //鎬绘潯鏁�
-                var sql = @"select A.id, A.status,A.wotype,A.wo_code,A.materiel_code as partcode,B.partname,B.partspec,A.plan_qty,A.wkshp_code,C.org_name as wkshp_name,
+                var sql = @"select A.id, A.status,A.wotype,A.printcount,A.wo_code,A.materiel_code as partcode,B.partname,B.partspec,A.plan_qty,A.wkshp_code,C.org_name as wkshp_name,
                             A.route_code,E.name as route_name,A.stck_code,F.name as stck_name,A.plan_startdate,A.plan_enddate,A.piroque,A.sourceid,A.m_po,W.saleOrderCode,U.username as lm_user,A.lm_date
                             from TK_Wrk_Man A
                             left join TKimp_Ewo W on A.m_po=W.wo and A.materiel_code=W.materiel_code
@@ -1372,6 +1372,45 @@
                 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[MES宸ュ崟鎵撳嵃鏇存柊鎵撳嵃娆℃暟]
+        public static ToMessage UpdateMesOrderPrintCount(string wo_code)
+        {
+            var sql = "";
+            List<object> list = new List<object>();
+            var dynamicParams = new DynamicParameters();
+            try
+            {
+                //鏇存柊宸ュ崟鎵撳嵃娆℃暟
+                sql = @"update TK_Wrk_Man set printcount=printcount+1  where wo_code=@wo_code";
+                list.Add(new { str = sql, parm = new { wo_code = wo_code } });
+
+                bool aa = DapperHelper.DoTransaction(list);
+                if (aa)
+                {
+                    mes.code = "200";
+                    mes.count = 0;
+                    mes.Message = "鏇存柊鎴愬姛!";
+                    mes.data = null;
+                }
+                else
+                {
+                    mes.code = "300";
+                    mes.count = 0;
+                    mes.Message = "鏇存柊澶辫触!";
+                    mes.data = null;
+                }
             }
             catch (Exception e)
             {
@@ -3405,7 +3444,7 @@
 
 
         #region[MES宸ュ崟鎵归噺鍏抽棴鏌ヨ]
-        public static ToMessage MesOrderBitchClosedSearch(string stu_torgcode, string stu_torgtypecode, string mesorderstus, string mesordercode, string sourceorder,string saleordercode, string ordertype, string partcode, string partname, string partspec, int startNum, string creatuser, string createdate, int endNum, string prop, string order)
+        public static ToMessage MesOrderBitchClosedSearch(string stu_torgcode, string stu_torgtypecode, string mesorderstus, string mesordercode, string sourceorder, string saleordercode, string ordertype, string partcode, string partname, string partspec, int startNum, string creatuser, string createdate, int endNum, string prop, string order)
         {
             var dynamicParams = new DynamicParameters();
             string search = "";

--
Gitblit v1.9.3