From 453216c6e083f82b6f9ba11ff326bbfcd7be9173 Mon Sep 17 00:00:00 2001
From: dyy <807692433@qq.com>
Date: Fri, 15 Jul 2022 10:49:59 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E6=B5=81?=
=?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1=EF=BC=9A=E5=AE=A1=E6=89=B9=E8=8A=82?=
=?UTF-8?q?=E7=82=B9=E5=A2=9E=E5=8A=A0=E2=80=9C=E6=B7=BB=E5=8A=A0=E7=8F=AD?=
=?UTF-8?q?=E4=B8=BB=E4=BB=BB/=E8=BE=85=E5=AF=BC=E5=91=98=E2=80=9D?=
=?UTF-8?q?=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Views/NWFScheme/NodeForm.cshtml | 1 +
.../Views/NWFScheme/NodeForm.js | 16 +++++++
.../Process/NWFProcessBLL.cs | 48 +++++++++++++++++++
3 files changed, 65 insertions(+)
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.cshtml
index beebc1a61..135173b3e 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.cshtml
@@ -200,6 +200,7 @@
添加表字段
添加分管校长
添加部门负责人
+ 添加班主任/辅导员
移除
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.js
index e00356909..9aa16f454 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.js
@@ -188,6 +188,9 @@ var bootstrap = function ($, learun) {
case '8':
return '部门负责人';
break;
+ case '9':
+ return '班主任/辅导员';
+ break;
}
}
},
@@ -366,6 +369,19 @@ var bootstrap = function ($, learun) {
}
});
});
+ //添加班主任/辅导员
+ $('#lr_form_diredctor').on('click', function () {
+ learun.layerConfirm('是否确认增加班主任/辅导员?', function (res) {
+ if (res) {
+ var data = { auditorId: 'bzrfdyid', type: '9', auditorName: '班主任/辅导员' };
+ if (!isRepeat(data.auditorId)) {
+ data.id = learun.newGuid();
+ auditors.push(data);
+ $('#auditor_girdtable').jfGridSet('refreshdata', auditors);
+ }
+ }
+ });
+ });
/*表单添加*/
$('#workform_girdtable').jfGrid({
headData: [
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs
index ebc067979..7afb775dc 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs
@@ -12,6 +12,7 @@ using Learun.Application.TwoDevelopment.LogisticsManagement;
using Learun.Application.TwoDevelopment.LR_LGManager;
using Newtonsoft.Json;
using System.Linq;
+using Learun.Application.TwoDevelopment.EducationalAdministration;
namespace Learun.Application.WorkFlow
{
@@ -45,6 +46,8 @@ namespace Learun.Application.WorkFlow
private DepartmentIBLL departmentIBLL = new DepartmentBLL();
private ImgIBLL imgIBLL = new ImgBLL();
+ private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL();
+ private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL();
#region 获取数据
///
@@ -635,6 +638,7 @@ namespace Learun.Application.WorkFlow
{
switch (item.type)//1.岗位2.角色3.用户4.上下级5.表单指定字段6.某一个节点执行人
//liang 20200813 新增type=7 分管校长
+ //dyy 20220715 新增type=9 班主任/辅导员
{
case 1:// 岗位
var userRelationList = userRelationIBLL.GetUserIdList(item.auditorId);
@@ -938,6 +942,50 @@ namespace Learun.Application.WorkFlow
}
break;
+ case 9://dyy 20220715新增班主任/辅导员判断
+ //获取流程创建用户的班主任/辅导员
+ //判断用户所在班级是否有班主任/辅导员:如果有,找到班主任/辅导员;如果没有,不发;
+ string diredctorId = "";//班主任
+ string tutorId = "";//辅导员
+ var stuInfoBasicEntity = stuInfoBasicIBLL.GetStuNoByAccount(paramConfig.CurrentUser.Account);
+ if (stuInfoBasicEntity != null)
+ {
+ var classInfoEntity = classInfoIBLL.GetClassInfoEntityByClassNo(stuInfoBasicEntity.ClassNo);
+ if (classInfoEntity != null)
+ {
+ var directorEntity = userIBLL.GetEntityByAccount(classInfoEntity.ClassDiredctorNo);
+ if (directorEntity != null)
+ {
+ diredctorId = directorEntity.F_UserId;
+ //找到班主任就增加审批人
+ if (!list.Exists(m => m.Id == directorEntity.F_UserId))
+ {
+ list.Add(new NWFUserInfo()
+ {
+ Id = directorEntity.F_UserId,
+ Account = directorEntity.F_Account,
+ Name = directorEntity.F_RealName
+ });
+ }
+ }
+ var tutorEntity = userIBLL.GetEntityByAccount(classInfoEntity.ClassTutorNo);
+ if (tutorEntity != null)
+ {
+ tutorId = tutorEntity.F_UserId;
+ //找到辅导员就增加审批人
+ if (!list.Exists(m => m.Id == tutorEntity.F_UserId))
+ {
+ list.Add(new NWFUserInfo()
+ {
+ Id = tutorEntity.F_UserId,
+ Account = tutorEntity.F_Account,
+ Name = tutorEntity.F_RealName
+ });
+ }
+ }
+ }
+ }
+ break;
}
}
}