瀏覽代碼

冲突解决

金隅分支
liangkun 3 年之前
父節點
當前提交
54bb0cbd39
共有 60 個文件被更改,包括 8573 次插入3733 次删除
  1. +8
    -8
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js
  2. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/Sys_ReceiveComplaint.css
  3. +23
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/Sys_ReceiveComplaint.html
  4. +129
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/Sys_ReceiveComplaint.js
  5. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/form/form.css
  6. +17
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/form/form.html
  7. +154
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/form/form.js
  8. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/Assign.css
  9. +27
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/Assign.html
  10. +121
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/Assign.js
  11. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/form/form.css
  12. +22
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/form/form.html
  13. +159
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/form/form.js
  14. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Sys_SendComplaint.css
  15. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Sys_SendComplaint.html
  16. +165
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Sys_SendComplaint.js
  17. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/form/form.css
  18. +17
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/form/form.html
  19. +169
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/form/form.js
  20. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/reply/reply.css
  21. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/reply/reply.html
  22. +45
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/reply/reply.js
  23. +247
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Controllers/Ask_MainOfTeacherController.cs
  24. +8
    -6
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Controllers/Ask_QuestionItemsController.cs
  25. +38
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/AnswerIndex.cshtml
  26. +88
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/AnswerIndex.js
  27. +46
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/AnswerQuery.cshtml
  28. +217
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/AnswerQuery.js
  29. +48
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/Form.cshtml
  30. +73
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/Form.js
  31. +57
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/Index.cshtml
  32. +237
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/Index.js
  33. +66
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/Paper.cshtml
  34. +77
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/Paper.js
  35. +57
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/PaperAdminView.cshtml
  36. +77
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/PaperAdminView.js
  37. +56
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/PaperView.cshtml
  38. +55
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/PaperView.js
  39. +42
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/TeacherIndex.cshtml
  40. +93
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/TeacherIndex.js
  41. +10
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs
  42. +17
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  43. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
  44. +119
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/Sys_ReceiveComplaintApi.cs
  45. +173
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/Sys_SendComplaintApi.cs
  46. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Ask/Ask_MainOfTeacherMap.cs
  47. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Ask/Ask_TeacherMainMap.cs
  48. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  49. +222
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Ask_MainOfTeacher/Ask_MainOfTeacherBLL.cs
  50. +159
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Ask_MainOfTeacher/Ask_MainOfTeacherEntity.cs
  51. +57
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Ask_MainOfTeacher/Ask_MainOfTeacherIBLL.cs
  52. +406
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Ask_MainOfTeacher/Ask_MainOfTeacherService.cs
  53. +7
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Ask_QuestionItems/Ask_QuestionItemsService.cs
  54. +74
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Ask_TeacherMain/Ask_TeacherMainEntity.cs
  55. +4101
    -3716
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM
  56. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  57. +346
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs
  58. +13
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessIBLL.cs
  59. +111
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/NWFEngine.cs
  60. +11
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/NWFIEngine.cs

+ 8
- 8
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js 查看文件

@@ -1,7 +1,7 @@
var config = {
webapi: 'http://123.57.209.16:31173/',
web: "http://localhost:8087/"//web地址,用于配置logo
};
//var config = {
// webapi: 'http://123.57.209.16:31173/',
// web: "http://localhost:8087/"//web地址,用于配置logo
//};
//var config = {
// webapi: 'http://112.230.201.53:31173/',
// web:"http://112.230.201.53/:8081/"//web地址,用于配置logo
@@ -12,10 +12,10 @@ var config = {
//};


//var config = {
// webapi: 'http://localhost:8081/',
// web: "http://localhost:8080/"//web地址,用于配置logo
//};
var config = {
webapi: 'http://localhost:8081/',
web: "http://localhost:8087/"//web地址,用于配置logo
};
// var config = {
// webapi: 'http://123.57.209.16:31173/',
// web: "http://123.57.209.16:31175/"//web地址,用于配置logo


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/Sys_ReceiveComplaint.css 查看文件

@@ -0,0 +1 @@


+ 23
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/Sys_ReceiveComplaint.html 查看文件

@@ -0,0 +1,23 @@
<div class="lr-page lr-EducationalAdministrationSys_ReceiveComplaint-page">
<div class="lr-page-tool">
<div class="lr-tool-left">
总共<span class="lr-badge lr-badge-primary">0</span>条
</div>
<div class="lr-tool-right">
<div class="lr-tool-right-btn lr_multiple_search">
<i class="iconfont icon-searchlist"></i>
<div class="lr-tool-right-btn-content lr-form-container">
<div class="lr-form-row">
<label>主题</label>
<input id="Title" type="text">
</div>
</div>
</div>
<div class="lr-tool-right-btn lr_time_search">
<i class="iconfont icon-time"></i>
</div>
</div>
</div>
<div class="lr-page-content" id="lr_EducationalAdministrationSys_ReceiveComplaint_list"></div>
</div>

+ 129
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/Sys_ReceiveComplaint.js 查看文件

@@ -0,0 +1,129 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2021-04-30 16:33
* 描 述:接收投诉意见
*/
(function () {
var begin = '';
var end = '';
var multipleData = null;
var page = {
grid: null,
init: function ($page) {
begin = '';
end = '';
multipleData = null;
page.grid = $page.find('#lr_EducationalAdministrationSys_ReceiveComplaint_list').lrpagination({
lclass: page.lclass,
rows: 10, // 每页行数
getData: function (param, callback) {// 获取数据 param 分页参数,callback 异步回调
param.begin = begin;
param.end = end;
param.multipleData = multipleData;
page.loadData(param, callback, $page);
},
renderData: function (_index, _item, _$item) {// 渲染数据模板
return page.rowRender(_index, _item, _$item, $page);
},
click: function (item, $item, $et) {// 列表行点击事件
if ($et.hasClass('lr-btn-danger')) {
page.btnClick(item, $item, $page);
}
else {
page.rowClick(item, $item, $page);
}
},
btns: page.rowBtns
});
// 时间搜索
$page.find('.lr_time_search').searchdate({
callback: function (_begin, _end) {
begin = _begin;
end = _end;
multipleData = null;
page.grid.reload();
}
});
// 多条件查询
var $multiple = $page.find('.lr_multiple_search').multiplequery({
callback: function (data) {
begin = '';
end = '';
multipleData = data || {};
page.grid.reload();
}
});
},
lclass: 'lr-list',
loadData: function (param, callback, $page) {// 列表加载后台数据
var _postParam = {
pagination: {
rows: param.rows,
page: param.page,
sidx: 'SendTime desc',
sord: 'DESC'
},
queryJson: JSON.stringify({ ReceiverId: learun.storage.get('userinfo').baseinfo.userId })

};
if (param.multipleData) {
multipleData.ReceiverId = learun.storage.get('userinfo').baseinfo.userId;
_postParam.queryJson = JSON.stringify(multipleData);
}
if (param.begin && param.end) {
_postParam.queryJson = JSON.stringify({ StartTime: param.begin, EndTime: param.end, ReceiverId: learun.storage.get('userinfo').baseinfo.userId });
}
learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/Sys_ReceiveComplaint/pagelist', _postParam, (data) => {
$page.find('.lr-badge').text('0');
if (data) {
$page.find('.lr-badge').text(data.records);
callback(data.rows, parseInt(data.records));
}
else {
callback([], 0);
}
});
},
rowRender: function (_index, _item, _$item, $page) {// 渲染列表行数据
_$item.addClass('lr-list-item lr-list-item-multi');
_$item.append($('<p class="lr-ellipsis"><span>投诉编号:</span></p>').dataFormatter({ value: _item.ComplaintCode }));
_$item.append($('<p class="lr-ellipsis"><span>主题:</span></p>').dataFormatter({ value: _item.Title }));
_$item.append($('<p class="lr-ellipsis"><span>指派人:</span></p>').dataFormatter({ value: _item.Sender }));
_$item.append($('<p class="lr-ellipsis"><span>指派时间:</span></p>').dataFormatter({
value: _item.SendTime,
type: 'datetime',
dateformat: 'yyyy-MM-dd hh:mm:ss'
}));
_$item.append($('<p class="lr-ellipsis"><span>回复状态:</span></p>').dataFormatter({ value: _item.ReplyFlag == 1 ? "已回复" : "未回复" }));
_$item.append($('<p class="lr-ellipsis"><span>回复时间:</span></p>').dataFormatter({
value: _item.ReplyTime,
type: 'datetime',
dateformat: 'yyyy-MM-dd hh:mm:ss'
}));
return '';
},
rowClick: function (item, $item, $page) {// 列表行点击触发方法
learun.nav.go({ path: 'EducationalAdministration/Sys_ReceiveComplaint/form', title: '详情', type: 'right', param: { keyValue: item.RComplaintId, ReplyFlag: item.ReplyFlag } });
},
btnClick: function (item, $item, $page) {// 左滑按钮点击事件
if (item.ReplyFlag !== 1) {
learun.layer.warning("当前投诉意见未回复,无法删除!");
return false;
}
learun.layer.confirm('确定要删除该笔数据吗?', function (_index) {
if (_index === '1') {
learun.layer.loading(true, '正在删除该笔数据');
learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Sys_ReceiveComplaint/delete', item.RComplaintId, (data) => {
if (data) {// 删除数据成功
page.grid.reload();
}
learun.layer.loading(false);
});
}
}, '智慧校园提示', ['取消', '确定']);
},
rowBtns: ['<a class="lr-btn-danger">删除</a>'] // 列表行左滑按钮
};
return page;
})();

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/form/form.css 查看文件

@@ -0,0 +1 @@


+ 17
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/form/form.html 查看文件

@@ -0,0 +1,17 @@
<div class="lr-form-container">
<div class="lr-form-row " data-table="Sys_ReceiveComplaint">
<font face="宋体">*</font>
<label>主题</label>
<input id="Title" type="text" isvalid="yes" checkexpession="NotNull" errormsg="主题" readonly="readonly" />
</div>
<div class="lr-form-row lr-form-row-multi" data-table="Sys_ReceiveComplaint">
<font face="宋体">*</font>
<label>投诉意见</label>
<textarea id="Contents" isvalid="yes" checkexpession="NotNull" errormsg="投诉意见" readonly="readonly"></textarea>
</div>
<div class="lr-form-row lr-form-row-multi" data-table="Sys_ReceiveComplaint">
<font face="宋体">*</font>
<label>回复内容</label>
<textarea id="ReplyContents" isvalid="yes" checkexpession="NotNull" errormsg="回复内容"></textarea>
</div>
</div>

+ 154
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_ReceiveComplaint/form/form.js 查看文件

@@ -0,0 +1,154 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2021-04-30 16:33
* 描 述:接收投诉意见
*/
(function () {
var keyValue = '';
var ReplyFlag = '';//回复状态
var $header = null;
var titleText = '';
var page = {
isScroll: true,
init: function ($page, param) {
keyValue = param.keyValue;
ReplyFlag = param.ReplyFlag;
// 添加头部按钮列表
var _html = '\
<div class="lr-form-header-cancel" >取消</div>\
<div class="lr-form-header-btnlist" >\
<div class="lr-form-header-more" ><i class="iconfont icon-more" ></i></div>\
<div class="lr-form-header-edit" ><i class="iconfont icon-edit" ></i></div>\
</div>\
<div class="lr-form-header-submit" >提交</div>';
$header = $page.parents('.f-page').find('.f-page-header');
$header.append(_html);
// 取消
$header.find('.lr-form-header-cancel').on('tap', function () {
learun.layer.confirm('确定要退出当前编辑?', function (_index) {
if (_index === '1') {
if (keyValue) {// 如果是编辑状态
learun.formblur();
$header.find('.lr-form-header-cancel').hide();
$header.find('.lr-form-header-submit').hide();
$header.find('.lr-form-header-btnlist').show();
$header.find('.f-page-title').text(titleText);
$page.find('.lr-form-container').setFormRead();
}
else {// 如果是新增状态 关闭当前页面
learun.nav.closeCurrent();
}
}
}, '智慧校园提示', ['取消', '确定']);
});
// 编辑
$header.find('.lr-form-header-edit').on('tap', function () {
if (keyValue) {
if (ReplyFlag !== 0) {
learun.layer.warning("当前投诉意见已回复!");
return false;
}
}
$header.find('.lr-form-header-btnlist').hide();
$header.find('.lr-form-header-cancel').show();
$header.find('.lr-form-header-submit').show();
titleText = $header.find('.f-page-title').text();
$header.find('.f-page-title').text('编辑');
$page.find('.lr-form-container').setFormWrite();
});
// 更多
$header.find('.lr-form-header-more').on('tap', function () {
learun.actionsheet({
id: 'more',
data: [
{
text: '删除',
mark: true,
event: function () {// 删除当前条信息
learun.layer.confirm('确定要删除该笔数据吗?', function (_index) {
if (_index === '1') {
learun.layer.loading(true, '正在删除该笔数据');
learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Sys_ReceiveComplaint/delete', keyValue, (data) => {
learun.layer.loading(false);
if (data) {// 删除数据成功
learun.nav.closeCurrent();
var prepage = learun.nav.getpage('EducationalAdministration/Sys_ReceiveComplaint');
prepage.grid.reload();
}
});
}
}, '智慧校园提示', ['取消', '确定']);
}
}
],
cancel: function () {
}
});
});
// 提交
$header.find('.lr-form-header-submit').on('tap', function () {
// 获取表单数据
if (!$page.find('.lr-form-container').lrformValid()) {
return false;
}
var _postData = {}
_postData.keyValue = keyValue;
_postData.strEntity = JSON.stringify($page.find('.lr-form-container').lrformGet());
learun.layer.loading(true, '正在提交数据');
learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Sys_ReceiveComplaint/save', _postData, (data) => {
learun.layer.loading(false);
if (data) {// 表单数据保存成功
if (keyValue) {
learun.layer.toast('保存数据成功!');
learun.formblur();
$header.find('.lr-form-header-cancel').hide();
$header.find('.lr-form-header-submit').hide();
$header.find('.lr-form-header-btnlist').show();
$header.find('.f-page-title').text(titleText);
$page.find('.lr-form-container').setFormRead();
}
else {// 如果是
learun.nav.closeCurrent();
}
var prepage = learun.nav.getpage('EducationalAdministration/Sys_ReceiveComplaint');
prepage.grid.reload();
}
});
});
page.bind($page, param);
if (keyValue) {
// 添加编辑按钮
$page.find('.lr-form-container').setFormRead();
$header.find('.lr-form-header-btnlist').show();
// 获取表单数据
learun.layer.loading(true, '获取表单数据');
learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/Sys_ReceiveComplaint/form', keyValue, (data) => {
if (data) {
for (var id in data) {
if (data[id].length) {
$page.find('#' + id).lrgridSet(data[id]);
}
else {
$page.find('[data-table="' + id + '"]').lrformSet(data[id]);
}
}
}
learun.layer.loading(false);
});
}
else {
$header.find('.lr-form-header-cancel').show();
$header.find('.lr-form-header-submit').show();
}
},
bind: function ($page, param) {

}, destroy: function (pageinfo) {
$header = null;
keyValue = '';
}
};
return page;
})();


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/Assign.css 查看文件

@@ -0,0 +1 @@


+ 27
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/Assign.html 查看文件

@@ -0,0 +1,27 @@
<div class="lr-page lr-EducationalAdministrationSys_SendComplaintAssign-page">
<div class="lr-page-tool">
<div class="lr-tool-left">
总共<span class="lr-badge lr-badge-primary">0</span>条
</div>
<div class="lr-tool-right">
<div class="lr-tool-right-btn lr_multiple_search">
<i class="iconfont icon-searchlist"></i>
<div class="lr-tool-right-btn-content lr-form-container">
<div class="lr-form-row">
<label>主题</label>
<input id="Title" type="text">
</div>
<div class="lr-form-row">
<label>投诉编号</label>
<input id="ComplaintCode" type="text">
</div>
</div>
</div>
<div class="lr-tool-right-btn lr_time_search">
<i class="iconfont icon-time"></i>
</div>
</div>
</div>
<div class="lr-page-content" id="lr_EducationalAdministrationSys_SendComplaintAssign_list"></div>

</div>

+ 121
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/Assign.js 查看文件

@@ -0,0 +1,121 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2021-04-30 16:33
* 描 述:发送投诉意见
*/
(function () {
var begin = '';
var end = '';
var multipleData = null;
var page = {
grid: null,
init: function ($page) {
begin = '';
end = '';
multipleData = null;
page.grid = $page.find('#lr_EducationalAdministrationSys_SendComplaintAssign_list').lrpagination({
lclass: page.lclass,
rows: 10, // 每页行数
getData: function (param, callback) {// 获取数据 param 分页参数,callback 异步回调
param.begin = begin;
param.end = end;
param.multipleData = multipleData;
page.loadData(param, callback, $page);
},
renderData: function (_index, _item, _$item) {// 渲染数据模板
return page.rowRender(_index, _item, _$item, $page);
},
click: function (item, $item, $et) {// 列表行点击事件
if ($et.hasClass('lr-btn-danger')) {
//page.btnClick(item, $item, $page);
}
else {
page.rowClick(item, $item, $page);
}
},
btns: page.rowBtns
});
// 时间搜索
$page.find('.lr_time_search').searchdate({
callback: function (_begin, _end) {
begin = _begin;
end = _end;
multipleData = null;
page.grid.reload();
}
});
// 多条件查询
var $multiple = $page.find('.lr_multiple_search').multiplequery({
callback: function (data) {
begin = '';
end = '';
multipleData = data || {};
page.grid.reload();
}
});
},
lclass: 'lr-list',
loadData: function (param, callback, $page) {// 列表加载后台数据
var _postParam = {
pagination: {
rows: param.rows,
page: param.page,
sidx: 'SendTime desc',
sord: 'DESC'
},
queryJson: JSON.stringify({ SendFlag: "1" })

};
if (param.multipleData) {
multipleData.SendFlag = "1";
_postParam.queryJson = JSON.stringify(multipleData);
}
if (param.begin && param.end) {
_postParam.queryJson = JSON.stringify({ StartTime: param.begin, EndTime: param.end, SendFlag: "1" });
}
learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/pagelist', _postParam, (data) => {
$page.find('.lr-badge').text('0');
if (data) {
$page.find('.lr-badge').text(data.records);
callback(data.rows, parseInt(data.records));
}
else {
callback([], 0);
}
});
},
rowRender: function (_index, _item, _$item, $page) {// 渲染列表行数据
_$item.addClass('lr-list-item lr-list-item-multi');
_$item.append($('<p class="lr-ellipsis"><span>投诉编号:</span></p>').dataFormatter({ value: _item.ComplaintCode }));
_$item.append($('<p class="lr-ellipsis"><span>主题:</span></p>').dataFormatter({ value: _item.Title }));
_$item.append($('<p class="lr-ellipsis"><span>投诉人:</span></p>').dataFormatter({ value: _item.CreateUserName }));
_$item.append($('<p class="lr-ellipsis"><span>指派状态:</span></p>').dataFormatter({ value: _item.AssignFlag == 1 ? "已指派" : "未指派" }));
_$item.append($('<p class="lr-ellipsis"><span>指派时间:</span></p>').dataFormatter({
value: _item.AssignTime,
type: 'datetime',
dateformat: 'yyyy-MM-dd hh:mm:ss'
}));
_$item.append($('<p class="lr-ellipsis"><span>接收人:</span></p>').dataFormatter({ value: _item.Receiver }));
return '';
},
rowClick: function (item, $item, $page) {// 列表行点击触发方法
learun.nav.go({ path: 'EducationalAdministration/Sys_SendComplaint/Assign/form', title: '详情', type: 'right', param: { keyValue: item.SComplaintId, AssignFlag: item.AssignFlag } });
},
//btnClick: function (item, $item, $page) {// 左滑按钮点击事件
// learun.layer.confirm('确定要删除该笔数据吗?', function (_index) {
// if (_index === '1') {
// learun.layer.loading(true, '正在删除该笔数据');
// learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/delete', item.SComplaintId, (data) => {
// if (data) {// 删除数据成功
// page.grid.reload();
// }
// learun.layer.loading(false);
// });
// }
// }, '智慧校园提示', ['取消', '确定']);
//},
rowBtns: [] // 列表行左滑按钮
};
return page;
})();

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/form/form.css 查看文件

@@ -0,0 +1 @@


+ 22
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/form/form.html 查看文件

@@ -0,0 +1,22 @@
<div class="lr-form-container">
<div class="lr-form-row " data-table="Sys_SendComplaint">
<font face="宋体">*</font>
<label>投诉编号</label>
<input id="ComplaintCode" type="text" isvalid="yes" checkexpession="NotNull" errormsg="投诉编号" readonly="readonly" />
</div>
<div class="lr-form-row " data-table="Sys_SendComplaint">
<font face="宋体">*</font>
<label>主题</label>
<input id="Title" type="text" isvalid="yes" checkexpession="NotNull" errormsg="主题" readonly="readonly" />
</div>
<div class="lr-form-row lr-form-row-multi" data-table="Sys_SendComplaint">
<font face="宋体">*</font>
<label>投诉意见</label>
<textarea id="Contents" isvalid="yes" checkexpession="NotNull" errormsg="投诉意见" readonly="readonly"></textarea>
</div>
<div class="lr-form-row " data-table="Sys_SendComplaint">
<font face="宋体">*</font>
<label>接收人</label>
<div id="ReceiverUserId" isvalid="yes" checkexpession="NotNull" errormsg="接收人" ></div>
</div>
</div>

+ 159
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Assign/form/form.js 查看文件

@@ -0,0 +1,159 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2021-04-30 16:33
* 描 述:发送投诉意见
*/
(function () {
var keyValue = '';
var AssignFlag = '';//指派状态
var $header = null;
var titleText = '';
var page = {
isScroll: true,
init: function ($page, param) {
keyValue = param.keyValue;
AssignFlag = param.AssignFlag;
// 添加头部按钮列表
var _html = '\
<div class="lr-form-header-cancel" >取消</div>\
<div class="lr-form-header-btnlist" >\
<div class="lr-form-header-more" ><i class="iconfont icon-more" ></i></div>\
<div class="lr-form-header-edit" ><i class="iconfont icon-edit" ></i></div>\
</div>\
<div class="lr-form-header-submit" >提交</div>';
$header = $page.parents('.f-page').find('.f-page-header');
$header.append(_html);
// 取消
$header.find('.lr-form-header-cancel').on('tap', function () {
learun.layer.confirm('确定要退出当前编辑?', function (_index) {
if (_index === '1') {
if (keyValue) {// 如果是编辑状态
learun.formblur();
$header.find('.lr-form-header-cancel').hide();
$header.find('.lr-form-header-submit').hide();
$header.find('.lr-form-header-btnlist').show();
$header.find('.f-page-title').text(titleText);
$page.find('.lr-form-container').setFormRead();
}
else {// 如果是新增状态 关闭当前页面
learun.nav.closeCurrent();
}
}
}, '智慧校园提示', ['取消', '确定']);
});
// 编辑
$header.find('.lr-form-header-edit').on('tap', function () {
if (keyValue) {
if (AssignFlag !== 0) {
learun.layer.warning("当前投诉意见已指派!");
return false;
}
}
$header.find('.lr-form-header-btnlist').hide();
$header.find('.lr-form-header-cancel').show();
$header.find('.lr-form-header-submit').show();
titleText = $header.find('.f-page-title').text();
$header.find('.f-page-title').text('编辑');
$page.find('.lr-form-container').setFormWrite();
});
// 更多
$header.find('.lr-form-header-more').on('tap', function () {
learun.actionsheet({
id: 'more',
data: [
//{
// text: '删除',
// mark: true,
// event: function () {// 删除当前条信息
// learun.layer.confirm('确定要删除该笔数据吗?', function (_index) {
// if (_index === '1') {
// learun.layer.loading(true, '正在删除该笔数据');
// learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/delete', keyValue, (data) => {
// learun.layer.loading(false);
// if (data) {// 删除数据成功
// learun.nav.closeCurrent();
// var prepage = learun.nav.getpage('EducationalAdministration/Sys_SendComplaint');
// prepage.grid.reload();
// }
// });
// }
// }, '智慧校园提示', ['取消', '确定']);
// }
//}
],
cancel: function () {
}
});
});
// 提交
$header.find('.lr-form-header-submit').on('tap', function () {
// 获取表单数据
if (!$page.find('.lr-form-container').lrformValid()) {
return false;
}
var formData = $page.find('.lr-form-container').lrformGet();
formData.Receiver = $page.find("#ReceiverUserId").find("div").text();
var _postData = {}
_postData.keyValue = keyValue;
_postData.strEntity = JSON.stringify(formData);
learun.layer.loading(true, '正在提交数据');
learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/saveAssign', _postData, (data) => {
learun.layer.loading(false);
if (data) {// 表单数据保存成功
if (keyValue) {
learun.layer.toast('保存数据成功!');
learun.formblur();
$header.find('.lr-form-header-cancel').hide();
$header.find('.lr-form-header-submit').hide();
$header.find('.lr-form-header-btnlist').show();
$header.find('.f-page-title').text(titleText);
$page.find('.lr-form-container').setFormRead();
}
else {// 如果是
learun.nav.closeCurrent();
}
var prepage = learun.nav.getpage('EducationalAdministration/Sys_SendComplaint/Assign');
prepage.grid.reload();
}
});
});
page.bind($page, param);
if (keyValue) {
// 添加编辑按钮
$page.find('.lr-form-container').setFormRead();
$header.find('.lr-form-header-btnlist').show();
// 获取表单数据
learun.layer.loading(true, '获取表单数据');
learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/form', keyValue, (data) => {
if (data) {
for (var id in data) {
if (data[id].length) {
$page.find('#' + id).lrgridSet(data[id]);
}
else {
$page.find('[data-table="' + id + '"]').lrformSet(data[id]);
}
}
}
learun.layer.loading(false);
});
}
else {
$header.find('.lr-form-header-cancel').show();
$header.find('.lr-form-header-submit').show();
}
},
bind: function ($page, param) {
$page.find('#ReceiverUserId').lrselect({
type: 'user',
needPre: false
});
}, destroy: function (pageinfo) {
$header = null;
keyValue = '';
}
};
return page;
})();


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Sys_SendComplaint.css 查看文件

@@ -0,0 +1 @@


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Sys_SendComplaint.html 查看文件

@@ -0,0 +1,29 @@
<div class="lr-page lr-EducationalAdministrationSys_SendComplaint-page">
<div class="lr-page-tool">
<div class="lr-tool-left">
总共<span class="lr-badge lr-badge-primary">0</span>条
</div>
<div class="lr-tool-right">
<div class="lr-tool-right-btn lr_multiple_search">
<i class="iconfont icon-searchlist"></i>
<div class="lr-tool-right-btn-content lr-form-container">
<div class="lr-form-row">
<label>主题</label>
<input id="Title" type="text">
</div>
<div class="lr-form-row">
<label>投诉编号</label>
<input id="ComplaintCode" type="text">
</div>
</div>
</div>
<div class="lr-tool-right-btn lr_time_search">
<i class="iconfont icon-time"></i>
</div>
</div>
</div>
<div class="lr-page-content" id="lr_EducationalAdministrationSys_SendComplaint_list"></div>
<div class="lr-list-addbtn" id="lr_EducationalAdministrationSys_SendComplaint_btn">
<i class="iconfont icon-add1"></i>
</div>
</div>

+ 165
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/Sys_SendComplaint.js 查看文件

@@ -0,0 +1,165 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2021-04-30 16:33
* 描 述:发送投诉意见
*/
(function () {
var begin = '';
var end = '';
var multipleData = null;
var page = {
grid: null,
init: function ($page) {
begin = '';
end = '';
multipleData = null;
page.grid = $page.find('#lr_EducationalAdministrationSys_SendComplaint_list').lrpagination({
lclass: page.lclass,
rows: 10, // 每页行数
getData: function (param, callback) {// 获取数据 param 分页参数,callback 异步回调
param.begin = begin;
param.end = end;
param.multipleData = multipleData;
page.loadData(param, callback, $page);
},
renderData: function (_index, _item, _$item) {// 渲染数据模板
return page.rowRender(_index, _item, _$item, $page);
},
click: function (item, $item, $et) {// 列表行点击事件
if ($et.hasClass('lr-btn-danger')) {//删除
page.btnClick(item, $item, $page);
}
else if ($et.hasClass('lr-btn-blue')) {//提交
page.btnClickOfSubmit(item, $item, $page);
}
else if ($et.hasClass('lr-btn-green')) {//回复情况
page.btnClickOfReply(item, $item, $page);
}
else {
page.rowClick(item, $item, $page);
}
},
btns: page.rowBtns
});
// 时间搜索
$page.find('.lr_time_search').searchdate({
callback: function (_begin, _end) {
begin = _begin;
end = _end;
multipleData = null;
page.grid.reload();
}
});
// 多条件查询
var $multiple = $page.find('.lr_multiple_search').multiplequery({
callback: function (data) {
begin = '';
end = '';
multipleData = data || {};
page.grid.reload();
}
});
$page.find('#lr_EducationalAdministrationSys_SendComplaint_btn').on('tap', function () {
learun.nav.go({ path: 'EducationalAdministration/Sys_SendComplaint/form', title: '新增', type: 'right' });
});
},
lclass: 'lr-list',
loadData: function (param, callback, $page) {// 列表加载后台数据
var _postParam = {
pagination: {
rows: param.rows,
page: param.page,
sidx: 'SendTime desc',
sord: 'DESC'
},
queryJson: JSON.stringify({ CreateUserId: learun.storage.get('userinfo').baseinfo.userId })

};
if (param.multipleData) {
multipleData.CreateUserId = learun.storage.get('userinfo').baseinfo.userId;
_postParam.queryJson = JSON.stringify(multipleData);
}
if (param.begin && param.end) {
_postParam.queryJson = JSON.stringify({ StartTime: param.begin, EndTime: param.end, CreateUserId: learun.storage.get('userinfo').baseinfo.userId });
}
learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/pagelist', _postParam, (data) => {
$page.find('.lr-badge').text('0');
if (data) {
$page.find('.lr-badge').text(data.records);
callback(data.rows, parseInt(data.records));
}
else {
callback([], 0);
}
});
},
rowRender: function (_index, _item, _$item, $page) {// 渲染列表行数据
_$item.addClass('lr-list-item lr-list-item-multi');
_$item.append($('<p class="lr-ellipsis"><span>投诉编号:</span></p>').dataFormatter({ value: _item.ComplaintCode }));
_$item.append($('<p class="lr-ellipsis"><span>主题:</span></p>').dataFormatter({ value: _item.Title }));
_$item.append($('<p class="lr-ellipsis"><span>提交状态:</span></p>').dataFormatter({ value: _item.SendFlag == 1 ? "已提交" : "草稿" }));
_$item.append($('<p class="lr-ellipsis"><span>提交时间:</span></p>').dataFormatter({
value: _item.SendTime,
type: 'datetime',
dateformat: 'yyyy-MM-dd hh:mm:ss'
}));
_$item.append($('<p class="lr-ellipsis"><span>回复状态:</span></p>').dataFormatter({ value: _item.ReplyFlag == 1 ? "已回复" : "未回复" }));
return '';
},
rowClick: function (item, $item, $page) {// 列表行点击触发方法
learun.nav.go({ path: 'EducationalAdministration/Sys_SendComplaint/form', title: '详情', type: 'right', param: { keyValue: item.SComplaintId, SendFlag: item.SendFlag } });
},
btnClick: function (item, $item, $page) {// 左滑按钮点击事件
if (item.SendFlag !== 0) {
learun.layer.warning("当前投诉意见已提交,无法删除!");
return false;
}
learun.layer.confirm('确定要删除该笔数据吗?', function (_index) {
if (_index === '1') {
learun.layer.loading(true, '正在删除该笔数据');
learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/delete', item.SComplaintId, (data) => {
if (data) {// 删除数据成功
page.grid.reload();
}
learun.layer.loading(false);
});
}
}, '智慧校园提示', ['取消', '确定']);
},
btnClickOfSubmit: function (item, $item, $page) {// 左滑按钮点击事件
if (item.SendFlag !== 0) {
learun.layer.warning("当前投诉意见已提交!");
return false;
}
learun.layer.confirm('确定要提交该笔数据吗?', function (_index) {
if (_index === '1') {
learun.layer.loading(true, '正在提交该笔数据');
learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/submit', item.SComplaintId, (data) => {
if (data) {// 提交数据成功
page.grid.reload();
}
learun.layer.loading(false);
});
}
}, '智慧校园提示', ['取消', '确定']);
},
btnClickOfReply: function (item, $item, $page) {// 左滑按钮点击事件
if (item.SendFlag !== 1) {
learun.layer.warning("当前投诉意见未提交,请先提交!");
return false;
}
if (item.ReplyFlag !== 1) {
learun.layer.warning("当前投诉意见未回复!");
return false;
}
learun.nav.go({ path: 'EducationalAdministration/Sys_SendComplaint/reply', title: '回复情况', type: 'right', param: { keyValue: item.SComplaintId } });
},
rowBtns: [
'<a class="lr-btn-danger">删除</a>',
'<a class="lr-btn-blue">提交</a>',
'<a class="lr-btn-green">回复情况</a>'
] // 列表行左滑按钮
};
return page;
})();

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/form/form.css 查看文件

@@ -0,0 +1 @@


+ 17
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/form/form.html 查看文件

@@ -0,0 +1,17 @@
<div class="lr-form-container">
<div class="lr-form-row " data-table="Sys_SendComplaint">
<font face="宋体">*</font>
<label>投诉编号</label>
<input id="ComplaintCode" type="text" isvalid="yes" checkexpession="NotNull" errormsg="投诉编号" readonly="readonly"/>
</div>
<div class="lr-form-row " data-table="Sys_SendComplaint">
<font face="宋体">*</font>
<label>主题</label>
<input id="Title" type="text" isvalid="yes" checkexpession="NotNull" errormsg="主题" />
</div>
<div class="lr-form-row lr-form-row-multi" data-table="Sys_SendComplaint">
<font face="宋体">*</font>
<label>投诉意见</label>
<textarea id="Contents" isvalid="yes" checkexpession="NotNull" errormsg="投诉意见"></textarea>
</div>
</div>

+ 169
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/form/form.js 查看文件

@@ -0,0 +1,169 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2021-04-30 16:33
* 描 述:发送投诉意见
*/
(function () {
var keyValue = '';
var SendFlag = '';//提交状态
var $header = null;
var titleText = '';
var page = {
isScroll: true,
init: function ($page, param) {
keyValue = param.keyValue;
SendFlag = param.SendFlag;
// 添加头部按钮列表
var _html = '\
<div class="lr-form-header-cancel" >取消</div>\
<div class="lr-form-header-btnlist" >\
<div class="lr-form-header-more" ><i class="iconfont icon-more" ></i></div>\
<div class="lr-form-header-edit" ><i class="iconfont icon-edit" ></i></div>\
</div>\
<div class="lr-form-header-submit" >提交</div>';
$header = $page.parents('.f-page').find('.f-page-header');
$header.append(_html);
// 取消
$header.find('.lr-form-header-cancel').on('tap', function () {
learun.layer.confirm('确定要退出当前编辑?', function (_index) {
if (_index === '1') {
if (keyValue) {// 如果是编辑状态
learun.formblur();
$header.find('.lr-form-header-cancel').hide();
$header.find('.lr-form-header-submit').hide();
$header.find('.lr-form-header-btnlist').show();
$header.find('.f-page-title').text(titleText);
$page.find('.lr-form-container').setFormRead();
}
else {// 如果是新增状态 关闭当前页面
learun.nav.closeCurrent();
}
}
}, '智慧校园提示', ['取消', '确定']);
});
// 编辑
$header.find('.lr-form-header-edit').on('tap', function () {
if (keyValue) {
if (SendFlag !== 0) {
learun.layer.warning("当前投诉意见已提交,不能编辑!");
return false;
}
}
$header.find('.lr-form-header-btnlist').hide();
$header.find('.lr-form-header-cancel').show();
$header.find('.lr-form-header-submit').show();
titleText = $header.find('.f-page-title').text();
$header.find('.f-page-title').text('编辑');
$page.find('.lr-form-container').setFormWrite();
});
// 更多
$header.find('.lr-form-header-more').on('tap', function () {
learun.actionsheet({
id: 'more',
data: [
{
text: '删除',
mark: true,
event: function () {// 删除当前条信息
learun.layer.confirm('确定要删除该笔数据吗?', function (_index) {
if (_index === '1') {
learun.layer.loading(true, '正在删除该笔数据');
learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/delete', keyValue, (data) => {
learun.layer.loading(false);
if (data) {// 删除数据成功
learun.nav.closeCurrent();
var prepage = learun.nav.getpage('EducationalAdministration/Sys_SendComplaint');
prepage.grid.reload();
}
});
}
}, '智慧校园提示', ['取消', '确定']);
}
}
],
cancel: function () {
}
});
});
// 提交
$header.find('.lr-form-header-submit').on('tap', function () {
// 获取表单数据
if (!$page.find('.lr-form-container').lrformValid()) {
return false;
}
var _postData = {}
_postData.keyValue = keyValue;
_postData.strEntity = JSON.stringify($page.find('.lr-form-container').lrformGet());
learun.layer.loading(true, '正在提交数据');
learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/save', _postData, (data) => {
learun.layer.loading(false);
if (data) {// 表单数据保存成功
if (keyValue) {
learun.layer.toast('保存数据成功!');
learun.formblur();
$header.find('.lr-form-header-cancel').hide();
$header.find('.lr-form-header-submit').hide();
$header.find('.lr-form-header-btnlist').show();
$header.find('.f-page-title').text(titleText);
$page.find('.lr-form-container').setFormRead();
}
else {// 如果是
learun.nav.closeCurrent();
}
var prepage = learun.nav.getpage('EducationalAdministration/Sys_SendComplaint');
prepage.grid.reload();
}
});
});
page.bind($page, param);
if (keyValue) {
// 添加编辑按钮
$page.find('.lr-form-container').setFormRead();
$header.find('.lr-form-header-btnlist').show();
// 获取表单数据
learun.layer.loading(true, '获取表单数据');
learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/form', keyValue, (data) => {
if (data) {
for (var id in data) {
if (data[id].length) {
$page.find('#' + id).lrgridSet(data[id]);
}
else {
$page.find('[data-table="' + id + '"]').lrformSet(data[id]);
}
}
}
learun.layer.loading(false);
});
}
else {
$header.find('.lr-form-header-cancel').show();
$header.find('.lr-form-header-submit').show();
//获取投诉编号
learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/complaintCode', "", (data) => {
if (data && data != "" && data != undefined) {
$page.find('#ComplaintCode').val(data);
} else {
$page.find('#ComplaintCode').val("TS_" + getCode());
}
learun.layer.loading(false);
});
}
},
bind: function ($page, param) {

}, destroy: function (pageinfo) {
$header = null;
keyValue = '';
}
};
return page;
})();
//生成随机数
var getCode = function () {
var a = parseInt(Math.random() * (10000 - 1000 + 1) + 1000);
var now = new Date();
var b = now.getFullYear() + "" + ((now.getMonth() + 1) < 10 ? ("0" + (now.getMonth() + 1)) : (now.getMonth() + 1)) + "" + (now.getDate() < 10 ? ("0" + now.getDate()) : now.getDate()) + "" + (now.getHours() < 10 ? ("0" + now.getHours()) : now.getHours()) + "" + (now.getMinutes() < 10 ? ("0" + now.getMinutes()) : now.getMinutes()) + "" + (now.getSeconds() < 10 ? ("0" + now.getSeconds) : now.getSeconds());
return b + a;
}

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/reply/reply.css 查看文件

@@ -0,0 +1 @@


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/reply/reply.html 查看文件

@@ -0,0 +1,6 @@
<div class="lr-form-container" id="replyList">
<!--<div class="lr-form-row lr-form-row-multi">
<label>回复内容</label>
<textarea readonly="readonly"></textarea>
</div>-->
</div>

+ 45
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Sys_SendComplaint/reply/reply.js 查看文件

@@ -0,0 +1,45 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2021-04-30 16:33
* 描 述:发送投诉意见
*/
(function () {
var keyValue = '';
var $header = null;
var titleText = '';
var page = {
isScroll: true,
init: function ($page, param) {
keyValue = param.keyValue;
page.bind($page, param);
if (keyValue) {
// 获取表单数据
learun.layer.loading(true, '获取表单数据');
learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/Sys_SendComplaint/replylist', keyValue, (data) => {
if (data) {
var html = '';
for (var id in data) {
for (var i = 0; i < data[id].length; i++) {
html += '<div class="lr-form-row lr-form-row-multi">';
html += '<label>回复内容</label>';
html += '<textarea readonly="readonly">' + data[id][i].ReplyContents + '</textarea>';
html += '</div>';
}
}
$page.find('#replyList').html(html);
}
learun.layer.loading(false);
});
}
},
bind: function ($page, param) {

}, destroy: function (pageinfo) {
$header = null;
keyValue = '';
}
};
return page;
})();


+ 247
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Controllers/Ask_MainOfTeacherController.cs 查看文件

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

namespace Learun.Application.Web.Areas.Ask.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-04-23 15:50
/// 描 述:教师问卷管理
/// </summary>
public class Ask_MainOfTeacherController : MvcControllerBase
{
private Ask_MainOfTeacherIBLL ask_MainOfTeacherIBLL = new Ask_MainOfTeacherBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}

[HttpGet]
public ActionResult AnswerIndex()
{
return View();
}

[HttpGet]
public ActionResult TeacherIndex()
{
var logininfo = LoginUserInfo.Get();
ViewBag.EmpNo = logininfo.account;
ViewBag.EmpName = logininfo.realName;
return View();
}
[HttpGet]
public ActionResult AnswerQuery()
{
return View();
}

[HttpGet]
public ActionResult Paper(string VID)
{
ViewBag.EmpNo = LoginUserInfo.Get().account;
ViewBag.EmpName = LoginUserInfo.Get().realName;
if (!string.IsNullOrEmpty(VID))
{
var Ask_MainOfTeacher = ask_MainOfTeacherIBLL.GetAsk_MainOfTeacherEntityAndQuestions(VID);
return View(Ask_MainOfTeacher);
}
else
{
return View();
}
}
[HttpGet]
public ActionResult PaperAdminView(string VID)
{
ViewBag.EmpNo = LoginUserInfo.Get().account;
ViewBag.EmpName = LoginUserInfo.Get().realName;
if (!string.IsNullOrEmpty(VID))
{
var Ask_MainOfTeacher = ask_MainOfTeacherIBLL.GetAsk_MainOfTeacherEntityAndQuestions(VID);
return View(Ask_MainOfTeacher);
}
else
{
return View();
}
}
[HttpGet]
public ActionResult PaperView(string VID,string EmpNo)
{
if (!string.IsNullOrEmpty(VID))
{
var Ask_MainOfTeacher = ask_MainOfTeacherIBLL.GetAsk_MainOfTeacherEntityAndQuestionsResult(VID, EmpNo);
return View(Ask_MainOfTeacher);
}
else
{
return View();
}
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
ViewBag.VSerial = "Table_" + CommonHelper.CreateNo();
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = ask_MainOfTeacherIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}

[HttpGet]
[AjaxOnly]
public ActionResult GetTeacherPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = ask_MainOfTeacherIBLL.GetTeacherPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}

[HttpGet]
[AjaxOnly]
public ActionResult GetAnswerPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = ask_MainOfTeacherIBLL.GetTeacherPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// <summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var Ask_MainOfTeacherData = ask_MainOfTeacherIBLL.GetAsk_MainOfTeacherEntity(keyValue);
var jsonData = new
{
Ask_MainOfTeacher = Ask_MainOfTeacherData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
ask_MainOfTeacherIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}

[HttpPost]
[AjaxOnly]
public ActionResult SubmitForm(string keyValue)
{
ask_MainOfTeacherIBLL.ChangeFormStatus(keyValue, true);
return Success("操作成功!");
}

[HttpPost]
[AjaxOnly]
public ActionResult UnSubmitForm(string keyValue)
{
ask_MainOfTeacherIBLL.ChangeFormStatus(keyValue, false);
return Success("操作成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
var userinfo = LoginUserInfo.Get();
Ask_MainOfTeacherEntity entity = strEntity.ToObject<Ask_MainOfTeacherEntity>();
entity.UID = userinfo.userId;
entity.UName = userinfo.realName;
entity.VCreateTime = DateTime.Now;
entity.Status = false;
entity.SPVNum = 0;
entity.SPNum = 0;
entity.SClick = 0;
ask_MainOfTeacherIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}

[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
[ValidateInput(false)]
public ActionResult TeacherSubmitForm(string answerlist,string VID)
{
var userinfo = LoginUserInfo.Get();
List<Ask_QuestionResultEntity> entity = answerlist.ToObject<List<Ask_QuestionResultEntity>>();
ask_MainOfTeacherIBLL.SaveAsk_QuestionResultEntity(entity, VID,userinfo.account,userinfo.realName, userinfo.iPAddress);
return Success("保存成功!");
}
#endregion

}
}

+ 8
- 6
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Controllers/Ask_QuestionItemsController.cs 查看文件

@@ -3,6 +3,7 @@ using System.Data;
using Learun.Application.TwoDevelopment.Ask;
using System.Web.Mvc;
using System.Collections.Generic;
using System.Linq;

namespace Learun.Application.Web.Areas.Ask.Controllers
{
@@ -26,7 +27,7 @@ namespace Learun.Application.Web.Areas.Ask.Controllers
[HttpGet]
public ActionResult Index()
{
return View();
return View();
}
/// <summary>
/// 表单页
@@ -35,7 +36,7 @@ namespace Learun.Application.Web.Areas.Ask.Controllers
[HttpGet]
public ActionResult Form()
{
return View();
return View();
}
#endregion

@@ -66,7 +67,7 @@ namespace Learun.Application.Web.Areas.Ask.Controllers
[AjaxOnly]
public ActionResult GetAnalysisList(string queryJson)
{
var data = ask_QuestionItemsIBLL.GetAnalysisList(queryJson);
var data = ask_QuestionItemsIBLL.GetAnalysisList(queryJson).OrderBy(x => x.IOrder);
return Success(data);
}
/// <summary>
@@ -77,8 +78,9 @@ namespace Learun.Application.Web.Areas.Ask.Controllers
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var Ask_QuestionItemsData = ask_QuestionItemsIBLL.GetAsk_QuestionItemsEntity( keyValue );
var jsonData = new {
var Ask_QuestionItemsData = ask_QuestionItemsIBLL.GetAsk_QuestionItemsEntity(keyValue);
var jsonData = new
{
Ask_QuestionItems = Ask_QuestionItemsData,
};
return Success(jsonData);
@@ -110,7 +112,7 @@ namespace Learun.Application.Web.Areas.Ask.Controllers
public ActionResult SaveForm(string keyValue, string strEntity)
{
Ask_QuestionItemsEntity entity = strEntity.ToObject<Ask_QuestionItemsEntity>();
ask_QuestionItemsIBLL.SaveEntity(keyValue,entity);
ask_QuestionItemsIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}
#endregion


+ 38
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/AnswerIndex.cshtml 查看文件

@@ -0,0 +1,38 @@
@{
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="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">姓名</div>
<input id="EmpName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">编号</div>
<input id="EmpNo" type="text" class="form-control" />
</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_view" class="btn btn-default"><i class="fa fa-building-o"></i>&nbsp;查看答卷</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/Ask/Views/Ask_MainOfTeacher/AnswerIndex.js")

+ 88
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/AnswerIndex.js 查看文件

@@ -0,0 +1,88 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2019-04-23 15:50
* 描 述:教师问卷管理
*/
var refreshGirdData;
var VID = request("VID");
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 答题情况
$('#lr_view').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('VID');
var EmpNo = $('#gridtable').jfGridValue('EmpNo');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('IsAnswer');
if (Status === false || Status === 'false') {
learun.alert.warning("当前项目未交卷!");
return;
}
learun.frameTab.open({ F_ModuleId: 'paper' + keyValue, F_Icon: 'fa fa-window-maximize', F_FullName: '量表考核答卷', F_UrlAddress: '/Ask/Ask_MainOfTeacher/PaperView?VID=' + keyValue + '&EmpNo=' + EmpNo });
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/Ask/Ask_MainOfTeacher/GetAnswerPageList',
headData: [
{ label: "姓名", name: "EmpName", width: 80, align: "left" },
{ label: "编号", name: "EmpNo", width: 80, align: "left" },
{
label: "性别", name: "GenderNo", width: 80, align: "left",
formatter: function (cellvalue) {
return cellvalue.toLowerCase() === true || cellvalue.toLowerCase() == "true" ? "男" : "女";
}
},
{
label: "考核部门", name: "DepartmentId", width: 150, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
}
},
{
label: "是否交卷", name: "IsAnswer", width: 80, align: "left", formatter: function (cellvalue) {
return cellvalue === true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
},
{ label: "得分", name: "TotalScore", width: 80, align: "left" }
],
mainId: 'EmpNo',
isPage: true,
sidx: 'TotalScore',
sord: 'DESC'
});
page.search();
},
search: function (param) {
param = param || {};
param.VID = VID;
param.Manager = true;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
page.search();
};
page.init();
}

+ 46
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/AnswerQuery.cshtml 查看文件

@@ -0,0 +1,46 @@
@{
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="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">标题</div>
<input id="VTitle" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">问卷编号</div>
<input id="VSerial" type="text" class="form-control" />
</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_question" class="btn btn-default"><i class="fa fa-navicon"></i>&nbsp;管理问题</a>
<a id="lr_answer" class="btn btn-default"><i class="fa fa-building-o"></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-lock"></i>&nbsp; 审核</a>
<a id="lr_unsubmit" class="btn btn-default"><i class="fa fa-unlock"></i>&nbsp; 去审核</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/Ask/Views/Ask_MainOfTeacher/AnswerQuery.js")

+ 217
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/AnswerQuery.js 查看文件

@@ -0,0 +1,217 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2019-04-23 15:50
* 描 述:教师问卷管理
*/
var refreshGirdData;
var ATId;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.inittree();
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
if (!ATId) {
learun.alert.warning('请选择分类!');
return false;
}
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/Ask/Ask_MainOfTeacher/Form?ATId=' + ATId,
width: 780,
height: 560,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('VID');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status === true || Status == 'true') {
learun.alert.warning("当前项目已审核不能修改!");
return;
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/Ask/Ask_MainOfTeacher/Form?keyValue=' + keyValue,
width: 780,
height: 560,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('VID');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status === true || Status == 'true') {
learun.alert.warning("当前项目已审核不能删除!");
return;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/Ask/Ask_MainOfTeacher/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
// 管理问题
$('#lr_question').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('VID');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status === true || Status == 'true') {
learun.alert.warning("当前项目已审核不能修改!");
return;
}
learun.layerForm({
id: 'formquestion',
title: '管理问题',
url: top.$.rootUrl + '/Ask/Ask_Question/Index?VID=' + keyValue,
width: 980,
height: 760,
btn:null
});
}
});
// 答题情况
$('#lr_answer').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('VID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formanswer',
title: '答题情况',
url: top.$.rootUrl + '/Ask/Ask_MainOfTeacher/AnswerIndex?VID=' + keyValue,
width: 980,
height: 760,
btn:null
});
}
});
//  审核
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('VID');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status === true || Status == 'true') {
learun.alert.warning("当前项目已审核!");
return;
}
learun.layerConfirm('是否确认审核该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/Ask/Ask_MainOfTeacher/SubmitForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//  去审核
$('#lr_unsubmit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('VID');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status !== true && Status !== 'true') {
learun.alert.warning("当前项目已去审核!");
return;
}
learun.layerConfirm('是否确认去审核该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/Ask/Ask_MainOfTeacher/UnSubmitForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
},
inittree: function () {
$('#companyTree').lrtree({
url: top.$.rootUrl + '/Ask/Ask_Type/GetAllTree',
nodeClick: page.treeNodeClick
});
},
treeNodeClick: function (item) {
ATId = item.id;
$('#titleinfo').text(item.text);
page.search();
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/Ask/Ask_MainOfTeacher/GetPageList',
headData: [
{ label: "问卷编号", name: "VSerial", width: 180, align: "left" },
{ label: "标题", name: "VTitle", width: 200, align: "left" },
{
label: "类别", name: "ATId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ask_Type',
key: value,
keyId: 'atid',
callback: function (_data) {
callback(_data['atname']);
}
});
}
},
{ label: "开始时间", name: "VStartTime", width: 100, align: "left" },
{ label: "结束时间", name: "VStopTime", width: 100, align: "left" },
{ label: "考核部门", name: "DepartmentIdsName", width: 150, align: "left" },
{ label: "考核人数", name: "SPVNum", width: 80, align: "left" },
{ label: "填写人数", name: "SPNum", width: 80, align: "left" },
{ label: "点击热度", name: "SClick", width: 80, align: "left" },
{ label: "排序", name: "VOrder", width: 80, align: "left" },
{
label: "是否匿名", name: "VHide", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
},
{
label: "审核标志", name: "Status", width: 100, align: "left", formatter: function (cellvalue) {
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
}
],
mainId: 'VID',
isPage: true,
sidx:'VOrder'
});
page.search();
},
search: function (param) {
param = param || {};
param.ATId = ATId;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
page.search();
};
page.init();
}

+ 48
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/Form.cshtml 查看文件

@@ -0,0 +1,48 @@
@{
ViewBag.Title = "教师问卷管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<script type="text/javascript">
var NewVSerial = "@ViewBag.VSerial";
</script>
<div class="lr-form-wrap">
<div class="col-xs-12 lr-form-item" data-table="Ask_MainOfTeacher" >
<div class="lr-form-item-title">问卷编号</div>
<input id="VSerial" type="text" class="form-control" readonly="readonly" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Ask_MainOfTeacher" >
<div class="lr-form-item-title">标题<font face="宋体">*</font></div>
<input id="VTitle" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ask_MainOfTeacher">
<div class="lr-form-item-title">类别<font face="宋体">*</font></div>
<div id="ATId" isvalid="yes" checkexpession="NotNull"></div>
<input id="ATName" type="hidden" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ask_MainOfTeacher" >
<div class="lr-form-item-title">排序<font face="宋体">*</font></div>
<input id="VOrder" type="text" class="form-control" isvalid="yes" checkexpession="Num" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ask_MainOfTeacher" >
<div class="lr-form-item-title">开始时间<font face="宋体">*</font></div>
<input id="VStartTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ maxDate:'#F{$dp.$D(\'VStopTime\')}',dateFmt:'yyyy-MM-dd',onpicked: function () { $('#VStartTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ask_MainOfTeacher" >
<div class="lr-form-item-title">结束时间<font face="宋体">*</font></div>
<input id="VStopTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'VStartTime\')}',dateFmt:'yyyy-MM-dd',onpicked: function () { $('#VStopTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ask_MainOfTeacher">
<div class="lr-form-item-title">考核部门</div>
<div id="DepartmentIds"></div>
<input id="DepartmentIdsName" type="hidden" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ask_MainOfTeacher" >
<div class="lr-form-item-title">是否匿名<font face="宋体">*</font></div>
<div id="VHide" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Ask_MainOfTeacher" >
<div class="lr-form-item-title">备注说明</div>
<textarea id="VContent" class="form-control" style="height:150px;" ></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/Ask/Views/Ask_MainOfTeacher/Form.js")

+ 73
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/Form.js 查看文件

@@ -0,0 +1,73 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2019-04-23 15:50
* 描 述:教师问卷管理
*/
var acceptClick;
var keyValue = request('keyValue');
var pATId = request("ATId");
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#ATId').lrselect({
type: 'tree',
// 展开最大高度
maxHeight: 200,
// 是否允许搜索
allowSearch: true,
// 访问数据接口地址
url: top.$.rootUrl + '/Ask/Ask_Type/GetAllTree',
select: function(item) {
if (item != null && item != undefined) {
$("#ATName").val(item.text);
}
}
});
if (!!pATId) {
$('#ATId').lrselectSet(pATId);
}
$('#DepartmentIds').lrDepartmentSelect({ type: 'treemultiple' });
$('#VHide').lrDataItemSelect({ code: 'YesOrNoBit' });
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/Ask/Ask_MainOfTeacher/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]);
}
}
});
} else {
$("#VSerial").val(NewVSerial);
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
$("#DepartmentIdsName").val($("#DepartmentIds").find(".lr-select-placeholder").text());
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/Ask/Ask_MainOfTeacher/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 57
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/Index.cshtml 查看文件

@@ -0,0 +1,57 @@
@{
ViewBag.Title = "教师问卷管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout lr-layout-left-center" id="lr_layout">
<div class="lr-layout-left">
<div class="lr-layout-wrap">
<div class="lr-layout-title lrlt ">分类</div>
<div id="companyTree" class="lr-layout-body"></div>
</div>
</div>
<div class="lr-layout-center">
<div class="lr-layout-wrap">
<div class="lr-layout-title">
<span id="titleinfo" class="lrlt">未选择分类</span> - <span class="lrlt">分类信息</span>
</div>
<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>
<input id="VTitle" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">问卷编号</div>
<input id="VSerial" type="text" class="form-control" />
</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_question" class="btn btn-default"><i class="fa fa-navicon"></i>&nbsp;管理问题</a>
<a id="lr_answer" class="btn btn-default"><i class="fa fa-building-o"></i>&nbsp;答题情况</a>
<a id="lr_analysis" class="btn btn-default"><i class="fa fa-building-o"></i>&nbsp;结果分析</a>
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></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-lock"></i>&nbsp; 审核</a>
<a id="lr_unsubmit" class="btn btn-default"><i class="fa fa-unlock"></i>&nbsp; 去审核</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/Ask/Views/Ask_MainOfTeacher/Index.js")

+ 237
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/Index.js 查看文件

@@ -0,0 +1,237 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2019-04-23 15:50
* 描 述:教师问卷管理
*/
var refreshGirdData;
var ATId;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.inittree();
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
if (!ATId) {
learun.alert.warning('请选择分类!');
return false;
}
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/Ask/Ask_MainOfTeacher/Form?ATId=' + ATId,
width: 780,
height: 560,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('VID');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status === true || Status == 'true') {
learun.alert.warning("当前项目已审核不能修改!");
return;
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/Ask/Ask_MainOfTeacher/Form?keyValue=' + keyValue,
width: 780,
height: 560,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('VID');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status === true || Status == 'true') {
learun.alert.warning("当前项目已审核不能删除!");
return;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/Ask/Ask_MainOfTeacher/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
// 管理问题
$('#lr_question').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('VID');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status === true || Status == 'true') {
learun.alert.warning("当前项目已审核不能修改!");
return;
}
learun.layerForm({
id: 'formquestion',
title: '管理问题',
url: top.$.rootUrl + '/Ask/Ask_Question/Index?VID=' + keyValue,
width: 980,
height: 760,
btn: null
});
}
});
// 结果分析
$('#lr_analysis').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('VID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formanalysis',
title: '结果分析',
url: top.$.rootUrl + '/Ask/Ask_Question/AnalysisIndex?VID=' + keyValue,
width: 1000,
height: 760,
btn: null
});
}
});
// 答题情况
$('#lr_answer').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('VID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formanswer',
title: '答题情况',
url: top.$.rootUrl + '/Ask/Ask_MainOfTeacher/AnswerIndex?VID=' + keyValue,
width: 980,
height: 760,
btn: null
});
}
});
$('#lr_view').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('VID');
if (learun.checkrow(keyValue)) {
top.learun.frameTab.open({ F_ModuleId: 'paper' + keyValue, F_Icon: 'fa fa-window-maximize', F_FullName: '量表考核答卷', F_UrlAddress: '/Ask/Ask_MainOfTeacher/PaperAdminView?VID=' + keyValue });
}
});
//  审核
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('VID');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status === true || Status == 'true') {
learun.alert.warning("当前项目已审核!");
return;
}
learun.layerConfirm('是否确认审核该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/Ask/Ask_MainOfTeacher/SubmitForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//  去审核
$('#lr_unsubmit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('VID');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status !== true && Status !== 'true') {
learun.alert.warning("当前项目已去审核!");
return;
}
learun.layerConfirm('是否确认去审核该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/Ask/Ask_MainOfTeacher/UnSubmitForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
},
inittree: function () {
$('#companyTree').lrtree({
url: top.$.rootUrl + '/Ask/Ask_Type/GetAllTree',
nodeClick: page.treeNodeClick
});
},
treeNodeClick: function (item) {
ATId = item.id;
$('#titleinfo').text(item.text);
page.search();
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/Ask/Ask_MainOfTeacher/GetPageList',
headData: [
{ label: "问卷编号", name: "VSerial", width: 180, align: "left" },
{ label: "标题", name: "VTitle", width: 200, align: "left" },
{
label: "类别", name: "ATId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ask_Type',
key: value,
keyId: 'atid',
callback: function (_data) {
callback(_data['atname']);
}
});
}
},
{ label: "开始时间", name: "VStartTime", width: 100, align: "left" },
{ label: "结束时间", name: "VStopTime", width: 100, align: "left" },
{ label: "考核部门", name: "DepartmentIdsName", width: 150, align: "left" },
{ label: "考核人数", name: "SPVNum", width: 80, align: "left" },
{ label: "填写人数", name: "SPNum", width: 80, align: "left" },
{ label: "点击热度", name: "SClick", width: 80, align: "left" },
{ label: "排序", name: "VOrder", width: 80, align: "left" },
{
label: "是否匿名", name: "VHide", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
},
{
label: "审核标志", name: "Status", width: 100, align: "left", formatter: function (cellvalue) {
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
}
],
mainId: 'VID',
isPage: true,
sidx: 'VOrder'
});
page.search();
},
search: function (param) {
param = param || {};
param.ATId = ATId;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
page.search();
};
page.init();
}

+ 66
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/Paper.cshtml 查看文件

@@ -0,0 +1,66 @@
@{
ViewBag.Title = "教师问卷管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
@model Learun.Application.TwoDevelopment.Ask.Ask_MainOfTeacherEntity
<link href="~/Content/paper/css/common.css" rel="stylesheet" />
<link href="~/Content/paper/dist/demo.css" rel="stylesheet" />
<link href="~/Content/paper/css/index.css" rel="stylesheet" />
<script src="~/Content/paper/dist/jquery.validator.min.js?local=zh-CN"></script>
<script type="text/javascript">
$.lrToken = $('@Html.AntiForgeryToken()').val();
</script>
<div class="warpper" style="background-color: #FFFFFF;">
<!-- / index_sec1 -->
<div class="index_sec index_sec1">
<input id="EmpNo" type="hidden" value="@ViewBag.EmpNo" />
<input id="EmpName" type="hidden" value="@ViewBag.EmpName" />
<div class="inSecTitle">@Model.VTitle</div>
<div class="inSecTime">@(Model.VStartTime.HasValue ? Model.VStartTime.Value.ToShortDateString() : "")~@(Model.VStopTime.HasValue ? Model.VStopTime.Value.ToShortDateString() : "")</div>
<div class="index_box">
<form id="AskPaper">
@foreach (var question in Model.Ask_Questions)
{
<div class="signSec2Box">
<div class="shenInput form-item">
<div class="shenInputBox">
<div class="signTxt">@question.QTitle @Html.Raw((question.QMust == true ? "<font style=\"color: red\">*</font>" : "")) @(question.QType == 2 && (question.QMin.HasValue) ? "最少选择" + question.QMin.Value + "项" : "") @(question.QType == 2 && (question.QMax.HasValue) ? "最多选择" + question.QMax.Value + "项" : "")</div>
<div class="inputRadioRow">
@foreach (var questionitem in question.Ask_QuestionItems)
{
<div class="inputRadioCol4">
<i class="@(question.QType == 1 ? "inputRadio" : "inputCheck")" hasinput="@(questionitem.QShowText == true ? "yes" : "")"><input id="@questionitem.IID" qid="@question.QID" hasinput="@(questionitem.QShowText == true ? "yes" : "")" @(question.QMust == true ? "data-rule=" + (question.QTypeString == "input" ? "\"required;\"" : "\"checked;\"") + (question.QMin.HasValue ? "checked(" + question.QMin.Value + "~);" : "") + (question.QMax.HasValue ? "checked(~" + question.QMax.Value + ");" : "") : "") name="@question.QSerial" type="@question.QTypeString" class="xuanze" /></i> <span>@questionitem.ITitle</span>
</div>
}
</div>
</div>
</div>
@if (question.Ask_QuestionItems.Count(m => m.QShowText == true) > 0)
{
<div class="shenInput form-item shenInput3">
<span>@question.Ask_QuestionItems.FirstOrDefault(m => m.QShowText == true).ITitle</span>
<div class="shenInputBox shenInputBox1">
<input id="@(question.Ask_QuestionItems.FirstOrDefault(m => m.QShowText == true).IID)Other" qid="@question.QID" type="text" name="@(question.QSerial)Other" class="inputTxt" data-rule="required(#@(question.Ask_QuestionItems.FirstOrDefault(m => m.QShowText == true).IID):checked)" />
</div>
</div>
}

</div>
}

<div class="shenBtnBox">
<div class="signTxt">本人声明在此报名表中填写的所有信息、 及提供与本表相关的一切资料均真实、准确</div>
<div class="shenRow">
<div class="shenCol6">
<div class="shenBtn">提&nbsp;&nbsp;交</div>
</div>
</div>
</div>
</form>
</div>
</div>
<!-- / index_sec1 -->


</div>
@Html.AppendJsFile("/Areas/Ask/Views/Ask_MainOfTeacher/Paper.js")

+ 77
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/Paper.js 查看文件

@@ -0,0 +1,77 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2019-04-23 15:50
* 描 述:教师问卷管理
*/
var refreshGirdData;
var VID = request("VID");
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.warpper').lrscroll();
page.bind();
},
bind: function () {
$('.shenBtn').click(function () {
$('#AskPaper').trigger("validate");
});
//单选框
$('.shenInputBox').on('click',
'.inputRadio',
function () {
if (!$(this).hasClass('active')) {
$(this).addClass('active').parents('.shenInputBox').find('.inputRadio').not($(this))
.removeClass('active');
judgeRideo($(this));
}
});

//多选框
$('.inputCheck').click(function () {
if ($(this).hasClass('active')) {
$(this).removeClass('active');
} else {
$(this).addClass('active');
}
judgeRideo($(this));
});
//是否为其他选项判断
function judgeRideo(obj) {
var parents = obj.parents('.signSec2Box');
var inputs = parents.find('.shenInput3');
if (parents.find("i[hasinput='yes']").hasClass('active')) {
inputs.css({ display: 'block' });
} else {
inputs.css({ display: 'none' });
}
}
$('#AskPaper').validator({
timely: 2,
theme: 'yellow_right_effect',
valid: function (form) {
learun.layerConfirm('是否确认提交答案?', function (res) {
var answerlist = new Array();
var strStuNo = $("#EmpNo").val();
var strStuName = $("#EmpName").val();
$(form).find("input.xuanze:checked").each(function (index, element) {
var itemvalue = { QID: $(this).attr("qid"), IID: $(this).attr("id"), UText: "", UID: strStuNo, UName:strStuName};
if ($(this).attr("hasinput")=="yes") {
itemvalue.UText = $("#" + $(this).attr("id") + "Other").val();
}
answerlist.push(itemvalue);
});
if (res) {
learun.postForm(top.$.rootUrl + '/Ask/Ask_MainOfTeacher/TeacherSubmitForm', { answerlist: JSON.stringify(answerlist), VID: VID, "__RequestVerificationToken": $.lrToken }, function () {
learun.frameTab.parentIframe().refreshGirdData();
learun.frameTab.close("paper" + VID);
});
}
});
}
});
}
};
page.init();
}

+ 57
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/PaperAdminView.cshtml 查看文件

@@ -0,0 +1,57 @@
@{
ViewBag.Title = "教师问卷管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
@model Learun.Application.TwoDevelopment.Ask.Ask_MainOfTeacherEntity
<link href="~/Content/paper/css/common.css" rel="stylesheet" />
<link href="~/Content/paper/dist/demo.css" rel="stylesheet" />
<link href="~/Content/paper/css/index.css" rel="stylesheet" />
<script src="~/Content/paper/dist/jquery.validator.min.js?local=zh-CN"></script>
<script type="text/javascript">
$.lrToken = $('@Html.AntiForgeryToken()').val();
</script>
<div class="warpper" style="background-color: #FFFFFF;">
<!-- / index_sec1 -->
<div class="index_sec index_sec1">
<input id="EmpNo" type="hidden" value="@ViewBag.EmpNo" />
<input id="EmpName" type="hidden" value="@ViewBag.EmpName" />
<div class="inSecTitle">@Model.VTitle</div>
<div class="inSecTime">@(Model.VStartTime.HasValue ? Model.VStartTime.Value.ToShortDateString() : "")~@(Model.VStopTime.HasValue ? Model.VStopTime.Value.ToShortDateString() : "")</div>
<div class="index_box">
<form id="AskPaper">
@foreach (var question in Model.Ask_Questions)
{
<div class="signSec2Box">
<div class="shenInput form-item">
<div class="shenInputBox">
<div class="signTxt">@question.QTitle @Html.Raw((question.QMust == true ? "<font style=\"color: red\">*</font>" : "")) @(question.QType == 2 && (question.QMin.HasValue) ? "最少选择" + question.QMin.Value + "项" : "") @(question.QType == 2 && (question.QMax.HasValue) ? "最多选择" + question.QMax.Value + "项" : "")</div>
<div class="inputRadioRow">
@foreach (var questionitem in question.Ask_QuestionItems)
{
<div class="inputRadioCol4">
<i class="@(question.QType == 1 ? "inputRadio" : "inputCheck")" hasinput="@(questionitem.QShowText == true ? "yes" : "")"><input id="@questionitem.IID" qid="@question.QID" hasinput="@(questionitem.QShowText == true ? "yes" : "")" @(question.QMust == true ? "data-rule=" + (question.QTypeString == "input" ? "\"required;\"" : "\"checked;\"") + (question.QMin.HasValue ? "checked(" + question.QMin.Value + "~);" : "") + (question.QMax.HasValue ? "checked(~" + question.QMax.Value + ");" : "") : "") name="@question.QSerial" type="@question.QTypeString" class="xuanze" /></i> <span>@questionitem.ITitle</span>
</div>
}
</div>
</div>
</div>
@if (question.Ask_QuestionItems.Count(m => m.QShowText == true) > 0)
{
<div class="shenInput form-item shenInput3">
<span>@question.Ask_QuestionItems.FirstOrDefault(m => m.QShowText == true).ITitle</span>
<div class="shenInputBox shenInputBox1">
<input id="@(question.Ask_QuestionItems.FirstOrDefault(m => m.QShowText == true).IID)Other" qid="@question.QID" type="text" name="@(question.QSerial)Other" class="inputTxt" data-rule="required(#@(question.Ask_QuestionItems.FirstOrDefault(m => m.QShowText == true).IID):checked)" />
</div>
</div>
}

</div>
}
</form>
</div>
</div>
<!-- / index_sec1 -->


</div>
@Html.AppendJsFile("/Areas/Ask/Views/Ask_MainOfTeacher/PaperAdminView.js")

+ 77
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/PaperAdminView.js 查看文件

@@ -0,0 +1,77 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2019-04-23 15:50
* 描 述:教师问卷管理
*/
var refreshGirdData;
var VID = request("VID");
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.warpper').lrscroll();
page.bind();
},
bind: function () {
$('.shenBtn').click(function () {
$('#AskPaper').trigger("validate");
});
//单选框
$('.shenInputBox').on('click',
'.inputRadio',
function () {
if (!$(this).hasClass('active')) {
$(this).addClass('active').parents('.shenInputBox').find('.inputRadio').not($(this))
.removeClass('active');
judgeRideo($(this));
}
});

//多选框
$('.inputCheck').click(function () {
if ($(this).hasClass('active')) {
$(this).removeClass('active');
} else {
$(this).addClass('active');
}
judgeRideo($(this));
});
//是否为其他选项判断
function judgeRideo(obj) {
var parents = obj.parents('.signSec2Box');
var inputs = parents.find('.shenInput3');
if (parents.find("i[hasinput='yes']").hasClass('active')) {
inputs.css({ display: 'block' });
} else {
inputs.css({ display: 'none' });
}
}
$('#AskPaper').validator({
timely: 2,
theme: 'yellow_right_effect',
valid: function (form) {
learun.layerConfirm('是否确认提交答案?', function (res) {
var answerlist = new Array();
var strStuNo = $("#EmpNo").val();
var strStuName = $("#EmpName").val();
$(form).find("input.xuanze:checked").each(function (index, element) {
var itemvalue = { QID: $(this).attr("qid"), IID: $(this).attr("id"), UText: "", UID: strStuNo, UName:strStuName};
if ($(this).attr("hasinput")=="yes") {
itemvalue.UText = $("#" + $(this).attr("id") + "Other").val();
}
answerlist.push(itemvalue);
});
if (res) {
learun.postForm(top.$.rootUrl + '/Ask/Ask_MainOfTeacher/TeacherSubmitForm', { answerlist: JSON.stringify(answerlist), VID: VID, "__RequestVerificationToken": $.lrToken }, function () {
learun.frameTab.parentIframe().refreshGirdData();
learun.frameTab.close("paper" + VID);
});
}
});
}
});
}
};
page.init();
}

+ 56
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/PaperView.cshtml 查看文件

@@ -0,0 +1,56 @@
@{
ViewBag.Title = "教师问卷管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
@model Learun.Application.TwoDevelopment.Ask.Ask_MainOfTeacherEntity
<link href="~/Content/paper/css/common.css" rel="stylesheet" />
<link href="~/Content/paper/dist/demo.css" rel="stylesheet" />
<link href="~/Content/paper/css/index.css" rel="stylesheet" />
<script src="~/Content/paper/dist/jquery.validator.min.js?local=zh-CN"></script>
<script type="text/javascript">
$.lrToken = $('@Html.AntiForgeryToken()').val();
</script>
<div class="warpper" style="background-color: #FFFFFF;">
<!-- / index_sec1 -->
<div class="index_sec index_sec1">
<div class="inSecTitle">@Model.VTitle</div>
<div class="inSecTime">@(Model.VStartTime.HasValue ? Model.VStartTime.Value.ToShortDateString() : "")~@(Model.VStopTime.HasValue ? Model.VStopTime.Value.ToShortDateString() : "")</div>
<div class="index_box">
<form id="AskPaper">
@foreach (var question in Model.Ask_Questions)
{
<div class="signSec2Box">
<div class="shenInput form-item">
<div class="shenInputBox">
<div class="signTxt">@question.QTitle @Html.Raw((question.QMust == true ? "<font style=\"color: red\">*</font>" : "")) @(question.QType == 2 && (question.QMin.HasValue) ? "最少选择" + question.QMin.Value + "项" : "") @(question.QType == 2 && (question.QMax.HasValue) ? "最多选择" + question.QMax.Value + "项" : "")</div>
<div class="inputRadioRow">
@foreach (var questionitem in question.Ask_QuestionItems)
{
<div class="inputRadioCol4">
<i class="@(question.QType == 1 ? "inputRadio" : "inputCheck")" hasinput="@(questionitem.QShowText == true ? "yes" : "")"><input id="@questionitem.IID" qid="@question.QID" hasinput="@(questionitem.QShowText == true ? "yes" : "")" @(question.QMust == true ? "data-rule=" + (question.QTypeString == "input" ? "\"required;\"" : "\"checked;\"") + (question.QMin.HasValue ? "checked(" + question.QMin.Value + "~);" : "") + (question.QMax.HasValue ? "checked(~" + question.QMax.Value + ");" : "") : "") name="@question.QSerial" type="@question.QTypeString" class="xuanze" @(questionitem.IsChecked?"checked=\"checked\"":"") /></i> <span>@questionitem.ITitle</span>
</div>
}
</div>
</div>
</div>
@if (question.Ask_QuestionItems.Count(m => m.QShowText == true) > 0)
{
<div class="shenInput form-item shenInput3">
<span>@question.Ask_QuestionItems.FirstOrDefault(m => m.QShowText == true).ITitle</span>
<div class="shenInputBox shenInputBox1">
<input id="@(question.Ask_QuestionItems.FirstOrDefault(m => m.QShowText == true).IID)Other" qid="@question.QID" type="text" name="@(question.QSerial)Other" class="inputTxt" data-rule="required(#@(question.Ask_QuestionItems.FirstOrDefault(m => m.QShowText == true).IID):checked)" value="@(question.Ask_QuestionItems.FirstOrDefault(m => m.QShowText == true&&!string.IsNullOrEmpty(m.UText))!=null?question.Ask_QuestionItems.FirstOrDefault(m => m.QShowText == true&&!string.IsNullOrEmpty(m.UText)).UText:"")" />
</div>
</div>
}

</div>
}

</form>
</div>
</div>
<!-- / index_sec1 -->


</div>
@Html.AppendJsFile("/Areas/Ask/Views/Ask_MainOfTeacher/PaperView.js")

+ 55
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/PaperView.js 查看文件

@@ -0,0 +1,55 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2019-04-23 15:50
* 描 述:教师问卷管理
*/
var refreshGirdData;
var VID = request("VID");
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.warpper').lrscroll();
page.bind();
},
bind: function () {
//单选框
$('.shenInputBox').on('click',
'.inputRadio',
function () {
if (!$(this).hasClass('active')) {
$(this).addClass('active').parents('.shenInputBox').find('.inputRadio').not($(this))
.removeClass('active');
judgeRideo($(this));
}
});

//多选框
$('.inputCheck').click(function () {
if ($(this).hasClass('active')) {
$(this).removeClass('active');
} else {
$(this).addClass('active');
}
judgeRideo($(this));
});
//是否为其他选项判断
function judgeRideo(obj) {
var parents = obj.parents('.signSec2Box');
var inputs = parents.find('.shenInput3');
if (parents.find("i[hasinput='yes']").hasClass('active')) {
inputs.css({ display: 'block' });
} else {
inputs.css({ display: 'none' });
}
}
$('form').find("input.xuanze:checked").each(function (index, element) {
if ($(this).attr("hasinput") == "yes") {
$("#" + $(this).attr("id") + "Other").parents(".shenInput3").css({ display: 'block' });
}
});
}
};
page.init();
}

+ 42
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/TeacherIndex.cshtml 查看文件

@@ -0,0 +1,42 @@
@{
ViewBag.Title = "教师问卷管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
<script type="text/javascript">
var EmpNo = '@ViewBag.EmpNo';
</script>
<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>
<input id="VTitle" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">问卷编号</div>
<input id="VSerial" type="text" class="form-control" />
</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_start" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;开始考核</a>
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;查看答题情况</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/Ask/Views/Ask_MainOfTeacher/TeacherIndex.js")

+ 93
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_MainOfTeacher/TeacherIndex.js 查看文件

@@ -0,0 +1,93 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2019-04-23 15:50
* 描 述:教师问卷管理
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
$('#lr_start').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('VID');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('IsAnswer');
if (Status === true || Status === 'true') {
learun.alert.warning("当前项目已交卷!");
return;
}
top.learun.frameTab.open({ F_ModuleId: 'paper' + keyValue, F_Icon: 'fa fa-window-maximize', F_FullName: '量表考核答卷', F_UrlAddress: '/Ask/Ask_MainOfTeacher/Paper?VID=' + keyValue });
}
});
//查看
$('#lr_view').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('VID');
var EmpNo = $('#gridtable').jfGridValue('EmpNo');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('IsAnswer');
if (Status === false || Status === 'false') {
learun.alert.warning("当前项目未交卷!");
return;
}
top.learun.frameTab.open({ F_ModuleId: 'paper' + keyValue, F_Icon: 'fa fa-window-maximize', F_FullName: '量表考核答卷', F_UrlAddress: '/Ask/Ask_MainOfTeacher/PaperView?VID=' + keyValue + '&EmpNo=' + EmpNo });
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/Ask/Ask_MainOfTeacher/GetTeacherPageList',
headData: [
{ label: "问卷编号", name: "VSerial", width: 180, align: "left" },
{ label: "标题", name: "VTitle", width: 200, align: "left" },
{
label: "类别", name: "ATId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ask_Type',
key: value,
keyId: 'atid',
callback: function (_data) {
callback(_data['atname']);
}
});
}
},
{ label: "开始时间", name: "VStartTime", width: 100, align: "left" },
{ label: "结束时间", name: "VStopTime", width: 100, align: "left" },
{
label: "是否交卷", name: "IsAnswer", width: 80, align: "left", formatter: function (cellvalue) {
return cellvalue === true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
},
{ label: "考核评分", name: "TotalScore", width: 80, align: "left" },
{ label: "提交时间", name: "CreateDate", width: 80, align: "left" }
],
mainId: 'VID',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
param.EmpNo = EmpNo;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
page.search();
};
page.init();
}

+ 10
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs 查看文件

@@ -694,7 +694,7 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers
/// <summary>
/// 审批流程
/// </summary>
/// <param name="operationCode">流程审批操作码agree 同意 disagree 不同意 lrtimeout 超时</param>
/// <param name="operationCode">流程审批操作码agree 同意 disagree 不同意 lrtimeout 超时 back 退回至上一个审核节点</param>
/// <param name="operationName">流程审批操名称</param>
/// <param name="processId">流程进程主键</param>
/// <param name="taskId">流程任务主键</param>
@@ -709,6 +709,15 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers

try
{
//if (operationCode == "back")//退回至上一个审核节点【暂定】
//{
// nWFProcessIBLL.AuditFlow2(operationCode, operationName, processId, taskId, des, auditors, stamp, signUrl, userInfo);
//}
//else
//{
// nWFProcessIBLL.AuditFlow(operationCode, operationName, processId, taskId, des, auditors, stamp, signUrl, userInfo);
//}

nWFProcessIBLL.AuditFlow(operationCode, operationName, processId, taskId, des, auditors, stamp, signUrl, userInfo);
return Success("流程审批成功");
}


+ 17
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj 查看文件

@@ -284,6 +284,7 @@
<Compile Include="Areas\AppManager\AppManagerAreaRegistration.cs" />
<Compile Include="Areas\AppManager\Controllers\DTImgController.cs" />
<Compile Include="Areas\AppManager\Controllers\FunctionManagerController.cs" />
<Compile Include="Areas\Ask\Controllers\Ask_MainOfTeacherController.cs" />
<Compile Include="Areas\AssetManagementSystem\AssetManagementSystemAreaRegistration.cs" />
<Compile Include="Areas\AssetManagementSystem\Controllers\AllocationController.cs" />
<Compile Include="Areas\AssetManagementSystem\Controllers\AssReportController.cs" />
@@ -817,6 +818,14 @@
<Content Include="Areas\AppManager\Views\FunctionManager\Form.css" />
<Content Include="Areas\AppManager\Views\FunctionManager\Form.js" />
<Content Include="Areas\AppManager\Views\FunctionManager\Index.js" />
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\AnswerIndex.js" />
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\AnswerQuery.js" />
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\Form.js" />
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\Index.js" />
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\Paper.js" />
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\PaperAdminView.js" />
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\PaperView.js" />
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\TeacherIndex.js" />
<Content Include="Areas\Ask\Views\Ask_Question\AnalysisIndex.js" />
<Content Include="Areas\AssetManagementSystem\Views\Allocation\Form.js" />
<Content Include="Areas\AssetManagementSystem\Views\Allocation\Index.js" />
@@ -7117,6 +7126,14 @@
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\StatisticTimeForm.cshtml" />
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\StatisticCountIndex.cshtml" />
<Content Include="Areas\LR_ReportModule\Views\ReportTemplate\NWFSchemeReport.cshtml" />
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\AnswerIndex.cshtml" />
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\AnswerQuery.cshtml" />
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\Form.cshtml" />
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\Index.cshtml" />
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\Paper.cshtml" />
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\PaperAdminView.cshtml" />
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\PaperView.cshtml" />
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\TeacherIndex.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\PrintView.cshtml" />
<Content Include="Areas\LR_OAModule\Views\Notice\IndexRecycle.cshtml" />
<Content Include="Areas\LR_SystemModule\Views\Log\ApiIndex.cshtml" />


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj 查看文件

@@ -195,6 +195,8 @@
<Compile Include="Modules\ArrangeLessonTermAttemperApi.cs" />
<Compile Include="Modules\DataSourceNoLoginApi.cs" />
<Compile Include="Modules\AskApi.cs" />
<Compile Include="Modules\EducationalAdministration\Sys_ReceiveComplaintApi.cs" />
<Compile Include="Modules\EducationalAdministration\Sys_SendComplaintApi.cs" />
<Compile Include="Modules\EducationalAdministration\LoginUserBindApi.cs" />
<Compile Include="Modules\PushMessageApi.cs" />
<Compile Include="Modules\EvalApi.cs" />


+ 119
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/Sys_ReceiveComplaintApi.cs 查看文件

@@ -0,0 +1,119 @@
using Nancy;
using Learun.Util;
using System.Collections.Generic;
using System;
using Learun.Application.TwoDevelopment.EducationalAdministration;

namespace Learun.Application.WebApi
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2021-04-30 14:33
/// 描 述:投诉回复
/// </summary>
public class Sys_ReceiveComplaintApi : BaseApi
{
private Sys_ReceiveComplaintIBLL sys_ReceiveComplaintIBLL = new Sys_ReceiveComplaintBLL();
private Sys_SendComplaintIBLL sys_SendComplaintIBLL = new Sys_SendComplaintBLL();

/// <summary>
/// 注册接口
/// <summary>
public Sys_ReceiveComplaintApi()
: base("/Learun/adms/EducationalAdministration/Sys_ReceiveComplaint")
{
Get["/pagelist"] = GetPageList;
Get["/form"] = GetForm;
Post["/delete"] = DeleteForm;
Post["/save"] = SaveForm;
}
#region 获取数据

/// <summary>
/// 获取页面显示列表分页数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetPageList(dynamic _)
{
ReqPageParam parameter = this.GetReqData<ReqPageParam>();
var data = sys_ReceiveComplaintIBLL.GetPageList(parameter.pagination, parameter.queryJson);
var jsonData = new
{
rows = data,
total = parameter.pagination.total,
page = parameter.pagination.page,
records = parameter.pagination.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetForm(dynamic _)
{
string keyValue = this.GetReqData();
var Sys_ReceiveComplaintData = sys_ReceiveComplaintIBLL.GetSys_ReceiveComplaintEntity( keyValue );
var jsonData = new {
Sys_ReceiveComplaint = Sys_ReceiveComplaintData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response DeleteForm(dynamic _)
{
string keyValue = this.GetReqData();
sys_ReceiveComplaintIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response SaveForm(dynamic _)
{
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>();
Sys_ReceiveComplaintEntity entity = parameter.strEntity.ToObject<Sys_ReceiveComplaintEntity>();
//接收投诉意见表
var sys_ReceiveComplaintEntity = sys_ReceiveComplaintIBLL.GetSys_ReceiveComplaintEntity(parameter.keyValue);
sys_ReceiveComplaintEntity.ReplyContents = entity.ReplyContents;
sys_ReceiveComplaintEntity.ReplyFlag = 1;
sys_ReceiveComplaintEntity.ReplyTime = DateTime.Now;
sys_ReceiveComplaintIBLL.SaveEntity(parameter.keyValue, sys_ReceiveComplaintEntity);
//发送投诉意见表
var sys_SendComplaintEntity = sys_SendComplaintIBLL.GetSys_SendComplaintEntity(sys_ReceiveComplaintEntity.SComplaintId);
if (sys_SendComplaintEntity.ReplyFlag == 0) //未回复
{
sys_SendComplaintEntity.ReplyFlag = 1;
sys_SendComplaintIBLL.SaveEntity(sys_SendComplaintEntity.SComplaintId, sys_SendComplaintEntity);
}
return Success("保存成功!");
}
#endregion

#region 私有类

/// <summary>
/// 表单实体类
/// <summary>
private class ReqFormEntity {
public string keyValue { get; set; }
public string strEntity{ get; set; }
}
#endregion

}
}

+ 173
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/Sys_SendComplaintApi.cs 查看文件

@@ -0,0 +1,173 @@
using Nancy;
using Learun.Util;
using System.Collections.Generic;
using System;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Linq;

namespace Learun.Application.WebApi
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2021-04-30 14:33
/// 描 述:投诉管理
/// </summary>
public class Sys_SendComplaintApi : BaseApi
{
private Sys_SendComplaintIBLL sys_SendComplaintIBLL = new Sys_SendComplaintBLL();
private Sys_ReceiveComplaintIBLL sys_ReceiveComplaintIBLL = new Sys_ReceiveComplaintBLL();

/// <summary>
/// 注册接口
/// <summary>
public Sys_SendComplaintApi()
: base("/Learun/adms/EducationalAdministration/Sys_SendComplaint")
{
Get["/pagelist"] = GetPageList;
Get["/replylist"] = GetReplyList;
Get["/form"] = GetForm;
Get["/complaintCode"] = GetComplaintCode;
Post["/delete"] = DeleteForm;
Post["/save"] = SaveForm;
Post["/saveAssign"] = SaveAssignForm;
Post["/submit"] = SubmitForm;
}
#region 获取数据

/// <summary>
/// 获取页面显示列表分页数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetPageList(dynamic _)
{
ReqPageParam parameter = this.GetReqData<ReqPageParam>();
var data = sys_SendComplaintIBLL.GetPageList(parameter.pagination, parameter.queryJson);
var jsonData = new
{
rows = data,
total = parameter.pagination.total,
page = parameter.pagination.page,
records = parameter.pagination.records
};
return Success(jsonData);
}

/// <summary>
/// 获取表单数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetForm(dynamic _)
{
string keyValue = this.GetReqData();
var Sys_SendComplaintData = sys_SendComplaintIBLL.GetSys_SendComplaintEntity(keyValue);
var jsonData = new
{
Sys_SendComplaint = Sys_SendComplaintData,
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetComplaintCode(dynamic _)
{
var ComplaintCode = "TS_" + Util.CommonHelper.CreateNo();
return SuccessString(ComplaintCode);
}
/// <summary>
/// 获取回复消息列表
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetReplyList(dynamic _)
{
string keyValue = this.GetReqData();
var Sys_ReceiveComplaintList = sys_ReceiveComplaintIBLL.GetSys_ReceiveComplaintList(keyValue).Where(x => x.ReplyFlag == 1).OrderByDescending(x => x.ReplyTime);
var jsonData = new
{
Sys_ReceiveComplaint = Sys_ReceiveComplaintList,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response DeleteForm(dynamic _)
{
string keyValue = this.GetReqData();
sys_SendComplaintIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response SaveForm(dynamic _)
{
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>();
Sys_SendComplaintEntity entity = parameter.strEntity.ToObject<Sys_SendComplaintEntity>();
entity.CreateTime = DateTime.Now;
entity.CreateUserId = this.userInfo.userId;
entity.CreateUserName = this.userInfo.realName;
entity.SendFlag = 0;
entity.DelFlag = false;
entity.AssignFlag = 0;
entity.ReplyFlag = 0;
sys_SendComplaintIBLL.SaveEntity(parameter.keyValue, entity);
return Success("保存成功!");
}
/// <summary>
/// 保存指派
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response SaveAssignForm(dynamic _)
{
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>();
Sys_SendComplaintEntity entity = parameter.strEntity.ToObject<Sys_SendComplaintEntity>();
entity.SenderId = this.userInfo.userId;
entity.Sender = this.userInfo.realName;
sys_SendComplaintIBLL.AssignSaveEntity(parameter.keyValue, entity);
return Success("保存成功!");
}

/// <summary>
/// 提交
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response SubmitForm(dynamic _)
{
string keyValue = this.GetReqData();
sys_SendComplaintIBLL.SubmitEntity(keyValue);
return Success("提交成功!");
}
#endregion

#region 私有类

/// <summary>
/// 表单实体类
/// <summary>
private class ReqFormEntity
{
public string keyValue { get; set; }
public string strEntity { get; set; }
}
#endregion

}
}

+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Ask/Ask_MainOfTeacherMap.cs 查看文件

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

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-04-23 15:50
/// 描 述:教师问卷管理
/// </summary>
public class Ask_MainOfTeacherMap : EntityTypeConfiguration<Ask_MainOfTeacherEntity>
{
public Ask_MainOfTeacherMap()
{
#region 表、主键
//表
this.ToTable("ASK_MAINOFTEACHER");
//主键
this.HasKey(t => t.VID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Ask/Ask_TeacherMainMap.cs 查看文件

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

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-04-26 15:09
/// 描 述:学生问卷
/// </summary>
public class Ask_TeacherMainMap : EntityTypeConfiguration<Ask_TeacherMainEntity>
{
public Ask_TeacherMainMap()
{
#region 表、主键
//表
this.ToTable("ASK_TEACHERMAIN");
//主键
this.HasKey(t => t.TMId);
#endregion

#region 配置关系
#endregion
}
}
}


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj 查看文件

@@ -61,6 +61,8 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Ask\Ask_MainOfTeacherMap.cs" />
<Compile Include="Ask\Ask_TeacherMainMap.cs" />
<Compile Include="AssetManagementSystem\Ass_InventoryItemApplyMap.cs" />
<Compile Include="AssetManagementSystem\Ass_PurchaseItemApplyMap.cs" />
<Compile Include="AssetManagementSystem\Ass_ScrapItemMap.cs" />


+ 222
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Ask_MainOfTeacher/Ask_MainOfTeacherBLL.cs 查看文件

@@ -0,0 +1,222 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;
using Learun.Application.TwoDevelopment.EducationalAdministration;

namespace Learun.Application.TwoDevelopment.Ask
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-04-23 15:50
/// 描 述:教师问卷管理
/// </summary>
public class Ask_MainOfTeacherBLL : Ask_MainOfTeacherIBLL
{
private Ask_MainOfTeacherService ask_MainOfTeacherService = new Ask_MainOfTeacherService();

#region 获取数据

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

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

public Ask_MainOfTeacherEntity GetAsk_MainOfTeacherEntityAndQuestions(string keyValue)
{
try
{
return ask_MainOfTeacherService.GetAsk_MainOfTeacherEntityAndQuestions(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public Ask_MainOfTeacherEntity GetAsk_MainOfTeacherEntityAndQuestionsResult(string keyValue,string empno)
{
try
{
return ask_MainOfTeacherService.GetAsk_MainOfTeacherEntityAndQuestionsResult(keyValue, empno);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据

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

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

public void ChangeFormStatus(string keyValue, bool status)
{
try
{
ask_MainOfTeacherService.ChangeFormStatus(keyValue, status);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}


public IEnumerable<Ask_MainOfTeacherEntity> GetTeacherPageList(Pagination pagination, string queryJson)
{
try
{
return ask_MainOfTeacherService.GetTeacherPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public void SaveAsk_QuestionResultEntity(List<Ask_QuestionResultEntity> entity, string vid,
string userinfoUserId, string userinfoRealName, string userinfoIPAddress)
{
try
{
ask_MainOfTeacherService.SaveAsk_QuestionResultEntity(entity, vid, userinfoUserId, userinfoRealName, userinfoIPAddress);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 159
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Ask_MainOfTeacher/Ask_MainOfTeacherEntity.cs 查看文件

@@ -0,0 +1,159 @@
using Learun.Util;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.Ask
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-04-23 15:50
/// 描 述:教师问卷管理
/// </summary>
public class Ask_MainOfTeacherEntity
{
#region 实体成员
/// <summary>
/// VID
/// </summary>
[Column("VID")]
public string VID { get; set; }
/// <summary>
/// UID
/// </summary>
[Column("UID")]
public string UID { get; set; }
/// <summary>
/// UName
/// </summary>
[Column("UNAME")]
public string UName { get; set; }
/// <summary>
/// ATId
/// </summary>
[Column("ATID")]
public string ATId { get; set; }
/// <summary>
/// ATName
/// </summary>
[Column("ATNAME")]
public string ATName { get; set; }
/// <summary>
/// VTitle
/// </summary>
[Column("VTITLE")]
public string VTitle { get; set; }
/// <summary>
/// VContent
/// </summary>
[Column("VCONTENT")]
public string VContent { get; set; }
/// <summary>
/// VCreateTime
/// </summary>
[Column("VCREATETIME")]
public DateTime? VCreateTime { get; set; }
/// <summary>
/// VStartTime
/// </summary>
[Column("VSTARTTIME")]
public DateTime? VStartTime { get; set; }
/// <summary>
/// VStopTime
/// </summary>
[Column("VSTOPTIME")]
public DateTime? VStopTime { get; set; }
/// <summary>
/// DepartmentIdsName
/// </summary>
[Column("DEPARTMENTIDSNAME")]
public string DepartmentIdsName { get; set; }

/// <summary>
/// DepartmentIds
/// </summary>
[Column("DEPARTMENTIDS")]
public string DepartmentIds { get; set; }
/// <summary>
/// Status
/// </summary>
[Column("STATUS")]
public bool? Status { get; set; }
/// <summary>
/// SPVNum
/// </summary>
[Column("SPVNUM")]
public int? SPVNum { get; set; }
/// <summary>
/// SPNum
/// </summary>
[Column("SPNUM")]
public int? SPNum { get; set; }
/// <summary>
/// SClick
/// </summary>
[Column("SCLICK")]
public int? SClick { get; set; }
/// <summary>
/// VOrder
/// </summary>
[Column("VORDER")]
public int? VOrder { get; set; }
/// <summary>
/// VHide
/// </summary>
[Column("VHIDE")]
public bool? VHide { get; set; }
/// <summary>
/// VSerial
/// </summary>
[Column("VSERIAL")]
public string VSerial { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.VID = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.VID = keyValue;
}
#endregion
#region 扩展字段
[NotMapped]
public bool? IsAnswer { get; set; }
[NotMapped]
public decimal? TotalScore { get; set; }
[NotMapped]
public DateTime? CreateDate { get; set; }
[NotMapped]
public string EmpName { get; set; }
[NotMapped]
public string EmpNo { get; set; }
[NotMapped]
public string DepartmentId { get; set; }
[NotMapped]
public string GenderNo { get; set; }

[NotMapped]
public List<Ask_QuestionEntity> Ask_Questions
{
get;
set;
}

#endregion
}
}


+ 57
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Ask_MainOfTeacher/Ask_MainOfTeacherIBLL.cs 查看文件

@@ -0,0 +1,57 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;
using Learun.Application.TwoDevelopment.EducationalAdministration;

namespace Learun.Application.TwoDevelopment.Ask
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-04-23 15:50
/// 描 述:教师问卷管理
/// </summary>
public interface Ask_MainOfTeacherIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<Ask_MainOfTeacherEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取Ask_MainOfTeacher表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
Ask_MainOfTeacherEntity GetAsk_MainOfTeacherEntity(string keyValue);

Ask_MainOfTeacherEntity GetAsk_MainOfTeacherEntityAndQuestions(string keyValue);
Ask_MainOfTeacherEntity GetAsk_MainOfTeacherEntityAndQuestionsResult(string keyValue, string empno);
#endregion

#region 提交数据

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

void ChangeFormStatus(string keyValue, bool status);
IEnumerable<Ask_MainOfTeacherEntity> GetTeacherPageList(Pagination pagination, string queryJson);
void SaveAsk_QuestionResultEntity(List<Ask_QuestionResultEntity> entity, string vid, string userinfoUserId,
string userinfoRealName, string userinfoIPAddress);
}
}

+ 406
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Ask_MainOfTeacher/Ask_MainOfTeacherService.cs 查看文件

@@ -0,0 +1,406 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Learun.Application.Base.SystemModule;
using Learun.Application.TwoDevelopment.EducationalAdministration;

namespace Learun.Application.TwoDevelopment.Ask
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-04-23 15:50
/// 描 述:教师问卷管理
/// </summary>
public class Ask_MainOfTeacherService : RepositoryFactory
{
#region 获取数据

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

public IEnumerable<Ask_MainOfTeacherEntity> GetTeacherPageList(Pagination pagination, string queryJson)
{
try
{
//取库名
var misdbname = BaseRepository("CollegeMIS").getDbConnection().Database;
var basedbname = BaseRepository().getDbConnection().Database;
var strSql = new StringBuilder();
strSql.Append("SELECT t.*,b.IsAnswer,b.TotalScore,b.CreateDate,c.EmpNo,c.EmpName,c.GenderNo,c.F_DepartmentId as DepartmentId ");
strSql.Append(" FROM " + basedbname + ".dbo.Ask_MainOfTeacher t right join " + basedbname + ".dbo.Ask_TeacherMain b on t.VID=b.VID left join " + misdbname + ".dbo.EmpInfo c on b.EmpNo=c.EmpNo ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (queryParam["Manager"].IsEmpty())
{
strSql.Append(" and t.Status=1 ");
}
if (!queryParam["EmpNo"].IsEmpty())
{
dp.Add("EmpNo", "" + queryParam["EmpNo"].ToString() + "", DbType.String);
strSql.Append(" AND b.EmpNo=@EmpNo ");
}
if (!queryParam["EmpName"].IsEmpty())
{
dp.Add("EmpName", "%" + queryParam["EmpName"].ToString() + "%", DbType.String);
strSql.Append(" AND c.EmpName like @EmpName ");
}
if (!queryParam["VTitle"].IsEmpty())
{
dp.Add("VTitle", "%" + queryParam["VTitle"].ToString() + "%", DbType.String);
strSql.Append(" AND t.VTitle Like @VTitle ");
}
if (!queryParam["VSerial"].IsEmpty())
{
dp.Add("VSerial", "%" + queryParam["VSerial"].ToString() + "%", DbType.String);
strSql.Append(" AND t.VSerial Like @VSerial ");
}
if (!queryParam["ATId"].IsEmpty())
{
dp.Add("ATId", "" + queryParam["ATId"].ToString() + "", DbType.String);
strSql.Append(" AND t.ATId Like @ATId ");
}
if (!queryParam["VID"].IsEmpty())
{
dp.Add("VID", "" + queryParam["VID"].ToString() + "", DbType.String);
strSql.Append(" AND t.VID = @VID ");
}
return this.BaseRepository().FindList<Ask_MainOfTeacherEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

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

public Ask_MainOfTeacherEntity GetAsk_MainOfTeacherEntityAndQuestions(string keyValue)
{
try
{
var Ask_MainOfTeacher = BaseRepository().FindEntity<Ask_MainOfTeacherEntity>(keyValue);
var questionlist = BaseRepository().FindList<Ask_QuestionEntity>(m => m.VID == keyValue).OrderBy(m => m.QOrder).ToList();
foreach (var questionEntity in questionlist)
{
if (questionEntity.QType == 1)
{
questionEntity.QTypeString = "radio";
}
else if (questionEntity.QType == 2)
{
questionEntity.QTypeString = "checkbox";
}
else
{
questionEntity.QTypeString = "text";
}
questionEntity.Ask_QuestionItems = BaseRepository().FindList<Ask_QuestionItemsEntity>(m => m.QID == questionEntity.QID).OrderBy(m => m.IOrder).ToList();
}
Ask_MainOfTeacher.Ask_Questions = questionlist;
return Ask_MainOfTeacher;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository().Delete<Ask_MainOfTeacherEntity>(t => t.VID == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void SaveEntity(string keyValue, Ask_MainOfTeacherEntity 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);
}
}
}

#endregion

public void ChangeFormStatus(string keyValue, bool status)
{
try
{
var entity = BaseRepository().FindEntity<Ask_MainOfTeacherEntity>(keyValue);
if (status)
{
entity.VCreateTime = DateTime.Now;
//统计调查人数
StringBuilder sql = new StringBuilder("select distinct * from EmpInfo a where CheckMark=1 ");
if (!string.IsNullOrEmpty(entity.DepartmentIds))
{
List<string> departList = entity.DepartmentIds.Split(',').ToList();
for (var i = 0; i < departList.Count; i++)
{
departList[i] = "'" + departList[i] + "'";
}
sql.Append(" and a.F_DepartmentId in(" + string.Join(",", departList.ToArray()) + ")");
}
var empinfo = BaseRepository("CollegeMIS").FindList<EmpInfoEntity>(sql.ToString()).ToList();
BaseRepository().Delete<Ask_TeacherMainEntity>(m => m.VID == entity.VID);
foreach (var item in empinfo)
{
Ask_TeacherMainEntity askTeacherMain = new Ask_TeacherMainEntity();
askTeacherMain.Create();
askTeacherMain.EmpNo = item.EmpNo;
askTeacherMain.VID = entity.VID;
askTeacherMain.IsAnswer = false;
askTeacherMain.TotalScore = 0;
BaseRepository().Insert(askTeacherMain);
}
entity.SPVNum = empinfo.Count;
entity.Status = true;
}
else
{
entity.Status = false;
}
BaseRepository().Update(entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

public void SaveAsk_QuestionResultEntity(List<Ask_QuestionResultEntity> entity, string vid,
string userinfoUserId, string userinfoRealName, string userinfoIpAddress)
{
var db = BaseRepository().BeginTrans();
try
{
decimal totalscore = 0;
foreach (var item in entity)
{
Ask_QuestionResultEntity questionResult = new Ask_QuestionResultEntity();
questionResult.Create();
questionResult.QID = item.QID;
questionResult.QID = item.QID;
questionResult.IID = item.IID;
questionResult.UID = userinfoUserId;
questionResult.UName = userinfoRealName;
if (!string.IsNullOrEmpty(item.UText))
{
questionResult.UText = item.UText;
}
questionResult.UTime=DateTime.Now;
questionResult.UIP = userinfoIpAddress;
db.Insert(questionResult);
var score = db.FindEntity<Ask_QuestionItemsEntity>(m => m.IID == item.IID).IScore;
if (score != null)
totalscore += score.Value;
}
db.ExecuteBySql("update Ask_MainOfTeacher set SPNum=isnull(SPNum,0)+1 where VID='" + vid + "'");
var teacherpaper = db.FindEntity<Ask_TeacherMainEntity>(m => m.VID == vid && m.EmpNo == userinfoUserId);
if (teacherpaper != null)
{
teacherpaper.IsAnswer = true;
teacherpaper.TotalScore = totalscore;
teacherpaper.CreateDate=DateTime.Now;
db.Update(teacherpaper);
}
db.Commit();
}
catch (Exception e)
{
db.Rollback();
throw;
}
}

public Ask_MainOfTeacherEntity GetAsk_MainOfTeacherEntityAndQuestionsResult(string keyValue, string empno)
{
try
{
var Ask_MainOfTeacher = BaseRepository().FindEntity<Ask_MainOfTeacherEntity>(keyValue);
var questionlist = BaseRepository().FindList<Ask_QuestionEntity>(m => m.VID == keyValue).OrderBy(m => m.QOrder).ToList();
foreach (var questionEntity in questionlist)
{
if (questionEntity.QType == 1)
{
questionEntity.QTypeString = "radio";
}
else if (questionEntity.QType == 2)
{
questionEntity.QTypeString = "checkbox";
}
else
{
questionEntity.QTypeString = "text";
}
var questionitemslist= BaseRepository().FindList<Ask_QuestionItemsEntity>(m => m.QID == questionEntity.QID).OrderBy(m => m.IOrder).ToList();
foreach (var qii in questionitemslist)
{
var qresult = BaseRepository().FindEntity<Ask_QuestionResultEntity>(m =>
m.QID == questionEntity.QID && m.IID == qii.IID && m.UID == empno);
if (qresult != null)
{
qii.IsChecked = true;
qii.UText = qresult.UText;
}
}
questionEntity.Ask_QuestionItems = questionitemslist;
}
Ask_MainOfTeacher.Ask_Questions = questionlist;
return Ask_MainOfTeacher;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
}
}

+ 7
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Ask_QuestionItems/Ask_QuestionItemsService.cs 查看文件

@@ -160,10 +160,15 @@ namespace Learun.Application.TwoDevelopment.Ask
try
{
var strSql = new StringBuilder();
// strSql.Append(
// @"select c.ITitle,c.IScore,c.IOrder,count(d.UID) as ISelectCount from Ask_Main a left join Ask_Question b on a.VID=b.VID
//left join Ask_QuestionItems c on b.QID=c.QID left join Ask_QuestionResult d on c.IID=d.IID ");
// strSql.Append(" where a.VID =@VID and c.QID =@QID ");
strSql.Append(
@"select c.ITitle,c.IScore,c.IOrder,count(d.UID) as ISelectCount from Ask_Main a left join Ask_Question b on a.VID=b.VID
@"select c.ITitle,c.IScore,c.IOrder,count(d.UID) as ISelectCount from Ask_Question b
left join Ask_QuestionItems c on b.QID=c.QID left join Ask_QuestionResult d on c.IID=d.IID ");
strSql.Append(" where a.VID =@VID and c.QID =@QID ");
strSql.Append(" where b.VID =@VID and c.QID =@QID ");

var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });


+ 74
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Ask_TeacherMain/Ask_TeacherMainEntity.cs 查看文件

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

{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-04-26 15:09
/// 描 述:教师问卷
/// </summary>
public class Ask_TeacherMainEntity
{
#region 实体成员
/// <summary>
/// TMId
/// </summary>
/// <returns></returns>
[Column("TMID")]
public string TMId { get; set; }
/// <summary>
/// EmpNo
/// </summary>
/// <returns></returns>
[Column("EMPNO")]
public string EmpNo { get; set; }
/// <summary>
/// VID
/// </summary>
/// <returns></returns>
[Column("VID")]
public string VID { get; set; }
/// <summary>
/// IsAnswer
/// </summary>
/// <returns></returns>
[Column("ISANSWER")]
public bool? IsAnswer { get; set; }
/// <summary>
/// TotalScore
/// </summary>
/// <returns></returns>
[Column("TOTALSCORE")]
public decimal? TotalScore { get; set; }
/// <summary>
/// CreateDate
/// </summary>
/// <returns></returns>
[Column("CREATEDATE")]
public DateTime? CreateDate { get; set; }
#endregion

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


+ 4101
- 3716
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM
文件差異過大導致無法顯示
查看文件


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj 查看文件

@@ -70,6 +70,11 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Ask\Ask_MainOfTeacher\Ask_MainOfTeacherBLL.cs" />
<Compile Include="Ask\Ask_MainOfTeacher\Ask_MainOfTeacherEntity.cs" />
<Compile Include="Ask\Ask_MainOfTeacher\Ask_MainOfTeacherIBLL.cs" />
<Compile Include="Ask\Ask_MainOfTeacher\Ask_MainOfTeacherService.cs" />
<Compile Include="Ask\Ask_TeacherMain\Ask_TeacherMainEntity.cs" />
<Compile Include="AssetManagementSystem\Allocation\AllocationBLL.cs" />
<Compile Include="AssetManagementSystem\Allocation\AllocationIBLL.cs" />
<Compile Include="AssetManagementSystem\Allocation\AllocationService.cs" />


+ 346
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs 查看文件

@@ -2345,6 +2345,352 @@ namespace Learun.Application.WorkFlow
_AutoAuditFlow(pTaskList, pNWFIEngine, userInfo);

}

/// <summary>
/// 审批流程(只有审批操作码为back(退回至上一个审核节点)情况下执行)【暂定】
/// </summary>
/// <param name="operationCode">流程审批操作码agree 同意 disagree 不同意 lrtimeout 超时 back 退回至上一个审核节点</param>
/// <param name="operationName">流程审批操名称</param>
/// <param name="processId">流程进程主键</param>
/// <param name="taskId">流程任务主键</param>
/// <param name="des">审批意见</param>
/// <param name="auditors">下一节点指定审核人</param>
/// <param name="userInfo">当前操作人信息</param>
public void AuditFlow2(string operationCode, string operationName, string processId, string taskId, string des, string auditors, string stamp, string signUrl, UserInfo userInfo)
{
// 初始化流程引擎
NWFIEngine nWFIEngine = _Bootstraper("", processId, taskId, userInfo);
NWFEngineParamConfig nWFEngineParamConfig = nWFIEngine.GetConfig();
nWFEngineParamConfig.Auditers = auditors;

//overFW 任一审核者不同意 即流程任务结束
bool overFW = false;

// 获取任务实体
var taskEntiy = nWFTaskIBLL.GetEntity(taskId);
if (taskEntiy == null)
{
throw (new Exception("找不到对应流程任务!"));
}
if (taskEntiy.F_IsFinished != 0)
{
throw (new Exception("该任务已经结束!"));
}

taskEntiy.F_ModifyDate = DateTime.Now;
taskEntiy.F_ModifyUserId = userInfo.userId;
taskEntiy.F_ModifyUserName = userInfo.realName;
taskEntiy.F_IsFinished = 1;
NWFNodeInfo nodeInfo = nWFIEngine.GetNode(taskEntiy.F_NodeId);
string taskUserId = userInfo.userId;

// 获取当前任务的执行人列表
List<NWFTaskRelationEntity> taskUserList = (List<NWFTaskRelationEntity>)nWFTaskIBLL.GetTaskUserList(taskId);
bool isMyTask = false;
Dictionary<string, string> taskUserMap = new Dictionary<string, string>();
foreach (var item in taskUserList)
{
if (item.F_UserId == userInfo.userId)
{
isMyTask = true;
}
if (!taskUserMap.ContainsKey(userInfo.userId))
{
taskUserMap.Add(userInfo.userId, "1");
}
}
if (!isMyTask)
{
// 如果是委托任务
List<UserInfo> delegateList = nWFProcessSerive.GetDelegateProcess(userInfo.userId);
foreach (var item in delegateList)
{
//如果当前用户是处理委托任务时,找到原本任务处理人
if (!taskUserMap.ContainsKey(item.userId))
{
taskUserId = item.userId;
}
}
}
// 创建任务日志信息
NWFTaskLogEntity nWFTaskLogEntity = new NWFTaskLogEntity()
{
F_ProcessId = processId,
F_OperationCode = operationCode,
F_OperationName = operationName,
F_NodeId = nodeInfo.id,
F_NodeName = nodeInfo.name,
F_PrevNodeId = taskEntiy.F_PrevNodeId,
F_PrevNodeName = taskEntiy.F_PrevNodeName,
F_Des = des,
F_TaskId = taskId,
F_TaskType = 1,
F_CreateUserId = userInfo.userId,
F_CreateUserName = userInfo.realName,
F_TaskUserId = userInfo.userId,
F_TaskUserName = userInfo.realName,
F_StampImg = stamp
};

// 保存签字图片
if (!string.IsNullOrEmpty(signUrl))
{
ImgEntity imgEntity = new ImgEntity();
imgEntity.F_Name = "sign";
imgEntity.F_ExName = ".png";
imgEntity.F_Content = signUrl;
imgIBLL.SaveEntity("", imgEntity);
nWFTaskLogEntity.F_SignImg = imgEntity.F_Id;

}



if (userInfo.userId != taskUserId)
{
// 说明是委托任务
nWFTaskLogEntity.F_TaskUserId = taskUserId;
nWFTaskLogEntity.F_TaskUserName = userIBLL.GetEntityByUserId(taskUserId).F_RealName;
}
nWFTaskLogEntity.Create();
// 给流程发起者一条通知信息
NWFTaskMsgEntity nWFTaskMsgEntity = new NWFTaskMsgEntity()
{
F_ProcessId = nWFEngineParamConfig.ProcessId,
F_FromUserId = nWFEngineParamConfig.CurrentUser.Id,
F_FromUserAccount = nWFEngineParamConfig.CurrentUser.Account,
F_FromUserName = nWFEngineParamConfig.CurrentUser.Name,
F_ToUserId = nWFEngineParamConfig.CreateUser.Id,
F_ToAccount = nWFEngineParamConfig.CreateUser.Account,
F_ToName = nWFEngineParamConfig.CreateUser.Name,
F_Title = nWFEngineParamConfig.SchemeName,
F_Content = "你的流程有状态的更新:" + nWFEngineParamConfig.CurrentUser.Name + operationName,
NodeId = nWFIEngine.GetStartNode().id,
F_NodeName = nWFIEngine.GetStartNode().name
};
nWFTaskMsgEntity.Create();

NWFTaskRelationEntity nWFTaskRelationEntity = taskUserList.Find(t => t.F_UserId == taskUserId);
nWFTaskRelationEntity.F_Time = DateTime.Now;
// 如果是一般审核节点
if (nodeInfo.isAllAuditor == "2")
{
// 需要所有人都审核,有一人不同意或者所有人都同意
if (operationCode == "agree")
{
nWFTaskRelationEntity.F_Result = 1;
if (taskUserList.FindAll(t => t.F_Result == 0).Count > 0)
{
List<NWFTaskRelationEntity> taskUserUpdateList = new List<NWFTaskRelationEntity>();
taskUserUpdateList.Add(nWFTaskRelationEntity);
if (nodeInfo.auditorType == "2")
{
// 串行
NWFTaskRelationEntity nWFTaskRelationEntity2 = taskUserList[(int)nWFTaskRelationEntity.F_Sort];
nWFTaskRelationEntity2.F_Mark = 0;
taskUserUpdateList.Add(nWFTaskRelationEntity2);
}
nWFProcessSerive.Save(nWFTaskLogEntity, taskUserUpdateList, nWFTaskMsgEntity);
return;
}
}
else if (nodeInfo.auditExecutType == "2")
{// 需要所有人执行完才往下走
if (operationCode == "disagree")
{
nWFTaskRelationEntity.F_Result = 2;
}
else
{
nWFTaskRelationEntity.F_Result = 4;
}
if (taskUserList.FindAll(t => t.F_Result == 0).Count > 0)
{
List<NWFTaskRelationEntity> taskUserUpdateList = new List<NWFTaskRelationEntity>();
taskUserUpdateList.Add(nWFTaskRelationEntity);
if (nodeInfo.auditorType == "2")
{
// 串行
NWFTaskRelationEntity nWFTaskRelationEntity2 = taskUserList[(int)nWFTaskRelationEntity.F_Sort];
nWFTaskRelationEntity2.F_Mark = 0;
taskUserUpdateList.Add(nWFTaskRelationEntity2);
}
nWFProcessSerive.Save(nWFTaskLogEntity, taskUserUpdateList, nWFTaskMsgEntity);
return;
}
}
else
{
operationCode = "disagree";
nWFTaskRelationEntity.F_Result = 2;
}
}
else
{
if (operationCode == "agree")
{
nWFTaskRelationEntity.F_Result = 1;
}
else if (operationCode == "disagree")
{
nWFTaskRelationEntity.F_Result = 2;
overFW = true;
}
else
{
nWFTaskRelationEntity.F_Result = 4;
}
}

// 获取上一节点信息
List<NWFLineInfo> lineList = new List<NWFLineInfo>();
//List<NWFNodeInfo> list = nWFIEngine.GetNextTaskNode(nodeInfo, operationCode, false, lineList, overFW);
List<NWFNodeInfo> list = nWFIEngine.GetPrevTaskNode(nodeInfo, operationCode, false, lineList, overFW);

// 会签处理
int state = 0;
if (operationCode == "agree")
{
state = 1;
}
List<NWFTaskEntity> closeTaskList = new List<NWFTaskEntity>();
List<NWFConfluenceEntity> confluenceList = _ClearConfluence(list, closeTaskList, nodeInfo.id, nWFEngineParamConfig.ProcessId, state, nWFIEngine);

// 创建任务
List<NWFTaskEntity> taskList = _CreateTask(list, nodeInfo, nWFEngineParamConfig);
// 创建任务消息
List<NWFTaskMsgEntity> taskMsgList = _CreateTaskMsg(taskList, nWFEngineParamConfig);

// 保存流程进程信息
NWFProcessEntity nWFProcessEntity = new NWFProcessEntity()
{
F_Id = nWFEngineParamConfig.ProcessId,
F_IsStart = 1
};
if (nWFEngineParamConfig.State == 1)
{
nWFProcessEntity.F_IsAgain = 1;
}
else if (nWFEngineParamConfig.State == 2)
{
nWFProcessEntity.F_IsFinished = 1;
}

// 如果任一审核者不同意,即流程结束(终止)
if (overFW)
{
nWFProcessEntity.F_EnabledMark = 4;//终止
}

List<NWFLineInfo> pLineList = new List<NWFLineInfo>();
List<NWFTaskEntity> pTaskList = new List<NWFTaskEntity>();
List<NWFTaskMsgEntity> pTaskMsgList = new List<NWFTaskMsgEntity>();
NWFEngineParamConfig pNWFEngineParamConfig = null;
NWFNodeInfo pNodeInfo = null;
NWFIEngine pNWFIEngine = null;

NWFProcessEntity pNWFProcessEntity = null;
if (nWFEngineParamConfig.IsChild == 1)
{
pNWFIEngine = _Bootstraper("", nWFEngineParamConfig.ParentProcessId, nWFEngineParamConfig.ParentTaskId, userInfo);
pNWFEngineParamConfig = pNWFIEngine.GetConfig();
// 获取父级流程
nWFTaskMsgEntity.F_ToUserId = pNWFEngineParamConfig.CreateUser.Id;
nWFTaskMsgEntity.F_ToName = pNWFEngineParamConfig.CreateUser.Name;
nWFTaskMsgEntity.F_ToAccount = pNWFEngineParamConfig.CreateUser.Account;
nWFTaskMsgEntity.F_Title = pNWFEngineParamConfig.SchemeName;
nWFTaskMsgEntity.F_Content = "你的流程【子流程:" + nWFEngineParamConfig.SchemeName + "】有状态的更新:" + nWFEngineParamConfig.CurrentUser.Name + operationName;
nWFTaskMsgEntity.NodeId = pNWFIEngine.GetStartNode().id;
nWFTaskMsgEntity.F_NodeName = pNWFIEngine.GetStartNode().name;

// 获取子流程
NWFProcessEntity cNWFProcessEntity = nWFProcessSerive.GetEntity(nWFEngineParamConfig.ProcessId);
if (cNWFProcessEntity.F_IsAsyn == 0)
{
if (nWFEngineParamConfig.State == 2)
{
// 父节点信息
NWFTaskEntity pTaskEntity = nWFTaskIBLL.GetEntity(nWFEngineParamConfig.ParentTaskId);
pNodeInfo = pNWFIEngine.GetNode(pTaskEntity.F_NodeId);

// 获取上一节点信息
List<NWFNodeInfo> pList = pNWFIEngine.GetPrevTaskNode(pNodeInfo, "agree", false, pLineList);
// 创建任务
pTaskList = _CreateTask(pList, pNodeInfo, pNWFEngineParamConfig);
// 创建任务消息
pTaskMsgList = _CreateTaskMsg(pTaskList, pNWFEngineParamConfig);

if (pNWFEngineParamConfig.State == 1)
{
pNWFProcessEntity = new NWFProcessEntity();
pNWFProcessEntity.F_Id = pNWFEngineParamConfig.ProcessId;
pNWFProcessEntity.F_IsAgain = 1;
}
else if (pNWFEngineParamConfig.State == 2)
{
pNWFProcessEntity = new NWFProcessEntity();
pNWFProcessEntity.F_Id = pNWFEngineParamConfig.ProcessId;
pNWFProcessEntity.F_IsFinished = 1;
}
}
}
pTaskMsgList.Add(nWFTaskMsgEntity);
}
else
{
taskMsgList.Add(nWFTaskMsgEntity);
}

// 触发消息
_SendMsg(pTaskMsgList, pNWFIEngine);
// 触发消息
_SendMsg(taskMsgList, nWFIEngine);

List<NWFTaskEntity> nTaskList = new List<NWFTaskEntity>();
nTaskList.AddRange(taskList);

taskList.AddRange(pTaskList);
taskMsgList.AddRange(pTaskMsgList);
// 保存信息 任务日志 任务执行人状态更新 任务状态更新 流程进程状态更新 会签信息更新 新的任务列表 新的任务消息列表
nWFProcessSerive.Save(nWFTaskLogEntity, nWFTaskRelationEntity, taskEntiy, nWFProcessEntity, confluenceList, closeTaskList, taskList, taskMsgList, pNWFProcessEntity);

// 触发流程绑定方法(父级点事件)
foreach (var line in pLineList)
{
_TriggerMethod(line, "", pNodeInfo.name, "create", pNWFEngineParamConfig);
}

// 触发流程绑定方法
foreach (var line in lineList)
{
_TriggerMethod(line, taskId, nodeInfo.name, operationCode, nWFEngineParamConfig);
}

// 触发子流程节点方法
foreach (var taskItem in taskList)
{
if (taskItem.F_Type == 4)
{
NWFNodeInfo cNodeInfo = nWFIEngine.GetNode(taskItem.F_NodeId);
if (cNodeInfo == null)
{
cNodeInfo = pNWFIEngine.GetNode(taskItem.F_NodeId);
_TriggerMethod(cNodeInfo, taskItem.F_Id, cNodeInfo.name, taskItem.F_ChildProcessId, pNWFEngineParamConfig);

}
else
{
_TriggerMethod(cNodeInfo, taskItem.F_Id, cNodeInfo.name, taskItem.F_ChildProcessId, nWFEngineParamConfig);
}
}
}

// 触发自动跳过规则
_AutoAuditFlow(nTaskList, nWFIEngine, userInfo);
_AutoAuditFlow(pTaskList, pNWFIEngine, userInfo);

}

/// <summary>
/// 批量审核(只有同意和不同意)
/// </summary>


+ 13
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessIBLL.cs 查看文件

@@ -192,6 +192,19 @@ namespace Learun.Application.WorkFlow
/// <param name="auditors">下一节点指定审核人</param>
/// <param name="userInfo">当前操作人信息</param>
void AuditFlow(string operationCode, string operationName, string processId, string taskId, string des, string auditors, string stamp, string signUrl, UserInfo userInfo);

/// <summary>
/// 审批流程(只有审批操作码为back(退回至上一个审核节点)情况下执行)【暂定】
/// </summary>
/// <param name="operationCode">流程审批操作码agree 同意 disagree 不同意 lrtimeout 超时 back 退回至上一个审核节点</param>
/// <param name="operationName">流程审批操名称</param>
/// <param name="processId">流程进程主键</param>
/// <param name="taskId">流程任务主键</param>
/// <param name="des">审批意见</param>
/// <param name="auditors">下一节点指定审核人</param>
/// <param name="userInfo">当前操作人信息</param>
void AuditFlow2(string operationCode, string operationName, string processId, string taskId, string des, string auditors, string stamp, string signUrl, UserInfo userInfo);

/// <summary>
/// 批量审核(只有同意和不同意)
/// </summary>


+ 111
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/NWFEngine.cs 查看文件

@@ -531,6 +531,117 @@ namespace Learun.Workflow.Engine

return list;
}

/// <summary>
/// 获取上一步的任务节点信息(只有审批操作码为back(退回至上一个审核节点)情况下执行)【暂定】
/// </summary>
/// <param name="beginNode">起始节点</param>
/// <param name="code">节点操作码 agree 同意 disagree 不同意 lrtimeout 超时 back 退回至上一个审核节点</param>
/// <param name="isGetAuditors">是否获取下一节点审核人</param>
/// <param name="lineList">经过的线段需要执行操作的</param>
/// <returns></returns>
public List<NWFNodeInfo> GetPrevTaskNode(NWFNodeInfo beginNode, string code, bool isGetAuditors, List<NWFLineInfo> lineList, bool overWF = false)
{
List<NWFNodeInfo> list = new List<NWFNodeInfo>();
List<NWFNodeInfo> nextNodeList = new List<NWFNodeInfo>();

//nextNodeList = GetNextNodes(beginNode.id, code, lineList, overWF);
var prevNodes = GetPreNodes(beginNode.id);
foreach (var item in prevNodes)
{
var prevNode = GetNode(item);
nextNodeList.Add(prevNode);
}

Dictionary<string, string> auditers = null;
if (!string.IsNullOrEmpty(config.ParamConfig.Auditers))
{
auditers = config.ParamConfig.Auditers.ToObject<Dictionary<string, string>>();
}


foreach (var node in nextNodeList)
{
if (auditers != null && auditers.ContainsKey(node.id))
{
node.auditors = new List<NWFAuditor>();
node.auditors.Add(new NWFAuditor()
{
type = 3,
auditorId = auditers[node.id]
});
}

switch (node.type)
{
case "conditionnode": // 条件节点
if (!isGetAuditors)
{
if (CalcCondition(node))
{
list.AddRange(GetPrevTaskNode(node, "agree", isGetAuditors, lineList));
}
else
{
list.AddRange(GetPrevTaskNode(node, "disagree", isGetAuditors, lineList));
}
}
else
{
list.AddRange(GetPrevTaskNode(node, "agree", isGetAuditors, lineList));
list.AddRange(GetPrevTaskNode(node, "disagree", isGetAuditors, lineList));
}
break;
case "confluencenode":// 会签节点
if (!isGetAuditors)
{
int confluenceRes;
if (code == "agree")
{
confluenceRes = CalcConfluence(node, beginNode.id, true);
}
else
{
confluenceRes = CalcConfluence(node, beginNode.id, false);
}
if (confluenceRes == 1)// 会签审核通过
{
list.AddRange(GetPrevTaskNode(node, "agree", false, lineList));
}
else if (confluenceRes == -1)// 会签审核不通过
{
list.AddRange(GetPrevTaskNode(node, "disagree", false, lineList));
}
node.confluenceRes = confluenceRes;
list.Add(node);
}
break;
case "auditornode":// 传阅节点
list.Add(node);
break;
case "childwfnode":// 子流程节点
list.Add(node);
if (node.childType == "2")
{ // 异步的情况下直接往下走
list.AddRange(GetPrevTaskNode(node, "agree", isGetAuditors, lineList));
}
break;
case "startround":// 开始节点 需要重新审核
list.Add(node);
config.ParamConfig.State = 1;
break;
case "endround":// 结束节点
config.ParamConfig.State = 2;
break;
default: // 默认一般审核界定啊
list.Add(node);
break;
}
}

return list;
}

#endregion

}


+ 11
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/NWFIEngine.cs 查看文件

@@ -70,6 +70,17 @@ namespace Learun.Workflow.Engine
/// <param name="lineList">经过的线段需要执行操作的</param>
/// <returns></returns>
List<NWFNodeInfo> GetNextTaskNode(NWFNodeInfo beginNode, string code, bool isGetAuditors, List<NWFLineInfo> lineList, bool overWF = false);

/// <summary>
/// 获取上一步的任务节点信息(只有审批操作码为back(退回至上一个审核节点)情况下执行)【暂定】
/// </summary>
/// <param name="beginNode">起始节点</param>
/// <param name="code">节点操作码 agree 同意 disagree 不同意 lrtimeout 超时 back 退回至上一个审核节点</param>
/// <param name="isGetAuditors">是否获取下一节点审核人</param>
/// <param name="lineList">经过的线段需要执行操作的</param>
/// <returns></returns>
List<NWFNodeInfo> GetPrevTaskNode(NWFNodeInfo beginNode, string code, bool isGetAuditors, List<NWFLineInfo> lineList, bool overWF = false);

#endregion
}
}

Loading…
取消
儲存