개정판 3cc84cb6
issue #0000
ID2 이슈사항이 있을 경우 조회조건 추가
AVEVA 이슈사항이 있을 경우 조회조건 추가
Change-Id: I1c7383172d7560864c914d9fa8d0f25251a3d477
ID2.Manager/ID2.Manager.Dapper/Repository/DocumentRepository.cs | ||
---|---|---|
58 | 58 |
} |
59 | 59 |
|
60 | 60 |
|
61 |
public (IEnumerable<Documents> dwgs, int totalCnt) GetDocuments(string projectGroupID, List<string> dateTypes, DateTime? frDate, DateTime? toDate, 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, List<string> dateTypes, DateTime? frDate, DateTime? toDate, string projectCode, string personIncharge, string jobLevel, string documentNo, string isToIsDiscussion, string isFrReviewStatus, string isID2Work, string id2Status, string id2Issues, string avevaStatus, string avevaIssues, 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())); |
... | ... | |
152 | 152 |
sbWhere.Append(" and doc.ID2Status=@ID2Status "); |
153 | 153 |
parameters.Add("ID2Status", id2Status); |
154 | 154 |
} |
155 |
|
|
156 |
if (!string.IsNullOrEmpty(id2Issues)) |
|
157 |
{ |
|
158 |
sbWhere.Append(" and (case when isnull(ltrim(rtrim(doc.ID2Issues)),'') = '' then 'No' else 'Yes' end)=@ID2Issues "); |
|
159 |
parameters.Add("ID2Issues", id2Issues); |
|
160 |
} |
|
161 |
|
|
155 | 162 |
if (!string.IsNullOrEmpty(avevaStatus)) |
156 | 163 |
{ |
157 | 164 |
sbWhere.Append(" and doc.AVEVAStatus=@AVEVAStatus "); |
158 | 165 |
parameters.Add("AVEVAStatus", avevaStatus); |
159 | 166 |
} |
160 | 167 |
|
168 |
if (!string.IsNullOrEmpty(avevaIssues)) |
|
169 |
{ |
|
170 |
sbWhere.Append(" and (case when isnull(ltrim(rtrim(doc.AVEVAIssues)),'') = '' then 'No' else 'Yes' end)=@AVEVAIssues "); |
|
171 |
parameters.Add("AVEVAIssues", avevaIssues); |
|
172 |
} |
|
173 |
|
|
161 | 174 |
if (!string.IsNullOrEmpty(prodIsResult)) |
162 | 175 |
{ |
163 | 176 |
sbWhere.Append(" and doc.ProdIsResult=@ProdIsResult "); |
... | ... | |
186 | 199 |
string query = $@" |
187 | 200 |
select doc.*, datediff(SECOND, doc.ID2StartDate, doc.ID2EndDate) as ID2JobTime, |
188 | 201 |
files.[FileID] as FileID, files.*, |
189 |
markus.MARKUP_DATA_ID as MARKUP_DATA_ID, markus.*, |
|
190 |
datediff(SECOND, doc.ID2StartDate, doc.ID2EndDate) as ID2JobTime |
|
202 |
markus.MARKUP_DATA_ID as MARKUP_DATA_ID, markus.* |
|
191 | 203 |
from dbo.Documents doc |
192 | 204 |
LEFT OUTER JOIN AttachFIles files ON doc.DocID = fIles.RefID |
193 | 205 |
LEFT OUTER JOIN |
내보내기 Unified diff