개정판 ea97eee6
issue #0000
- document 조회 시 프로젝트group에 포함되는 document와 project 선택이 되어있지 않은 document만 조회
- document 에 프로젝트 선택 시 부터 해당 group의해당 project 조건에서 조회됨
- ID2와 sync 시에는 해당 group의 ID2 프로젝트로 할당되어있는 project의 document 만 sync 됨
Change-Id: Ief0eb74d2cb7ec73e6ddb5098f987ef801742a61
ID2.Manager/ID2.Manager.Controller/Controllers/DocumentController.cs | ||
---|---|---|
31 | 31 |
} |
32 | 32 |
} |
33 | 33 | |
34 |
public (IEnumerable<Documents> dwgs, int totalCnt) GetDocuments(string projectCode, string personIncharge, string jobLevel, string documentNo, string isToIsDiscussion, string isFrReviewStatus, string isID2Work, string id2Status, string avevaStatus, string prodIsResult, string clientIsResult, string isGateWay, string isRegSystem) |
|
34 |
public (IEnumerable<Documents> dwgs, int totalCnt) GetDocuments(string projectGroupID, string projectCode, string personIncharge, string jobLevel, string documentNo, string isToIsDiscussion, string isFrReviewStatus, string isID2Work, string id2Status, string avevaStatus, string prodIsResult, string clientIsResult, string isGateWay, string isRegSystem)
|
|
35 | 35 |
{ |
36 | 36 |
try |
37 | 37 |
{ |
38 | 38 |
using (DocumentRepository rep = new DocumentRepository(this._MSSQLCONNSTR)) |
39 | 39 |
{ |
40 |
return rep.GetDocuments(projectCode, personIncharge, jobLevel, documentNo, isToIsDiscussion, isFrReviewStatus, isID2Work, id2Status, avevaStatus, prodIsResult, clientIsResult, isGateWay, isRegSystem); |
|
40 |
return rep.GetDocuments(projectGroupID, projectCode, personIncharge, jobLevel, documentNo, isToIsDiscussion, isFrReviewStatus, isID2Work, id2Status, avevaStatus, prodIsResult, clientIsResult, isGateWay, isRegSystem);
|
|
41 | 41 |
} |
42 | 42 |
} |
43 | 43 |
catch (Exception ex) |
... | ... | |
46 | 46 |
} |
47 | 47 |
} |
48 | 48 | |
49 |
public (IEnumerable<Documents> dwgs, int totalCnt) GetDocuments(List<ID2ProjectInfo> id2Infos, string projectCode, string personIncharge, string jobLevel, string documentNo, string isToIsDiscussion, string isFrReviewStatus, string isID2Work, string id2Status, string avevaStatus, string prodIsResult, string clientIsResult, string isGateWay, string isRegSystem) |
|
49 |
public (IEnumerable<Documents> dwgs, int totalCnt) GetDocuments(List<ID2ProjectInfo> id2Infos, string projectGroupID, string projectCode, string personIncharge, string jobLevel, string documentNo, string isToIsDiscussion, string isFrReviewStatus, string isID2Work, string id2Status, string avevaStatus, string prodIsResult, string clientIsResult, string isGateWay, string isRegSystem)
|
|
50 | 50 |
{ |
51 | 51 |
try |
52 | 52 |
{ |
53 |
var (dwgs, totalCnt) = this.GetDocuments(projectCode, personIncharge, jobLevel, documentNo, isToIsDiscussion, isFrReviewStatus, isID2Work, id2Status, avevaStatus, prodIsResult, clientIsResult, isGateWay, isRegSystem); |
|
53 |
var (dwgs, totalCnt) = this.GetDocuments(projectGroupID, projectCode, personIncharge, jobLevel, documentNo, isToIsDiscussion, isFrReviewStatus, isID2Work, id2Status, avevaStatus, prodIsResult, clientIsResult, isGateWay, isRegSystem);
|
|
54 | 54 | |
55 | 55 |
IEnumerable<Documents> docs = dwgs; |
56 | 56 |
List<ID2Drawings> id2docs = null; |
ID2.Manager/ID2.Manager.Dapper/Repository/DocumentRepository.cs | ||
---|---|---|
58 | 58 |
} |
59 | 59 | |
60 | 60 | |
61 |
public (IEnumerable<Documents> dwgs, int totalCnt) GetDocuments(string projectCode, string personIncharge, string jobLevel, string documentNo, string isToIsDiscussion, string isFrReviewStatus, string isID2Work, string id2Status, string avevaStatus, string prodIsResult, string clientIsResult, string isGateWay, string isRegSystem) |
|
61 |
public (IEnumerable<Documents> dwgs, int totalCnt) GetDocuments(string projectGroupID, string projectCode, string personIncharge, string jobLevel, string documentNo, string isToIsDiscussion, string isFrReviewStatus, string isID2Work, string id2Status, string avevaStatus, string prodIsResult, string clientIsResult, string isGateWay, string isRegSystem)
|
|
62 | 62 |
{ |
63 | 63 |
var map = new CustomPropertyTypeMap(typeof(AttFileInfo), (type, columnName) |
64 | 64 |
=> type.GetProperties().FirstOrDefault(prop => GetDescriptionFromAttribute(prop) == columnName.ToLower())); |
... | ... | |
71 | 71 |
StringBuilder sbWhere = new StringBuilder(); |
72 | 72 |
StringBuilder sbTotalWhere = new StringBuilder(); |
73 | 73 |
var parameters = new Dictionary<string, object>(); |
74 |
if (!string.IsNullOrEmpty(projectCode)) |
|
74 |
if (string.IsNullOrEmpty(projectCode)) |
|
75 |
{ |
|
76 |
sbWhere.Append(" and isnull(doc.RefProjectCode,'') in (select Code from dbo.Projects where ParentID=@RefGroupID union all select '') "); |
|
77 |
parameters.Add("RefGroupID", projectGroupID); |
|
78 |
} |
|
79 |
else |
|
75 | 80 |
{ |
76 | 81 |
sbWhere.Append(" and doc.RefProjectCode=@RefProjectCode "); |
77 | 82 |
sbTotalWhere.Append(" and doc.RefProjectCode=@RefProjectCode "); |
ID2.Manager/ID2.Manager/Classes/DocumentsWorker.cs | ||
---|---|---|
19 | 19 |
public delegate void OnWorkCompleted(RunWorkerCompletedEventArgs e); |
20 | 20 |
public OnWorkCompleted OnWorkCompletedHandler; |
21 | 21 | |
22 |
readonly Informations informations = Informations.Instance; |
|
22 | 23 |
string ProjectCode { get; set; } |
23 | 24 |
string PersonIncharge { get; set; } |
24 | 25 |
string JobLevel { get; set; } |
... | ... | |
54 | 55 |
{ |
55 | 56 |
try |
56 | 57 |
{ |
57 |
var (dwgs, totalCnt) = new DocumentController().GetDocuments(this.ProjectCode, this.PersonIncharge, this.JobLevel, this.DocumentNo, this.IsToIsDiscussion, this.IsFrReviewStatus, this.IsID2Work, this.Id2Status, this.AvevaStatus, this.ProdIsResult, this.ClientIsResult, this.DTIsGateWay, this.DTIsRegSystem); |
|
58 |
var (dwgs, totalCnt) = new DocumentController().GetDocuments(informations.ActiveProject.ProjectID, this.ProjectCode, this.PersonIncharge, this.JobLevel, this.DocumentNo, this.IsToIsDiscussion, this.IsFrReviewStatus, this.IsID2Work, this.Id2Status, this.AvevaStatus, this.ProdIsResult, this.ClientIsResult, this.DTIsGateWay, this.DTIsRegSystem);
|
|
58 | 59 |
e.Result = new DocumentsResult() { Dwgs = dwgs.ToList(), TotalCount = totalCnt }; |
59 | 60 |
} |
60 | 61 |
catch (Exception ex) |
내보내기 Unified diff