Commit a9dfc942 authored by 黄奎's avatar 黄奎

页面修改

parent f7375fb9
......@@ -9,6 +9,11 @@ namespace Edu.Model.ViewModel.Course
/// </summary>
public class RB_Education_Contract_ViewModel : RB_Education_Contract
{
/// <summary>
/// 是否审核(1-是)
/// </summary>
public int IsAduit { get; set; }
/// <summary>
/// 创建人
/// </summary>
......
......@@ -235,7 +235,7 @@ namespace Edu.Module.Course
newContractNum = schoolModel?.ContractTitle ?? Common.Config.ContractDefaultTitle;
}
var totalCount = education_ContractRepository.GetContractCount(new RB_Education_Contract_ViewModel() { Group_Id = GroupId });
string num = (totalCount + 1).ToString("D4");
string num = (totalCount + 1 + 18).ToString("D4");
return newContractNum + num;
}
......
......@@ -43,10 +43,7 @@ namespace Edu.Repository.Course
{
where += $@" AND {nameof(RB_Education_Contract_ViewModel.CType)} ={(int)demodel.CType}";
}
if (demodel.Status >= 0)
{
where += $@" AND {nameof(RB_Education_Contract_ViewModel.Status)} ={demodel.Status}";
}
if (!string.IsNullOrEmpty(demodel.ContractNo))
{
where += $@" AND {nameof(RB_Education_Contract_ViewModel.ContractNo)} LIKE @ContractNo ";
......@@ -57,6 +54,28 @@ namespace Edu.Repository.Course
where += $@" AND {nameof(RB_Education_Contract_ViewModel.StudentName)} LIKE @StudentName ";
parameters.Add("StudentName", "%" + demodel.StudentName.Trim() + "%");
}
if (demodel.IsAduit == 1)
{
if (demodel.Status >= 0)
{
where += $@" AND {nameof(RB_Education_Contract_ViewModel.Status)} ={demodel.Status}";
}
else
{
where += $@" AND {nameof(RB_Education_Contract_ViewModel.Status)} NOT IN(0,4) ";
}
}
else
{
if (demodel.CreateBy > 0)
{
where += $@" AND {nameof(RB_Education_Contract_ViewModel.CreateBy)} ={demodel.CreateBy}";
}
if (demodel.Status >= 0)
{
where += $@" AND {nameof(RB_Education_Contract_ViewModel.Status)} ={demodel.Status}";
}
}
string sql = $@" SELECT * FROM RB_Education_Contract WHERE {where} ORDER BY Id DESC ";
return GetPage<RB_Education_Contract_ViewModel>(pageIndex, pageSize, out rowsCount, sql, parameters).ToList();
}
......
......@@ -55,8 +55,10 @@ namespace Edu.WebApi.Controllers.Course
CType = (ContractTypeEnum)base.ParmJObj.GetInt("CType"),
Status = base.ParmJObj.GetInt("Status"),
StudentName = base.ParmJObj.GetStringValue("StudentName"),
IsAduit=base.ParmJObj.GetInt("IsAduit")
};
dmodel.Group_Id = userInfo.Group_Id;
dmodel.CreateBy = userInfo.Id;
var list = educationContractModule.GetEducationContractPageListModule(pageModel.PageIndex, pageModel.PageSize, out long count, dmodel);
pageModel.Count = Convert.ToInt32(count);
pageModel.PageData = list.Select(x => new
......@@ -64,6 +66,7 @@ namespace Edu.WebApi.Controllers.Course
x.Id,
x.CType,
CTypeName = x.CType.ToName(),
IsStuSign=!string.IsNullOrEmpty(x.Sign)?1:0,
x.OrderId,
x.GuestId,
x.ContractNo,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment