Просмотр исходного кода

Merge branch '怀来职教中心中职' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 怀来职教中心中职

怀来职教中心中职
dyy 1 год назад
Родитель
Сommit
e79b0f43e2
8 измененных файлов: 295 добавлений и 2 удалений
  1. +25
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/PartyManageController.cs
  2. +51
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyManage/StatsIndex.cshtml
  3. +140
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyManage/StatsIndex.js
  4. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  5. +18
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageBLL.cs
  6. +10
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageEntity.cs
  7. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageIBLL.cs
  8. +48
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageService.cs

+ 25
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/PartyManageController.cs Просмотреть файл

@@ -37,6 +37,12 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
{
return View();
}

[HttpGet]
public ActionResult StatsIndex()
{
return View();
}
#endregion

#region 获取数据
@@ -90,6 +96,25 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
var data = partyManageIBLL.GetTree(CType);
return Success(data);
}
/// <summary>
/// 统计数据
/// <summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetStatsList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = partyManageIBLL.GetStatsList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
#endregion

#region 提交数据


+ 51
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyManage/StatsIndex.cshtml Просмотреть файл

@@ -0,0 +1,51 @@
@{
ViewBag.Title = "统计";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout lr-layout-left-center" id="lr_layout">
<div class="lr-layout-left">
<div class="lr-layout-wrap">
<div class="lr-layout-title lrlg ">树形列表</div>
<div id="dataTree" class="lr-layout-body"></div>
</div>
</div>
<div class="lr-layout-center">
<div class="lr-layout-wrap ">
<div class="lr-layout-title">
<span id="titleinfo" class="lrlg">列表信息</span>
</div>
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="datesearch"></div>
</div>
@*<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">标题</div>
<input id="Title" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">学年</div>
<div id="Year"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">学期</div>
<div id="Semester"></div>
</div>
</div>
</div>
</div>*@
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/PartyManage/StatsIndex.js")

+ 140
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/PartyManage/StatsIndex.js Просмотреть файл

@@ -0,0 +1,140 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-11-07 14:25
* 描 述:经费开支申报
*/
var refreshGirdData;
var selectedId;
var CType = request('CType');
var bootstrap = function ($, learun) {
"use strict";
var startTime;
var endTime;
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
if (!CType) {
CType = 1;
}
// 初始化左侧树形数据
$('#dataTree').lrtree({
url: top.$.rootUrl + '/PersonnelManagement/PartyManage/GetTree?CType=' + CType,
nodeClick: function (item) {
selectedId = item.value;
page.search({ CateId: item.value });
}
});
// 时间搜索框
$('#datesearch').lrdate({
dfdata: [
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
],
// 月
mShow: false,
premShow: false,
// 季度
jShow: false,
prejShow: false,
// 年
ysShow: false,
yxShow: false,
preyShow: false,
yShow: false,
// 默认
dfvalue: '1',
selectfn: function (begin, end) {
startTime = begin;
endTime = end;
if (selectedId) {
page.search({ CateId: selectedId });
}
}
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
//$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
// if (selectedId) {
// queryJson.CateId = selectedId;
// page.search(queryJson);
// }
//}, 220, 400);
//$('#Year').lrselect({
// placeholder: "学年",
// allowSearch: false,
// url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
// value: 'value',
// text: 'text',
// maxHeight: 200,
//});
////学期
//$('#Semester').lrselect({
// placeholder: "学期",
// allowSearch: false,
// url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
// value: 'value',
// text: 'text'
//});
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/PersonnelManagement/PartyManage/GetStatsList',
headData: [
{
label: "申报部门", name: "Department", width: 200, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('department', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}
},
{ label: "总人数", name: "Num", width: 200, align: "left", statistics: true },
{ label: "上传人数", name: "Number", width: 200, align: "left", statistics: true },
{ label: '未上传人数', name: 'Unit', width: 150, align: 'left', statistics: true },
],
mainId: 'Department',
isPage: true,
sidx: 'Department desc'
});
page.search();
},
search: function (param) {
param = param || {};
param.StartTime = startTime;
param.EndTime = endTime;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
if (selectedId) {
page.search({ CateId: selectedId });
}
//if (!!res) {
// if (res.code == 200) {
// // 发起流程
// var postData = {
// schemeCode: 'LC_FundsApply',// 填写流程对应模板编号
// processId: processId,
// level: '1',
// };
// learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
// learun.loading(false);
// });
// }
// page.search();
//}
};
page.init();
}

+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Просмотреть файл

@@ -1874,6 +1874,7 @@
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyApply.js" />
<Content Include="Areas\PersonnelManagement\Views\MeetingNotice\Form.js" />
<Content Include="Areas\PersonnelManagement\Views\MeetingNotice\Index.js" />
<Content Include="Areas\PersonnelManagement\Views\PartyManage\StatsIndex.js" />
<Content Include="Areas\PersonnelManagement\Views\Sal_UserSalary\ImportForm.css" />
<Content Include="Areas\PersonnelManagement\Views\Sal_UserSalary\ImportForm.js" />
<Content Include="Areas\PersonnelManagement\Views\SRPaper\CheckForm.js" />
@@ -8180,6 +8181,7 @@
<Content Include="Areas\PersonnelManagement\Views\SRWork\FormDeptSchool.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreExperiment\InputScoreIndex.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreExperiment\Monitor.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\PartyManage\StatsIndex.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


+ 18
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageBLL.cs Просмотреть файл

@@ -42,6 +42,24 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}
}
public IEnumerable<PartyManageEntity> GetStatsList(Pagination pagination, string queryJson)
{
try
{
return partyManageService.GetStatsList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取PartyManage表实体数据


+ 10
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageEntity.cs Просмотреть файл

@@ -53,12 +53,18 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
public string CType { get; set; }
[Column("YEAR")]
public string Year { get; set; }

[Column("SEMESTER")]
public string Semester { get; set; }
[Column("DEPARTMENT")]
public string Department { get; set; }

#endregion

[NotMapped]
public int Num { get; set; }
[NotMapped]
public int Number { get; set; }
[NotMapped]
public int cha { get; set; }
#region 扩展操作
/// <summary>
/// 新增调用
@@ -68,6 +74,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
this.ID = Guid.NewGuid().ToString();
this.Createtime = DateTime.Now;
this.Creator = LoginUserInfo.Get().userId;
this.Department = LoginUserInfo.Get().departmentId;
}
/// <summary>
/// 编辑调用
@@ -76,6 +83,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
public void Modify(string keyValue)
{
this.ID = keyValue;
this.Updatetime = DateTime.Now;
}
#endregion
}


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageIBLL.cs Просмотреть файл

@@ -21,6 +21,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<PartyManageEntity> GetPageList(Pagination pagination, string queryJson);
IEnumerable<PartyManageEntity> GetStatsList(Pagination pagination, string queryJson);
/// <summary>
/// 获取PartyManage表实体数据
/// </summary>


+ 48
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/PartyManage/PartyManageService.cs Просмотреть файл

@@ -78,6 +78,54 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}

public IEnumerable<PartyManageEntity> GetStatsList(Pagination pagination, string queryJson)
{
try
{
var baseDataName = this.BaseRepository().getDbConnection().Database;
var baseDataName1 = this.BaseRepository("CollegeMIS").getDbConnection().Database;

var strSql = new StringBuilder();
strSql.Append($" select zb.F_DepartmentId as Department, COALESCE (aa.num, 0) num ,COALESCE (bb.number, 0) number from (select* from {baseDataName}.dbo.LR_Base_Department where f_companyid ='06890807-2106-4e6d-9f99-484527503be9') zb ");
strSql.Append($" left join(select F_DepartmentId,count(*) as num from {baseDataName}.dbo.LR_Base_User group by F_DepartmentId ) aa on aa.F_DepartmentId =zb.F_DepartmentId");
strSql.Append($" left join (select Department,count(*) as number from {baseDataName1}.dbo.PartyManage where 1=1 ");
var queryParam = queryJson.ToJObject();
var dp = new DynamicParameters(new { });
if (!queryParam["CateId"].IsEmpty())
{
dp.Add("CateId", queryParam["CateId"].ToString(), DbType.String);
strSql.Append(" AND CateId = @CateId ");
}
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
{
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime);
strSql.Append(" AND ( Createtime >= @startTime AND Createtime <= @endTime ) ");
}
strSql.Append($" group by Department) bb on bb.Department= zb.F_DepartmentId ");
var data = this.BaseRepository("CollegeMIS").FindList<PartyManageEntity>(strSql.ToString(), dp, pagination);
if (data != null)
{
foreach (var item in data)
{
item.cha = item.Num - item.Number;
}
}
return data;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取PartyManage表实体数据
/// </summary>


Загрузка…
Отмена
Сохранить