This commit is contained in:
parent
206cb99daa
commit
4be09d79a0
|
|
@ -560,7 +560,7 @@ namespace BLL
|
||||||
/// <param name="workPostIds">培训岗位ID</param>
|
/// <param name="workPostIds">培训岗位ID</param>
|
||||||
/// <param name="trainTypeId">培训类型ID</param>
|
/// <param name="trainTypeId">培训类型ID</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static List<Model.PersonItem> getTrainingPersonListByTrainTypeId(string projectId, string unitIds, string workPostIds, string trainTypeId, string name, string startDate, string endDate)
|
public static List<Model.PersonItem> getTrainingPersonListByTrainTypeId(string projectId, string unitIds, string workPostIds, string trainTypeId, string name, string startDate, string endDate, string isRepeat)
|
||||||
{
|
{
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
|
|
@ -620,7 +620,11 @@ namespace BLL
|
||||||
}
|
}
|
||||||
List<Model.PersonItem> getTrainPersonList = new List<Model.PersonItem>();
|
List<Model.PersonItem> getTrainPersonList = new List<Model.PersonItem>();
|
||||||
var getTrainType = TrainTypeService.GetTrainTypeById(trainTypeId);
|
var getTrainType = TrainTypeService.GetTrainTypeById(trainTypeId);
|
||||||
if (getTrainType != null && (!getTrainType.IsRepeat.HasValue || getTrainType.IsRepeat == false))
|
if ((getTrainType != null && (!getTrainType.IsRepeat.HasValue || getTrainType.IsRepeat == true)) || isRepeat == "1")
|
||||||
|
{
|
||||||
|
return getPersons.ToList();
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
foreach (var item in getPersons)
|
foreach (var item in getPersons)
|
||||||
{
|
{
|
||||||
|
|
@ -642,10 +646,6 @@ namespace BLL
|
||||||
}
|
}
|
||||||
return getTrainPersonList;
|
return getTrainPersonList;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
return getPersons.ToList();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1610,7 +1610,7 @@ namespace BLL
|
||||||
{
|
{
|
||||||
z.PlanName,
|
z.PlanName,
|
||||||
z.PlanDate,
|
z.PlanDate,
|
||||||
CheckResultName = x.TestScores >=60 ? "合格" : "不合格",
|
CheckResultName = x.TestScores >= 60 ? "合格" : "不合格",
|
||||||
z.TestPlanId,
|
z.TestPlanId,
|
||||||
};
|
};
|
||||||
if (getDataLists.Count() > 0)
|
if (getDataLists.Count() > 0)
|
||||||
|
|
|
||||||
|
|
@ -383,12 +383,12 @@ namespace WebAPI.Controllers
|
||||||
/// <param name="trainTypeId">培训类型ID(可为空)</param>
|
/// <param name="trainTypeId">培训类型ID(可为空)</param>
|
||||||
/// <param name="pageIndex">分页</param>
|
/// <param name="pageIndex">分页</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public Model.ResponeData getTrainingPersonListByTrainTypeId(string projectId, string unitIds, string workPostIds, string trainTypeId, int pageIndex, string startDate, string endDate)
|
public Model.ResponeData getTrainingPersonListByTrainTypeId(string projectId, string unitIds, string workPostIds, string trainTypeId, int pageIndex, string startDate, string endDate, string isRepeat)
|
||||||
{
|
{
|
||||||
var responeData = new Model.ResponeData();
|
var responeData = new Model.ResponeData();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var getDataList = APIPersonService.getTrainingPersonListByTrainTypeId(projectId, unitIds, workPostIds, trainTypeId, null, startDate, endDate).OrderBy(x => x.UnitName).ThenBy(x => x.ProjectName).ToList();
|
var getDataList = APIPersonService.getTrainingPersonListByTrainTypeId(projectId, unitIds, workPostIds, trainTypeId, null, startDate, endDate, isRepeat).OrderBy(x => x.UnitName).ThenBy(x => x.ProjectName).ToList();
|
||||||
int pageCount = getDataList.Count;
|
int pageCount = getDataList.Count;
|
||||||
if (pageCount > 0 && pageIndex > 0)
|
if (pageCount > 0 && pageIndex > 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue