프로젝트

일반

사용자정보

개정판 c0977e97

IDc0977e979ba7f207d4004ecb09afa0d3e3c93926
상위 5423f26d
하위 f0377812, a5aab11f

김동진이(가) 5년 이상 전에 추가함

issue #000 group & dept color 임시 제거. IFinalPDF 를 Final Service 의 프로젝트를 참조하도록 경로 수정.

Change-Id: I03efb63cd9a922a4bda147a13d309b246f865ac3

차이점 보기:

KCOM_API/ServiceDeepView.svc.cs
186 186

  
187 187
            if (Boolean.Parse(isInternalAddress))
188 188
            {
189
                originFile = String.Format(KCOM_API.Properties.Settings.Default.TileSoucePath, projectNo, (Convert.ToInt32(originDocItem_ID) / 100).ToString(), originDocItem_ID, originPageNo);
190
                targetFile = String.Format(KCOM_API.Properties.Settings.Default.TileSoucePath, projectNo, (Convert.ToInt32(targetDocItem_ID) / 100).ToString(), targetDocItem_ID, targetPageNo);
189
                originFile = String.Format(KCOM_API.Properties.Settings.Default.TileSoucePath, projectNo, (Convert.ToUInt32(originDocItem_ID) / 100).ToString(), originDocItem_ID, originPageNo);
190
                targetFile = String.Format(KCOM_API.Properties.Settings.Default.TileSoucePath, projectNo, (Convert.ToUInt32(targetDocItem_ID) / 100).ToString(), targetDocItem_ID, targetPageNo);
191 191
            }
192 192
            else
193 193
            {
......
279 279
                            //                          "tcp://localhost:9092/remFinalPDF");
280 280
                            remObj = (RemFinalPDFObject)Activator.GetObject(typeof(RemFinalPDFObject),
281 281
                                                      //"tcp://192.168.0.67:9092/remFinalPDF");
282
                                                      "tcp://192.168.0.67:9092/remFinalPDF");
282
                                                      "tcp://localhost:9092/remFinalPDF");
283 283
                        }
284 284

  
285 285
                        //"tcp://localhost:8080/remFinalPDF");
......
371 371
                                       TO_VENDOR = docitem.RESULT_FILE,
372 372
                                       RESULT = docitem.RESULT,
373 373
                                       DocNo = docitem.DOCUMENT_NO,
374
                                       IsSyncPossible = docitem.DOCUMENT_ID == DocumentId ? false : true
374
                                       EnsembleLink = docitem.ENSEMBLEINFO_URL,
375
                                       //IsSyncPossible = docitem.DOCUMENT_ID == DocumentId ? false : entity.DOCINFO.Where(d => d.DOCUMENT_ID == docitem.DOCUMENT_ID).ToList().Count > 0 ? true : false
375 376
                                   });
376 377
                    _result = _vpList.ToList();
377
                    _result = _result.OrderByDescending(r => r.GroupNo).ToList();
378
                    foreach (var vp in _result)
379
                    {
380
                        if (entity.DOCINFO.Where(d => d.DOCUMENT_ID == vp.DOCUMENT_ID).ToList().Count > 0)
381
                            vp.IsSyncPossible = true;
382
                        else
383
                            vp.IsSyncPossible = false;
384
                    }
385
                    _result = _result.OrderByDescending(r => UInt64.Parse(System.Text.RegularExpressions.Regex.Replace(r.GroupNo, @"\D", ""))).ToList();
378 386
                }
379 387
            }
380 388
            catch (Exception)
......
501 509

  
502 510
            return _result;
503 511
        }
512
        [OperationContract]
513
        public string GetDocItemID(string ensemble_id)
514
        {
515
            ///param : prjNo, documentId, userId
516
            string _result = string.Empty;
517

  
518
            try
519
            {
520
                CIEntities entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString("markus").ToString());
504 521

  
522
                var _items = entity.DOCUMENT_ITEM.Where(data => data.ID == ensemble_id).FirstOrDefault();
523

  
524
                _result = _items.DOCUMENT_ID;
525
            }
526
            catch (Exception ex)
527
            {
528
                //System.Diagnostics.Trace.WriteLine("GetVendorItemInfo Error : " + ex);
529
                //Common.Helper.SystemErrorNotify(SERVICE_NAME.API, LEVEL.MEDIUM, ERROR_TYPE.CONVERT, "GetDocumentItemInfo / " + ex.Message, param.documentID, param.projectNo);
530
            }
531

  
532
            return _result;
533
        }
505 534
        public string UserGO(MARKUP_INFO item)
506 535
        {
507 536
            if (item != null)
......
547 576
                        r.MarkupList = (from markupData in entity.MARKUP_DATA
548 577
                                        where markupData.MARKUPINFO_VERSION_ID == r.MarkupVersionID
549 578
                                        orderby markupData.PAGENUMBER
550
                                        select new MarkupItem { ID = markupData.ID, PageNumber = markupData.PAGENUMBER, Data = markupData.DATA, Data_Type = markupData.DATA_TYPE, Symbol_ID = markupData.SYMBOL_ID, Group_ID = markupData.GROUP_ID ?? 0 }).ToList();
579
                                        select new MarkupItem { ID = markupData.ID, PageNumber = markupData.PAGENUMBER, Data = markupData.DATA, Data_Type = markupData.DATA_TYPE, Symbol_ID = markupData.SYMBOL_ID}).ToList();
551 580
                    });
552 581

  
582
                    List<PROPERTIES> _ColorsProperties = new List<PROPERTIES>();
553 583
                    Random random = new Random();
554

  
555
                    _MemberDeptColors memberDeptColors = new _MemberDeptColors();
556
                    _MemberDeptColorsInfo memberDeptColorsInfo = new _MemberDeptColorsInfo();
557

  
558
                    
559
                    memberDeptColors._memberDeptColors = (from memberdeptcolor in entity.MEMBER_DEPT_COLOR
560
                                                //where memberdeptcolor.DEPARTMENT == "DisplayColor"
561
                                                select memberdeptcolor).ToList();
562
                    memberDeptColorsInfo._memberDeptColorsInfo = (from memberdeptcolorinfo in entity.MEMBER_DEPT_COLORINFO
563
                                                                        //where memberdeptcolor.DEPARTMENT == "DisplayColor"
564
                                                                    select memberdeptcolorinfo).ToList();
565 584
                    
585
                    using (KCOMEntities kcomEntity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
586
                    {
587
                        _ColorsProperties = (from property in kcomEntity.PROPERTIES
588
                                             where property.TYPE == "DisplayColor"
589
                                             select property).ToList();
590
                    }                    
566 591

  
567 592
                    foreach (var item in _result)
568 593
                    {
569
                        var _member = entity.MEMBER.Where(member => member.ID == item.UserID);
570

  
571
                        if (_member.Count() > 0)
594
                        var _member = entity.MEMBER.Where(member => member.ID == item.UserID).FirstOrDefault();
595
                        
596
                        if (_member != null)
572 597
                        {
573
                            item.UserName = _member.First().NAME;
574
                            item.Depatment = _member.First().DEPARTMENT;
598
                            item.UserName = _member.NAME;
599
                            item.Depatment = _member.DEPARTMENT;
575 600
                        }
576 601

  
577
                        foreach(var dept in memberDeptColors._memberDeptColors)
578
                        {//dept 지정  색상 
579
                            if(dept.DEPARTMENT == item.Depatment)
580
                            {
581
                                var colorlist = memberDeptColorsInfo._memberDeptColorsInfo.Where(d => d.COLORID == dept.COLORID).ToList();
582
                                
583
                                int colorIdx = random.Next(1, colorlist.Count()); 
584
                                if(colorlist.Count > 0)
585
                                {
586
                                    item.DisplayColor = "#FF" + colorlist[colorIdx].DISPLAYCOLOR;
587
                                    memberDeptColorsInfo._memberDeptColorsInfo.Remove(colorlist[colorIdx]);
588
                                    break;
589
                                }    
590
                                else
591
                                {
592
                                    item.DisplayColor = String.Format("#FF{0:X6}", random.Next(0x1000000));
593
                                    break;
594
                                }
595
                            }
596
                        }
597

  
598

  
599
                        if (item.DisplayColor == null)
602
                        if (_ColorsProperties.Count > 0)
600 603
                        {
601
                            foreach (var dept in memberDeptColors._memberDeptColors)
602
                            {
603
                                if(dept.DEPARTMENT == null)
604
                                {
605
                                    dept.DEPARTMENT = item.Depatment;
606
                                    var colorlist = memberDeptColorsInfo._memberDeptColorsInfo.Where(d => d.COLORID == dept.COLORID).ToList();
607
                                    int colorIdx = random.Next(1, colorlist.Count());
608
                                    if (colorlist.Count > 0)
609
                                    {
610
                                        item.DisplayColor = "#FF" + colorlist[colorIdx].DISPLAYCOLOR;
611
                                        memberDeptColorsInfo._memberDeptColorsInfo.Remove(colorlist[colorIdx]);
612
                                        break;
613
                                    }
614
                                    else
615
                                    {
616
                                        item.DisplayColor = String.Format("#FF{0:X6}", random.Next(0x1000000));
617
                                        break;
618
                                    }
619
                                }
620
                            }
604
                            int colorIdx = random.Next(0, _ColorsProperties.Count() - 1);
605
                            #region 부서별로 색상을 지정하고자 할때
606
                            /// 일단 의견을 들어보자구!
607
                            #endregion
608
                            item.DisplayColor = "#FF" + _ColorsProperties[colorIdx].VALUE;
609
                            _ColorsProperties.Remove(_ColorsProperties[colorIdx]);
621 610
                        }
622

  
623
                        if(item.DisplayColor == null)
611
                        else
624 612
                        {
625 613
                            item.DisplayColor = String.Format("#FF{0:X6}", random.Next(0x1000000));
626
                        }     
614
                        }
627 615
                    }
628 616
                }
629 617
            }
......
952 940
                        r.MarkupList = (from markupData in entity.MARKUP_DATA
953 941
                                        where markupData.MARKUPINFO_VERSION_ID == r.MarkupVersionID
954 942
                                        orderby markupData.PAGENUMBER
955
                                        select new MarkupItem { ID = markupData.ID, PageNumber = markupData.PAGENUMBER, Data = markupData.DATA, Data_Type = markupData.DATA_TYPE, Symbol_ID = markupData.SYMBOL_ID, Group_ID = markupData.GROUP_ID ?? 0 }).ToList();
943
                                        select new MarkupItem { ID = markupData.ID, PageNumber = markupData.PAGENUMBER, Data = markupData.DATA, Data_Type = markupData.DATA_TYPE, Symbol_ID = markupData.SYMBOL_ID}).ToList();
956 944
                    });
957 945

  
958 946
                    List<PROPERTIES> _ColorsProperties = new List<PROPERTIES>();
......
1339 1327
                            PAGENUMBER = value.PAGENUMBER,
1340 1328
                            MARKUPINFO_VERSION_ID = markup_info_version.ID,
1341 1329
                            SYMBOL_ID = value.SYMBOL_ID,
1342
                            GROUP_ID = value.GROUP_ID
1330
                            //GROUP_ID = value.GROUP_ID
1343 1331
                        });
1344 1332
                    });
1345 1333
                    Entity.SaveChanges();
......
1352 1340
            return true;
1353 1341
        }
1354 1342

  
1355
        [OperationContract]
1356
        public long AddMarkupDataGroup(MARKUP_DATA_GROUP mARKUP_DATA_GROUP, string ProjectNo)
1357
        {
1358
            try
1359
            {
1360
                using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(ProjectNo).ToString()))
1361
                {
1362
                    Entity.AddToMARKUP_DATA_GROUP(mARKUP_DATA_GROUP);
1363
                    //MARKUP_DATA_GROUP tt = Entity.MARKUP_DATA_GROUP.Where(info => info.ID == id).FirstOrDefault();
1364
                    Entity.SaveChanges();
1343
        //[OperationContract]
1344
        //public long AddMarkupDataGroup(MARKUP_DATA_GROUP mARKUP_DATA_GROUP, string ProjectNo)
1345
        //{
1346
        //    try
1347
        //    {
1348
        //        using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(ProjectNo).ToString()))
1349
        //        {
1350
        //            Entity.AddToMARKUP_DATA_GROUP(mARKUP_DATA_GROUP);
1351
        //            //MARKUP_DATA_GROUP tt = Entity.MARKUP_DATA_GROUP.Where(info => info.ID == id).FirstOrDefault();
1352
        //            Entity.SaveChanges();
1365 1353

  
1366
                    return Entity.MARKUP_DATA_GROUP.ToList().LastOrDefault().ID;
1367
                }
1368
            }
1369
            catch (Exception)
1370
            {
1371
                return 0;
1372
            }
1373
        }
1374
        [OperationContract]
1375
        public bool UpdateMarkupDataGroup(long Group_ID, string ProjectNo)
1376
        {
1377
            try
1378
            {
1379
                using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(ProjectNo).ToString()))
1380
                {
1381
                    var UpdateItem = Entity.MARKUP_DATA_GROUP.Where(info => info.ID == Group_ID).FirstOrDefault();
1382
                    UpdateItem.STATE = 1;
1383
                    Entity.SaveChanges();
1384
                }
1385
            }
1386
            catch (Exception)
1387
            {
1388
                return false;
1389
            }
1390
            return true;
1391
        }
1354
        //            return Entity.MARKUP_DATA_GROUP.ToList().LastOrDefault().ID;
1355
        //        }
1356
        //    }
1357
        //    catch (Exception)
1358
        //    {
1359
        //        return 0;
1360
        //    }
1361
        //}
1362
        //[OperationContract]
1363
        //public bool UpdateMarkupDataGroup(long Group_ID, string ProjectNo)
1364
        //{
1365
        //    try
1366
        //    {
1367
        //        using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(ProjectNo).ToString()))
1368
        //        {
1369
        //            var UpdateItem = Entity.MARKUP_DATA_GROUP.Where(info => info.ID == Group_ID).FirstOrDefault();
1370
        //            UpdateItem.STATE = 1;
1371
        //            Entity.SaveChanges();
1372
        //        }
1373
        //    }
1374
        //    catch (Exception)
1375
        //    {
1376
        //        return false;
1377
        //    }
1378
        //    return true;
1379
        //}
1392 1380
        [OperationContract]
1393 1381
        public bool UpdateMarkupData(string CommentID, long Group_ID, string ProjectNo)
1394 1382
        {
......
1397 1385
                using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(ProjectNo).ToString()))
1398 1386
                {
1399 1387
                    var UpdateItem = Entity.MARKUP_DATA.Where(info => info.ID == CommentID).FirstOrDefault();
1400
                    UpdateItem.GROUP_ID = Group_ID;
1388
                    //UpdateItem.GROUP_ID = Group_ID;
1401 1389
                    Entity.SaveChanges();
1402 1390
                }
1403 1391
            }
......
1891 1879
                            PAGENUMBER = item.PAGENUMBER,
1892 1880
                            MARKUP_INFO_VERSION = info2,
1893 1881
                            SYMBOL_ID = item.SYMBOL_ID,
1894
                            GROUP_ID = item.GROUP_ID
1882
                            //GROUP_ID = item.GROUP_ID
1895 1883
                        });
1896 1884
                    }
1897 1885
                    Entity.SaveChanges();
......
1961 1949
                            PAGENUMBER = item.PAGENUMBER,
1962 1950
                            MARKUP_INFO_VERSION = info2,
1963 1951
                            SYMBOL_ID = item.SYMBOL_ID,
1964
                            GROUP_ID = item.GROUP_ID
1952
                            //GROUP_ID = item.GROUP_ID
1965 1953
                        });
1966 1954
                    }
1967 1955
                    Entity.SaveChanges();
......
2136 2124
                            PAGENUMBER = item.PAGENUMBER,
2137 2125
                            MARKUP_INFO_VERSION = info2,
2138 2126
                            SYMBOL_ID = item.SYMBOL_ID,
2139
                            GROUP_ID = item.GROUP_ID
2127
                            //GROUP_ID = item.GROUP_ID
2140 2128
                        });
2141 2129
                    }
2142 2130
                    Entity.SaveChanges();
......
2618 2606

  
2619 2607
            try
2620 2608
            {
2609
                //using (CIEntities _entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
2621 2610
                using (CIEntities _entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(project_no).ToString()))
2622 2611
                {
2623 2612
                    var datas = _entity.MARKUP_DATA.Where(x => x.MARKUP_INFO_VERSION.MARKUP_INFO.DOCINFO_ID == docinfo_id
......
2629 2618
                        MARKUP_DATA d = new MARKUP_DATA()
2630 2619
                        {
2631 2620
                            ID = data.ID,
2632
                            GROUP_ID = data.GROUP_ID,
2621
                            //GROUP_ID = data.GROUP_ID,
2633 2622
                            SYMBOL_ID = data.SYMBOL_ID,
2634 2623
                            DATA = data.DATA,
2635 2624
                            DATA_TYPE = data.DATA_TYPE,

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)