개정판 ac91e747
- 테스트용 INI파일 추가
- ServiceDeepView 오류 반환방법 수정
Change-Id: Ia020b493a132f99fe95b6baa8805335a921c8c94
KCOM.sln | ||
---|---|---|
36 | 36 |
{F026B592-11B9-410C-B4FF-384E511A4666} = {F026B592-11B9-410C-B4FF-384E511A4666} |
37 | 37 |
EndProjectSection |
38 | 38 |
EndProject |
39 |
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "INI", "INI", "{01F177C4-03F9-41A7-8996-89D190BD3E10}" |
|
40 |
ProjectSection(SolutionItems) = preProject |
|
41 |
INI\MARKUS _PEMSS.ini = INI\MARKUS _PEMSS.ini |
|
42 |
INI\MARKUS_DAELIM.ini = INI\MARKUS_DAELIM.ini |
|
43 |
INI\MARKUS_Doftech.ini = INI\MARKUS_Doftech.ini |
|
44 |
INI\MARKUS_Doftech_Remote.ini = INI\MARKUS_Doftech_Remote.ini |
|
45 |
INI\MARKUS_Doftech_Remote_123port.ini = INI\MARKUS_Doftech_Remote_123port.ini |
|
46 |
INI\MARKUS_LOCAL.ini = INI\MARKUS_LOCAL.ini |
|
47 |
EndProjectSection |
|
48 |
EndProject |
|
39 | 49 |
Global |
40 | 50 |
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
41 | 51 |
Debug|Any CPU = Debug|Any CPU |
KCOM_API/ServiceDeepView.svc.cs | ||
---|---|---|
579 | 579 |
{ |
580 | 580 |
string sCIConnString = ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString; |
581 | 581 |
CIEntities entity = new CIEntities(sCIConnString); |
582 |
|
|
582 |
|
|
583 | 583 |
var _items = entity.DOCUMENT_ITEM.Where(data => data.DOCUMENT_ID == param.documentID); |
584 | 584 |
|
585 | 585 |
if (_items.Count() > 0) |
... | ... | |
595 | 595 |
} |
596 | 596 |
catch (Exception ex) |
597 | 597 |
{ |
598 |
System.Diagnostics.Trace.WriteLine("GetVendorItemInfo Error : " + ex); |
|
599 |
_result = new DOCUMENT_ITEM { RESULT_FILE = ex.ToString() }; |
|
598 |
System.Diagnostics.Trace.WriteLine("GetDocumentItemInfo Error : " + ex); |
|
599 |
|
|
600 |
new FaultException("GetDocumentItemInfo Error - " + ex.ToString()); |
|
600 | 601 |
//throw new FaultException(ex.ToString()); |
601 | 602 |
//Common.Helper.SystemErrorNotify(SERVICE_NAME.API, LEVEL.MEDIUM, ERROR_TYPE.CONVERT, "GetDocumentItemInfo / " + ex.Message, param.documentID, param.projectNo); |
602 | 603 |
} |
... | ... | |
732 | 733 |
return _result; |
733 | 734 |
} |
734 | 735 |
|
735 |
|
|
736 |
/* |
|
737 |
[OperationContract] |
|
738 |
public List<MarkupInfoItem> GetMarkupInfoItems(string ProjectNo, string DocInfoId) |
|
739 |
{ |
|
740 |
List<MarkupInfoItem> _result = new List<MarkupInfoItem>(); |
|
741 |
try |
|
742 |
{ |
|
743 |
using (CIEntities entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(ProjectNo).ToString())) |
|
744 |
{ |
|
745 |
var markupListData = entity.MARKUP_INFO.Where(data => data.DOCINFO_ID == DocInfoId).ToList(); |
|
746 |
|
|
747 |
var markupList = from markup in markupListData |
|
748 |
orderby markup.CREATE_TIME descending |
|
749 |
select new MarkupInfoItem |
|
750 |
{ |
|
751 |
MarkupInfoID = markup.ID, |
|
752 |
UserID = markup.USER_ID, |
|
753 |
MarkupVersionID = markup.MARKUP_INFO_VERSION.Count() == 0 ? null : markup.MARKUP_INFO_VERSION.OrderByDescending(data => data.CREATE_DATE).FirstOrDefault().ID, |
|
754 |
CreateTime = markup.CREATE_TIME, |
|
755 |
Consolidate = markup.CONSOLIDATE, |
|
756 |
Description = markup.DESCRIPTION, |
|
757 |
AvoidConsolidate = markup.AVOID_CONSOLIDATE, |
|
758 |
PartConsolidate = markup.PART_CONSOLIDATE, |
|
759 |
UpdateTime = DateTime.Parse(markup.UPDATE_TIME.ToString()), |
|
760 |
}; |
|
761 |
|
|
762 |
if (markupList.Count() > 0) |
|
763 |
{ |
|
764 |
_result = markupList.ToList(); |
|
765 |
} |
|
766 |
|
|
767 |
_result.ForEach(r => |
|
768 |
{ |
|
769 |
|
|
770 |
r.MarkupList = (from markupData in entity.MARKUP_DATA |
|
771 |
where markupData.MARKUPINFO_VERSION_ID == r.MarkupVersionID |
|
772 |
orderby markupData.PAGENUMBER |
|
773 |
select new MarkupItem { ID = markupData.ID, PageNumber = markupData.PAGENUMBER, Data = markupData.DATA, Data_Type = markupData.DATA_TYPE, Symbol_ID = markupData.SYMBOL_ID }).ToList(); |
|
774 |
}); |
|
775 |
|
|
776 |
Random random = new Random(); |
|
777 |
|
|
778 |
_MemberDeptColors memberDeptColors = new _MemberDeptColors(); |
|
779 |
_MemberDeptColorsInfo memberDeptColorsInfo = new _MemberDeptColorsInfo(); |
|
780 |
|
|
781 |
|
|
782 |
memberDeptColors._memberDeptColors = (from memberdeptcolor in entity.MEMBER_DEPT_COLOR |
|
783 |
//where memberdeptcolor.DEPARTMENT == "DisplayColor" |
|
784 |
select memberdeptcolor).ToList(); |
|
785 |
memberDeptColorsInfo._memberDeptColorsInfo = (from memberdeptcolorinfo in entity.MEMBER_DEPT_COLORINFO |
|
786 |
//where memberdeptcolor.DEPARTMENT == "DisplayColor" |
|
787 |
select memberdeptcolorinfo).ToList(); |
|
788 |
|
|
789 |
|
|
790 |
foreach (var item in _result) |
|
791 |
{ |
|
792 |
var _member = entity.MEMBER.Where(member => member.ID == item.UserID); |
|
793 |
|
|
794 |
if (_member.Count() > 0) |
|
795 |
{ |
|
796 |
item.UserName = _member.First().NAME; |
|
797 |
item.Depatment = _member.First().DEPARTMENT; |
|
798 |
} |
|
799 |
|
|
800 |
foreach (var dept in memberDeptColors._memberDeptColors) |
|
801 |
{//dept 지정 색상 |
|
802 |
if (dept.DEPARTMENT == item.Depatment) |
|
803 |
{ |
|
804 |
var colorlist = memberDeptColorsInfo._memberDeptColorsInfo.Where(d => d.COLORID == dept.COLORID).ToList(); |
|
805 |
|
|
806 |
int colorIdx = random.Next(1, colorlist.Count()); |
|
807 |
if (colorlist.Count > 0) |
|
808 |
{ |
|
809 |
item.DisplayColor = "#FF" + colorlist[colorIdx].DISPLAYCOLOR; |
|
810 |
memberDeptColorsInfo._memberDeptColorsInfo.Remove(colorlist[colorIdx]); |
|
811 |
break; |
|
812 |
} |
|
813 |
else |
|
814 |
{ |
|
815 |
item.DisplayColor = String.Format("#FF{0:X6}", random.Next(0x1000000)); |
|
816 |
break; |
|
817 |
} |
|
818 |
} |
|
819 |
} |
|
820 |
|
|
821 |
|
|
822 |
if (item.DisplayColor == null) |
|
823 |
{ |
|
824 |
foreach (var dept in memberDeptColors._memberDeptColors) |
|
825 |
{ |
|
826 |
if (dept.DEPARTMENT == null) |
|
827 |
{ |
|
828 |
dept.DEPARTMENT = item.Depatment; |
|
829 |
var colorlist = memberDeptColorsInfo._memberDeptColorsInfo.Where(d => d.COLORID == dept.COLORID).ToList(); |
|
830 |
int colorIdx = random.Next(1, colorlist.Count()); |
|
831 |
if (colorlist.Count > 0) |
|
832 |
{ |
|
833 |
item.DisplayColor = "#FF" + colorlist[colorIdx].DISPLAYCOLOR; |
|
834 |
memberDeptColorsInfo._memberDeptColorsInfo.Remove(colorlist[colorIdx]); |
|
835 |
break; |
|
836 |
} |
|
837 |
else |
|
838 |
{ |
|
839 |
item.DisplayColor = String.Format("#FF{0:X6}", random.Next(0x1000000)); |
|
840 |
break; |
|
841 |
} |
|
842 |
} |
|
843 |
} |
|
844 |
} |
|
845 |
|
|
846 |
if (item.DisplayColor == null) |
|
847 |
{ |
|
848 |
item.DisplayColor = String.Format("#FF{0:X6}", random.Next(0x1000000)); |
|
849 |
} |
|
850 |
} |
|
851 |
} |
|
852 |
} |
|
853 |
catch (Exception EX) |
|
854 |
{ |
|
855 |
System.Diagnostics.Debug.WriteLine(this.GetType().ToString() + " " + EX); |
|
856 |
return _result; |
|
857 |
} |
|
858 |
finally |
|
859 |
{ |
|
860 |
GC.Collect(2); |
|
861 |
} |
|
862 |
|
|
863 |
return _result; |
|
864 |
} |
|
865 |
|
|
866 |
/* |
|
867 |
[OperationContract] |
|
868 |
public List<MarkupInfoItem> GetMarkupInfoItems(string ProjectNo, string DocInfoId) |
|
869 |
{ |
|
870 |
List<MarkupInfoItem> _result = new List<MarkupInfoItem>(); |
|
871 |
try |
|
872 |
{ |
|
873 |
using (CIEntities entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(ProjectNo).ToString())) |
|
874 |
{ |
|
875 |
var markupListData = entity.MARKUP_INFO.Where(data => data.DOCINFO_ID == DocInfoId).ToList(); |
|
876 |
//foreach (var item in markupListData) |
|
877 |
//{ |
|
878 |
// if (!item.AVOID_CONSOLIDATE.HasValue) |
|
879 |
// { |
|
880 |
// item.AVOID_CONSOLIDATE = 0; |
|
881 |
// } |
|
882 |
//} |
|
883 |
|
|
884 |
var markupList = from markup in markupListData |
|
885 |
orderby markup.CREATE_TIME descending |
|
886 |
select new MarkupInfoItem |
|
887 |
{ |
|
888 |
MarkupInfoID = markup.ID, |
|
889 |
UserID = markup.USER_ID, |
|
890 |
MarkupVersionID = markup.MARKUP_INFO_VERSION.Count() == 0 ? null : markup.MARKUP_INFO_VERSION.OrderByDescending(data => data.CREATE_DATE).FirstOrDefault().ID, |
|
891 |
CreateTime = markup.CREATE_TIME, |
|
892 |
Consolidate = markup.CONSOLIDATE, |
|
893 |
Description = markup.DESCRIPTION, |
|
894 |
AvoidConsolidate = markup.AVOID_CONSOLIDATE, |
|
895 |
PartConsolidate = markup.PART_CONSOLIDATE, |
|
896 |
UpdateTime = DateTime.Parse(markup.UPDATE_TIME.ToString()), |
|
897 |
}; |
|
898 |
|
|
899 |
|
|
900 |
|
|
901 |
if (markupList.Count() > 0) |
|
902 |
{ |
|
903 |
_result = markupList.ToList(); |
|
904 |
} |
|
905 |
|
|
906 |
|
|
907 |
|
|
908 |
_result.ForEach(r => |
|
909 |
{ |
|
910 |
|
|
911 |
r.MarkupList = (from markupData in entity.MARKUP_DATA |
|
912 |
where markupData.MARKUPINFO_VERSION_ID == r.MarkupVersionID |
|
913 |
orderby markupData.PAGENUMBER |
|
914 |
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(); |
|
915 |
}); |
|
916 |
|
|
917 |
_ColorsProperties colors = new _ColorsProperties(); |
|
918 |
Random random = new Random(); |
|
919 |
|
|
920 |
using (KCOMEntities kcomEntity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString())) |
|
921 |
{ |
|
922 |
colors._colorsProperties = (from property in kcomEntity.PROPERTIES |
|
923 |
where property.TYPE == "DisplayColor" |
|
924 |
select property).ToList(); |
|
925 |
} |
|
926 |
List<DeptColor> deptColor = new List<DeptColor>(); |
|
927 |
|
|
928 |
List<DeptColor> listTest = new List<DeptColor>(); |
|
929 |
//Dictionary<string, string> d = new Dictionary<string, string>(); |
|
930 |
var list = new List<KeyValuePair<string, string>>(); |
|
931 |
foreach (var test in colors._colorsProperties) |
|
932 |
{ |
|
933 |
list.Add(new KeyValuePair<string, string>(test.PROPERTY, test.VALUE)); |
|
934 |
//d.Add(test.PROPERTY, test.VALUE); |
|
935 |
listTest.Add(new DeptColor { Property = test.PROPERTY,DisplayColor = test.VALUE}); |
|
936 |
} |
|
937 |
|
|
938 |
|
|
939 |
foreach (var item in _result) |
|
940 |
{ |
|
941 |
var _member = entity.MEMBER.Where(member => member.ID == item.UserID); |
|
942 |
|
|
943 |
if (_member.Count() > 0) |
|
944 |
{ |
|
945 |
item.UserName = _member.First().NAME; |
|
946 |
item.Depatment = _member.First().DEPARTMENT; |
|
947 |
} |
|
948 |
|
|
949 |
if (colors._colorsProperties.Count > 0) |
|
950 |
{ |
|
951 |
int colorIdx = random.Next(1, colors._colorsProperties.Count()); |
|
952 |
#region 부서별로 색상을 지정하고자 할때 |
|
953 |
|
|
954 |
if(deptColor.Count > 0) |
|
955 |
{ |
|
956 |
foreach (var dept in deptColor) |
|
957 |
{ |
|
958 |
if (dept.Depatment == item.Depatment) |
|
959 |
{ |
|
960 |
//list에서 deptColor.Property의 값 중 상위의 데이터를 뽑아서 지정하고 list에서 삭제 |
|
961 |
item.DisplayColor = "#FF" + list.Where(p => p.Key == dept.Property).FirstOrDefault().Value; |
|
962 |
list.Remove(new KeyValuePair<string, string>(dept.Property, dept.DisplayColor)); |
|
963 |
break; |
|
964 |
} |
|
965 |
else |
|
966 |
{ |
|
967 |
item.DisplayColor = "#FF" + colors._colorsProperties[colorIdx].VALUE; |
|
968 |
deptColor.Add(new DeptColor { DisplayColor = item.DisplayColor, Depatment = item.Depatment, Property = colors._colorsProperties[colorIdx].PROPERTY }); |
|
969 |
colors._colorsProperties.RemoveAll(p => p.PROPERTY.Equals(colors._colorsProperties[colorIdx].PROPERTY)); //같은 계열의 색상은 지운다 |
|
970 |
break; |
|
971 |
} |
|
972 |
} |
|
973 |
} |
|
974 |
else |
|
975 |
{ |
|
976 |
item.DisplayColor = "#FF" + colors._colorsProperties[colorIdx].VALUE; |
|
977 |
deptColor.Add(new DeptColor { DisplayColor = item.DisplayColor, Depatment = item.Depatment, Property = colors._colorsProperties[colorIdx].PROPERTY }); |
|
978 |
colors._colorsProperties.RemoveAll(p => p.PROPERTY.Equals(colors._colorsProperties[colorIdx].PROPERTY)); //같은 계열의 색상은 지운다 |
|
979 |
} |
|
980 |
#endregion |
|
981 |
} |
|
982 |
else |
|
983 |
{ |
|
984 |
item.DisplayColor = String.Format("#FF{0:X6}", random.Next(0x1000000)); |
|
985 |
} |
|
986 |
} |
|
987 |
} |
|
988 |
} |
|
989 |
catch (Exception EX) |
|
990 |
{ |
|
991 |
System.Diagnostics.Debug.WriteLine(this.GetType().ToString() + " " + EX); |
|
992 |
return _result; |
|
993 |
} |
|
994 |
finally |
|
995 |
{ |
|
996 |
GC.Collect(2); |
|
997 |
} |
|
998 |
|
|
999 |
return _result; |
|
1000 |
} |
|
1001 |
*/ |
|
1002 | 736 |
[OperationContract] |
1003 | 737 |
public List<MarkupInfoItem> GetSyncMarkupInfoItems(string ProjectNo, string DocInfoId, string currentUser) |
1004 | 738 |
{ |
내보내기 Unified diff