From a51d070d364b0da8e5f8ea9203a6e50c8b4c0af3 Mon Sep 17 00:00:00 2001
From: wanglizhong <wlz>
Date: 星期三, 09 七月 2025 22:06:34 +0800
Subject: [PATCH] feat(派单模块): 添加敏感信息隐藏功能

---
 ServiceOrder_List.gds |   99 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 98 insertions(+), 1 deletions(-)

diff --git a/ServiceOrder_List.gds b/ServiceOrder_List.gds
index 1874907..692ec29 100644
--- a/ServiceOrder_List.gds
+++ b/ServiceOrder_List.gds
@@ -3,6 +3,7 @@
 <!--#include virtual="/inc/chkadmin.gds"-->
 <!--#include virtual="/inc/function.gds"-->
 <%
+
 searchTXT=SafeRequest(trim(Request("searchTXT")))
 searchTXTMore=SafeRequest(Request("searchTXTMore"))
 If InStr(searchTXT,",")>0 Then
@@ -268,6 +269,102 @@
 If CoopUnitID<>"" Then page_URL=page_URL&"&CoopUnitID="&CoopUnitID
 
 %>
+
+
+<%
+' 璁板綍绠$悊鍛樻搷浣滄棩蹇�,璋佽闂簡杩欎釜椤甸潰锛屽啓鍦ㄤ簡logs/鐩綍涓嬮潰
+Dim adminName
+adminName = Session("adminName")
+
+' 妫�鏌� adminName 鏄惁涓虹┖
+If adminName = "" Then
+    Response.Write("绠$悊鍛樺悕绉版湭璁剧疆锛�")
+    Response.End()
+End If
+
+' 鑾峰彇褰撳墠鏃ユ湡骞舵牸寮忓寲涓� YYYY-MM-DD
+Dim currentDate
+currentDate = Year(Now()) & "-" & Right("0" & Month(Now()), 2) & "-" & Right("0" & Day(Now()), 2)
+
+' 瀹氫箟鏂囦欢璺緞鍜屾枃浠跺悕
+Dim fileName, filePath
+fileName = "log_" & currentDate & ".txt" ' 渚嬪锛歭og_2023-10-05.txt
+filePath = Server.MapPath("logs/" & fileName)
+
+' 鍒涘缓鏂囦欢绯荤粺瀵硅薄
+Dim fs, f
+Set fs = Server.CreateObject("Scripting.FileSystemObject")
+
+' 妫�鏌� logs 鐩綍鏄惁瀛樺湪锛屽鏋滀笉瀛樺湪鍒欏垱寤�
+Dim logsFolderPath
+logsFolderPath = Server.MapPath("logs")
+If Not fs.FolderExists(logsFolderPath) Then
+    fs.CreateFolder(logsFolderPath)
+End If
+
+' 妫�鏌ユ枃浠舵槸鍚﹀瓨鍦紝濡傛灉涓嶅瓨鍦ㄥ垯鍒涘缓
+If Not fs.FileExists(filePath) Then
+    Set f = fs.CreateTextFile(filePath, True)
+    f.Close
+End If
+
+
+Dim isDepartmentStr
+
+if isDepartment("020114")=1 Then
+	isDepartmentStr="鏌ョ湅鍏ㄩ儴璁㈠崟鏉冮檺"
+ElseIf isDepartment("020103")=1 Or isDepartment("020115")=1 Then
+	isDepartmentStr="鏈嶅姟鍗曟煡璇㈡潈闄�"
+Else 
+	isDepartmentStr="鏃犳潈闄�"
+End If
+
+
+' 鎵撳紑鏂囦欢骞跺啓鍏ュ唴瀹�
+On Error Resume Next ' 鍚敤閿欒澶勭悊
+Set f = fs.OpenTextFile(filePath, 8, True) ' 8 琛ㄧず杩藉姞妯″紡
+If Err.Number = 0 Then ' 濡傛灉鏈彂鐢熼敊璇�
+    f.WriteLine(Now() & " - " & adminName & " - 璁块棶浜哰ServiceOrder_List 椤甸潰] - 鐢ㄦ埛鏉冮檺锛�" & isDepartmentStr) ' 鍐欏叆褰撳墠鏃堕棿鍜岀鐞嗗憳鍚嶇О
+	f.Close
+Else
+    ' 濡傛灉鎵撳紑鏂囦欢澶辫触锛屽拷鐣ラ敊璇�
+End If
+' 閲婃斁瀵硅薄
+Set f = Nothing
+Set fs = Nothing
+
+On Error GoTo 0 ' 鍏抽棴閿欒澶勭悊
+
+
+
+
+'濡傛灉isDepartmentStr="鏃犳潈闄�"
+If isDepartmentStr = "鏃犳潈闄�" Then
+	' 鎵撳紑鏂囦欢骞跺啓鍏ュ唴瀹�
+	On Error Resume Next ' 鍚敤閿欒澶勭悊
+	Set f = fs.OpenTextFile(filePath, 8, True) ' 8 琛ㄧず杩藉姞妯″紡
+	If Err.Number = 0 Then ' 濡傛灉鏈彂鐢熼敊璇�
+		f.WriteLine(Now() & " - " & adminName & " - 灏濊瘯璁块棶[ServiceOrder_List 椤甸潰] - " & isDepartmentStr) ' 鍐欏叆褰撳墠鏃堕棿鍜岀鐞嗗憳鍚嶇О
+		f.Close
+	Else
+		' 濡傛灉鎵撳紑鏂囦欢澶辫触锛屽拷鐣ラ敊璇�
+	End If
+
+	' 閲婃斁瀵硅薄
+	Set f = Nothing
+	Set fs = Nothing
+
+	On Error GoTo 0 ' 鍏抽棴閿欒澶勭悊
+
+	Response.Write("Access not allowed, no permission!")
+	Response.End()
+End If
+%>
+
+
+
+
+
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 	<head>
@@ -672,7 +769,7 @@
 				searchSql=" (ServiceOrdPtOutHosp in (select vid from dictionary where vType=1 and vtitle='HospName' and vtext='"&Mid(searchTXT,6)&"') or ServiceOrdPtInHosp in (select vid from dictionary where vType=1 and vtitle='HospName' and vtext='"&Mid(searchTXT,6)&"')) and ServiceOrd_CC_Time "&SqlOrdDateType
 			  ElseIf Mid(searchTXT,1,5)="WXCX|" Then
 				'searchSql=" (ServiceOrdPtOutHosp in (select vid from dictionary where vType=1 and vtitle='HospName' and vtext='"&Mid(searchTXT,6)&"') or ServiceOrdPtInHosp in (select vid from dictionary where vType=1 and vtitle='HospName' and vtext='"&Mid(searchTXT,6)&"')) and ServiceOrd_CC_Time "&SqlOrdDateType
-				searchSql=" ((ServiceOrdCancelReason<>10 or ServiceOrdCancelReason is null) and (ServiceOrdCancelReasonTXT<>'鑷姩鍙栨秷' or ServiceOrdCancelReasonTXT is null)) and (ServiceOrdOperationRemarks<>'[瀹㈡埛鏈寮忔彁浜ら渶姹傦紝鍙笉鑱旂郴]' or ServiceOrdOperationRemarks is null) and ServiceOrdUserID not in (4,53) and ServiceOrdSource=5 and ServiceOrd_CC_Time "&SqlOrdDateType
+				searchSql=" ((ServiceOrdCancelReason<>10 or ServiceOrdCancelReason is null) and (ServiceOrdCancelReasonTXT<>'鑷姩鍙栨秷' or ServiceOrdCancelReasonTXT is null)) and (ServiceOrdOperationRemarks<>'[瀹㈡埛鏈寮忔彁浜ら渶姹傦紝鍙笉鑱旂郴]'  or ServiceOrdOperationRemarks is null) and ServiceOrdUserID not in (4,53,116368,93481) and ServiceOrdSource=5 and ServiceOrd_CC_Time "&SqlOrdDateType
 				If Mid(searchTXT,6,1)="4" Then
 					searchSql=searchSql&" and ServiceOrdState=4 "
 				ElseIf Mid(searchTXT,6,1)="3" Then

--
Gitblit v1.9.1