@@ -67,7 +67,7 @@ namespace Learun.Application.Organization | |||||
List<DepartmentEntity> list = GetList(companyId); | List<DepartmentEntity> list = GetList(companyId); | ||||
if (!string.IsNullOrEmpty(keyWord)) | if (!string.IsNullOrEmpty(keyWord)) | ||||
{ | { | ||||
list = list.FindAll(t => t.F_FullName.Contains(keyWord) || t.F_EnCode.Contains(keyWord) || t.F_ShortName.Contains(keyWord)); | |||||
list = list.FindAll(t => (!string.IsNullOrEmpty(t.F_FullName) && t.F_FullName.Contains(keyWord)) || (!string.IsNullOrEmpty(t.F_EnCode) && t.F_EnCode.Contains(keyWord)) || (!string.IsNullOrEmpty(t.F_ShortName) && t.F_ShortName.Contains(keyWord))); | |||||
} | } | ||||
return list; | return list; | ||||
} | } | ||||
@@ -121,14 +121,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
public ActionResult Lock(string keyValue) | public ActionResult Lock(string keyValue) | ||||
{ | { | ||||
cdMajorIBLL.Lock(keyValue); | cdMajorIBLL.Lock(keyValue); | ||||
return Success("审核成功!"); | |||||
return Success("启用成功!"); | |||||
} | } | ||||
[HttpPost] | [HttpPost] | ||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult UnLock(string keyValue) | public ActionResult UnLock(string keyValue) | ||||
{ | { | ||||
cdMajorIBLL.UnLock(keyValue); | cdMajorIBLL.UnLock(keyValue); | ||||
return Success("去审成功!"); | |||||
return Success("停用成功!"); | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 删除实体数据 | /// 删除实体数据 | ||||
@@ -100,14 +100,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
public ActionResult Lock(string keyValue) | public ActionResult Lock(string keyValue) | ||||
{ | { | ||||
classInfoIBLL.Lock(keyValue); | classInfoIBLL.Lock(keyValue); | ||||
return Success("审核成功!"); | |||||
return Success("启用成功!"); | |||||
} | } | ||||
[HttpPost] | [HttpPost] | ||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult UnLock(string keyValue) | public ActionResult UnLock(string keyValue) | ||||
{ | { | ||||
classInfoIBLL.UnLock(keyValue); | classInfoIBLL.UnLock(keyValue); | ||||
return Success("去审成功!"); | |||||
return Success("停用成功!"); | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 删除实体数据 | /// 删除实体数据 | ||||
@@ -86,14 +86,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
public ActionResult Lock(string keyValue) | public ActionResult Lock(string keyValue) | ||||
{ | { | ||||
classroomInfoIBLL.Lock(keyValue); | classroomInfoIBLL.Lock(keyValue); | ||||
return Success("审核成功!"); | |||||
return Success("启用成功!"); | |||||
} | } | ||||
[HttpPost] | [HttpPost] | ||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult UnLock(string keyValue) | public ActionResult UnLock(string keyValue) | ||||
{ | { | ||||
classroomInfoIBLL.UnLock(keyValue); | classroomInfoIBLL.UnLock(keyValue); | ||||
return Success("去审成功!"); | |||||
return Success("停用成功!"); | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 删除实体数据 | /// 删除实体数据 | ||||
@@ -275,10 +275,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
} | } | ||||
exam_ExamPlanLessonIBLL.Check(keyValue, ELCheckMark); | exam_ExamPlanLessonIBLL.Check(keyValue, ELCheckMark); | ||||
return Success("审核成功!"); | |||||
return Success("操作成功!"); | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 保存实体数据(新增、修改) | /// 保存实体数据(新增、修改) | ||||
/// 设置考试时间 | |||||
/// </summary> | /// </summary> | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
/// <param name="strEntity">实体</param> | /// <param name="strEntity">实体</param> | ||||
@@ -305,6 +306,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
entity.ExamTime = entity.ExamTimeStart.Trim() + "-" + entity.ExamTimeEnd; | entity.ExamTime = entity.ExamTimeStart.Trim() + "-" + entity.ExamTimeEnd; | ||||
} | } | ||||
entity.EPLId = keyValue; | |||||
//判断考试时间是否冲突 | |||||
var res = exam_ExamPlanLessonIBLL.IsExamTimeClash(entity); | |||||
if (res.flag && !string.IsNullOrEmpty(res.lessonname)) | |||||
{ | |||||
return Fail("考试时间与课程(" + res.lessonname + ")冲突!"); | |||||
} | |||||
//保存 | |||||
exam_ExamPlanLessonIBLL.SaveEntity(keyValue, entity); | exam_ExamPlanLessonIBLL.SaveEntity(keyValue, entity); | ||||
return Success("保存成功!"); | return Success("保存成功!"); | ||||
} | } | ||||
@@ -86,7 +86,14 @@ var bootstrap = function ($, learun) { | |||||
{ | { | ||||
label: "性别", name: "AGender", width: 200, align: "left", | label: "性别", name: "AGender", width: 200, align: "left", | ||||
formatter: function (cellvalue) { | formatter: function (cellvalue) { | ||||
return cellvalue == true ? "男" : "女"; | |||||
if (cellvalue == true) { | |||||
return '男'; | |||||
} else if (cellvalue == false) { | |||||
return '女'; | |||||
} else { | |||||
return ''; | |||||
} | |||||
//return cellvalue == true ? "男" : "女"; | |||||
} | } | ||||
}, | }, | ||||
{ label: '单位名称', name: 'ACompany', width: 200, align: "left" }, | { label: '单位名称', name: 'ACompany', width: 200, align: "left" }, | ||||
@@ -47,7 +47,7 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | ||||
if (CheckMark === "true") { | if (CheckMark === "true") { | ||||
learun.alert.warning("当前项目已审核不能编辑!"); | |||||
learun.alert.warning("当前项目已启用不能编辑!"); | |||||
return; | return; | ||||
} | } | ||||
learun.layerForm({ | learun.layerForm({ | ||||
@@ -84,7 +84,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
//审核 | |||||
//启用 | |||||
$('#lr_lock').on('click', function () { | $('#lr_lock').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('ID'); | var keyValue = $('#gridtable').jfGridValue('ID'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
@@ -97,7 +97,7 @@ var bootstrap = function ($, learun) { | |||||
// learun.alert.warning("当前项目已审核无需再审!"); | // learun.alert.warning("当前项目已审核无需再审!"); | ||||
// return; | // return; | ||||
//} | //} | ||||
learun.layerConfirm('是否确认审核该项!', function (res) { | |||||
learun.layerConfirm('是否确认启用该项!', function (res) { | |||||
if (res) { | if (res) { | ||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/CdMajor/Lock', { keyValue: keyValue }, function () { | learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/CdMajor/Lock', { keyValue: keyValue }, function () { | ||||
refreshGirdData(); | refreshGirdData(); | ||||
@@ -106,7 +106,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
//去审核 | |||||
//停用 | |||||
$('#lr_unlock').on('click', function () { | $('#lr_unlock').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('ID'); | var keyValue = $('#gridtable').jfGridValue('ID'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
@@ -119,7 +119,7 @@ var bootstrap = function ($, learun) { | |||||
// learun.alert.warning("当前项目还未审核不需要去审核!"); | // learun.alert.warning("当前项目还未审核不需要去审核!"); | ||||
// return; | // return; | ||||
//} | //} | ||||
learun.layerConfirm('是否确认去审核该项!', function (res) { | |||||
learun.layerConfirm('是否确认停用该项!', function (res) { | |||||
if (res) { | if (res) { | ||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/CdMajor/UnLock', { keyValue: keyValue }, function () { | learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/CdMajor/UnLock', { keyValue: keyValue }, function () { | ||||
refreshGirdData(); | refreshGirdData(); | ||||
@@ -110,7 +110,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
//审核 | |||||
//启用 | |||||
$('#lr_lock').on('click', function () { | $('#lr_lock').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('ClassId'); | var keyValue = $('#gridtable').jfGridValue('ClassId'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
@@ -132,7 +132,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
//去审核 | |||||
//停用 | |||||
$('#lr_unlock').on('click', function () { | $('#lr_unlock').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('ClassId'); | var keyValue = $('#gridtable').jfGridValue('ClassId'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
@@ -40,7 +40,7 @@ var bootstrap = function ($, learun) { | |||||
maxHeight: 200, | maxHeight: 200, | ||||
select: function (item) { | select: function (item) { | ||||
var NDeptNo = $("#DeptNo").lrselectGet(); | var NDeptNo = $("#DeptNo").lrselectGet(); | ||||
if (NDeptNo != null && NDeptNo != "" && NDeptNo != undefined) { | |||||
if (NDeptNo != null && NDeptNo != "" && NDeptNo != 'undefined') { | |||||
$('#MajorNo').lrselectRefresh({ | $('#MajorNo').lrselectRefresh({ | ||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | ||||
param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" }, | param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" }, | ||||
@@ -51,7 +51,7 @@ var bootstrap = function ($, learun) { | |||||
} else { | } else { | ||||
$('#MajorNo').lrselectRefresh({ | $('#MajorNo').lrselectRefresh({ | ||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | ||||
param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " }, | |||||
param: { strWhere: " 1=1 and CheckMark=1 " }, | |||||
value: "majorno", | value: "majorno", | ||||
text: "majorname", | text: "majorname", | ||||
maxHeight: 200 | maxHeight: 200 | ||||
@@ -59,14 +59,20 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
} | } | ||||
}) | }) | ||||
$("#MajorNo").lrselect(); | |||||
$('#LessonNo').lrselect({ | |||||
placeholder: "请选择课程", | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', | |||||
value: 'value', | |||||
text: 'text' | |||||
$("#MajorNo").lrselect({ | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#LessonNo').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=LessonInfo', | |||||
param: { strWhere: " 1=1 and CheckMark=1 and teachmajorno='" + item.majorno + "'" }, | |||||
value: "lessonno", | |||||
text: "lessonname", | |||||
maxHeight: 200 | |||||
}); | |||||
} | |||||
} | |||||
}); | }); | ||||
$('#LessonNo').lrselect(); | |||||
$('#TeachDeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | $('#TeachDeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | ||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
@@ -83,7 +89,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
$('#StuSortNo').val('02'); | $('#StuSortNo').val('02'); | ||||
$('#LessonSortNo').val('2'); | |||||
$('#LessonSortNo').val('2'); | |||||
$('#CheckStyleNo').val('1'); | $('#CheckStyleNo').val('1'); | ||||
$('#ScoreRecordStyleNo').val('1'); | $('#ScoreRecordStyleNo').val('1'); | ||||
$('#CheckMark').val('1'); | $('#CheckMark').val('1'); | ||||
@@ -97,7 +103,7 @@ var bootstrap = function ($, learun) { | |||||
return false; | return false; | ||||
} | } | ||||
var nName = $("#LessonNo").find(".lr-select-placeholder").text(); | var nName = $("#LessonNo").find(".lr-select-placeholder").text(); | ||||
var Narray= nName.split("("); | |||||
var Narray = nName.split("("); | |||||
$("#LessonName").val(Narray[0]); | $("#LessonName").val(Narray[0]); | ||||
var postData = { | var postData = { | ||||
strEntity: JSON.stringify($('body').lrGetFormData()) | strEntity: JSON.stringify($('body').lrGetFormData()) | ||||
@@ -35,15 +35,25 @@ var bootstrap = function ($, learun) { | |||||
text: 'text' | text: 'text' | ||||
}); | }); | ||||
$('#Semester').lrDataItemSelect({ code: 'Semester' }); | $('#Semester').lrDataItemSelect({ code: 'Semester' }); | ||||
$("#MajorNo").lrselect(); | |||||
$('#LessonNo').lrselect({ | |||||
placeholder: "请选择课程", | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', | |||||
value: 'value', | |||||
text: 'text', | |||||
maxHeight: 200 | |||||
$('#MajorNo').lrselect({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
param: { strWhere: " 1=1 and CheckMark=1 " }, | |||||
value: "majorno", | |||||
text: "majorname", | |||||
maxHeight: 200, | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#LessonNo').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=LessonInfo', | |||||
param: { strWhere: " 1=1 and CheckMark=1 and teachmajorno='" + item.majorno + "'" }, | |||||
value: "lessonno", | |||||
text: "lessonname", | |||||
maxHeight: 200 | |||||
}); | |||||
} | |||||
} | |||||
}); | }); | ||||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); | |||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
@@ -175,7 +185,7 @@ var bootstrap = function ($, learun) { | |||||
$('#titleinfo').text(item.text); | $('#titleinfo').text(item.text); | ||||
page.search(); | page.search(); | ||||
var NDeptNo = item.id; | var NDeptNo = item.id; | ||||
if (NDeptNo != null && NDeptNo != "" && NDeptNo != undefined) { | |||||
if (NDeptNo != null && NDeptNo != "" && NDeptNo != 'undefined') { | |||||
$('#MajorNo').lrselectRefresh({ | $('#MajorNo').lrselectRefresh({ | ||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | ||||
param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" }, | param: { strWhere: " 1=1 and CheckMark=1 and deptno in (" + NDeptNo + ")" }, | ||||
@@ -186,7 +196,7 @@ var bootstrap = function ($, learun) { | |||||
} else { | } else { | ||||
$('#MajorNo').lrselectRefresh({ | $('#MajorNo').lrselectRefresh({ | ||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | ||||
param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " }, | |||||
param: { strWhere: " 1=1 and CheckMark=1 " }, | |||||
value: "majorno", | value: "majorno", | ||||
text: "majorname", | text: "majorname", | ||||
maxHeight: 200 | maxHeight: 200 | ||||
@@ -35,15 +35,25 @@ var bootstrap = function ($, learun) { | |||||
text: 'text' | text: 'text' | ||||
}); | }); | ||||
$('#Semester').lrDataItemSelect({ code: 'Semester' }); | $('#Semester').lrDataItemSelect({ code: 'Semester' }); | ||||
$("#MajorNo").lrselect(); | |||||
$('#LessonNo').lrselect({ | |||||
placeholder: "请选择课程", | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', | |||||
value: 'value', | |||||
text: 'text', | |||||
maxHeight: 200 | |||||
$('#MajorNo').lrselect({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||||
param: { strWhere: " 1=1 and CheckMark=1 " }, | |||||
value: "majorno", | |||||
text: "majorname", | |||||
maxHeight: 200, | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#LessonNo').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=LessonInfo', | |||||
param: { strWhere: " 1=1 and CheckMark=1 and teachmajorno='" + item.majorno + "'" }, | |||||
value: "lessonno", | |||||
text: "lessonname", | |||||
maxHeight: 200 | |||||
}); | |||||
} | |||||
} | |||||
}); | }); | ||||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); | |||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
@@ -131,7 +141,7 @@ var bootstrap = function ($, learun) { | |||||
} else { | } else { | ||||
$('#MajorNo').lrselectRefresh({ | $('#MajorNo').lrselectRefresh({ | ||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | ||||
param: { strWhere: " 1=1 and CheckMark=1 and deptno ='' " }, | |||||
param: { strWhere: " 1=1 and CheckMark=1 " }, | |||||
value: "majorno", | value: "majorno", | ||||
text: "majorname", | text: "majorname", | ||||
maxHeight: 200 | maxHeight: 200 | ||||
@@ -82,7 +82,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
//审核 | |||||
//启用 | |||||
$('#lr_lock').on('click', function () { | $('#lr_lock').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('ClassroomId'); | var keyValue = $('#gridtable').jfGridValue('ClassroomId'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
@@ -104,7 +104,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
//去审核 | |||||
//停用 | |||||
$('#lr_unlock').on('click', function () { | $('#lr_unlock').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('ClassroomId'); | var keyValue = $('#gridtable').jfGridValue('ClassroomId'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
@@ -147,11 +147,11 @@ | |||||
</div> | </div> | ||||
<div class="col-xs-4 lr-form-item" data-table="EmpInfo"> | <div class="col-xs-4 lr-form-item" data-table="EmpInfo"> | ||||
<div class="lr-form-item-title">校区<font face="宋体">*</font></div> | <div class="lr-form-item-title">校区<font face="宋体">*</font></div> | ||||
<div id="F_CompanyId" checkexpession="NotNull"></div> | |||||
<div id="F_CompanyId" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-4 lr-form-item" data-table="EmpInfo"> | <div class="col-xs-4 lr-form-item" data-table="EmpInfo"> | ||||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | <div class="lr-form-item-title">部门<font face="宋体">*</font></div> | ||||
<div id="F_DepartmentId" checkexpession="NotNull"></div> | |||||
<div id="F_DepartmentId" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | </div> | ||||
@*<div class="col-xs-4 lr-form-item" data-table="EmpInfo"> | @*<div class="col-xs-4 lr-form-item" data-table="EmpInfo"> | ||||
<div class="lr-form-item-title">系部</div> | <div class="lr-form-item-title">系部</div> | ||||
@@ -199,7 +199,7 @@ var bootstrap = function ($, learun) { | |||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | ||||
if (CheckMark.indexOf('true') != -1) { | if (CheckMark.indexOf('true') != -1) { | ||||
learun.alert.warning("选中记录中包含已启用项目!"); | |||||
learun.alert.warning("选中记录中包含已审核项目!"); | |||||
return; | return; | ||||
} | } | ||||
learun.layerForm({ | learun.layerForm({ | ||||
@@ -220,7 +220,7 @@ var bootstrap = function ($, learun) { | |||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | ||||
if (CheckMark.indexOf('true') != -1) { | if (CheckMark.indexOf('true') != -1) { | ||||
learun.alert.warning("选中记录中包含已启用项目,已启用不能删除!"); | |||||
learun.alert.warning("选中记录中包含已审核项目,已审核不能删除!"); | |||||
return; | return; | ||||
} | } | ||||
//if (CheckMark === true) { | //if (CheckMark === true) { | ||||
@@ -242,7 +242,7 @@ var bootstrap = function ($, learun) { | |||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | ||||
if (CheckMark.indexOf('true') != -1) { | if (CheckMark.indexOf('true') != -1) { | ||||
learun.alert.warning("选中记录中包含已启用项目!"); | |||||
learun.alert.warning("选中记录中包含已审核项目!"); | |||||
return; | return; | ||||
} | } | ||||
//if (CheckMark === true) { | //if (CheckMark === true) { | ||||
@@ -264,7 +264,7 @@ var bootstrap = function ($, learun) { | |||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | ||||
if (CheckMark.indexOf('false') != -1) { | if (CheckMark.indexOf('false') != -1) { | ||||
learun.alert.warning("选中记录中包含已停用项目!"); | |||||
learun.alert.warning("选中记录中包含未审核项目!"); | |||||
return; | return; | ||||
} | } | ||||
//if (CheckMark === false) { | //if (CheckMark === false) { | ||||
@@ -433,9 +433,9 @@ var bootstrap = function ($, learun) { | |||||
learun.clientdata.getAsync('custmerData', { | learun.clientdata.getAsync('custmerData', { | ||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | ||||
key: value, | key: value, | ||||
keyId: 'f_departmentid', | |||||
keyId: 'id', | |||||
callback: function (_data) { | callback: function (_data) { | ||||
callback(_data['f_fullname']); | |||||
callback(_data['name']); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
@@ -11,14 +11,14 @@ | |||||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | <div class="lr-form-item-title">学期<font face="宋体">*</font></div> | ||||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | <div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||||
@*<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||||
<div class="lr-form-item-title">系<font face="宋体">*</font></div> | <div class="lr-form-item-title">系<font face="宋体">*</font></div> | ||||
<div id="DeptNo" isvalid="yes" checkexpession="NotNull"></div> | <div id="DeptNo" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | <div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | ||||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | <div class="lr-form-item-title">专业<font face="宋体">*</font></div> | ||||
<div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div> | <div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div> | ||||
</div> | |||||
</div>*@ | |||||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | <div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | ||||
<div class="lr-form-item-title">年级<font face="宋体">*</font></div> | <div class="lr-form-item-title">年级<font face="宋体">*</font></div> | ||||
<div id="Grade" isvalid="yes" checkexpession="NotNull"></div> | <div id="Grade" isvalid="yes" checkexpession="NotNull"></div> | ||||
@@ -167,32 +167,33 @@ var bootstrap = function ($, learun) { | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/GetPageList', | url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/GetPageList', | ||||
headData: [ | headData: [ | ||||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | { label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | ||||
{ label: "学期", name: "Semester", width: 100, align: "left" }, { | |||||
label: "系部", name: "DeptNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||||
key: value, | |||||
keyId: 'deptno', | |||||
callback: function (_data) { | |||||
callback(_data['deptname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "专业", name: "MajorNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||||
key: value, | |||||
keyId: 'majorno', | |||||
callback: function (_data) { | |||||
callback(_data['majorname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||||
//{ | |||||
// label: "系部", name: "DeptNo", width: 100, align: "left", | |||||
// formatterAsync: function (callback, value, row, op, $cell) { | |||||
// learun.clientdata.getAsync('custmerData', { | |||||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||||
// key: value, | |||||
// keyId: 'deptno', | |||||
// callback: function (_data) { | |||||
// callback(_data['deptname']); | |||||
// } | |||||
// }); | |||||
// } | |||||
//}, | |||||
//{ | |||||
// label: "专业", name: "MajorNo", width: 100, align: "left", | |||||
// formatterAsync: function (callback, value, row, op, $cell) { | |||||
// learun.clientdata.getAsync('custmerData', { | |||||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||||
// key: value, | |||||
// keyId: 'majorno', | |||||
// callback: function (_data) { | |||||
// callback(_data['majorname']); | |||||
// } | |||||
// }); | |||||
// } | |||||
//}, | |||||
{ label: "年级", name: "Grade", width: 50, align: "left" }, | { label: "年级", name: "Grade", width: 50, align: "left" }, | ||||
{ label: "课程编号", name: "LessonNo", width: 100, align: "left" }, | { label: "课程编号", name: "LessonNo", width: 100, align: "left" }, | ||||
{ label: "课程名称", name: "LessonName", width: 200, align: "left" }, | { label: "课程名称", name: "LessonName", width: 200, align: "left" }, | ||||
@@ -207,7 +208,7 @@ var bootstrap = function ($, learun) { | |||||
mainId: 'ELId', | mainId: 'ELId', | ||||
isMultiselect: true, | isMultiselect: true, | ||||
isPage: true, | isPage: true, | ||||
sidx: 'AcademicYearNo desc,Semester desc,ELOrder asc' | |||||
sidx: 'AcademicYearNo desc,Semester desc,ELOrder asc,LessonNo asc' | |||||
}); | }); | ||||
page.search(); | page.search(); | ||||
}, | }, | ||||
@@ -8,12 +8,12 @@ | |||||
<input id="ExamDate" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" data-dateFmt="yyyy-MM-dd" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#ExamDate').trigger('change'); } })" /> | <input id="ExamDate" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" data-dateFmt="yyyy-MM-dd" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#ExamDate').trigger('change'); } })" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanLesson"> | <div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanLesson"> | ||||
<div class="lr-form-item-title">考试开始时间<font face="宋体">*</font></div> | |||||
<input id="ExamTimeStart" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请填写时分,例如:09:00"/> | |||||
<div class="lr-form-item-title">开始时间<font face="宋体">*</font></div> | |||||
<input id="ExamTimeStart" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请填写时分,例如:09:00"/> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanLesson"> | <div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanLesson"> | ||||
<div class="lr-form-item-title">结束时间<font face="宋体">*</font></div> | <div class="lr-form-item-title">结束时间<font face="宋体">*</font></div> | ||||
<input id="ExamTimeEnd" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请填写时分,例如:12:00"/> | |||||
<input id="ExamTimeEnd" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请填写时分,例如:12:00"/> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.js") | @Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.js") |
@@ -30,18 +30,19 @@ var bootstrap = function ($, learun) { | |||||
headData: [ | headData: [ | ||||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | { label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | ||||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | { label: "学期", name: "Semester", width: 100, align: "left" }, | ||||
{ | |||||
label: "班级名称", name: "ClassName", width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||||
key: row.ClassNo, | |||||
keyId: 'classno', | |||||
callback: function (_data) { | |||||
callback(_data['classname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
//{ | |||||
// label: "班级名称", name: "ClassName", width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||||
// learun.clientdata.getAsync('custmerData', { | |||||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||||
// key: row.ClassNo, | |||||
// keyId: 'classno', | |||||
// callback: function (_data) { | |||||
// callback(_data['classname']); | |||||
// } | |||||
// }); | |||||
// } | |||||
//}, | |||||
{ label: "班级名称", name: "ClassName", width: 100, align: "left" }, | |||||
{ label: "班级编号", name: "ClassNo", width: 100, align: "left" }, | { label: "班级编号", name: "ClassNo", width: 100, align: "left" }, | ||||
{ label: "学生人数", name: "StuNum", width: 80, align: "left" }, | { label: "学生人数", name: "StuNum", width: 80, align: "left" }, | ||||
//{ | //{ | ||||
@@ -51,7 +51,7 @@ | |||||
@*<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a>*@ | @*<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a>*@ | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm"> | <div class=" btn-group btn-group-sm"> | ||||
<a id="lr_importBy" class="btn btn-default"><i class="fa fa-plus"></i> 一键生成考试信息</a> | |||||
<a id="lr_importBy" class="btn btn-default"><i class="fa fa-plus"></i> 一键生成考生信息</a> | |||||
<a id="lr_clearBy" class="btn btn-default"><i class="fa fa-plus"></i> 按条件清空学生考试信息</a> | <a id="lr_clearBy" class="btn btn-default"><i class="fa fa-plus"></i> 按条件清空学生考试信息</a> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -131,7 +131,7 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_importBy').on('click', function () { | $('#lr_importBy').on('click', function () { | ||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'form_import', | id: 'form_import', | ||||
title: '生成考试信息', | |||||
title: '生成考生信息', | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/FormImport', | url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/FormImport', | ||||
width: 500, | width: 500, | ||||
height: 300, | height: 300, | ||||
@@ -40,7 +40,7 @@ var bootstrap = function ($, learun) { | |||||
$('#LessonTypeId').lrDataSourceSelect({ | $('#LessonTypeId').lrDataSourceSelect({ | ||||
code: 'CdLessonType', value: 'ltid', text: 'lessontypename', select: function (item) { | code: 'CdLessonType', value: 'ltid', text: 'lessontypename', select: function (item) { | ||||
if (item != null && item != undefined) { | if (item != null && item != undefined) { | ||||
if (item.lessontypename === "公开课") { | |||||
if (item.lessontypename.indexOf('公开') || item.lessontypename.indexOf('公共')) { | |||||
$("#TeachMajorNo").removeAttr("isvalid"); | $("#TeachMajorNo").removeAttr("isvalid"); | ||||
$("#TeachMajorNo").removeAttr("NotNull"); | $("#TeachMajorNo").removeAttr("NotNull"); | ||||
} else { | } else { | ||||
@@ -13,7 +13,7 @@ | |||||
<div id="multiple_condition_query"> | <div id="multiple_condition_query"> | ||||
<div class="lr-query-formcontent"> | <div class="lr-query-formcontent"> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">学生姓名</div> | |||||
<div class="lr-form-item-title">申请人</div> | |||||
<input id="StuName" type="text" class="form-control"/> | <input id="StuName" type="text" class="form-control"/> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -19,6 +19,7 @@ var bootstrap = function ($, learun) { | |||||
var keyword = $('#txt_Keyword').val(); | var keyword = $('#txt_Keyword').val(); | ||||
page.search({ keyword: keyword }); | page.search({ keyword: keyword }); | ||||
}); | }); | ||||
$('#PerfectStatus').lrDataItemSelect({ | $('#PerfectStatus').lrDataItemSelect({ | ||||
code: "PerfectStatus", placeholder: "请选完善状态" | code: "PerfectStatus", placeholder: "请选完善状态" | ||||
}); | }); | ||||
@@ -177,10 +177,9 @@ var bootstrap = function ($, learun) { | |||||
{ label: '姓名', name: 'StuName', width: 100, align: "left" }, | { label: '姓名', name: 'StuName', width: 100, align: "left" }, | ||||
{ | { | ||||
label: '是否完善信息', name: 'ID', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | label: '是否完善信息', name: 'ID', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('custmerData', { | learun.clientdata.getAsync('custmerData', { | ||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DirectRelatives', | url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DirectRelatives', | ||||
key: row.ID, | |||||
key: value, | |||||
keyId: 'stuinfofreshid', | keyId: 'stuinfofreshid', | ||||
callback: function (_data) { | callback: function (_data) { | ||||
var a = _data['id']; | var a = _data['id']; | ||||
@@ -117,13 +117,11 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers | |||||
/// <summary> | /// <summary> | ||||
/// 所有文件(夹)列表 | /// 所有文件(夹)列表 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="folderId">文件夹Id</param> | |||||
/// <returns>返回列表Json</returns> | /// <returns>返回列表Json</returns> | ||||
[HttpGet] | [HttpGet] | ||||
public ActionResult GetListJson(string folderId) | |||||
public ActionResult GetListJson(string folderId, string keyword) | |||||
{ | { | ||||
string userId = LoginUserInfo.Get().userId; | |||||
var data = fileInfoBLL.GetList(folderId, userId); | |||||
var data = fileInfoBLL.GetAllList(folderId, keyword); | |||||
return JsonResult(data); | return JsonResult(data); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
@@ -131,10 +129,9 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers | |||||
/// </summary> | /// </summary> | ||||
/// <returns>返回列表Json</returns> | /// <returns>返回列表Json</returns> | ||||
[HttpGet] | [HttpGet] | ||||
public ActionResult GetDocumentListJson() | |||||
public ActionResult GetDocumentListJson(string keyword) | |||||
{ | { | ||||
string userId = LoginUserInfo.Get().userId; | |||||
var data = fileInfoBLL.GetDocumentList(userId); | |||||
var data = fileInfoBLL.GetDocumentList(keyword); | |||||
return JsonResult(data); | return JsonResult(data); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
@@ -142,10 +139,9 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers | |||||
/// </summary> | /// </summary> | ||||
/// <returns>返回列表Json</returns> | /// <returns>返回列表Json</returns> | ||||
[HttpGet] | [HttpGet] | ||||
public ActionResult GetImageListJson() | |||||
public ActionResult GetImageListJson(string keyword) | |||||
{ | { | ||||
string userId = LoginUserInfo.Get().userId; | |||||
var data = fileInfoBLL.GetImageList(userId); | |||||
var data = fileInfoBLL.GetImageList(keyword); | |||||
return JsonResult(data); | return JsonResult(data); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
@@ -153,10 +149,9 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers | |||||
/// </summary> | /// </summary> | ||||
/// <returns>返回列表Json</returns> | /// <returns>返回列表Json</returns> | ||||
[HttpGet] | [HttpGet] | ||||
public ActionResult GetRecycledListJson() | |||||
public ActionResult GetRecycledListJson(string keyword) | |||||
{ | { | ||||
string userId = LoginUserInfo.Get().userId; | |||||
var data = fileInfoBLL.GetRecycledList(userId); | |||||
var data = fileInfoBLL.GetRecycledList(keyword); | |||||
return JsonResult(data); | return JsonResult(data); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
@@ -164,10 +159,9 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers | |||||
/// </summary> | /// </summary> | ||||
/// <returns>返回列表Json</returns> | /// <returns>返回列表Json</returns> | ||||
[HttpGet] | [HttpGet] | ||||
public ActionResult GetMyShareListJson() | |||||
public ActionResult GetMyShareListJson(string keyword) | |||||
{ | { | ||||
string userId = LoginUserInfo.Get().userId; | |||||
var data = fileInfoBLL.GetMyShareList(userId); | |||||
var data = fileInfoBLL.GetMyShareList(keyword); | |||||
return JsonResult(data); | return JsonResult(data); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
@@ -175,10 +169,9 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers | |||||
/// </summary> | /// </summary> | ||||
/// <returns>返回列表Json</returns> | /// <returns>返回列表Json</returns> | ||||
[HttpGet] | [HttpGet] | ||||
public ActionResult GetOthersShareListJson() | |||||
public ActionResult GetOthersShareListJson(string keyword) | |||||
{ | { | ||||
string userId = LoginUserInfo.Get().userId; | |||||
var data = fileInfoBLL.GetOthersShareList(userId); | |||||
var data = fileInfoBLL.GetOthersShareList(keyword); | |||||
return JsonResult(data); | return JsonResult(data); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
@@ -7,6 +7,8 @@ | |||||
*/ | */ | ||||
var refreshGirdData; | var refreshGirdData; | ||||
var keyword; | |||||
var folderId; | |||||
var bootstrap = function ($, learun) { | var bootstrap = function ($, learun) { | ||||
"use strict"; | "use strict"; | ||||
@@ -22,8 +24,12 @@ var bootstrap = function ($, learun) { | |||||
bind: function () { | bind: function () { | ||||
// 查询 | // 查询 | ||||
$('#btn_Search').on('click', function () { | $('#btn_Search').on('click', function () { | ||||
var keyword = $('#txt_Keyword').val(); | |||||
page.search({ keyword: keyword }); | |||||
keyword = $('#txt_Keyword').val(); | |||||
$.lrSetForm(top.$.rootUrl + _url + '?keyword=' + keyword, function (data) {// | |||||
$('#gridTable').jfGridSet('refreshdata', data); | |||||
}); | |||||
//page.search(); | |||||
}); | }); | ||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
@@ -33,17 +39,18 @@ var bootstrap = function ($, learun) { | |||||
$(".crumb-path span").click(function () { | $(".crumb-path span").click(function () { | ||||
var value = $(this).attr('data-folderId'); | var value = $(this).attr('data-folderId'); | ||||
var folderId = $(".crumb-path span:last").attr('data-folderId'); | var folderId = $(".crumb-path span:last").attr('data-folderId'); | ||||
var where = '&keyword=' + keyword; | |||||
//console.log(value); | //console.log(value); | ||||
if (value == "back") { | if (value == "back") { | ||||
if (folderId == 0) { | if (folderId == 0) { | ||||
$(".crumb-path .back").hide(); | $(".crumb-path .back").hide(); | ||||
} | } | ||||
$.lrSetForm(top.$.rootUrl + _url + '?folderId=' + folderId, function (data) {// | |||||
$.lrSetForm(top.$.rootUrl + _url + '?folderId=' + folderId + where, function (data) {// | |||||
$('#gridTable').jfGridSet('refreshdata', data); | $('#gridTable').jfGridSet('refreshdata', data); | ||||
}); | }); | ||||
$(".crumb-path span:last").remove(); | $(".crumb-path span:last").remove(); | ||||
} else { | } else { | ||||
$.lrSetForm(top.$.rootUrl + _url + '?folderId=0', function (data) {// | |||||
$.lrSetForm(top.$.rootUrl + _url + '?folderId=0' + where, function (data) {// | |||||
$('#gridTable').jfGridSet('refreshdata', data); | $('#gridTable').jfGridSet('refreshdata', data); | ||||
}); | }); | ||||
$(".crumb-path .back").hide(); | $(".crumb-path .back").hide(); | ||||
@@ -268,7 +275,7 @@ var bootstrap = function ($, learun) { | |||||
$this.addClass('active'); | $this.addClass('active'); | ||||
var data_value = $this.context.dataset.value; | var data_value = $this.context.dataset.value; | ||||
switch (data_value) { | switch (data_value) { | ||||
case "allFile": | case "allFile": | ||||
_url = "/LR_OAModule/ResourceFile/GetListJson"; | _url = "/LR_OAModule/ResourceFile/GetListJson"; | ||||
@@ -336,7 +343,7 @@ var bootstrap = function ($, learun) { | |||||
if (options.length != 0) { | if (options.length != 0) { | ||||
return "<div style='cursor:pointer;'><div style='float: left;'><img src='" + top.$.rootUrl + "/Content/images/filetype/" + options.F_FileType + ".png' style='width:30px;height:30px;padding:5px;margin-left:-5px;margin-right:5px;' /></div><div style='float: left;line-height:35px;'>" + options.F_FileName + "</div></div>"; | return "<div style='cursor:pointer;'><div style='float: left;'><img src='" + top.$.rootUrl + "/Content/images/filetype/" + options.F_FileType + ".png' style='width:30px;height:30px;padding:5px;margin-left:-5px;margin-right:5px;' /></div><div style='float: left;line-height:35px;'>" + options.F_FileName + "</div></div>"; | ||||
} | } | ||||
} | |||||
} | |||||
}, | }, | ||||
{ | { | ||||
label: '大小', name: 'F_FileSize', index: 'F_FileSize', width: 100, align: 'center', | label: '大小', name: 'F_FileSize', index: 'F_FileSize', width: 100, align: 'center', | ||||
@@ -392,6 +399,8 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
param.keyword = keyword; | |||||
param.folderId = folderId; | |||||
$('#gridTable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridTable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
}, | }, | ||||
//初始化页面 | //初始化页面 | ||||
@@ -133,10 +133,15 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers | |||||
public ActionResult SaveForm(string keyValue, PostEntity entity) | public ActionResult SaveForm(string keyValue, PostEntity entity) | ||||
{ | { | ||||
var list = postIBLL.GetList(entity.F_CompanyId); | var list = postIBLL.GetList(entity.F_CompanyId); | ||||
if (list.Any(a => a.F_EnCode == entity.F_EnCode)) | |||||
if (string.IsNullOrEmpty(keyValue) && list.Any(a => a.F_EnCode == entity.F_EnCode)) | |||||
{ | { | ||||
return Fail("岗位编号重复"); | |||||
return Fail("岗位编号重复!"); | |||||
} | } | ||||
else if (!string.IsNullOrEmpty(keyValue) && list.Any(a => a.F_EnCode == entity.F_EnCode && a.F_PostId != keyValue)) | |||||
{ | |||||
return Fail("岗位编号重复!"); | |||||
} | |||||
postIBLL.SaveEntity(keyValue, entity); | postIBLL.SaveEntity(keyValue, entity); | ||||
return Success("保存成功!"); | return Success("保存成功!"); | ||||
} | } | ||||
@@ -29,7 +29,7 @@ var bootstrap = function ($, learun) { | |||||
// 新增 | // 新增 | ||||
$('#lr_add').on('click', function () { | $('#lr_add').on('click', function () { | ||||
if (!companyId) { | if (!companyId) { | ||||
learun.alert.warning('请选择公司!'); | |||||
learun.alert.warning('请选择学校!'); | |||||
return false; | return false; | ||||
} | } | ||||
selectedRow = null; | selectedRow = null; | ||||
@@ -50,7 +50,7 @@ var bootstrap = function ($, learun) { | |||||
// 新增 | // 新增 | ||||
$('#lr_add').on('click', function () { | $('#lr_add').on('click', function () { | ||||
if (!companyId) { | if (!companyId) { | ||||
learun.alert.warning('请选择公司!'); | |||||
learun.alert.warning('请选择学校!'); | |||||
return false; | return false; | ||||
} | } | ||||
selectedRow = null; | selectedRow = null; | ||||
@@ -45,6 +45,11 @@ | |||||
left: 0px; | left: 0px; | ||||
width: 228px | width: 228px | ||||
} | } | ||||
.indSec1T > a { | |||||
width: fit-content; | |||||
padding-left: 6px; | |||||
padding-right: 6px; | |||||
} | |||||
</style> | </style> | ||||
</head> | </head> | ||||
<body> | <body> | ||||
@@ -45,6 +45,11 @@ | |||||
left: 0px; | left: 0px; | ||||
width: 206px | width: 206px | ||||
} | } | ||||
.indSec1T > a { | |||||
width: fit-content; | |||||
padding-left: 6px; | |||||
padding-right: 6px; | |||||
} | |||||
</style> | </style> | ||||
</head> | </head> | ||||
<body> | <body> | ||||
@@ -168,7 +168,12 @@ | |||||
key: value, | key: value, | ||||
keyId: 'f_companyid', | keyId: 'f_companyid', | ||||
callback: function (_data) { | callback: function (_data) { | ||||
result = _data.f_fullname; | |||||
if (!_data.f_fullname || _data.f_fullname == '' || _data.f_fullname == 'undefined') { | |||||
result = ''; | |||||
} | |||||
else { | |||||
result = _data.f_fullname; | |||||
} | |||||
} | } | ||||
}); | }); | ||||
@@ -97,16 +97,19 @@ var bootstrap = function ($, learun) { | |||||
initData: function () { | initData: function () { | ||||
if (!!keyValue) { | if (!!keyValue) { | ||||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/GetFormData?keyValue=' + keyValue, | |||||
function(data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | } | ||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
}); | |||||
} else { | |||||
$('#BuildType').lrselectSet('4'); | |||||
$('#BuildType').attr('readonly', 'readonly'); | |||||
} | } | ||||
}, | }, | ||||
initSelect: function () { | initSelect: function () { | ||||
@@ -122,6 +125,7 @@ var bootstrap = function ($, learun) { | |||||
param: { parentId: '0' }, | param: { parentId: '0' }, | ||||
} | } | ||||
$('#Campus').lrselect(dfop); | $('#Campus').lrselect(dfop); | ||||
$('#Campus').lrselectSet(learun.clientdata.get(['userinfo']).companyId); | |||||
} | } | ||||
}; | }; | ||||
@@ -25,7 +25,7 @@ var bootstrap = function ($, learun) { | |||||
allowSearch: true, | allowSearch: true, | ||||
maxHeight: 225, | maxHeight: 225, | ||||
select: function (item) { | select: function (item) { | ||||
if (item&&item.id!='-1') { | |||||
if (item && item.id != '-1') { | |||||
$('#BuildType').lrselectSet(item.title); | $('#BuildType').lrselectSet(item.title); | ||||
$('#BuildType').attr('readonly', 'readonly'); | $('#BuildType').attr('readonly', 'readonly'); | ||||
} else { | } else { | ||||
@@ -43,7 +43,7 @@ var bootstrap = function ($, learun) { | |||||
type: 'radio', | type: 'radio', | ||||
code: 'HasToilet', | code: 'HasToilet', | ||||
}) | }) | ||||
//$('#StudentID').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuid', text: 'stuname' }); | //$('#StudentID').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuid', text: 'stuname' }); | ||||
//$('#StudentID').lrDataSourceSelect({ code: 'StuInfoTwo', value: 'stuid', text: 'stuname' }); | //$('#StudentID').lrDataSourceSelect({ code: 'StuInfoTwo', value: 'stuid', text: 'stuname' }); | ||||
$('#StudentID').lrselect({ | $('#StudentID').lrselect({ | ||||
@@ -51,7 +51,7 @@ var bootstrap = function ($, learun) { | |||||
text: "stuname", | text: "stuname", | ||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic' | url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic' | ||||
}); | }); | ||||
$('#Class').lrselect({ | $('#Class').lrselect({ | ||||
value: "classno", | value: "classno", | ||||
text: "classname" | text: "classname" | ||||
@@ -115,7 +115,7 @@ var bootstrap = function ($, learun) { | |||||
if (!!keyValue) { | if (!!keyValue) { | ||||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/GetFormData?keyValue=' + keyValue, | $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/GetFormData?keyValue=' + keyValue, | ||||
function(data) { | |||||
function (data) { | |||||
for (var id in data) { | for (var id in data) { | ||||
if (!!data[id].length && data[id].length > 0) { | if (!!data[id].length && data[id].length > 0) { | ||||
$('#' + id).jfGridSet('refreshdata', data[id]); | $('#' + id).jfGridSet('refreshdata', data[id]); | ||||
@@ -126,6 +126,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} else { | } else { | ||||
$('#ParentID').lrselectSet(ParentID); | $('#ParentID').lrselectSet(ParentID); | ||||
$('#ParentID').attr('readonly', 'readonly'); | |||||
} | } | ||||
}, | }, | ||||
initSelect: function () { | initSelect: function () { | ||||
@@ -141,7 +142,7 @@ var bootstrap = function ($, learun) { | |||||
param: { parentId: '0' }, | param: { parentId: '0' }, | ||||
} | } | ||||
$('#Campus').lrselect(dfop); | $('#Campus').lrselect(dfop); | ||||
$('#Campus').lrselectSet(learun.clientdata.get(['userinfo']).companyId); | |||||
} | } | ||||
}; | }; | ||||
// 保存数据 | // 保存数据 | ||||
@@ -45,6 +45,11 @@ | |||||
left: -60px; | left: -60px; | ||||
width: 273px; | width: 273px; | ||||
} | } | ||||
.indSec1T > a { | |||||
width: fit-content; | |||||
padding-left: 6px; | |||||
padding-right: 6px; | |||||
} | |||||
</style> | </style> | ||||
</head> | </head> | ||||
<body> | <body> | ||||
@@ -45,6 +45,11 @@ | |||||
left: 0px; | left: 0px; | ||||
width: 225px | width: 225px | ||||
} | } | ||||
.indSec1T > a { | |||||
width: fit-content; | |||||
padding-left: 6px; | |||||
padding-right: 6px; | |||||
} | |||||
</style> | </style> | ||||
</head> | </head> | ||||
<body> | <body> | ||||
@@ -3,21 +3,21 @@ | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | Layout = "~/Views/Shared/_Form.cshtml"; | ||||
} | } | ||||
<div class="lr-form-wrap"> | <div class="lr-form-wrap"> | ||||
<div style="visibility:hidden" class="col-xs-12 lr-form-item" data-table="Acc_Sanitation"> | |||||
<div style="display: none;" class="col-xs-12 lr-form-item" data-table="Acc_Sanitation"> | |||||
<div class="lr-form-item-title">宿舍</div> | <div class="lr-form-item-title">宿舍</div> | ||||
<input id="RoomID" value="@ViewBag.RoomID" type="hidden" class="form-control" /> | |||||
<input id="RoomID" value="@ViewBag.RoomID" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Acc_Sanitation"> | <div class="col-xs-6 lr-form-item" data-table="Acc_Sanitation"> | ||||
<div class="lr-form-item-title">分数<font face="宋体">*</font></div> | <div class="lr-form-item-title">分数<font face="宋体">*</font></div> | ||||
@*<div id="Grade" isvalid="yes" checkexpession="NotNull"></div>*@ | @*<div id="Grade" isvalid="yes" checkexpession="NotNull"></div>*@ | ||||
<input id="Grade" type="text" class="from-control" isvalid="yes" checkexpession="NotNull" /> | |||||
<input id="Grade" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Acc_Sanitation"> | <div class="col-xs-6 lr-form-item" data-table="Acc_Sanitation"> | ||||
<div class="lr-form-item-title">检查者</div> | <div class="lr-form-item-title">检查者</div> | ||||
<input id="GradedUser" type="text" class="form-control" /> | <input id="GradedUser" type="text" class="form-control" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="Acc_Sanitation"> | |||||
<div class="lr-form-item-title">日期框<font face="宋体">*</font></div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Acc_Sanitation"> | |||||
<div class="lr-form-item-title">日期<font face="宋体">*</font></div> | |||||
<input id="GradedTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#GradedTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | <input id="GradedTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#GradedTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="Acc_Sanitation"> | <div class="col-xs-12 lr-form-item" data-table="Acc_Sanitation"> | ||||
@@ -21,6 +21,8 @@ var bootstrap = function ($, learun) { | |||||
selectedParent.ID = item.value; | selectedParent.ID = item.value; | ||||
selectedParent.hasChildren = item.hasChildren; | selectedParent.hasChildren = item.hasChildren; | ||||
selectedParent.textName = item.text; | selectedParent.textName = item.text; | ||||
selectedParent.BuildType = item.title; | |||||
console.log('selectedParent.BuildType', selectedParent.BuildType); | |||||
page.search({ RoomID: item.value }); | page.search({ RoomID: item.value }); | ||||
} | } | ||||
}); | }); | ||||
@@ -30,8 +32,8 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
// 新增 | // 新增 | ||||
$('#lr_add').on('click', function () { | $('#lr_add').on('click', function () { | ||||
if (selectedParent.hasChildren || selectedParent.textName.indexOf("室") == -1) { | |||||
learun.alert.warning('请选择宿舍评分'); | |||||
if (selectedParent.BuildType != '4') { | |||||
learun.alert.warning('请选择宿舍!'); | |||||
return; | return; | ||||
} | } | ||||
learun.layerForm({ | learun.layerForm({ | ||||
@@ -86,7 +88,12 @@ var bootstrap = function ($, learun) { | |||||
headData: [ | headData: [ | ||||
{ label: "分数", name: "Grade", width: 100, align: "left" }, | { label: "分数", name: "Grade", width: 100, align: "left" }, | ||||
{ label: "检查者", name: "GradedUser", width: 100, align: "left" }, | { label: "检查者", name: "GradedUser", width: 100, align: "left" }, | ||||
{ label: "日期框", name: "GradedTime", width: 100, align: "left" }, | |||||
{ | |||||
label: "日期框", name: "GradedTime", width: 100, align: "left", | |||||
formatter: function(value, row) { | |||||
return learun.formatDate(value, 'yyyy-MM-dd'); | |||||
} | |||||
}, | |||||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | { label: "备注", name: "Remark", width: 100, align: "left" }, | ||||
], | ], | ||||
mainId: 'ID', | mainId: 'ID', | ||||
@@ -4,12 +4,12 @@ | |||||
} | } | ||||
<div class="lr-form-wrap"> | <div class="lr-form-wrap"> | ||||
<div class="col-xs-12 lr-form-item" data-table="WP_FileList" > | <div class="col-xs-12 lr-form-item" data-table="WP_FileList" > | ||||
<div class="lr-form-item-title">标题</div> | |||||
<input id="FTitile" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">标题<font face="宋体">*</font></div> | |||||
<input id="FTitile" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="WP_FileList" > | <div class="col-xs-12 lr-form-item" data-table="WP_FileList" > | ||||
<div class="lr-form-item-title">目录</div> | |||||
<div id="CId" ></div> | |||||
<div class="lr-form-item-title">目录<font face="宋体">*</font></div> | |||||
<div id="CId" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | </div> | ||||
@*<div class="col-xs-12 lr-form-item" data-table="WP_FileList" > | @*<div class="col-xs-12 lr-form-item" data-table="WP_FileList" > | ||||
<div class="lr-form-item-title">创建人</div> | <div class="lr-form-item-title">创建人</div> | ||||
@@ -110,9 +110,9 @@ var bootstrap = function ($, learun) { | |||||
learun.clientdata.getAsync('custmerData', { | learun.clientdata.getAsync('custmerData', { | ||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | ||||
key: value, | key: value, | ||||
keyId: 'f_departmentid', | |||||
keyId: 'id', | |||||
callback: function (_data) { | callback: function (_data) { | ||||
callback(_data['f_fullname']); | |||||
callback(_data['name']); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
@@ -131,11 +131,11 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
label: "计划类型", name: "WSTimeType", width: 100, align: "left", | |||||
label: "总结类型", name: "WSTimeType", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('dataItem', { | learun.clientdata.getAsync('dataItem', { | ||||
key: value, | key: value, | ||||
code: 'WorkPlanType', | |||||
code: 'WorkSummaryType', | |||||
callback: function (_data) { | callback: function (_data) { | ||||
callback(_data.text); | callback(_data.text); | ||||
} | } | ||||
@@ -2,7 +2,7 @@ | |||||
ViewBag.Title = "补助种类管理"; | ViewBag.Title = "补助种类管理"; | ||||
Layout = "~/Views/Shared/_Form.cshtml"; | Layout = "~/Views/Shared/_Form.cshtml"; | ||||
} | } | ||||
<div class="lr-form-wrap"> | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-6 lr-form-item" data-table="SW_Ask_Type"> | <div class="col-xs-6 lr-form-item" data-table="SW_Ask_Type"> | ||||
<div class="lr-form-item-title">类型名称<font face="宋体">*</font></div> | <div class="lr-form-item-title">类型名称<font face="宋体">*</font></div> | ||||
<input id="TName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | <input id="TName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | ||||
@@ -390,6 +390,7 @@ | |||||
dfop.param.itemCode = op.code; | dfop.param.itemCode = op.code; | ||||
dfop.param.parentId = op.parentId || '0'; | dfop.param.parentId = op.parentId || '0'; | ||||
dfop.allowSearch = op.allowSearch; | dfop.allowSearch = op.allowSearch; | ||||
dfop.placeholder = op.placeholder; | |||||
var list = []; | var list = []; | ||||
@@ -21,9 +21,9 @@ namespace Learun.Application.OA.File.FileInfo | |||||
/// <param name="folderId">文件夹Id</param> | /// <param name="folderId">文件夹Id</param> | ||||
/// <param name="userId">用户Id</param> | /// <param name="userId">用户Id</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public IEnumerable<FileInfoEntity> GetList(string folderId, string userId) | |||||
public IEnumerable<FileInfoEntity> GetAllList(string folderId, string keyword) | |||||
{ | { | ||||
return service.GetList(folderId, userId); | |||||
return service.GetAllList(folderId, keyword); | |||||
} | } | ||||
public IEnumerable<FileInfoEntity> GetList(string userId) | public IEnumerable<FileInfoEntity> GetList(string userId) | ||||
{ | { | ||||
@@ -38,45 +38,45 @@ namespace Learun.Application.OA.File.FileInfo | |||||
/// </summary> | /// </summary> | ||||
/// <param name="userId">用户Id</param> | /// <param name="userId">用户Id</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public IEnumerable<FileInfoEntity> GetDocumentList(string userId) | |||||
public IEnumerable<FileInfoEntity> GetDocumentList(string keyword) | |||||
{ | { | ||||
return service.GetDocumentList(userId); | |||||
return service.GetDocumentList(keyword); | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 图片列表 | /// 图片列表 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="userId">用户Id</param> | /// <param name="userId">用户Id</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public IEnumerable<FileInfoEntity> GetImageList(string userId) | |||||
public IEnumerable<FileInfoEntity> GetImageList(string keyword) | |||||
{ | { | ||||
return service.GetImageList(userId); | |||||
return service.GetImageList(keyword); | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 回收站文件(夹)列表 | /// 回收站文件(夹)列表 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="userId">用户Id</param> | /// <param name="userId">用户Id</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public IEnumerable<FileInfoEntity> GetRecycledList(string userId) | |||||
public IEnumerable<FileInfoEntity> GetRecycledList(string keyword) | |||||
{ | { | ||||
return service.GetRecycledList(userId); | |||||
return service.GetRecycledList(keyword); | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 我的文件(夹)共享列表 | /// 我的文件(夹)共享列表 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="userId">用户Id</param> | /// <param name="userId">用户Id</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public IEnumerable<FileInfoEntity> GetMyShareList(string userId) | |||||
public IEnumerable<FileInfoEntity> GetMyShareList(string keyword) | |||||
{ | { | ||||
return service.GetMyShareList(userId); | |||||
return service.GetMyShareList(keyword); | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 他人文件(夹)共享列表 | /// 他人文件(夹)共享列表 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="userId">用户Id</param> | /// <param name="userId">用户Id</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public IEnumerable<FileInfoEntity> GetOthersShareList(string userId) | |||||
public IEnumerable<FileInfoEntity> GetOthersShareList(string keyword) | |||||
{ | { | ||||
return service.GetOthersShareList(userId); | |||||
return service.GetOthersShareList(keyword); | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 文件信息实体 | /// 文件信息实体 | ||||
@@ -12,13 +12,14 @@ namespace Learun.Application.OA.File.FileInfo | |||||
public interface FileInfoIBLL | public interface FileInfoIBLL | ||||
{ | { | ||||
#region 获取数据 | #region 获取数据 | ||||
/// <summary> | /// <summary> | ||||
/// 所有文件(夹)列表 | /// 所有文件(夹)列表 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="folderId">文件夹Id</param> | /// <param name="folderId">文件夹Id</param> | ||||
/// <param name="userId">用户Id</param> | /// <param name="userId">用户Id</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
IEnumerable<FileInfoEntity> GetList(string folderId, string userId); | |||||
IEnumerable<FileInfoEntity> GetAllList(string folderId, string keyword); | |||||
IEnumerable<FileInfoEntity> GetList(string userId); | IEnumerable<FileInfoEntity> GetList(string userId); | ||||
IEnumerable<FileInfoEntity> GetList(); | IEnumerable<FileInfoEntity> GetList(); | ||||
@@ -27,31 +28,31 @@ namespace Learun.Application.OA.File.FileInfo | |||||
/// </summary> | /// </summary> | ||||
/// <param name="userId">用户Id</param> | /// <param name="userId">用户Id</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
IEnumerable<FileInfoEntity> GetDocumentList(string userId); | |||||
IEnumerable<FileInfoEntity> GetDocumentList(string keyword); | |||||
/// <summary> | /// <summary> | ||||
/// 图片列表 | /// 图片列表 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="userId">用户Id</param> | /// <param name="userId">用户Id</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
IEnumerable<FileInfoEntity> GetImageList(string userId); | |||||
IEnumerable<FileInfoEntity> GetImageList(string keyword); | |||||
/// <summary> | /// <summary> | ||||
/// 回收站文件(夹)列表 | /// 回收站文件(夹)列表 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="userId">用户Id</param> | /// <param name="userId">用户Id</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
IEnumerable<FileInfoEntity> GetRecycledList(string userId); | |||||
IEnumerable<FileInfoEntity> GetRecycledList(string keyword); | |||||
/// <summary> | /// <summary> | ||||
/// 我的文件(夹)共享列表 | /// 我的文件(夹)共享列表 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="userId">用户Id</param> | /// <param name="userId">用户Id</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
IEnumerable<FileInfoEntity> GetMyShareList(string userId); | |||||
IEnumerable<FileInfoEntity> GetMyShareList(string keyword); | |||||
/// <summary> | /// <summary> | ||||
/// 他人文件(夹)共享列表 | /// 他人文件(夹)共享列表 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="userId">用户Id</param> | /// <param name="userId">用户Id</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
IEnumerable<FileInfoEntity> GetOthersShareList(string userId); | |||||
IEnumerable<FileInfoEntity> GetOthersShareList(string keyword); | |||||
/// <summary> | /// <summary> | ||||
/// 文件信息实体 | /// 文件信息实体 | ||||
/// </summary> | /// </summary> | ||||
@@ -1,4 +1,5 @@ | |||||
using Learun.DataBase.Repository; | using Learun.DataBase.Repository; | ||||
using Learun.Util; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Data.Common; | using System.Data.Common; | ||||
@@ -30,23 +31,26 @@ namespace Learun.Application.OA.File.FileInfo | |||||
/// <summary> | /// <summary> | ||||
/// 所有文件(夹)列表 | /// 所有文件(夹)列表 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="folderId">文件夹Id</param> | |||||
/// <param name="userId">用户Id</param> | |||||
/// <returns></returns> | /// <returns></returns> | ||||
public IEnumerable<FileInfoEntity> GetList(string folderId, string userId) | |||||
public IEnumerable<FileInfoEntity> GetAllList(string folderId,string keyword) | |||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
string folderCondition = ""; | string folderCondition = ""; | ||||
string fileCondition = ""; | string fileCondition = ""; | ||||
if (!string.IsNullOrEmpty(folderId)) | if (!string.IsNullOrEmpty(folderId)) | ||||
{ | { | ||||
folderCondition = " AND F_ParentId = @folderId"; | |||||
fileCondition=" AND F_FolderId = @folderId"; | |||||
folderCondition = $" AND F_ParentId = '{folderId}'"; | |||||
fileCondition = $" AND F_FolderId = '{folderId}'"; | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
fileCondition = " AND F_FolderId = '0'"; | fileCondition = " AND F_FolderId = '0'"; | ||||
} | } | ||||
if (!string.IsNullOrEmpty(keyword)) | |||||
{ | |||||
folderCondition = $" AND F_FolderName like '%{keyword}%'"; | |||||
fileCondition = $" AND F_FileName like '%{keyword}%'"; | |||||
} | |||||
strSql.Append(@"SELECT * | strSql.Append(@"SELECT * | ||||
FROM ( SELECT F_FolderId AS F_FileId , | FROM ( SELECT F_FolderId AS F_FileId , | ||||
F_ParentId AS F_FolderId , | F_ParentId AS F_FolderId , | ||||
@@ -69,17 +73,17 @@ namespace Learun.Application.OA.File.FileInfo | |||||
F_IsShare | F_IsShare | ||||
FROM LR_OA_FileInfo where F_DeleteMark = 0 "); | FROM LR_OA_FileInfo where F_DeleteMark = 0 "); | ||||
strSql.Append(fileCondition); | strSql.Append(fileCondition); | ||||
strSql.Append(") t WHERE F_CreateUserId = @userId"); | |||||
strSql.Append(") t WHERE F_CreateUserId = @userId"); | |||||
strSql.Append(" ORDER BY CASE WHEN F_FileType = 'folder' THEN 1 ELSE 2 END, F_ModifyDate ASC"); | strSql.Append(" ORDER BY CASE WHEN F_FileType = 'folder' THEN 1 ELSE 2 END, F_ModifyDate ASC"); | ||||
return this.BaseRepository().FindList<FileInfoEntity>(strSql.ToString(), new { userId = userId, folderId = folderId }); | |||||
var userId = LoginUserInfo.Get().userId; | |||||
return this.BaseRepository().FindList<FileInfoEntity>(strSql.ToString(), new { userId = userId }); | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 文档列表 | /// 文档列表 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="userId">用户Id</param> | |||||
/// <returns></returns> | /// <returns></returns> | ||||
public IEnumerable<FileInfoEntity> GetDocumentList(string userId) | |||||
public IEnumerable<FileInfoEntity> GetDocumentList(string keyword) | |||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append(@"SELECT F_FileId , | strSql.Append(@"SELECT F_FileId , | ||||
@@ -95,15 +99,20 @@ namespace Learun.Application.OA.File.FileInfo | |||||
AND F_FileType IN ( 'log', 'txt', 'pdf', 'doc', 'docx', 'ppt', 'pptx', | AND F_FileType IN ( 'log', 'txt', 'pdf', 'doc', 'docx', 'ppt', 'pptx', | ||||
'xls', 'xlsx' ) | 'xls', 'xlsx' ) | ||||
AND F_CreateUserId = @userId"); | AND F_CreateUserId = @userId"); | ||||
if (!string.IsNullOrEmpty(keyword)) | |||||
{ | |||||
strSql.Append($" and F_FileName like '%{keyword}%'"); | |||||
} | |||||
strSql.Append(" ORDER BY F_ModifyDate ASC"); | strSql.Append(" ORDER BY F_ModifyDate ASC"); | ||||
var userId = LoginUserInfo.Get().userId; | |||||
return this.BaseRepository().FindList<FileInfoEntity>(strSql.ToString(), new { userId = userId }); | return this.BaseRepository().FindList<FileInfoEntity>(strSql.ToString(), new { userId = userId }); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 图片列表 | /// 图片列表 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="userId">用户Id</param> | |||||
/// <returns></returns> | /// <returns></returns> | ||||
public IEnumerable<FileInfoEntity> GetImageList(string userId) | |||||
public IEnumerable<FileInfoEntity> GetImageList(string keyword) | |||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append(@"SELECT F_FileId , | strSql.Append(@"SELECT F_FileId , | ||||
@@ -118,79 +127,101 @@ namespace Learun.Application.OA.File.FileInfo | |||||
WHERE F_DeleteMark = 0 | WHERE F_DeleteMark = 0 | ||||
AND F_FileType IN ( 'ico', 'gif', 'jpeg', 'jpg', 'png', 'psd' ) | AND F_FileType IN ( 'ico', 'gif', 'jpeg', 'jpg', 'png', 'psd' ) | ||||
AND F_CreateUserId = @userId"); | AND F_CreateUserId = @userId"); | ||||
if (!string.IsNullOrEmpty(keyword)) | |||||
{ | |||||
strSql.Append($" and F_FileName like '%{keyword}%'"); | |||||
} | |||||
var userId = LoginUserInfo.Get().userId; | |||||
strSql.Append(" ORDER BY F_ModifyDate ASC"); | strSql.Append(" ORDER BY F_ModifyDate ASC"); | ||||
return this.BaseRepository().FindList<FileInfoEntity>(strSql.ToString(), new { userId = userId }); | return this.BaseRepository().FindList<FileInfoEntity>(strSql.ToString(), new { userId = userId }); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 回收站文件(夹)列表 | /// 回收站文件(夹)列表 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="userId">用户Id</param> | |||||
/// <returns></returns> | /// <returns></returns> | ||||
public IEnumerable<FileInfoEntity> GetRecycledList(string userId) | |||||
public IEnumerable<FileInfoEntity> GetRecycledList(string keyword) | |||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append(@"SELECT * | strSql.Append(@"SELECT * | ||||
FROM ( SELECT F_FolderId AS F_FileId , | |||||
FROM ( "); | |||||
var folderSql = @"SELECT F_FolderId AS F_FileId , | |||||
F_ParentId AS F_FolderId , | F_ParentId AS F_FolderId , | ||||
F_FolderName AS F_FileName , | F_FolderName AS F_FileName , | ||||
'' AS F_FileSize , | '' AS F_FileSize , | ||||
'folder' AS F_FileType , | 'folder' AS F_FileType , | ||||
F_CreateUserId, | F_CreateUserId, | ||||
F_ModifyDate | F_ModifyDate | ||||
FROM LR_OA_FileFolder where F_DeleteMark = 1 | |||||
UNION | |||||
SELECT F_FileId , | |||||
FROM LR_OA_FileFolder where F_DeleteMark = 1"; | |||||
var fileinfoSql = @"SELECT F_FileId , | |||||
F_FolderId , | F_FolderId , | ||||
F_FileName , | F_FileName , | ||||
F_FileSize , | F_FileSize , | ||||
F_FileType , | F_FileType , | ||||
F_CreateUserId, | F_CreateUserId, | ||||
F_ModifyDate | F_ModifyDate | ||||
FROM LR_OA_FileInfo where F_DeleteMark = 1 | |||||
) t WHERE F_CreateUserId = @userId"); | |||||
FROM LR_OA_FileInfo where F_DeleteMark = 1"; | |||||
if (!string.IsNullOrEmpty(keyword)) | |||||
{ | |||||
folderSql = folderSql + $" and F_FolderName like '%{keyword}%'"; | |||||
fileinfoSql = fileinfoSql + $" and F_FileName like '%{keyword}%'"; | |||||
} | |||||
strSql.Append(folderSql + "UNION "); | |||||
strSql.Append(fileinfoSql); | |||||
strSql.Append(") t WHERE F_CreateUserId = @userId"); | |||||
var userId = LoginUserInfo.Get().userId; | |||||
strSql.Append(" ORDER BY F_ModifyDate DESC"); | strSql.Append(" ORDER BY F_ModifyDate DESC"); | ||||
return this.BaseRepository().FindList<FileInfoEntity>(strSql.ToString(), new { userId = userId }); | return this.BaseRepository().FindList<FileInfoEntity>(strSql.ToString(), new { userId = userId }); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 我的文件(夹)共享列表 | /// 我的文件(夹)共享列表 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="userId">用户Id</param> | |||||
/// <returns></returns> | /// <returns></returns> | ||||
public IEnumerable<FileInfoEntity> GetMyShareList(string userId) | |||||
public IEnumerable<FileInfoEntity> GetMyShareList(string keyword) | |||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append(@"SELECT * | strSql.Append(@"SELECT * | ||||
FROM ( SELECT F_FolderId AS F_FileId , | |||||
FROM ( "); | |||||
var folderSql = @"SELECT F_FolderId AS F_FileId , | |||||
F_ParentId AS F_FolderId , | F_ParentId AS F_FolderId , | ||||
F_FolderName AS F_FileName , | F_FolderName AS F_FileName , | ||||
'' AS F_FileSize , | '' AS F_FileSize , | ||||
'folder' AS F_FileType , | 'folder' AS F_FileType , | ||||
F_CreateUserId, | F_CreateUserId, | ||||
F_ModifyDate | F_ModifyDate | ||||
FROM LR_OA_FileFolder WHERE F_DeleteMark = 0 AND F_IsShare = 1 | |||||
UNION | |||||
SELECT F_FileId , | |||||
FROM LR_OA_FileFolder WHERE F_DeleteMark = 0 AND F_IsShare = 1"; | |||||
var fileinfoSql = @"SELECT F_FileId , | |||||
F_FolderId , | F_FolderId , | ||||
F_FileName , | F_FileName , | ||||
F_FileSize , | F_FileSize , | ||||
F_FileType , | F_FileType , | ||||
F_CreateUserId, | F_CreateUserId, | ||||
F_ModifyDate | F_ModifyDate | ||||
FROM LR_OA_FileInfo WHERE F_DeleteMark = 0 AND F_IsShare = 1 | |||||
) t WHERE F_CreateUserId = @userId"); | |||||
FROM LR_OA_FileInfo WHERE F_DeleteMark = 0 AND F_IsShare = 1"; | |||||
if (!string.IsNullOrEmpty(keyword)) | |||||
{ | |||||
folderSql = folderSql + $" and F_FolderName like '%{keyword}%'"; | |||||
fileinfoSql = fileinfoSql + $" and F_FileName like '%{keyword}%'"; | |||||
} | |||||
strSql.Append(folderSql + "UNION "); | |||||
strSql.Append(fileinfoSql); | |||||
strSql.Append(") t WHERE F_CreateUserId = @userId"); | |||||
var userId = LoginUserInfo.Get().userId; | |||||
strSql.Append(" ORDER BY F_ModifyDate DESC"); | strSql.Append(" ORDER BY F_ModifyDate DESC"); | ||||
return this.BaseRepository().FindList<FileInfoEntity>(strSql.ToString(), new { userId = userId }); | return this.BaseRepository().FindList<FileInfoEntity>(strSql.ToString(), new { userId = userId }); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 他人文件(夹)共享列表 | /// 他人文件(夹)共享列表 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="userId">用户Id</param> | |||||
/// <returns></returns> | /// <returns></returns> | ||||
public IEnumerable<FileInfoEntity> GetOthersShareList(string userId) | |||||
public IEnumerable<FileInfoEntity> GetOthersShareList(string keyword) | |||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append(@"SELECT * | strSql.Append(@"SELECT * | ||||
FROM ( SELECT F_FolderId AS F_FileId , | |||||
FROM ( "); | |||||
var folderSql = @"SELECT F_FolderId AS F_FileId , | |||||
F_ParentId AS F_FolderId , | F_ParentId AS F_FolderId , | ||||
F_FolderName AS F_FileName , | F_FolderName AS F_FileName , | ||||
'' AS F_FileSize , | '' AS F_FileSize , | ||||
@@ -198,9 +229,8 @@ namespace Learun.Application.OA.File.FileInfo | |||||
F_CreateUserId, | F_CreateUserId, | ||||
F_CreateUserName, | F_CreateUserName, | ||||
F_ShareTime AS F_ModifyDate | F_ShareTime AS F_ModifyDate | ||||
FROM LR_OA_FileFolder WHERE F_DeleteMark = 0 AND F_IsShare = 1 | |||||
UNION | |||||
SELECT F_FileId , | |||||
FROM LR_OA_FileFolder WHERE F_DeleteMark = 0 AND F_IsShare = 1"; | |||||
var fileinfoSql = @" SELECT F_FileId , | |||||
F_FolderId , | F_FolderId , | ||||
F_FileName , | F_FileName , | ||||
F_FileSize , | F_FileSize , | ||||
@@ -208,9 +238,18 @@ namespace Learun.Application.OA.File.FileInfo | |||||
F_CreateUserId, | F_CreateUserId, | ||||
F_CreateUserName, | F_CreateUserName, | ||||
F_ShareTime AS F_ModifyDate | F_ShareTime AS F_ModifyDate | ||||
FROM LR_OA_FileInfo WHERE F_DeleteMark = 0 AND F_IsShare = 1 | |||||
) t WHERE F_CreateUserId != @userId"); | |||||
FROM LR_OA_FileInfo WHERE F_DeleteMark = 0 AND F_IsShare = 1"; | |||||
if (!string.IsNullOrEmpty(keyword)) | |||||
{ | |||||
folderSql = folderSql + $" and F_FolderName like '%{keyword}%'"; | |||||
fileinfoSql = fileinfoSql + $" and F_FileName like '%{keyword}%'"; | |||||
} | |||||
strSql.Append(folderSql + "UNION "); | |||||
strSql.Append(fileinfoSql); | |||||
strSql.Append(") t WHERE F_CreateUserId != @userId"); | |||||
strSql.Append(" ORDER BY F_ModifyDate DESC"); | strSql.Append(" ORDER BY F_ModifyDate DESC"); | ||||
var userId = LoginUserInfo.Get().userId; | |||||
return this.BaseRepository().FindList<FileInfoEntity>(strSql.ToString(), new { userId = userId }); | return this.BaseRepository().FindList<FileInfoEntity>(strSql.ToString(), new { userId = userId }); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
@@ -82,11 +82,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT "); | strSql.Append("SELECT "); | ||||
strSql.Append(fieldSql); | strSql.Append(fieldSql); | ||||
strSql.Append(" FROM AddressBook t "); | |||||
strSql.Append(" FROM AddressBook t where 1=1 "); | |||||
var data = LoginUserInfo.Get(); | var data = LoginUserInfo.Get(); | ||||
if (!data.isSystem) | if (!data.isSystem) | ||||
{ | { | ||||
strSql.Append($" where ASaverId='{data.userId}' or AIsShare=1"); | |||||
strSql.Append($" and ASaverId='{data.userId}' or AIsShare=1"); | |||||
} | |||||
var queryParam = queryJson.ToJObject(); | |||||
if (!queryParam["keyword"].IsEmpty()) | |||||
{ | |||||
strSql.Append($" AND t.AName Like '%{queryParam["keyword"].ToString()}%' "); | |||||
} | } | ||||
return this.BaseRepository().FindList<AddressBookEntity>(strSql.ToString(), pagination); | return this.BaseRepository().FindList<AddressBookEntity>(strSql.ToString(), pagination); | ||||
} | } | ||||
@@ -75,9 +75,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) "); | strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) "); | ||||
} | } | ||||
strSql.Append(@" group by AcademicYearNo, Semester, ExamDate, ExamTime,LessonNo, LessonName,ClassRoomNo,ClassRoomName,EmpNo, EmpName, ClassNo,ClassName,t.EPId | strSql.Append(@" group by AcademicYearNo, Semester, ExamDate, ExamTime,LessonNo, LessonName,ClassRoomNo,ClassRoomName,EmpNo, EmpName, ClassNo,ClassName,t.EPId | ||||
"); | |||||
having count(StuNo)>0"); | |||||
var list = this.BaseRepository("CollegeMIS").FindList<Exam_ArrangeExamTermItemNewEntity>(strSql.ToString(), pagination).Where(x => x.ClassStuNum > 0); | |||||
var list = this.BaseRepository("CollegeMIS").FindList<Exam_ArrangeExamTermItemNewEntity>(strSql.ToString(), pagination); | |||||
var stulist = BaseRepository("CollegeMIS").FindList<Exam_ArrangeExamTermItemNewEntity>("select * from Exam_ArrangeExamTermItemNew"); | var stulist = BaseRepository("CollegeMIS").FindList<Exam_ArrangeExamTermItemNewEntity>("select * from Exam_ArrangeExamTermItemNew"); | ||||
foreach (var item in list) | foreach (var item in list) | ||||
{ | { | ||||
@@ -118,7 +118,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
try | try | ||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append(@"select t.*,e.AcademicYearNo,e.Semester from Exam_ArrangeExamTermItemNew t join Exam_ExamPlan e on t.EPId=e.EPId where 1=1 "); | |||||
strSql.Append(@"select t.*,e.AcademicYearNo,e.Semester from Exam_ArrangeExamTermItemNew t join Exam_ExamPlan e on t.EPId=e.EPId where 1=1 and t.ClassNo is not null "); | |||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
if (!queryParam["AcademicYearNo"].IsEmpty()) | if (!queryParam["AcademicYearNo"].IsEmpty()) | ||||
{ | { | ||||
@@ -230,13 +230,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
string sql = $@"insert into Exam_ExamLesson([ELId] | string sql = $@"insert into Exam_ExamLesson([ELId] | ||||
,[AcademicYearNo] | ,[AcademicYearNo] | ||||
,[Semester] | ,[Semester] | ||||
,Grade,DeptNo,MajorNo | |||||
,Grade | |||||
,[LessonName] | ,[LessonName] | ||||
,[LessonNo] | ,[LessonNo] | ||||
,[ELOrder] | ,[ELOrder] | ||||
,[ELEnabled]) | ,[ELEnabled]) | ||||
select NEWID(),AcademicYearNo,Semester,Grade,DeptNo,MajorNo,LessonName,[LessonNo],0,1 from OpenLessonPlan where lessonsortno=1 and AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' | |||||
select NEWID(),AcademicYearNo,Semester,Grade,LessonName,[LessonNo],0,1 from OpenLessonPlan where lessonsortno=1 and AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' | |||||
and [LessonNo] not in (select [LessonNo] from Exam_ExamLesson where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' ) | and [LessonNo] not in (select [LessonNo] from Exam_ExamLesson where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' ) | ||||
group by LessonNo,LessonName,AcademicYearNo,Semester,Grade | |||||
"; | "; | ||||
return this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | return this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | ||||
} | } | ||||
@@ -325,10 +325,12 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');"); | |||||
//排考安排班级 | //排考安排班级 | ||||
var planClassData = db.FindList<Exam_ExamPlanClassEntity>(x => x.EPLId == planLesson.EPLId); | var planClassData = db.FindList<Exam_ExamPlanClassEntity>(x => x.EPLId == planLesson.EPLId); | ||||
var classnos = string.Join("','", planClassData.Select(x => x.ClassNo).ToList()); | var classnos = string.Join("','", planClassData.Select(x => x.ClassNo).ToList()); | ||||
string stuSql = $"select * from Exam_ExamStudent where AcademicYearNo='{examPlan.AcademicYearNo}' and Semester='{examPlan.Semester}' and ESType='{examPlan.PlanType}' and classno in ('{classnos}') and stuno not in (select StuNo from Exam_ArrangeExamTermItemNew where EPId='{keyValue}' and LessonNo='{planLesson.LessonNo}')"; | |||||
string stuSql = $"select * from Exam_ExamStudent where ESEnabled=1 and AcademicYearNo='{examPlan.AcademicYearNo}' and Semester='{examPlan.Semester}' and ESType='{examPlan.PlanType}' and classno in ('{classnos}') and stuno not in (select StuNo from Exam_ArrangeExamTermItemNew where EPId='{keyValue}' and LessonNo='{planLesson.LessonNo}')"; | |||||
//所有考生 | //所有考生 | ||||
var stuInfoList = db.FindList<Exam_ExamStudentEntity>(stuSql).ToList(); | var stuInfoList = db.FindList<Exam_ExamStudentEntity>(stuSql).ToList(); | ||||
var classInfo = db.FindList<ClassInfoEntity>(); | var classInfo = db.FindList<ClassInfoEntity>(); | ||||
itemList = itemList.OrderBy(x => x.SitNumber).OrderBy(x => x.ClassroomNo).ToList(); | |||||
if (itemList.Count >= stuInfoList.Count()) | if (itemList.Count >= stuInfoList.Count()) | ||||
{ | { | ||||
//随机安排座位 | //随机安排座位 | ||||
@@ -350,7 +352,6 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');"); | |||||
else | else | ||||
{ | { | ||||
//不随机安排座位 | //不随机安排座位 | ||||
itemList = itemList.OrderBy(x => x.SitNumber).OrderBy(x => x.ClassroomNo).ToList(); | |||||
stuInfoList = stuInfoList.OrderBy(x => x.StuNo).OrderBy(x => x.ClassNo).ToList(); | stuInfoList = stuInfoList.OrderBy(x => x.StuNo).OrderBy(x => x.ClassNo).ToList(); | ||||
//为考生安排座位 | //为考生安排座位 | ||||
for (int i = 0; i < stuInfoList.Count; i++) | for (int i = 0; i < stuInfoList.Count; i++) | ||||
@@ -204,6 +204,28 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 判断考试时间是否冲突 | |||||
/// </summary> | |||||
/// <param name="entity"></param> | |||||
public (bool flag, string lessonname) IsExamTimeClash(Exam_ExamPlanLessonEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
return exam_ExamPlanLessonService.IsExamTimeClash(entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -49,6 +49,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
/// <param name="entity">实体</param> | /// <param name="entity">实体</param> | ||||
void SaveEntity(string keyValue, Exam_ExamPlanLessonEntity entity); | void SaveEntity(string keyValue, Exam_ExamPlanLessonEntity entity); | ||||
(bool flag, string lessonname) IsExamTimeClash(Exam_ExamPlanLessonEntity entity); | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -95,7 +95,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
return this.BaseRepository("CollegeMIS").FindTable($" select distinct EPLId,LessonName,LessonNo from Exam_ExamPlanLesson where EPId='{EPId}'"); | |||||
return this.BaseRepository("CollegeMIS").FindTable($" select distinct EPLId,LessonName,LessonNo from Exam_ExamPlanLesson where EPId='{EPId}' order by LessonNo"); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -182,9 +182,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
if (exam_ExamPlan.PlanType == "1") | if (exam_ExamPlan.PlanType == "1") | ||||
{ | { | ||||
//必修 | //必修 | ||||
string sql = $@"insert into Exam_ExamPlanLesson(EPLId,EPId,ELId,LessonName,LessonNo) | |||||
select NEWID(),'{EPId}',ELId,LessonName,LessonNo from Exam_ExamLesson where AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' | |||||
and LessonNo not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}')"; | |||||
string sql = $@"insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo) | |||||
select NEWID(),'{EPId}',LessonName+'('+grade+')',LessonNo+'('+grade+')' from Exam_ExamLesson where ELEnabled=1 and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' | |||||
and LessonNo+'('+grade+')' not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}') | |||||
group by LessonNo,grade,LessonName"; | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | ||||
} | } | ||||
else if (exam_ExamPlan.PlanType == "2") | else if (exam_ExamPlan.PlanType == "2") | ||||
@@ -218,12 +219,12 @@ and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan | |||||
//排考课程表 | //排考课程表 | ||||
var list = db.FindList<Exam_ExamPlanLessonEntity>(x => x.EPId == EPId); | var list = db.FindList<Exam_ExamPlanLessonEntity>(x => x.EPId == EPId); | ||||
//班级 | //班级 | ||||
var classInfo = db.FindList<Exam_ExamStudentEntity>($"select ClassNo,count(1) as StuNum FROM Exam_ExamStudent where ESType='{exam_ExamPlan.PlanType}' and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' group by ClassNo"); | |||||
var classInfo = db.FindList<Exam_ExamStudentEntity>($"select ClassNo,count(1) as StuNum FROM Exam_ExamStudent where ESEnabled=1 and ESType='{exam_ExamPlan.PlanType}' and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' group by ClassNo"); | |||||
foreach (var lesson in list) | foreach (var lesson in list) | ||||
{ | { | ||||
//考试课程信息 | //考试课程信息 | ||||
var examLesson = db.FindEntity<Exam_ExamLessonEntity>(x => x.ELId == lesson.ELId); | var examLesson = db.FindEntity<Exam_ExamLessonEntity>(x => x.ELId == lesson.ELId); | ||||
//应排班级数 | //应排班级数 | ||||
lesson.ClassNum = classInfo.Count(); | lesson.ClassNum = classInfo.Count(); | ||||
//应考人数 | //应考人数 | ||||
@@ -279,6 +280,50 @@ and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 判断考试时间是否冲突 | |||||
/// </summary> | |||||
/// <param name="entity"></param> | |||||
public (bool flag, string lessonname) IsExamTimeClash(Exam_ExamPlanLessonEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
var epl = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanLessonEntity>(entity.EPLId); | |||||
//查询和entity考试日期同一天的考试课程 | |||||
var daylist = this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanLessonEntity>($"select * from [dbo].[Exam_ExamPlanLesson] where epid='{epl.EPId}' and examtime is not null and datediff(day, examdate, '{entity.ExamDate}') = 0"); | |||||
//考试开始时间 | |||||
var examstartTime = Convert.ToDateTime(entity.ExamDate.Value.ToString("yyyy-MM-dd") + " " + entity.ExamTimeStart.Trim()); | |||||
//考试结束时间 | |||||
var examendTime = Convert.ToDateTime(entity.ExamDate.Value.ToString("yyyy-MM-dd") + " " + entity.ExamTimeEnd.Trim()); | |||||
foreach (var examPlanLesson in daylist) | |||||
{ | |||||
//开始时间 | |||||
var startTime = Convert.ToDateTime(examPlanLesson.ExamDate.Value.ToString("yyyy-MM-dd") + " " + examPlanLesson.ExamTime.Split('-')[0]); | |||||
//结束时间 | |||||
var endTime = Convert.ToDateTime(examPlanLesson.ExamDate.Value.ToString("yyyy-MM-dd") + " " + examPlanLesson.ExamTime.Split('-')[1]); | |||||
if ((examstartTime >= startTime && examstartTime <= endTime) || | |||||
(examendTime >= startTime && examendTime <= endTime)) | |||||
{ | |||||
return (true, examPlanLesson.LessonName); | |||||
} | |||||
} | |||||
return (false, ""); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -81,6 +81,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
#region 扩展字段 | #region 扩展字段 | ||||
[NotMapped] | [NotMapped] | ||||
public int StuNum { get; set; } | public int StuNum { get; set; } | ||||
[NotMapped] | |||||
public string ClassName { get; set; } | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -91,9 +91,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT "); | strSql.Append("SELECT "); | ||||
strSql.Append(@" ClassNo,count(1) as StuNum,AcademicYearNo,Semester,ESType "); | |||||
strSql.Append(@" t.ClassNo,count(1) as StuNum,t.AcademicYearNo,t.Semester,t.ESType,c.ClassName "); | |||||
strSql.Append(" FROM Exam_ExamStudent t "); | strSql.Append(" FROM Exam_ExamStudent t "); | ||||
strSql.Append(" WHERE 1=1 "); | |||||
strSql.Append(" left join classinfo c on t.ClassNo=c.ClassNo "); | |||||
strSql.Append(" WHERE t.ESEnabled=1 "); | |||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
// 虚拟参数 | // 虚拟参数 | ||||
var dp = new DynamicParameters(new { }); | var dp = new DynamicParameters(new { }); | ||||
@@ -112,6 +113,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); | dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); | ||||
strSql.Append(" AND t.ClassNo = @ClassNo "); | strSql.Append(" AND t.ClassNo = @ClassNo "); | ||||
} | } | ||||
if (!queryParam["ClassName"].IsEmpty()) | |||||
{ | |||||
dp.Add("ClassName", "%" + queryParam["ClassName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND c.ClassName Like @ClassName "); | |||||
} | |||||
if (!queryParam["StuNo"].IsEmpty()) | if (!queryParam["StuNo"].IsEmpty()) | ||||
{ | { | ||||
dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); | dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); | ||||
@@ -134,7 +140,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
//排考安排课程表Id | //排考安排课程表Id | ||||
if (!queryParam["EPLId"].IsEmpty()) | if (!queryParam["EPLId"].IsEmpty()) | ||||
{ | { | ||||
strSql.Append($" and classno not in (select ClassNo from Exam_ExamPlanClass where EPLId='{queryParam["EPLId"].ToString()}')"); | |||||
strSql.Append($" and t.classno not in (select ClassNo from Exam_ExamPlanClass where EPLId='{queryParam["EPLId"].ToString()}')"); | |||||
} | } | ||||
//排考记录表Id | //排考记录表Id | ||||
if (!queryParam["EPId"].IsEmpty()) | if (!queryParam["EPId"].IsEmpty()) | ||||
@@ -145,7 +151,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
strSql.Append($" AND t.AcademicYearNo = '{examPlan.AcademicYearNo}' AND t.Semester = '{examPlan.Semester}' AND t.ESType = '{examPlan.PlanType}' "); | strSql.Append($" AND t.AcademicYearNo = '{examPlan.AcademicYearNo}' AND t.Semester = '{examPlan.Semester}' AND t.ESType = '{examPlan.PlanType}' "); | ||||
} | } | ||||
} | } | ||||
strSql.Append(" group by ClassNo,AcademicYearNo,Semester,ESType "); | |||||
strSql.Append(" group by t.ClassNo,t.AcademicYearNo,t.Semester,t.ESType,c.ClassName "); | |||||
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamStudentEntity>(strSql.ToString(), dp, pagination); | return this.BaseRepository("CollegeMIS").FindList<Exam_ExamStudentEntity>(strSql.ToString(), dp, pagination); | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
@@ -86,7 +86,8 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
showcheck = false, | showcheck = false, | ||||
checkstate = 0, | checkstate = 0, | ||||
isexpand = false, | isexpand = false, | ||||
parentId = item.ParentID == null ? "" : item.ParentID | |||||
parentId = item.ParentID == null ? "" : item.ParentID, | |||||
title = item.BuildType, | |||||
}; | }; | ||||
treeList.Add(node); | treeList.Add(node); | ||||
} | } | ||||