From 32c0daf9a78039004bb6c39d578f7734f13d54b1 Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期二, 10 十月 2023 10:54:47 +0800
Subject: [PATCH] 1.工单派发校验工价,工价未提前设置或设置部分,如果开关关闭时,不校验是否未设置 或者未设置全,工价复制表中都会写入,没有设置的工价就默认0 如果开关打开就必须要设置工价

---
 VueWebApi/Tools/ScanStartReport.cs |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/VueWebApi/Tools/ScanStartReport.cs b/VueWebApi/Tools/ScanStartReport.cs
index 85bf63c..979d022 100644
--- a/VueWebApi/Tools/ScanStartReport.cs
+++ b/VueWebApi/Tools/ScanStartReport.cs
@@ -18,10 +18,11 @@
         /// 鎵爜淇℃伅涓哄伐鍗�+宸ュ簭鏉$爜
         /// </summary>
         /// <param name="stu_torgcode">鎵�灞炵粍缁囩紪鐮�</param>
+        /// <param name="SelectType">璁惧缂栫爜</param>
         /// <param name="ordercode">宸ュ崟缂栧彿</param>
         /// <param name="stepcode">宸ュ簭缂栫爜</param>
         /// <returns></returns>
-        public static ToMessage ZZEncodingSeach(string stu_torgcode, string ordercode, string stepcode)
+        public static ToMessage ZZEncodingSeach(string stu_torgcode, string SelectType, string ordercode, string stepcode)
         {
             var sql = "";
             string flwtype = ""; //宸ュ簭灞炴��
@@ -116,6 +117,7 @@
                     mes.data = null;
                     return mes;
                 }
+
                 switch (flwtype)
                 {
                     case "Z":  //鑷埗宸ュ簭
@@ -124,9 +126,10 @@
                             //1.棣栭亾宸ュ簭鏃讹紝鍒ゆ柇鏄惁鏈夊紑宸ヨ褰�
                             sql = @"select *   from TK_Wrk_Record R
                                     left join TEqpInfo E on R.eqp_code=E.code
-                                    where R.wo_code=@ordercode and R.step_code=@stepcode and R.style='S'";
+                                    where R.wo_code=@ordercode and R.step_code=@stepcode and eqp_code=@eqp_code and R.style='S'";
                             dynamicParams.Add("@ordercode", ordercode);
                             dynamicParams.Add("@stepcode", stepcode);
+                            dynamicParams.Add("@eqp_code", SelectType);
                             var data0 = DapperHelper.selectdata(sql, dynamicParams);
                             if (data0.Rows.Count > 0)  //鏈夊紑宸ヨ褰�
                             {
@@ -205,9 +208,10 @@
                                 //1.闈為閬撳伐搴忔椂锛屽垽鏂湰閬撴槸鍚︽湁寮�宸ヨ褰�
                                 sql = @"select *   from TK_Wrk_Record R
                                         left join TEqpInfo E on R.eqp_code=E.code
-                                        where R.wo_code=@ordercode and R.step_code=@stepcode and R.style='S'";
+                                        where R.wo_code=@ordercode and R.step_code=@stepcode and eqp_code=@eqp_code  and R.style='S'";
                                 dynamicParams.Add("@ordercode", ordercode);
                                 dynamicParams.Add("@stepcode", stepcode);
+                                dynamicParams.Add("@eqp_code", SelectType);
                                 var data1 = DapperHelper.selectdata(sql, dynamicParams);
                                 if (data1.Rows.Count > 0)//鏈亾鏈夊紑宸ヨ褰�
                                 {

--
Gitblit v1.9.3