From 27daf7546721754a451b5df16bb716c1cbb33458 Mon Sep 17 00:00:00 2001
From: chengsc <Demo@DESKTOP-CPA90BF>
Date: 星期六, 19 十月 2024 19:06:43 +0800
Subject: [PATCH] 修改问题

---
 Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
index bccc202..c714390 100644
--- a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
+++ b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
@@ -262,10 +262,22 @@
         }
 
         //鍥炰紶鍑哄簱鍗�
-        public bool FinishSo(int id, string url, int userId)
+        public bool FinishSo(int id, string url, string userNo, string pwd, int userId)
         {
             try
             {
+                var loginPwd = Md5Tools.CalcMd5(pwd);
+                var date = Db.Queryable<SysUserInfor>().First(m => m.IsDel == "0" && m.UserName == userNo && m.PassWord == loginPwd);
+
+                if (date == null) //璐﹀彿瀵嗙爜鏄惁姝g‘
+                {
+                    throw new Exception("璐﹀彿瀵嗙爜涓嶆纭垨娌℃湁姝よ处鍙�");
+                }
+                if (date.Status != "0") //褰撳墠璐﹀彿鏄惁姝e父鍚敤
+                {
+                    throw new Exception("褰撳墠璐﹀彿闈炲惎鐢ㄧ姸鎬�");
+                }
+
                 var notice = Db.Queryable<BllExportNotice>().First(m => m.Id == id && m.IsDel == "0");
                 if (notice == null)
                 {
@@ -280,7 +292,7 @@
                 {
                     throw new Exception("鏈煡璇㈠埌鍗曟嵁鏄庣粏淇℃伅");
                 }
-                if (userId == notice.UpdateUser)
+                if (date.Id == notice.UpdateUser)
                 {
                     throw new Exception("澶嶆牳澶辫触锛屽鏍镐汉鍛樺拰鍏抽棴璁㈠崟浜哄憳涓嶈兘鐩稿悓锛�");
                 }
@@ -315,10 +327,10 @@
 
                 notice.Status = "6";
                 notice.CheckTime = DateTime.Now;
-                notice.CheckUser = userId;
+                notice.CheckUser = date.Id;
                 Db.Updateable(notice).ExecuteCommand();
 
-                new OperationSOServer().AddLogOperationSo("鍑哄簱浣滀笟", "鍑哄簱鍗曟嵁", notice.SONo, "澶嶆牳", $"澶嶆牳浜嗗崟鎹彿涓簕notice.SONo}鐨勫崟鎹俊鎭�", userId);
+                new OperationSOServer().AddLogOperationSo("鍑哄簱浣滀笟", "鍑哄簱鍗曟嵁", notice.SONo, "澶嶆牳", $"{date.RealName}澶嶆牳浜嗗崟鎹彿涓簕notice.SONo}鐨勫崟鎹俊鎭�", userId);
                 return true;
             }
             catch (Exception e)

--
Gitblit v1.8.0