瀏覽代碼

自诊打卡 统计 修改

中职版本
zhichao lei 4 年之前
父節點
當前提交
26f4b91cf7
共有 6 個文件被更改,包括 77 次插入36 次删除
  1. +0
    -22
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/Index.cshtml
  2. +3
    -7
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexReport.cshtml
  3. +4
    -6
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexReport.js
  4. +25
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EpidemicSituation/EpidemicSituationService.cs
  5. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Db/Learun.DataBase.Repository/IRepository.cs
  6. +44
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Db/Learun.DataBase.Repository/Repository.cs

+ 0
- 22
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/Index.cshtml 查看文件

@@ -7,28 +7,6 @@
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">填表人员</div>
<input id="Creater" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">类别</div>
<div id="Type"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">身份证号</div>
<input id="IDCard" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">单位名称</div>
<input id="UnitName" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">


+ 3
- 7
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexReport.cshtml 查看文件

@@ -12,19 +12,15 @@
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">填表人员</div>
<input id="Creater" type="text" class="form-control" />
<div id="Creater"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">类别</div>
<div id="Type"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">身份证号</div>
<input id="IDCard" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">单位名称</div>
<input id="UnitName" type="text" class="form-control" />
<div class="lr-form-item-title">系|专业|班级</div>
<input id="StudentSource" type="text" class="form-control" />
</div>
</div>
</div>


+ 4
- 6
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexReport.js 查看文件

@@ -5,6 +5,7 @@
* 描 述:疫情记录
*/
var refreshGirdData;
var startTime, endTime;
var bootstrap = function ($, learun) {
"use strict";
var page = {
@@ -13,10 +14,13 @@ var bootstrap = function ($, learun) {
page.bind();
},
bind: function () {


$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#Type').lrDataItemSelect({ code: 'EUserType' });
$('#Creater').lrDataSourceSelect({ code: 'BaseUser', value: 'f_userid', text: 'f_realname' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
@@ -55,12 +59,6 @@ var bootstrap = function ($, learun) {

}
},
{
label: "填报日期", name: "CreateTime", width: 100, align: "left",
formatter: function (value, row) {
return dateFormat("YYYY-mm-dd", new Date(value));
}
},
{
label: "类别", name: "Type", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {


+ 25
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EpidemicSituation/EpidemicSituationService.cs 查看文件

@@ -144,7 +144,31 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
list.Add(entity);
}

list = this.BaseRepository("CollegeMIS").FindList<EpidemicSituationEntity>(list, pagination).ToList();


var expression = LinqExtensions.True<EpidemicSituationEntity>();
var queryParam = queryJson.ToJObject();
// 填表人员
if (!queryParam["Creater"].IsEmpty())
{
string Creater = queryParam["Creater"].ToString();
expression = expression.And(t => t.Creater.Equals(Creater));
}
// 类别
if (!queryParam["Type"].IsEmpty())
{
int Type = 0;
int.TryParse(queryParam["Type"].ToString(), out Type);
expression = expression.And(t => t.Type.Equals(Type));
}
// 学生来源
if (!queryParam["StudentSource"].IsEmpty())
{
string StudentSource = queryParam["StudentSource"].ToString();
expression = expression.And(t => t.StudentSource.Contains(StudentSource));
}

list = this.BaseRepository("CollegeMIS").FindList<EpidemicSituationEntity>(list, expression, pagination).ToList();

return list;



+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Db/Learun.DataBase.Repository/IRepository.cs 查看文件

@@ -233,6 +233,7 @@ namespace Learun.DataBase.Repository
IEnumerable<T> FindList<T>(Pagination pagination) where T : class, new();

IEnumerable<T> FindList<T>(List<T> data, Pagination pagination) where T : class, new();
IEnumerable<T> FindList<T>(List<T> data, Expression<Func<T, bool>> condition, Pagination pagination) where T : class, new();
/// <summary>
/// 查询列表(分页)
/// </summary>


+ 44
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Db/Learun.DataBase.Repository/Repository.cs 查看文件

@@ -447,11 +447,55 @@ namespace Learun.DataBase.Repository
var property = typeof(T).GetProperty(_orderField);
var propertyAccess = Expression.MakeMemberAccess(parameter, property);
var orderByExp = Expression.Lambda(propertyAccess, parameter);
resultExp = Expression.Call(typeof(Queryable), isAsc ? "OrderBy" : "OrderByDescending", new Type[] { typeof(T), property.PropertyType }, tempData.Expression, Expression.Quote(orderByExp));

}
}
if (resultExp != null)
{
tempData = tempData.Provider.CreateQuery<T>(resultExp);
}
pagination.records = tempData.Count();
tempData = tempData.Skip<T>(pageSize * (pageIndex - 1)).Take<T>(pageSize).AsQueryable();
return tempData.ToList();
}

public IEnumerable<T> FindList<T>(List<T> data, Expression<Func<T, bool>> condition, Pagination pagination) where T : class, new()
{
var isAsc = pagination.sord.ToLower() == "asc" ? true : false;
var pageSize = pagination.rows;
var pageIndex = pagination.page;
string[] _order = pagination.sidx.Split(',');
MethodCallExpression resultExp = null;
var tempData = data.AsQueryable().Where(condition);
foreach (string item in _order)
{
if (!string.IsNullOrEmpty(item))
{
string _orderPart = item;
_orderPart = Regex.Replace(_orderPart, @"\s+", " ");
string[] _orderArry = _orderPart.Split(' ');
string _orderField = _orderArry[0];
bool sort = isAsc;
if (_orderArry.Length == 2)
{
isAsc = _orderArry[1].ToUpper() == "ASC" ? true : false;
}
var parameter = Expression.Parameter(typeof(T), "t");
var property = typeof(T).GetProperty(_orderField);
var propertyAccess = Expression.MakeMemberAccess(parameter, property);
var orderByExp = Expression.Lambda(propertyAccess, parameter);
resultExp = Expression.Call(typeof(Queryable), isAsc ? "OrderBy" : "OrderByDescending", new Type[] { typeof(T), property.PropertyType }, tempData.Expression, Expression.Quote(orderByExp));

}
}
if (resultExp != null)
{
tempData = tempData.Provider.CreateQuery<T>(resultExp);
}
pagination.records = tempData.Count();
tempData = tempData.Skip<T>(pageSize * (pageIndex - 1)).Take<T>(pageSize).AsQueryable();

return tempData.ToList();
}



Loading…
取消
儲存