Kaynağa Gözat

解决冲突

临城职教中职
ndbs 2 yıl önce
ebeveyn
işleme
b64b3d6514
12 değiştirilmiş dosya ile 226 ekleme ve 15 silme
  1. +45
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/ResourceFileController.cs
  2. +37
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/ResourceFile/FileStatistic.cshtml
  3. +79
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/ResourceFile/FileStatistic.js
  4. +6
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs
  5. +15
    -9
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormRoom.js
  6. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  7. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/File/FileInfo/FileInfoBLL.cs
  8. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/File/FileInfo/FileInfoIBLL.cs
  9. +20
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/File/FileInfo/FileInfoService.cs
  10. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs
  11. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs
  12. +14
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs

+ 45
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/ResourceFileController.cs Dosyayı Görüntüle

@@ -83,6 +83,15 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers
{
return View();
}
/// <summary>
/// 云盘文件统计
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult FileStatistic()
{
return View();
}
#endregion

#region 获取数据
@@ -204,6 +213,42 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers
var data = fileInfoBLL.GetEntity(keyValue);
return JsonResult(data);
}
/// <summary>
/// 获取云盘文件统计数据
/// </summary>
/// <param name="queryJson"></param>
/// <returns></returns>
public ActionResult GetFileStatisitcData(string queryJson)
{
var data = fileInfoBLL.GetListByJson(queryJson);
var dataGroup = data.Where(x => x.F_CreateDate.HasValue).GroupBy(x => x.F_CreateDate.Value.Month).Select(x => new TempClass()
{
month=x.Key,
count = x.Select(y=>y.F_FileId).Count()
});

var xAxis = new List<string>();
var seriesData = new List<int>();
for (int i = 0; i < 12; i++)
{
xAxis.Add(string.Format("{0}月", i + 1));
var aa = dataGroup.FirstOrDefault(x => x.month == (i + 1));
seriesData.Add(aa == null ? 0 : aa.count);
}

var jsonData = new
{
seriesData = seriesData,
xAxis = xAxis
};

return Success(jsonData);
}
public class TempClass {
public int month { get; set; }
public int count { get; set; }
}

#endregion

#region 提交数据


+ 37
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/ResourceFile/FileStatistic.cshtml Dosyayı Görüntüle

@@ -0,0 +1,37 @@

@{
ViewBag.Title = "流程使用报表";
Layout = "~/Views/Shared/_ReportTemplate.cshtml";
}

<div class="lr-layout ui-report">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<input id="year" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy',onpicked: function () { $('#year').trigger('change'); } })" placeholder="请选择年" />
</div>
<div class="lr-layout-tool-item">
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i>&nbsp;<span class="lrlt">查询</span></a>
</div>
</div>
<div class="lr-layout-tool-right">
<div class="btn-group btn-group-sm" learun-authorize="yes">
<a id="lr-replace" class="btn btn-default"><i class="fa fa-refresh"></i>&nbsp;<span class="lrlt">刷新</span></a>
</div>
</div>
</div>
<div class="lr-layout-grid" style="overflow:auto;">
<div class="grid-title">
<div style="overflow: hidden; padding-bottom: 20px; text-align: center; margin-left: auto; margin-right: auto;">
<div id="main" style="width: 650px; height: 350px;border: 1px solid #ccc;">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="~/Content/echarts/echarts.js"></script>
@Html.AppendJsFile("/Areas/LR_OAModule/Views/ResourceFile/FileStatistic.js")

+ 79
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/ResourceFile/FileStatistic.js Dosyayı Görüntüle

@@ -0,0 +1,79 @@
var bootstrap = function ($, learun) {
"use strict";
var year = "";
var page = {
init: function () {
page.bind();
page.initChart();
},
bind: function () {
//当前年
var now = learun.formatDate(new Date(), 'yyyy');
$('#year').val(now);
year = now;
// 刷新
$('#lr-replace').on('click', function () {
location.reload();
});
//查询
$('#btn_Search').on('click', function () {
year = $('#year').val();
page.search();
});
},
initChart: function () {
var myChart1 = echarts.init(document.getElementById('main'));
var queryJson = { year: year };
learun.httpAsyncPost(top.$.rootUrl + "/LR_OAModule/ResourceFile/GetFileStatisitcData", { queryJson: JSON.stringify(queryJson) }, function (res) {
if (res.code == 200) {
var option1 = {
title: {
text: year + '年云盘文件统计图',
x: 'center'
},
legend: {
orient: 'vertical',
left: 'left',
data: ['数量']
},
tooltip: {
trigger: 'axis'
},
grid: {
left: '5%',
right: '3%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
data: res.data.xAxis
},
yAxis: {
type: 'value',
name: '文件数/个'

},
series: [
{
name: '数量',
type: 'bar',
data: res.data.seriesData
}
]
};
myChart1.setOption(option1);
}
});

},
search: function (param) {
param = param || {};
param.year = year;
page.initChart();
}
};
page.init();
}



+ 6
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs Dosyayı Görüntüle

@@ -463,7 +463,12 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
public ActionResult SaveRoom(string RoomId, List<Acc_DormitoryBuildEntity> list)
{
//List<Acc_DormitoryBuildEntity> list = strEntity.ToObject<List<Acc_DormitoryBuildEntity>>();
accommodationIBLL.SaveRoom(RoomId, list);
string res = accommodationIBLL.SaveRoom(RoomId, list);
if (!string.IsNullOrEmpty(res))
{
return Fail(res);
}

return Success("保存成功!");
}



+ 15
- 9
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormRoom.js Dosyayı Görüntüle

@@ -18,7 +18,7 @@ var bootstrap = function ($, learun) {
page.initData();
},
bind: function () {
},
initData: function () {
if (!!keyValue) {
@@ -51,16 +51,16 @@ var bootstrap = function ($, learun) {
value: "stuno",
text: "stuname",
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable',
param: { code: "StuInfoBasic", strWhere: strWhere },
param: { code: "StuInfoBasic", strWhere: strWhere },
// 是否允许搜索
allowSearch: true,
select: function (item) {
// console.log(item);
// console.log(item);
var stuid = '';
if (item) {
stuid = item.stuno;

}
}
var id = $(this).attr('id');
//console.log('id', id);
//console.log('item',item);
@@ -78,9 +78,9 @@ var bootstrap = function ($, learun) {

//arr.push({ ID: data[i].ID, StudentID: data[i].StudentID });
}
});
}
},
@@ -93,8 +93,14 @@ var bootstrap = function ($, learun) {
//var postData = {
// strEntity: JSON.stringify($('body').lrGetFormData())
//};
//console.log('arr',arr);
//console.log('arr', arr);
for (var i = 0; i < arr.length - 1; i++) {
for (var j = i + 1; j < arr.length; j++) {
if (!!arr[i].StudentID && arr[i].StudentID === arr[j].StudentID) {
return learun.alert.warning('学生不可重复!');
}
}
}
var postData = {
list: arr
};


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Dosyayı Görüntüle

@@ -1492,6 +1492,7 @@
<Content Include="Areas\LR_OAModule\Views\Notice\IndexRecycle.js" />
<Content Include="Areas\LR_OAModule\Views\Notice\IndexFlow.js" />
<Content Include="Areas\LR_OAModule\Views\ResourceFile\BcIndex.js" />
<Content Include="Areas\LR_OAModule\Views\ResourceFile\FileStatistic.js" />
<Content Include="Areas\LR_OAModule\Views\Signet\Index.js" />
<Content Include="Areas\LR_PortalSite\Views\Article\Form.css" />
<Content Include="Areas\LR_PortalSite\Views\Article\Form.js" />
@@ -7630,6 +7631,7 @@
<Content Include="Areas\EducationalAdministration\Views\TextBookOut\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookOut\FormView.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookOut\FormDelete.cshtml" />
<Content Include="Areas\LR_OAModule\Views\ResourceFile\FileStatistic.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInOut\FormUse.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInOut\IndexInOut.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/File/FileInfo/FileInfoBLL.cs Dosyayı Görüntüle

@@ -33,6 +33,10 @@ namespace Learun.Application.OA.File.FileInfo
{
return service.GetList();
}
public IEnumerable<FileInfoEntity> GetListByJson(string queryJson)
{
return service.GetListByJson(queryJson);
}
/// <summary>
/// 文档列表
/// </summary>


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/File/FileInfo/FileInfoIBLL.cs Dosyayı Görüntüle

@@ -22,6 +22,7 @@ namespace Learun.Application.OA.File.FileInfo

IEnumerable<FileInfoEntity> GetList(string userId);
IEnumerable<FileInfoEntity> GetList();
IEnumerable<FileInfoEntity> GetListByJson(string queryJson);
/// <summary>
/// 文档列表
/// </summary>


+ 20
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/File/FileInfo/FileInfoService.cs Dosyayı Görüntüle

@@ -1,4 +1,5 @@
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data.Common;
@@ -24,7 +25,25 @@ namespace Learun.Application.OA.File.FileInfo
public IEnumerable<FileInfoEntity> GetList()
{
string sql = "select * from LR_OA_FileInfo where F_DeleteMark = 0";
return this.BaseRepository().FindList<FileInfoEntity>();
return this.BaseRepository().FindList<FileInfoEntity>(sql);
}
public IEnumerable<FileInfoEntity> GetListByJson(string queryJson)
{
var dp = new object();
var queryParam = queryJson.ToJObject();
var strSql = new StringBuilder();
strSql.Append("select * from LR_OA_FileInfo where F_DeleteMark = 0 ");
if (!queryParam["year"].IsEmpty())
{
dp = new { year = queryParam["year"].ToInt() };
strSql.Append(" and DATEPART(yyyy,F_CreateDate) = @year ");
}
else
{
dp = new { year = DateTime.Now.Year };
strSql.Append(" and DATEPART(yyyy,F_CreateDate) = @year ");
}
return this.BaseRepository().FindList<FileInfoEntity>(strSql.ToString(),dp);
}

/// <summary>


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs Dosyayı Görüntüle

@@ -681,11 +681,11 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}

public void SaveRoom(string RoomId, List<Acc_DormitoryBuildEntity> list)
public string SaveRoom(string RoomId, List<Acc_DormitoryBuildEntity> list)
{
try
{
accommodationService.SaveRoom(RoomId, list);
return accommodationService.SaveRoom(RoomId, list);
}
catch (Exception ex)
{


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs Dosyayı Görüntüle

@@ -83,7 +83,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
void SaveEntity(string keyValue, Acc_DormitoryBuildEntity entity);
void SaveBedEntity(string keyValue,string ParentID, Acc_DormitoryBuildEntity entity);
void SaveDeptClass(string keyValue, Acc_DormitoryBuildEntity entity,int type);
void SaveRoom(string RoomId, List<Acc_DormitoryBuildEntity> list);
string SaveRoom(string RoomId, List<Acc_DormitoryBuildEntity> list);

/// <summary>
/// 批量添加单元、楼层、房间、床位


+ 14
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs Dosyayı Görüntüle

@@ -1721,13 +1721,25 @@ where ID='{ParentID}'
/// </summary>
/// <param name="RoomId"></param>
/// <param name="list"></param>
public void SaveRoom(string RoomId, List<Acc_DormitoryBuildEntity> list)
public string SaveRoom(string RoomId, List<Acc_DormitoryBuildEntity> list)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
foreach (var entity in list)
{
//判断该学生是否已分配
if (!string.IsNullOrEmpty(entity.StudentID))
{
var count = db.FindList<Acc_DormitoryBuildEntity>().Count(x => x.StudentID == entity.StudentID && x.ID != entity.ID);
if (count > 0)
{
var stuname = db.FindEntity<StuInfoBasicEntity>(x => x.StuNo == entity.StudentID)?.StuName;
return "学生" + stuname + "已分配床位,不可重复分配!";
}
}

//分配床位
string sql = $"update Acc_DormitoryBuild set StudentID='{entity.StudentID}' where ID='{entity.ID}'";
db.ExecuteBySql(sql);
}
@@ -1737,6 +1749,7 @@ where ID='{ParentID}'
db.ExecuteBySql(checkInSql);

db.Commit();
return "";
}
catch (Exception ex)
{


Yükleniyor…
İptal
Kaydet