Przeglądaj źródła

部门周工作计划

枝江中职分支
ndbs 4 tygodni temu
rodzic
commit
6da9471062
22 zmienionych plików z 2060 dodań i 1 usunięć
  1. +179
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DepartmentWeekController.cs
  2. +34
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DepartmentWeek/Form.cshtml
  3. +184
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DepartmentWeek/Form.js
  4. +34
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DepartmentWeek/FormLook.cshtml
  5. +164
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DepartmentWeek/FormLook.js
  6. +34
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DepartmentWeek/FormView.cshtml
  7. +184
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DepartmentWeek/FormView.js
  8. +42
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DepartmentWeek/Index.cshtml
  9. +246
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DepartmentWeek/Index.js
  10. +12
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  11. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config
  12. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/DepartmentWeekDetailMap.cs
  13. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/DepartmentWeekMap.cs
  14. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  15. +249
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DepartmentWeek/DepartmentWeekBLL.cs
  16. +87
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DepartmentWeek/DepartmentWeekEntity.cs
  17. +70
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DepartmentWeek/DepartmentWeekIBLL.cs
  18. +349
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DepartmentWeek/DepartmentWeekService.cs
  19. +92
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DepartmentWeekDetail/DepartmentWeekDetailEntity.cs
  20. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  21. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj
  22. +32
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/DepartmentWeekMethod.cs

+ 179
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DepartmentWeekController.cs Wyświetl plik

@@ -0,0 +1,179 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using Learun.Application.TwoDevelopment.LR_CodeDemo;
using System.Collections.Generic;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 数字化智慧校园
/// Copyright (c) 2013-2020 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2024-12-18 14:13
/// 描 述:DepartmentWeek
/// </summary>
public class DepartmentWeekController : MvcControllerBase
{
private DepartmentWeekIBLL departmentWeekIBLL = new DepartmentWeekBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
public ActionResult FormView()
{
return View();
}
public ActionResult FormLook()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = departmentWeekIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var DepartmentWeekData = departmentWeekIBLL.GetDepartmentWeekEntity(keyValue);
var Firset = departmentWeekIBLL.GetDetail(DepartmentWeekData.ID, "1");
var Second = departmentWeekIBLL.GetDetail(DepartmentWeekData.ID, "2");
var jsonData = new
{
DepartmentWeek = DepartmentWeekData,
Firset = Firset,
Second = Second,
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="processId">流程实例主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormDataByProcessId(string processId)
{
var DepartmentWeekData = departmentWeekIBLL.GetEntityByProcessId(processId);
var Firset = departmentWeekIBLL.GetDetail(DepartmentWeekData.ID, "1");
var Second = departmentWeekIBLL.GetDetail(DepartmentWeekData.ID, "2");
var jsonData = new
{
DepartmentWeek = DepartmentWeekData,
Firset = Firset,
Second = Second,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
departmentWeekIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity, string Firset, string Second)
{
DepartmentWeekEntity entity = strEntity.ToObject<DepartmentWeekEntity>();

List<DepartmentWeekDetailEntity> FirsetDetail = Firset.ToObject<List<DepartmentWeekDetailEntity>>();
List<DepartmentWeekDetailEntity> SecondDetail = Second.ToObject<List<DepartmentWeekDetailEntity>>();

departmentWeekIBLL.SaveEntity(keyValue, entity, FirsetDetail, SecondDetail);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}
/// <summary>
/// 推送
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult PushForm()
{
departmentWeekIBLL.PushEntity();
return Success("推送成功!");
}
/// <summary>
/// 推送
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult ChangeStatusById(string keyValue, int status, string processId)
{
departmentWeekIBLL.ChangeStatusById(keyValue, status, processId);
return Success("提交成功!");
}
#endregion

}
}

+ 34
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DepartmentWeek/Form.cshtml Wyświetl plik

@@ -0,0 +1,34 @@
@{
ViewBag.Title = "DepartmentWeek";
Layout = "~/Views/Shared/_Form.cshtml";
}
@*<link href="~/Content/camera/cropper.min.css" rel="stylesheet" />
<link href="~/Content/camera/ImgCropping.css" rel="stylesheet" />*@
<style>
.title {
margin-left: 40px;
}
</style>
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="DepartmentWeek">
<div class="lr-form-item-title">标题<font face="宋体">*</font></div>
<input id="Title" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="DepartmentWeek">
<div class="lr-form-item-title">填写人</div>
<input id="CreateUser" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>
<div class="col-xs-6 lr-form-item" data-table="DepartmentWeek">
<div class="lr-form-item-title">填写日期</div>
<input id="CreateTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" />
</div>
<div class="col-xs-12 title">一、常规工作安排</div>
<div class="col-xs-12 lr-form-item lr-form-item-grid">
<div id="Firset"></div>
</div>
<div class="col-xs-12 title">二、特色、创新(小微改革)工作安排</div>
<div class="col-xs-12 lr-form-item lr-form-item-grid">
<div id="Second"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/DepartmentWeek/Form.js")

+ 184
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DepartmentWeek/Form.js Wyświetl plik

@@ -0,0 +1,184 @@
/* * 版 本 Learun-ADMS V7.0.6 数字化智慧校园
* Copyright (c) 2013-2020 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2024-12-18 14:13
* 描 述:DepartmentWeek
*/
var acceptClick;
var keyValue = request('keyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
var bootstrap = function ($, learun) {
"use strict";
// 设置权限
setAuthorize = function (data) {
if (!!data) {
for (var field in data) {
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除
$('#' + data[field].fieldId).parent().remove();
}
else {
if (data[field].isEdit != 1) {
$('#' + data[field].fieldId).attr('disabled', 'disabled');
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) {
$('#' + data[field].fieldId).css({ 'padding-right': '58px' });
$('#' + data[field].fieldId).find('.btn-success').remove();
}
}
}
}
}
};
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#CreateUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
$('#CreateUser').val(learun.clientdata.get(['userinfo']).realName);
$('#CreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
$('#Firset').jfGrid({
headData: [
{
label: '主要工作', name: 'MainWork', width: 100, align: 'left'
, edit: {
type: 'input'
}
},
{
label: '完成时限', name: 'TimeLimitFinish', width: 100, align: 'left'
, edit: {
type: 'input'
}
},
{
label: '责任人及关联部门', name: 'PersonAndDepartment', width: 120, align: 'left'
, edit: {
type: 'input'
}
},
{
label: '对接专项任务', name: 'QuestSpecialProject', width: 100, align: 'left'
, edit: {
type: 'input'
}
},
{
label: '备注', name: 'Remark', width: 100, align: 'left'
, edit: {
type: 'input'
}
},
],
isEdit: true,
height: 200
});

$('#Second').jfGrid({
headData: [
{
label: '主要工作', name: 'MainWork', width: 100, align: 'left'
, edit: {
type: 'input'
}
},
{
label: '完成时限', name: 'TimeLimitFinish', width: 100, align: 'left'
, edit: {
type: 'input'
}
},
{
label: '责任人及关联部门', name: 'PersonAndDepartment', width: 120, align: 'left'
, edit: {
type: 'input'
}
},
{
label: '对接专项任务', name: 'QuestSpecialProject', width: 100, align: 'left'
, edit: {
type: 'input'
}
},
{
label: '备注', name: 'Remark', width: 100, align: 'left'
, edit: {
type: 'input'
}
},
],
isEdit: true,
height: 200
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/DepartmentWeek/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]);
}
}
});
}
}
};
// 设置表单数据
setFormData = function (processId, param, callback) {
if (!!processId) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/DepartmentWeek/GetFormDataByProcessId?processId=' + processId, function (data) {
for (var id in data) {
if (!!data[id] && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
if (id == 'DepartmentWeek' && data[id]) {
keyValue = data[id].ID;
}
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
callback && callback();
}
// 验证数据是否填写完整
validForm = function () {
if (!$('body').lrValidform()) {
return false;
}
return true;
};
// 保存数据
save = function (processId, callBack, i) {
var formData = $('body').lrGetFormData();
if (!!processId) {
formData.ProcessId = processId;
}
//var postData = {
// strEntity: JSON.stringify(formData)
//};
var postData = {};
postData.strEntity = JSON.stringify($('[data-table="DepartmentWeek"]').lrGetFormData());
postData.Firset = JSON.stringify($('#Firset').jfGridGet('rowdatas'));
postData.Second = JSON.stringify($('#Second').jfGridGet('rowdatas'));
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/DepartmentWeek/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack(res, i);
}
});
};
page.init();
}

+ 34
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DepartmentWeek/FormLook.cshtml Wyświetl plik

@@ -0,0 +1,34 @@
@{
ViewBag.Title = "DepartmentWeek";
Layout = "~/Views/Shared/_Form.cshtml";
}
@*<link href="~/Content/camera/cropper.min.css" rel="stylesheet" />
<link href="~/Content/camera/ImgCropping.css" rel="stylesheet" />*@
<style>
.title {
margin-left: 40px;
}
</style>
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="DepartmentWeek">
<div class="lr-form-item-title">标题<font face="宋体">*</font></div>
<input id="Title" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly/>
</div>
<div class="col-xs-6 lr-form-item" data-table="DepartmentWeek">
<div class="lr-form-item-title">填写人</div>
<input id="CreateUser" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>
<div class="col-xs-6 lr-form-item" data-table="DepartmentWeek">
<div class="lr-form-item-title">填写日期</div>
<input id="CreateTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" />
</div>
<div class="col-xs-12 title">一、常规工作安排</div>
<div class="col-xs-12 lr-form-item lr-form-item-grid">
<div id="Firset" readonly></div>
</div>
<div class="col-xs-12 title">二、特色、创新(小微改革)工作安排</div>
<div class="col-xs-12 lr-form-item lr-form-item-grid">
<div id="Second" readonly></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/DepartmentWeek/FormLook.js")

+ 164
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DepartmentWeek/FormLook.js Wyświetl plik

@@ -0,0 +1,164 @@
/* * 版 本 Learun-ADMS V7.0.6 数字化智慧校园
* Copyright (c) 2013-2020 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2024-12-18 14:13
* 描 述:DepartmentWeek
*/
var acceptClick;
var keyValue = request('keyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
var bootstrap = function ($, learun) {
"use strict";
// 设置权限
setAuthorize = function (data) {
if (!!data) {
for (var field in data) {
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除
$('#' + data[field].fieldId).parent().remove();
}
else {
if (data[field].isEdit != 1) {
$('#' + data[field].fieldId).attr('disabled', 'disabled');
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) {
$('#' + data[field].fieldId).css({ 'padding-right': '58px' });
$('#' + data[field].fieldId).find('.btn-success').remove();
}
}
}
}
}
};
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#CreateUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
$('#CreateUser').val(learun.clientdata.get(['userinfo']).realName);
$('#CreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
$('#Firset').jfGrid({
headData: [
{
label: '主要工作', name: 'MainWork', width: 100, align: 'left'
,
},
{
label: '完成时限', name: 'TimeLimitFinish', width: 100, align: 'left'
},
{
label: '责任人及关联部门', name: 'PersonAndDepartment', width: 120, align: 'left'
},
{
label: '对接专项任务', name: 'QuestSpecialProject', width: 100, align: 'left'
},
{
label: '备注', name: 'Remark', width: 100, align: 'left'
},
],
isEdit: false,
height: 200
});

$('#Second').jfGrid({
headData: [
{
label: '主要工作', name: 'MainWork', width: 100, align: 'left'
},
{
label: '完成时限', name: 'TimeLimitFinish', width: 100, align: 'left'
},
{
label: '责任人及关联部门', name: 'PersonAndDepartment', width: 120, align: 'left'
},
{
label: '对接专项任务', name: 'QuestSpecialProject', width: 100, align: 'left'
},
{
label: '备注', name: 'Remark', width: 100, align: 'left'
},
],
isEdit: false,
height: 200
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/DepartmentWeek/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]);
}
}
});
}
}
};
// 设置表单数据
setFormData = function (processId, param, callback) {
if (!!processId) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/DepartmentWeek/GetFormDataByProcessId?processId=' + processId, function (data) {
for (var id in data) {
if (!!data[id] && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
if (id == 'DepartmentWeek' && data[id]) {
keyValue = data[id].ID;
}
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
callback && callback();
}
// 验证数据是否填写完整
validForm = function () {
if (!$('body').lrValidform()) {
return false;
}
return true;
};
// 保存数据
save = function (processId, callBack, i) {
var formData = $('body').lrGetFormData();
if (!!processId) {
formData.ProcessId = processId;
}
//var postData = {
// strEntity: JSON.stringify(formData)
//};
var postData = {};
postData.strEntity = JSON.stringify($('[data-table="DepartmentWeek"]').lrGetFormData());
postData.Firset = JSON.stringify($('#Firset').jfGridGet('rowdatas'));
postData.Second = JSON.stringify($('#Second').jfGridGet('rowdatas'));
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/DepartmentWeek/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack(res, i);
}
});
};
page.init();
}

+ 34
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DepartmentWeek/FormView.cshtml Wyświetl plik

@@ -0,0 +1,34 @@
@{
ViewBag.Title = "DepartmentWeek";
Layout = "~/Views/Shared/_Form.cshtml";
}
@*<link href="~/Content/camera/cropper.min.css" rel="stylesheet" />
<link href="~/Content/camera/ImgCropping.css" rel="stylesheet" />*@
<style>
.title {
margin-left: 40px;
}
</style>
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="DepartmentWeek">
<div class="lr-form-item-title">标题<font face="宋体">*</font></div>
<input id="Title" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="DepartmentWeek">
<div class="lr-form-item-title">填写人</div>
<input id="CreateUser" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>
<div class="col-xs-6 lr-form-item" data-table="DepartmentWeek">
<div class="lr-form-item-title">填写日期</div>
<input id="CreateTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" />
</div>
<div class="col-xs-12 title">一、常规工作安排</div>
<div class="col-xs-12 lr-form-item lr-form-item-grid">
<div id="Firset"></div>
</div>
<div class="col-xs-12 title">二、特色、创新(小微改革)工作安排</div>
<div class="col-xs-12 lr-form-item lr-form-item-grid">
<div id="Second"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/DepartmentWeek/FormView.js")

+ 184
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DepartmentWeek/FormView.js Wyświetl plik

@@ -0,0 +1,184 @@
/* * 版 本 Learun-ADMS V7.0.6 数字化智慧校园
* Copyright (c) 2013-2020 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2024-12-18 14:13
* 描 述:DepartmentWeek
*/
var acceptClick;
var keyValue = request('keyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
var bootstrap = function ($, learun) {
"use strict";
// 设置权限
setAuthorize = function (data) {
if (!!data) {
for (var field in data) {
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除
$('#' + data[field].fieldId).parent().remove();
}
else {
if (data[field].isEdit != 1) {
$('#' + data[field].fieldId).attr('disabled', 'disabled');
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) {
$('#' + data[field].fieldId).css({ 'padding-right': '58px' });
$('#' + data[field].fieldId).find('.btn-success').remove();
}
}
}
}
}
};
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#CreateUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
$('#CreateUser').val(learun.clientdata.get(['userinfo']).realName);
$('#CreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
$('#Firset').jfGrid({
headData: [
{
label: '主要工作', name: 'MainWork', width: 100, align: 'left'
, edit: {
type: 'input'
}
},
{
label: '完成时限', name: 'TimeLimitFinish', width: 100, align: 'left'
, edit: {
type: 'input'
}
},
{
label: '责任人及关联部门', name: 'PersonAndDepartment', width: 120, align: 'left'
, edit: {
type: 'input'
}
},
{
label: '对接专项任务', name: 'QuestSpecialProject', width: 100, align: 'left'
, edit: {
type: 'input'
}
},
{
label: '备注', name: 'Remark', width: 100, align: 'left'
, edit: {
type: 'input'
}
},
],
isEdit: true,
height: 200
});

$('#Second').jfGrid({
headData: [
{
label: '主要工作', name: 'MainWork', width: 100, align: 'left'
, edit: {
type: 'input'
}
},
{
label: '完成时限', name: 'TimeLimitFinish', width: 100, align: 'left'
, edit: {
type: 'input'
}
},
{
label: '责任人及关联部门', name: 'PersonAndDepartment', width: 120, align: 'left'
, edit: {
type: 'input'
}
},
{
label: '对接专项任务', name: 'QuestSpecialProject', width: 100, align: 'left'
, edit: {
type: 'input'
}
},
{
label: '备注', name: 'Remark', width: 100, align: 'left'
, edit: {
type: 'input'
}
},
],
isEdit: true,
height: 200
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/DepartmentWeek/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]);
}
}
});
}
}
};
// 设置表单数据
setFormData = function (processId, param, callback) {
if (!!processId) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/DepartmentWeek/GetFormDataByProcessId?processId=' + processId, function (data) {
for (var id in data) {
if (!!data[id] && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
if (id == 'DepartmentWeek' && data[id]) {
keyValue = data[id].ID;
}
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
callback && callback();
}
// 验证数据是否填写完整
validForm = function () {
if (!$('body').lrValidform()) {
return false;
}
return true;
};
// 保存数据
save = function (processId, callBack, i) {
var formData = $('body').lrGetFormData();
if (!!processId) {
formData.ProcessId = processId;
}
//var postData = {
// strEntity: JSON.stringify(formData)
//};
var postData = {};
postData.strEntity = JSON.stringify($('[data-table="DepartmentWeek"]').lrGetFormData());
postData.Firset = JSON.stringify($('#Firset').jfGridGet('rowdatas'));
postData.Second = JSON.stringify($('#Second').jfGridGet('rowdatas'));
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/DepartmentWeek/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack(res, i);
}
});
};
page.init();
}

+ 42
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DepartmentWeek/Index.cshtml Wyświetl plik

@@ -0,0 +1,42 @@
@{
ViewBag.Title = "DepartmentWeek";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<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">
<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>
<div id="CreateUser"></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 class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;查看</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 提交</a>
<a id="lr_push" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 一键推送</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/DepartmentWeek/Index.js")

+ 246
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/DepartmentWeek/Index.js Wyświetl plik

@@ -0,0 +1,246 @@
/* * 版 本 Learun-ADMS V7.0.6 数字化智慧校园
* Copyright (c) 2013-2020 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2024-12-18 14:13
* 描 述:DepartmentWeek
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var processId = '';
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#CreateUser').lrUserSelect(0);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/DepartmentWeek/Form',
width: 1000,
height: 650,
callBack: function (id) {
var res = false;
// 验证数据
res = top[id].validForm();
// 保存数据
if (res) {
processId = learun.newGuid();
res = top[id].save(processId, refreshGirdData);
page.search();
}
page.search();
return res;
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status !== 0) {
learun.alert.warning("当前项目已提交,不可编辑!");
return;
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/DepartmentWeek/Form?keyValue=' + keyValue,
width: 1000,
height: 650,
callBack: function (id) {
var res = false;
// 验证数据
res = top[id].validForm();
// 保存数据
if (res) {
res = top[id].save('', function () {
page.search();
});
}
return res;
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status !== 0) {
learun.alert.warning("当前项目已提交,不可删除!");
return;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/DepartmentWeek/DeleteForm', { keyValue: keyValue }, function () {
page.search();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
//  提交
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status !== 0) {
learun.alert.warning("当前项目已提交,请耐心等待审批!");
return;
}
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
processId = learun.newGuid();
learun.postForm(top.$.rootUrl + '/EducationalAdministration/DepartmentWeek/ChangeStatusById', { keyValue: keyValue, status: 1, processId: processId }, function (res) {
// 发起流程
var postData = {
schemeCode: 'DepartmentWeek',// 填写流程对应模板编号
processId: processId,
level: '1',
};
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
learun.loading(false);
});
page.search();
});
}
});
}
});
//  推送
$('#lr_push').on('click', function () {
//var keyValue = $('#gridtable').jfGridValue('ID');
//if (learun.checkrow(keyValue)) {
// var Status = $('#gridtable').jfGridValue('Status');
// if (Status !== 2) {
// learun.alert.warning("当前项目不可推送!");
// return;
// }
// learun.postForm(top.$.rootUrl + '/EducationalAdministration/DepartmentWeek/PushForm', {}, function () {
// page.search();
// });
//}

//if (learun.checkrow(keyValue)) {
//var Status = $('#gridtable').jfGridValue('Status');
//if (Status !== 2) {
// learun.alert.warning("当前项目不可推送!");
// return;
//}
learun.layerConfirm('是否确认一键推送所有已审核项!', function (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/DepartmentWeek/PushForm', {}, function () {
page.search();
});
});
//}

});
//查看
$('#lr_view').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
if (keyValue.indexOf(',') != -1) {
learun.alert.warning("只能选择一条记录进行查看!");
return;
}
learun.layerForm({
id: 'form',
title: '查看',
url: top.$.rootUrl + '/EducationalAdministration/DepartmentWeek/FormView?keyValue=' + keyValue,
width: 1000,
height: 650,
btn: null
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/DepartmentWeek/GetPageList',
headData: [
{ label: "标题", name: "Title", width: 100, align: "left" },
{
label: "状态", name: "Status", width: 100, align: "left",
formatter: function (cellvalue) {
if (cellvalue == 0) {
return "<span class=\"label label-default\">草稿</span>";
} else if (cellvalue == 1) {
return "<span class=\"label label-warning\">审批中</span>";
} else if (cellvalue == 2) {
return "<span class=\"label label-success\">审批通过</span>";
} else if (cellvalue == 3) {
return "<span class=\"label label-primary\">推送</span>";
} else {
return "<span class=\"label label-danger\">作废</span>";
}
}
},
{
label: "填写人", name: "CreateUser", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('user', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}
},
{
label: "填写日期", name: "CreateTime", width: 100, align: "left",
formatter: function (cellvalue) {
return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss');
}
},
],
mainId: 'ID',
isPage: true,
sidx: "CreateTime"
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function (res, postData) {
refreshGirdData = function () {
page.search();
};
//if (!!res) {
// if (res.code == 200 && processId != null) {
// // 发起流程
// var postData = {
// schemeCode: 'DepartmentWeek',// 填写流程对应模板编号
// processId: processId,
// level: '1',
// };
// learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
// learun.loading(false);
// });
// page.search();
// }
//}
};
page.init();
}

+ 12
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Wyświetl plik

@@ -922,6 +922,7 @@
<Compile Include="Areas\EducationalAdministration\Controllers\CompetitionGroupManagerController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\CompetitionInfoManagerController.cs" />
<Compile Include="Areas\PersonnelManagement\Controllers\ResearchResultController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\DepartmentWeekController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -1094,6 +1095,8 @@
<Content Include="Areas\EducationalAdministration\Views\ClassPlan\IndexSchool.js" />
<Content Include="Areas\EducationalAdministration\Views\CompetitionGroupManager\FormScore.js" />
<Content Include="Areas\EducationalAdministration\Views\CompetitionManager\Ranking.js" />
<Content Include="Areas\EducationalAdministration\Views\DepartmentWeek\FormLook.js" />
<Content Include="Areas\EducationalAdministration\Views\DepartmentWeek\FormView.js" />
<Content Include="Areas\EducationalAdministration\Views\FixedAssets\qrCode.js" />
<Content Include="Areas\EducationalAdministration\Views\OfficeEquipment\IndexMy.js" />
<Content Include="Areas\EducationalAdministration\Views\OfficeEquipment\qrCode.js" />
@@ -1136,6 +1139,8 @@
<Content Include="Areas\EducationalAdministration\Views\BookPayDetail\FormClass.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\CompetitionGroupManager\FormScore.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\CompetitionManager\Ranking.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\DepartmentWeek\FormView.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\DepartmentWeek\FormLook.cshtml" />
<None Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\SeatForm.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormExamTime.js" />
@@ -7242,6 +7247,10 @@
<Content Include="Areas\PersonnelManagement\Views\ResearchResult\Index.js" />
<Content Include="Areas\PersonnelManagement\Views\ResearchResult\Form.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\ResearchResult\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\DepartmentWeek\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\DepartmentWeek\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\DepartmentWeek\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\DepartmentWeek\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" />
@@ -7263,7 +7272,9 @@
<Content Include="XmlConfig\database.config">
<SubType>Designer</SubType>
</Content>
<Content Include="XmlConfig\ioc.config" />
<Content Include="XmlConfig\ioc.config">
<SubType>Designer</SubType>
</Content>
<Content Include="XmlConfig\log4net.config" />
<Content Include="XmlConfig\system.config">
<SubType>Designer</SubType>


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config Wyświetl plik

@@ -39,6 +39,7 @@
<typeAlias alias="StudentCompetitionMethod" type="Learun.Application.WorkFlow.StudentCompetitionMethod,Learun.Application.WorkFlow" />
<typeAlias alias="StudentArticlePublicMethod" type="Learun.Application.WorkFlow.StudentArticlePublicMethod,Learun.Application.WorkFlow" />
<typeAlias alias="HelpChangeMethod" type="Learun.Application.WorkFlow.StudentArticlePublicMethod,Learun.Application.WorkFlow" />
<typeAlias alias="DepartmentWeekMethod" type="Learun.Application.WorkFlow.DepartmentWeekMethod,Learun.Application.WorkFlow" />

<!--任务调度器-->
<typeAlias alias="ITSMethod" type="Learun.Application.Extention.TaskScheduling.ITsMethod,Learun.Application.Extention" />
@@ -88,6 +89,7 @@
<type type="IWorkFlowMethod" mapTo="StudentCompetitionMethod" name="StudentCompetitionMethod"></type>
<type type="IWorkFlowMethod" mapTo="StudentArticlePublicMethod" name="StudentArticlePublicMethod"></type>
<type type="IWorkFlowMethod" mapTo="HelpChangeMethod" name="HelpChangeMethod"></type>
<type type="IWorkFlowMethod" mapTo="DepartmentWeekMethod" name="DepartmentWeekMethod"></type>

</container>



+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/DepartmentWeekDetailMap.cs Wyświetl plik

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 数字化智慧校园
/// Copyright (c) 2013-2020 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2024-12-18 15:37
/// 描 述:DepartmentWeekDetail
/// </summary>
public class DepartmentWeekDetailMap : EntityTypeConfiguration<DepartmentWeekDetailEntity>
{
public DepartmentWeekDetailMap()
{
#region 表、主键
//表
this.ToTable("DEPARTMENTWEEKDETAIL");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/DepartmentWeekMap.cs Wyświetl plik

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 数字化智慧校园
/// Copyright (c) 2013-2020 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2024-12-18 14:13
/// 描 述:DepartmentWeek
/// </summary>
public class DepartmentWeekMap : EntityTypeConfiguration<DepartmentWeekEntity>
{
public DepartmentWeekMap()
{
#region 表、主键
//表
this.ToTable("DEPARTMENTWEEK");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj Wyświetl plik

@@ -683,6 +683,8 @@
<Compile Include="EducationalAdministration\CompetitionInfoMap.cs" />
<Compile Include="PersonnelManagement\TeacherDevelopMap.cs" />
<Compile Include="PersonnelManagement\ResearchResultMap.cs" />
<Compile Include="EducationalAdministration\DepartmentWeekMap.cs" />
<Compile Include="EducationalAdministration\DepartmentWeekDetailMap.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 249
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DepartmentWeek/DepartmentWeekBLL.cs Wyświetl plik

@@ -0,0 +1,249 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 数字化智慧校园
/// Copyright (c) 2013-2020 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2024-12-18 14:13
/// 描 述:DepartmentWeek
/// </summary>
public class DepartmentWeekBLL : DepartmentWeekIBLL
{
private DepartmentWeekService departmentWeekService = new DepartmentWeekService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<DepartmentWeekEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return departmentWeekService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取DepartmentWeek表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public DepartmentWeekEntity GetDepartmentWeekEntity(string keyValue)
{
try
{
return departmentWeekService.GetDepartmentWeekEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 获取DepartmentWeek表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public IEnumerable<DepartmentWeekDetailEntity> GetDetail(string keyValue, string types)
{
try
{
return departmentWeekService.GetDetail(keyValue, types);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
public DepartmentWeekEntity GetEntityByProcessId(string processId)
{
try
{
return departmentWeekService.GetEntityByProcessId(processId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
departmentWeekService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, DepartmentWeekEntity entity)
{
try
{
departmentWeekService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, DepartmentWeekEntity entity, List<DepartmentWeekDetailEntity> Firset, List<DepartmentWeekDetailEntity> Second)
{
try
{
departmentWeekService.SaveEntity(keyValue, entity, Firset, Second);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public void ChangeStatusById(string keyValue, int status, string processId)
{
try
{
departmentWeekService.ChangeStatusById(keyValue, status, processId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}


public void ChangeStatusByProcessId(int status, string processId)
{
try
{
departmentWeekService.ChangeStatusByProcessId(status, processId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public void PushEntity()
{
try
{
departmentWeekService.PushEntity();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}
}

+ 87
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DepartmentWeek/DepartmentWeekEntity.cs Wyświetl plik

@@ -0,0 +1,87 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 数字化智慧校园
/// Copyright (c) 2013-2020 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2024-12-18 14:13
/// 描 述:DepartmentWeek
/// </summary>
public class DepartmentWeekEntity
{
#region 实体成员
/// <summary>
/// ID
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// Title
/// </summary>
[Column("TITLE")]
public string Title { get; set; }
/// <summary>
/// Firset
/// </summary>
[Column("FIRSET")]
public string Firset { get; set; }
/// <summary>
/// Second
/// </summary>
[Column("SECOND")]
public string Second { get; set; }
/// <summary>
/// Remark
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
/// CreateTime
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// CreateUser
/// </summary>
[Column("CREATEUSER")]
public string CreateUser { get; set; }
/// <summary>
/// ProcessId
/// </summary>
[Column("PROCESSID")]
public string ProcessId { get; set; }
/// <summary>
/// STATUS
/// </summary>
[Column("STATUS")]
public int? Status { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.ID = Guid.NewGuid().ToString();
this.Status = 0;
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.ID = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}



+ 70
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DepartmentWeek/DepartmentWeekIBLL.cs Wyświetl plik

@@ -0,0 +1,70 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 数字化智慧校园
/// Copyright (c) 2013-2020 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2024-12-18 14:13
/// 描 述:DepartmentWeek
/// </summary>
public interface DepartmentWeekIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<DepartmentWeekEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取DepartmentWeek表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
DepartmentWeekEntity GetDepartmentWeekEntity(string keyValue);
IEnumerable<DepartmentWeekDetailEntity> GetDetail(string keyValue, string types);

/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
DepartmentWeekEntity GetEntityByProcessId(string processId);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, DepartmentWeekEntity entity);


void SaveEntity(string keyValue, DepartmentWeekEntity entity, List<DepartmentWeekDetailEntity> First, List<DepartmentWeekDetailEntity> Second);
/// <summary>
/// 推送
/// </summary>
/// <param name="keyValue"></param>
void PushEntity();
/// <summary>
/// 提交
/// </summary>
void ChangeStatusById(string keyValue, int status, string processId);
void ChangeStatusByProcessId(int status, string processId);
#endregion

}
}

+ 349
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DepartmentWeek/DepartmentWeekService.cs Wyświetl plik

@@ -0,0 +1,349 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 数字化智慧校园
/// Copyright (c) 2013-2020 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2024-12-18 14:13
/// 描 述:DepartmentWeek
/// </summary>
public class DepartmentWeekService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<DepartmentWeekEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@" t.* ");
strSql.Append(" FROM DepartmentWeek t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["CreateUser"].IsEmpty())
{
dp.Add("CreateUser", queryParam["CreateUser"].ToString(), DbType.String);
strSql.Append(" AND t.CreateUser = @CreateUser ");
}
return this.BaseRepository().FindList<DepartmentWeekEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取DepartmentWeek表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public DepartmentWeekEntity GetDepartmentWeekEntity(string keyValue)
{
try
{
return this.BaseRepository().FindEntity<DepartmentWeekEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取StuInfoFreshEmergePeople表数据
/// <summary>
/// <returns></returns>
public IEnumerable<DepartmentWeekDetailEntity> GetDetail(string keyValue, string Types)
{
try
{
return this.BaseRepository().FindList<DepartmentWeekDetailEntity>(t => t.DWeekID == keyValue && t.Types == Types);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
public DepartmentWeekEntity GetEntityByProcessId(string processId)
{
try
{
return this.BaseRepository().FindEntity<DepartmentWeekEntity>(t => t.ProcessId == processId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
var db = this.BaseRepository().BeginTrans();
try
{
var id = keyValue.Split(',');
foreach (var item in id)
{
db.Delete<DepartmentWeekEntity>(t => t.ID == item);
db.Delete<DepartmentWeekDetailEntity>(t => t.DWeekID == item);
db.Commit();
}
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, DepartmentWeekEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository().Update(entity);
}
else
{
entity.Create();
this.BaseRepository().Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
public void SaveEntity(string keyValue, DepartmentWeekEntity entity, List<DepartmentWeekDetailEntity> First, List<DepartmentWeekDetailEntity> Second)
{
var db = this.BaseRepository().BeginTrans();
try
{
if (!string.IsNullOrEmpty(keyValue))
{
var up = GetDepartmentWeekEntity(keyValue);
entity.Modify(keyValue);
db.Update(entity);
db.Delete<DepartmentWeekDetailEntity>(t => t.DWeekID == up.ID);
if (null != First && null != Second)
{
foreach (DepartmentWeekDetailEntity item in First)
{
item.Create();
item.DWeekID = up.ID;
item.Types = "1";
item.CreateTime = DateTime.Now;
db.Insert<DepartmentWeekDetailEntity>(item);
}
db.Delete<DepartmentWeekDetailEntity>(t => t.DWeekID == up.ID);
foreach (DepartmentWeekDetailEntity item in Second)
{
item.Create();
item.DWeekID = up.ID;
item.Types = "2";
item.CreateTime = DateTime.Now;
db.Insert<DepartmentWeekDetailEntity>(item);
}
}
}
else
{
entity.Create();
db.Insert(entity);
if (null != First && null != Second)
{
foreach (DepartmentWeekDetailEntity item in First)
{
item.Create();
item.DWeekID = entity.ID;
item.Types = "1";
item.CreateTime = DateTime.Now;
db.Insert<DepartmentWeekDetailEntity>(item);
}

foreach (DepartmentWeekDetailEntity item in Second)
{
item.Create();
item.DWeekID = entity.ID;
item.Types = "2";
item.CreateTime = DateTime.Now;
db.Insert<DepartmentWeekDetailEntity>(item);
}
}
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 推送
/// </summary>
/// <param name="keyValue"></param>
public void PushEntity()
{
var db = this.BaseRepository().BeginTrans();
try
{
//var id = keyValue.Split(',');
//foreach (var item in id)
//{
// db.ExecuteBySql("update DepartmentWeek set Status='3' where ID = '" + item + "'");
//}
db.ExecuteBySql("update DepartmentWeek set Status='3' where Status = '2' ");
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
///
/// </summary>
/// <param name="processId"></param>
/// <param name="status"></param>
public void ChangeStatusByProcessId(int status, string processId)
{
try
{
this.BaseRepository().ExecuteBySql($"update DepartmentWeek set Status='{status}' where processId='{processId}'");
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 提交
/// </summary>
/// <param name="keyValue"></param>
/// <param name="status"></param>
/// <param name="processId"></param>
public void ChangeStatusById(string keyValue, int status, string processId)
{
try
{
this.BaseRepository().ExecuteBySql($"update DepartmentWeek set Status='{status}',processId='{processId}' where ID='{keyValue}'");
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion
}
}

+ 92
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DepartmentWeekDetail/DepartmentWeekDetailEntity.cs Wyświetl plik

@@ -0,0 +1,92 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;
namespace Learun.Application.TwoDevelopment.EducationalAdministration

{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 数字化智慧校园
/// Copyright (c) 2013-2020 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2024-12-18 15:37
/// 描 述:DepartmentWeekDetail
/// </summary>
public class DepartmentWeekDetailEntity
{
#region 实体成员
/// <summary>
/// ID
/// </summary>
/// <returns></returns>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// DWeekID
/// </summary>
/// <returns></returns>
[Column("DWEEKID")]
public string DWeekID { get; set; }
/// <summary>
/// Types
/// </summary>
/// <returns></returns>
[Column("TYPES")]
public string Types { get; set; }
/// <summary>
/// MainWork
/// </summary>
/// <returns></returns>
[Column("MAINWORK")]
public string MainWork { get; set; }
/// <summary>
/// 完成时限
/// </summary>
/// <returns></returns>
[Column("TIMELIMITFINISH")]
public string TimeLimitFinish { get; set; }
/// <summary>
/// PersonAndDepartment
/// </summary>
/// <returns></returns>
[Column("PERSONANDDEPARTMENT")]
public string PersonAndDepartment { get; set; }
/// <summary>
/// QuestSpecialProject
/// </summary>
/// <returns></returns>
[Column("QUESTSPECIALPROJECT")]
public string QuestSpecialProject { get; set; }
/// <summary>
/// Remark
/// </summary>
/// <returns></returns>
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
/// CreateTime
/// </summary>
/// <returns></returns>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.ID = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.ID = keyValue;
}
#endregion
}
}


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Wyświetl plik

@@ -172,6 +172,7 @@
<Compile Include="EducationalAdministration\ClassPlan\ClassPlanBLL.cs" />
<Compile Include="EducationalAdministration\ClassPlan\ClassPlanIBLL.cs" />
<Compile Include="EducationalAdministration\ClassPlan\ClassPlanService.cs" />
<Compile Include="EducationalAdministration\DepartmentWeekDetail\DepartmentWeekDetailEntity.cs" />
<Compile Include="EducationalAdministration\StuArriveSchool\StuArriveSchoolBLL.cs" />
<Compile Include="EducationalAdministration\StuArriveSchool\StuArriveSchoolEntity.cs" />
<Compile Include="EducationalAdministration\StuArriveSchool\StuArriveSchoolIBLL.cs" />
@@ -2152,6 +2153,10 @@
<Compile Include="PersonnelManagement\ResearchResult\ResearchResultService.cs" />
<Compile Include="PersonnelManagement\ResearchResult\ResearchResultBLL.cs" />
<Compile Include="PersonnelManagement\ResearchResult\ResearchResultIBLL.cs" />
<Compile Include="EducationalAdministration\DepartmentWeek\DepartmentWeekEntity.cs" />
<Compile Include="EducationalAdministration\DepartmentWeek\DepartmentWeekService.cs" />
<Compile Include="EducationalAdministration\DepartmentWeek\DepartmentWeekBLL.cs" />
<Compile Include="EducationalAdministration\DepartmentWeek\DepartmentWeekIBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj Wyświetl plik

@@ -98,6 +98,7 @@
<Compile Include="NodeMethod\ADR_AddApplyMethod.cs" />
<Compile Include="NodeMethod\Ass_AcceptanceMethod.cs" />
<Compile Include="NodeMethod\FundsApplyMethod.cs" />
<Compile Include="NodeMethod\DepartmentWeekMethod.cs" />
<Compile Include="NodeMethod\StudentArticlePublicMethod.cs" />
<Compile Include="NodeMethod\StudentCompetitionMethod.cs" />
<Compile Include="NodeMethod\StudentHonorMethod.cs" />


+ 32
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/DepartmentWeekMethod.cs Wyświetl plik

@@ -0,0 +1,32 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using Learun.Application.TwoDevelopment.PersonnelManagement;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Learun.Application.WorkFlow
{
public class DepartmentWeekMethod : IWorkFlowMethod
{
DepartmentWeekIBLL departmentWeekIBLL = new DepartmentWeekBLL();


public void Execute(WfMethodParameter parameter)
{
if (parameter.code == "agree")
{
departmentWeekIBLL.ChangeStatusByProcessId(2, parameter.processId);
}
else
{
if (parameter.code == "2")
{
departmentWeekIBLL.ChangeStatusByProcessId(-1, parameter.processId);
}
departmentWeekIBLL.ChangeStatusByProcessId(0, parameter.processId);
}
}
}
}

Ładowanie…
Anuluj
Zapisz