개정판 ee910e7f
Convert_DOC완료 Search -> MaxTextLength 변경 & 테스트 완료
Change-Id: Ide50406912800acbaecc08653a366eb50d8b9640
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/DataBaseItemsModel.cs | ||
---|---|---|
628 | 628 | |
629 | 629 |
foreach (var x in items) |
630 | 630 |
{ |
631 |
var convertpath = GetSearchConvertPathAndMarkus(x.PROJECT_NO, x.DOCUMENT_ID);
|
|
631 |
var MarkusLink = "kcom://" + CreateMarkusParam(x.PROJECT_NO, x.DOCUMENT_ID, "doftech");
|
|
632 | 632 | |
633 | 633 |
ConvertItem AddItem = new ConvertItem(x.SERVICE_ID, x.ID, x.PROJECT_NO, x.STATUS, x.DOCUMENT_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.DOCUMENT_URL, x.REVISION, x.CURRENT_PAGE, |
634 |
x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME, x.DOCUMENT_URL, convertpath[0], convertpath[1], x.RECONVERTER);
|
|
634 |
x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME, x.DOCUMENT_URL, x.CONVERT_PATH, MarkusLink, x.RECONVERTER);
|
|
635 | 635 |
Listitems.Add(AddItem); |
636 | 636 |
|
637 | 637 |
} |
... | ... | |
646 | 646 |
RealConvert_Height = 80 + (10 * collection.Count()); |
647 | 647 |
DataBase_ItemsHeight = 800 - (RealConvert_Height + Alive_Height); |
648 | 648 |
} |
649 |
//using (Markus.Service.DataBase.ConvertDatabase database = new Markus.Service.DataBase.ConvertDatabase(App.MarkusDataBaseConnecitonString)) |
|
650 |
//{ |
|
651 |
// var items = database.GetConvertProjects(collection)//x:database객체 y:statusCodeTypeList의값 Count()안에 predicator 조건 만족하면 count개수안에 넣음 |
|
652 |
// .Take(SelectedCount.ValueMember).ToList();// |
|
653 | ||
654 |
// items.ForEach(newitem => |
|
655 |
// { |
|
656 |
// collection.UpdateWhere(changeitem => |
|
657 |
// ConvertItemEx.ChangeValues(changeitem, newitem), x => x.ConvertID == newitem.ConvertID && x.ProjectNumber == newitem.ProjectNumber); |
|
658 |
// }); |
|
659 | ||
660 |
// RealConvert_Height = 80 + (10 * collection.Count()); |
|
661 |
// DataBase_ItemsHeight = 800 - (RealConvert_Height + Alive_Height); |
|
662 |
//} |
|
663 | 649 |
} |
664 | 650 |
catch (Exception ex) |
665 | 651 |
{ |
... | ... | |
682 | 668 | |
683 | 669 |
var items = entities.SELECT_CONVERT_ITEM(null, null, null, _status, SelectedCount.ValueMember, null, null, null, |
684 | 670 |
null, null, null, null, null, null, null, null, null, null).ToList(); |
685 |
//var items = database.GetConvertProjects(_status, ProjectNumberFilter, UniqueKeyFilter, Document_NameFilter, Service_IDFilter, Docuemnt_NOFilter |
|
686 |
// , ReconverterFilter, RevisionFilter)//x:database객체 y:statusCodeTypeList의값 Count()안에 predicator 조건 만족하면 count개수안에 넣음 |
|
687 |
// .Take(SelectedCount.ValueMember).ToList(); |
|
688 | 671 | |
689 | 672 |
List<ConvertItem> Listitems = new List<ConvertItem>(); |
690 | 673 | |
691 | 674 |
foreach (var x in items) |
692 | 675 |
{ |
693 |
var convertpath = GetSearchConvertPathAndMarkus(x.PROJECT_NO, x.DOCUMENT_ID);
|
|
676 |
var MarkusLink = "kcom://" + CreateMarkusParam(x.PROJECT_NO, x.DOCUMENT_ID, "doftech");
|
|
694 | 677 | |
695 | 678 |
ConvertItem AddItem = new ConvertItem(x.SERVICE_ID, x.ID, x.PROJECT_NO, x.STATUS, x.DOCUMENT_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.DOCUMENT_URL, x.REVISION, x.CURRENT_PAGE, |
696 |
x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME, x.DOCUMENT_URL, convertpath[0], convertpath[1], x.RECONVERTER);
|
|
679 |
x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME, x.DOCUMENT_URL, x.CONVERT_PATH, MarkusLink, x.RECONVERTER);
|
|
697 | 680 |
Listitems.Add(AddItem); |
698 | 681 | |
699 | 682 |
} |
... | ... | |
801 | 784 | |
802 | 785 |
foreach (var x in items) |
803 | 786 |
{ |
804 |
var convertpath = GetSearchConvertPathAndMarkus(x.PROJECT_NO, x.DOCUMENT_ID);
|
|
787 |
var MarkusLink = "kcom://" + CreateMarkusParam(x.PROJECT_NO, x.DOCUMENT_ID, "doftech");
|
|
805 | 788 | |
806 | 789 |
ConvertItem AddItem = new ConvertItem(x.SERVICE_ID, x.ID, x.PROJECT_NO, x.STATUS, x.DOCUMENT_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.DOCUMENT_URL, x.REVISION, x.CURRENT_PAGE, |
807 |
x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME, x.DOCUMENT_URL, convertpath[0], convertpath[1], x.RECONVERTER);
|
|
790 |
x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME, x.DOCUMENT_URL, x.CONVERT_PATH, MarkusLink, x.RECONVERTER);
|
|
808 | 791 |
Listitems.Add(AddItem); |
809 | 792 | |
810 | 793 |
} |
... | ... | |
910 | 893 |
itemsToEach.ConvertID = item.ConvertID; |
911 | 894 |
itemsToEach.ProjectNumber = item.ProjectNumber; |
912 | 895 | |
913 |
var convertpath = GetSearchConvertPathAndMarkus(item.ProjectNumber, item.UniqueKey);
|
|
896 |
var MarkusLink = "kcom://" + CreateMarkusParam(item.ProjectNumber, item.DocumentID, "doftech");
|
|
914 | 897 | |
915 | 898 |
if (item.ConvertState != null) |
916 | 899 |
{ |
... | ... | |
931 | 914 |
itemsToEach.TotalPage = item.TotalPage; |
932 | 915 |
itemsToEach.OriginfilePath = item.OriginfilePath; |
933 | 916 |
itemsToEach.ConvertPath = item.ConvertPath; |
934 |
itemsToEach.MarkusLink = convertpath[1];
|
|
917 |
itemsToEach.MarkusLink = MarkusLink;
|
|
935 | 918 |
itemsToEach.UniqueKey = item.UniqueKey;//DocumentNO 없음 |
936 | 919 |
itemsToEach.GroupNo = item.GroupNo;//없음 |
937 | 920 |
itemsToEach.ProcessorAffinity = item.ProcessorAffinity; |
938 | 921 |
itemsToEach.DocumentName = item.DocumnetName; |
939 |
itemsToEach.Revision = item.Revision;//없음
|
|
922 |
itemsToEach.Revision = item.Revision; //없음
|
|
940 | 923 |
itemsToEach.Exception = item.Exception;//없음 |
941 |
itemsToEach.ConvertPath = convertpath[0];
|
|
924 |
itemsToEach.ConvertPath = item.ConvertPath;
|
|
942 | 925 |
itemsToEach.CreateTime = item.CreateTime; |
943 | 926 |
itemsToEach.ReConverter = item.ReConverter; |
944 | 927 |
itemsToEach.DocumentID = item.DocumentID; |
... | ... | |
1162 | 1145 |
} |
1163 | 1146 |
else |
1164 | 1147 |
{ |
1165 |
//ConvertDatabase _DataConvert = new ConvertDatabase(App.MarkusDataBaseConnecitonString); |
|
1166 | 1148 |
var resultRealConvert = 0; |
1167 | 1149 |
var resultFiltertConvert = 0; |
1168 | 1150 | |
1169 | 1151 |
if (SelectRealConvert != null) |
1170 | 1152 |
{ |
1171 |
//resultRealConvert = _DataConvert.SetCleanUpItem(SelectRealConvert);//ConvertDataBase |
|
1172 | 1153 |
resultRealConvert = SetCleanUpItem(SelectRealConvert);//ConvertDataBase |
1173 | 1154 |
} |
1174 | 1155 |
else if (SelectFilterConvert != null) |
1175 | 1156 |
{ |
1176 |
//resultFiltertConvert = _DataConvert.SetCleanUpItem(SelectFilterConvert);//ConvertDataBase |
|
1177 | 1157 |
resultFiltertConvert = SetCleanUpItem(SelectFilterConvert); |
1178 | 1158 |
} |
1179 | 1159 |
System.Diagnostics.Debug.WriteLine(resultRealConvert + " " + resultFiltertConvert); |
... | ... | |
1186 | 1166 | |
1187 | 1167 |
foreach (var x in items) |
1188 | 1168 |
{ |
1189 |
var convertpath = GetSearchConvertPathAndMarkus(x.PROJECT_NO, x.DOCUMENT_ID);
|
|
1169 |
var MarkusLink = "kcom://" + CreateMarkusParam(x.PROJECT_NO, x.DOCUMENT_ID, "doftech");
|
|
1190 | 1170 | |
1191 | 1171 |
ConvertItem AddItem = new ConvertItem(x.SERVICE_ID, x.ID, x.PROJECT_NO, x.STATUS, x.DOCUMENT_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.DOCUMENT_URL, x.REVISION, x.CURRENT_PAGE, x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME |
1192 |
, x.DOCUMENT_URL, convertpath[0], convertpath[1], x.RECONVERTER);
|
|
1172 |
, x.DOCUMENT_URL, x.CONVERT_PATH, MarkusLink, x.RECONVERTER);
|
|
1193 | 1173 | |
1194 | 1174 |
RealConvertSource.Add(AddItem); |
1195 | 1175 | |
... | ... | |
1200 | 1180 |
} |
1201 | 1181 | |
1202 | 1182 |
} |
1203 | ||
1204 |
//ConvertDataBase |
|
1205 |
//using (Markus.Service.DataBase.ConvertDatabase database = new Markus.Service.DataBase.ConvertDatabase(App.MarkusDataBaseConnecitonString)) |
|
1206 |
//{ |
|
1207 |
// var items = database.GetConvertProjects(SelectFilterConvert); |
|
1208 | ||
1209 |
// foreach (var item in items) |
|
1210 |
// { |
|
1211 |
// RealConvertSource.Add(item); |
|
1212 |
// } |
|
1213 |
// if (RealConvertSource.Count() == 1) |
|
1214 |
// { |
|
1215 |
// ConvertShow = true; |
|
1216 |
// } |
|
1217 |
//} |
|
1218 | 1183 |
} |
1219 | 1184 |
} |
1220 | 1185 | |
... | ... | |
1243 | 1208 |
} |
1244 | 1209 |
} |
1245 | 1210 | |
1246 |
public string[] GetSearchConvertPathAndMarkus(string PROJECT_NO, string DOCUMENT_ID) |
|
1247 |
{ |
|
1248 |
string[] ConvertPath = new string[2]; |
|
1249 |
ConvertPath[0] = GetConvertPath(PROJECT_NO, DOCUMENT_ID); |
|
1250 |
ConvertPath[1] = "kcom://" + CreateMarkusParam(PROJECT_NO, DOCUMENT_ID, "doftech"); |
|
1251 | ||
1252 |
return ConvertPath; |
|
1253 |
} |
|
1254 | ||
1255 |
#region Convert Path |
|
1256 | ||
1257 |
private string GetConvertPath(string ProjectNo, string DocumentID) |
|
1258 |
{ |
|
1259 |
try |
|
1260 |
{ |
|
1261 |
return Path.Combine(BaseStorage(ProjectNo), ProjectNo + "_Tile", (System.Convert.ToInt64(DocumentID) / 100).ToString(), DocumentID); |
|
1262 |
} |
|
1263 |
catch (Exception) |
|
1264 |
{ |
|
1265 |
throw new Exception("GetConvertPath Error"); |
|
1266 |
} |
|
1267 | ||
1268 |
} |
|
1269 | ||
1270 |
private string BaseStorage(string ProjectNo) |
|
1271 |
{ |
|
1272 |
using (markusEntities entities = new markusEntities(App.MarkusDataBaseConnecitonString)) |
|
1273 |
{ |
|
1274 |
string result = ""; |
|
1275 | ||
1276 |
var properties = entities.SELECT_CONVERT_ITEM(null, ProjectNo, null, null, 1, null, null, null, null, null, null, null, null, null, null, null, null, null).ToList(); |
|
1277 |
//var properties = entities.PROPERTIES.Where(f => f.PROPERTY == ProjectNo && f.TYPE == PROPERTIES_DEFINE.TILE_SOURCE_STORAGE);// |
|
1278 | ||
1279 | ||
1280 |
if (properties.Count() > 0) |
|
1281 |
{ |
|
1282 |
result = properties.First().PROPERTIES_VALUE; |
|
1283 |
} |
|
1284 |
else |
|
1285 |
{ |
|
1286 |
throw new Exception($"Project {ProjectNo} BaseStorage Not Setting."); |
|
1287 |
} |
|
1288 | ||
1289 |
return result; |
|
1290 |
} |
|
1291 |
} |
|
1292 | 1211 | |
1293 | 1212 |
public static string CreateMarkusParam(string projectNo, string documentID, string userID) |
1294 | 1213 |
{ |
... | ... | |
1312 | 1231 | |
1313 | 1232 |
} |
1314 | 1233 | |
1315 |
#endregion |
|
1316 | 1234 | |
1317 | 1235 |
#endregion |
1318 | 1236 |
내보내기 Unified diff