luocaiyang 1 рік тому
батько
коміт
c32f2d3b79
41 змінених файлів з 3194 додано та 320 видалено
  1. 81 7
      StaffPerformance.sln
  2. 20 0
      UpdateUserDepart/UpdateUserDepart.cpp
  3. 135 0
      UpdateUserDepart/UpdateUserDepart.vcxproj
  4. 22 0
      UpdateUserDepart/UpdateUserDepart.vcxproj.filters
  5. 59 0
      UpdateUserDepartment/Form1.Designer.cs
  6. 165 0
      UpdateUserDepartment/Form1.cs
  7. 120 0
      UpdateUserDepartment/Form1.resx
  8. 23 0
      UpdateUserDepartment/Program.cs
  9. 16 0
      UpdateUserDepartment/UpdateUserDepartment.csproj
  10. 32 0
      UpdateUserDepartment/appsettings.json
  11. 84 51
      wispro.sp.api/Controllers/PerformanceItemController.cs
  12. 28 0
      wispro.sp.api/Controllers/ProjectController.cs
  13. 10 10
      wispro.sp.api/Controllers/StaffController.cs
  14. 1 1
      wispro.sp.api/Job/ImportReportJob.cs
  15. 3 3
      wispro.sp.api/appsettings.json
  16. 14 4
      wispro.sp.utility/IPEasyUtility.cs
  17. 10 1
      wispro.sp.web/Pages/Organization/Department.razor
  18. 1 1
      wispro.sp.web/wwwroot/appsettings.json
  19. 0 0
      wispro.sp.winClient - 副本/App.config
  20. 0 0
      wispro.sp.winClient - 副本/Class1.cs
  21. BIN
      wispro.sp.winClient/ExcelFiles/20210903-威世博常用绩效点数计算规则-v2-lcy.xls
  22. BIN
      wispro.sp.winClient/ExcelFiles/20210903-威世博常用绩效点数计算规则-v3-lcy.xls
  23. 0 0
      wispro.sp.winClient - 副本/ExcelFiles/20211109-绩效点数规则-lcy-v1.xlsx
  24. 0 0
      wispro.sp.winClient - 副本/ExcelFiles/21.01-21.06 工程师绩效报表-总表.xlsx
  25. 0 0
      wispro.sp.winClient - 副本/ExcelFiles/210730-威世博人员清单v1r01-xm.xlsx
  26. 178 0
      wispro.sp.winClient - 副本/Form1.Designer.cs
  27. 1504 0
      wispro.sp.winClient - 副本/Form1.cs
  28. 60 0
      wispro.sp.winClient - 副本/Form1.resx
  29. 0 0
      wispro.sp.winClient - 副本/Form2.Designer.cs
  30. 0 0
      wispro.sp.winClient - 副本/Form2.cs
  31. 67 0
      wispro.sp.winClient - 副本/IPEasyDownloader.cs
  32. 23 0
      wispro.sp.winClient - 副本/Program.cs
  33. 20 0
      wispro.sp.winClient - 副本/appsettings.json
  34. 138 0
      wispro.sp.winClient - 副本/frmMerageExcel.Designer.cs
  35. 75 0
      wispro.sp.winClient - 副本/frmMerageExcel.cs
  36. 60 0
      wispro.sp.winClient - 副本/frmMerageExcel.resx
  37. 76 0
      wispro.sp.winClient - 副本/wispro.sp.winClient.csproj
  38. 90 105
      wispro.sp.winClient/Form1.Designer.cs
  39. 15 75
      wispro.sp.winClient/Form1.cs
  40. 61 1
      wispro.sp.winClient/Form1.resx
  41. 3 61
      wispro.sp.winClient/wispro.sp.winClient.csproj

+ 81 - 7
StaffPerformance.sln

@@ -5,8 +5,6 @@ VisualStudioVersion = 17.1.32210.238
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "wispro.sp.api", "wispro.sp.api\wispro.sp.api.csproj", "{86964765-C850-48E8-B11F-1AD8B74E0BAE}"
 EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "wispro.sp.winClient", "wispro.sp.winClient\wispro.sp.winClient.csproj", "{18A48BC9-D464-4FF2-8281-FE8E6C9F3DDE}"
-EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "wispro.sp.entity", "wospro.sp.entity\wispro.sp.entity.csproj", "{30097917-88C1-4070-ABD1-FBB60CE2771E}"
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "wispro.sp.utility", "wispro.sp.utility\wispro.sp.utility.csproj", "{2D297FAD-B8BD-407E-9A72-90B3F4768C48}"
@@ -15,42 +13,118 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "wispro.sp.share", "wispro.s
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "wispro.sp.web", "wispro.sp.web\wispro.sp.web.csproj", "{237D9F7B-801E-440F-BA1A-3B5F8468C14F}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "wispro.sp.ipeasyApi", "wispro.sp.ipeasyApi\wispro.sp.ipeasyApi.csproj", "{5CF983AA-0815-4188-81E2-7472DA8CCAE6}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "wispro.sp.ipeasyApi", "wispro.sp.ipeasyApi\wispro.sp.ipeasyApi.csproj", "{5CF983AA-0815-4188-81E2-7472DA8CCAE6}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UpdateUserDepartment", "UpdateUserDepartment\UpdateUserDepartment.csproj", "{B175539F-0311-430D-A4C5-8E751A76C898}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "wispro.sp.winClient", "wispro.sp.winClient\wispro.sp.winClient.csproj", "{136BF7B5-3433-49CB-960E-48CCF182A177}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
+		Debug|x64 = Debug|x64
+		Debug|x86 = Debug|x86
 		Release|Any CPU = Release|Any CPU
+		Release|x64 = Release|x64
+		Release|x86 = Release|x86
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 		{86964765-C850-48E8-B11F-1AD8B74E0BAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{86964765-C850-48E8-B11F-1AD8B74E0BAE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{86964765-C850-48E8-B11F-1AD8B74E0BAE}.Debug|x64.ActiveCfg = Debug|x64
+		{86964765-C850-48E8-B11F-1AD8B74E0BAE}.Debug|x64.Build.0 = Debug|x64
+		{86964765-C850-48E8-B11F-1AD8B74E0BAE}.Debug|x86.ActiveCfg = Debug|x86
+		{86964765-C850-48E8-B11F-1AD8B74E0BAE}.Debug|x86.Build.0 = Debug|x86
 		{86964765-C850-48E8-B11F-1AD8B74E0BAE}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{86964765-C850-48E8-B11F-1AD8B74E0BAE}.Release|Any CPU.Build.0 = Release|Any CPU
-		{18A48BC9-D464-4FF2-8281-FE8E6C9F3DDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{18A48BC9-D464-4FF2-8281-FE8E6C9F3DDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{18A48BC9-D464-4FF2-8281-FE8E6C9F3DDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{18A48BC9-D464-4FF2-8281-FE8E6C9F3DDE}.Release|Any CPU.Build.0 = Release|Any CPU
+		{86964765-C850-48E8-B11F-1AD8B74E0BAE}.Release|x64.ActiveCfg = Release|x64
+		{86964765-C850-48E8-B11F-1AD8B74E0BAE}.Release|x64.Build.0 = Release|x64
+		{86964765-C850-48E8-B11F-1AD8B74E0BAE}.Release|x86.ActiveCfg = Release|x86
+		{86964765-C850-48E8-B11F-1AD8B74E0BAE}.Release|x86.Build.0 = Release|x86
 		{30097917-88C1-4070-ABD1-FBB60CE2771E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{30097917-88C1-4070-ABD1-FBB60CE2771E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{30097917-88C1-4070-ABD1-FBB60CE2771E}.Debug|x64.ActiveCfg = Debug|x64
+		{30097917-88C1-4070-ABD1-FBB60CE2771E}.Debug|x64.Build.0 = Debug|x64
+		{30097917-88C1-4070-ABD1-FBB60CE2771E}.Debug|x86.ActiveCfg = Debug|x86
+		{30097917-88C1-4070-ABD1-FBB60CE2771E}.Debug|x86.Build.0 = Debug|x86
 		{30097917-88C1-4070-ABD1-FBB60CE2771E}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{30097917-88C1-4070-ABD1-FBB60CE2771E}.Release|Any CPU.Build.0 = Release|Any CPU
+		{30097917-88C1-4070-ABD1-FBB60CE2771E}.Release|x64.ActiveCfg = Release|x64
+		{30097917-88C1-4070-ABD1-FBB60CE2771E}.Release|x64.Build.0 = Release|x64
+		{30097917-88C1-4070-ABD1-FBB60CE2771E}.Release|x86.ActiveCfg = Release|x86
+		{30097917-88C1-4070-ABD1-FBB60CE2771E}.Release|x86.Build.0 = Release|x86
 		{2D297FAD-B8BD-407E-9A72-90B3F4768C48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{2D297FAD-B8BD-407E-9A72-90B3F4768C48}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{2D297FAD-B8BD-407E-9A72-90B3F4768C48}.Debug|x64.ActiveCfg = Debug|x64
+		{2D297FAD-B8BD-407E-9A72-90B3F4768C48}.Debug|x64.Build.0 = Debug|x64
+		{2D297FAD-B8BD-407E-9A72-90B3F4768C48}.Debug|x86.ActiveCfg = Debug|x86
+		{2D297FAD-B8BD-407E-9A72-90B3F4768C48}.Debug|x86.Build.0 = Debug|x86
 		{2D297FAD-B8BD-407E-9A72-90B3F4768C48}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{2D297FAD-B8BD-407E-9A72-90B3F4768C48}.Release|Any CPU.Build.0 = Release|Any CPU
+		{2D297FAD-B8BD-407E-9A72-90B3F4768C48}.Release|x64.ActiveCfg = Release|x64
+		{2D297FAD-B8BD-407E-9A72-90B3F4768C48}.Release|x64.Build.0 = Release|x64
+		{2D297FAD-B8BD-407E-9A72-90B3F4768C48}.Release|x86.ActiveCfg = Release|x86
+		{2D297FAD-B8BD-407E-9A72-90B3F4768C48}.Release|x86.Build.0 = Release|x86
 		{E4C01740-6419-4078-BEFB-2A563CBB9417}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{E4C01740-6419-4078-BEFB-2A563CBB9417}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{E4C01740-6419-4078-BEFB-2A563CBB9417}.Debug|x64.ActiveCfg = Debug|x64
+		{E4C01740-6419-4078-BEFB-2A563CBB9417}.Debug|x64.Build.0 = Debug|x64
+		{E4C01740-6419-4078-BEFB-2A563CBB9417}.Debug|x86.ActiveCfg = Debug|x86
+		{E4C01740-6419-4078-BEFB-2A563CBB9417}.Debug|x86.Build.0 = Debug|x86
 		{E4C01740-6419-4078-BEFB-2A563CBB9417}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{E4C01740-6419-4078-BEFB-2A563CBB9417}.Release|Any CPU.Build.0 = Release|Any CPU
+		{E4C01740-6419-4078-BEFB-2A563CBB9417}.Release|x64.ActiveCfg = Release|x64
+		{E4C01740-6419-4078-BEFB-2A563CBB9417}.Release|x64.Build.0 = Release|x64
+		{E4C01740-6419-4078-BEFB-2A563CBB9417}.Release|x86.ActiveCfg = Release|x86
+		{E4C01740-6419-4078-BEFB-2A563CBB9417}.Release|x86.Build.0 = Release|x86
 		{237D9F7B-801E-440F-BA1A-3B5F8468C14F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{237D9F7B-801E-440F-BA1A-3B5F8468C14F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{237D9F7B-801E-440F-BA1A-3B5F8468C14F}.Debug|x64.ActiveCfg = Debug|x64
+		{237D9F7B-801E-440F-BA1A-3B5F8468C14F}.Debug|x64.Build.0 = Debug|x64
+		{237D9F7B-801E-440F-BA1A-3B5F8468C14F}.Debug|x86.ActiveCfg = Debug|x86
+		{237D9F7B-801E-440F-BA1A-3B5F8468C14F}.Debug|x86.Build.0 = Debug|x86
 		{237D9F7B-801E-440F-BA1A-3B5F8468C14F}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{237D9F7B-801E-440F-BA1A-3B5F8468C14F}.Release|Any CPU.Build.0 = Release|Any CPU
+		{237D9F7B-801E-440F-BA1A-3B5F8468C14F}.Release|x64.ActiveCfg = Release|x64
+		{237D9F7B-801E-440F-BA1A-3B5F8468C14F}.Release|x64.Build.0 = Release|x64
+		{237D9F7B-801E-440F-BA1A-3B5F8468C14F}.Release|x86.ActiveCfg = Release|x86
+		{237D9F7B-801E-440F-BA1A-3B5F8468C14F}.Release|x86.Build.0 = Release|x86
 		{5CF983AA-0815-4188-81E2-7472DA8CCAE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{5CF983AA-0815-4188-81E2-7472DA8CCAE6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{5CF983AA-0815-4188-81E2-7472DA8CCAE6}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{5CF983AA-0815-4188-81E2-7472DA8CCAE6}.Debug|x64.Build.0 = Debug|Any CPU
+		{5CF983AA-0815-4188-81E2-7472DA8CCAE6}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{5CF983AA-0815-4188-81E2-7472DA8CCAE6}.Debug|x86.Build.0 = Debug|Any CPU
 		{5CF983AA-0815-4188-81E2-7472DA8CCAE6}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{5CF983AA-0815-4188-81E2-7472DA8CCAE6}.Release|Any CPU.Build.0 = Release|Any CPU
+		{5CF983AA-0815-4188-81E2-7472DA8CCAE6}.Release|x64.ActiveCfg = Release|Any CPU
+		{5CF983AA-0815-4188-81E2-7472DA8CCAE6}.Release|x64.Build.0 = Release|Any CPU
+		{5CF983AA-0815-4188-81E2-7472DA8CCAE6}.Release|x86.ActiveCfg = Release|Any CPU
+		{5CF983AA-0815-4188-81E2-7472DA8CCAE6}.Release|x86.Build.0 = Release|Any CPU
+		{B175539F-0311-430D-A4C5-8E751A76C898}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{B175539F-0311-430D-A4C5-8E751A76C898}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{B175539F-0311-430D-A4C5-8E751A76C898}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{B175539F-0311-430D-A4C5-8E751A76C898}.Debug|x64.Build.0 = Debug|Any CPU
+		{B175539F-0311-430D-A4C5-8E751A76C898}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{B175539F-0311-430D-A4C5-8E751A76C898}.Debug|x86.Build.0 = Debug|Any CPU
+		{B175539F-0311-430D-A4C5-8E751A76C898}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{B175539F-0311-430D-A4C5-8E751A76C898}.Release|Any CPU.Build.0 = Release|Any CPU
+		{B175539F-0311-430D-A4C5-8E751A76C898}.Release|x64.ActiveCfg = Release|Any CPU
+		{B175539F-0311-430D-A4C5-8E751A76C898}.Release|x64.Build.0 = Release|Any CPU
+		{B175539F-0311-430D-A4C5-8E751A76C898}.Release|x86.ActiveCfg = Release|Any CPU
+		{B175539F-0311-430D-A4C5-8E751A76C898}.Release|x86.Build.0 = Release|Any CPU
+		{136BF7B5-3433-49CB-960E-48CCF182A177}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{136BF7B5-3433-49CB-960E-48CCF182A177}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{136BF7B5-3433-49CB-960E-48CCF182A177}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{136BF7B5-3433-49CB-960E-48CCF182A177}.Debug|x64.Build.0 = Debug|Any CPU
+		{136BF7B5-3433-49CB-960E-48CCF182A177}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{136BF7B5-3433-49CB-960E-48CCF182A177}.Debug|x86.Build.0 = Debug|Any CPU
+		{136BF7B5-3433-49CB-960E-48CCF182A177}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{136BF7B5-3433-49CB-960E-48CCF182A177}.Release|Any CPU.Build.0 = Release|Any CPU
+		{136BF7B5-3433-49CB-960E-48CCF182A177}.Release|x64.ActiveCfg = Release|Any CPU
+		{136BF7B5-3433-49CB-960E-48CCF182A177}.Release|x64.Build.0 = Release|Any CPU
+		{136BF7B5-3433-49CB-960E-48CCF182A177}.Release|x86.ActiveCfg = Release|Any CPU
+		{136BF7B5-3433-49CB-960E-48CCF182A177}.Release|x86.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 20 - 0
UpdateUserDepart/UpdateUserDepart.cpp

@@ -0,0 +1,20 @@
+// UpdateUserDepart.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
+//
+
+#include <iostream>
+
+int main()
+{
+    std::cout << "Hello World!\n";
+}
+
+// 运行程序: Ctrl + F5 或调试 >“开始执行(不调试)”菜单
+// 调试程序: F5 或调试 >“开始调试”菜单
+
+// 入门使用技巧: 
+//   1. 使用解决方案资源管理器窗口添加/管理文件
+//   2. 使用团队资源管理器窗口连接到源代码管理
+//   3. 使用输出窗口查看生成输出和其他消息
+//   4. 使用错误列表窗口查看错误
+//   5. 转到“项目”>“添加新项”以创建新的代码文件,或转到“项目”>“添加现有项”以将现有代码文件添加到项目
+//   6. 将来,若要再次打开此项目,请转到“文件”>“打开”>“项目”并选择 .sln 文件

+ 135 - 0
UpdateUserDepart/UpdateUserDepart.vcxproj

@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <VCProjectVersion>17.0</VCProjectVersion>
+    <Keyword>Win32Proj</Keyword>
+    <ProjectGuid>{22cdc828-4c7c-417a-95b7-d5687a3da5e1}</ProjectGuid>
+    <RootNamespace>UpdateUserDepart</RootNamespace>
+    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v143</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v143</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v143</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v143</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="Shared">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <SDLCheck>true</SDLCheck>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ConformanceMode>true</ConformanceMode>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <SDLCheck>true</SDLCheck>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ConformanceMode>true</ConformanceMode>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <SDLCheck>true</SDLCheck>
+      <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ConformanceMode>true</ConformanceMode>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <SDLCheck>true</SDLCheck>
+      <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ConformanceMode>true</ConformanceMode>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="UpdateUserDepart.cpp" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

+ 22 - 0
UpdateUserDepart/UpdateUserDepart.vcxproj.filters

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="源文件">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="头文件">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
+    </Filter>
+    <Filter Include="资源文件">
+      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="UpdateUserDepart.cpp">
+      <Filter>源文件</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>

+ 59 - 0
UpdateUserDepartment/Form1.Designer.cs

@@ -0,0 +1,59 @@
+namespace UpdateUserDepartment
+{
+    partial class Form1
+    {
+        /// <summary>
+        ///  Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        ///  Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        ///  Required method for Designer support - do not modify
+        ///  the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            button1 = new System.Windows.Forms.Button();
+            SuspendLayout();
+            // 
+            // button1
+            // 
+            button1.Location = new System.Drawing.Point(86, 62);
+            button1.Name = "button1";
+            button1.Size = new System.Drawing.Size(284, 74);
+            button1.TabIndex = 0;
+            button1.Text = "请选择文件";
+            button1.UseVisualStyleBackColor = true;
+            button1.Click += button1_Click;
+            // 
+            // Form1
+            // 
+            AutoScaleDimensions = new System.Drawing.SizeF(13F, 28F);
+            AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            ClientSize = new System.Drawing.Size(800, 450);
+            Controls.Add(button1);
+            Name = "Form1";
+            Text = "Form1";
+            ResumeLayout(false);
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Button button1;
+    }
+}

+ 165 - 0
UpdateUserDepartment/Form1.cs

@@ -0,0 +1,165 @@
+using NPOI.SS.Formula.Functions;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using wispro.sp.api;
+using wispro.sp.entity;
+
+namespace UpdateUserDepartment
+{
+    public partial class Form1 : Form
+    {
+        public Form1()
+        {
+            InitializeComponent();
+        }
+
+        private void button1_Click(object sender, EventArgs e)
+        {
+            var ofd = new System.Windows.Forms.OpenFileDialog();
+
+            if(ofd.ShowDialog() == DialogResult.OK)
+            {
+                string strPath = ofd.FileName;
+                var dt = wispro.sp.utility.NPOIExcel.ExcelToTable(strPath);
+
+                wispro.sp.api.spDbContext db = new wispro.sp.api.spDbContext();
+                var depList = db.Departments.ToList();
+
+                foreach ( DataRow row in dt.Rows )
+                {
+                    string strId = row[0].ToString();
+
+                    
+                    string strDepart = row["部门"].ToString();
+
+                    System.Diagnostics.Debug.WriteLine(string.Format( "部门:{0}",strDepart));
+
+                    if(!string.IsNullOrEmpty(strDepart))
+                    {
+                        string[] deps = GetDepartmentPath(strDepart);
+
+                        if (deps != null && deps.Length > 0)
+                        {
+                            Department department = GetUserDepartment(deps, db);
+                            UpdateDepartmentPosition(db, strId, department);
+                        }
+
+                    }
+
+                }
+
+            }
+
+            static Department GetUserDepartment(string[] deps, wispro.sp.api.spDbContext db)
+            {
+                Department temDept = null;
+                for (int i=0;i<deps.Length;i++)
+                {
+                    Department dep = null;
+                    if(temDept == null)
+                    {
+                        dep = db.Departments.Where<Department>(d => d.Name == deps[i].Trim()).FirstOrDefault();
+                    }
+                    else
+                    {
+                        dep = db.Departments.Where<Department>(d => d.Name == deps[i].Trim() && d.parentId == temDept.Id).FirstOrDefault();
+                    }
+
+                    if (dep == null)
+                    {
+                        dep = new Department()
+                        {
+                            Name = deps[i].Trim(),
+                            parentId = temDept == null ? null : temDept.Id,
+                            ancestors = temDept.ancestors + "," + temDept.Id.ToString()
+                        };
+
+                        db.Departments.Add(dep);
+                        db.SaveChanges();
+                    }
+
+                    temDept = dep;
+
+                }
+
+                return temDept;
+            }
+
+            static string[] GetDepartmentPath(string strDepart)
+            {
+                if(string.IsNullOrEmpty(strDepart) || strDepart =="NULL")
+                {
+                    return null;
+                }
+                string[] deps = strDepart.Trim().Split(new char[] { ',' });
+
+
+                if (deps.Length > 0)
+                {
+                    System.Text.RegularExpressions.Regex r = new System.Text.RegularExpressions.Regex("(.*)\\((.*)\\)");
+                    System.Text.RegularExpressions.Match m = r.Match(deps[0]);
+                    if (m.Success)
+                    {
+                        string[] temDeps = new string[deps.Length + 1];
+                        temDeps[0] = m.Groups[1].Value;
+                        temDeps[1] = m.Groups[2].Value;
+
+                        if (deps.Length > 1)
+                        {
+                            for (int i = 1; i < deps.Length; i++)
+                            {
+                                temDeps[i + 1] = deps[i];
+                            }
+                        }
+
+                        deps = temDeps;
+                    }
+
+
+                }
+
+                return deps;
+            }
+        }
+
+        private static void UpdateDepartmentPosition(spDbContext db, string strId, Department department)
+        {
+            var dpList = db.DepartmentPositions.Where(dp => dp.StaffId == int.Parse(strId)).ToList<DepartmentPosition>();
+
+            bool isExist = false;
+            foreach (var dp in dpList)
+            {
+                if (dp.departmentId != department.Id)
+                {
+                    db.DepartmentPositions.Remove(dp);
+                }
+                else
+                {
+                    isExist = true;
+                }
+
+            }
+
+            if (!isExist)
+            {
+                db.DepartmentPositions.Add(
+                    new DepartmentPosition()
+                    {
+                        departmentId = department.Id,
+                        PositionId = 5,
+                        StaffId = int.Parse(strId)
+                    }
+                    );
+            }
+
+            db.SaveChanges();
+        }
+    }
+}

+ 120 - 0
UpdateUserDepartment/Form1.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!--
+    Microsoft ResX Schema 
+
+    Version 2.0
+
+    The primary goals of this format is to allow a simple XML format
+    that is mostly human readable. The generation and parsing of the
+    various data types are done through the TypeConverter classes
+    associated with the data types.
+
+    Example:
+
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+
+    There are any number of "resheader" rows that contain simple
+    name/value pairs.
+
+    Each data row contains a name, and value. The row also contains a
+    type or mimetype. Type corresponds to a .NET class that support
+    text/value conversion through the TypeConverter architecture.
+    Classes that don't support this are serialized and stored with the
+    mimetype set.
+
+    The mimetype is used for serialized objects, and tells the
+    ResXResourceReader how to depersist the object. This is currently not
+    extensible. For a given mimetype the value must be set accordingly:
+
+    Note - application/x-microsoft.net.object.binary.base64 is the format
+    that the ResXResourceWriter will generate, however the reader can
+    read any of the formats listed below.
+
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 23 - 0
UpdateUserDepartment/Program.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace UpdateUserDepartment
+{
+    internal static class Program
+    {
+        /// <summary>
+        ///  The main entry point for the application.
+        /// </summary>
+        [STAThread]
+        static void Main()
+        {
+            Application.SetHighDpiMode(HighDpiMode.SystemAware);
+            Application.EnableVisualStyles();
+            Application.SetCompatibleTextRenderingDefault(false);
+            Application.Run(new Form1());
+        }
+    }
+}

+ 16 - 0
UpdateUserDepartment/UpdateUserDepartment.csproj

@@ -0,0 +1,16 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <OutputType>WinExe</OutputType>
+    <TargetFramework>net5.0-windows</TargetFramework>
+    <Nullable>enable</Nullable>
+    <UseWindowsForms>true</UseWindowsForms>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <ProjectReference Include="..\wispro.sp.api\wispro.sp.api.csproj" />
+    <ProjectReference Include="..\wispro.sp.utility\wispro.sp.utility.csproj" />
+    <ProjectReference Include="..\wospro.sp.entity\wispro.sp.entity.csproj" />
+  </ItemGroup>
+
+</Project>

+ 32 - 0
UpdateUserDepartment/appsettings.json

@@ -0,0 +1,32 @@
+{
+  "Logging": {
+    "LogLevel": {
+      "Default": "Information",
+      "Microsoft": "Warning",
+      "Microsoft.Hosting.Lifetime": "Information"
+    }
+  },
+  
+  "ConnectionStrings": {
+    "DefaultConnect": "Data Source=(local);Initial Catalog=spDB;User ID=sa;Password=Lqftiu807005"
+  },
+
+ 
+  "IPEasySetting": {
+    "DownloadFileSavePath": "c:\\temp",
+    "isHeadless": "true",
+    "Account": "caiyangl",
+    "Password": "j)wx*lier*@3",
+    "ChormeDriverPath": "D:\\source\\repos\\StaffPerformance\\packages\\ChormeDriver\\120.0.6099.109",
+    "ScheduleSetting": "00 55 15 16 * ? *",
+    "IPEasyWeb": "http://47.106.94.35/Login.aspx"
+  },
+  "MailSetting": {
+    "Server": "smtp.exmail.qq.com",
+    "Port": "465",
+    "Account": "luocaiyang@china-wispro.com",
+    "Password": "Qj7eGb3ffQfJ3tpt",
+    "mail": "luocaiyang@china-wispro.com"
+  }
+
+}

+ 84 - 51
wispro.sp.api/Controllers/PerformanceItemController.cs

@@ -507,10 +507,10 @@ namespace wispro.sp.api.Controllers
 
             var results = spDb.StaffStatistics.Include(p => p.Item).Where(s => s.CalMonthId == calMonth.Id && s.jxType == jxType && s.StaffId == userId);
 
-            if (!isReivewer)
-            {
-                results = spDb.StaffStatistics.Include(p => p.Item).Where(s => s.CalMonthId == calMonth.Id && (s.jxType == jxType || s.jxType == "专案处理") && s.StaffId == userId);
-            }
+            //if (!isReivewer)
+            //{
+            //    results = spDb.StaffStatistics.Include(p => p.Item).Where(s => s.CalMonthId == calMonth.Id && (s.jxType == jxType ) && s.StaffId == userId);
+            //}
 
             #region 循环计算
             decimal  iCount = 0;
@@ -521,10 +521,6 @@ namespace wispro.sp.api.Controllers
             {
                 if (item.Item != null)
                 {
-                    //if(item.Item.CaseNo == "PACN2220066")
-                    //{
-                    //    System.Diagnostics.Debug.WriteLine("");
-                    //}
                     //合写人数
                     decimal  CaseNumber = 1M;
 
@@ -675,7 +671,7 @@ namespace wispro.sp.api.Controllers
             var results = spDb.StaffStatistics
                 .Where(p => 
                                     p.CalMonthId == calMonth.Id  && 
-                                    (p.Item.Type == "新申请" || p.Item.Type == "专案"))
+                                    (p.Item.Type == "新申请" )) //|| p.Item.Type == "专案"))
                 .Select(p => p.Item).Distinct();
 
             #region 循环计算
@@ -794,7 +790,7 @@ namespace wispro.sp.api.Controllers
                 }
 
 
-                System.Diagnostics.Debug.WriteLine($"{item.CaseNo}\t{item.DoItem}\t{item.DoItemCoefficient}\t{item.WordCount}\t{strCaseCeoffcient}\t{item.CaseCoefficient}\t{item.BasePoint}");
+                //System.Diagnostics.Debug.WriteLine($"{item.CaseNo}\t{item.DoItem}\t{item.DoItemCoefficient}\t{item.WordCount}\t{strCaseCeoffcient}\t{item.CaseCoefficient}\t{item.BasePoint}");
 
             }
             #endregion
@@ -1570,7 +1566,7 @@ namespace wispro.sp.api.Controllers
             var Rules = spDb.BasePointRules.ToList();
             while (iTable < temDt.Rows.Count && iList < items.Count)
             {
-                System.Diagnostics.Debug.WriteLine($"Excel:{iTable}/{temDt.Rows.Count}\t{iList}/{items.Count}");
+                //System.Diagnostics.Debug.WriteLine($"Excel:{iTable}/{temDt.Rows.Count}\t{iList}/{items.Count}");
 
                 DataRow row = temDt.Rows[iTable];
                 PerformanceItem item = items[iList];
@@ -2158,7 +2154,7 @@ namespace wispro.sp.api.Controllers
                     {
                         temStatic.totalBasePoint += handlerBasePoint;
 
-                        if (item.Type == "OA" || item.Type == "新申请")
+                        if (item.Type == "OA" || item.Type == "新申请") // || item.Type == "专案")
                         {
                             temStatic.totalActuallyPoint += (double)((decimal)handlerBasePoint * (decimal)itemStaff.DoPerson.StaffGrade.Coefficient);
                         }
@@ -2171,7 +2167,7 @@ namespace wispro.sp.api.Controllers
                     {
                         if (itemStaff.DoPerson.StaffGradeId != null && itemStaff.DoPerson.IsCalPerformsnce)
                         {
-                            if (item.Type == "OA" || item.Type == "新申请")
+                            if (item.Type == "OA" || item.Type == "新申请") // || item.Type == "专案")
                             {
                                 if (itemStaff.DoPerson.StaffGrade == null)
                                 {
@@ -2298,13 +2294,9 @@ namespace wispro.sp.api.Controllers
             IDictionary<int, NanduStatics> ReivewerXiShu = new Dictionary<int, NanduStatics>();
             foreach (StaffStatistics ss in retList)
             {
-
-                if (ss.jxType == "新申请处理" || ss.jxType == "专案处理")
+                if (ss.jxType == "新申请处理") // || ss.jxType == "专案处理")
                 {
-                    if(ss.StaffId == 222)
-                    {
-                        System.Diagnostics.Debug.WriteLine("");
-                    }
+                    
                     #region 新申请处理+专案处理
                     if (!staffXiShu.ContainsKey(ss.StaffId))
                     {
@@ -2342,23 +2334,64 @@ namespace wispro.sp.api.Controllers
                     }
                     else
                     {
-                        ss.FinianlPoint = ss.totalActuallyPoint;
-                        spDb.SaveChanges();
+                        if (ss.jxType == "专案处理")
+                        {
+                            switch (ss.Item.CaseCoefficient)
+                            {
+                                case "S":
+                                    ss.FinianlPoint = ss.totalActuallyPoint * 2.5;
+                                    break;
+                                case "A":
+                                    ss.FinianlPoint = ss.totalActuallyPoint * 1.5;
+                                    break;
+                                case "B":
+                                    ss.FinianlPoint = ss.totalActuallyPoint;
+                                    break;
+                                case "C":
+                                    ss.FinianlPoint = ss.totalActuallyPoint * 0.7;
+                                    break;
+                                case "D":
+                                    ss.FinianlPoint = ss.totalActuallyPoint * 0.4;
+                                    break;
+                                default:
+                                    ss.FinianlPoint = ss.totalActuallyPoint;
+                                    break;
+                            }
+                            ss.NanduXS = null;
+                            ss.S = null;
+                            ss.A = null;
+                            ss.B = null;
+                            ss.C = null;
+                            ss.D = null;
+                            spDb.SaveChanges();
+
+                        }
+                        else
+                        {
+                            ss.FinianlPoint = ss.totalActuallyPoint;
+                            ss.NanduXS = null;
+                            ss.S = null;
+                            ss.A = null;
+                            ss.B = null;
+                            ss.C = null;
+                            ss.D = null;
+                            spDb.SaveChanges();
+                        }
                     }
 
                 }
             }
 
-            var xsqList = retList.Where(ss => ss.jxType == "新申请处理" || ss.jxType == "专案处理").ToList();
+            var xsqList = retList.Where(ss => ss.jxType == "新申请处理").ToList();// || ss.jxType == "专案处理").ToList();
             var totalFPBLPoint = xsqList.Sum(p=>p.FinianlPoint); //新申请处理+专案 分配比率总点数
             var totalActionPoint = xsqList.Sum(p=>p.totalActuallyPoint); //新申请处理+专案 原始总点数
 
             foreach (StaffStatistics ss in xsqList)
             {
-                if(totalFPBLPoint * (totalActionPoint + jlPoint) == 0)
-                {
-                    Console.WriteLine("");
-                }
+                //if(totalFPBLPoint * (totalActionPoint + jlPoint) == 0)
+                //{
+                //    Console.WriteLine("");
+                //}
                 ss.FinianlPoint = ss.FinianlPoint / totalFPBLPoint * (totalActionPoint + jlPoint);
                 spDb.SaveChanges();
                 
@@ -2473,6 +2506,15 @@ namespace wispro.sp.api.Controllers
             if (calMonth != null || calMonth.Status !=4)
             {
                 spDbContext spDb = new spDbContext();
+
+                #region 删除垃圾数据
+                var delEntity = spDb.StaffStatistics.Where(x => x.Item == null && x.CalMonthId == calMonth.Id).ToArray();
+                if(delEntity.Length > 0)
+                {
+                    spDb.StaffStatistics.RemoveRange(delEntity);
+                }
+                #endregion
+
                 calMonth = spDb.CalMonths.FirstOrDefault(c=>c.Id == calMonth.Id);
                 using (var t = spDb.Database.BeginTransaction())
                 {
@@ -2694,6 +2736,7 @@ namespace wispro.sp.api.Controllers
             dt.Columns.Add("核稿系数", typeof(string));
             dt.Columns.Add("核稿绩效", typeof(string));
             dt.Columns.Add("处理人", typeof(string));
+            dt.Columns.Add("处理人部门", typeof(string));
             dt.Columns.Add("核稿人", typeof(string));
             dt.Columns.Add("客户名称", typeof(string));
             dt.Columns.Add("申请人", typeof(string));
@@ -2745,16 +2788,26 @@ namespace wispro.sp.api.Controllers
 
                     string strISLevels = "";
                     string strISNames = "";
+                    string strISDeps = "";
 
                     foreach (var istaff in item.ItemStaffs)
                     {
                         strISLevels = string.IsNullOrEmpty(strISLevels)?istaff.DoPerson.StaffGrade?.Grade : $"{strISLevels},{istaff.DoPerson.StaffGrade?.Grade}";
                         strISNames = string.IsNullOrEmpty(strISNames)?istaff.DoPerson.Name : $"{strISNames},{istaff.DoPerson.Name}";
+
+
+                        var dp = new spDbContext().DepartmentPositions.Where(x => x.StaffId == istaff.DoPersonId).Include(d=>d.department).FirstOrDefault();
+                        if(dp != null )
+                        {
+                            strISDeps = string.IsNullOrEmpty(strISDeps) ? dp.department.Name : $"{strISDeps},{dp.department.Name}";
+                        }
+                        
                     }
 
                     row["处理人等级"] = strISLevels;
                     row["基本点数"] = item.BasePoint;
                     row["处理人"] = strISNames;
+                    row["处理人部门"] = strISDeps;
                     row["核稿人"] = item.Reviewer?.Name;
 
                     if (item.ReviewerId != null && item.BasePoint.HasValue)
@@ -3548,11 +3601,6 @@ namespace wispro.sp.api.Controllers
                         
                         temObj.GradeId = h.Staff.StaffGradeId.Value ;
 
-                        if(temObj.GradeId == 0)
-                        {
-                            System.Diagnostics.Debug.WriteLine("");
-                        }
-
                         temObj.CalMonthId = p.CalMonthId;
                         temObj.Type = "新申请";
                         retlist.Add(temObj);
@@ -3628,10 +3676,7 @@ namespace wispro.sp.api.Controllers
                         temObj.StaffId = reviewer.StaffId;
                         temObj.GradeId = reviewer.Staff.StaffGradeId.Value;
 
-                        if (temObj.GradeId == 0)
-                        {
-                            System.Diagnostics.Debug.WriteLine("");
-                        }
+                       
                         temObj.CalMonthId = p.CalMonthId;
                         temObj.Type = "新申请";
                         temObj.isReview = true;
@@ -3683,10 +3728,7 @@ namespace wispro.sp.api.Controllers
                         temObj = new StaffStatisticsforLevel();
                         temObj.StaffId = h.StaffId;
                         temObj.GradeId = h.Staff.StaffGradeId.Value ;
-                        if (temObj.GradeId == 0)
-                        {
-                            System.Diagnostics.Debug.WriteLine("");
-                        }
+                        
                         temObj.CalMonthId = p.CalMonthId;
                         temObj.Type = "国内OA";
                         retlist.Add(temObj);
@@ -3728,10 +3770,7 @@ namespace wispro.sp.api.Controllers
                         temObj = new StaffStatisticsforLevel();
                         temObj.StaffId = reviewer.StaffId;
                         temObj.GradeId = reviewer.Staff.StaffGradeId.Value;
-                        if (temObj.GradeId == 0)
-                        {
-                            System.Diagnostics.Debug.WriteLine("");
-                        }
+                        
                         temObj.CalMonthId = p.CalMonthId;
                         temObj.Type = "国内OA";
                         temObj.isReview = true;
@@ -3781,10 +3820,7 @@ namespace wispro.sp.api.Controllers
                         temObj = new StaffStatisticsforLevel();
                         temObj.StaffId = h.StaffId;
                         temObj.GradeId = h.Staff.StaffGradeId.Value;
-                        if (temObj.GradeId == 0)
-                        {
-                            System.Diagnostics.Debug.WriteLine("");
-                        }
+                        
                         temObj.CalMonthId = p.CalMonthId;
                         temObj.Type = "涉外OA";
                         retlist.Add(temObj);
@@ -3826,10 +3862,7 @@ namespace wispro.sp.api.Controllers
                         temObj = new StaffStatisticsforLevel();
                         temObj.StaffId = reviewer.StaffId;
                         temObj.GradeId = reviewer.Staff.StaffGradeId.Value;
-                        if (temObj.GradeId == 0)
-                        {
-                            System.Diagnostics.Debug.WriteLine("");
-                        }
+                        
                         temObj.CalMonthId = calMonthId;
                         temObj.Type = "涉外OA";
                         temObj.isReview = true;

+ 28 - 0
wispro.sp.api/Controllers/ProjectController.cs

@@ -159,6 +159,17 @@ namespace wispro.sp.api.Controllers
                     pcRecord.Reviewer = temStaff;
                 }
 
+                if(pcRecord.Staff != null)
+                {
+                    var temStaff = new Staff()
+                    {
+                        Name = pcRecord.Staff.Name,
+                        Id = pcRecord.Staff.Id,
+                    };
+
+                    pcRecord.Staff  = temStaff;
+                }
+
                 if (pcRecord.Project != null)
                 {
                     ProjectInfo temProj = new ProjectInfo()
@@ -554,9 +565,26 @@ namespace wispro.sp.api.Controllers
                 .Include(p=>p.Project).ThenInclude(p=>p.Customer)
                 .Where(p => p.State == 1 && p.CalMonth.Status == 0 && p.ReviewerId == user.Id).Select(p=>p.Project).Distinct().ToList();
 
+            formatRetProjects(retList);
             return retList;
         }
 
+        private void formatRetProjects(List<ProjectInfo> retList)
+        {
+            foreach (var project in retList)
+            {
+                if (project.Customer != null)
+                {
+                    var temCustomer = new Customer()
+                    {
+                        Name = project.Customer.Name,
+                        Id = project.Customer.Id
+                    };
+                    project.Customer = temCustomer;
+                }
+            }
+        }
+
         public List<ProjectContents> GetProjectCanReviewWorkContent(string projectNo, int Year, int month)
         {
             var pcrList  = Context.ProjectContentRecords

+ 10 - 10
wispro.sp.api/Controllers/StaffController.cs

@@ -214,16 +214,16 @@ namespace wispro.sp.api.Controllers
         private Hashtable AuditUsers()
         {
             Hashtable retStaffs = new Hashtable();
-            retStaffs.Add("刘桂兰",new List<string>() { "程利", "周心志" });
-            retStaffs.Add("张庆玲", new List<string>() { "贾凤涛" });
-            retStaffs.Add("石惠", new List<string>() { "贾凤涛" });
-            retStaffs.Add("钟锦光", new List<string>() { "李庆波", "陈舒敏" });
-            retStaffs.Add("向鑫旭", new List<string>() { "李庆波", "陈舒敏" });
-            retStaffs.Add("张晓薇", new List<string>() { "李庆波", "陈舒敏" });
-            retStaffs.Add("杨超", new List<string>() { "李庆波", "陈舒敏" });
-            retStaffs.Add("沈靖俞", new List<string>() { "李庆波", "陈舒敏" });
-            retStaffs.Add("何丽", new List<string>() { "李庆波", "陈舒敏" });
-            retStaffs.Add("管自英", new List<string>() { "王建峰" });
+            retStaffs.Add("刘桂兰",new List<string>() { "程利", "周心志", "钟子敏", "陈舒敏" });
+            retStaffs.Add("张庆玲", new List<string>() { "贾凤涛", "钟子敏", "陈舒敏" });
+            retStaffs.Add("石惠", new List<string>() { "贾凤涛", "钟子敏", "陈舒敏" });
+            retStaffs.Add("钟锦光", new List<string>() { "李庆波", "钟子敏", "陈舒敏" });
+            retStaffs.Add("向鑫旭", new List<string>() { "李庆波", "钟子敏", "陈舒敏" });
+            retStaffs.Add("张晓薇", new List<string>() { "李庆波", "钟子敏", "陈舒敏" });
+            retStaffs.Add("杨超", new List<string>() { "李庆波", "钟子敏", "陈舒敏" });
+            retStaffs.Add("沈靖俞", new List<string>() { "李庆波", "钟子敏", "陈舒敏" });
+            retStaffs.Add("何丽", new List<string>() { "李庆波", "钟子敏", "陈舒敏" });
+            retStaffs.Add("管自英", new List<string>() { "王建峰", "钟子敏", "陈舒敏" });
             retStaffs.Add("唐双", new List<string>() { "钟子敏","陈舒敏" });
             retStaffs.Add("李申", new List<string>() { "钟子敏", "陈舒敏" });
             retStaffs.Add("翁旋艺", new List<string>() { "钟子敏", "陈舒敏" });

+ 1 - 1
wispro.sp.api/Job/ImportReportJob.cs

@@ -144,7 +144,7 @@ namespace wispro.sp.api.Job
             }
 
             //每月绩效统计--发客户超过一个月未完成案件
-            DownloadReport_SQL("每月绩效统计--发客户超过一个月未完成案件", calMonth, false);
+            //DownloadReport_SQL("每月绩效统计--发客户超过一个月未完成案件", calMonth, false);
             //DownloadReport( "每月绩效统计--发客户超过一个月未完成案件", calMonth,false);
 
             //每月绩效统计--上个月递交完成案件

+ 3 - 3
wispro.sp.api/appsettings.json

@@ -27,10 +27,10 @@
   },
   "IPEasySetting": {
     "DownloadFileSavePath": "c:\\temp",
-    "isHeadless": "true",
+    "isHeadless": "false",
     "Account": "caiyangl",
     "Password": "j)wx*lier*@3",
-    "ChormeDriverPath": "D:\\source\\repos\\StaffPerformance\\packages\\ChormeDriver\\120.0.6099.109",
+    "ChormeDriverPath": "D:\\source\\repos\\StaffPerformance\\packages\\ChormeDriver\\123.0.6312.86",
     "ScheduleSetting": "00 55 15 16 * ? *",
     "IPEasyWeb": "http://47.106.94.35/Login.aspx"
   },
@@ -57,6 +57,6 @@
     "/Report/StaticsTrend": "[94]-[1],[128]-[7],[44]-[5],[2]-[7]"
   },
 
-  "Lastest_feedback_date": "25"
+  "Lastest_feedback_date": "28"
 
 }

+ 14 - 4
wispro.sp.utility/IPEasyUtility.cs

@@ -194,15 +194,22 @@ namespace wispro.sp.utility
 
                     if (isModifyDate)
                     {
-                        Log($"{DateTime.Now}\t输入报告时间");
+                        Log($"{DateTime.Now}\t点击编辑");
                         var btnEdit = driver.FindElement(By.ClassName("edit"));
                         btnEdit.Click();
                         System.Threading.Thread.Sleep(500);
 
-                        var doItemFinished = driver.FindElement(By.XPath("//span[contains(@objcvalue,'_date') and contains(@id,'ST;')]"));
-                        doItemFinished.Click();
-                        System.Threading.Thread.Sleep(500);
+                        Log($"{DateTime.Now}\t清除以选择的处理事项完成日条件");
+
+                        try
+                        {
+                            var doItemFinished = driver.FindElement(By.XPath("//span[contains(@objcvalue,'_date') and contains(@id,'ST;')]"));
+                            doItemFinished.Click();
+                            System.Threading.Thread.Sleep(500);
+                        }
+                        catch { }
 
+                        Log($"{DateTime.Now}\t输入处理事项完成日期:开始日期");
                         var startDate = driver.FindElement(By.XPath("//input[contains(@id,'dt_s_')]"));
 
                         startDate.Click();
@@ -210,15 +217,18 @@ namespace wispro.sp.utility
 
                         startDate.SendKeys(new DateTime(DateTime.Now.AddMonths(-1).Year, DateTime.Now.AddMonths(-1).Month, 1).ToString("yyyy-MM-dd"));
 
+                        Log($"{DateTime.Now}\t输入处理事项完成日期:结束日期");
                         var endDate = driver.FindElement(By.XPath("//input[contains(@id,'dt_e_')]"));//.Id("dt_e_4F8FE88D-9040-45F1-9723-45699BCD4CAF"));
                         endDate.Click();
                         System.Threading.Thread.Sleep(500);
                         endDate.SendKeys(new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).AddDays(-1).ToString("yyyy-MM-dd"));
 
+                        Log($"{DateTime.Now}\t添加处理事项检索条件");
                         var addDate = driver.FindElement(By.XPath("//a[contains(@onclick,'ReportSub.ConditionDTSelect')]"));
                         addDate.Click();
                         System.Threading.Thread.Sleep(500);
 
+                        Log($"{DateTime.Now}\t保存检索条件");
                         var btnSave = driver.FindElement(By.Id("save"));
                         btnSave.Click();
                         System.Threading.Thread.Sleep(3000);

+ 10 - 1
wispro.sp.web/Pages/Organization/Department.razor

@@ -51,7 +51,16 @@
             <Content>
                 <AntDesign.Layout Style=" padding: 0 24px 24px;">
                     <Content>
-                        <div><Button Type="primary" Icon="user-add" OnClick="()=>AddNewUser()" Style="float:right">添加人员</Button></div>
+                        <div>
+                            @if (_editDepartment != null && _editDepartment.Id > 0)
+                            {
+                                <Button Type="primary" Icon="user-add" OnClick="()=>AddNewUser()" Style="float:right">添加人员</Button>
+                            }
+                            else
+                            {
+                                <div Style="float:right;color:red;">添加人员,请先选择左边的部门!</div>
+                            }
+                        </div>
                         @if (_loading)
                         {
                             <center><Spin /></center>

+ 1 - 1
wispro.sp.web/wwwroot/appsettings.json

@@ -17,5 +17,5 @@
   },
 
   "APIUrl": "http://localhost:39476/api/",
-  "Latest_feedback_date": "25"
+  "Latest_feedback_date": "28"
 }

wispro.sp.winClient/App.config → wispro.sp.winClient - 副本/App.config


wispro.sp.winClient/Class1.cs → wispro.sp.winClient - 副本/Class1.cs


BIN
wispro.sp.winClient/ExcelFiles/20210903-威世博常用绩效点数计算规则-v2-lcy.xls


BIN
wispro.sp.winClient/ExcelFiles/20210903-威世博常用绩效点数计算规则-v3-lcy.xls


wispro.sp.winClient/ExcelFiles/20211109-绩效点数规则-lcy-v1.xlsx → wispro.sp.winClient - 副本/ExcelFiles/20211109-绩效点数规则-lcy-v1.xlsx


wispro.sp.winClient/ExcelFiles/21.01-21.06 工程师绩效报表-总表.xlsx → wispro.sp.winClient - 副本/ExcelFiles/21.01-21.06 工程师绩效报表-总表.xlsx


wispro.sp.winClient/ExcelFiles/210730-威世博人员清单v1r01-xm.xlsx → wispro.sp.winClient - 副本/ExcelFiles/210730-威世博人员清单v1r01-xm.xlsx


+ 178 - 0
wispro.sp.winClient - 副本/Form1.Designer.cs

@@ -0,0 +1,178 @@
+
+namespace wispro.sp.winClient
+{
+    partial class Form1
+    {
+        /// <summary>
+        ///  Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        ///  Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        ///  Required method for Designer support - do not modify
+        ///  the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.button1 = new System.Windows.Forms.Button();
+            this.button2 = new System.Windows.Forms.Button();
+            this.button3 = new System.Windows.Forms.Button();
+            this.button5 = new System.Windows.Forms.Button();
+            this.button6 = new System.Windows.Forms.Button();
+            this.button7 = new System.Windows.Forms.Button();
+            this.button4 = new System.Windows.Forms.Button();
+            this.button8 = new System.Windows.Forms.Button();
+            this.button9 = new System.Windows.Forms.Button();
+            this.SuspendLayout();
+            // 
+            // button1
+            // 
+            this.button1.Location = new System.Drawing.Point(61, 80);
+            this.button1.Margin = new System.Windows.Forms.Padding(4);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(304, 79);
+            this.button1.TabIndex = 0;
+            this.button1.Text = "合并反馈文档";
+            this.button1.UseVisualStyleBackColor = true;
+            this.button1.Click += new System.EventHandler(this.button1_Click);
+            // 
+            // button2
+            // 
+            this.button2.Location = new System.Drawing.Point(415, 80);
+            this.button2.Margin = new System.Windows.Forms.Padding(4);
+            this.button2.Name = "button2";
+            this.button2.Size = new System.Drawing.Size(304, 79);
+            this.button2.TabIndex = 0;
+            this.button2.Text = "输入绩效基本点数";
+            this.button2.UseVisualStyleBackColor = true;
+            this.button2.Click += new System.EventHandler(this.button2_Click);
+            // 
+            // button3
+            // 
+            this.button3.Location = new System.Drawing.Point(749, 80);
+            this.button3.Margin = new System.Windows.Forms.Padding(4);
+            this.button3.Name = "button3";
+            this.button3.Size = new System.Drawing.Size(304, 79);
+            this.button3.TabIndex = 0;
+            this.button3.Text = "计算绩效";
+            this.button3.UseVisualStyleBackColor = true;
+            this.button3.Click += new System.EventHandler(this.button3_Click);
+            // 
+            // button5
+            // 
+            this.button5.Location = new System.Drawing.Point(318, 186);
+            this.button5.Margin = new System.Windows.Forms.Padding(4);
+            this.button5.Name = "button5";
+            this.button5.Size = new System.Drawing.Size(202, 52);
+            this.button5.TabIndex = 1;
+            this.button5.Text = "获取绩效报表";
+            this.button5.UseVisualStyleBackColor = true;
+            this.button5.Click += new System.EventHandler(this.button5_Click);
+            // 
+            // button6
+            // 
+            this.button6.Location = new System.Drawing.Point(584, 186);
+            this.button6.Margin = new System.Windows.Forms.Padding(4);
+            this.button6.Name = "button6";
+            this.button6.Size = new System.Drawing.Size(202, 52);
+            this.button6.TabIndex = 1;
+            this.button6.Text = "更新绩效数据";
+            this.button6.UseVisualStyleBackColor = true;
+            this.button6.Click += new System.EventHandler(this.button6_Click);
+            // 
+            // button7
+            // 
+            this.button7.Location = new System.Drawing.Point(850, 186);
+            this.button7.Margin = new System.Windows.Forms.Padding(4);
+            this.button7.Name = "button7";
+            this.button7.Size = new System.Drawing.Size(202, 52);
+            this.button7.TabIndex = 1;
+            this.button7.Text = "发送疑似问题通知";
+            this.button7.UseVisualStyleBackColor = true;
+            this.button7.Click += new System.EventHandler(this.button7_Click);
+            // 
+            // button4
+            // 
+            this.button4.Location = new System.Drawing.Point(33, 184);
+            this.button4.Margin = new System.Windows.Forms.Padding(4);
+            this.button4.Name = "button4";
+            this.button4.Size = new System.Drawing.Size(252, 51);
+            this.button4.TabIndex = 2;
+            this.button4.Text = "重新计算季度考核信息";
+            this.button4.UseVisualStyleBackColor = true;
+            this.button4.Click += new System.EventHandler(this.button4_Click_1);
+            // 
+            // button8
+            // 
+            this.button8.Location = new System.Drawing.Point(329, 4);
+            this.button8.Margin = new System.Windows.Forms.Padding(4);
+            this.button8.Name = "button8";
+            this.button8.Size = new System.Drawing.Size(202, 52);
+            this.button8.TabIndex = 1;
+            this.button8.Text = "测试IPEasy";
+            this.button8.UseVisualStyleBackColor = true;
+            this.button8.Click += new System.EventHandler(this.button8_ClickAsync);
+            // 
+            // button9
+            // 
+            this.button9.Location = new System.Drawing.Point(607, 4);
+            this.button9.Margin = new System.Windows.Forms.Padding(4);
+            this.button9.Name = "button9";
+            this.button9.Size = new System.Drawing.Size(202, 52);
+            this.button9.TabIndex = 1;
+            this.button9.Text = "更新绩效数据";
+            this.button9.UseVisualStyleBackColor = true;
+            this.button9.Click += new System.EventHandler(this.button9_Click);
+            // 
+            // Form1
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(13F, 28F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1093, 251);
+            this.Controls.Add(this.button4);
+            this.Controls.Add(this.button7);
+            this.Controls.Add(this.button9);
+            this.Controls.Add(this.button8);
+            this.Controls.Add(this.button6);
+            this.Controls.Add(this.button5);
+            this.Controls.Add(this.button3);
+            this.Controls.Add(this.button2);
+            this.Controls.Add(this.button1);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
+            this.Margin = new System.Windows.Forms.Padding(4);
+            this.Name = "Form1";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "人力绩效计算工具";
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.Button button2;
+        private System.Windows.Forms.Button button3;
+        private System.Windows.Forms.Button button5;
+        private System.Windows.Forms.Button button6;
+        private System.Windows.Forms.Button button7;
+        private System.Windows.Forms.Button button4;
+        private System.Windows.Forms.Button button8;
+        private System.Windows.Forms.Button button9;
+    }
+}
+

Різницю між файлами не показано, бо вона завелика
+ 1504 - 0
wispro.sp.winClient - 副本/Form1.cs


+ 60 - 0
wispro.sp.winClient - 副本/Form1.resx

@@ -0,0 +1,60 @@
+<root>
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

wispro.sp.winClient/Form2.Designer.cs → wispro.sp.winClient - 副本/Form2.Designer.cs


wispro.sp.winClient/Form2.cs → wispro.sp.winClient - 副本/Form2.cs


Різницю між файлами не показано, бо вона завелика
+ 67 - 0
wispro.sp.winClient - 副本/IPEasyDownloader.cs


+ 23 - 0
wispro.sp.winClient - 副本/Program.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace wispro.sp.winClient
+{
+    static class Program
+    {
+        /// <summary>
+        ///  The main entry point for the application.
+        /// </summary>
+        [STAThread]
+        static void Main()
+        {
+            Application.SetHighDpiMode(HighDpiMode.SystemAware);
+            Application.EnableVisualStyles();
+            Application.SetCompatibleTextRenderingDefault(false);
+            Application.Run(new Form1());
+        }
+    }
+}

+ 20 - 0
wispro.sp.winClient - 副本/appsettings.json

@@ -0,0 +1,20 @@
+{
+  "IPEasySetting": {
+    "DownloadFileSavePath": "c:\\temp",
+    "isHeadless": "false",
+    "Account": "caiyangl",
+    "Password": "j)wx*lier*@3",
+    "ChormeDriverPath": "D:\\source\\repos\\StaffPerformance\\packages\\ChormeDriver\\119.0.6045.105",
+    "ScheduleSetting": "00 55 10 3 * ? *",
+    "IPEasyWeb": "http://47.106.94.35/Login.aspx"
+  },
+  "MailSetting": {
+    "Server": "smtp.exmail.qq.com",
+    "Port": "465",
+    "Account": "luocaiyang@china-wispro.com",
+    "Password": "Lqftiu807005",
+    "mail": "luocaiyang@china-wispro.com"
+
+  },
+  "InvalidDataMessageMails":"罗才洋|luocaiyang@china-wispro.com,何青瓦|heqingwa@china-wispro.com,钟子敏|zhongzimin@china-wispro.com,吴芳|wufang@china-wispro.com,邢丽霞|xinglixia@china-wispro.com,田婵玉|tianchanyu@china-wispro.com,周珊珊|zhoushanshan@china-wispro.com"
+}

+ 138 - 0
wispro.sp.winClient - 副本/frmMerageExcel.Designer.cs

@@ -0,0 +1,138 @@
+
+namespace wispro.sp.winClient
+{
+    partial class frmMerageExcel
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.label1 = new System.Windows.Forms.Label();
+            this.txtSaveFilePath = new System.Windows.Forms.TextBox();
+            this.button1 = new System.Windows.Forms.Button();
+            this.lstFiles = new System.Windows.Forms.ListBox();
+            this.button2 = new System.Windows.Forms.Button();
+            this.button3 = new System.Windows.Forms.Button();
+            this.button4 = new System.Windows.Forms.Button();
+            this.SuspendLayout();
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(48, 70);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(100, 24);
+            this.label1.TabIndex = 0;
+            this.label1.Text = "保存文件:";
+            this.label1.Click += new System.EventHandler(this.label1_Click);
+            // 
+            // txtSaveFilePath
+            // 
+            this.txtSaveFilePath.Location = new System.Drawing.Point(154, 67);
+            this.txtSaveFilePath.Name = "txtSaveFilePath";
+            this.txtSaveFilePath.Size = new System.Drawing.Size(661, 30);
+            this.txtSaveFilePath.TabIndex = 1;
+            // 
+            // button1
+            // 
+            this.button1.Location = new System.Drawing.Point(822, 65);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(112, 34);
+            this.button1.TabIndex = 2;
+            this.button1.Text = "浏览";
+            this.button1.UseVisualStyleBackColor = true;
+            this.button1.Click += new System.EventHandler(this.button1_Click);
+            // 
+            // lstFiles
+            // 
+            this.lstFiles.FormattingEnabled = true;
+            this.lstFiles.ItemHeight = 24;
+            this.lstFiles.Location = new System.Drawing.Point(48, 134);
+            this.lstFiles.Name = "lstFiles";
+            this.lstFiles.Size = new System.Drawing.Size(886, 484);
+            this.lstFiles.TabIndex = 3;
+            // 
+            // button2
+            // 
+            this.button2.Location = new System.Drawing.Point(48, 653);
+            this.button2.Name = "button2";
+            this.button2.Size = new System.Drawing.Size(160, 50);
+            this.button2.TabIndex = 4;
+            this.button2.Text = "添加文件";
+            this.button2.UseVisualStyleBackColor = true;
+            this.button2.Click += new System.EventHandler(this.button2_Click);
+            // 
+            // button3
+            // 
+            this.button3.Location = new System.Drawing.Point(589, 653);
+            this.button3.Name = "button3";
+            this.button3.Size = new System.Drawing.Size(160, 50);
+            this.button3.TabIndex = 4;
+            this.button3.Text = "取消";
+            this.button3.UseVisualStyleBackColor = true;
+            this.button3.Click += new System.EventHandler(this.button3_Click);
+            // 
+            // button4
+            // 
+            this.button4.Location = new System.Drawing.Point(774, 653);
+            this.button4.Name = "button4";
+            this.button4.Size = new System.Drawing.Size(160, 50);
+            this.button4.TabIndex = 4;
+            this.button4.Text = "开始合并";
+            this.button4.UseVisualStyleBackColor = true;
+            this.button4.Click += new System.EventHandler(this.button4_Click);
+            // 
+            // frmMerageExcel
+            // 
+            this.AcceptButton = this.button4;
+            this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.CancelButton = this.button3;
+            this.ClientSize = new System.Drawing.Size(991, 746);
+            this.Controls.Add(this.button4);
+            this.Controls.Add(this.button3);
+            this.Controls.Add(this.button2);
+            this.Controls.Add(this.lstFiles);
+            this.Controls.Add(this.button1);
+            this.Controls.Add(this.txtSaveFilePath);
+            this.Controls.Add(this.label1);
+            this.Name = "frmMerageExcel";
+            this.Text = "frmMerageExcel";
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.TextBox txtSaveFilePath;
+        private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.ListBox lstFiles;
+        private System.Windows.Forms.Button button2;
+        private System.Windows.Forms.Button button3;
+        private System.Windows.Forms.Button button4;
+    }
+}

+ 75 - 0
wispro.sp.winClient - 副本/frmMerageExcel.cs

@@ -0,0 +1,75 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace wispro.sp.winClient
+{
+    public partial class frmMerageExcel : Form
+    {
+        public frmMerageExcel()
+        {
+            InitializeComponent();
+        }
+
+        private void label1_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void button1_Click(object sender, EventArgs e)
+        {
+            FolderBrowserDialog fbd = new FolderBrowserDialog();
+
+            if (fbd.ShowDialog() == DialogResult.OK)
+            {
+                txtSaveFilePath.Text = System.IO.Path.Combine(fbd.SelectedPath, $"{DateTime.Now.ToString("yyyyMMdd")}-{DateTime.Now.Month - 1}月份绩效计算案件清单.xlsx");
+            }
+        }
+
+        private void button2_Click(object sender, EventArgs e)
+        {
+            OpenFileDialog ofd = new OpenFileDialog()
+            {
+                Multiselect = true,
+                Filter = "Excel文件|*.xls;*.xlsx|全部文件|*.*"
+            };
+
+            if (ofd.ShowDialog() == DialogResult.OK)
+            {
+                lstFiles.Items.AddRange(ofd.FileNames);
+            }
+        }
+
+        public string SaveFilePath { get; set; }
+        private void button4_Click(object sender, EventArgs e)
+        {
+            if (!string.IsNullOrEmpty(txtSaveFilePath.Text) && lstFiles.Items.Count > 0)
+            {
+
+                string[] files = new string[lstFiles.Items.Count];
+                for (int i = 0; i < lstFiles.Items.Count; i++)
+                {
+                    files[i] = lstFiles.Items[i].ToString();
+                }
+
+                new wispro.sp.utility.ExcelHelper().MerageExcel(txtSaveFilePath.Text, files);
+                SaveFilePath = txtSaveFilePath.Text;
+            }
+
+            this.DialogResult = DialogResult.OK;
+            this.Close();
+        }
+
+        private void button3_Click(object sender, EventArgs e)
+        {
+            this.DialogResult = DialogResult.Cancel;
+            this.Close();
+        }
+    }
+}

+ 60 - 0
wispro.sp.winClient - 副本/frmMerageExcel.resx

@@ -0,0 +1,60 @@
+<root>
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 76 - 0
wispro.sp.winClient - 副本/wispro.sp.winClient.csproj

@@ -0,0 +1,76 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <OutputType>WinExe</OutputType>
+    <TargetFramework>net5.0-windows</TargetFramework>
+    <UseWindowsForms>true</UseWindowsForms>
+    <StartupObject>wispro.sp.winClient.Program</StartupObject>
+    <PublishSingleFile>true</PublishSingleFile>
+    <RuntimeIdentifier>win-x64</RuntimeIdentifier>
+    <IncludeContentInSingleFile>true</IncludeContentInSingleFile>
+    <SelfContained>true</SelfContained>
+    <!--启用使用assemby修剪-仅支持自包含应用程序-->
+    <PublishTrimmed> true </PublishTrimmed>
+    <SignAssembly>false</SignAssembly>
+    <Platforms>AnyCPU;x64;x86</Platforms>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
+    <Optimize>True</Optimize>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Optimize>True</Optimize>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
+    <Optimize>True</Optimize>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <None Remove="appsettings.json" />
+    <None Remove="ExcelFiles\20210903-威世博常用绩效点数计算规则-v2-lcy.xls" />
+    <None Remove="ExcelFiles\20210903-威世博常用绩效点数计算规则-v3-lcy.xls" />
+    <None Remove="ExcelFiles\20211109-绩效点数规则-lcy-v1.xlsx" />
+  </ItemGroup>
+
+  <ItemGroup>
+    <Content Include="appsettings.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="ExcelFiles\20211109-绩效点数规则-lcy-v1.xlsx">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+
+  <ItemGroup>
+    <PackageReference Include="DynamicExpresso.Core" Version="2.9.3" />
+    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.9">
+      <PrivateAssets>all</PrivateAssets>
+      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
+    </PackageReference>
+    <PackageReference Include="NPOI" Version="2.5.4" />
+    <PackageReference Include="PinYinConverterCore" Version="1.0.2" />
+    <PackageReference Include="Svg" Version="3.3.0" />
+  </ItemGroup>
+
+  <ItemGroup>
+    <ProjectReference Include="..\wispro.sp.share\wispro.sp.share.csproj" />
+    <ProjectReference Include="..\wispro.sp.utility\wispro.sp.utility.csproj" />
+    <ProjectReference Include="..\wospro.sp.entity\wispro.sp.entity.csproj" />
+  </ItemGroup>
+
+  <ItemGroup>
+    <None Update="ExcelFiles\21.01-21.06 工程师绩效报表-总表.xlsx">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="ExcelFiles\210730-威世博人员清单v1r01-xm.xlsx">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+  </ItemGroup>
+
+  <ItemGroup>
+    <Folder Include="Properties\" />
+  </ItemGroup>
+
+</Project>

+ 90 - 105
wispro.sp.winClient/Form1.Designer.cs

@@ -29,137 +29,123 @@ namespace wispro.sp.winClient
         /// </summary>
         private void InitializeComponent()
         {
-            this.button1 = new System.Windows.Forms.Button();
-            this.button2 = new System.Windows.Forms.Button();
-            this.button3 = new System.Windows.Forms.Button();
-            this.button5 = new System.Windows.Forms.Button();
-            this.button6 = new System.Windows.Forms.Button();
-            this.button7 = new System.Windows.Forms.Button();
-            this.button4 = new System.Windows.Forms.Button();
-            this.button8 = new System.Windows.Forms.Button();
-            this.button9 = new System.Windows.Forms.Button();
-            this.SuspendLayout();
+            button1 = new System.Windows.Forms.Button();
+            button2 = new System.Windows.Forms.Button();
+            button3 = new System.Windows.Forms.Button();
+            button5 = new System.Windows.Forms.Button();
+            button6 = new System.Windows.Forms.Button();
+            button7 = new System.Windows.Forms.Button();
+            button4 = new System.Windows.Forms.Button();
+            button9 = new System.Windows.Forms.Button();
+            SuspendLayout();
             // 
             // button1
             // 
-            this.button1.Location = new System.Drawing.Point(61, 80);
-            this.button1.Margin = new System.Windows.Forms.Padding(4);
-            this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(304, 79);
-            this.button1.TabIndex = 0;
-            this.button1.Text = "合并反馈文档";
-            this.button1.UseVisualStyleBackColor = true;
-            this.button1.Click += new System.EventHandler(this.button1_Click);
+            button1.Location = new System.Drawing.Point(61, 80);
+            button1.Margin = new System.Windows.Forms.Padding(4);
+            button1.Name = "button1";
+            button1.Size = new System.Drawing.Size(304, 79);
+            button1.TabIndex = 0;
+            button1.Text = "合并反馈文档";
+            button1.UseVisualStyleBackColor = true;
+            button1.Click += button1_Click;
             // 
             // button2
             // 
-            this.button2.Location = new System.Drawing.Point(415, 80);
-            this.button2.Margin = new System.Windows.Forms.Padding(4);
-            this.button2.Name = "button2";
-            this.button2.Size = new System.Drawing.Size(304, 79);
-            this.button2.TabIndex = 0;
-            this.button2.Text = "输入绩效基本点数";
-            this.button2.UseVisualStyleBackColor = true;
-            this.button2.Click += new System.EventHandler(this.button2_Click);
+            button2.Location = new System.Drawing.Point(415, 80);
+            button2.Margin = new System.Windows.Forms.Padding(4);
+            button2.Name = "button2";
+            button2.Size = new System.Drawing.Size(304, 79);
+            button2.TabIndex = 0;
+            button2.Text = "输入绩效基本点数";
+            button2.UseVisualStyleBackColor = true;
+            button2.Click += button2_Click;
             // 
             // button3
             // 
-            this.button3.Location = new System.Drawing.Point(749, 80);
-            this.button3.Margin = new System.Windows.Forms.Padding(4);
-            this.button3.Name = "button3";
-            this.button3.Size = new System.Drawing.Size(304, 79);
-            this.button3.TabIndex = 0;
-            this.button3.Text = "计算绩效";
-            this.button3.UseVisualStyleBackColor = true;
-            this.button3.Click += new System.EventHandler(this.button3_Click);
+            button3.Location = new System.Drawing.Point(749, 80);
+            button3.Margin = new System.Windows.Forms.Padding(4);
+            button3.Name = "button3";
+            button3.Size = new System.Drawing.Size(304, 79);
+            button3.TabIndex = 0;
+            button3.Text = "计算绩效";
+            button3.UseVisualStyleBackColor = true;
+            button3.Click += button3_Click;
             // 
             // button5
             // 
-            this.button5.Location = new System.Drawing.Point(318, 186);
-            this.button5.Margin = new System.Windows.Forms.Padding(4);
-            this.button5.Name = "button5";
-            this.button5.Size = new System.Drawing.Size(202, 52);
-            this.button5.TabIndex = 1;
-            this.button5.Text = "获取绩效报表";
-            this.button5.UseVisualStyleBackColor = true;
-            this.button5.Click += new System.EventHandler(this.button5_Click);
+            button5.Location = new System.Drawing.Point(318, 186);
+            button5.Margin = new System.Windows.Forms.Padding(4);
+            button5.Name = "button5";
+            button5.Size = new System.Drawing.Size(202, 52);
+            button5.TabIndex = 1;
+            button5.Text = "获取绩效报表";
+            button5.UseVisualStyleBackColor = true;
+            button5.Click += button5_Click;
             // 
             // button6
             // 
-            this.button6.Location = new System.Drawing.Point(584, 186);
-            this.button6.Margin = new System.Windows.Forms.Padding(4);
-            this.button6.Name = "button6";
-            this.button6.Size = new System.Drawing.Size(202, 52);
-            this.button6.TabIndex = 1;
-            this.button6.Text = "更新绩效数据";
-            this.button6.UseVisualStyleBackColor = true;
-            this.button6.Click += new System.EventHandler(this.button6_Click);
+            button6.Location = new System.Drawing.Point(584, 186);
+            button6.Margin = new System.Windows.Forms.Padding(4);
+            button6.Name = "button6";
+            button6.Size = new System.Drawing.Size(202, 52);
+            button6.TabIndex = 1;
+            button6.Text = "更新绩效数据";
+            button6.UseVisualStyleBackColor = true;
+            button6.Click += button6_Click;
             // 
             // button7
             // 
-            this.button7.Location = new System.Drawing.Point(850, 186);
-            this.button7.Margin = new System.Windows.Forms.Padding(4);
-            this.button7.Name = "button7";
-            this.button7.Size = new System.Drawing.Size(202, 52);
-            this.button7.TabIndex = 1;
-            this.button7.Text = "发送疑似问题通知";
-            this.button7.UseVisualStyleBackColor = true;
-            this.button7.Click += new System.EventHandler(this.button7_Click);
+            button7.Location = new System.Drawing.Point(850, 186);
+            button7.Margin = new System.Windows.Forms.Padding(4);
+            button7.Name = "button7";
+            button7.Size = new System.Drawing.Size(202, 52);
+            button7.TabIndex = 1;
+            button7.Text = "发送疑似问题通知";
+            button7.UseVisualStyleBackColor = true;
+            button7.Click += button7_Click;
             // 
             // button4
             // 
-            this.button4.Location = new System.Drawing.Point(33, 184);
-            this.button4.Margin = new System.Windows.Forms.Padding(4);
-            this.button4.Name = "button4";
-            this.button4.Size = new System.Drawing.Size(252, 51);
-            this.button4.TabIndex = 2;
-            this.button4.Text = "重新计算季度考核信息";
-            this.button4.UseVisualStyleBackColor = true;
-            this.button4.Click += new System.EventHandler(this.button4_Click_1);
-            // 
-            // button8
-            // 
-            this.button8.Location = new System.Drawing.Point(329, 4);
-            this.button8.Margin = new System.Windows.Forms.Padding(4);
-            this.button8.Name = "button8";
-            this.button8.Size = new System.Drawing.Size(202, 52);
-            this.button8.TabIndex = 1;
-            this.button8.Text = "测试IPEasy";
-            this.button8.UseVisualStyleBackColor = true;
-            this.button8.Click += new System.EventHandler(this.button8_ClickAsync);
+            button4.Location = new System.Drawing.Point(33, 184);
+            button4.Margin = new System.Windows.Forms.Padding(4);
+            button4.Name = "button4";
+            button4.Size = new System.Drawing.Size(252, 51);
+            button4.TabIndex = 2;
+            button4.Text = "重新计算季度考核信息";
+            button4.UseVisualStyleBackColor = true;
+            button4.Click += button4_Click_1;
             // 
             // button9
             // 
-            this.button9.Location = new System.Drawing.Point(607, 4);
-            this.button9.Margin = new System.Windows.Forms.Padding(4);
-            this.button9.Name = "button9";
-            this.button9.Size = new System.Drawing.Size(202, 52);
-            this.button9.TabIndex = 1;
-            this.button9.Text = "更新绩效数据";
-            this.button9.UseVisualStyleBackColor = true;
-            this.button9.Click += new System.EventHandler(this.button9_Click);
+            button9.Location = new System.Drawing.Point(607, 4);
+            button9.Margin = new System.Windows.Forms.Padding(4);
+            button9.Name = "button9";
+            button9.Size = new System.Drawing.Size(269, 52);
+            button9.TabIndex = 1;
+            button9.Text = "获取一次OA授权数据";
+            button9.UseVisualStyleBackColor = true;
+            button9.Click += button9_Click;
             // 
             // Form1
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(13F, 28F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1093, 251);
-            this.Controls.Add(this.button4);
-            this.Controls.Add(this.button7);
-            this.Controls.Add(this.button9);
-            this.Controls.Add(this.button8);
-            this.Controls.Add(this.button6);
-            this.Controls.Add(this.button5);
-            this.Controls.Add(this.button3);
-            this.Controls.Add(this.button2);
-            this.Controls.Add(this.button1);
-            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
-            this.Margin = new System.Windows.Forms.Padding(4);
-            this.Name = "Form1";
-            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
-            this.Text = "人力绩效计算工具";
-            this.ResumeLayout(false);
-
+            AutoScaleDimensions = new System.Drawing.SizeF(13F, 28F);
+            AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            ClientSize = new System.Drawing.Size(1093, 251);
+            Controls.Add(button4);
+            Controls.Add(button7);
+            Controls.Add(button9);
+            Controls.Add(button6);
+            Controls.Add(button5);
+            Controls.Add(button3);
+            Controls.Add(button2);
+            Controls.Add(button1);
+            FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
+            Margin = new System.Windows.Forms.Padding(4);
+            Name = "Form1";
+            StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            Text = "人力绩效计算工具";
+            ResumeLayout(false);
         }
 
         #endregion
@@ -171,7 +157,6 @@ namespace wispro.sp.winClient
         private System.Windows.Forms.Button button6;
         private System.Windows.Forms.Button button7;
         private System.Windows.Forms.Button button4;
-        private System.Windows.Forms.Button button8;
         private System.Windows.Forms.Button button9;
     }
 }

+ 15 - 75
wispro.sp.winClient/Form1.cs

@@ -1,7 +1,4 @@
-using AntDesign;
-using DynamicExpresso;
-using Microsoft.International.Converters.PinYinConverter;
-using System;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Configuration;
@@ -109,64 +106,7 @@ namespace wispro.sp.winClient
             "专利权人发明人申请人信息变更+代理所变更"
         };
 
-        private async Task InitRules(bool isSave)
-        {
-            List<BasePointRule> rules = new List<BasePointRule>();
-            DataTable dt = wispro.sp.utility.NPOIExcel.ExcelToDataTable("ExcelFiles\\20211109-绩效点数规则-lcy-v1.xlsx", true);
-
-            PerformanceItem item = new PerformanceItem() { CaseNo = "PAEPO2016277", DoItem= "提交检索主题声明", };
-            foreach(DataRow row in dt.Rows)
-            {
-                BasePointRule rule = new BasePointRule()
-                {
-                    Rule = row["规则"].ToString(),
-                    PointExpress = row["点数计算"].ToString(),
-                    Priority = int.Parse(row["优先级修订"].ToString()),
-                    Type = row["类型"].ToString()
-
-                };
-
-                try
-                {
-                    var interpreter = new Interpreter();
-
-                    
-                    //item.ApplicationType
-                    Func<PerformanceItem, bool> func = interpreter.ParseAsDelegate<Func<PerformanceItem, bool>>(rule.Rule, "p");
-
-                    bool result = func.Invoke(item);
-
-                    if (result)
-                    {
-                        item.BasePoint = (double?)interpreter.Eval(rule.PointExpress);
-                        item.Type = rule.Type;
-                        System.Diagnostics.Debug.WriteLine("");
-                    }
-
-                    rules.Add(rule);
-                }
-                catch(Exception ex)
-                {
-                    System.Diagnostics.Debug.WriteLine(rule.Rule  + "\r\n" + ex.ToString());
-                }
-
-                
-            }
-
-            if (isSave)
-            {
-                foreach (BasePointRule rule in rules)
-                {
-                    double d;
-                    if(double.TryParse(rule.PointExpress,out d))
-                    {
-                        rule.PointExpress = d.ToString("0.00");
-                    }
-                    await SaveBasePointRule(rule);
-                }
-            }
-        }
-
+       
         public async Task TestQueryFilter()
         {
             //QueryFilter filter = new QueryFilter();
@@ -951,17 +891,17 @@ namespace wispro.sp.winClient
         {
             string retStr = "";
             
-            for(int i = 0; i < str.Length; i++)
-            {
-                ChineseChar cc = new ChineseChar(str[i]);
+            //for(int i = 0; i < str.Length; i++)
+            //{
+            //    ChineseChar cc = new ChineseChar(str[i]);
                
-                retStr = retStr + cc.Pinyins[0].ToLower().Replace("1","")
-                    .Replace("2", "").Replace("3", "").Replace("4", "");
-            }
+            //    retStr = retStr + cc.Pinyins[0].ToLower().Replace("1","")
+            //        .Replace("2", "").Replace("3", "").Replace("4", "");
+            //}
             return retStr;
         }
 
-        string strAPIBaseUri = "http://localhost:8080"; // "http://1.116.113.26:81";//   "http://47.106.221.167:8081"; //  
+        string strAPIBaseUri = "http://1.116.113.26:81";// "http://localhost:39476"; //    "http://47.106.221.167:8081"; //  
 
         userToken Token;
 
@@ -1137,10 +1077,10 @@ namespace wispro.sp.winClient
         {
             HttpClient http = CreateHttp();
             http.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("bearer", Token.Token);
-            if (obj.CalMonth.Month == 10)
-            {
-                System.Diagnostics.Debug.WriteLine($"{obj.CalMonth.Year}-{obj.CalMonth.Month}\t{obj.CaseNo}");
-            }
+            //if (obj.CalMonth.Month == 10)
+            //{
+            //    System.Diagnostics.Debug.WriteLine($"{obj.CalMonth.Year}-{obj.CalMonth.Month}\t{obj.CaseNo}");
+            //}
             
 
             var isExist = await http.PostAsJsonAsync<PerformanceItem>($"{strAPIBaseUri}/api/PerformanceItem/IsExist", obj);
@@ -1496,9 +1436,9 @@ namespace wispro.sp.winClient
 
             HttpClient http = CreateHttp();//
             http.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("bearer", Token.Token);
-            var data = await http.GetFromJsonAsync<ApiSaveResponse>($"{strAPIBaseUri}/api/PerformanceItem/UpdateOAStaff");
-
+            //var data = await http.GetFromJsonAsync<ApiSaveResponse>($"{strAPIBaseUri}/api/PerformanceItem/UpdateOAStaff");
 
+            await http.GetAsync($"{strAPIBaseUri}/api/PerformanceItem/ImportJXData?dataType=1");
         }
     }
 }

+ 61 - 1
wispro.sp.winClient/Form1.resx

@@ -1,4 +1,64 @@
-<root>
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!--
+    Microsoft ResX Schema 
+
+    Version 2.0
+
+    The primary goals of this format is to allow a simple XML format
+    that is mostly human readable. The generation and parsing of the
+    various data types are done through the TypeConverter classes
+    associated with the data types.
+
+    Example:
+
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+
+    There are any number of "resheader" rows that contain simple
+    name/value pairs.
+
+    Each data row contains a name, and value. The row also contains a
+    type or mimetype. Type corresponds to a .NET class that support
+    text/value conversion through the TypeConverter architecture.
+    Classes that don't support this are serialized and stored with the
+    mimetype set.
+
+    The mimetype is used for serialized objects, and tells the
+    ResXResourceReader how to depersist the object. This is currently not
+    extensible. For a given mimetype the value must be set accordingly:
+
+    Note - application/x-microsoft.net.object.binary.base64 is the format
+    that the ResXResourceWriter will generate, however the reader can
+    read any of the formats listed below.
+
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
   <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
     <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
     <xsd:element name="root" msdata:IsDataSet="true">

+ 3 - 61
wispro.sp.winClient/wispro.sp.winClient.csproj

@@ -3,74 +3,16 @@
   <PropertyGroup>
     <OutputType>WinExe</OutputType>
     <TargetFramework>net5.0-windows</TargetFramework>
+    <Nullable>enable</Nullable>
     <UseWindowsForms>true</UseWindowsForms>
-    <StartupObject>wispro.sp.winClient.Program</StartupObject>
-    <PublishSingleFile>true</PublishSingleFile>
-    <RuntimeIdentifier>win-x64</RuntimeIdentifier>
-    <IncludeContentInSingleFile>true</IncludeContentInSingleFile>
-    <SelfContained>true</SelfContained>
-    <!--启用使用assemby修剪-仅支持自包含应用程序-->
-    <PublishTrimmed> true </PublishTrimmed>
-    <SignAssembly>false</SignAssembly>
-    <Platforms>AnyCPU;x64;x86</Platforms>
-  </PropertyGroup>
-
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
-    <Optimize>True</Optimize>
-  </PropertyGroup>
-
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <Optimize>True</Optimize>
-  </PropertyGroup>
-
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
-    <Optimize>True</Optimize>
   </PropertyGroup>
 
   <ItemGroup>
-    <None Remove="appsettings.json" />
-    <None Remove="ExcelFiles\20210903-威世博常用绩效点数计算规则-v2-lcy.xls" />
-    <None Remove="ExcelFiles\20210903-威世博常用绩效点数计算规则-v3-lcy.xls" />
-    <None Remove="ExcelFiles\20211109-绩效点数规则-lcy-v1.xlsx" />
-  </ItemGroup>
-
-  <ItemGroup>
-    <Content Include="appsettings.json">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="ExcelFiles\20211109-绩效点数规则-lcy-v1.xlsx">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-  </ItemGroup>
-
-  <ItemGroup>
-    <PackageReference Include="DynamicExpresso.Core" Version="2.9.3" />
-    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.9">
-      <PrivateAssets>all</PrivateAssets>
-      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
-    </PackageReference>
-    <PackageReference Include="NPOI" Version="2.5.4" />
-    <PackageReference Include="PinYinConverterCore" Version="1.0.2" />
-    <PackageReference Include="Svg" Version="3.3.0" />
-  </ItemGroup>
-
-  <ItemGroup>
+    <ProjectReference Include="..\wispro.sp.api\wispro.sp.api.csproj" />
+    <ProjectReference Include="..\wispro.sp.ipeasyApi\wispro.sp.ipeasyApi.csproj" />
     <ProjectReference Include="..\wispro.sp.share\wispro.sp.share.csproj" />
     <ProjectReference Include="..\wispro.sp.utility\wispro.sp.utility.csproj" />
     <ProjectReference Include="..\wospro.sp.entity\wispro.sp.entity.csproj" />
   </ItemGroup>
 
-  <ItemGroup>
-    <None Update="ExcelFiles\21.01-21.06 工程师绩效报表-总表.xlsx">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Update="ExcelFiles\210730-威世博人员清单v1r01-xm.xlsx">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
-
-  <ItemGroup>
-    <Folder Include="Properties\" />
-  </ItemGroup>
-
 </Project>