hytos / ID2.Manager / ID2.Manager.Data / Models / Documents.cs @ 416979ec
이력 | 보기 | 이력해설 | 다운로드 (18.3 KB)
1 |
using System; |
---|---|
2 |
using System.Collections.Generic; |
3 |
using System.Linq; |
4 |
using System.Text; |
5 |
using System.Threading.Tasks; |
6 |
|
7 |
using System.ComponentModel; |
8 |
using System.Runtime.Serialization; |
9 |
|
10 |
using Newtonsoft.Json; |
11 |
|
12 |
namespace ID2.Manager.Data.Models |
13 |
{ |
14 |
//[DataContract] |
15 |
//[JsonObject(IsReference = true)] |
16 |
public class Documents : NotifyPropertyChange, IEquatable<Documents> |
17 |
{ |
18 |
//[DataMember] |
19 |
public int Seq { get; set; } |
20 |
//[DataMember] |
21 |
public string DocID { get; set; } |
22 |
//[DataMember] |
23 |
public string DocumentNo { get; set; } |
24 |
//[DataMember] |
25 |
public string RevisonNo { get; set; } |
26 |
//[DataMember] |
27 |
public string System { get; set; } |
28 |
//[DataMember] |
29 |
public string SubSystemCode { get; set; } |
30 |
public string Team { get; set; } |
31 |
|
32 |
private string _Simularity = string.Empty; |
33 |
public string Simularity |
34 |
{ |
35 |
get { return _Simularity; } |
36 |
set |
37 |
{ |
38 |
if (!_Simularity.Equals(value)) |
39 |
{ |
40 |
_Simularity = value; |
41 |
RaisePropertyChanged("Simularity"); |
42 |
} |
43 |
} |
44 |
} |
45 |
|
46 |
private string _RefProjectCode = string.Empty; |
47 |
//[DataMember] |
48 |
public string RefProjectCode |
49 |
{ |
50 |
get => this._RefProjectCode; |
51 |
set => SetProperty(ref this._RefProjectCode, value); |
52 |
} |
53 |
|
54 |
private string _JobLevel = string.Empty; |
55 |
//[DataMember] |
56 |
public string JobLevel |
57 |
{ |
58 |
get => this._JobLevel; |
59 |
set => SetProperty(ref this._JobLevel, value); |
60 |
} |
61 |
|
62 |
private string _PersonInCharge = null; |
63 |
//[DataMember] |
64 |
public string PersonInCharge |
65 |
{ |
66 |
get => this._PersonInCharge; |
67 |
set => SetProperty(ref this._PersonInCharge, value); |
68 |
} |
69 |
|
70 |
private string _Worker = null; |
71 |
//[DataMember] |
72 |
public string Worker |
73 |
{ |
74 |
get => this._Worker; |
75 |
set => SetProperty(ref this._Worker, value); |
76 |
} |
77 |
|
78 |
//[DataMember] |
79 |
public string RegisteredUser { get; set; } |
80 |
//[DataMember] |
81 |
public string ModifiedUser { get; set; } |
82 |
//[DataMember] |
83 |
public string DeletedUser { get; set; } |
84 |
|
85 |
private string _ToIsDiscussion = string.Empty; |
86 |
//[DataMember] |
87 |
public string ToIsDiscussion |
88 |
{ |
89 |
get => this._ToIsDiscussion; |
90 |
set => SetProperty(ref this._ToIsDiscussion, value); |
91 |
} |
92 |
|
93 |
//[DataMember] |
94 |
public string ToRemarks { get; set; } |
95 |
|
96 |
private string _ToCreator = null; |
97 |
//[DataMember] |
98 |
public string ToCreator |
99 |
{ |
100 |
get => this._ToCreator; |
101 |
set => SetProperty(ref this._ToCreator, value); |
102 |
} |
103 |
|
104 |
public int ToCapture { get; set; } |
105 |
|
106 |
private string _FrReviewStatus = string.Empty; |
107 |
//[DataMember] |
108 |
public string FrReviewStatus |
109 |
{ |
110 |
get => this._FrReviewStatus; |
111 |
set => SetProperty(ref this._FrReviewStatus, value); |
112 |
} |
113 |
|
114 |
//[DataMember] |
115 |
public string FrRemarks { get; set; } |
116 |
|
117 |
private string _FrCreator = null; |
118 |
//[DataMember] |
119 |
public string FrCreator |
120 |
{ |
121 |
get => this._FrCreator; |
122 |
set => SetProperty(ref this._FrCreator, value); |
123 |
} |
124 |
|
125 |
public int FrCapture { get; set; } |
126 |
//[DataMember] |
127 |
public DateTime? ID2StartDate { get; set; } |
128 |
//[DataMember] |
129 |
public DateTime? ID2EndDate { get; set; } |
130 |
|
131 |
|
132 |
private string _ID2Status = string.Empty; |
133 |
//[DataMember] |
134 |
public string ID2Status |
135 |
{ |
136 |
get => this._ID2Status; |
137 |
set => SetProperty(ref this._ID2Status, value); |
138 |
} |
139 |
|
140 |
|
141 |
//[DataMember] |
142 |
public string ID2Issues { get; set; } |
143 |
public int ID2Capture { get; set; } |
144 |
//[DataMember] |
145 |
public string ReplyModifications { get; set; } |
146 |
|
147 |
private string _ReplyRequester = null; |
148 |
//[DataMember] |
149 |
public string ReplyRequester |
150 |
{ |
151 |
get => this._ReplyRequester; |
152 |
set => SetProperty(ref this._ReplyRequester, value); |
153 |
} |
154 |
|
155 |
private string _IsConvert = string.Empty; |
156 |
//[DataMember] |
157 |
public string IsConvert |
158 |
{ |
159 |
get => this._IsConvert; |
160 |
set => SetProperty(ref this._IsConvert, value); |
161 |
} |
162 |
|
163 |
private string _AVEVAPersonInCharge = null; |
164 |
//[DataMember] |
165 |
public string AVEVAPersonInCharge |
166 |
{ |
167 |
get => this._AVEVAPersonInCharge; |
168 |
set => SetProperty(ref this._AVEVAPersonInCharge, value); |
169 |
} |
170 |
|
171 |
private string _AVEVAWorker = null; |
172 |
//[DataMember] |
173 |
public string AVEVAWorker |
174 |
{ |
175 |
get => this._AVEVAWorker; |
176 |
set => SetProperty(ref this._AVEVAWorker, value); |
177 |
} |
178 |
|
179 |
//[DataMember] |
180 |
public DateTime? AVEVAConvertDate { get; set; } |
181 |
//[DataMember] |
182 |
public DateTime? AVEVAReviewDate { get; set; } |
183 |
//[DataMember] |
184 |
public DateTime? AVEVAWorkDate { get; set; } |
185 |
|
186 |
private string _AVEVAStatus = string.Empty; |
187 |
//[DataMember] |
188 |
public string AVEVAStatus |
189 |
{ |
190 |
get => this._AVEVAStatus; |
191 |
set => SetProperty(ref this._AVEVAStatus, value); |
192 |
} |
193 |
|
194 |
//[DataMember] |
195 |
public string AVEVAIssues { get; set; } |
196 |
|
197 |
private string _ProdReviewer = null; |
198 |
//[DataMember] |
199 |
public string ProdReviewer |
200 |
{ |
201 |
get => this._ProdReviewer; |
202 |
set => SetProperty(ref this._ProdReviewer, value); |
203 |
} |
204 |
|
205 |
private string _ProdIsResult = string.Empty; |
206 |
//[DataMember] |
207 |
public string ProdIsResult |
208 |
{ |
209 |
get => this._ProdIsResult; |
210 |
set => SetProperty(ref this._ProdIsResult, value); |
211 |
} |
212 |
|
213 |
//[DataMember] |
214 |
public string ProdRemarks { get; set; } |
215 |
|
216 |
private string _ClientReviewer = null; |
217 |
//[DataMember] |
218 |
public string ClientReviewer |
219 |
{ |
220 |
get => this._ClientReviewer; |
221 |
set => SetProperty(ref this._ClientReviewer, value); |
222 |
} |
223 |
|
224 |
private string _ClientIsResult = string.Empty; |
225 |
//[DataMember] |
226 |
public string ClientIsResult |
227 |
{ |
228 |
get => this._ClientIsResult; |
229 |
set => SetProperty(ref this._ClientIsResult, value); |
230 |
} |
231 |
|
232 |
//[DataMember] |
233 |
public string ClientRemarks { get; set; } |
234 |
|
235 |
private string _DTIsGateWay = string.Empty; |
236 |
//[DataMember] |
237 |
public string DTIsGateWay |
238 |
{ |
239 |
get => this._DTIsGateWay; |
240 |
set => SetProperty(ref this._DTIsGateWay, value); |
241 |
} |
242 |
|
243 |
private string _DTIsImport = string.Empty; |
244 |
//[DataMember] |
245 |
public string DTIsImport |
246 |
{ |
247 |
get => this._DTIsImport; |
248 |
set => SetProperty(ref this._DTIsImport, value); |
249 |
} |
250 |
|
251 |
private string _DTIsRegSystem = string.Empty; |
252 |
//[DataMember] |
253 |
public string DTIsRegSystem |
254 |
{ |
255 |
get => this._DTIsRegSystem; |
256 |
set => SetProperty(ref this._DTIsRegSystem, value); |
257 |
} |
258 |
|
259 |
//[DataMember] |
260 |
public string DTRemarks { get; set; } |
261 |
|
262 |
public List<MarkupText> Markups { get; set; } |
263 |
|
264 |
public List<AttFileInfo> AttFiles { get; set; } |
265 |
|
266 |
public int ConvertStatus { get; set; } |
267 |
|
268 |
public override bool Equals(object obj) |
269 |
{ |
270 |
return Equals(obj as Documents); |
271 |
} |
272 |
|
273 |
public bool Equals(Documents other) |
274 |
{ |
275 |
|
276 |
if (this != null && other == null) |
277 |
return false; |
278 |
|
279 |
if (this.DocumentNo != other.DocumentNo) return false; |
280 |
if (this.RevisonNo != other.RevisonNo) return false; |
281 |
if (this.System != other.System) return false; |
282 |
if (this.SubSystemCode != other.SubSystemCode) return false; |
283 |
if (this.RefProjectCode != other.RefProjectCode) return false; |
284 |
if (this.JobLevel != other.JobLevel) return false; |
285 |
if (this.Simularity != other.Simularity) return false; |
286 |
if (this.PersonInCharge != other.PersonInCharge) return false; |
287 |
if (this.Worker != other.Worker) return false; |
288 |
if (this.ToIsDiscussion != other.ToIsDiscussion) return false; |
289 |
if (this.ToRemarks != other.ToRemarks) return false; |
290 |
if (this.ToCreator != other.ToCreator) return false; |
291 |
|
292 |
if (this.FrReviewStatus != other.FrReviewStatus) return false; |
293 |
if (this.FrRemarks != other.FrRemarks) return false; |
294 |
if (this.FrCreator != other.FrCreator) return false; |
295 |
if (this.ID2StartDate != other.ID2StartDate) return false; |
296 |
if (this.ID2EndDate != other.ID2EndDate) return false; |
297 |
if (this.ID2Status != other.ID2Status) return false; |
298 |
if (this.ID2Issues != other.ID2Issues) return false; |
299 |
if (this.ReplyModifications != other.ReplyModifications) return false; |
300 |
if (this.ReplyRequester != other.ReplyRequester) return false; |
301 |
if (this.IsConvert != other.IsConvert) return false; |
302 |
if (this.AVEVAPersonInCharge != other.AVEVAPersonInCharge) return false; |
303 |
if (this.AVEVAWorker != other.AVEVAWorker) return false; |
304 |
if (this.AVEVAConvertDate != other.AVEVAConvertDate) return false; |
305 |
if (this.AVEVAReviewDate != other.AVEVAReviewDate) return false; |
306 |
if (this.AVEVAWorkDate != other.AVEVAWorkDate) return false; |
307 |
if (this.AVEVAStatus != other.AVEVAStatus) return false; |
308 |
if (this.AVEVAIssues != other.AVEVAIssues) return false; |
309 |
if (this.ProdReviewer != other.ProdReviewer) return false; |
310 |
if (this.ProdIsResult != other.ProdIsResult) return false; |
311 |
if (this.ProdRemarks != other.ProdRemarks) return false; |
312 |
if (this.ClientReviewer != other.ClientReviewer) return false; |
313 |
if (this.ClientIsResult != other.ClientIsResult) return false; |
314 |
if (this.ClientRemarks != other.ClientRemarks) return false; |
315 |
if (this.DTIsGateWay != other.DTIsGateWay) return false; |
316 |
if (this.DTIsImport != other.DTIsImport) return false; |
317 |
if (this.DTIsRegSystem != other.DTIsRegSystem) return false; |
318 |
if (this.DTRemarks != other.DTRemarks) return false; |
319 |
if (this.ConvertStatus != other.ConvertStatus) return false; |
320 |
|
321 |
if (this.AttFiles == null && other.AttFiles == null) |
322 |
{ |
323 |
return true; |
324 |
} |
325 |
else if (this.AttFiles != null && other.AttFiles != null) |
326 |
{ |
327 |
if (!this.AttFiles.SequenceEqual(other.AttFiles)) |
328 |
return false; |
329 |
} |
330 |
else |
331 |
{ |
332 |
return false; |
333 |
} |
334 |
|
335 |
//bool result = this.FrReviewStatus == other.FrReviewStatus && this.FrRemarks == other.FrRemarks && this.FrCreator == other.FrCreator |
336 |
// && this.ID2StartDate == other.ID2StartDate && this.ID2EndDate == other.ID2EndDate && this.ID2Status == other.ID2Status |
337 |
// && this.ID2Issues == other.ID2Issues && this.ReplyModifications == other.ReplyModifications && this.ReplyRequester == other.ReplyRequester && this.IsConvert == other.IsConvert && this.AVEVAPersonInCharge == other.AVEVAPersonInCharge && this.AVEVAWorker == other.AVEVAWorker |
338 |
// && this.AVEVAConvertDate == other.AVEVAConvertDate && this.AVEVAReviewDate == other.AVEVAReviewDate && this.AVEVAWorkDate == other.AVEVAWorkDate |
339 |
// && this.AVEVAStatus == other.AVEVAStatus && this.AVEVAIssues == other.AVEVAIssues |
340 |
// && this.ProdReviewer == other.ProdReviewer && this.ProdIsResult == other.ProdIsResult && this.ProdRemarks == other.ProdRemarks && this.ClientReviewer == other.ClientReviewer |
341 |
// && this.ClientIsResult == other.ClientIsResult && this.ClientRemarks == other.ClientRemarks && this.DTIsGateWay == other.DTIsGateWay && this.DTIsImport == other.DTIsImport |
342 |
// && this.DTIsRegSystem == other.DTIsRegSystem && this.DTRemarks == other.DTRemarks && this.ConvertStatus == other.ConvertStatus |
343 |
// && isAttfilesEqual; |
344 |
|
345 |
//if (result == false) |
346 |
//{ |
347 |
// string id = this.DocID; |
348 |
//} |
349 |
|
350 |
return true; |
351 |
|
352 |
} |
353 |
public override int GetHashCode() |
354 |
{ |
355 |
return this.DocumentNo.GetNullableHash() + this.RevisonNo.GetNullableHash() + this.System.GetNullableHash() + this.SubSystemCode.GetNullableHash() |
356 |
+ this.RefProjectCode.GetNullableHash() + this.JobLevel.GetNullableHash() + this.Simularity.GetNullableHash() |
357 |
+ this.PersonInCharge.GetNullableHash() + this.Worker.GetNullableHash() + this.ToIsDiscussion.GetNullableHash() + this.ToRemarks.GetNullableHash() |
358 |
+ this.ToCreator.GetNullableHash() |
359 |
+ this.FrReviewStatus.GetNullableHash() + this.FrRemarks.GetNullableHash() + this.FrCreator.GetNullableHash() |
360 |
+ this.ID2StartDate.GetNullableHash() + this.ID2EndDate.GetNullableHash() + this.ID2Status.GetNullableHash() |
361 |
+ this.ID2Issues.GetNullableHash() + this.ReplyModifications.GetNullableHash() + this.ReplyRequester.GetNullableHash() + this.IsConvert.GetNullableHash() + this.AVEVAPersonInCharge.GetNullableHash() + this.AVEVAWorker.GetNullableHash() |
362 |
+ this.AVEVAConvertDate.GetNullableHash() + this.AVEVAReviewDate.GetNullableHash() + this.AVEVAWorkDate.GetNullableHash() |
363 |
+ this.AVEVAStatus.GetNullableHash() + this.AVEVAIssues.GetNullableHash() |
364 |
+ this.ProdReviewer.GetNullableHash() + this.ProdIsResult.GetNullableHash() + this.ProdRemarks.GetNullableHash() + this.ClientReviewer.GetNullableHash() |
365 |
+ this.ClientIsResult.GetNullableHash() + this.ClientRemarks.GetNullableHash() + this.DTIsGateWay.GetNullableHash() + this.DTIsImport.GetNullableHash() |
366 |
+ this.DTIsRegSystem.GetNullableHash() + this.DTRemarks.GetNullableHash() + this.ConvertStatus.GetNullableHash(); |
367 |
} |
368 |
|
369 |
public class DocumentsKeyCompare : IEqualityComparer<Documents> |
370 |
{ |
371 |
public bool Equals(Documents x, Documents y) |
372 |
{ |
373 |
if (x == null && y == null) |
374 |
return true; |
375 |
else if (x == null || y == null) |
376 |
return false; |
377 |
else |
378 |
{ |
379 |
return x.DocID == y.DocID; |
380 |
} |
381 |
} |
382 |
|
383 |
public int GetHashCode(Documents obj) |
384 |
{ |
385 |
return (obj.DocID != null ? obj.DocID.GetHashCode() : 0); |
386 |
} |
387 |
} |
388 |
|
389 |
public class DocumentsUniqueCompare : IEqualityComparer<Documents> |
390 |
{ |
391 |
public bool Equals(Documents x, Documents y) |
392 |
{ |
393 |
if (x == null && y == null) |
394 |
return true; |
395 |
else if (x == null || y == null) |
396 |
return false; |
397 |
else |
398 |
{ |
399 |
return x.RefProjectCode == y.RefProjectCode && x.DocumentNo == y.DocumentNo; |
400 |
} |
401 |
} |
402 |
|
403 |
public int GetHashCode(Documents obj) |
404 |
{ |
405 |
return (obj.RefProjectCode != null ? obj.RefProjectCode.GetHashCode() : 0) + (obj.DocumentNo != null ? obj.DocumentNo.GetHashCode() : 0); |
406 |
} |
407 |
} |
408 |
|
409 |
public void DataCopy(Documents docData) |
410 |
{ |
411 |
this.DocumentNo = docData.DocumentNo; |
412 |
this.RevisonNo = docData.RevisonNo; |
413 |
this.System = docData.System; |
414 |
this.SubSystemCode = docData.SubSystemCode; |
415 |
this.RefProjectCode = docData.RefProjectCode; |
416 |
this.JobLevel = docData.JobLevel; |
417 |
//this.Simularity = docData.Simularity; |
418 |
this.PersonInCharge = docData.PersonInCharge; |
419 |
this.Worker = docData.Worker; |
420 |
this.ToIsDiscussion = docData.ToIsDiscussion; |
421 |
this.ToRemarks = docData.ToRemarks; |
422 |
this.ToCreator = docData.ToCreator; |
423 |
this.ToCapture += docData.ToCapture; |
424 |
this.FrReviewStatus = docData.FrReviewStatus; |
425 |
this.FrRemarks = docData.FrRemarks; |
426 |
this.FrCapture += docData.FrCapture; |
427 |
this.FrCreator = docData.FrCreator; |
428 |
this.ID2StartDate = docData.ID2StartDate; |
429 |
this.ID2EndDate = docData.ID2EndDate; |
430 |
this.ID2Status = docData.ID2Status; |
431 |
this.ID2Issues = docData.ID2Issues; |
432 |
this.ID2Capture += docData.ID2Capture; |
433 |
this.ReplyModifications = docData.ReplyModifications; |
434 |
this.ReplyRequester = docData.ReplyRequester; |
435 |
this.IsConvert = docData.IsConvert; |
436 |
this.AVEVAPersonInCharge = docData.AVEVAPersonInCharge; |
437 |
this.AVEVAWorker = docData.AVEVAWorker; |
438 |
this.AVEVAConvertDate = docData.AVEVAConvertDate; |
439 |
this.AVEVAReviewDate = docData.AVEVAReviewDate; |
440 |
this.AVEVAWorkDate = docData.AVEVAWorkDate; |
441 |
this.AVEVAStatus = docData.AVEVAStatus; |
442 |
this.AVEVAIssues = docData.AVEVAIssues; |
443 |
this.ProdReviewer = docData.ProdReviewer; |
444 |
this.ProdIsResult = docData.ProdIsResult; |
445 |
this.ProdRemarks = docData.ProdRemarks; |
446 |
this.ClientReviewer = docData.ClientReviewer; |
447 |
this.ClientIsResult = docData.ClientIsResult; |
448 |
this.ClientRemarks = docData.ClientRemarks; |
449 |
this.DTIsGateWay = docData.DTIsGateWay; |
450 |
this.DTIsImport = docData.DTIsImport; |
451 |
this.DTIsRegSystem = docData.DTIsRegSystem; |
452 |
this.DTRemarks = docData.DTRemarks; |
453 |
if (this.AttFiles == null) |
454 |
this.AttFiles = docData.AttFiles; |
455 |
else |
456 |
this.AttFiles.AddRange(docData.AttFiles ?? new List<AttFileInfo>()); |
457 |
} |
458 |
} |
459 |
|
460 |
[DataContract] |
461 |
public class ID2Drawings |
462 |
{ |
463 |
//[DataMember] |
464 |
public string PROJECTNAME { get; set; } |
465 |
//[DataMember] |
466 |
public string UID { get; set; } |
467 |
//[DataMember] |
468 |
public string NAME { get; set; } |
469 |
//[DataMember] |
470 |
public string DOCNAME { get; set; } |
471 |
//[DataMember] |
472 |
public DateTime? DATETIME { get; set; } |
473 |
//[DataMember] |
474 |
public string OCCUPIED { get; set; } |
475 |
//[DataMember] |
476 |
public byte[] Image { get; set; } |
477 |
} |
478 |
|
479 |
public class DocumentsResult |
480 |
{ |
481 |
public List<Documents> Dwgs { get; set; } |
482 |
public int TotalCount { get; set; } |
483 |
} |
484 |
} |