개정판 6e16e720
Fix: 코드 정리
Change-Id: I7188ae120c46952f10d68b2241c8eb26b394b997
FinalService/KCOM_FinalService_DL/FinalProcess/Program.cs | ||
---|---|---|
151 | 151 |
logger.Log(CommonLib.ELogLv.info, $"Connection String : {KCOMDataModel.Common.ConnectStringBuilder.KCOMConnectionString().ToString()}"); |
152 | 152 |
using (KCOMDataModel.DataModel.KCOMEntities _entity = new KCOMDataModel.DataModel.KCOMEntities(KCOMDataModel.Common.ConnectStringBuilder.KCOMConnectionString().ToString())) |
153 | 153 |
{ |
154 |
var finalList = _entity.FINAL_PDF.Where(final => final.ID == e.FinalPDF.ID && final.PROJECT_NO == e.FinalPDF.PROJECT_NO); |
|
154 |
var finalList = _entity.FINAL_PDF.Where(final => final.ID == e.FinalPDF.ID && final.PROJECT_NO == e.FinalPDF.PROJECT_NO).ToList();
|
|
155 | 155 |
if (finalList.Any()) |
156 | 156 |
{ |
157 |
var final = finalList[0]; |
|
157 | 158 |
if (e.FinalPDF.STATUS == (int)FinalStatus.Create) |
158 | 159 |
{ |
159 | 160 |
var sb = new System.Text.StringBuilder(); |
160 | 161 |
sb.AppendLine("V3"); |
161 |
sb.AppendLine(finalList.First().EXCEPTION);
|
|
162 |
sb.AppendLine(final.EXCEPTION); |
|
162 | 163 |
|
163 |
finalList.First().EXCEPTION = sb.ToString();
|
|
164 |
finalList.First().START_DATETIME = DateTime.Now;
|
|
164 |
final.EXCEPTION = sb.ToString(); |
|
165 |
final.START_DATETIME = DateTime.Now; |
|
165 | 166 |
} |
167 |
|
|
166 | 168 |
if (e.FinalPDF.STATUS == (int)FinalStatus.Success) |
167 | 169 |
{ |
168 |
finalList.First().END_DATETIME = DateTime.Now;
|
|
169 |
StatusChange(FinalStatus.Success, "");
|
|
170 |
final.END_DATETIME = DateTime.Now; |
|
171 |
final.STATUS = (int)FinalStatus.Success;
|
|
170 | 172 |
} |
173 |
|
|
171 | 174 |
if (e.FinalPDF.STATUS == (int)FinalStatus.PdfStamp && !string.IsNullOrWhiteSpace(e.Error)) |
172 | 175 |
{ |
173 | 176 |
var sb = new System.Text.StringBuilder(); |
174 | 177 |
sb.AppendLine(e.Message); |
175 |
sb.AppendLine(finalList.First().EXCEPTION);
|
|
178 |
sb.AppendLine(final.EXCEPTION); |
|
176 | 179 |
|
177 |
finalList.First().EXCEPTION = e.Message;
|
|
180 |
final.EXCEPTION = e.Message; |
|
178 | 181 |
} |
179 | 182 |
|
180 |
finalList.First().STATUS = e.FinalPDF.STATUS;
|
|
183 |
final.STATUS = e.FinalPDF.STATUS; |
|
181 | 184 |
|
182 | 185 |
logger.Log(CommonLib.ELogLv.info, $"Final PDF Before Status : {e.FinalPDF.STATUS}"); |
183 | 186 |
_entity.SaveChanges(); |
184 |
logger.Log(CommonLib.ELogLv.info, $"Final PDF After Status : {finalList.First().STATUS}");
|
|
187 |
logger.Log(CommonLib.ELogLv.info, $"Final PDF After Status : {final.STATUS}"); |
|
185 | 188 |
} |
186 | 189 |
} |
187 | 190 |
|
... | ... | |
192 | 195 |
{ |
193 | 196 |
using (KCOMDataModel.DataModel.KCOMEntities _entity = new KCOMDataModel.DataModel.KCOMEntities(KCOMDataModel.Common.ConnectStringBuilder.KCOMConnectionString().ToString())) |
194 | 197 |
{ |
195 |
var items = _entity.FINAL_PDF.Where(x => x.ID == finalPdf.ID); |
|
196 |
|
|
197 |
if (items.Count() > 0) |
|
198 |
var items = _entity.FINAL_PDF.Where(x => x.ID == finalPdf.ID).ToList(); |
|
199 |
if (items.Any()) |
|
198 | 200 |
{ |
199 |
var currentItem = items.First();
|
|
201 |
var currentItem = items[0];
|
|
200 | 202 |
|
201 | 203 |
currentItem.STATUS = (int)status; |
202 |
|
|
203 | 204 |
if(!string.IsNullOrWhiteSpace(ex)) |
204 | 205 |
{ |
205 | 206 |
int exLength = (currentItem.EXCEPTION == null)? 0: currentItem.EXCEPTION.Length; |
FinalService/KCOM_FinalService_DL/MarkupToPDF/MarkupToPDF.cs | ||
---|---|---|
578 | 578 |
|
579 | 579 |
foreach (var data in MarkupDataSet) |
580 | 580 |
{ |
581 |
//StatusChange("MarkupDataSet", 0); |
|
582 |
|
|
583 | 581 |
string userid = data.MARKUP_INFO_VERSION.MARKUP_INFO.USER_ID; |
584 | 582 |
|
585 | 583 |
string username = ""; |
내보내기 Unified diff