Переглянути джерело

Merge branch 'master' into 大厂分支

大厂分支
liangkun 4 роки тому
джерело
коміт
84a7805423
20 змінених файлів з 1638 додано та 5 видалено
  1. +424
    -0
      Learun.Framework.Ultimate V7/Doc文档/数字化智慧校园3.0部署手册V1.3.docx
  2. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Index.js
  3. +147
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ADR_AddApplyController.cs
  4. +23
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_AddApply/Form.cshtml
  5. +112
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_AddApply/Form.js
  6. +44
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_AddApply/Index.cshtml
  7. +219
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_AddApply/Index.js
  8. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  9. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config
  10. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  11. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/ADR_AddApplyMap.cs
  12. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  13. +191
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_AddApply/ADR_AddApplyBLL.cs
  14. +76
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_AddApply/ADR_AddApplyEntity.cs
  15. +61
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_AddApply/ADR_AddApplyIBLL.cs
  16. +259
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_AddApply/ADR_AddApplyService.cs
  17. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj
  18. +28
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/ADR_AddApplyMethod.cs
  19. +10
    -0
      Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/Quanjiang.DigitalScholl.JobService.csproj
  20. +1
    -4
      Learun.Framework.Ultimate V7/西昌单校区版V3.0.sln

+ 424
- 0
Learun.Framework.Ultimate V7/Doc文档/数字化智慧校园3.0部署手册V1.3.docx Переглянути файл

@@ -0,0 +1,424 @@

数字化智慧校园3.0













部署手册












版本号:V1.3






修订记录
修订时间
修订人
版本号
变更
2019-03-19
梁坤
V1.0
新建V1.0
2019-05-10
梁坤
V1.1
新增系统流程配置说明和飞星上传目录要求说明
2019-07-04
梁坤
V1.2
新增飞星部署说明,统一身份认证部署说明
2020-09-09
梁坤
V1.3
1.新增力软706框架升级部署说明
2.新增海康考勤机连接部署说明
3.修改授权验证功能说明
4.修改系统要求软件环境部分

概述
数字化智慧校园3.0基于.NETMVC技术开发,数据库使用SQL Server,部署在Windows Server系统之上,需要IIS支持。
系统要求
硬件
8GB及以上内存,4核心及以上CPU主频不低于2.0GHz,硬盘空间不低于500GB,其中系统盘剩余空间不低于50GB
操作系统
Windows Server2008R2及以上
软件环境
.NET FrameWork 4.5及以上(力软705版本开始升级到4.6.1及以上)
SQL Server2012及以上
IIS基础模块
Redis 3.2.100及以上

系统部署
数据库配置
第一步
新建数据库adms7ultimate2和CollegeMISFor30


存储路径修改至较大剩余空间硬盘



第二步
还原数据库,备份文件如下图

分别还原至对应数据库

还原路径一定要选对


选项如下图:


第三步
修改数据库adms7ultimate2中LR_Base_DatabaseLink表内数据,内有连接字符串修改正确。


LR_Base_User表内数据只保留system帐号,其余做删除处理:

LR_Base_Module表中F_UrlAddress地址替换成后续部署mis系统的端口和ip:

Sql语句:update LR_Base_Module set F_UrlAddress=replace(F_UrlAddress,'192.168.1.126:9000','192.168.60.128:8082')
Sql语句按实际情况修改
第四步
同步学校基础数据到CollegeMISFor30中(使用系统导入、数据库导入功能均可)
常用表:

排课数据ArrangeLessonTerm
系CdDept
专业CdMajor
课程分类CdLessonSort,CdLessonSortDetail
课程LessonInfo
班级ClassInfo
教学楼ClassroomBuilding
教室ClassroomInfo
班主任ClassInfoDiredctor
教师EmpInfo
学生StuInfoBasic

注意:学生和教师表内,checkmark必须是true才能生成帐号
性别1男0女,旧系统一般是1男2女,注意修改数据
教师表中F_CompanyId和F_DepartmentId分别对应adms7ultimate2库的LR_Base_Company表(学校校区表)的对应id,LR_Base_Department(部门)的对应id
学生表中F_SchoolId对应adms7ultimate2库的LR_Base_Company表(学校校区表)的对应id,DeptNo对应CollegeMIS库的系CdDept 的DeptNo,否则生成帐号会生成出错!

IIS配置
网站组成
全部系统需要部署4个网站如下图:

分别对应:高职20190311web、WebPublish、WebAPIPublish、www四个压缩包。
网站程序池配置
Mis系统需要选择2.0集成,且启用32位,图:




其余三个系统需要4.0集成,同样启用32位。

注意:有时还需要配置文件目录权限如下图:


配置文件修改
网站数据库配置:
新增定时库配置
<add name="hangfireString" connectionString="Server=192.168.2.126;Initial Catalog=Hangfire;User ID=sa;Password=bjqj@2015!" providerName="System.Data.SqlClient" />

Mis系统修改三处Web.config中,如下图:

以下网站修改xmlconfig目录下的database.config配置:


和system.config配置:

workflowapi修改为对应的服务器ip地址,跳转地址指向mis系统ip和端口。
AnnexesFile 修改为部署服务器的Resource文件夹下,否则会影响飞星。

手机h5网站即站,修改config下config.js文件:

Webapi指向api站,web指向主网站
系统流程使用配置
系统流程是为了配合框架中个人办公-》我的任务-》代办任务中(即工作流)实现一些提交审核数据的功能,系统开发时已经内置了默认的流程,如需修改配套的流程,请详细阅读并按照下面的步骤谨慎修改。
第一步:了解使用系统流程的功能和对应的路径如如下:
采购申请

入库申请

出库申请

公文下发

第二步:编辑对应的index.js最下方代码,如图:

修改红圈处模板编号为系统中对应的流程模板编号,流程功能如下图:


新建系统调用流程时,要注意选择系统流程,模板编号要和index.js相对应,否则会造成工作流功能工作不稳定甚至紊乱。

第三步:配置各节点的表单,如下图所示:
开始节点和中间审批节点添加表单,类型选择系统表单,地址填写对应的功能目录的FormView。

最后审批节点需要额外配置【绑定方法】,如下图:


绑定方法见下表:(大小写区分且不能有空格)
系统功能
绑定方法
备注
采购申请
Ass_PurchaseApplyMethod

入库申请
Ass_AssetsInfoApplyMethod

出库申请
Ass_AssetsOutApplyMethod

公文下发
Sys_SendFileMethod





应用程序配置
配置文件
WorkFlow下Learun.Application.WorkFlowServer.exe.config文件修改:


管理员方式运行Learun.Application.WorkFlowServer.exe开启服务。
统一身份认证配置
<!-- ================== 统一身份认证公钥密钥 ================== -->
<add key="SSOPublicSecret" value="bjquanjiang" />
<add key="SSOUserSecret" value="123456789" />
一般情况,公钥不做修改,私钥在对接系统端进行配置。
统一身份认证工作机制说明
第一步,在系统中配置统一身份认证的接入系统地址
第二步,给系统中的用户授权统一认证系统使用权限
第三步,配置用户接入统一认证系统的用户名、密码
第四步,系统根据用户填写的信息,使用公钥、密钥双层AES加密后,发送到接入端比对,成功后即可自动登录对接系统。

图中数字化校园统一应用管理模块中私钥应和接入系统私钥匹配。

飞星推送配置
<add key="CommunicationServeraddress" value="http://127.0.0.1:8866/ChatConnection" />
数字化校园会自动推送未读邮件消息、公告通知消息到飞星端,需要配置本地址到飞星服务端。
排课、排考,考试系统数据对接配置
<!--排课接口-->
<add key="ArrangeLessonAPI" value="http://demo.bjquanjiang.com:9090/interface/paike/paike" />
<!--异动排课接口-->
<add key="ModifyArrangeLessonAPI" value="http://demo.bjquanjiang.com:9090/interface/paike/updatePaike" />
<!--开课计划接口-->
<add key="OpenLessonPlanAPI" value="http://demo.bjquanjiang.com:9090/interface/paike/majorInterface" />

<!--选修排课接口-->
<add key="ArrangeLessonOfElectiveAPI" value="http://demo.bjquanjiang.com:9090/interface/paike/xuanxiupaike" />
<!--更新选修排课接口-->
<add key="ModifyArrangeLessonOfElectiveAPI" value="http://demo.bjquanjiang.com:9090/interface/paike/updateXuanXiuPaike" />

<!--排考接口-->
<add key="ArrangeExamAPI" value="http://demo.bjquanjiang.com:9090/interface/paikao/paikao" />
<!--选修排考接口-->
<add key="ArrangeExamOfElectiveAPI" value="http://demo.bjquanjiang.com:9090/interface/paikao/xuanxiupaikao" />
<!--排考结构接口-->
<add key="ArrangeExamStructureAPI" value="http://demo.bjquanjiang.com:9090/interface/paikao/geitime" />
<!--考试成绩接口-->
<add key="ExamScoreAPI" value="http://123.57.209.16:12203/jeeplus/app/stuScore" />

<!--考试系统学生端-->
<add key="kaoshisystemurl" value="http://ks.bjquanjiang.com/RereClientConnector" />
青桔课堂对接配置
<add key="QingJuurl" value="http://xy.bjquanjiang.com/Student/LoginForSSOHandler.ashx" />
<add key="QingJuRegisterurl" value="http://xy.bjquanjiang.com/Service/ServiceStudent.ashx" />
自动备份数据库路径配置
<add key="dbbackuppath" value="D:\数字化校园\lr7test\Publish\Resource\DataBaseBackup"/>
将本路径配置指向数字化校园主站根目录下\Resource\DataBaseBackup

Webapi配置变更
<!-- ==================注意附件上传地址 修改到主网站部署目录下的Resource要不然飞星会报错================== -->
<add key="AnnexesFile" value="E: \数字化校园\Web\Resource" />
<!-- ================== 数字化校园主站地址 ================== -->
<add key="webrootpath" value="http://localhost:20873" />
有两处需要注意的地方,都需要指向主站。

力软705版本升级注意
第一步,首先更新版本程序
第二步,使用Quanjiang.DigitalScholl.DataSync.exe数据库同步工具同步客户数据库到最新(由于数据库操作风险巨大,具体使用时联系开发人员配合同步)
第三步,参照最新程序修改XmlConfig下system.config、ioc.config,根目录下Web.config文件
第四步,如果出现授权验证失败,需要重新进行授权。
飞星部署
服务端
飞星服务端属于exe可执行文件,运行前先配置配置文件GoChat.Server.exe.config:
<add key="serverAddress" value="*:8866" />(一般情况不要动)
然后以管理员身份运行GoChat.Server.exe后,如下图:

点击服务控制,切换到该选项卡,点击启动即可


客户端
最新客户端安装包,请到公司群文件里下载,注意下载最新版本号的 飞星客户端.exe
安装后,需要先配置服务器,点击登录界面右上角设置按钮,如下图:



通信服务器内网(外网)地址:运行飞星服务端程序的服务器ip地址+端口号,例如:
123.57.209.16:8866 127.0.0.1:8866
通信服务器数据地址:数字化校园API网站地址+端口号,例如:123.57.209.16:31173 192.168.2.126:8083
请务必注意配置正确,否则无法正常登录飞星。
配置完成后,输入数字化校园教师帐号密码即可登录。

软件授权
泉江授权程序
程序名称Quanjiang.DigitalScholl.License.exe
本程序为可执行文件,无需配置
授权成功后,会在客户机主网站bin目录下,生成后缀为.bjqj的加密授权文件,授权分为永久授权和限时授权,不勾选是否限时即为永久授权。

说明:
1.首先部署好数字化校园3.0主程序,浏览器打开:http://部署地址/ShowRegister
2.运行授权器,将上一步得到的机器码填写至注册器机器码文本框内。
3.如果有使用期限,选择好到期时间,如果没有使用期限,请将限时复选框去掉。
4.点击授权按钮,将生成的注册码复制到部署机器的http://部署地址/ShowRegister界面注册码内,并点击授权按钮。
5.重新运行部署的数字化校园。
6.!!!!严重警告!!!!此软件禁止放在部署机上!!!!此软件严禁外传!!!!
7. 在力软705版本后增加了网络授权验证,客户机除了要进行上述的本地授权外,还需要进行网络授权
步骤1:打开授权网站http://123.57.209.16:8061/ 用户名:联系泉江获取 密码:联系泉江获取 并登录。
步骤2:打开功能并新增授权

步骤3:填写相关信息并保存(机器码即运行数校http://部署地址/ShowRegister获得的机器码)

步骤4:重新访问数字化智慧校园系统验证授权是否正确。
定时服务部署
部署
本程序为Windows服务,即运行在系统底层的程序,可随系统启动,安装后需要手动启动,设置为自动运行,程序名称Quanjiang.DigitalScholl.JobService.exe
先修改配置文件
Quanjiang.DigitalScholl.JobService.exe.config中的连接字符串到部署服务器
<add name="BaseDb" connectionString="Server=192.168.2.126;Initial Catalog=adms7ultimate2;User ID=sa;Password=bjqj@2015!" providerName="System.Data.SqlClient" />
<add name="CollegeMIS" connectionString="Server=192.168.2.126;Initial Catalog=CollegeMIS;User ID=sa;Password=bjqj@2015!" providerName="System.Data.SqlClient" />
<add name="HangfireConnString" connectionString="Server=192.168.2.126;Initial Catalog=Hangfire;User ID=sa;Password=bjqj@2015!" providerName="System.Data.SqlClient" />
备份文件存放路径配置:
<add key="dbbackuppath" value="主网站部署地址\Resource\DataBaseBackup" />
如需要部署海康考勤机还需要配置:
<add key="AttendancePhotoPath" value="主网站部署地址\Resource\AttendancePhoto" />
部署方法:
第一步,以管理员身份运行cmd
第二步,进入服务程序路劲 cd 盘符\目录\Quanjiang.DigitalScholl.JobService\bin\Debug回车
第三步,盘符 回车
第四步,%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\installutil.exe Quanjiang.DigitalScholl.JobService.exe 回车,提示安装成功。

第五步,打开Windows服务,找到安装的服务

并点击启动

看到下图证明成功运行

服务的卸载:
运行cmd,进入服务程序目录,执行 %SystemRoot%\Microsoft.NET\Framework\v4.0.30319\installutil.exe /u Quanjiang.DigitalScholl.JobService.exe 回车
卸载后,刷新Windows服务 应看不到本服务程序说明卸载成功,否则需要重启。

海康考勤机部署要求
首先确保数字化校园主站运行正常。
步骤1 配置考勤机参数。打开功能【考勤设备管理】

步骤2 配置考勤机参数,系统仅对启用设备进行连接操作

步骤3 部署【DigitalSchoolApi】网站,并保证正常运行。
步骤4 复制【海康考勤机必须文件】下的所有文件、文件夹到Quanjiang.DigitalScholl.JobService.exe所在目录。
步骤5 复制DigitalSchoolApi内三个文件到Quanjiang.DigitalScholl.JobService.exe所在目录。
步骤6 运行服务
检查是否部署
运行数字化校园主网站ip+端口/hangfire
查看服务器

显示上图即为服务正常,否则服务没运行正常。
DigitalSchoolApi部署
部署
本程序为Web应用程序,部署方式同数字化智慧校园系统。
对接考勤机的客户需要修改Web.config下【AttendancePhotoPath】配置节到数字化智慧校园网站根目录下Resource目录(同步修改【定时服务程序下】Quanjiang.DigitalScholl.JobService.exe.config文件的对应配置)
<add key="AttendancePhotoPath" value="数字化智慧校园网站根目录\Resource\AttendancePhoto"/>
程序实现了定时任务的新增,是配合【定时服务】运行的必要系统,程序包含如下图所示的功能:
1.监控功能:部署地址/hangfire

2.任务操作功能:部署地址/swagger

School基础接口包含了几个教务所需的接口,可对外提供使用。


YKT接口包含西昌学校门禁一卡通、图书馆系统数据同步定时同步任务,金隅学校一卡通消费记录定时同步任务,海康考勤机连接任务等,可根据不同学校需求具体操作。


海康考勤机连接
第一步,单击展开:

第二步,点击按钮:

第三步,点击执行:

第四步,查看结果:显示返回200 OK即为成功

第五步,确认是否加入定时服务,转到 【DigitalSchoolApi】部署地址/hangfire 查看【周期性作业】

确认作业【HKAttendance】存在部署完成。
第六步,启动【定时服务】
第七步,查看数字化智慧校园系统中的考勤设备管理列表,是否布防和最后通讯时间,确认布防状态(是),最后通讯时间接近当前时间为连接成功,否则说明链接设备出现问题


考勤机连接日志
连接日志存储与CollegeMIS数据库,ADR_DeviceLog表中,查看该表数据可以快速判定考勤机部署连接过程中出现的错误、问题。


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Index.js Переглянути файл

@@ -161,7 +161,7 @@ var bootstrap = function ($, learun) {
],
mainId: 'ID',
isPage: true,
sidx: "UserNo,ADYear,ADMonth,ADDay,ADTime",
sidx: "UserNo,ADYear,ADMonth,ADDay,ClockTime",
});
},
search: function (param) {


+ 147
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/ADR_AddApplyController.cs Переглянути файл

@@ -0,0 +1,147 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.PersonnelManagement;
using System.Web.Mvc;
using Learun.Application.TwoDevelopment.LR_CodeDemo;
using System.Collections.Generic;
using Learun.Application.Base.SystemModule;

namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-09-09 16:23
/// 描 述:补卡申请
/// </summary>
public class ADR_AddApplyController : MvcControllerBase
{
private ADR_AddApplyIBLL aDR_AddApplyIBLL = new ADR_AddApplyBLL();
private CodeRuleIBLL codeRuleIBLL = new CodeRuleBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
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 = aDR_AddApplyIBLL.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 ADR_AddApplyData = aDR_AddApplyIBLL.GetADR_AddApplyEntity( keyValue );
var jsonData = new {
ADR_AddApply = ADR_AddApplyData,
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="processId">流程实例主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormDataByProcessId(string processId)
{
var ADR_AddApplyData = aDR_AddApplyIBLL.GetEntityByProcessId( processId );
var jsonData = new {
ADR_AddApply = ADR_AddApplyData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
aDR_AddApplyIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 修改审批状态
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult ChangeStatusById(string keyValue,string processId)
{
aDR_AddApplyIBLL.ChangeStatusById(keyValue,processId);
return Success("提交成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
ADR_AddApplyEntity entity = strEntity.ToObject<ADR_AddApplyEntity>();
aDR_AddApplyIBLL.SaveEntity(keyValue,entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}
#endregion

}
}

+ 23
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_AddApply/Form.cshtml Переглянути файл

@@ -0,0 +1,23 @@
@{
ViewBag.Title = "补卡申请";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="ADR_AddApply" >
<div class="lr-form-item-title">申请人</div>
<div id="UserNo" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="ADR_AddApply" >
<div class="lr-form-item-title">考勤类型</div>
<div id="ADType" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="ADR_AddApply" >
<div class="lr-form-item-title">补卡时间</div>
<input id="AddTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#AddTime').trigger('change'); } })" />
</div>
<div class="col-xs-12 lr-form-item" data-table="ADR_AddApply" >
<div class="lr-form-item-title">原因</div>
<input id="Remark" type="text" class="form-control" />
</div>
</div>
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/ADR_AddApply/Form.js")

+ 112
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_AddApply/Form.js Переглянути файл

@@ -0,0 +1,112 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2020-09-09 16:23
* 描 述:补卡申请
*/
var acceptClick;
var keyValue = request('keyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var isUpdate;
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 () {
$('#UserNo').lrformselect({
layerUrl: top.$.rootUrl + '/LR_OrganizationModule/User/SelectOnlyForm',
layerUrlW: 400,
layerUrlH: 300,
dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds'
});
$('#ADType').lrDataItemSelect({ code: 'ADType' });
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/ADR_AddApply/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 + '/PersonnelManagement/ADR_AddApply/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 == 'ADR_AddApply' && 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)
};
$.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/ADR_AddApply/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack(res, i);
}
});
};
page.init();
}

+ 44
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_AddApply/Index.cshtml Переглянути файл

@@ -0,0 +1,44 @@
@{
ViewBag.Title = "补卡申请";
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="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>
<div id="UserNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">考勤类型</div>
<div id="ADType"></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_submit" 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/PersonnelManagement/Views/ADR_AddApply/Index.js")

+ 219
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ADR_AddApply/Index.js Переглянути файл

@@ -0,0 +1,219 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2020-09-09 16:23
* 描 述:补卡申请
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var startTime;
var endTime;
var processId = '';
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 时间搜索框
$('#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;
page.search();
}
});
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#UserNo').lrUserSelect(0);
$('#ADType').lrDataItemSelect({ code: 'ADType' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/PersonnelManagement/ADR_AddApply/Form',
width: 600,
height: 400,
callBack: function (id) {
var res = false;
// 验证数据
res = top[id].validForm();
// 保存数据
if (res) {
//processId = learun.newGuid();
//res = top[id].save(processId, refreshGirdData);
res = top[id].save('', function () {
page.search();
});
}
return res;
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
var PStatus = $('#gridtable').jfGridValue('PStatus');
if (PStatus != 0) {
learun.alert.warning("申请已经提交,不能修改");
return;
}
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/PersonnelManagement/ADR_AddApply/Form?keyValue=' + keyValue,
width: 600,
height: 400,
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');
var PStatus = $('#gridtable').jfGridValue('PStatus');
if (PStatus != 0) {
learun.alert.warning("申请已经提交,不能修改");
return;
}
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/ADR_AddApply/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});

// 提交审核
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
var PStatus = $('#gridtable').jfGridValue('PStatus');
if (PStatus != 0) {
learun.alert.warning("申请已经提交");
return;
}
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认提交!', function (res) {
if (res) {
processId = learun.newGuid();
learun.postForm(top.$.rootUrl + '/PersonnelManagement/ADR_AddApply/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res2) {
refreshGirdData(res2, {});
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/PersonnelManagement/ADR_AddApply/GetPageList',
headData: [
{
label: "申请人", name: "UserNo", 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: "ADType", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'ADType',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "补卡时间", name: "AddTime", width: 100, align: "left" },
{
label: "状态", name: "PStatus", width: 100, align: "left", formatter: function (cellvalue) {
if (cellvalue === 1) {
return '<span class=\"label label-warning\">审批中</span>';
} else if (cellvalue === 2) {
return '<span class=\"label label-success\">审批通过</span>';
} else {
return '<span class=\"label label-default\" >草稿</span>';
}
}
},
{ label: "原因", name: "Remark", width: 100, align: "left" },
],
mainId: 'ID',
isPage: true
});
},
search: function (param) {
param = param || {};
param.StartTime = startTime;
param.EndTime = endTime;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function (res, postData) {
if (!!res) {
if (res.code == 200) {
// 发起流程
var postData = {
schemeCode: 'ADR_AddApply',// 填写流程对应模板编号
processId: processId,
level: '1',
};
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
learun.loading(false);
});
}
page.search();
}
};
page.init();
}

+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Переглянути файл

@@ -802,6 +802,7 @@
<Compile Include="Areas\EducationalAdministration\Controllers\ADR_DeviceController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\ADR_DeviceLogController.cs" />
<Compile Include="Areas\PersonnelManagement\Controllers\ADR_RestrictionController.cs" />
<Compile Include="Areas\PersonnelManagement\Controllers\ADR_AddApplyController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\RegistrateForm.js" />
@@ -6063,6 +6064,10 @@
<Content Include="Areas\PersonnelManagement\Views\ADR_Restriction\Index.js" />
<Content Include="Areas\PersonnelManagement\Views\ADR_Restriction\Form.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\ADR_Restriction\Form.js" />
<Content Include="Areas\PersonnelManagement\Views\ADR_AddApply\Index.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\ADR_AddApply\Index.js" />
<Content Include="Areas\PersonnelManagement\Views\ADR_AddApply\Form.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\ADR_AddApply\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\LR_Desktop\Models\" />


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config Переглянути файл

@@ -24,6 +24,7 @@
<typeAlias alias="SW_Ask_StudentMainMethod" type="Learun.Application.WorkFlow.SW_Ask_StudentMainMethod,Learun.Application.WorkFlow" />
<typeAlias alias="Sys_SendFilePartyMethod" type="Learun.Application.WorkFlow.Sys_SendFilePartyMethod,Learun.Application.WorkFlow" />
<typeAlias alias="Ass_ReceiveMethod" type="Learun.Application.WorkFlow.Ass_ReceiveMethod,Learun.Application.WorkFlow" />
<typeAlias alias="ADR_AddApplyMethod" type="Learun.Application.WorkFlow.ADR_AddApplyMethod,Learun.Application.WorkFlow" />

<!--任务调度器-->
<typeAlias alias="ITSMethod" type="Learun.Application.Extention.TaskScheduling.ITsMethod,Learun.Application.Extention" />
@@ -57,6 +58,7 @@
<type type="IWorkFlowMethod" mapTo="SW_Ask_StudentMainMethod" name="SW_Ask_StudentMainMethod"></type>
<type type="IWorkFlowMethod" mapTo="Sys_SendFilePartyMethod" name="Sys_SendFilePartyMethod"></type>
<type type="IWorkFlowMethod" mapTo="Ass_ReceiveMethod" name="Ass_ReceiveMethod"></type>
<type type="IWorkFlowMethod" mapTo="ADR_AddApplyMethod" name="ADR_AddApplyMethod"></type>
<type type="IWorkFlowMethod" mapTo="WFFileRelease" name="wfFileRelease"></type>

</container>


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj Переглянути файл

@@ -537,6 +537,7 @@
<Compile Include="EducationalAdministration\ADR_DeviceMap.cs" />
<Compile Include="EducationalAdministration\ADR_DeviceLogMap.cs" />
<Compile Include="PersonnelManagement\ADR_RestrictionMap.cs" />
<Compile Include="PersonnelManagement\ADR_AddApplyMap.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/ADR_AddApplyMap.cs Переглянути файл

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

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-09-09 16:23
/// 描 述:补卡申请
/// </summary>
public class ADR_AddApplyMap : EntityTypeConfiguration<ADR_AddApplyEntity>
{
public ADR_AddApplyMap()
{
#region 表、主键
//表
this.ToTable("ADR_ADDAPPLY");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Переглянути файл

@@ -1568,6 +1568,10 @@
<Compile Include="PersonnelManagement\ADR_Restriction\ADR_RestrictionService.cs" />
<Compile Include="PersonnelManagement\ADR_Restriction\ADR_RestrictionBLL.cs" />
<Compile Include="PersonnelManagement\ADR_Restriction\ADR_RestrictionIBLL.cs" />
<Compile Include="PersonnelManagement\ADR_AddApply\ADR_AddApplyEntity.cs" />
<Compile Include="PersonnelManagement\ADR_AddApply\ADR_AddApplyService.cs" />
<Compile Include="PersonnelManagement\ADR_AddApply\ADR_AddApplyBLL.cs" />
<Compile Include="PersonnelManagement\ADR_AddApply\ADR_AddApplyIBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 191
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_AddApply/ADR_AddApplyBLL.cs Переглянути файл

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

namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-09-09 16:23
/// 描 述:补卡申请
/// </summary>
public class ADR_AddApplyBLL : ADR_AddApplyIBLL
{
private ADR_AddApplyService aDR_AddApplyService = new ADR_AddApplyService();

#region 获取数据

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

/// <summary>
/// 获取ADR_AddApply表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public ADR_AddApplyEntity GetADR_AddApplyEntity(string keyValue)
{
try
{
return aDR_AddApplyService.GetADR_AddApplyEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
public ADR_AddApplyEntity GetEntityByProcessId(string processId)
{
try
{
return aDR_AddApplyService.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
{
aDR_AddApplyService.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, ADR_AddApplyEntity entity)
{
try
{
aDR_AddApplyService.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 ChangeStatusByProcessId(string processId, int status)
{
try
{
aDR_AddApplyService.ChangeStatusByProcessId(processId, status);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

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

#endregion

}
}

+ 76
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_AddApply/ADR_AddApplyEntity.cs Переглянути файл

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

namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-09-09 16:23
/// 描 述:补卡申请
/// </summary>
public class ADR_AddApplyEntity
{
#region 实体成员
/// <summary>
/// 编号
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// 补卡时间
/// </summary>
[Column("ADDTIME")]
public DateTime? AddTime { get; set; }
/// <summary>
/// 申请人
/// </summary>
[Column("USERNO")]
public string UserNo { get; set; }
/// <summary>
/// 流程id
/// </summary>
[Column("PROCESSID")]
public string ProcessId { get; set; }
/// <summary>
/// 流程状态
/// </summary>
[Column("PSTATUS")]
public int? PStatus { get; set; }
/// <summary>
/// 理由
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
/// 考勤类型
/// </summary>
[Column("ADTYPE")]
public string ADType { get; set; }
#endregion

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


+ 61
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_AddApply/ADR_AddApplyIBLL.cs Переглянути файл

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

namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-09-09 16:23
/// 描 述:补卡申请
/// </summary>
public interface ADR_AddApplyIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<ADR_AddApplyEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取ADR_AddApply表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
ADR_AddApplyEntity GetADR_AddApplyEntity(string keyValue);
/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
ADR_AddApplyEntity 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, ADR_AddApplyEntity entity);
void ChangeStatusByProcessId(string processId, int status);
#endregion
/// <summary>
/// 修改审批状态
/// </summary>
/// <param name="keyValue"></param>
/// <param name="processId"></param>
void ChangeStatusById(string keyValue, string processId);
}
}

+ 259
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ADR_AddApply/ADR_AddApplyService.cs Переглянути файл

@@ -0,0 +1,259 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using Learun.Application.TwoDevelopment.LogisticsManagement;

namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-09-09 16:23
/// 描 述:补卡申请
/// </summary>
public class ADR_AddApplyService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<ADR_AddApplyEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.ID,
t.UserNo,
t.ADType,
t.AddTime,
t.PStatus,
t.Remark
");
strSql.Append(" FROM ADR_AddApply t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
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 ( t.AddTime >= @startTime AND t.AddTime <= @endTime ) ");
}
if (!queryParam["UserNo"].IsEmpty())
{
dp.Add("UserNo", queryParam["UserNo"].ToString(), DbType.String);
strSql.Append(" AND t.UserNo = @UserNo ");
}
if (!queryParam["ADType"].IsEmpty())
{
dp.Add("ADType", queryParam["ADType"].ToString(), DbType.String);
strSql.Append(" AND t.ADType = @ADType ");
}
return this.BaseRepository("CollegeMIS").FindList<ADR_AddApplyEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

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

/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
public ADR_AddApplyEntity GetEntityByProcessId(string processId)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<ADR_AddApplyEntity>(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)
{
try
{
this.BaseRepository("CollegeMIS").Delete<ADR_AddApplyEntity>(t => t.ID == keyValue);
}
catch (Exception ex)
{
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, ADR_AddApplyEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 流程审批处理
/// </summary>
/// <param name="processId">流程id</param>
/// <param name="status">处理状态 2 通过 0 未通过</param>
/// <returns></returns>
public void ChangeStatusByProcessId(string processId, int status)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
var addEntity = db.FindEntity<ADR_AddApplyEntity>(a => a.ProcessId == processId);
if (null != addEntity)
{
var AddTime = addEntity.AddTime.ToDate();
var recordEntity = new ADR_RecordEntity()
{
ADYear = AddTime.Year.ToString(),
ADMonth = AddTime.Month.ToString(),
ADDay = AddTime.Day.ToString(),
ClockTime = AddTime,
ADTime = AddTime,
ADType = addEntity.ADType,
UserNo = addEntity.UserNo,
ClockStatus = "1",
};
recordEntity.Create();
addEntity.PStatus = status;
db.Insert(recordEntity);
db.Update(addEntity);
db.Commit();

}
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

public void ChangeStatusById(string keyValue, string processId)
{
try
{
var addEntity = this.BaseRepository("CollegeMIS").FindEntity<ADR_AddApplyEntity>(a => a.ID == keyValue);
addEntity.ProcessId = processId;
addEntity.PStatus = 1;
this.BaseRepository("CollegeMIS").Update(addEntity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
}
}

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj Переглянути файл

@@ -94,6 +94,7 @@
<Compile Include="Delegate\NWFDelegateRuleEntity.cs" />
<Compile Include="Delegate\NWFDelegateService.cs" />
<Compile Include="NodeMethod\ArrangeLessonTermAttemperMethod.cs" />
<Compile Include="NodeMethod\ADR_AddApplyMethod.cs" />
<Compile Include="NodeMethod\Ass_ReceiveMethod.cs" />
<Compile Include="NodeMethod\SW_Ask_StudentMainMethod.cs" />
<Compile Include="NodeMethod\SW_Ask_TypeMethod.cs" />


+ 28
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/ADR_AddApplyMethod.cs Переглянути файл

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

namespace Learun.Application.WorkFlow
{
public class ADR_AddApplyMethod : IWorkFlowMethod
{
ADR_AddApplyIBLL asset = new ADR_AddApplyBLL();


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

+ 10
- 0
Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/Quanjiang.DigitalScholl.JobService.csproj Переглянути файл

@@ -128,5 +128,15 @@
<Analyzer Include="..\packages\Microsoft.DependencyValidation.Analyzers.0.10.0\analyzers\dotnet\cs\Microsoft.DependencyValidation.Analyzers.resources.dll" />
<Analyzer Include="..\packages\Microsoft.DependencyValidation.Analyzers.0.10.0\analyzers\dotnet\Microsoft.DependencyValidation.Analyzers.dll" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Learun.Framework.Module\Learun.Db\Learun.DataBase.EF.Sqlserver\Learun.DataBase.SqlServer.csproj">
<Project>{890532f8-5205-4ee9-965c-84500cad24de}</Project>
<Name>Learun.DataBase.SqlServer</Name>
</ProjectReference>
<ProjectReference Include="..\Learun.Framework.Module\Learun.Db\Learun.DataBase\Learun.DataBase.csproj">
<Project>{c329f9e1-4327-4769-9d08-07e6fec41005}</Project>
<Name>Learun.DataBase</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

+ 1
- 4
Learun.Framework.Ultimate V7/西昌单校区版V3.0.sln Переглянути файл

@@ -110,6 +110,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Learun.Application.Message"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "05 Doc文档", "05 Doc文档", "{78B470D3-19E2-474B-B3E1-DFCEE1329F87}"
ProjectSection(SolutionItems) = preProject
Doc文档\数字化智慧校园3.0部署手册V1.3.docx = Doc文档\数字化智慧校园3.0部署手册V1.3.docx
Doc文档\数字化智慧校园基础信息接口V1.0.docx = Doc文档\数字化智慧校园基础信息接口V1.0.docx
Doc文档\数字化智慧校园统一身份认证对接说明V1.0.docx = Doc文档\数字化智慧校园统一身份认证对接说明V1.0.docx
EndProjectSection
@@ -1595,10 +1596,6 @@ Global
{36083FBB-CE7F-4EE0-8459-C4B60A2DD070} = {16DDB25D-3101-47A2-BDC8-161954FD77FA}
{DBB22F9E-ED75-40EB-A091-717D42C65A9B} = {29DFF52B-8455-4EA1-8798-3AEE210D9372}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.0\lib\NET35
SolutionGuid = {968C278F-4142-4DFF-96B0-B3D70A649451}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {968C278F-4142-4DFF-96B0-B3D70A649451}
EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.0\lib\NET35


Завантаження…
Відмінити
Зберегти