Parcourir la source

Merge branch '塔里木分支' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 塔里木分支

新疆影视学院高职
ndbs il y a 2 ans
Parent
révision
fee77ab212
4 fichiers modifiés avec 122 ajouts et 18 suppressions
  1. +52
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreNotPassController.cs
  2. +3
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndex.cshtml
  3. +37
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndex.js
  4. +30
    -18
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemBLL.cs

+ 52
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreNotPassController.cs Voir le fichier

@@ -416,6 +416,58 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
return Success("操作成功!");
}


/// <summary>
/// 导出列表
/// </summary>
/// <returns></returns>
[HttpPost, ValidateInput(false)]
public ActionResult ExportInputScoreList(string headdata,string rowdata)
{
var headData = JsonConvert.DeserializeObject<List<colModel>>(headdata);
var rowData = JsonConvert.DeserializeObject<List<List<colModel>>>(rowdata);
var result = new List<Dictionary<string, string>>();
foreach (var item in rowData)
{
var aaa = new Dictionary<string, string>();
foreach (var i in item)
{
aaa.Add(i.label, i.name);
}

result.Add(aaa);
}
var resultStr = JsonConvert.SerializeObject(result);

//成绩源
var exportTable = resultStr.ToTable();
//设置导出格式
ExcelConfig excelconfig = new ExcelConfig();
excelconfig.Title = "全员补考成绩管理";
excelconfig.TitleFont = "微软雅黑";
excelconfig.TitlePoint = 20;
excelconfig.FileName = "全员补考成绩管理.xls";
excelconfig.IsAllSizeColumn = true;
//每一列的设置,没有设置的列信息,系统将按datatable中的列名导出
excelconfig.ColumnEntity = new List<ColumnModel>();
foreach (var item in headData)
{
excelconfig.ColumnEntity.Add(new ColumnModel() { Column = item.name, ExcelColumn = item.label });
}

//调用导出方法
ExcelHelper.ExcelDownload(exportTable, excelconfig);

return Success("导出成功!");
}
/// <summary>
/// 列
/// </summary>
public class colModel {
public string label { get; set; }
public string name { get; set; }
}
#endregion
}
}

+ 3
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndex.cshtml Voir le fichier

@@ -90,6 +90,9 @@
<a id="lr_check" class="btn btn-default"><i class="fa fa-lock">&nbsp;提交教务处</i></a>
<a id="lr_uncheck" class="btn btn-default"><i class="fa fa-lock">&nbsp;去审核成绩</i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_export" class="btn btn-default"><i class="fa fa-lock">&nbsp;导出</i></a>
</div>
</div>

</div>


+ 37
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndex.js Voir le fichier

@@ -343,6 +343,43 @@ var bootstrap = function ($, learun) {
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/AddMinutes', { queryJson: JSON.stringify(query), minutes: newMinutes }, function (res) { });
}
});

// 导出
$('#lr_export').on('click', function () {
var aa = $('#gridtable')[0].dfop.running;
//console.log(aa);
var bb = new Array();
for (var i = 0; i < aa.headData.length; i++) {
var bbitem = {
label: aa.headData[i].data["label"],
name: aa.headData[i].data["name"]
}
bb.push(bbitem);
}
//console.log(bb);
var cc = new Array();
for (var i = 0; i < aa.rowdata.length; i++) {
var dd = new Array();
for (var j = 0; j < bb.length; j++) {
var dditem = {
label: bb[j]["name"],
name: aa.rowdata[i]["" + bb[j]["name"] + ""]["text"],
}
dd.push(dditem);
}
cc.push(dd);
}
//console.log(cc);
learun.download({
method: "POST",
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/ExportInputScoreList',
param: {
headdata: JSON.stringify(bb),
rowdata: JSON.stringify(cc)
}
});

});
},
bindSelect: function () {
//校区


+ 30
- 18
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemBLL.cs Voir le fichier

@@ -131,7 +131,8 @@ namespace Learun.Application.Base.SystemModule
/// <param name="keyValue">主键</param>
/// <param name="itemCode">编码</param>
/// <returns></returns>
public bool ExistItemCode(string keyValue, string itemCode) {
public bool ExistItemCode(string keyValue, string itemCode)
{
try
{
bool res = false;
@@ -199,7 +200,8 @@ namespace Learun.Application.Base.SystemModule
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveClassifyEntity(string keyValue, DataItemEntity entity) {
public void SaveClassifyEntity(string keyValue, DataItemEntity entity)
{
try
{
dataItemService.SaveClassifyEntity(keyValue, entity);
@@ -279,7 +281,7 @@ namespace Learun.Application.Base.SystemModule
try
{
List<DataItemDetailEntity> list = cache.Read<List<DataItemDetailEntity>>(cacheKeyDetail + itemCode, CacheId.dataItem);
if (list?.Count==0 || list==null)
if (list?.Count == 0 || list == null)
{
list = (List<DataItemDetailEntity>)dataItemService.GetDetailList(itemCode);
cache.Write<List<DataItemDetailEntity>>(cacheKeyDetail + itemCode, list, CacheId.dataItem);
@@ -303,26 +305,34 @@ namespace Learun.Application.Base.SystemModule
/// 获取数据字典详细映射数据
/// </summary>
/// <returns></returns>
public Dictionary<string, Dictionary<string,DataItemModel>> GetModelMap()
public Dictionary<string, Dictionary<string, DataItemModel>> GetModelMap()
{
try
{
Dictionary<string, Dictionary<string,DataItemModel>> dic = cache.Read<Dictionary<string, Dictionary<string,DataItemModel>>>(cacheKeyDetail + "dic", CacheId.dataItem);
if (dic == null) {
dic = new Dictionary<string, Dictionary<string,DataItemModel>>();
Dictionary<string, Dictionary<string, DataItemModel>> dic = cache.Read<Dictionary<string, Dictionary<string, DataItemModel>>>(cacheKeyDetail + "dic", CacheId.dataItem);
if (dic == null)
{
dic = new Dictionary<string, Dictionary<string, DataItemModel>>();
var list = GetClassifyList();
foreach (var item in list) {
foreach (var item in list)
{
var detailList = GetDetailList(item.F_ItemCode);
if (!dic.ContainsKey(item.F_ItemCode)) {
dic.Add(item.F_ItemCode,new Dictionary<string,DataItemModel>());
if (!dic.ContainsKey(item.F_ItemCode))
{
dic.Add(item.F_ItemCode, new Dictionary<string, DataItemModel>());
}
foreach (var detailItem in detailList) {
dic[item.F_ItemCode].Add(detailItem.F_ItemDetailId, new DataItemModel()
foreach (var detailItem in detailList)
{
if (!dic[item.F_ItemCode].ContainsKey(detailItem.F_ItemDetailId))
{
parentId = detailItem.F_ParentId,
text = detailItem.F_ItemName,
value = detailItem.F_ItemValue
});
dic[item.F_ItemCode].Add(detailItem.F_ItemDetailId, new DataItemModel()
{
parentId = detailItem.F_ParentId,
text = detailItem.F_ItemName,
value = detailItem.F_ItemValue
});
}

}
}
cache.Write(cacheKeyDetail + "dic", dic, CacheId.dataItem);
@@ -354,7 +364,8 @@ namespace Learun.Application.Base.SystemModule
try
{
List<DataItemDetailEntity> list = GetDetailList(itemCode);
if (!string.IsNullOrEmpty(keyword)) {
if (!string.IsNullOrEmpty(keyword))
{
list = list.FindAll(t => t.F_ItemName.Contains(keyword) || t.F_ItemValue.Contains(keyword));
}
return list;
@@ -416,7 +427,8 @@ namespace Learun.Application.Base.SystemModule
{
List<DataItemDetailEntity> list = GetDetailList(itemCode);
List<TreeModel> treeList = new List<TreeModel>();
foreach (var item in list) {
foreach (var item in list)
{
TreeModel node = new TreeModel();
node.id = item.F_ItemDetailId;
node.text = item.F_ItemName;


Chargement…
Annuler
Enregistrer