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/LabCodeStatusMessage.cs |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/VueWebApi/Tools/LabCodeStatusMessage.cs b/VueWebApi/Tools/LabCodeStatusMessage.cs
index fde90e8..b5337de 100644
--- a/VueWebApi/Tools/LabCodeStatusMessage.cs
+++ b/VueWebApi/Tools/LabCodeStatusMessage.cs
@@ -28,7 +28,21 @@
             mes.code = "200";
             try
             {
-
+                //0.鍒ゆ柇鏉$爜鏄惁涓哄綋鍓嶅姛鑳芥壂鎻忔潯鐮�
+                sql = @"select rightcode,hbilltype  from T_BarCodeBill where hbarcode=@hbarcode";
+                dynamicParams.Add("@hbarcode", hbarcode);
+                dt = DapperHelper.selectdata(sql, dynamicParams);
+                if (dt.Rows.Count>0)
+                {
+                    if (dt.Rows[0]["rightcode"].ToString() != rightcode && dt.Rows[0]["hbilltype"].ToString() != hbilltype) 
+                    {
+                        mes.code = "300";
+                        mes.count = 0;
+                        mes.Message = "褰撳墠鏉$爜鐘舵�佷笉婊¤冻姝ゅ姛鑳�!";
+                        mes.data = null;
+                        return mes;
+                    }
+                }
                 //1.鍒ゆ柇褰撳墠鍔熻兘鏉$爜鏄惁涓虹郴缁熺敓鎴愭湁鏁堟潯鐮�
                 sql = @"select *   from T_BarCodeBill where hbarcode=@hbarcode";
                 dynamicParams.Add("@hbarcode", hbarcode);

--
Gitblit v1.9.3