개정판 6a2ed960
Fix: FinalProcess 수정
Change-Id: Ia7d67b635b514b3333e2fad88f0011683c8b3cb0
FinalService/KCOM_FinalService_DL/FinalPDFAgent/App.config | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8" ?> |
|
2 |
<configuration> |
|
3 |
<startup> |
|
4 |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> |
|
5 |
</startup> |
|
6 |
</configuration> |
FinalService/KCOM_FinalService_DL/FinalPDFAgent/FinalPDFAgent.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>{2F3150F6-9410-4B2D-B939-66E13FEA431D}</ProjectGuid> |
|
8 |
<OutputType>Exe</OutputType> |
|
9 |
<RootNamespace>FinalPDFAgent</RootNamespace> |
|
10 |
<AssemblyName>FinalPDFAgent</AssemblyName> |
|
11 |
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> |
|
12 |
<FileAlignment>512</FileAlignment> |
|
13 |
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> |
|
14 |
<Deterministic>true</Deterministic> |
|
15 |
</PropertyGroup> |
|
16 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|
17 |
<PlatformTarget>AnyCPU</PlatformTarget> |
|
18 |
<DebugSymbols>true</DebugSymbols> |
|
19 |
<DebugType>full</DebugType> |
|
20 |
<Optimize>false</Optimize> |
|
21 |
<OutputPath>..\KCOM_FinalService\bin\Debug\</OutputPath> |
|
22 |
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|
23 |
<ErrorReport>prompt</ErrorReport> |
|
24 |
<WarningLevel>4</WarningLevel> |
|
25 |
</PropertyGroup> |
|
26 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|
27 |
<PlatformTarget>AnyCPU</PlatformTarget> |
|
28 |
<DebugType>pdbonly</DebugType> |
|
29 |
<Optimize>true</Optimize> |
|
30 |
<OutputPath>bin\Release\</OutputPath> |
|
31 |
<DefineConstants>TRACE</DefineConstants> |
|
32 |
<ErrorReport>prompt</ErrorReport> |
|
33 |
<WarningLevel>4</WarningLevel> |
|
34 |
</PropertyGroup> |
|
35 |
<ItemGroup> |
|
36 |
<Reference Include="System" /> |
|
37 |
<Reference Include="System.Core" /> |
|
38 |
<Reference Include="System.Xml.Linq" /> |
|
39 |
<Reference Include="System.Data.DataSetExtensions" /> |
|
40 |
<Reference Include="Microsoft.CSharp" /> |
|
41 |
<Reference Include="System.Data" /> |
|
42 |
<Reference Include="System.Net.Http" /> |
|
43 |
<Reference Include="System.Xml" /> |
|
44 |
</ItemGroup> |
|
45 |
<ItemGroup> |
|
46 |
<Compile Include="Program.cs" /> |
|
47 |
<Compile Include="Properties\AssemblyInfo.cs" /> |
|
48 |
</ItemGroup> |
|
49 |
<ItemGroup> |
|
50 |
<None Include="App.config" /> |
|
51 |
</ItemGroup> |
|
52 |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|
53 |
</Project> |
FinalService/KCOM_FinalService_DL/FinalPDFAgent/Program.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 FinalPDFAgent |
|
9 |
{ |
|
10 |
public enum ELogLv |
|
11 |
{ |
|
12 |
info = 2, |
|
13 |
warn = 1, |
|
14 |
error = 0, |
|
15 |
} |
|
16 |
|
|
17 |
public class LogManager |
|
18 |
{ |
|
19 |
FileStream fileStream = null; |
|
20 |
StreamWriter streamWrite = null; |
|
21 |
public ELogLv eCurLogLv = ELogLv.info; |
|
22 |
|
|
23 |
public LogManager() |
|
24 |
{ |
|
25 |
CreateLogFile(); |
|
26 |
} |
|
27 |
|
|
28 |
public void CreateLogFile() |
|
29 |
{ |
|
30 |
string strNowTime = DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss"); |
|
31 |
|
|
32 |
if (Directory.Exists("log") == false) |
|
33 |
Directory.CreateDirectory("log"); |
|
34 |
|
|
35 |
fileStream = new FileStream($"log\\log.{strNowTime}.txt", FileMode.CreateNew); |
|
36 |
streamWrite = new StreamWriter(fileStream, System.Text.Encoding.UTF8); |
|
37 |
} |
|
38 |
|
|
39 |
public void Log(ELogLv eLogLv, string desc) |
|
40 |
{ |
|
41 |
// eLogLv이 info이면 -> info, warn, error 로그 남김 |
|
42 |
// eLogLv이 warn이면 -> warn, error 로그 남김 |
|
43 |
// eLogLv이 error이면 -> error 로그 남김 |
|
44 |
if (eCurLogLv < eLogLv) |
|
45 |
return; |
|
46 |
|
|
47 |
System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame(1, true); |
|
48 |
string funcName = stackFrame.GetMethod().Name; |
|
49 |
string fileName = stackFrame.GetFileName(); |
|
50 |
string fileLine = stackFrame.GetFileLineNumber().ToString(); |
|
51 |
|
|
52 |
// ,(콤마)는 .csv 파일에서 구분문자로 사용 |
|
53 |
desc = desc.Replace(",", "."); |
|
54 |
|
|
55 |
desc = $"{eLogLv.ToString()},\t{desc},\t{funcName},\t{fileName} {fileLine},\t{DateTime.Now}"; |
|
56 |
|
|
57 |
streamWrite.WriteLine(desc); |
|
58 |
streamWrite.Flush(); |
|
59 |
fileStream.Flush(); |
|
60 |
|
|
61 |
Int64 fileSize = fileStream.Length; |
|
62 |
|
|
63 |
// 파일 사이즈가 2메가가 넘으면 해당 파일 닫은 후 파일 생성 |
|
64 |
if (fileSize > 2097152) |
|
65 |
{ |
|
66 |
streamWrite.Close(); |
|
67 |
fileStream.Close(); |
|
68 |
CreateLogFile(); |
|
69 |
} |
|
70 |
} |
|
71 |
} |
|
72 |
|
|
73 |
internal class Program |
|
74 |
{ |
|
75 |
public static LogManager log { get; } = new LogManager(); |
|
76 |
|
|
77 |
static void Main(string[] args) |
|
78 |
{ |
|
79 |
foreach (string arg in args) |
|
80 |
{ |
|
81 |
Program.log.Log(ELogLv.info, arg); |
|
82 |
} |
|
83 |
} |
|
84 |
} |
|
85 |
} |
FinalService/KCOM_FinalService_DL/FinalPDFAgent/Properties/AssemblyInfo.cs | ||
---|---|---|
1 |
using System.Reflection; |
|
2 |
using System.Runtime.CompilerServices; |
|
3 |
using System.Runtime.InteropServices; |
|
4 |
|
|
5 |
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 |
|
6 |
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면 |
|
7 |
// 이러한 특성 값을 변경하세요. |
|
8 |
[assembly: AssemblyTitle("FinalPDFAgent")] |
|
9 |
[assembly: AssemblyDescription("")] |
|
10 |
[assembly: AssemblyConfiguration("")] |
|
11 |
[assembly: AssemblyCompany("")] |
|
12 |
[assembly: AssemblyProduct("FinalPDFAgent")] |
|
13 |
[assembly: AssemblyCopyright("Copyright © 2024")] |
|
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("2f3150f6-9410-4b2d-b939-66e13fea431d")] |
|
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")] |
FinalService/KCOM_FinalService_DL/FinalProcess/FinalProcess.csproj | ||
---|---|---|
18 | 18 |
<DebugSymbols>true</DebugSymbols> |
19 | 19 |
<DebugType>full</DebugType> |
20 | 20 |
<Optimize>false</Optimize> |
21 |
<OutputPath>..\ProcessPublish\</OutputPath>
|
|
21 |
<OutputPath>..\KCOM_FinalService\bin\Debug\</OutputPath>
|
|
22 | 22 |
<DefineConstants>DEBUG;TRACE</DefineConstants> |
23 | 23 |
<ErrorReport>prompt</ErrorReport> |
24 | 24 |
<WarningLevel>4</WarningLevel> |
... | ... | |
66 | 66 |
<Version>5.0.0</Version> |
67 | 67 |
</PackageReference> |
68 | 68 |
<PackageReference Include="iTextSharp"> |
69 |
<Version>5.5.13.2</Version>
|
|
69 |
<Version>5.5.13.3</Version>
|
|
70 | 70 |
</PackageReference> |
71 | 71 |
<PackageReference Include="log4net"> |
72 | 72 |
<Version>2.0.12</Version> |
... | ... | |
81 | 81 |
<Project>{629dc8cd-d458-47ef-8f02-cd12c7001c3e}</Project> |
82 | 82 |
<Name>KCOMDataModel</Name> |
83 | 83 |
</ProjectReference> |
84 |
<ProjectReference Include="..\MarkupToPDF\MarkupToPDF.csproj"> |
|
85 |
<Project>{a714bd67-8aac-4ed8-8ecf-7853c3549a68}</Project> |
|
86 |
<Name>MarkupToPDF</Name> |
|
87 |
</ProjectReference> |
|
84 | 88 |
</ItemGroup> |
85 | 89 |
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
86 | 90 |
</Project> |
FinalService/KCOM_FinalService_DL/FinalProcess/Program.cs | ||
---|---|---|
4 | 4 |
using MarkupToPDF; |
5 | 5 |
using System; |
6 | 6 |
using System.Collections.Generic; |
7 |
using System.IO; |
|
7 | 8 |
using System.Linq; |
8 | 9 |
using System.Text; |
9 | 10 |
using System.Threading.Tasks; |
... | ... | |
14 | 15 |
class Program |
15 | 16 |
{ |
16 | 17 |
public static bool IsEndFinal = false; |
17 |
protected static ILog logger; |
|
18 |
/// <summary> |
|
19 |
/// protected static ILog logger; |
|
20 |
/// </summary> |
|
21 |
public static LogManager logger { get; } = new LogManager(); |
|
18 | 22 |
public static FINAL_PDF finalPdf = null; |
19 | 23 |
public static string RemoteAddress = null; |
20 | 24 |
|
25 |
public enum ELogLv |
|
26 |
{ |
|
27 |
info = 2, |
|
28 |
warn = 1, |
|
29 |
error = 0, |
|
30 |
} |
|
31 |
|
|
32 |
public class LogManager |
|
33 |
{ |
|
34 |
FileStream fileStream = null; |
|
35 |
StreamWriter streamWrite = null; |
|
36 |
public ELogLv eCurLogLv = ELogLv.info; |
|
37 |
|
|
38 |
public LogManager() |
|
39 |
{ |
|
40 |
CreateLogFile(); |
|
41 |
} |
|
42 |
|
|
43 |
public void CreateLogFile() |
|
44 |
{ |
|
45 |
string strNowTime = DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss"); |
|
46 |
|
|
47 |
if (Directory.Exists("log") == false) |
|
48 |
Directory.CreateDirectory("log"); |
|
49 |
|
|
50 |
fileStream = new FileStream($"log\\log.{strNowTime}.txt", FileMode.CreateNew); |
|
51 |
streamWrite = new StreamWriter(fileStream, System.Text.Encoding.UTF8); |
|
52 |
} |
|
53 |
|
|
54 |
public void Log(ELogLv eLogLv, string desc) |
|
55 |
{ |
|
56 |
// eLogLv이 info이면 -> info, warn, error 로그 남김 |
|
57 |
// eLogLv이 warn이면 -> warn, error 로그 남김 |
|
58 |
// eLogLv이 error이면 -> error 로그 남김 |
|
59 |
if (eCurLogLv < eLogLv) |
|
60 |
return; |
|
61 |
|
|
62 |
System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame(1, true); |
|
63 |
string funcName = stackFrame.GetMethod().Name; |
|
64 |
string fileName = stackFrame.GetFileName(); |
|
65 |
string fileLine = stackFrame.GetFileLineNumber().ToString(); |
|
66 |
|
|
67 |
// ,(콤마)는 .csv 파일에서 구분문자로 사용 |
|
68 |
desc = desc.Replace(",", "."); |
|
69 |
|
|
70 |
desc = $"{eLogLv.ToString()},\t{desc},\t{funcName},\t{fileName} {fileLine},\t{DateTime.Now}"; |
|
71 |
|
|
72 |
streamWrite.WriteLine(desc); |
|
73 |
streamWrite.Flush(); |
|
74 |
fileStream.Flush(); |
|
75 |
|
|
76 |
Int64 fileSize = fileStream.Length; |
|
77 |
|
|
78 |
// 파일 사이즈가 2메가가 넘으면 해당 파일 닫은 후 파일 생성 |
|
79 |
if (fileSize > 2097152) |
|
80 |
{ |
|
81 |
streamWrite.Close(); |
|
82 |
fileStream.Close(); |
|
83 |
CreateLogFile(); |
|
84 |
} |
|
85 |
} |
|
86 |
} |
|
87 |
|
|
21 | 88 |
static void Main(string[] args) |
22 | 89 |
{ |
23 | 90 |
try |
24 | 91 |
{ |
25 |
logger = LogManager.GetLogger(typeof(Program)); |
|
92 |
///logger = LogManager.GetLogger(typeof(Program));
|
|
26 | 93 |
|
27 | 94 |
if (args.Length == 2) |
28 | 95 |
{ |
29 | 96 |
string finalID = args[0]; |
30 | 97 |
RemoteAddress = args[1]; |
31 | 98 |
|
32 |
logger.Info($"FinalProcess Final ID :{args[0]}");
|
|
99 |
Program.logger.Log(ELogLv.info, $"FinalProcess Final ID : {args[0]}");
|
|
33 | 100 |
|
34 | 101 |
MarkupToPDF.MarkupToPDF _markuptoPDF = new MarkupToPDF.MarkupToPDF(); |
35 | 102 |
_markuptoPDF.FinalMakeError += new EventHandler<MarkupToPDF.MakeFinalErrorArgs>(_markuptoPDF_FinalMakeError); |
... | ... | |
38 | 105 |
using (KCOMDataModel.DataModel.KCOMEntities _entity = new KCOMDataModel.DataModel.KCOMEntities(KCOMDataModel.Common.ConnectStringBuilder.KCOMConnectionString().ToString())) |
39 | 106 |
{ |
40 | 107 |
var items = _entity.FINAL_PDF.Where(x => x.ID == finalID); |
41 |
|
|
42 | 108 |
if(items.Count() > 0) |
43 | 109 |
{ |
44 | 110 |
finalPdf = items.First(); |
... | ... | |
48 | 114 |
if (finalPdf != null) |
49 | 115 |
{ |
50 | 116 |
_markuptoPDF.MakeFinalPDF(finalPdf); |
51 |
|
|
52 | 117 |
} |
53 | 118 |
} |
119 |
else |
|
120 |
{ |
|
121 |
Program.logger.Log(ELogLv.info, "Arguments is null"); |
|
122 |
} |
|
54 | 123 |
} |
55 | 124 |
catch (Exception ex) |
56 | 125 |
{ |
57 |
logger.Error($"FinalProcess Final ID :{args[0]}", ex);
|
|
126 |
Program.logger.Log(ELogLv.info, $"FinalProcess Final ID :{args[0]}");
|
|
58 | 127 |
} |
59 | 128 |
finally |
60 | 129 |
{ |
... | ... | |
71 | 140 |
using (KCOMDataModel.DataModel.KCOMEntities _entity = new KCOMDataModel.DataModel.KCOMEntities(KCOMDataModel.Common.ConnectStringBuilder.KCOMConnectionString().ToString())) |
72 | 141 |
{ |
73 | 142 |
var items = _entity.FINAL_PDF.Where(x => x.ID == e.FinalPDF.ID); |
74 |
|
|
75 | 143 |
if (items.Count() > 0) |
76 | 144 |
{ |
77 |
if (e.Error == null)
|
|
145 |
if (string.IsNullOrEmpty(e.Error))
|
|
78 | 146 |
{ |
79 | 147 |
items.First().STATUS = 4; |
80 | 148 |
items.First().END_DATETIME = DateTime.Now; |
FinalService/KCOM_FinalService_DL/KCOM_FinalService/FinalService.cs | ||
---|---|---|
2 | 2 |
using KCOM_FinalService.Remoting; |
3 | 3 |
using System; |
4 | 4 |
using System.Collections.Generic; |
5 |
using System.ComponentModel; |
|
6 | 5 |
using System.Data; |
7 | 6 |
using System.Diagnostics; |
8 | 7 |
using System.Linq; |
9 | 8 |
using System.ServiceProcess; |
10 |
using System.Text; |
|
11 | 9 |
using System.Threading; |
10 |
using System.Diagnostics; |
|
12 | 11 |
|
13 | 12 |
namespace KCOM_FinalService |
14 | 13 |
{ |
... | ... | |
33 | 32 |
} |
34 | 33 |
#region PROPERTIES |
35 | 34 |
System.Timers.Timer _Timer; |
36 |
private string AgentName { get; } = "FinalPDFAgent";
|
|
35 |
private string AgentName { get; } = "FinalProcess";
|
|
37 | 36 |
private Dictionary<string, DocumentProcess> FinalPDFAgentMap { get; } = new Dictionary<string, DocumentProcess>(); |
38 | 37 |
|
39 | 38 |
RemFinalPDFStation _remotingFinal { get; set; } = null; |
... | ... | |
51 | 50 |
logger.ServiceEventLog(this.EventLog, this.ServiceName, "Application"); |
52 | 51 |
} |
53 | 52 |
|
54 |
#if TEST |
|
55 |
FinalPDFAgentMap.Add(Guid.NewGuid().ToString(), new DocumentProcess("00000-123456789", -1)); |
|
56 |
#endif |
|
53 |
#region 서비스를 구동할 때 요청한 FinalPDF 목록을 가져온다. |
|
54 |
/* |
|
55 |
using (KCOMDataModel.DataModel.KCOMEntities _entity = new KCOMDataModel.DataModel.KCOMEntities(KCOMDataModel.Common.ConnectStringBuilder.KCOMConnectionString().ToString())) |
|
56 |
{ |
|
57 |
var items = _entity.FINAL_PDF.Where(x => x.STATUS != 4).ToList(); |
|
58 |
foreach(var item in items) |
|
59 |
{ |
|
60 |
FinalPDFAgentMap.Add(item.ID, new DocumentProcess($"{item.PROJECT_NO}-{item.ID}", -1)); |
|
61 |
} |
|
62 |
} |
|
63 |
*/ |
|
64 |
#endregion |
|
57 | 65 |
|
58 | 66 |
/// 타이머가 없는 경우 서비스가 로직 완료 후 종료됨 |
59 | 67 |
if (_Timer == null) |
60 | 68 |
{ |
61 | 69 |
_Timer = new System.Timers.Timer(); |
62 |
_Timer.Interval = new TimeSpan(0, 0, 5).TotalMilliseconds;
|
|
70 |
_Timer.Interval = new TimeSpan(0, 0, 60).TotalMilliseconds;
|
|
63 | 71 |
_Timer.Elapsed += _Timer_Elapsed; |
64 | 72 |
} |
65 | 73 |
} |
... | ... | |
84 | 92 |
{ |
85 | 93 |
lock (FinalPDFAgentMap) |
86 | 94 |
{ |
87 |
FinalPDFAgentMap.Add(Guid.NewGuid().ToString(), new DocumentProcess($"{ProjectNo}-{FinalID}", -1));
|
|
95 |
FinalPDFAgentMap.Add(FinalID, new DocumentProcess($"{ProjectNo}-{FinalID}", -1));
|
|
88 | 96 |
} |
89 | 97 |
} |
90 | 98 |
|
... | ... | |
116 | 124 |
string ExeName = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory , $"{AgentName}.exe"); |
117 | 125 |
|
118 | 126 |
// 실행파일 실행 |
119 |
ProcessStartInfo startInfo = new ProcessStartInfo(ExeName);
|
|
127 |
var startInfo = new System.Diagnostics.ProcessStartInfo(ExeName);
|
|
120 | 128 |
startInfo.CreateNoWindow = true; |
121 | 129 |
startInfo.UseShellExecute = false; |
122 | 130 |
startInfo.ErrorDialog = false; |
... | ... | |
125 | 133 |
startInfo.RedirectStandardOutput = true; |
126 | 134 |
startInfo.UseShellExecute = false; |
127 | 135 |
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; |
128 |
startInfo.Arguments = $"\"{ProjectNo}\" \"{FinalID}\"";
|
|
136 |
startInfo.Arguments = $"\"{FinalID}\" \"{FinalID}\"";
|
|
129 | 137 |
var process = Process.Start(startInfo); |
130 |
if (process != null) |
|
138 |
if (process != null && FinalPDFAgentMap.ContainsKey(UID))
|
|
131 | 139 |
{ |
132 | 140 |
lock (FinalPDFAgentMap) |
133 | 141 |
{ |
134 |
FinalPDFAgentMap[UID] = new DocumentProcess($"{ProjectNo}-{FinalID}", process.Id);
|
|
142 |
FinalPDFAgentMap[UID].Id = process.Id;
|
|
135 | 143 |
} |
136 | 144 |
} |
137 | 145 |
} |
... | ... | |
164 | 172 |
} |
165 | 173 |
catch (ArgumentException ex) |
166 | 174 |
{ |
175 |
var tokens = kv.Value.Document.Split('-'); |
|
176 |
string FinalID = tokens[1]; |
|
167 | 177 |
#region FinalPDF 완료 여부 확인 후 완료되지 않았으면 agent 실행 |
168 |
FinalPDFAgentMap.Remove(kv.Key); |
|
178 |
using (KCOMDataModel.DataModel.KCOMEntities _entity = new KCOMDataModel.DataModel.KCOMEntities(KCOMDataModel.Common.ConnectStringBuilder.KCOMConnectionString().ToString())) |
|
179 |
{ |
|
180 |
var items = _entity.FINAL_PDF.Where(x => x.ID == FinalID); |
|
181 |
if (items.Any() && items.First().STATUS == 4) |
|
182 |
{ |
|
183 |
FinalPDFAgentMap.Remove(kv.Key); |
|
184 |
} |
|
185 |
else |
|
186 |
{ |
|
187 |
LaunchFindPDFAgent(kv.Key, tokens[0], tokens[1]); |
|
188 |
} |
|
189 |
} |
|
169 | 190 |
#endregion |
170 | 191 |
} |
171 | 192 |
} |
FinalService/KCOM_FinalService_DL/KCOM_FinalService_DL.sln | ||
---|---|---|
29 | 29 |
EndProject |
30 | 30 |
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "FinalServiceInstall", "FinalServiceInstall\FinalServiceInstall.vdproj", "{DCF604E6-66A9-44A7-A308-3BA739FA18CD}" |
31 | 31 |
EndProject |
32 |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KCOM_FinalServiceConsole", "KCOM_FinalServiceConsole\KCOM_FinalServiceConsole.csproj", "{824A4880-EDEA-4F50-9207-F8B9E3096375}" |
|
33 |
EndProject |
|
34 | 32 |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UploadTest", "UploadTest\UploadTest.csproj", "{9F2A21D2-979E-4F9A-9BF1-F7460A80CF11}" |
35 | 33 |
EndProject |
36 | 34 |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DatabaseLoadTest", "DatabaseLoadTest\DatabaseLoadTest.csproj", "{99E36DFB-0C2C-432D-BC33-7CF6D4B947C2}" |
... | ... | |
47 | 45 |
EndProject |
48 | 46 |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MarkupToPDF", "MarkupToPDF\MarkupToPDF.csproj", "{A714BD67-8AAC-4ED8-8ECF-7853C3549A68}" |
49 | 47 |
EndProject |
50 |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FinalPDFAgent", "FinalPDFAgent\FinalPDFAgent.csproj", "{2F3150F6-9410-4B2D-B939-66E13FEA431D}" |
|
51 |
EndProject |
|
52 | 48 |
Global |
53 | 49 |
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
54 | 50 |
Debug|Any CPU = Debug|Any CPU |
... | ... | |
183 | 179 |
{DCF604E6-66A9-44A7-A308-3BA739FA18CD}.Release|Any CPU.ActiveCfg = Release |
184 | 180 |
{DCF604E6-66A9-44A7-A308-3BA739FA18CD}.Release|x64.ActiveCfg = Release |
185 | 181 |
{DCF604E6-66A9-44A7-A308-3BA739FA18CD}.Release|x86.ActiveCfg = Release |
186 |
{824A4880-EDEA-4F50-9207-F8B9E3096375}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|
187 |
{824A4880-EDEA-4F50-9207-F8B9E3096375}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|
188 |
{824A4880-EDEA-4F50-9207-F8B9E3096375}.Debug|x64.ActiveCfg = Debug|Any CPU |
|
189 |
{824A4880-EDEA-4F50-9207-F8B9E3096375}.Debug|x64.Build.0 = Debug|Any CPU |
|
190 |
{824A4880-EDEA-4F50-9207-F8B9E3096375}.Debug|x86.ActiveCfg = Debug|Any CPU |
|
191 |
{824A4880-EDEA-4F50-9207-F8B9E3096375}.Debug|x86.Build.0 = Debug|Any CPU |
|
192 |
{824A4880-EDEA-4F50-9207-F8B9E3096375}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|
193 |
{824A4880-EDEA-4F50-9207-F8B9E3096375}.Release|Any CPU.Build.0 = Release|Any CPU |
|
194 |
{824A4880-EDEA-4F50-9207-F8B9E3096375}.Release|x64.ActiveCfg = Release|Any CPU |
|
195 |
{824A4880-EDEA-4F50-9207-F8B9E3096375}.Release|x64.Build.0 = Release|Any CPU |
|
196 |
{824A4880-EDEA-4F50-9207-F8B9E3096375}.Release|x86.ActiveCfg = Release|Any CPU |
|
197 |
{824A4880-EDEA-4F50-9207-F8B9E3096375}.Release|x86.Build.0 = Release|Any CPU |
|
198 | 182 |
{9F2A21D2-979E-4F9A-9BF1-F7460A80CF11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
199 | 183 |
{9F2A21D2-979E-4F9A-9BF1-F7460A80CF11}.Debug|Any CPU.Build.0 = Debug|Any CPU |
200 | 184 |
{9F2A21D2-979E-4F9A-9BF1-F7460A80CF11}.Debug|x64.ActiveCfg = Debug|Any CPU |
... | ... | |
279 | 263 |
{A714BD67-8AAC-4ED8-8ECF-7853C3549A68}.Release|x64.Build.0 = Release|x64 |
280 | 264 |
{A714BD67-8AAC-4ED8-8ECF-7853C3549A68}.Release|x86.ActiveCfg = Release|Any CPU |
281 | 265 |
{A714BD67-8AAC-4ED8-8ECF-7853C3549A68}.Release|x86.Build.0 = Release|Any CPU |
282 |
{2F3150F6-9410-4B2D-B939-66E13FEA431D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|
283 |
{2F3150F6-9410-4B2D-B939-66E13FEA431D}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|
284 |
{2F3150F6-9410-4B2D-B939-66E13FEA431D}.Debug|x64.ActiveCfg = Debug|Any CPU |
|
285 |
{2F3150F6-9410-4B2D-B939-66E13FEA431D}.Debug|x64.Build.0 = Debug|Any CPU |
|
286 |
{2F3150F6-9410-4B2D-B939-66E13FEA431D}.Debug|x86.ActiveCfg = Debug|Any CPU |
|
287 |
{2F3150F6-9410-4B2D-B939-66E13FEA431D}.Debug|x86.Build.0 = Debug|Any CPU |
|
288 |
{2F3150F6-9410-4B2D-B939-66E13FEA431D}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|
289 |
{2F3150F6-9410-4B2D-B939-66E13FEA431D}.Release|Any CPU.Build.0 = Release|Any CPU |
|
290 |
{2F3150F6-9410-4B2D-B939-66E13FEA431D}.Release|x64.ActiveCfg = Release|Any CPU |
|
291 |
{2F3150F6-9410-4B2D-B939-66E13FEA431D}.Release|x64.Build.0 = Release|Any CPU |
|
292 |
{2F3150F6-9410-4B2D-B939-66E13FEA431D}.Release|x86.ActiveCfg = Release|Any CPU |
|
293 |
{2F3150F6-9410-4B2D-B939-66E13FEA431D}.Release|x86.Build.0 = Release|Any CPU |
|
294 | 266 |
EndGlobalSection |
295 | 267 |
GlobalSection(SolutionProperties) = preSolution |
296 | 268 |
HideSolutionNode = FALSE |
FinalService/KCOM_FinalService_DL/MarkupToPDF/MarkupToPDF.csproj | ||
---|---|---|
53 | 53 |
<Prefer32Bit>false</Prefer32Bit> |
54 | 54 |
</PropertyGroup> |
55 | 55 |
<ItemGroup> |
56 |
<Reference Include="BouncyCastle.Crypto, Version=1.8.6.0, Culture=neutral, PublicKeyToken=0e99375e54769942">
|
|
57 |
<HintPath>..\packages\BouncyCastle.1.8.6.1\lib\BouncyCastle.Crypto.dll</HintPath>
|
|
56 |
<Reference Include="BouncyCastle.Crypto, Version=1.8.9.0, Culture=neutral, PublicKeyToken=0e99375e54769942">
|
|
57 |
<HintPath>..\packages\BouncyCastle.1.8.9\lib\BouncyCastle.Crypto.dll</HintPath>
|
|
58 | 58 |
</Reference> |
59 |
<Reference Include="itextsharp, Version=5.5.13.1, Culture=neutral, PublicKeyToken=8354ae6d2174ddca, processorArchitecture=MSIL">
|
|
60 |
<HintPath>..\packages\iTextSharp.5.5.13.1\lib\itextsharp.dll</HintPath>
|
|
59 |
<Reference Include="itextsharp, Version=5.5.13.3, Culture=neutral, PublicKeyToken=8354ae6d2174ddca, processorArchitecture=MSIL">
|
|
60 |
<HintPath>..\packages\iTextSharp.5.5.13.3\lib\itextsharp.dll</HintPath>
|
|
61 | 61 |
</Reference> |
62 | 62 |
<Reference Include="KCOMDataModel, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> |
63 | 63 |
<SpecificVersion>False</SpecificVersion> |
FinalService/KCOM_FinalService_DL/MarkupToPDF/packages.config | ||
---|---|---|
1 | 1 |
<?xml version="1.0" encoding="utf-8"?> |
2 | 2 |
<packages> |
3 |
<package id="BouncyCastle" version="1.8.6.1" targetFramework="net461" />
|
|
4 |
<package id="iTextSharp" version="5.5.13.1" targetFramework="net461" />
|
|
3 |
<package id="BouncyCastle" version="1.8.9" targetFramework="net461" />
|
|
4 |
<package id="iTextSharp" version="5.5.13.3" targetFramework="net461" />
|
|
5 | 5 |
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net40" requireReinstallation="true" /> |
6 | 6 |
<package id="Rx-Main" version="1.0.11226" targetFramework="net40" /> |
7 | 7 |
<package id="Rxx" version="1.3.4451.33754" targetFramework="net40" /> |
내보내기 Unified diff