개정판 a5e5fff6
issue #0000 convert service의 entity를 dapper로 변경
Change-Id: I13069095813cf5dd7d7c79c7f17839682aed4fe1
ConvertService/ServiceBase/ConnectionStringBuild/App.config | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?>
|
|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 | 2 |
<configuration> |
3 | 3 |
<configSections> |
4 | 4 |
|
5 | 5 |
|
6 |
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
|
6 |
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/> |
|
7 | 7 |
</configSections> |
8 | 8 |
<startup> |
9 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
|
|
9 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
|
|
10 | 10 |
</startup> |
11 | 11 |
<entityFramework> |
12 |
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
|
|
12 |
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/> |
|
13 | 13 |
<providers> |
14 |
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
|
14 |
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/> |
|
15 | 15 |
</providers> |
16 | 16 |
</entityFramework> |
17 |
</configuration> |
|
17 |
</configuration> |
ConvertService/ServiceBase/ConnectionStringBuild/ConnectionStringBuild.csproj | ||
---|---|---|
8 | 8 |
<OutputType>WinExe</OutputType> |
9 | 9 |
<RootNamespace>ConnectionStringBuild</RootNamespace> |
10 | 10 |
<AssemblyName>ConnectionStringBuild</AssemblyName> |
11 |
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
|
11 |
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
|
12 | 12 |
<FileAlignment>512</FileAlignment> |
13 | 13 |
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> |
14 | 14 |
<WarningLevel>4</WarningLevel> |
... | ... | |
16 | 16 |
<TargetFrameworkProfile /> |
17 | 17 |
<NuGetPackageImportStamp> |
18 | 18 |
</NuGetPackageImportStamp> |
19 |
<IsWebBootstrapper>false</IsWebBootstrapper> |
|
20 |
<PublishUrl>게시\</PublishUrl> |
|
21 |
<Install>true</Install> |
|
22 |
<InstallFrom>Disk</InstallFrom> |
|
23 |
<UpdateEnabled>false</UpdateEnabled> |
|
24 |
<UpdateMode>Foreground</UpdateMode> |
|
25 |
<UpdateInterval>7</UpdateInterval> |
|
26 |
<UpdateIntervalUnits>Days</UpdateIntervalUnits> |
|
27 |
<UpdatePeriodically>false</UpdatePeriodically> |
|
28 |
<UpdateRequired>false</UpdateRequired> |
|
29 |
<MapFileExtensions>true</MapFileExtensions> |
|
30 |
<ApplicationRevision>0</ApplicationRevision> |
|
31 |
<ApplicationVersion>1.0.0.%2a</ApplicationVersion> |
|
32 |
<UseApplicationTrust>false</UseApplicationTrust> |
|
33 |
<BootstrapperEnabled>true</BootstrapperEnabled> |
|
19 | 34 |
</PropertyGroup> |
20 | 35 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
21 | 36 |
<PlatformTarget>x64</PlatformTarget> |
... | ... | |
113 | 128 |
<Project>{4A465FD0-8130-4D6B-A65F-C3CD6CC355A4}</Project> |
114 | 129 |
<Name>Markus.Service.Interface</Name> |
115 | 130 |
</ProjectReference> |
116 |
<ProjectReference Include="..\Markus.Service.DataBase\Markus.Service.DataBase.csproj">
|
|
117 |
<Project>{400736fb-92c9-4bc0-b447-e8274103d813}</Project>
|
|
118 |
<Name>Markus.Service.DataBase</Name> |
|
131 |
<ProjectReference Include="..\Markus.Service.DataBase.Dapper\Markus.Service.DataBase.Dapper.csproj">
|
|
132 |
<Project>{f835dd07-7f0c-4dbd-a596-f3110d187421}</Project>
|
|
133 |
<Name>Markus.Service.DataBase.Dapper</Name>
|
|
119 | 134 |
</ProjectReference> |
120 | 135 |
<ProjectReference Include="..\Markus.Service.Extensions\Markus.Service.Extensions.csproj"> |
121 | 136 |
<Project>{5f983789-3e8f-4f9a-a601-138c3a83ca5f}</Project> |
... | ... | |
123 | 138 |
</ProjectReference> |
124 | 139 |
</ItemGroup> |
125 | 140 |
<ItemGroup> |
126 |
<PackageReference Include="EntityFramework"> |
|
127 |
<Version>6.4.4</Version> |
|
128 |
</PackageReference> |
|
129 |
<PackageReference Include="Markus.EntityModel"> |
|
130 |
<Version>1.0.0</Version> |
|
131 |
</PackageReference> |
|
132 | 141 |
<PackageReference Include="Microsoft.CSharp"> |
133 | 142 |
<Version>4.5.0</Version> |
134 | 143 |
</PackageReference> |
135 | 144 |
</ItemGroup> |
145 |
<ItemGroup> |
|
146 |
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> |
|
147 |
<Visible>False</Visible> |
|
148 |
<ProductName>.NET Framework 3.5 SP1</ProductName> |
|
149 |
<Install>false</Install> |
|
150 |
</BootstrapperPackage> |
|
151 |
</ItemGroup> |
|
136 | 152 |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
137 | 153 |
</Project> |
ConvertService/ServiceBase/ConnectionStringBuild/MainWindow.xaml.cs | ||
---|---|---|
13 | 13 |
using System.Windows.Navigation; |
14 | 14 |
using System.Windows.Shapes; |
15 | 15 |
using Markus.Service; |
16 |
using Markus.Service.DataBase.Repositories; |
|
16 | 17 |
using Markus.Service.Extensions; |
17 | 18 |
using Markus.Service.Helper; |
18 | 19 |
using static Markus.Service.Extensions.Encrypt; |
... | ... | |
42 | 43 |
|
43 | 44 |
} |
44 | 45 |
|
45 |
private void ButtonTest_Click(object sender, RoutedEventArgs e) |
|
46 |
private async void ButtonTest_Click(object sender, RoutedEventArgs e)
|
|
46 | 47 |
{ |
47 | 48 |
try |
48 | 49 |
{ |
49 |
using (Markus.Service.DataBase.ConvertDatabase database = new Markus.Service.DataBase.ConvertDatabase(txtDecrypt.Text))
|
|
50 |
using (ConvertDocRepository database = new ConvertDocRepository(txtDecrypt.Text))
|
|
50 | 51 |
{ |
51 |
var result = database.GetWaitConvertItems(new List<string>(),30).ToList();
|
|
52 |
var result = await database.GetConvertDocAsync((int)Markus.Message.StatusCodeType.Wait);
|
|
52 | 53 |
|
53 |
txtLog.Text += "Test Ok" + result.Count().ToString(); |
|
54 |
txtLog.Text += "Test Ok" + result.Count().ToString();
|
|
54 | 55 |
} |
55 | 56 |
} |
56 | 57 |
catch (Exception ex) |
ConvertService/ServiceBase/ConvertResultBSENG/ConvertResultBSENG.csproj | ||
---|---|---|
9 | 9 |
<AppDesignerFolder>Properties</AppDesignerFolder> |
10 | 10 |
<RootNamespace>ConvertResultBSENG</RootNamespace> |
11 | 11 |
<AssemblyName>ConvertResultBSENG</AssemblyName> |
12 |
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
|
12 |
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
|
13 | 13 |
<FileAlignment>512</FileAlignment> |
14 | 14 |
<Deterministic>true</Deterministic> |
15 | 15 |
<TargetFrameworkProfile /> |
16 |
<PublishUrl>게시\</PublishUrl> |
|
17 |
<Install>true</Install> |
|
18 |
<InstallFrom>Disk</InstallFrom> |
|
19 |
<UpdateEnabled>false</UpdateEnabled> |
|
20 |
<UpdateMode>Foreground</UpdateMode> |
|
21 |
<UpdateInterval>7</UpdateInterval> |
|
22 |
<UpdateIntervalUnits>Days</UpdateIntervalUnits> |
|
23 |
<UpdatePeriodically>false</UpdatePeriodically> |
|
24 |
<UpdateRequired>false</UpdateRequired> |
|
25 |
<MapFileExtensions>true</MapFileExtensions> |
|
26 |
<ApplicationRevision>0</ApplicationRevision> |
|
27 |
<ApplicationVersion>1.0.0.%2a</ApplicationVersion> |
|
28 |
<IsWebBootstrapper>false</IsWebBootstrapper> |
|
29 |
<UseApplicationTrust>false</UseApplicationTrust> |
|
30 |
<BootstrapperEnabled>true</BootstrapperEnabled> |
|
16 | 31 |
</PropertyGroup> |
17 | 32 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
18 | 33 |
<DebugSymbols>true</DebugSymbols> |
... | ... | |
46 | 61 |
<ErrorReport>prompt</ErrorReport> |
47 | 62 |
</PropertyGroup> |
48 | 63 |
<ItemGroup> |
49 |
<Reference Include="Markus.EntityModel"> |
|
50 |
<HintPath>..\packages\MarkusDatabase.1.8.0\lib\net45\Markus.EntityModel.dll</HintPath> |
|
51 |
</Reference> |
|
52 | 64 |
<Reference Include="System" /> |
53 | 65 |
<Reference Include="System.ComponentModel.DataAnnotations" /> |
54 | 66 |
<Reference Include="System.Core" /> |
... | ... | |
68 | 80 |
<Project>{a5ba7325-379c-4ccb-b156-1704fc2175e3}</Project> |
69 | 81 |
<Name>Markus.Service.Convert.IPlugin</Name> |
70 | 82 |
</ProjectReference> |
83 |
<ProjectReference Include="..\Markus.Service.DataBase.Dapper\Markus.Service.DataBase.Dapper.csproj"> |
|
84 |
<Project>{f835dd07-7f0c-4dbd-a596-f3110d187421}</Project> |
|
85 |
<Name>Markus.Service.DataBase.Dapper</Name> |
|
86 |
</ProjectReference> |
|
71 | 87 |
<ProjectReference Include="..\Markus.Service.Extensions\Markus.Service.Extensions.csproj"> |
72 | 88 |
<Project>{5f983789-3e8f-4f9a-a601-138c3a83ca5f}</Project> |
73 | 89 |
<Name>Markus.Service.Extensions</Name> |
74 | 90 |
</ProjectReference> |
75 | 91 |
</ItemGroup> |
76 | 92 |
<ItemGroup> |
77 |
<PackageReference Include="EntityFramework"> |
|
78 |
<Version>6.4.4</Version> |
|
79 |
</PackageReference> |
|
80 |
<PackageReference Include="Markus.EntityModel"> |
|
81 |
<Version>1.0.0</Version> |
|
82 |
</PackageReference> |
|
83 | 93 |
<PackageReference Include="RestSharp"> |
84 | 94 |
<Version>106.12.0</Version> |
85 | 95 |
</PackageReference> |
86 | 96 |
</ItemGroup> |
97 |
<ItemGroup> |
|
98 |
<BootstrapperPackage Include=".NETFramework,Version=v4.6.1"> |
|
99 |
<Visible>False</Visible> |
|
100 |
<ProductName>Microsoft .NET Framework 4.6.1%28x86 및 x64%29</ProductName> |
|
101 |
<Install>true</Install> |
|
102 |
</BootstrapperPackage> |
|
103 |
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> |
|
104 |
<Visible>False</Visible> |
|
105 |
<ProductName>.NET Framework 3.5 SP1</ProductName> |
|
106 |
<Install>false</Install> |
|
107 |
</BootstrapperPackage> |
|
108 |
</ItemGroup> |
|
87 | 109 |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
88 | 110 |
</Project> |
ConvertService/ServiceBase/ConvertResultBSENG/ResultProcess.cs | ||
---|---|---|
3 | 3 |
using System.Linq; |
4 | 4 |
using System.Text; |
5 | 5 |
using System.Threading.Tasks; |
6 |
using Markus.Service.DataBase.Repositories; |
|
6 | 7 |
using RestSharp; |
7 | 8 |
|
8 | 9 |
namespace ConvertResultBSENG |
... | ... | |
30 | 31 |
connectioString = Markus.Service.Extensions.Encrypt.AESEncrypter.Decrypt(Parameters[MARKUS_ConnectionString_KEY].ToString()); |
31 | 32 |
string uploadUrl = Parameters[UPLOAD_API_KEY].ToString(); |
32 | 33 |
|
33 |
using (var entities = new Markus.EntityModel.MarkusModel(connectioString))
|
|
34 |
using (ConvertDocRepository database = new ConvertDocRepository(connectioString))
|
|
34 | 35 |
{ |
36 |
var convertItem = database.GetConvertDocSingleAsync(ConvertID: ConvertID).GetAwaiter().GetResult(); |
|
35 | 37 |
|
36 |
var convertItems = entities.CONVERTER_DOC.Where(x => x.ID == ConvertID); |
|
37 |
|
|
38 |
if (convertItems.Count() > 0) |
|
38 |
if (convertItem != null) |
|
39 | 39 |
{ |
40 |
var convertItem = convertItems.First();
|
|
41 |
|
|
42 |
string documentId = convertItem.DOCUMENT_ID;
|
|
40 |
using (DOCUMENTITEMRepository repository = new DOCUMENTITEMRepository(connectioString))
|
|
41 |
{ |
|
42 |
var docitem = repository.GetFirstAsync(convertItem.PROJECT_NO,convertItem.DOCUMENT_ID).GetAwaiter().GetResult();
|
|
43 | 43 |
|
44 |
var docitems = entities.DOCUMENT_ITEM.Where(x => x.DOCUMENT_ID == documentId);
|
|
44 |
string uri = null;
|
|
45 | 45 |
|
46 |
string uri = null; |
|
46 |
if (docitem != null) |
|
47 |
{ |
|
48 |
//http://210.94.128.124/markus/markusRes.do?prj_No={prj_No}&document_Id={document_Id}&document_No={document_No}&document_Name=(document_Name)&group_No={group_No}&rev_No={rev_No} |
|
47 | 49 |
|
48 |
if (docitems.Count() > 0) |
|
49 |
{ |
|
50 |
var docitem = docitems.First(); |
|
51 |
|
|
52 |
//http://210.94.128.124/markus/markusRes.do?prj_No={prj_No}&document_Id={document_Id}&document_No={document_No}&document_Name=(document_Name)&group_No={group_No}&rev_No={rev_No} |
|
50 |
uri = $"http://{uploadUrl}/markus/markusRes.do?" |
|
51 |
+ $"prj_No={docitem.PROJECT_NO}&document_Id={docitem.ID}&document_No={docitem.DOCUMENT_NO}" |
|
52 |
+ $"&document_Name={docitem.DOCUMENT_NAME}&group_No={docitem.GROUP_NO}&rev_No={docitem.REVISION}"; |
|
53 | 53 |
|
54 |
uri = $"http://{uploadUrl}/markus/markusRes.do?" |
|
55 |
+ $"prj_No={docitem.PROJECT_NO}&document_Id={docitem.ID}&document_No={docitem.DOCUMENT_NO}" |
|
56 |
+ $"&document_Name={docitem.DOCUMENT_NAME}&group_No={docitem.GROUP_NO}&rev_No={docitem.REVISION}"; |
|
54 |
var value = SendData(uri); |
|
57 | 55 |
|
58 |
var value = SendData(uri); |
|
56 |
if (string.IsNullOrEmpty(value) || Convert.ToBoolean(value)) |
|
57 |
{ |
|
58 |
result = true; |
|
59 |
} |
|
60 |
else |
|
61 |
{ |
|
62 |
this.Exception = uri; |
|
63 |
result = false; |
|
64 |
} |
|
59 | 65 |
|
60 |
if (string.IsNullOrEmpty(value) || Convert.ToBoolean(value)) |
|
61 |
{ |
|
62 |
result = true; |
|
63 | 66 |
} |
64 | 67 |
else |
65 | 68 |
{ |
66 |
this.Exception = uri; |
|
67 |
result = false; |
|
69 |
this.Exception = "document Item Not Found " + uri; |
|
68 | 70 |
} |
69 |
|
|
70 |
} |
|
71 |
else |
|
72 |
{ |
|
73 |
this.Exception = "document Item Not Found " + uri; |
|
74 | 71 |
} |
75 | 72 |
} |
76 | 73 |
else |
ConvertService/ServiceBase/ConvertResultBSENG_test/App.config | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8" ?>
|
|
1 |
<?xml version="1.0" encoding="utf-8"?>
|
|
2 | 2 |
<configuration> |
3 | 3 |
<startup> |
4 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
|
4 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
|
|
5 | 5 |
</startup> |
6 |
</configuration> |
|
6 |
</configuration> |
ConvertService/ServiceBase/ConvertResultBSENG_test/ConvertResultBSENG_test.csproj | ||
---|---|---|
8 | 8 |
<OutputType>Exe</OutputType> |
9 | 9 |
<RootNamespace>ConvertResultBSENG_test</RootNamespace> |
10 | 10 |
<AssemblyName>ConvertResultBSENG_test</AssemblyName> |
11 |
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
|
11 |
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
|
12 | 12 |
<FileAlignment>512</FileAlignment> |
13 | 13 |
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects> |
14 | 14 |
<Deterministic>true</Deterministic> |
15 |
<TargetFrameworkProfile /> |
|
16 |
<PublishUrl>게시\</PublishUrl> |
|
17 |
<Install>true</Install> |
|
18 |
<InstallFrom>Disk</InstallFrom> |
|
19 |
<UpdateEnabled>false</UpdateEnabled> |
|
20 |
<UpdateMode>Foreground</UpdateMode> |
|
21 |
<UpdateInterval>7</UpdateInterval> |
|
22 |
<UpdateIntervalUnits>Days</UpdateIntervalUnits> |
|
23 |
<UpdatePeriodically>false</UpdatePeriodically> |
|
24 |
<UpdateRequired>false</UpdateRequired> |
|
25 |
<MapFileExtensions>true</MapFileExtensions> |
|
26 |
<ApplicationRevision>0</ApplicationRevision> |
|
27 |
<ApplicationVersion>1.0.0.%2a</ApplicationVersion> |
|
28 |
<IsWebBootstrapper>false</IsWebBootstrapper> |
|
29 |
<UseApplicationTrust>false</UseApplicationTrust> |
|
30 |
<BootstrapperEnabled>true</BootstrapperEnabled> |
|
15 | 31 |
</PropertyGroup> |
16 | 32 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
17 | 33 |
<PlatformTarget>x64</PlatformTarget> |
... | ... | |
84 | 100 |
<Version>0.3.8</Version> |
85 | 101 |
</PackageReference> |
86 | 102 |
</ItemGroup> |
103 |
<ItemGroup> |
|
104 |
<BootstrapperPackage Include=".NETFramework,Version=v4.6.1"> |
|
105 |
<Visible>False</Visible> |
|
106 |
<ProductName>Microsoft .NET Framework 4.6.1%28x86 및 x64%29</ProductName> |
|
107 |
<Install>true</Install> |
|
108 |
</BootstrapperPackage> |
|
109 |
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> |
|
110 |
<Visible>False</Visible> |
|
111 |
<ProductName>.NET Framework 3.5 SP1</ProductName> |
|
112 |
<Install>false</Install> |
|
113 |
</BootstrapperPackage> |
|
114 |
</ItemGroup> |
|
87 | 115 |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
88 | 116 |
<PropertyGroup> |
89 | 117 |
<PreBuildEvent>xcopy /y /d /I "$(ProjectDir)..\publish\Plugin\*.*" "$(ProjectDir)$(OutDir)Plugin"</PreBuildEvent> |
ConvertService/ServiceBase/ConvertionWebService/ConvertionWebService.csproj | ||
---|---|---|
13 | 13 |
<AppDesignerFolder>Properties</AppDesignerFolder> |
14 | 14 |
<RootNamespace>ConvertionWebService</RootNamespace> |
15 | 15 |
<AssemblyName>ConvertionWebService</AssemblyName> |
16 |
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
|
16 |
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
|
17 | 17 |
<UseIISExpress>false</UseIISExpress> |
18 | 18 |
<FileUpgradeFlags> |
19 | 19 |
</FileUpgradeFlags> |
ConvertService/ServiceBase/ConvertionWebService/Web.config | ||
---|---|---|
18 | 18 |
</system.Web> |
19 | 19 |
--> |
20 | 20 |
<system.web> |
21 |
<compilation debug="true" targetFramework="4.5.1"/>
|
|
21 |
<compilation debug="true" targetFramework="4.6.1"/>
|
|
22 | 22 |
<pages controlRenderingCompatibilityVersion="4.0"/> |
23 | 23 |
</system.web> |
24 | 24 |
<applicationSettings> |
ConvertService/ServiceBase/DocItemCheck/App.config | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?>
|
|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 | 2 |
<configuration> |
3 | 3 |
<configSections> |
4 | 4 |
|
5 | 5 |
|
6 |
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
|
6 |
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/> |
|
7 | 7 |
</configSections> |
8 | 8 |
<entityFramework> |
9 |
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
|
|
9 |
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/> |
|
10 | 10 |
<providers> |
11 |
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
|
11 |
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/> |
|
12 | 12 |
</providers> |
13 | 13 |
</entityFramework> |
14 | 14 |
<startup> |
15 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
|
|
15 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
|
|
16 | 16 |
</startup> |
17 |
</configuration> |
|
17 |
</configuration> |
ConvertService/ServiceBase/DocItemCheck/DocItemCheck.csproj | ||
---|---|---|
9 | 9 |
<AppDesignerFolder>Properties</AppDesignerFolder> |
10 | 10 |
<RootNamespace>DocItemCheck</RootNamespace> |
11 | 11 |
<AssemblyName>DocItemCheck</AssemblyName> |
12 |
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
|
12 |
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
|
13 | 13 |
<FileAlignment>512</FileAlignment> |
14 | 14 |
<Deterministic>true</Deterministic> |
15 | 15 |
<TargetFrameworkProfile /> |
16 | 16 |
<NuGetPackageImportStamp> |
17 | 17 |
</NuGetPackageImportStamp> |
18 |
<PublishUrl>게시\</PublishUrl> |
|
19 |
<Install>true</Install> |
|
20 |
<InstallFrom>Disk</InstallFrom> |
|
21 |
<UpdateEnabled>false</UpdateEnabled> |
|
22 |
<UpdateMode>Foreground</UpdateMode> |
|
23 |
<UpdateInterval>7</UpdateInterval> |
|
24 |
<UpdateIntervalUnits>Days</UpdateIntervalUnits> |
|
25 |
<UpdatePeriodically>false</UpdatePeriodically> |
|
26 |
<UpdateRequired>false</UpdateRequired> |
|
27 |
<MapFileExtensions>true</MapFileExtensions> |
|
28 |
<ApplicationRevision>0</ApplicationRevision> |
|
29 |
<ApplicationVersion>1.0.0.%2a</ApplicationVersion> |
|
30 |
<IsWebBootstrapper>false</IsWebBootstrapper> |
|
31 |
<UseApplicationTrust>false</UseApplicationTrust> |
|
32 |
<BootstrapperEnabled>true</BootstrapperEnabled> |
|
18 | 33 |
</PropertyGroup> |
19 | 34 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
20 | 35 |
<DebugSymbols>true</DebugSymbols> |
... | ... | |
63 | 78 |
<Project>{a5ba7325-379c-4ccb-b156-1704fc2175e3}</Project> |
64 | 79 |
<Name>Markus.Service.Convert.IPlugin</Name> |
65 | 80 |
</ProjectReference> |
66 |
<ProjectReference Include="..\Markus.Service.DataBase\Markus.Service.DataBase.csproj">
|
|
67 |
<Project>{400736fb-92c9-4bc0-b447-e8274103d813}</Project>
|
|
68 |
<Name>Markus.Service.DataBase</Name> |
|
81 |
<ProjectReference Include="..\Markus.Service.DataBase.Dapper\Markus.Service.DataBase.Dapper.csproj">
|
|
82 |
<Project>{f835dd07-7f0c-4dbd-a596-f3110d187421}</Project>
|
|
83 |
<Name>Markus.Service.DataBase.Dapper</Name>
|
|
69 | 84 |
</ProjectReference> |
70 | 85 |
<ProjectReference Include="..\Markus.Service.Extensions\Markus.Service.Extensions.csproj"> |
71 | 86 |
<Project>{5f983789-3e8f-4f9a-a601-138c3a83ca5f}</Project> |
... | ... | |
80 | 95 |
</Content> |
81 | 96 |
</ItemGroup> |
82 | 97 |
<ItemGroup> |
83 |
<PackageReference Include="EntityFramework"> |
|
84 |
<Version>6.4.4</Version> |
|
85 |
</PackageReference> |
|
86 | 98 |
<PackageReference Include="log4net"> |
87 | 99 |
<Version>2.0.8</Version> |
88 | 100 |
</PackageReference> |
89 | 101 |
</ItemGroup> |
102 |
<ItemGroup> |
|
103 |
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> |
|
104 |
<Visible>False</Visible> |
|
105 |
<ProductName>.NET Framework 3.5 SP1</ProductName> |
|
106 |
<Install>false</Install> |
|
107 |
</BootstrapperPackage> |
|
108 |
</ItemGroup> |
|
90 | 109 |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
91 | 110 |
</Project> |
ConvertService/ServiceBase/DocItemCheck/DocumentItemCheck.cs | ||
---|---|---|
3 | 3 |
using Markus.Service.Extensions; |
4 | 4 |
using System; |
5 | 5 |
using System.Collections.Generic; |
6 |
using System.Data.Entity.Core.Objects; |
|
7 |
using System.Data.Entity.Infrastructure; |
|
8 | 6 |
using System.Linq; |
9 | 7 |
using System.Text; |
10 | 8 |
using System.Threading.Tasks; |
9 |
using Markus.Service.DataBase.Entities; |
|
10 |
using Markus.Service.DataBase.Repositories; |
|
11 |
using Markus.Service.DataBase; |
|
11 | 12 |
|
12 | 13 |
namespace DocItemCheck |
13 | 14 |
{ |
... | ... | |
33 | 34 |
{ |
34 | 35 |
string connectionString = Parameters[MARKUS_ConnectionString_KEY].ToString(); |
35 | 36 |
|
36 |
using (var entities = new Markus.EntityModel.MarkusModel(Markus.Service.Extensions.Encrypt.AESEncrypter.Decrypt(connectionString)))
|
|
37 |
using (BaseRepository repository = new Markus.Service.DataBase.Repositories.BaseRepository(Encrypt.AESEncrypter.Decrypt(connectionString)))
|
|
37 | 38 |
{ |
38 |
string sql = @"SELECT " + |
|
39 |
" doc.PROJECT_NO as PROJECT_NO " + |
|
40 |
" ,doc.DOCUMENT_ID as DOCUMENT_ID " + |
|
41 |
" ,doc.ORIGINAL_FILE as ORIGINAL_FILE " + |
|
39 |
string sql = @"SELECT doc.* " + |
|
42 | 40 |
" FROM MarkusModel.DOCUMENT_ITEM as doc " + |
43 | 41 |
" LEFT OUTER JOIN MarkusModel.CONVERTER_DOC as con " + |
44 | 42 |
" ON doc.DOCUMENT_ID = con.DOCUMENT_ID and doc.PROJECT_NO = con.PROJECT_NO " + |
45 | 43 |
" where con.DOCUMENT_ID is null"; |
46 | 44 |
|
47 |
var docItems = (entities as IObjectContextAdapter).ObjectContext.CreateQuery<System.Data.Common.DbDataRecord>(sql);
|
|
45 |
var docItems = repository.GetAsync<DOCUMENTITEM>(sql,null).GetAwaiter().GetResult();
|
|
48 | 46 |
|
49 | 47 |
if (docItems.Count() > 0) |
50 | 48 |
{ |
51 |
foreach (var dataRecord in docItems)
|
|
49 |
foreach (var item in docItems)
|
|
52 | 50 |
{ |
53 |
string projctNo = dataRecord["PROJECT_NO"]?.ToString().Trim();
|
|
54 |
string documentId = dataRecord["DOCUMENT_ID"]?.ToString().Trim();
|
|
55 |
string originalUrl = dataRecord["ORIGINAL_FILE"]?.ToString();
|
|
51 |
string projctNo = item.PROJECT_NO;
|
|
52 |
string documentId = item.DOCUMENT_ID;
|
|
53 |
string originalUrl = item.ORIGINAL_FILE;
|
|
56 | 54 |
|
57 | 55 |
if (!string.IsNullOrWhiteSpace(projctNo) && !string.IsNullOrWhiteSpace(documentId) && !string.IsNullOrWhiteSpace(originalUrl)) |
58 | 56 |
{ |
59 | 57 |
string convertId = GuidExtension.shortGuid(); |
60 | 58 |
|
61 |
var param = new [] {
|
|
62 |
new System.Data.SqlClient.SqlParameter("ID",convertId),
|
|
63 |
new System.Data.SqlClient.SqlParameter("PROJECT_NO",projctNo),
|
|
64 |
new System.Data.SqlClient.SqlParameter("DOCUMENT_URL",originalUrl),
|
|
65 |
new System.Data.SqlClient.SqlParameter( "DOCUMENT_ID",documentId)
|
|
59 |
var param = new List<sqlParameter> {
|
|
60 |
new sqlParameter("@ID",convertId,System.Data.DbType.String),
|
|
61 |
new sqlParameter("@PROJECT_NO",projctNo,System.Data.DbType.String),
|
|
62 |
new sqlParameter("@DOCUMENT_URL",originalUrl,System.Data.DbType.String),
|
|
63 |
new sqlParameter( "@DOCUMENT_ID",documentId,System.Data.DbType.String)
|
|
66 | 64 |
}; |
67 | 65 |
|
68 |
(entities as IObjectContextAdapter).ObjectContext.ExecuteStoreQuery<object>("SELECT_CONVERT_INSERT @ID, @PROJECT_NO, @DOCUMENT_URL , @DOCUMENT_ID", param);
|
|
66 |
repository.SetAsync("SELECT_CONVERT_INSERT", param).GetAwaiter().GetResult();
|
|
69 | 67 |
|
70 | 68 |
log.Warn($"[Insert Convert_Doc] ID : {convertId} / PROJECT_NO : {projctNo} / DOCUMENT_URL : {originalUrl} / DOCUMENT_ID : {documentId} "); |
71 | 69 |
} |
ConvertService/ServiceBase/DownloadLinkTest/App.config | ||
---|---|---|
1 | 1 |
<?xml version="1.0" encoding="utf-8"?> |
2 | 2 |
<configuration> |
3 | 3 |
<startup> |
4 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
|
|
4 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
|
|
5 | 5 |
</startup> |
6 | 6 |
</configuration> |
ConvertService/ServiceBase/DownloadLinkTest/DownloadLinkTest.csproj | ||
---|---|---|
8 | 8 |
<OutputType>Exe</OutputType> |
9 | 9 |
<RootNamespace>DownloadLinkTest</RootNamespace> |
10 | 10 |
<AssemblyName>DownloadLinkTest</AssemblyName> |
11 |
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
|
11 |
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
|
12 | 12 |
<FileAlignment>512</FileAlignment> |
13 | 13 |
<Deterministic>true</Deterministic> |
14 | 14 |
<TargetFrameworkProfile /> |
ConvertService/ServiceBase/DownloadPlugin/BSENGRestDownload/BSENGRestDownload.csproj | ||
---|---|---|
9 | 9 |
<AppDesignerFolder>Properties</AppDesignerFolder> |
10 | 10 |
<RootNamespace>BSENGRestDownload</RootNamespace> |
11 | 11 |
<AssemblyName>BSENGRestDownload</AssemblyName> |
12 |
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
|
12 |
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
|
13 | 13 |
<FileAlignment>512</FileAlignment> |
14 | 14 |
<Deterministic>true</Deterministic> |
15 | 15 |
<TargetFrameworkProfile /> |
ConvertService/ServiceBase/DownloadPlugin/DirectDownload/DirectDownload.csproj | ||
---|---|---|
9 | 9 |
<AppDesignerFolder>Properties</AppDesignerFolder> |
10 | 10 |
<RootNamespace>DirectDownload</RootNamespace> |
11 | 11 |
<AssemblyName>DirectDownload</AssemblyName> |
12 |
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
|
12 |
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
|
13 | 13 |
<FileAlignment>512</FileAlignment> |
14 | 14 |
<Deterministic>true</Deterministic> |
15 | 15 |
<TargetFrameworkProfile /> |
ConvertService/ServiceBase/DownloadPlugin/DownloadPluginTester/DownloadPluginTester/App.config | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8" ?>
|
|
1 |
<?xml version="1.0" encoding="utf-8"?>
|
|
2 | 2 |
<configuration> |
3 | 3 |
<startup> |
4 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
|
4 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
|
|
5 | 5 |
</startup> |
6 |
</configuration> |
|
6 |
</configuration> |
ConvertService/ServiceBase/DownloadPlugin/DownloadPluginTester/DownloadPluginTester/DownloadPluginTester.csproj | ||
---|---|---|
8 | 8 |
<OutputType>Exe</OutputType> |
9 | 9 |
<RootNamespace>DownloadPluginTester</RootNamespace> |
10 | 10 |
<AssemblyName>DownloadPluginTester</AssemblyName> |
11 |
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
|
11 |
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
|
12 | 12 |
<FileAlignment>512</FileAlignment> |
13 | 13 |
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> |
14 | 14 |
<Deterministic>true</Deterministic> |
15 |
<TargetFrameworkProfile /> |
|
15 | 16 |
</PropertyGroup> |
16 | 17 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
17 | 18 |
<PlatformTarget>x64</PlatformTarget> |
ConvertService/ServiceBase/ErrorNotice/ErrorNotice.cs | ||
---|---|---|
1 |
using Markus.EntityModel; |
|
2 |
using Markus.Service.Convert.Plugin; |
|
1 |
using Markus.Service.Convert.Plugin; |
|
2 |
using Markus.Service.DataBase.Entities; |
|
3 |
using Markus.Service.DataBase.Repositories; |
|
3 | 4 |
using Markus.Service.Extensions; |
4 | 5 |
using System; |
5 | 6 |
using System.Collections.Generic; |
6 |
using System.Data.Entity.Core.Objects; |
|
7 |
using System.Data.Entity.Infrastructure; |
|
8 | 7 |
using System.IO; |
9 | 8 |
using System.Linq; |
10 | 9 |
using System.Net.Mail; |
... | ... | |
53 | 52 |
status.AddRange(noticeStatusArray.Split(',').ToList().ConvertAll(x => int.Parse(x))); |
54 | 53 |
} |
55 | 54 |
|
56 |
using (var entities = new Markus.EntityModel.MarkusModel(Markus.Service.Extensions.Encrypt.AESEncrypter.Decrypt(connectionString)))
|
|
55 |
using (ConvertDocRepository database = new ConvertDocRepository(Markus.Service.Extensions.Encrypt.AESEncrypter.Decrypt(connectionString)))
|
|
57 | 56 |
{ |
58 |
var items = entities.CONVERTER_DOC.Where(x => x.ID == ConvertID);
|
|
57 |
var convertItem = database.GetConvertDocSingleAsync(ConvertID: ConvertID).GetAwaiter().GetResult();
|
|
59 | 58 |
|
60 |
if (items.Count() > 0)
|
|
59 |
if (convertItem != null)
|
|
61 | 60 |
{ |
62 |
var convertItem = items.First(); |
|
63 |
|
|
64 | 61 |
if (status.Contains(convertItem.STATUS)) |
65 | 62 |
{ |
66 | 63 |
try |
... | ... | |
98 | 95 |
return result; |
99 | 96 |
} |
100 | 97 |
|
101 |
private void SendNoticeDaum(CONVERTER_DOC convertItem, Dictionary<string, object> Parameters)
|
|
98 |
private void SendNoticeDaum(ConvertDoc convertItem, Dictionary<string, object> Parameters)
|
|
102 | 99 |
{ |
103 | 100 |
if (Parameters.TryGetValue(MARKUS_SMTP_SERVER_KEY, out var address) && |
104 | 101 |
Parameters.TryGetValue(MARKUS_SMTP_SERVER_PORT_KEY, out var port) && |
... | ... | |
173 | 170 |
{ |
174 | 171 |
} |
175 | 172 |
|
176 |
private void SendNotice(CONVERTER_DOC convertItem, Dictionary<string, object> Parameters)
|
|
173 |
private void SendNotice(ConvertDoc convertItem, Dictionary<string, object> Parameters)
|
|
177 | 174 |
{ |
178 | 175 |
if (Parameters.TryGetValue(MARKUS_SMTP_SERVER_KEY, out var address) && |
179 | 176 |
Parameters.TryGetValue(MARKUS_SMTP_SERVER_PORT_KEY, out var port) && |
ConvertService/ServiceBase/ErrorNotice/ErrorNotice.csproj | ||
---|---|---|
9 | 9 |
<AppDesignerFolder>Properties</AppDesignerFolder> |
10 | 10 |
<RootNamespace>ErrorNotice</RootNamespace> |
11 | 11 |
<AssemblyName>ErrorNotice</AssemblyName> |
12 |
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
|
12 |
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
|
13 | 13 |
<FileAlignment>512</FileAlignment> |
14 | 14 |
<Deterministic>true</Deterministic> |
15 | 15 |
<TargetFrameworkProfile /> |
... | ... | |
57 | 57 |
<Compile Include="Properties\AssemblyInfo.cs" /> |
58 | 58 |
</ItemGroup> |
59 | 59 |
<ItemGroup> |
60 |
<PackageReference Include="EntityFramework"> |
|
61 |
<Version>6.4.4</Version> |
|
62 |
</PackageReference> |
|
63 |
<PackageReference Include="Markus.EntityModel"> |
|
64 |
<Version>1.0.0</Version> |
|
65 |
</PackageReference> |
|
66 | 60 |
<PackageReference Include="Markus.Message"> |
67 | 61 |
<Version>2.0.0</Version> |
68 | 62 |
</PackageReference> |
... | ... | |
75 | 69 |
<Project>{a5ba7325-379c-4ccb-b156-1704fc2175e3}</Project> |
76 | 70 |
<Name>Markus.Service.Convert.IPlugin</Name> |
77 | 71 |
</ProjectReference> |
72 |
<ProjectReference Include="..\Markus.Service.DataBase.Dapper\Markus.Service.DataBase.Dapper.csproj"> |
|
73 |
<Project>{F835DD07-7F0C-4DBD-A596-F3110D187421}</Project> |
|
74 |
<Name>Markus.Service.DataBase.Dapper</Name> |
|
75 |
</ProjectReference> |
|
78 | 76 |
<ProjectReference Include="..\Markus.Service.Extensions\Markus.Service.Extensions.csproj"> |
79 | 77 |
<Project>{5f983789-3e8f-4f9a-a601-138c3a83ca5f}</Project> |
80 | 78 |
<Name>Markus.Service.Extensions</Name> |
ConvertService/ServiceBase/IServiceBase/Markus.Service.Interface.csproj | ||
---|---|---|
9 | 9 |
<AppDesignerFolder>Properties</AppDesignerFolder> |
10 | 10 |
<RootNamespace>Markus.Service</RootNamespace> |
11 | 11 |
<AssemblyName>Markus.Service.Interface</AssemblyName> |
12 |
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
|
12 |
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
|
13 | 13 |
<FileAlignment>512</FileAlignment> |
14 | 14 |
<Deterministic>true</Deterministic> |
15 | 15 |
<TargetFrameworkProfile /> |
16 |
<PublishUrl>게시\</PublishUrl> |
|
17 |
<Install>true</Install> |
|
18 |
<InstallFrom>Disk</InstallFrom> |
|
19 |
<UpdateEnabled>false</UpdateEnabled> |
|
20 |
<UpdateMode>Foreground</UpdateMode> |
|
21 |
<UpdateInterval>7</UpdateInterval> |
|
22 |
<UpdateIntervalUnits>Days</UpdateIntervalUnits> |
|
23 |
<UpdatePeriodically>false</UpdatePeriodically> |
|
24 |
<UpdateRequired>false</UpdateRequired> |
|
25 |
<MapFileExtensions>true</MapFileExtensions> |
|
26 |
<ApplicationRevision>0</ApplicationRevision> |
|
27 |
<ApplicationVersion>1.0.0.%2a</ApplicationVersion> |
|
28 |
<IsWebBootstrapper>false</IsWebBootstrapper> |
|
29 |
<UseApplicationTrust>false</UseApplicationTrust> |
|
30 |
<BootstrapperEnabled>true</BootstrapperEnabled> |
|
16 | 31 |
</PropertyGroup> |
17 | 32 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
18 | 33 |
<DebugSymbols>true</DebugSymbols> |
... | ... | |
82 | 97 |
<ItemGroup> |
83 | 98 |
<Compile Include="ProcessContext.cs" /> |
84 | 99 |
<Compile Include="Properties\AssemblyInfo.cs" /> |
85 |
<Compile Include="ConvertItem.cs" /> |
|
86 | 100 |
</ItemGroup> |
87 | 101 |
<ItemGroup> |
88 | 102 |
<PackageReference Include="Markus.Message"> |
89 | 103 |
<Version>2.0.0</Version> |
90 | 104 |
</PackageReference> |
91 | 105 |
</ItemGroup> |
106 |
<ItemGroup> |
|
107 |
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> |
|
108 |
<Visible>False</Visible> |
|
109 |
<ProductName>.NET Framework 3.5 SP1</ProductName> |
|
110 |
<Install>false</Install> |
|
111 |
</BootstrapperPackage> |
|
112 |
</ItemGroup> |
|
92 | 113 |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
93 | 114 |
</Project> |
ConvertService/ServiceBase/JobScheduler/App.config | ||
---|---|---|
1 | 1 |
<?xml version="1.0" encoding="utf-8"?> |
2 | 2 |
<configuration> |
3 | 3 |
<startup> |
4 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/>
|
|
4 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
|
|
5 | 5 |
</startup> |
6 | 6 |
</configuration> |
ConvertService/ServiceBase/JobScheduler/JobScheduler.csproj | ||
---|---|---|
8 | 8 |
<OutputType>Exe</OutputType> |
9 | 9 |
<RootNamespace>JobScheduler</RootNamespace> |
10 | 10 |
<AssemblyName>JobScheduler</AssemblyName> |
11 |
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
|
11 |
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
|
12 | 12 |
<FileAlignment>512</FileAlignment> |
13 | 13 |
<Deterministic>true</Deterministic> |
14 | 14 |
<TargetFrameworkProfile /> |
ConvertService/ServiceBase/Markus.Service.Convert.IPlugin/Markus.Service.Convert.IPlugin.csproj | ||
---|---|---|
9 | 9 |
<AppDesignerFolder>Properties</AppDesignerFolder> |
10 | 10 |
<RootNamespace>Markus.Service.Convert.IPlugin</RootNamespace> |
11 | 11 |
<AssemblyName>Markus.Service.Convert.IPlugin</AssemblyName> |
12 |
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
|
12 |
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
|
13 | 13 |
<FileAlignment>512</FileAlignment> |
14 | 14 |
<Deterministic>true</Deterministic> |
15 | 15 |
<TargetFrameworkProfile /> |
16 |
<PublishUrl>게시\</PublishUrl> |
|
17 |
<Install>true</Install> |
|
18 |
<InstallFrom>Disk</InstallFrom> |
|
19 |
<UpdateEnabled>false</UpdateEnabled> |
|
20 |
<UpdateMode>Foreground</UpdateMode> |
|
21 |
<UpdateInterval>7</UpdateInterval> |
|
22 |
<UpdateIntervalUnits>Days</UpdateIntervalUnits> |
|
23 |
<UpdatePeriodically>false</UpdatePeriodically> |
|
24 |
<UpdateRequired>false</UpdateRequired> |
|
25 |
<MapFileExtensions>true</MapFileExtensions> |
|
26 |
<ApplicationRevision>0</ApplicationRevision> |
|
27 |
<ApplicationVersion>1.0.0.%2a</ApplicationVersion> |
|
28 |
<IsWebBootstrapper>false</IsWebBootstrapper> |
|
29 |
<UseApplicationTrust>false</UseApplicationTrust> |
|
30 |
<BootstrapperEnabled>true</BootstrapperEnabled> |
|
16 | 31 |
</PropertyGroup> |
17 | 32 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
18 | 33 |
<DebugSymbols>true</DebugSymbols> |
... | ... | |
22 | 37 |
<DefineConstants>DEBUG;TRACE</DefineConstants> |
23 | 38 |
<ErrorReport>prompt</ErrorReport> |
24 | 39 |
<WarningLevel>4</WarningLevel> |
25 |
<PlatformTarget>x64</PlatformTarget>
|
|
40 |
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
26 | 41 |
</PropertyGroup> |
27 | 42 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
28 | 43 |
<DebugType>pdbonly</DebugType> |
... | ... | |
56 | 71 |
<Compile Include="IPlugin.cs" /> |
57 | 72 |
<Compile Include="Properties\AssemblyInfo.cs" /> |
58 | 73 |
</ItemGroup> |
74 |
<ItemGroup> |
|
75 |
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> |
|
76 |
<Visible>False</Visible> |
|
77 |
<ProductName>.NET Framework 3.5 SP1</ProductName> |
|
78 |
<Install>false</Install> |
|
79 |
</BootstrapperPackage> |
|
80 |
</ItemGroup> |
|
59 | 81 |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
60 | 82 |
</Project> |
ConvertService/ServiceBase/Markus.Service.Convert/ConvertService.cs | ||
---|---|---|
1 | 1 |
using log4net; |
2 | 2 |
using Markus.Message; |
3 | 3 |
using Markus.Service.Helper; |
4 |
using Markus.Service.Interface; |
|
5 | 4 |
using System; |
6 | 5 |
using System.Collections.Generic; |
7 | 6 |
using System.IO; |
... | ... | |
15 | 14 |
using System.Threading.Tasks; |
16 | 15 |
using System.Web; |
17 | 16 |
using StatusCodeType = Markus.Message.StatusCodeType; |
17 |
using Microsoft.SqlServer.Server; |
|
18 |
using System.Web.UI; |
|
19 |
using Markus.Service.DataBase.Entities; |
|
20 |
using Markus.Service.DataBase.Repositories; |
|
18 | 21 |
|
19 | 22 |
namespace Markus.Service.Convert |
20 | 23 |
{ |
... | ... | |
45 | 48 |
|
46 | 49 |
ConvertProcessContext = convertContext; |
47 | 50 |
|
48 |
BasicHttpBinding myBinding = new BasicHttpBinding(); |
|
51 |
BasicHttpBinding myBinding = new BasicHttpBinding { TransferMode = TransferMode.Buffered }; |
|
52 |
|
|
53 |
myBinding.CloseTimeout = new TimeSpan(0, 10, 0); |
|
54 |
myBinding.ReceiveTimeout = new TimeSpan(0, 10, 0); |
|
55 |
myBinding.SendTimeout = new TimeSpan(0, 10, 0); |
|
56 |
myBinding.OpenTimeout = new TimeSpan(0, 10, 0); |
|
57 |
|
|
49 | 58 |
EndpointAddress myEndpoint = new EndpointAddress(UriHelper.UriCreate(ConvertProcessContext.ServiceStationUri)); |
50 | 59 |
StationServiceClient = new StationServiceClient(myBinding, myEndpoint); |
51 | 60 |
gIsApiDownload = ConvertProcessContext.IsApiDownload; |
... | ... | |
181 | 190 |
|
182 | 191 |
saveitem.Status = result.StatusCode; |
183 | 192 |
saveitem.ErrorMessage = result.Message; |
184 |
|
|
185 |
if(saveitem.Status < StatusCodeType.Completed) |
|
193 |
|
|
194 |
if (saveitem.Status < StatusCodeType.Completed)
|
|
186 | 195 |
{ |
187 | 196 |
saveitem.Status = StatusCodeType.Error; |
188 | 197 |
saveitem.ErrorMessage = "unknown error"; |
... | ... | |
197 | 206 |
Status = saveitem.Status |
198 | 207 |
})); |
199 | 208 |
|
200 |
// 플러그인 실행 |
|
201 |
#if PROCESS_TEST |
|
202 |
|
|
203 |
Console.WriteLine($"run Plugin : {saveitem.Id}"); |
|
204 |
#endif |
|
205 |
PluginService.Run(saveitem.Id); |
|
206 |
|
|
207 |
#if PROCESS_TEST |
|
208 |
|
|
209 |
Console.WriteLine($"finish!!!"); |
|
210 |
#endif |
|
211 | 209 |
|
212 | 210 |
StationServiceClient.ConvertFinish(saveitem.Id, (int)saveitem.Status, saveitem.CurrentPage, saveitem.TotalPages, saveitem.ErrorMessage); |
213 | 211 |
} |
... | ... | |
227 | 225 |
|
228 | 226 |
logger.Error($"File Convert Error", ex); |
229 | 227 |
|
228 |
logger.Error($"saveitem.Id : {saveitem.Id} , StatusCode:{(int)saveitem.Status}, CurrentPage : {saveitem.CurrentPage}, TotalPages : {saveitem.TotalPages} , Error : {saveitem.ErrorMessage}"); |
|
229 |
StationServiceClient.ConvertFinish(saveitem.Id, (int)saveitem.Status, saveitem.CurrentPage, saveitem.TotalPages, $"ConvertService Error {saveitem.Id} {saveitem.ErrorMessage }"); |
|
230 |
} |
|
231 |
|
|
232 |
try |
|
233 |
{ |
|
234 |
// 플러그인 실행 |
|
230 | 235 |
#if PROCESS_TEST |
231 | 236 |
|
232 | 237 |
Console.WriteLine($"run Plugin : {saveitem.Id}"); |
233 | 238 |
#endif |
234 |
logger.Error($"saveitem.Id : {saveitem.Id} , StatusCode:{(int)saveitem.Status}, CurrentPage : {saveitem.CurrentPage}, TotalPages : {saveitem.TotalPages} , Error : {saveitem.ErrorMessage}"); |
|
235 |
StationServiceClient.ConvertFinish(saveitem.Id, (int)saveitem.Status, saveitem.CurrentPage, saveitem.TotalPages, $"ConvertService Error {saveitem.Id} {saveitem.ErrorMessage }"); |
|
239 |
PluginService.Run(saveitem.Id); |
|
236 | 240 |
|
241 |
#if PROCESS_TEST |
|
242 |
|
|
243 |
Console.WriteLine($"finish!!!"); |
|
244 |
#endif |
|
245 |
} |
|
246 |
catch (Exception ex) |
|
247 |
{ |
|
248 |
|
|
249 |
throw; |
|
237 | 250 |
} |
238 | 251 |
|
239 | 252 |
return saveitem; |
240 | 253 |
} |
241 | 254 |
|
255 |
private bool MoveOldFiles(string originPath) |
|
256 |
{ |
|
257 |
bool result = false; |
|
258 |
|
|
259 |
try |
|
260 |
{ |
|
261 |
DirectoryInfo dir = new DirectoryInfo(originPath); |
|
262 |
} |
|
263 |
catch (Exception) |
|
264 |
{ |
|
265 |
} |
|
266 |
|
|
267 |
return result; |
|
268 |
} |
|
269 |
|
|
242 | 270 |
private SaveResult Convert(SaveItem saveitem) |
243 | 271 |
{ |
244 | 272 |
SaveResult result = new SaveResult(); |
... | ... | |
341 | 369 |
|
342 | 370 |
try |
343 | 371 |
{ |
344 |
using (Markus.Service.DataBase.ConvertDatabase database = new Markus.Service.DataBase.ConvertDatabase(ConvertProcessContext.ConnectionString))
|
|
372 |
using (DOCINFORepository dOCINFORepository = new DOCINFORepository(ConvertProcessContext.ConnectionString))
|
|
345 | 373 |
{ |
346 |
List<EntityModel.DOCPAGE> docPageList = new List<EntityModel.DOCPAGE>();
|
|
374 |
var docinfoId = dOCINFORepository.CreateAsync(convertDocID: saveitem.Id, PageCount: result.PageInfoList.Count()).GetAwaiter().GetResult();
|
|
347 | 375 |
|
348 |
docPageList = result.PageInfoList.Select(f => new EntityModel.DOCPAGE
|
|
376 |
using (DOCPAGERepository database = new DOCPAGERepository(ConvertProcessContext.ConnectionString))
|
|
349 | 377 |
{ |
350 |
ID = GuidExtension.shortGuid(), |
|
351 |
PAGE_WIDTH = f.Width.ToString(), |
|
352 |
PAGE_HEIGHT = f.Height.ToString(), |
|
353 |
PAGE_NUMBER = f.PageNo |
|
354 |
}).ToList(); |
|
355 |
|
|
356 |
docSetResult = database.SetDocumentInfo(saveitem.Id, result.PageInfoList.Count, docPageList); |
|
378 |
var docPageList = result.PageInfoList.Select(f => new DOCPAGE |
|
379 |
{ |
|
380 |
DOCINFO_ID = docinfoId, |
|
381 |
PAGE_ANGLE = 0, |
|
382 |
PAGE_WIDTH = f.Width.ToString(), |
|
383 |
PAGE_HEIGHT = f.Height.ToString(), |
|
384 |
PAGE_NUMBER = f.PageNo |
|
385 |
}); |
|
386 |
|
|
387 |
docSetResult = database.CreateAsync(docPageList).GetAwaiter().GetResult(); |
|
388 |
} |
|
357 | 389 |
} |
390 |
|
|
391 |
saveitem.CurrentPage = result.PageInfoList.Max(x => x.PageNo); |
|
392 |
|
|
358 | 393 |
} |
359 | 394 |
catch (Exception ex) |
360 | 395 |
{ |
361 |
result.Message += ex.ToString();
|
|
396 |
result.Message += LogHelper.GetStack() + " " + $"Doc Set Error. {ex.Message}";
|
|
362 | 397 |
} |
363 | 398 |
|
364 | 399 |
if (docSetResult) |
... | ... | |
590 | 625 |
private SaveResult ConvertBigFileProcess(int totalPages,string convertId, string downloadFilePath, string savePath, int minimumFontSize,int useResolution,string fontsFolder) |
591 | 626 |
{ |
592 | 627 |
SaveResult result = new SaveResult(); |
593 |
|
|
628 |
|
|
594 | 629 |
try |
595 | 630 |
{ |
596 | 631 |
for (int currentPageNo = 1; currentPageNo <= totalPages; currentPageNo++) |
ConvertService/ServiceBase/Markus.Service.Convert/FileDownloadResult.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using System.Threading.Tasks; |
|
6 |
|
|
7 |
namespace Markus.Service |
|
8 |
{ |
|
9 |
public class FileDownloadResult |
|
10 |
{ |
|
11 |
public bool IsSuccess { get; set; } |
|
12 |
public string DownloadFilePath { get; set; } |
|
13 |
public Exception Exception { get; set; } |
|
14 |
} |
|
15 |
} |
ConvertService/ServiceBase/Markus.Service.Convert/Markus.Service.Convert.csproj | ||
---|---|---|
9 | 9 |
<AppDesignerFolder>Properties</AppDesignerFolder> |
10 | 10 |
<RootNamespace>Markus.Service</RootNamespace> |
11 | 11 |
<AssemblyName>Markus.Service.Convert</AssemblyName> |
12 |
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
|
12 |
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
|
13 | 13 |
<FileAlignment>512</FileAlignment> |
14 | 14 |
<Deterministic>true</Deterministic> |
15 | 15 |
<NuGetPackageImportStamp> |
16 | 16 |
</NuGetPackageImportStamp> |
17 | 17 |
<TargetFrameworkProfile /> |
18 |
<PublishUrl>게시\</PublishUrl> |
|
19 |
<Install>true</Install> |
|
20 |
<InstallFrom>Disk</InstallFrom> |
|
21 |
<UpdateEnabled>false</UpdateEnabled> |
|
22 |
<UpdateMode>Foreground</UpdateMode> |
|
23 |
<UpdateInterval>7</UpdateInterval> |
|
24 |
<UpdateIntervalUnits>Days</UpdateIntervalUnits> |
|
25 |
<UpdatePeriodically>false</UpdatePeriodically> |
|
26 |
<UpdateRequired>false</UpdateRequired> |
|
27 |
<MapFileExtensions>true</MapFileExtensions> |
|
28 |
<ApplicationRevision>0</ApplicationRevision> |
|
29 |
<ApplicationVersion>1.0.0.%2a</ApplicationVersion> |
|
30 |
<IsWebBootstrapper>false</IsWebBootstrapper> |
|
31 |
<UseApplicationTrust>false</UseApplicationTrust> |
|
32 |
<BootstrapperEnabled>true</BootstrapperEnabled> |
|
18 | 33 |
</PropertyGroup> |
19 | 34 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
20 | 35 |
<DebugSymbols>true</DebugSymbols> |
... | ... | |
120 | 135 |
<Project>{a5ba7325-379c-4ccb-b156-1704fc2175e3}</Project> |
121 | 136 |
<Name>Markus.Service.Convert.IPlugin</Name> |
122 | 137 |
</ProjectReference> |
123 |
<ProjectReference Include="..\Markus.Service.DataBase\Markus.Service.DataBase.csproj">
|
|
124 |
<Project>{400736fb-92c9-4bc0-b447-e8274103d813}</Project>
|
|
125 |
<Name>Markus.Service.DataBase</Name> |
|
138 |
<ProjectReference Include="..\Markus.Service.DataBase.Dapper\Markus.Service.DataBase.Dapper.csproj">
|
|
139 |
<Project>{f835dd07-7f0c-4dbd-a596-f3110d187421}</Project>
|
|
140 |
<Name>Markus.Service.DataBase.Dapper</Name>
|
|
126 | 141 |
</ProjectReference> |
127 | 142 |
<ProjectReference Include="..\Markus.Service.Extensions\Markus.Service.Extensions.csproj"> |
128 | 143 |
<Project>{5F983789-3E8F-4F9A-A601-138C3A83CA5F}</Project> |
... | ... | |
140 | 155 |
<WCFMetadata Include="Connected Services\" /> |
141 | 156 |
</ItemGroup> |
142 | 157 |
<ItemGroup> |
143 |
<PackageReference Include="EntityFramework"> |
|
144 |
<Version>6.4.4</Version> |
|
145 |
</PackageReference> |
|
146 | 158 |
<PackageReference Include="log4net"> |
147 | 159 |
<Version>2.0.8</Version> |
148 | 160 |
</PackageReference> |
149 |
<PackageReference Include="Markus.EntityModel"> |
|
150 |
<Version>1.0.0</Version> |
|
151 |
</PackageReference> |
|
152 | 161 |
<PackageReference Include="Markus.Message"> |
153 | 162 |
<Version>2.0.0</Version> |
154 | 163 |
</PackageReference> |
... | ... | |
162 | 171 |
<Version>0.3.8</Version> |
163 | 172 |
</PackageReference> |
164 | 173 |
</ItemGroup> |
174 |
<ItemGroup> |
|
175 |
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> |
|
176 |
<Visible>False</Visible> |
|
177 |
<ProductName>.NET Framework 3.5 SP1</ProductName> |
|
178 |
<Install>false</Install> |
|
179 |
</BootstrapperPackage> |
|
180 |
</ItemGroup> |
|
165 | 181 |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
166 | 182 |
</Project> |
ConvertService/ServiceBase/Markus.Service.Convert/app.config | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?>
|
|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 | 2 |
<configuration> |
3 | 3 |
<configSections> |
4 | 4 |
|
5 | 5 |
|
6 |
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
|
6 |
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/> |
|
7 | 7 |
</configSections> |
8 | 8 |
<system.serviceModel> |
9 |
<bindings />
|
|
10 |
<client />
|
|
9 |
<bindings/> |
|
10 |
<client/> |
|
11 | 11 |
</system.serviceModel> |
12 | 12 |
<entityFramework> |
13 |
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
|
|
13 |
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/> |
|
14 | 14 |
<providers> |
15 |
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
|
15 |
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/> |
|
16 | 16 |
</providers> |
17 | 17 |
</entityFramework> |
18 | 18 |
<startup> |
19 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
|
|
19 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
|
|
20 | 20 |
</startup> |
21 |
</configuration> |
|
21 |
</configuration> |
ConvertService/ServiceBase/Markus.Service.ConvertPath/ConvertPath.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.IO; |
|
4 |
using System.Linq; |
|
5 |
using System.Text; |
|
6 |
using System.Threading.Tasks; |
|
7 |
|
|
8 |
namespace Markus |
|
9 |
{ |
|
10 |
public static class CreateConvertPath |
|
11 |
{ |
|
12 |
public static string Get(string BaseStoragePath, string ProjectNo, string DocumentID) |
|
13 |
{ |
|
14 |
int outValue = 0; |
|
15 |
if (int.TryParse(DocumentID, out outValue)) |
|
16 |
{ |
|
17 |
return GetWhenInt(BaseStoragePath, ProjectNo, DocumentID); |
|
18 |
} |
|
19 |
else |
|
20 |
{ |
|
21 |
return GetWhenString(BaseStoragePath, ProjectNo, DocumentID); |
|
22 |
} |
|
23 |
|
|
24 |
} |
|
25 |
|
|
26 |
private static string GetWhenString(string BaseStoragePath, string ProjectNo, string DocumentID) |
|
27 |
{ |
|
28 |
return Path.Combine(BaseStoragePath, ProjectNo + "_Tile", DocumentID.Substring(0, 5).ToString(), DocumentID); |
|
29 |
} |
|
30 |
|
|
31 |
private static string GetWhenInt(string BaseStoragePath, string ProjectNo, string DocumentID) |
|
32 |
{ |
|
33 |
return Path.Combine(BaseStoragePath, ProjectNo + "_Tile", (System.Convert.ToInt64(DocumentID) / 100).ToString(), DocumentID); |
|
34 |
} |
|
35 |
} |
|
36 |
} |
ConvertService/ServiceBase/Markus.Service.ConvertPath/Markus.Service.ConvertPath.csproj | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
3 |
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
|
4 |
<PropertyGroup> |
|
5 |
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|
6 |
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|
7 |
<ProjectGuid>{049371B3-816C-4104-9386-2F830B6BA7E5}</ProjectGuid> |
|
8 |
<OutputType>Library</OutputType> |
|
9 |
<AppDesignerFolder>Properties</AppDesignerFolder> |
|
10 |
<RootNamespace>Markus</RootNamespace> |
|
11 |
<AssemblyName>Markus</AssemblyName> |
|
12 |
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> |
|
13 |
<FileAlignment>512</FileAlignment> |
|
14 |
<Deterministic>true</Deterministic> |
|
15 |
</PropertyGroup> |
|
16 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|
17 |
<DebugSymbols>true</DebugSymbols> |
|
18 |
<DebugType>full</DebugType> |
|
19 |
<Optimize>false</Optimize> |
|
20 |
<OutputPath>bin\Debug\</OutputPath> |
|
21 |
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|
22 |
<ErrorReport>prompt</ErrorReport> |
|
23 |
<WarningLevel>4</WarningLevel> |
|
24 |
</PropertyGroup> |
|
25 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|
26 |
<DebugType>pdbonly</DebugType> |
|
27 |
<Optimize>true</Optimize> |
|
28 |
<OutputPath>bin\Release\</OutputPath> |
|
29 |
<DefineConstants>TRACE</DefineConstants> |
|
30 |
<ErrorReport>prompt</ErrorReport> |
|
31 |
<WarningLevel>4</WarningLevel> |
|
32 |
</PropertyGroup> |
|
33 |
<ItemGroup> |
|
34 |
<Reference Include="System" /> |
|
35 |
<Reference Include="System.Core" /> |
|
36 |
<Reference Include="System.Xml.Linq" /> |
|
37 |
<Reference Include="System.Data.DataSetExtensions" /> |
|
38 |
<Reference Include="Microsoft.CSharp" /> |
|
39 |
<Reference Include="System.Data" /> |
|
40 |
<Reference Include="System.Net.Http" /> |
|
41 |
<Reference Include="System.Xml" /> |
|
42 |
</ItemGroup> |
|
43 |
<ItemGroup> |
|
44 |
<Compile Include="ConvertPath.cs" /> |
|
45 |
<Compile Include="Properties\AssemblyInfo.cs" /> |
|
46 |
</ItemGroup> |
|
47 |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|
48 |
</Project> |
ConvertService/ServiceBase/Markus.Service.ConvertPath/Properties/AssemblyInfo.cs | ||
---|---|---|
1 |
using System.Reflection; |
|
2 |
using System.Runtime.CompilerServices; |
|
3 |
using System.Runtime.InteropServices; |
|
4 |
|
|
5 |
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 |
|
6 |
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면 |
|
7 |
// 이러한 특성 값을 변경하세요. |
|
8 |
[assembly: AssemblyTitle("Markus.Service.ConvertPath")] |
|
9 |
[assembly: AssemblyDescription("")] |
|
10 |
[assembly: AssemblyConfiguration("")] |
|
11 |
[assembly: AssemblyCompany("")] |
|
12 |
[assembly: AssemblyProduct("Markus.Service.ConvertPath")] |
|
13 |
[assembly: AssemblyCopyright("Copyright © 2022")] |
|
14 |
[assembly: AssemblyTrademark("")] |
|
15 |
[assembly: AssemblyCulture("")] |
|
16 |
|
|
17 |
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 |
|
18 |
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면 |
|
19 |
// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요. |
|
20 |
[assembly: ComVisible(false)] |
|
21 |
|
|
22 |
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다. |
|
23 |
[assembly: Guid("049371b3-816c-4104-9386-2f830b6ba7e5")] |
|
24 |
|
|
25 |
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다. |
|
26 |
// |
|
27 |
// 주 버전 |
|
28 |
// 부 버전 |
|
29 |
// 빌드 번호 |
|
30 |
// 수정 버전 |
|
31 |
// |
|
32 |
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를 |
|
33 |
// 기본값으로 할 수 있습니다. |
|
34 |
// [assembly: AssemblyVersion("1.0.*")] |
|
35 |
[assembly: AssemblyVersion("1.0.0.0")] |
|
36 |
[assembly: AssemblyFileVersion("1.0.0.0")] |
ConvertService/ServiceBase/Markus.Service.ConvertProcess/App.config | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?>
|
|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 | 2 |
<configuration> |
3 | 3 |
<configSections> |
4 | 4 |
|
5 |
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
|
5 |
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/> |
|
6 | 6 |
</configSections> |
7 | 7 |
<startup> |
8 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
|
|
8 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
|
|
9 | 9 |
</startup> |
10 | 10 |
<entityFramework> |
11 |
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
|
|
11 |
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/> |
|
12 | 12 |
<providers> |
13 |
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
|
13 |
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/> |
|
14 | 14 |
</providers> |
15 | 15 |
</entityFramework> |
16 | 16 |
<system.serviceModel> |
17 |
<bindings />
|
|
18 |
<client />
|
|
17 |
<bindings/> |
|
18 |
<client/> |
|
19 | 19 |
</system.serviceModel> |
20 | 20 |
<runtime> |
21 |
<loadFromRemoteSources enabled="true" />
|
|
21 |
<loadFromRemoteSources enabled="true"/> |
|
22 | 22 |
</runtime> |
23 |
</configuration> |
|
23 |
</configuration> |
ConvertService/ServiceBase/Markus.Service.ConvertProcess/Markus.Service.ConvertProcess.csproj | ||
---|---|---|
8 | 8 |
<OutputType>Exe</OutputType> |
9 | 9 |
<RootNamespace>Markus.Service.ConvertProcess</RootNamespace> |
10 | 10 |
<AssemblyName>Markus.Service.ConvertProcess</AssemblyName> |
11 |
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
|
11 |
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
|
12 | 12 |
<FileAlignment>512</FileAlignment> |
13 | 13 |
<Deterministic>true</Deterministic> |
14 | 14 |
<NuGetPackageImportStamp> |
15 | 15 |
</NuGetPackageImportStamp> |
16 | 16 |
<TargetFrameworkProfile /> |
17 |
<PublishUrl>게시\</PublishUrl> |
|
18 |
<Install>true</Install> |
|
19 |
<InstallFrom>Disk</InstallFrom> |
|
20 |
<UpdateEnabled>false</UpdateEnabled> |
|
21 |
<UpdateMode>Foreground</UpdateMode> |
|
22 |
<UpdateInterval>7</UpdateInterval> |
|
23 |
<UpdateIntervalUnits>Days</UpdateIntervalUnits> |
|
24 |
<UpdatePeriodically>false</UpdatePeriodically> |
|
25 |
<UpdateRequired>false</UpdateRequired> |
|
26 |
<MapFileExtensions>true</MapFileExtensions> |
|
27 |
<ApplicationRevision>0</ApplicationRevision> |
|
28 |
<ApplicationVersion>1.0.0.%2a</ApplicationVersion> |
|
29 |
<IsWebBootstrapper>false</IsWebBootstrapper> |
|
30 |
<UseApplicationTrust>false</UseApplicationTrust> |
|
31 |
<BootstrapperEnabled>true</BootstrapperEnabled> |
|
17 | 32 |
</PropertyGroup> |
18 | 33 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
19 | 34 |
<PlatformTarget>AnyCPU</PlatformTarget> |
... | ... | |
162 | 177 |
<Project>{867e065c-3c22-47b1-9c2a-130a78dddd51}</Project> |
163 | 178 |
<Name>Markus.Service.Convert</Name> |
164 | 179 |
</ProjectReference> |
165 |
<ProjectReference Include="..\Markus.Service.DataBase\Markus.Service.DataBase.csproj"> |
|
166 |
<Project>{400736fb-92c9-4bc0-b447-e8274103d813}</Project> |
|
167 |
<Name>Markus.Service.DataBase</Name> |
|
168 |
</ProjectReference> |
|
169 | 180 |
<ProjectReference Include="..\Markus.Service.Extensions\Markus.Service.Extensions.csproj"> |
170 | 181 |
<Project>{5F983789-3E8F-4F9A-A601-138C3A83CA5F}</Project> |
171 | 182 |
<Name>Markus.Service.Extensions</Name> |
... | ... | |
184 | 195 |
</None> |
185 | 196 |
</ItemGroup> |
186 | 197 |
<ItemGroup> |
187 |
<PackageReference Include="EntityFramework"> |
|
188 |
<Version>6.4.4</Version> |
|
189 |
</PackageReference> |
|
190 | 198 |
<PackageReference Include="log4net"> |
191 | 199 |
<Version>2.0.8</Version> |
192 | 200 |
</PackageReference> |
... | ... | |
202 | 210 |
<PrivateAssets>all</PrivateAssets> |
203 | 211 |
</PackageReference> |
204 | 212 |
</ItemGroup> |
213 |
<ItemGroup> |
|
214 |
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> |
|
215 |
<Visible>False</Visible> |
|
216 |
<ProductName>.NET Framework 3.5 SP1</ProductName> |
|
217 |
<Install>false</Install> |
|
218 |
</BootstrapperPackage> |
|
219 |
</ItemGroup> |
|
205 | 220 |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
206 | 221 |
<PropertyGroup> |
207 | 222 |
<PreBuildEvent>rem xcopy /y /d "$(ProjectDir)..\libpthread\$(PlatformName)\libpthread.dll" "$(ProjectDir)$(OutDir)" |
208 | 223 |
|
209 | 224 |
if $(ConfigurationName) == ConvertProcessTest ( |
210 | 225 |
xcopy /y /d /I /s "$(TargetDir)plugin.ini" "$(TargetDir)\..\" |
211 |
xcopy /y /d /I /s "$(ProjectDir)..\publish\Plugin\*.*" "$(TargetDir)\..\Plugin" |
|
226 |
xcopy /y /d /I /s "$(ProjectDir)..\publish\Plugin\ErrorNotice\*.*" "$(TargetDir)\..\Plugin" |
|
227 |
rem xcopy /y /d /I /s "$(ProjectDir)..\publish\Plugin\*.*" "$(TargetDir)\..\Plugin" |
|
212 | 228 |
xcopy /y /d /I /s "$(ProjectDir)..\publish\DownloadPlugin\*.*" "$(TargetDir)\..\DownloadPlugin" |
213 | 229 |
)</PreBuildEvent> |
214 | 230 |
</PropertyGroup> |
ConvertService/ServiceBase/Markus.Service.ConvertProcess/Program.cs | ||
---|---|---|
38 | 38 |
|
39 | 39 |
convetContext = ObjectToBytesStringConvert.BytesStringToObject<ProcessContext>(AESEncrypter.Decrypt(args[1])); |
40 | 40 |
#if PROCESS_TEST |
41 |
convetContext.ConvertID = "b9dceab8fab66c765a38b3ebd6c6faae";
|
|
42 |
convetContext.OriginFilePath = "http://192.168.0.67:5977/PDF/000005_app/lockfile1.pdf";
|
|
41 |
convetContext.ConvertID = "F26E631A8A5C4130BAEB2884B840853A";
|
|
42 |
convetContext.OriginFilePath = "http://192.168.0.67:5977/PDF/000005_app/VP-UT-BC-E1-SPE-002.pdf";
|
|
43 | 43 |
convetContext.ServiceStationUri = "http://localhost:9991/StationService"; |
44 | 44 |
#endif |
45 | 45 |
|
... | ... | |
68 | 68 |
#if PROCESS_TEST |
69 | 69 |
Console.ReadLine(); |
70 | 70 |
#else |
71 |
Application.ExitThread(); |
|
71 | 72 |
System.Environment.Exit(1); |
72 | 73 |
#endif |
73 | 74 |
} |
ConvertService/ServiceBase/Markus.Service.DataBase.Dapper/ConvertDatabase.cs | ||
---|---|---|
1 |
|
|
2 |
using System; |
|
3 |
using System.Collections.Generic; |
|
4 |
using System.IO; |
|
5 |
using System.Linq; |
|
6 |
using System.Text; |
|
7 |
using System.Threading.Tasks; |
|
8 |
using System.Data.SqlClient; |
|
9 |
using Markus.Message; |
|
10 |
using Markus.Service.DataBase.Repositories; |
|
11 |
|
|
12 |
namespace Markus.Service.DataBase.Dapper |
|
13 |
{ |
|
14 |
public class ConvertDatabase : IDisposable |
|
15 |
{ |
|
16 |
#region Constructor |
|
17 |
|
|
18 |
public readonly string ConnectionString; |
|
19 |
|
|
20 |
public ConvertDatabase(string connectionString) |
|
21 |
{ |
|
22 |
try |
|
23 |
{ |
|
24 |
ConnectionString = connectionString; |
|
25 |
} |
|
26 |
catch (Exception ex) |
|
27 |
{ |
|
28 |
System.Diagnostics.Debug.WriteLine(ex.ToString()); |
|
29 |
throw ex; |
|
30 |
} |
|
31 |
} |
|
32 |
|
|
33 |
public void Dispose() |
|
34 |
{ |
|
35 |
} |
|
36 |
|
|
37 |
|
|
38 |
#endregion |
|
39 |
|
|
40 |
/// <summary> |
|
41 |
/// service에서 대기중이거나 오류인 아이템을 가져가서 컨버터 프로세스를 호출한다. |
|
42 |
/// 컨버터 상태가 에러이거나 2보다 작은 경우 |
|
43 |
/// UniqueKey는 각 데이터베이스의 문서 정보에서 유일한 키이며 컨버터저장에서 같은 폴더로의 저장을 방지 한다. |
|
44 |
/// |
|
45 |
/// </summary> |
|
46 |
/// <param name="aliveItems"></param> |
내보내기 Unified diff