luocaiyang преди 3 седмици
родител
ревизия
ebaccd95eb

+ 35 - 0
.vscode/launch.json

@@ -0,0 +1,35 @@
+{
+    "version": "0.2.0",
+    "configurations": [
+        {
+            // Use IntelliSense to find out which attributes exist for C# debugging
+            // Use hover for the description of the existing attributes
+            // For further information visit https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md.
+            "name": ".NET Core Launch (web)",
+            "type": "coreclr",
+            "request": "launch",
+            "preLaunchTask": "build",
+            // If you have changed target frameworks, make sure to update the program path.
+            "program": "${workspaceFolder}/wispro.sp.ipeasyApi/bin/Debug/net5.0/wispro.sp.ipeasyApi.dll",
+            "args": [],
+            "cwd": "${workspaceFolder}/wispro.sp.ipeasyApi",
+            "stopAtEntry": false,
+            // Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
+            "serverReadyAction": {
+                "action": "openExternally",
+                "pattern": "\\bNow listening on:\\s+(https?://\\S+)"
+            },
+            "env": {
+                "ASPNETCORE_ENVIRONMENT": "Development"
+            },
+            "sourceFileMap": {
+                "/Views": "${workspaceFolder}/Views"
+            }
+        },
+        {
+            "name": ".NET Core Attach",
+            "type": "coreclr",
+            "request": "attach"
+        }
+    ]
+}

+ 41 - 0
.vscode/tasks.json

@@ -0,0 +1,41 @@
+{
+    "version": "2.0.0",
+    "tasks": [
+        {
+            "label": "build",
+            "command": "dotnet",
+            "type": "process",
+            "args": [
+                "build",
+                "${workspaceFolder}/StaffPerformance.sln",
+                "/property:GenerateFullPaths=true",
+                "/consoleloggerparameters:NoSummary;ForceNoAlign"
+            ],
+            "problemMatcher": "$msCompile"
+        },
+        {
+            "label": "publish",
+            "command": "dotnet",
+            "type": "process",
+            "args": [
+                "publish",
+                "${workspaceFolder}/StaffPerformance.sln",
+                "/property:GenerateFullPaths=true",
+                "/consoleloggerparameters:NoSummary;ForceNoAlign"
+            ],
+            "problemMatcher": "$msCompile"
+        },
+        {
+            "label": "watch",
+            "command": "dotnet",
+            "type": "process",
+            "args": [
+                "watch",
+                "run",
+                "--project",
+                "${workspaceFolder}/StaffPerformance.sln"
+            ],
+            "problemMatcher": "$msCompile"
+        }
+    ]
+}

+ 1 - 0
20251107-绩效系统需求-lcy-v1.0.txt

@@ -0,0 +1 @@
+项目审核的时候,审核人需要能看到以前审核的案子所给的绩效作为参考!

+ 1 - 1
wispro.sp.api/Controllers/AccountController.cs

@@ -39,7 +39,7 @@ namespace wispro.sp.api.Controllers
             
             Staff staff = dbContext.Staffs.Where<Staff>(s => s.Account == loginUser.Name ).FirstOrDefault(); //
            
-            if (staff != null && staff.Password == utility.MD5Utility.GetMD5(loginUser.Password))
+            if (staff != null && staff.IsOnJob && staff.Password == utility.MD5Utility.GetMD5(loginUser.Password))
             {
                 return GetToken(staff);
             }

+ 23 - 7
wispro.sp.utility/CompareDocx.cs

@@ -8,6 +8,7 @@ using System.Text.RegularExpressions;
 using System.Linq;
 using Microsoft.Office.Interop.Word;
 using wispro.sp.entity.CompareCase;
+using System.Runtime.InteropServices;
 
 
 namespace wispro.sp.utility
@@ -63,18 +64,33 @@ namespace wispro.sp.utility
                     // 打开Word文档
                     System.IO.FileInfo fileInfo = new System.IO.FileInfo(filePath);
 
-                    if (fileInfo.Name.Contains("-保密-"))
+                    if (fileInfo.Name.Contains("-保密-") || fileInfo.Name.Contains("加密版"))
                     {
                         return null;
                     }
                     else
                     {
-                        doc = word.Documents.Open(fileInfo.FullName);
-                        // 读取文档内容
-                        content = doc.Content.Text;
-
-                        List<string> lines = content.Split(new string[] { "\f", "\r" }, StringSplitOptions.None).ToList();
-                        return List2String(lines);
+                        try
+                        {
+                            doc = word.Documents.Open(
+                                fileInfo.FullName,
+                                ReadOnly: true,
+                                PasswordDocument: Type.Missing,
+                                WritePasswordDocument: "");
+                            // 读取文档内容
+                            content = doc.Content.Text;
+
+                            List<string> lines = content.Split(new string[] { "\f", "\r" }, StringSplitOptions.None).ToList();
+                            return List2String(lines);
+                        }
+                        catch (COMException ex) when (ex.ErrorCode == -2146823167 || ex.ErrorCode == -2147024891) // 0x80070005
+                        {
+                            return null; // 访问被拒绝 → 文档加密
+                        }
+                        catch
+                        {
+                            throw; // 其他异常(如文件损坏)需单独处理
+                        }
                     }
 
                 }

+ 12 - 8
wispro.sp.utility/IPEasyUtility.cs

@@ -821,16 +821,20 @@ namespace wispro.sp.utility
 
                 if (cols[3].Text == "未递交" || (cols[2].Text.Contains("申请") && !cols[2].Text.Contains("受理通知")))
                 {
-                    DateTime temDate = DateTime.Parse(cols[9].Text);
-                    if (temDate < dateTime)
+                    if (!string.IsNullOrEmpty(cols[10].Text))
                     {
-                        retRows.Insert(0, cols);
-                        dateTime = temDate;
-                    }
-                    else
-                    {
-                        retRows.Add(cols);
+                        DateTime temDate = DateTime.Parse(cols[10].Text);
+                        if (temDate < dateTime)
+                        {
+                            retRows.Insert(0, cols);
+                            dateTime = temDate;
+                        }
+                        else
+                        {
+                            retRows.Add(cols);
+                        }
                     }
+                    
                 }
             }
 

+ 2 - 2
wispro.sp.web/Components/StaffSelect.razor.cs

@@ -56,8 +56,8 @@ namespace wispro.sp.web.Components
 
         private void OnSearch(string value)
         {
-            //_ShowStaffs = StaffLists.Where<Staff>(p => p.Name.Contains(value)).ToList();
-            //StateHasChanged();
+            _ShowStaffs = StaffLists.Where<Staff>(p => p.Name.Contains(value)).ToList();
+            StateHasChanged();
         }
     }
 }

+ 1 - 1
wispro.sp.winClient/appsettings.json

@@ -4,7 +4,7 @@
     "isHeadless": "true",
     "Account": "caiyangl",
     "Password": "j)wx*lier*@3",
-    "ChormeDriverPath": "e:\\source\\repos\\StaffPerformance\\packages\\ChormeDriver\\135.0.7049.114",
+    "ChormeDriverPath": "e:\\source\\repos\\StaffPerformance\\packages\\ChormeDriver\\142",
     "ScheduleSetting": "00 55 10 3 * ? *",
     "IPEasyWeb": "http://47.106.94.35/Login.aspx"
   },