개정판 c517099d
KCOM_API 수정
- 구매엔지니어링 인터페이스 추가
Change-Id: Ifc0af4aa57b7ec26c1b16ac975c67a38c97c17ef
KCOM_API/DataModel/AdjustResult.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Runtime.Serialization; |
|
5 |
using System.Web; |
|
6 |
|
|
7 |
namespace KCOM_API |
|
8 |
{ |
|
9 |
|
|
10 |
[DataContract] |
|
11 |
public class Item |
|
12 |
{ |
|
13 |
[DataMember] |
|
14 |
public string ProjectNo { get; set; } |
|
15 |
|
|
16 |
[DataMember] |
|
17 |
public string DocumentID { get; set; } |
|
18 |
|
|
19 |
/// <summary> |
|
20 |
/// 계약요구사항 ID |
|
21 |
/// </summary> |
|
22 |
[DataMember] |
|
23 |
public string aId { get; set; } |
|
24 |
|
|
25 |
/// <summary> |
|
26 |
/// 구매요구사항 ID |
|
27 |
/// </summary> |
|
28 |
[DataMember] |
|
29 |
public string rId { get; set; } |
|
30 |
|
|
31 |
/// <summary> |
|
32 |
/// MR 상세 아이템 ID |
|
33 |
/// </summary> |
|
34 |
[DataMember] |
|
35 |
public string mdId { get; set; } |
|
36 |
|
|
37 |
|
|
38 |
/// <summary> |
|
39 |
/// 정합성여부 |
|
40 |
/// </summary> |
|
41 |
[DataMember] |
|
42 |
public string Condition { get; set; } |
|
43 |
|
|
44 |
[DataMember] |
|
45 |
public List<Commant> mrComments { get; set; } |
|
46 |
} |
|
47 |
} |
KCOM_API/DataModel/Commant.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Runtime.Serialization; |
|
5 |
using System.Web; |
|
6 |
|
|
7 |
namespace KCOM_API |
|
8 |
{ |
|
9 |
[DataContract] |
|
10 |
public class Commant |
|
11 |
{ |
|
12 |
[DataMember] |
|
13 |
public string id { get; set; } |
|
14 |
|
|
15 |
[DataMember] |
|
16 |
public string comment { get; set; } |
|
17 |
|
|
18 |
|
|
19 |
[DataMember] |
|
20 |
public string created { get; set; } |
|
21 |
|
|
22 |
|
|
23 |
[DataMember] |
|
24 |
public string createdBy { get; set; } |
|
25 |
|
|
26 |
|
|
27 |
[DataMember] |
|
28 |
public string createdByName { get; set; } |
|
29 |
|
|
30 |
|
|
31 |
[DataMember] |
|
32 |
public string modified { get; set; } |
|
33 |
|
|
34 |
|
|
35 |
[DataMember] |
|
36 |
public string modifiedBy { get; set; } |
|
37 |
|
|
38 |
|
|
39 |
[DataMember] |
|
40 |
public string modifiedByName { get; set; } |
|
41 |
} |
|
42 |
|
|
43 |
} |
KCOM_API/KCOM_API.csproj | ||
---|---|---|
50 | 50 |
<Reference Include="System.Runtime.Remoting" /> |
51 | 51 |
<Reference Include="System.Runtime.Serialization" /> |
52 | 52 |
<Reference Include="System.ServiceModel" /> |
53 |
<Reference Include="System.ServiceModel.Web" /> |
|
53 | 54 |
<Reference Include="System.Web.DynamicData" /> |
54 | 55 |
<Reference Include="System.Web.Entity" /> |
55 | 56 |
<Reference Include="System.Web.ApplicationServices" /> |
... | ... | |
67 | 68 |
<Reference Include="WindowsBase" /> |
68 | 69 |
</ItemGroup> |
69 | 70 |
<ItemGroup> |
71 |
<Content Include="MarkusService.svc" /> |
|
70 | 72 |
<Content Include="ServiceDeepView.svc" /> |
71 | 73 |
<Content Include="Web.config"> |
72 | 74 |
<SubType>Designer</SubType> |
73 | 75 |
</Content> |
74 | 76 |
</ItemGroup> |
75 | 77 |
<ItemGroup> |
78 |
<Compile Include="DataModel\AdjustResult.cs" /> |
|
79 |
<Compile Include="DataModel\Commant.cs" /> |
|
80 |
<Compile Include="MarkusService.svc.cs"> |
|
81 |
<DependentUpon>MarkusService.svc</DependentUpon> |
|
82 |
<SubType>Component</SubType> |
|
83 |
</Compile> |
|
76 | 84 |
<Compile Include="Properties\AssemblyInfo.cs" /> |
77 | 85 |
<Compile Include="Properties\Settings.Designer.cs"> |
78 | 86 |
<AutoGen>True</AutoGen> |
KCOM_API/MarkusService.svc | ||
---|---|---|
1 |
<%@ ServiceHost Language="C#" Debug="true" Service="KCOM_API.MarkusService" CodeBehind="MarkusService.svc.cs" %> |
KCOM_API/MarkusService.svc.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Runtime.Serialization; |
|
5 |
using System.ServiceModel; |
|
6 |
using System.ServiceModel.Activation; |
|
7 |
using System.ServiceModel.Web; |
|
8 |
using System.Text; |
|
9 |
|
|
10 |
namespace KCOM_API |
|
11 |
{ |
|
12 |
[ServiceContract(Namespace = "")] |
|
13 |
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] |
|
14 |
public class MarkusService : System.Web.Services.WebService |
|
15 |
{ |
|
16 |
[WebInvoke(Method = "POST", UriTemplate = "GetAdjustList", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)] |
|
17 |
[OperationContract] |
|
18 |
public Item GetAdjustList(string projectNo, string DocumentId) |
|
19 |
{ |
|
20 |
return GetTestData(); |
|
21 |
} |
|
22 |
|
|
23 |
[WebInvoke(Method = "POST", UriTemplate = "GetAdjustCommantList", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)] |
|
24 |
[OperationContract] |
|
25 |
public Item GetAdjustCommantList(string projectNo, string DocumentId) |
|
26 |
{ |
|
27 |
return GetTestData(); |
|
28 |
} |
|
29 |
|
|
30 |
//[WebInvoke(Method = "POST", UriTemplate = "GetAdjustCommantList", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)] |
|
31 |
//[OperationContract] |
|
32 |
//public Item GetAdjustCommantList(string projectNo, string DocumentId) |
|
33 |
//{ |
|
34 |
// return GetTestData(); |
|
35 |
//} |
|
36 |
|
|
37 |
private Item GetTestData() |
|
38 |
{ |
|
39 |
return new Item |
|
40 |
{ |
|
41 |
ProjectNo = "111111", |
|
42 |
DocumentID = Guid.NewGuid().ToString(), |
|
43 |
aId = Guid.NewGuid().ToString(), |
|
44 |
Condition = true.ToString(), |
|
45 |
mdId = Guid.NewGuid().ToString(), |
|
46 |
rId = Guid.NewGuid().ToString(), |
|
47 |
mrComments = new List<Commant> |
|
48 |
{ |
|
49 |
new Commant{comment = "test",created = "Test" ,createdBy ="ff",createdByName = "test",modified = "aa",modifiedBy = "test",modifiedByName = "aa",id ="aa"}, |
|
50 |
new Commant{comment = "test",created = "Test" ,createdBy ="ff",createdByName = "test",modified = "aa",modifiedBy = "test",modifiedByName = "aa",id ="aa"}, |
|
51 |
new Commant{comment = "test",created = "Test" ,createdBy ="ff",createdByName = "test",modified = "aa",modifiedBy = "test",modifiedByName = "aa",id ="aa"}, |
|
52 |
new Commant{comment = "test",created = "Test" ,createdBy ="ff",createdByName = "test",modified = "aa",modifiedBy = "test",modifiedByName = "aa",id ="aa"} |
|
53 |
} |
|
54 |
|
|
55 |
}; |
|
56 |
} |
|
57 |
|
|
58 |
} |
|
59 |
} |
KCOM_API/Web.config | ||
---|---|---|
23 | 23 |
</system.web> |
24 | 24 |
<system.serviceModel> |
25 | 25 |
<behaviors> |
26 |
<endpointBehaviors> |
|
27 |
<behavior name="WebHttpBehavior"> |
|
28 |
<webHttp helpEnabled="true" defaultBodyStyle="Wrapped" defaultOutgoingResponseFormat="Json" /> |
|
29 |
</behavior> |
|
30 |
</endpointBehaviors> |
|
26 | 31 |
<serviceBehaviors> |
27 | 32 |
<behavior name="KCOM_API.SilverlightServiceBehavior"> |
28 |
<serviceMetadata httpGetEnabled="true"/> |
|
29 |
<serviceDebug includeExceptionDetailInFaults="false"/> |
|
30 |
<!--Jaedoo 최소용량때문에 추가한거임--> |
|
31 |
<dataContractSerializer maxItemsInObjectGraph="2147483647"/> |
|
33 |
<serviceMetadata httpGetEnabled="true" /> |
|
34 |
<serviceDebug includeExceptionDetailInFaults="false" /> |
|
35 |
<dataContractSerializer maxItemsInObjectGraph="2147483647" /> |
|
36 |
</behavior> |
|
37 |
<behavior name=""> |
|
38 |
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" /> |
|
39 |
<serviceDebug includeExceptionDetailInFaults="false" /> |
|
32 | 40 |
</behavior> |
33 | 41 |
</serviceBehaviors> |
34 | 42 |
</behaviors> |
35 |
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/> |
|
43 |
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" |
|
44 |
multipleSiteBindingsEnabled="true" /> |
|
36 | 45 |
<bindings> |
37 | 46 |
<basicHttpBinding> |
38 | 47 |
<binding name="LargeBuffer" receiveTimeout="04:30:00" openTimeout="00:30:00" sendTimeout="04:30:00" closeTimeout="00:30:00" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> |
... | ... | |
41 | 50 |
</basicHttpBinding> |
42 | 51 |
</bindings> |
43 | 52 |
<services> |
44 |
<service behaviorConfiguration="KCOM_API.SilverlightServiceBehavior" name="KCOM_API.ServiceDeepView"> |
|
45 |
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="LargeBuffer" name="DeepViewPoint" contract="KCOM_API.ServiceDeepView"> |
|
53 |
<service behaviorConfiguration="KCOM_API.SilverlightServiceBehavior" |
|
54 |
name="KCOM_API.ServiceDeepView"> |
|
55 |
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="LargeBuffer" |
|
56 |
name="DeepViewPoint" contract="KCOM_API.ServiceDeepView"> |
|
46 | 57 |
<identity> |
47 |
<dns value="localhost"/> |
|
58 |
<dns value="localhost" />
|
|
48 | 59 |
</identity> |
49 | 60 |
</endpoint> |
50 |
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> |
|
61 |
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> |
|
62 |
</service> |
|
63 |
<service name="KCOM_API.MarkusService"> |
|
64 |
<endpoint address="Rest" behaviorConfiguration="WebHttpBehavior" |
|
65 |
binding="webHttpBinding" bindingConfiguration="" name="MarkusServiceWebEndPoint" |
|
66 |
contract="KCOM_API.MarkusService" /> |
|
67 |
<endpoint binding="basicHttpBinding" bindingConfiguration="" |
|
68 |
name="MarkusServiceEndPoint" contract="KCOM_API.MarkusService" /> |
|
51 | 69 |
</service> |
52 | 70 |
</services> |
53 | 71 |
</system.serviceModel> |
내보내기 Unified diff