From f8957ba7f0ade842553bd37254cf31da639a1925 Mon Sep 17 00:00:00 2001
From: chengsc <Demo@DESKTOP-CPA90BF>
Date: 星期日, 20 十月 2024 17:41:36 +0800
Subject: [PATCH] 修改问题
---
Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs | 53 ++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 48 insertions(+), 5 deletions(-)
diff --git a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
index 19e38e9..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)
@@ -3239,10 +3251,41 @@
throw new Exception("鑾峰彇澶辫触锛屽嚭搴撳崟鐘舵�佷笉鍏佽!");
}
}
-
+ string inspectStatus = string.Empty;
+ switch (notice.Type)//0锛氬師鏂� 1锛氬寘鏉� 2锛氭垚鍝� 3锛氳�楁潗 4锛氬崐鎴愬搧
+ {
+ case "0"://鎴愬搧鍑哄簱
+ inspectStatus = "1";
+ break;
+ case "1"://棰嗘枡鍑哄簱
+ inspectStatus = "1";
+ break;
+ case "2"://鎶芥鍑哄簱
+ inspectStatus = "0,1,2";
+ break;
+ case "3"://鐗╂枡鍙栨牱鍑哄簱
+ inspectStatus = "0";
+ break;
+ case "4"://涓嶅悎鏍煎搧鍑哄簱
+ inspectStatus = "2";
+ break;
+ case "5"://涓棿鍝佸嚭搴�
+ inspectStatus = "1";
+ break;
+ case "6"://浠e偍鍑哄簱
+ inspectStatus = "0,1,2";
+ break;
+ case "8"://瀵勫瓨鍑哄簱
+ inspectStatus = "0,1";
+ break;
+ default: //鍏跺畠鍑哄簱
+ inspectStatus = "0,1";
+ break;
+ }
#endregion
Expression<Func<DataStockDetail, bool>> item = Expressionable.Create<DataStockDetail>()
+ .AndIF(!string.IsNullOrWhiteSpace(inspectStatus), m => inspectStatus.Contains(m.InspectStatus))
.AndIF(!string.IsNullOrWhiteSpace(houseNo), m => m.WareHouseNo == houseNo)
.AndIF(!string.IsNullOrWhiteSpace(roadwayNo), m => m.RoadwayNo == roadwayNo)
.AndIF(!string.IsNullOrWhiteSpace(locateNo), m => m.LocatNo == locateNo)
--
Gitblit v1.8.0