zoulei 11 kuukautta sitten
vanhempi
commit
73131e7e18

+ 53 - 0
Service/ClearServiceData/ClearServiceData.csproj

@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{4B3968F4-BA71-4612-A0DF-48D724C385A2}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>ClearServiceData</RootNamespace>
+    <AssemblyName>服务数据清理</AssemblyName>
+    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <PropertyGroup>
+    <PostBuildEvent>xcopy *.exe ..\..\..\..\XdCxRhDW.App\bin\Debug /sey</PostBuildEvent>
+  </PropertyGroup>
+</Project>

+ 32 - 0
Service/ClearServiceData/Program.cs

@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ClearServiceData
+{
+    internal class Program
+    {
+        static void Main(string[] args)
+        {
+            var dir1 = Directory.GetDirectories(".\\Service\\", "*Logs", SearchOption.AllDirectories);
+            var dir2 = Directory.GetDirectories(".\\Service\\", "*wwwroot", SearchOption.AllDirectories);
+            var dir3 = Directory.GetDirectories(".\\Service\\", "*tmp", SearchOption.AllDirectories);
+            var dirs = dir1.Concat(dir2).Concat(dir3);
+            foreach (var dir in dirs)
+            {
+                try
+                {
+                    Directory.Delete(dir,true);
+                    Console.WriteLine(dir);
+                }
+                catch
+                { }
+            }
+            Console.WriteLine("清理完成,回车结束!");
+            Console.ReadLine();
+        }
+    }
+}

+ 36 - 0
Service/ClearServiceData/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("ClearServicData")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("ClearServicData")]
+[assembly: AssemblyCopyright("Copyright ©  2024")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 false 会使此程序集中的类型
+//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
+[assembly: Guid("4b3968f4-ba71-4612-a0df-48d724c385a2")]
+
+// 程序集的版本信息由下列四个值组成: 
+//
+//      主版本
+//      次版本
+//      生成号
+//      修订号
+//
+//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
+//通过使用 "*",如下所示:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 2 - 1
XdCxRhDW.App/XdCxRhDW.App.csproj

@@ -715,7 +715,8 @@ rmdir 信号仿真 /S/Q
   <Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
   <Import Project="..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.118.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.118.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" />
   <PropertyGroup>
-    <PreBuildEvent>wmic process where name='信号检测服务.exe' delete
+    <PreBuildEvent>wmic process where name='参估编批服务.exe' delete
+wmic process where name='信号检测服务.exe' delete
 wmic process where name='CPU参估服务.exe' delete
 wmic process where name='GPU参估服务.exe' delete
 wmic process where name='低轨单星数据处理服务.exe' delete

+ 7 - 0
XdCxRhDW54.sln

@@ -39,6 +39,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "X3TaskServer54", "Service\X
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CgDbScan", "Service\CgDbScan\CgDbScan.csproj", "{ACEA6A7F-E7CF-48AE-B871-B12997E4032E}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClearServiceData", "Service\ClearServiceData\ClearServiceData.csproj", "{4B3968F4-BA71-4612-A0DF-48D724C385A2}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -113,6 +115,10 @@ Global
 		{ACEA6A7F-E7CF-48AE-B871-B12997E4032E}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{ACEA6A7F-E7CF-48AE-B871-B12997E4032E}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{ACEA6A7F-E7CF-48AE-B871-B12997E4032E}.Release|Any CPU.Build.0 = Release|Any CPU
+		{4B3968F4-BA71-4612-A0DF-48D724C385A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{4B3968F4-BA71-4612-A0DF-48D724C385A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{4B3968F4-BA71-4612-A0DF-48D724C385A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{4B3968F4-BA71-4612-A0DF-48D724C385A2}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -128,6 +134,7 @@ Global
 		{1EA56810-0B15-4311-9F6B-69D3D660CBA7} = {3EB6F47A-A57D-4468-B4BE-3A63E13B692D}
 		{31871C1B-8855-4FE4-A549-DB5506C7BE0B} = {3EB6F47A-A57D-4468-B4BE-3A63E13B692D}
 		{ACEA6A7F-E7CF-48AE-B871-B12997E4032E} = {3EB6F47A-A57D-4468-B4BE-3A63E13B692D}
+		{4B3968F4-BA71-4612-A0DF-48D724C385A2} = {3EB6F47A-A57D-4468-B4BE-3A63E13B692D}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {657E89B6-AB65-4E75-965C-06D70796CB71}