개정판 a37dc9a7
issue #000000 markup_data_id 제거
Change-Id: I6c4fb6353b0566d052ac59a55e4861ab58585f02
ID2.Manager/ID2.Manager.Dapper/Repository/DocumentRepository.cs | ||
---|---|---|
199 | 199 |
string query = $@" |
200 | 200 |
select doc.*, datediff(SECOND, doc.ID2StartDate, doc.ID2EndDate) as ID2JobTime, |
201 | 201 |
files.[FileID] as FileID, files.*, |
202 |
markus.MARKUP_DATA_ID as MARKUP_DATA_ID, markus.*
|
|
202 |
markus.PROJECT_NO as PROJECT_NO, markus.*
|
|
203 | 203 |
from dbo.Documents doc |
204 | 204 |
LEFT OUTER JOIN AttachFIles files ON doc.DocID = fIles.RefID |
205 | 205 |
LEFT OUTER JOIN |
206 |
(SELECT [MARKUP_DATA_ID] |
|
207 |
,[PROJECT_NO] as PROJECT_NO |
|
206 |
(SELECT [PROJECT_NO] as PROJECT_NO |
|
208 | 207 |
,[DOCUMENT_ID] as DocumentNo |
209 | 208 |
|
210 | 209 |
,[PAGENUMBER] |
... | ... | |
241 | 240 |
{ |
242 | 241 |
doc.Markups = doc.Markups ?? new List<MarkupText>(); |
243 | 242 |
|
244 |
if (!doc.Markups.Any(x => x.MARKUP_DATA_ID == markusText.MARKUP_DATA_ID))
|
|
243 |
if (!doc.Markups.Any(x => x.Equals(markusText)))
|
|
245 | 244 |
{ |
246 | 245 |
doc.Markups.Add(markusText); |
247 | 246 |
} |
... | ... | |
275 | 274 |
|
276 | 275 |
return doc; |
277 | 276 |
|
278 |
}, dynamicParameters, splitOn: "DocID,FileID,MARKUP_DATA_ID").Distinct();
|
|
277 |
}, dynamicParameters, splitOn: "DocID,FileID,PROJECT_NO").Distinct();
|
|
279 | 278 |
|
280 | 279 |
int totalCount = dynamicParameters.Get<int>("Total"); |
281 | 280 |
|
ID2.Manager/ID2.Manager.Data/Models/MarkupText.cs | ||
---|---|---|
9 | 9 |
{ |
10 | 10 |
public class MarkupText : IEquatable<MarkupText> |
11 | 11 |
{ |
12 |
public string MARKUP_DATA_ID { get; set; } |
|
13 | 12 |
public string PROJECT_NO { get; set; } |
14 | 13 |
|
15 | 14 |
public string CREATE_USER { get; set; } |
... | ... | |
23 | 22 |
public bool Equals(MarkupText other) |
24 | 23 |
{ |
25 | 24 |
return other != null |
26 |
&& MARKUP_DATA_ID == other.MARKUP_DATA_ID |
|
27 | 25 |
&& PROJECT_NO == other.PROJECT_NO |
28 | 26 |
&& CREATE_USER == other.CREATE_USER |
29 | 27 |
&& TEXT == other.TEXT |
... | ... | |
33 | 31 |
|
34 | 32 |
public override int GetHashCode() |
35 | 33 |
{ |
36 |
return this.MARKUP_DATA_ID.GetNullableHash() + this.CREATE_USER.GetNullableHash() + this.TEXT.GetNullableHash() + this.CREATE_DATE.GetNullableHash() + PROJECT_NO.GetNullableHash() + DocumentNo.GetNullableHash();
|
|
34 |
return this.CREATE_USER.GetNullableHash() + this.TEXT.GetNullableHash() + this.CREATE_DATE.GetNullableHash() + PROJECT_NO.GetNullableHash() + DocumentNo.GetNullableHash(); |
|
37 | 35 |
} |
38 | 36 |
|
39 | 37 |
|
내보내기 Unified diff