|
|
@@ -309,5 +309,49 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration |
|
|
|
} |
|
|
|
#endregion |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 去重 |
|
|
|
/// </summary> |
|
|
|
/// <param name="keyValue"></param> |
|
|
|
/// <param name="TextBookNo"></param> |
|
|
|
/// <param name="TextBookName"></param> |
|
|
|
/// <param name="PublishNo"></param> |
|
|
|
/// <param name="Publisher"></param> |
|
|
|
/// <param name="Edition"></param> |
|
|
|
/// <param name="Impression"></param> |
|
|
|
/// <returns></returns> |
|
|
|
public int GetRepetitions(string keyValue, string LessonNo, string TextBookNo, string TextBookName, string PublishNo, string Publisher, string Edition, string Impression) |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
var HistoryList = new List<TextbookInOutEntity>(); |
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(keyValue)) |
|
|
|
{ |
|
|
|
HistoryList = BaseRepository("CollegeMIS").FindList<TextbookInOutEntity>( |
|
|
|
x => x.ID == keyValue && x.LessonNo == LessonNo && x.TextBookNo == TextBookNo && x.TextBookName == TextBookName && x.PublishNo == PublishNo && |
|
|
|
x.Publisher == Publisher && x.Edition == Edition && x.Impression == Impression && x.IsDel == 0).ToList(); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
HistoryList = BaseRepository("CollegeMIS").FindList<TextbookInOutEntity>( |
|
|
|
x => x.LessonNo == LessonNo && x.TextBookNo == TextBookNo && x.TextBookName == TextBookName && x.PublishNo == PublishNo && |
|
|
|
x.Publisher == Publisher && x.Edition == Edition && x.Impression == Impression && x.IsDel == 0).ToList(); |
|
|
|
} |
|
|
|
|
|
|
|
return HistoryList.Count; |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
if (ex is ExceptionEx) |
|
|
|
{ |
|
|
|
throw; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
throw ExceptionEx.ThrowServiceException(ex); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |