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 |   97 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 97 insertions(+), 0 deletions(-)

diff --git a/ServiceOrder_List.gds b/ServiceOrder_List.gds
index e15fe06..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>

--
Gitblit v1.9.1