瀏覽代碼

【修改】网上办事大厅拖拽版:我的收藏功能;

master
dyy 3 年之前
父節點
當前提交
ffff2d5b08
共有 21 個文件被更改,包括 5213 次插入3926 次删除
  1. +121
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/SSO_Drag_CollectManageController.cs
  2. +27
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/SSO_Drag_CollectManage/Form.cshtml
  3. +38
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/SSO_Drag_CollectManage/Form.js
  4. +39
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/SSO_Drag_CollectManage/Index.cshtml
  5. +94
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/SSO_Drag_CollectManage/Index.js
  6. +77
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/main.js
  7. +70
    -13
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs
  8. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  9. +89
    -33
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelOne.cshtml
  10. +70
    -15
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelTwo.cshtml
  11. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemDetailEntity.cs
  12. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_Desktop/SSO_Drag_CollectManageMap.cs
  13. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  14. +3978
    -3860
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM
  15. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_CardSortManage/SSO_Drag_CardSortManageEntity.cs
  16. +171
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_CollectManage/SSO_Drag_CollectManageBLL.cs
  17. +86
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_CollectManage/SSO_Drag_CollectManageEntity.cs
  18. +61
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_CollectManage/SSO_Drag_CollectManageIBLL.cs
  19. +242
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_CollectManage/SSO_Drag_CollectManageService.cs
  20. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  21. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/WfProcess/WfProcessInstanceEntity.cs

+ 121
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/SSO_Drag_CollectManageController.cs 查看文件

@@ -0,0 +1,121 @@
using Learun.Application.TwoDevelopment.LR_Desktop;
using Learun.Util;
using System.Data;
using System.Web.Mvc;

namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-02 16:12
/// 描 述:网上办事大厅拖拽版-可用应用收藏管理
/// </summary>
public class SSO_Drag_CollectManageController : MvcControllerBase
{
private SSO_Drag_CollectManageIBLL sSO_Drag_CollectManageIBLL = new SSO_Drag_CollectManageBLL();

#region 视图功能

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

#region 获取数据

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetList( string queryJson )
{
var data = sSO_Drag_CollectManageIBLL.GetList(queryJson);
return Success(data);
}
/// <summary>
/// 获取列表分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = sSO_Drag_CollectManageIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var data = sSO_Drag_CollectManageIBLL.GetEntity(keyValue);
return Success(data);
}
#endregion

#region 提交数据

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

}
}

+ 27
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/SSO_Drag_CollectManage/Form.cshtml 查看文件

@@ -0,0 +1,27 @@
@{
ViewBag.Title = "网上办事大厅拖拽版-可用应用收藏管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">主键<font face="宋体">*</font></div>
<input id="Id" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">用户<font face="宋体">*</font></div>
<input id="UserId" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">模式编号:one办事大厅模式,two效率优先模式,three管理驾驶舱模式<font face="宋体">*</font></div>
<input id="ModelCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">可用应用Id<font face="宋体">*</font></div>
<input id="SchemeInfoId" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">收藏时间<font face="宋体">*</font></div>
<input id="Time" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
</div>
@Html.AppendJsFile("/Areas/LR_Desktop/Views/SSO_Drag_CollectManage/Form.js")

+ 38
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/SSO_Drag_CollectManage/Form.js 查看文件

@@ -0,0 +1,38 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-02 16:12
* 描 述:网上办事大厅拖拽版-可用应用收藏管理
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var selectedRow = learun.frameTab.currentIframe().selectedRow;
var page = {
init: function () {
page.initData();
},
bind: function () {
},
initData: function () {
if (!!selectedRow) {
$('#form').lrSetFormData(selectedRow);
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('#form').lrValidform()) {
return false;
}
var postData = $('#form').lrGetFormData();
$.lrSaveForm(top.$.rootUrl + '/LR_Desktop/SSO_Drag_CollectManage/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 39
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/SSO_Drag_CollectManage/Index.cshtml 查看文件

@@ -0,0 +1,39 @@
@{
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">树形目录</div>
<div id="tree" class="lr-layout-body"></div>
</div>
</div>
<div class="lr-layout-center">
<div class="lr-layout-wrap">
<div class="lr-layout-title">标题</div>
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<input id="txt_Keyword" type="text" class="form-control" placeholder="请输入要查询关键字" />
</div>
<div class="lr-layout-tool-item">
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i>&nbsp;查询</a>
</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>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/LR_Desktop/Views/SSO_Drag_CollectManage/Index.js")

+ 94
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/SSO_Drag_CollectManage/Index.js 查看文件

@@ -0,0 +1,94 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-02 16:12
* 描 述:网上办事大厅拖拽版-可用应用收藏管理
*/
var selectedRow;
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 查询
$('#btn_Search').on('click', function () {
var keyword = $('#txt_Keyword').val();
page.search({ keyword: keyword });
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
selectedRow = null;
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/LR_Desktop/SSO_Drag_CollectManage/Form',
width: 700,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
selectedRow = $('#gridtable').jfGridGet('rowdata');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/LR_Desktop/SSO_Drag_CollectManage/Form?keyValue=' + keyValue,
width: 700,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/LR_Desktop/SSO_Drag_CollectManage/DeleteForm', { keyValue: keyValue}, function () {
});
}
});
}
});
},
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/LR_Desktop/SSO_Drag_CollectManage/GetPageList',
headData: [
{ label: '主键', name: 'Id', width: 200, align: "left" },
{ label: '用户', name: 'UserId', width: 200, align: "left" },
{ label: '模式编号:one办事大厅模式,two效率优先模式,three管理驾驶舱模式', name: 'ModelCode', width: 200, align: "left" },
{ label: '可用应用Id', name: 'SchemeInfoId', width: 200, align: "left" },
{ label: '收藏时间', name: 'Time', width: 200, align: "left" },
],
mainId:'Id',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 77
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/DragSSO/main.js 查看文件

@@ -24,7 +24,7 @@ $(document).ready(function () {
var keyword = $('#headSearchInput').val();
if ($.trim(keyword) != "") {
$.each($('.search').find('.searchLi'), function (i, item) {
if ($(item).children('.searchLiTxt').html().indexOf(keyword) != -1) {
if ($(item).find('.searchLiTxt').html().indexOf(keyword) != -1) {
$(item).show();
} else {
$(item).hide();
@@ -77,12 +77,85 @@ $(document).ready(function () {
}
}
});
}).on('click', '.inSec1List2 .fa', function () {
}).on('click', '#flowList .fa', function () {//可用应用
//是否收藏
var modelCode = $('#ModelCode').val();
var userId = $('#UserId').val();
var Id = $(this).parent('li').attr('data-Id');
var isCollect = true;
var tipMsg = "";
if ($(this).hasClass('fa-heart')) {
$(this).removeClass('fa-heart').addClass('fa-heart-o');
//ajax取消收藏操作
isCollect = false;
tipMsg = "取消收藏成功!";
} else {
$(this).removeClass('fa-heart-o').addClass('fa-heart');
//ajax收藏操作
isCollect = true;
tipMsg = "收藏成功!";
}
if (userId != "" && userId != undefined && modelCode != "" && modelCode != undefined && Id != "" && Id != undefined) {
$.ajax({
url: "/SSOSystem/DoCollectFlow",
headers: { __RequestVerificationToken: $.lrToken },
data: { userId: userId, modelCode: modelCode, id: Id, isCollect: isCollect },
type: "post",
dataType: "json",
success: function (res) {
if (res.code == 200) {
//操作成功执行代码
layer.msg(tipMsg);
//刷新可用应用列表
flowListJson = res.data.flowList;
$("#flowTypeList").find("li.active .itemName").trigger("click");
//刷新我的收藏列表
flowListOfCollectJson = res.data.flowListOfCollect;
updateCollectCount(flowListOfCollectJson);
$("#flowTypeListOfCollect").find("li.active .itemName").trigger("click");
}
else if (res.code == 400) {
layer.msg(res.info);
}
else if (res.code == 500) {
layer.msg('服务端异常,请联系管理员');
}
}
});
}
}).on('click', '#flowListOfCollect .fa', function () {//我的收藏
//是否收藏
var modelCode = $('#ModelCode').val();
var userId = $('#UserId').val();
var Id = $(this).parent('li').attr('data-Id');
if ($(this).hasClass('fa-heart')) {
//ajax取消收藏操作
if (userId != "" && userId != undefined && modelCode != "" && modelCode != undefined && Id != "" && Id != undefined) {
$.ajax({
url: "/SSOSystem/DoCollectFlow",
headers: { __RequestVerificationToken: $.lrToken },
data: { userId: userId, modelCode: modelCode, id: Id, isCollect: false },
type: "post",
dataType: "json",
success: function (res) {
if (res.code == 200) {
//操作成功执行代码
layer.msg('取消收藏成功!');
//刷新我的收藏列表
flowListOfCollectJson = res.data.flowListOfCollect;
updateCollectCount(flowListOfCollectJson);
$("#flowTypeListOfCollect").find("li.active .itemName").trigger("click");
//刷新可用应用列表
flowListJson = res.data.flowList;
$("#flowTypeList").find("li.active .itemName").trigger("click");
}
else if (res.code == 400) {
layer.msg(res.info);
}
else if (res.code == 500) {
layer.msg('服务端异常,请联系管理员');
}
}
});
}
}
});
//登录


+ 70
- 13
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/SSOSystemController.cs 查看文件

@@ -56,6 +56,7 @@ namespace Learun.Application.Web.Controllers
private TeachSwitchIBLL teachSwitchIBLL = new TeachSwitchBLL();
private StuSaverecordIBLL stuSaverecordIBLL = new StuSaverecordBLL();
private StuConsumptionIBLL stuConsumptionIBLL = new StuConsumptionBLL();
private SSO_Drag_CollectManageIBLL sSO_Drag_CollectManageIBLL = new SSO_Drag_CollectManageBLL();

#region 统一身份认证2.0
/// <summary>
@@ -1190,18 +1191,34 @@ namespace Learun.Application.Web.Controllers
ViewBag.StuByMajorStr = JsonConvert.SerializeObject(stuByMajor);
//流程
var flowType = dataItemIBLL.GetDetailList("FlowSort", "");
var flowList = wfSchemeIBLL.GetWfSchemeStart().ToList();
var flowList = wfSchemeIBLL.GetWfSchemeStart().ToList().OrderBy(x => x.F_Id);
var flowListOfCollect = sSO_Drag_CollectManageIBLL.GetList("{\"UserId\":\"" + userInfo.userId + "\",\"ModelCode\":\"one\"}").OrderBy(x => x.SchemeInfoId);
foreach (var item in flowList)
{
item.IsCollect = false;
if (flowListOfCollect.Where(x => x.SchemeInfoId == item.F_Id).Any())
{
item.IsCollect = true;
}
}
var allCount = 0;
var allCountOfCollect = 0;
foreach (var flow in flowType)
{
var count = flowList.Count(a => a.F_Category == flow.F_ItemName);
var count = flowList.Count(a => a.F_Category == flow.F_ItemValue);
flow.FlowCount = count;
allCount += count;
var countOfCollect = flowListOfCollect.Count(x => x.F_Category == flow.F_ItemValue);
flow.FlowCountOfCollect = countOfCollect;
allCountOfCollect += countOfCollect;

}
ViewBag.AllCount = allCount;
ViewBag.FlowType = flowType;
ViewBag.FlowList = JsonConvert.SerializeObject(flowList);
//流程-收藏
ViewBag.AllCountOfCollect = allCountOfCollect;
ViewBag.FlowListOfCollect = JsonConvert.SerializeObject(flowListOfCollect);
//校园一卡通余额
ViewBag.StuSaveRecordTotalNum = 0;
var stuSaveRecordList = stuSaverecordIBLL.GetListByAccount(userInfo.account).OrderByDescending(x => x.UPLOADDATE);
@@ -1471,15 +1488,6 @@ namespace Learun.Application.Web.Controllers
}).ToList();
ViewBag.OffenusedGroup = mm;
ViewBag.OffenusedGroupStr = JsonConvert.SerializeObject(ViewBag.OffenusedGroup);
//todo:
//删begin
ViewBag.OffenusedJiao = modulelist.Where(x => x.F_FullName.Contains("教"));
ViewBag.OffenusedGuan = modulelist.Where(x => x.F_FullName.Contains("管理"));
ViewBag.Offenused = modulelist.Except(modulelist.Where(x => x.F_FullName.Contains("教") || x.F_FullName.Contains("管理"))).Take(6);
ViewBag.OffenusedJiaoStr = JsonConvert.SerializeObject(ViewBag.OffenusedJiao);
ViewBag.OffenusedGuanStr = JsonConvert.SerializeObject(ViewBag.OffenusedGuan);
ViewBag.OffenusedStr = JsonConvert.SerializeObject(ViewBag.Offenused);
//删end
//查找服务
List<ModuleEntity> searchmodulelist = new List<ModuleEntity>();
foreach (var item in moduledata)
@@ -1520,18 +1528,34 @@ namespace Learun.Application.Web.Controllers
ViewBag.StuByMajorStr = JsonConvert.SerializeObject(stuByMajor);
//流程
var flowType = dataItemIBLL.GetDetailList("FlowSort", "");
var flowList = wfSchemeIBLL.GetWfSchemeStart().ToList();
var flowList = wfSchemeIBLL.GetWfSchemeStart().ToList().OrderBy(x => x.F_Id);
var flowListOfCollect = sSO_Drag_CollectManageIBLL.GetList("{\"UserId\":\"" + userInfo.userId + "\",\"ModelCode\":\"two\"}").OrderBy(x => x.SchemeInfoId);
foreach (var item in flowList)
{
item.IsCollect = false;
if (flowListOfCollect.Where(x => x.SchemeInfoId == item.F_Id).Any())
{
item.IsCollect = true;
}
}
var allCount = 0;
var allCountOfCollect = 0;
foreach (var flow in flowType)
{
var count = flowList.Count(a => a.F_Category == flow.F_ItemName);
var count = flowList.Count(a => a.F_Category == flow.F_ItemValue);
flow.FlowCount = count;
allCount += count;
var countOfCollect = flowListOfCollect.Count(x => x.F_Category == flow.F_ItemValue);
flow.FlowCountOfCollect = countOfCollect;
allCountOfCollect += countOfCollect;

}
ViewBag.AllCount = allCount;
ViewBag.FlowType = flowType;
ViewBag.FlowList = JsonConvert.SerializeObject(flowList);
//流程-收藏
ViewBag.AllCountOfCollect = allCountOfCollect;
ViewBag.FlowListOfCollect = JsonConvert.SerializeObject(flowListOfCollect);
//校园一卡通余额
ViewBag.StuSaveRecordTotalNum = 0;
var stuSaveRecordList = stuSaverecordIBLL.GetListByAccount(userInfo.account).OrderByDescending(x => x.UPLOADDATE);
@@ -1815,5 +1839,38 @@ namespace Learun.Application.Web.Controllers
return Success("操作成功");
}

/// <summary>
/// 网上办事大厅拖拽版-收藏应用
/// </summary>
/// <param name="userId"></param>
/// <param name="modelCode"></param>
/// <param name="id"></param>
/// <param name="isCollect">true:收藏,false:取消收藏</param>
/// <returns></returns>
public ActionResult DoCollectFlow(string userId, string modelCode, string id, bool isCollect)
{
sSO_Drag_CollectManageIBLL.DoCollectFlow(userId, modelCode, id, isCollect);

//可用应用列表数据
var flowList = wfSchemeIBLL.GetWfSchemeStart().ToList().OrderBy(x => x.F_Id);
//我的收藏列表数据
var flowListOfCollect = sSO_Drag_CollectManageIBLL.GetList("{\"UserId\":\"" + userId + "\",\"ModelCode\":\"" + modelCode + "\"}").OrderBy(x => x.SchemeInfoId);
foreach (var item in flowList)
{
item.IsCollect = false;
if (flowListOfCollect.Where(x => x.SchemeInfoId == item.F_Id).Any())
{
item.IsCollect = true;
}
}
var data = new
{
flowList = flowList,
flowListOfCollect = flowListOfCollect
};

return Success("操作成功", data);
}

}
}

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

@@ -805,6 +805,7 @@
<Compile Include="Areas\PersonnelManagement\Controllers\ReleaseMettingController.cs" />
<Compile Include="Areas\PersonnelManagement\Controllers\StudyGuideController.cs" />
<Compile Include="Areas\PersonnelManagement\Controllers\ResourceImportController.cs" />
<Compile Include="Areas\LR_Desktop\Controllers\SSO_Drag_CollectManageController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -6369,6 +6370,10 @@
<Content Include="Areas\PersonnelManagement\Views\ResourceImport\Index.js" />
<Content Include="Areas\PersonnelManagement\Views\ResourceImport\Form.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\ResourceImport\Form.js" />
<Content Include="Areas\LR_Desktop\Views\SSO_Drag_CollectManage\Index.cshtml" />
<Content Include="Areas\LR_Desktop\Views\SSO_Drag_CollectManage\Index.js" />
<Content Include="Areas\LR_Desktop\Views\SSO_Drag_CollectManage\Form.cshtml" />
<Content Include="Areas\LR_Desktop\Views\SSO_Drag_CollectManage\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\LR_Desktop\Models\" />


+ 89
- 33
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelOne.cshtml 查看文件

@@ -308,7 +308,7 @@
html += '</div>'
+ '</div>';
}
html+='</div>'
+'</div>'
+'</div>'
@@ -732,6 +732,7 @@
.desktopSetBox b {
font-weight: normal;
}

.searchLi > a {
width: 100%;
}
@@ -739,7 +740,15 @@
.searchLi > a > * {
display: inline-block;
vertical-align: middle;
}
}
.inSec1List2 li{
padding-right:30px;
position:relative;
}
.inSec1List2 .fa{
right:15px;
top:5px;
}
</style>
<!-- / warpper -->
<div class="warpper">
@@ -765,29 +774,29 @@
</div>
<div class="searchR">
@*<div class="searchTop">
<span>服务角色</span>
<ul class="searchTopList">
<li class="active">全部</li>
<li>校领导</li>
<li>游客</li>
<li>教师</li>
<li>学生</li>
</ul>
</div>
<div class="searchTop">
<span>服务角色</span>
<ul class="searchTopList">
<li class="active">全部</li>
<li>最新应用</li>
<li>常用链接</li>
</ul>
</div>*@
<span>服务角色</span>
<ul class="searchTopList">
<li class="active">全部</li>
<li>校领导</li>
<li>游客</li>
<li>教师</li>
<li>学生</li>
</ul>
</div>
<div class="searchTop">
<span>服务角色</span>
<ul class="searchTopList">
<li class="active">全部</li>
<li>最新应用</li>
<li>常用链接</li>
</ul>
</div>*@
<div class="searchRBox">
@{
var searchModule = ViewBag.SearchModule as List<ModuleEntity>;

<div class="searchRTop">
<b>A-D</b> (<span>@searchModule.Where(x=>"abcd".Contains(x.FirstLetter)).Count()</span>)
<b>A-D</b> (<span>@searchModule.Where(x => "abcd".Contains(x.FirstLetter)).Count()</span>)
</div>
<div class="searchList clearfix">
@{
@@ -951,21 +960,24 @@
<div class="indSec1Box">
<div class="inSec1Box">
<!-- 第一级列表 -->
<ul class="inSec1List1">
<ul class="inSec1List1" id="flowTypeListOfCollect">
<li class="active">
<a href="#">
<span>全部</span> <span>0</span>
<a href="#" class="itemName" itemName="全部">
<span>全部</span> <span class="collectCount">@ViewBag.AllCountOfCollect</span>
</a>
</li>
@foreach (DataItemDetailEntity item in ViewBag.FlowType)
{
<li>
<a href="#" class="itemName" itemName="@item.F_ItemValue">
<span>@item.F_ItemName</span> <span class="collectCount">@item.FlowCountOfCollect</span>
</a>
</li>
}
</ul>
<!-- 第一级列表 -->
<!-- 第二级列表 -->
<ul class="inSec1List2 inSecShadow">
@*<li class="active">
<a href="/Home/Index?autoopen=92a85055-67f2-4a06-902a-f10ec5576d92" target="_blank">
<img src="~/Content/images/DragSSO/inSec1-2.png" alt="" /><span>人事管理系统</span>
</a>
</li>*@
<ul class="inSec1List2 inSecShadow" id="flowListOfCollect">
</ul>
<!-- 第二级列表 -->
</div>
@@ -980,7 +992,7 @@
@foreach (DataItemDetailEntity item in ViewBag.FlowType)
{
<li>
<a href="#" class="itemName" itemName="@item.F_ItemName">
<a href="#" class="itemName" itemName="@item.F_ItemValue">
<span>@item.F_ItemName</span> <span>@item.FlowCount</span>
</a>
</li>
@@ -1648,15 +1660,59 @@
var category = $(this).attr("itemName");
$('#flowTypeList').find('li.active').removeClass('active');
$(this).parent('li').addClass("active");
$.each(flowListJson,function(i, item) {
$.each(flowListJson, function (i, item) {
var collectClass = "fa-heart-o";
if (item.IsCollect == true) {
collectClass = "fa-heart";
}
if (category == "全部") {
html += "<li> <a href=\"/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf&id="+item.F_Id+"&shcemeCode="+item.F_Code+"\" target=\"_blank\"> <img src=\"/Content/images/DragSSO/inSec1-"+Math.floor(Math.random()*21+2)+".png\" /><span>"+item.F_Name+"</span> </a> </li>";
html += "<li data-Id=\""+item.F_Id+"\"> <a href=\"/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf&id=" + item.F_Id + "&shcemeCode=" + item.F_Code + "\" target=\"_blank\"> <img src=\"/Content/images/DragSSO/inSec1-" + Math.floor(Math.random() * 21 + 2) + ".png\" /><span>" + item.F_Name + "</span> </a> <i class=\"fa " + collectClass +"\"></i> </li>";
}else if (item.F_Category==category) {
html += "<li> <a href=\"/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf&id=" + item.F_Id + "&shcemeCode=" + item.F_Code +"\" target=\"_blank\"> <img src=\"/Content/images/DragSSO/inSec1-"+Math.floor(Math.random()*21+2)+".png\" /><span>"+item.F_Name+"</span> </a> </li>";
html += "<li data-Id=\"" + item.F_Id +"\"> <a href=\"/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf&id=" + item.F_Id + "&shcemeCode=" + item.F_Code + "\" target=\"_blank\"> <img src=\"/Content/images/DragSSO/inSec1-" + Math.floor(Math.random() * 21 + 2) + ".png\" /><span>" + item.F_Name + "</span> </a> <i class=\"fa " + collectClass +"\"></i> </li>";
}
});
$("#flowList").html(html);
})
$("#flowTypeList").find(".itemName").eq(0).trigger("click");

//左侧-我的收藏
var flowListOfCollect = '@ViewBag.FlowListOfCollect';
flowListOfCollect = flowListOfCollect.replace(/&quot;/g, "\"");
var flowListOfCollectJson = JSON.parse(flowListOfCollect);
$("#flowTypeListOfCollect").find(".itemName").bind("click", function() {
var html = "";
var category = $(this).attr("itemName");
$('#flowTypeListOfCollect').find('li.active').removeClass('active');
$(this).parent('li').addClass("active");
$.each(flowListOfCollectJson, function (i, item) {
var collectClass = "fa-heart";
if (category == "全部") {
html += "<li data-Id=\"" + item.SchemeInfoId +"\"> <a href=\"/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf&id=" + item.SchemeInfoId + "&shcemeCode=" + item.F_Code + "\" target=\"_blank\"> <img src=\"/Content/images/DragSSO/inSec1-" + Math.floor(Math.random() * 21 + 2) + ".png\" /><span>" + item.F_Name + "</span> </a> <i class=\"fa " + collectClass +"\"></i> </li>";
}else if (item.F_Category==category) {
html += "<li data-Id=\"" + item.SchemeInfoId +"\"> <a href=\"/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf&id=" + item.SchemeInfoId + "&shcemeCode=" + item.F_Code + "\" target=\"_blank\"> <img src=\"/Content/images/DragSSO/inSec1-" + Math.floor(Math.random() * 21 + 2) + ".png\" /><span>" + item.F_Name + "</span> </a> <i class=\"fa " + collectClass +"\"></i> </li>";
}
});
$("#flowListOfCollect").html(html);
})
$("#flowTypeListOfCollect").find(".itemName").eq(0).trigger("click");

//更新“左侧-我的收藏”左侧分类数量
var updateCollectCount = function (data) {
$.each($("#flowTypeListOfCollect").find(".itemName"), function (i, item) {
var category = $(item).attr("itemName");
if (category == "全部") {
$(item).find('.collectCount').html(data.length);
} else {
var count = 0;
$.each(data, function (j, jtem) {
if (jtem.F_Category == category) {
count++;
}
});
$(item).find('.collectCount').html(count);
}
});
};


</script>

+ 70
- 15
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/SSOSystem/DragModelTwo.cshtml 查看文件

@@ -740,7 +740,16 @@
.searchLi > a > * {
display: inline-block;
vertical-align: middle;
}
}
.inSec1List2 li {
padding-right: 30px;
position: relative;
}

.inSec1List2 .fa {
right: 15px;
top: 5px;
}
</style>
<!-- / warpper -->
<div class="warpper">
@@ -952,22 +961,24 @@
<div class="indSec1Box">
<div class="inSec1Box">
<!-- 第一级列表 -->
<ul class="inSec1List1">
<ul class="inSec1List1" id="flowTypeListOfCollect">
<li class="active">
<a href="#">
<span>全部</span> <span>0</span>
<a href="#" class="itemName" itemName="全部">
<span>全部</span> <span class="collectCount">@ViewBag.AllCountOfCollect</span>
</a>
</li>
@foreach (DataItemDetailEntity item in ViewBag.FlowType)
{
<li>
<a href="#" class="itemName" itemName="@item.F_ItemValue">
<span>@item.F_ItemName</span> <span class="collectCount">@item.FlowCountOfCollect</span>
</a>
</li>
}
</ul>
<!-- 第一级列表 -->
<!-- 第二级列表 -->
<ul class="inSec1List2 inSecShadow">
@*<li class="active">
<a href="/Home/Index?autoopen=92a85055-67f2-4a06-902a-f10ec5576d92" target="_blank">
<img src="~/Content/images/DragSSO/inSec1-2.png" alt="" /><span>人事管理系统</span>
</a>
</li>*@
</ul>
<ul class="inSec1List2 inSecShadow" id="flowListOfCollect"></ul>
<!-- 第二级列表 -->
</div>
<div class="inSec1Box">
@@ -981,7 +992,7 @@
@foreach (DataItemDetailEntity item in ViewBag.FlowType)
{
<li>
<a href="#" class="itemName" itemName="@item.F_ItemName">
<a href="#" class="itemName" itemName="@item.F_ItemValue">
<span>@item.F_ItemName</span> <span>@item.FlowCount</span>
</a>
</li>
@@ -1599,15 +1610,59 @@
var category = $(this).attr("itemName");
$('#flowTypeList').find('li.active').removeClass('active');
$(this).parent('li').addClass("active");
$.each(flowListJson,function(i, item) {
$.each(flowListJson, function (i, item) {
var collectClass = "fa-heart-o";
if (item.IsCollect == true) {
collectClass = "fa-heart";
}
if (category == "全部") {
html += "<li> <a href=\"/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf&id="+item.F_Id+"&shcemeCode="+item.F_Code+"\" target=\"_blank\"> <img src=\"/Content/images/DragSSO/inSec1-"+Math.floor(Math.random()*21+2)+".png\" /><span>"+item.F_Name+"</span> </a> </li>";
html += "<li data-Id=\""+item.F_Id+"\"> <a href=\"/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf&id=" + item.F_Id + "&shcemeCode=" + item.F_Code + "\" target=\"_blank\"> <img src=\"/Content/images/DragSSO/inSec1-" + Math.floor(Math.random() * 21 + 2) + ".png\" /><span>" + item.F_Name + "</span> </a> <i class=\"fa " + collectClass +"\"></i> </li>";
}else if (item.F_Category==category) {
html += "<li> <a href=\"/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf&id=" + item.F_Id + "&shcemeCode=" + item.F_Code +"\" target=\"_blank\"> <img src=\"/Content/images/DragSSO/inSec1-"+Math.floor(Math.random()*21+2)+".png\" /><span>"+item.F_Name+"</span> </a> </li>";
html += "<li data-Id=\"" + item.F_Id +"\"> <a href=\"/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf&id=" + item.F_Id + "&shcemeCode=" + item.F_Code + "\" target=\"_blank\"> <img src=\"/Content/images/DragSSO/inSec1-" + Math.floor(Math.random() * 21 + 2) + ".png\" /><span>" + item.F_Name + "</span> </a> <i class=\"fa " + collectClass +"\"></i> </li>";
}
});
$("#flowList").html(html);
})
$("#flowTypeList").find(".itemName").eq(0).trigger("click");

//左侧-我的收藏
var flowListOfCollect = '@ViewBag.FlowListOfCollect';
flowListOfCollect = flowListOfCollect.replace(/&quot;/g, "\"");
var flowListOfCollectJson = JSON.parse(flowListOfCollect);
$("#flowTypeListOfCollect").find(".itemName").bind("click", function() {
var html = "";
var category = $(this).attr("itemName");
$('#flowTypeListOfCollect').find('li.active').removeClass('active');
$(this).parent('li').addClass("active");
$.each(flowListOfCollectJson, function (i, item) {
var collectClass = "fa-heart";
if (category == "全部") {
html += "<li data-Id=\"" + item.SchemeInfoId +"\"> <a href=\"/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf&id=" + item.SchemeInfoId + "&shcemeCode=" + item.F_Code + "\" target=\"_blank\"> <img src=\"/Content/images/DragSSO/inSec1-" + Math.floor(Math.random() * 21 + 2) + ".png\" /><span>" + item.F_Name + "</span> </a> <i class=\"fa " + collectClass +"\"></i> </li>";
}else if (item.F_Category==category) {
html += "<li data-Id=\"" + item.SchemeInfoId +"\"> <a href=\"/Home/Index?autoopen=56ce34c2-882e-47d1-b12d-5036e3b79fcf&id=" + item.SchemeInfoId + "&shcemeCode=" + item.F_Code + "\" target=\"_blank\"> <img src=\"/Content/images/DragSSO/inSec1-" + Math.floor(Math.random() * 21 + 2) + ".png\" /><span>" + item.F_Name + "</span> </a> <i class=\"fa " + collectClass +"\"></i> </li>";
}
});
$("#flowListOfCollect").html(html);
})
$("#flowTypeListOfCollect").find(".itemName").eq(0).trigger("click");

//更新“左侧-我的收藏”左侧分类数量
var updateCollectCount = function (data) {
$.each($("#flowTypeListOfCollect").find(".itemName"), function (i, item) {
var category = $(item).attr("itemName");
if (category == "全部") {
$(item).find('.collectCount').html(data.length);
} else {
var count = 0;
$.each(data, function (j, jtem) {
if (jtem.F_Category == category) {
count++;
}
});
$(item).find('.collectCount').html(count);
}
});
};


</script>

+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/DataItem/DataItemDetailEntity.cs 查看文件

@@ -142,6 +142,11 @@ namespace Learun.Application.Base.SystemModule
/// </summary>
[NotMapped]
public int FlowCount { get; set; }
/// <summary>
/// 新增调用
/// </summary>
[NotMapped]
public int FlowCountOfCollect { get; set; }
public void Create()
{
this.F_ItemDetailId = Guid.NewGuid().ToString();


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

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

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-02 16:12
/// 描 述:网上办事大厅拖拽版-可用应用收藏管理
/// </summary>
public class SSO_Drag_CollectManageMap : EntityTypeConfiguration<SSO_Drag_CollectManageEntity>
{
public SSO_Drag_CollectManageMap()
{
#region 表、主键
//表
this.ToTable("SSO_DRAG_COLLECTMANAGE");
//主键
this.HasKey(t => t.Id);
#endregion

#region 配置关系
#endregion
}
}
}


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

@@ -559,6 +559,7 @@
<Compile Include="PersonnelManagement\ReleaseMettingMap.cs" />
<Compile Include="PersonnelManagement\StudyGuideMap.cs" />
<Compile Include="PersonnelManagement\ResourceImportMap.cs" />
<Compile Include="LR_Desktop\SSO_Drag_CollectManageMap.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


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


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_CardSortManage/SSO_Drag_CardSortManageEntity.cs 查看文件

@@ -27,7 +27,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
[Column("USERID")]
public string UserId { get; set; }
/// <summary>
/// 模式编号:0办事大厅模式,1效率优先模式,2管理驾驶舱模式
/// 模式编号:one办事大厅模式,two效率优先模式,three管理驾驶舱模式
/// </summary>
/// <returns></returns>
[Column("MODELCODE")]


+ 171
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_CollectManage/SSO_Drag_CollectManageBLL.cs 查看文件

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

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-02 16:12
/// 描 述:网上办事大厅拖拽版-可用应用收藏管理
/// </summary>
public class SSO_Drag_CollectManageBLL : SSO_Drag_CollectManageIBLL
{
private SSO_Drag_CollectManageService sSO_Drag_CollectManageService = new SSO_Drag_CollectManageService();

#region 获取数据

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<SSO_Drag_CollectManageEntity> GetList(string queryJson)
{
try
{
return sSO_Drag_CollectManageService.GetList(queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

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

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

#endregion

#region 提交数据

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

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

/// <summary>
/// 收藏
/// </summary>
/// <param name="keyValue">主键</param>
public void DoCollectFlow(string userId, string modelCode, string id, bool isCollect)
{
try
{
sSO_Drag_CollectManageService.DoCollectFlow(userId, modelCode, id, isCollect);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 86
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_CollectManage/SSO_Drag_CollectManageEntity.cs 查看文件

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

{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-02 16:12
/// 描 述:网上办事大厅拖拽版-可用应用收藏管理
/// </summary>
public class SSO_Drag_CollectManageEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
/// <returns></returns>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 用户
/// </summary>
/// <returns></returns>
[Column("USERID")]
public string UserId { get; set; }
/// <summary>
/// 模式编号:one办事大厅模式,two效率优先模式,three管理驾驶舱模式
/// </summary>
/// <returns></returns>
[Column("MODELCODE")]
public string ModelCode { get; set; }
/// <summary>
/// 可用应用Id
/// </summary>
/// <returns></returns>
[Column("SCHEMEINFOID")]
public string SchemeInfoId { get; set; }
/// <summary>
/// 收藏时间
/// </summary>
/// <returns></returns>
[Column("TIME")]
public DateTime? Time { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.Id = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.Id = keyValue;
}
#endregion
#region 扩展字段
/// <summary>
/// 流程设计分类编号
/// </summary>
[NotMapped]
public string F_Category { get; set; }
/// <summary>
/// 流程设计编号
/// </summary>
[NotMapped]
public string F_Code { get; set; }
/// <summary>
/// 流程设计名称
/// </summary>
[NotMapped]
public string F_Name { get; set; }

#endregion
}
}


+ 61
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_CollectManage/SSO_Drag_CollectManageIBLL.cs 查看文件

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

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-02 16:12
/// 描 述:网上办事大厅拖拽版-可用应用收藏管理
/// </summary>
public interface SSO_Drag_CollectManageIBLL
{
#region 获取数据

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<SSO_Drag_CollectManageEntity> GetList(string queryJson);
/// <summary>
/// 获取列表分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<SSO_Drag_CollectManageEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
SSO_Drag_CollectManageEntity GetEntity(string keyValue);
#endregion

#region 提交数据

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

/// <summary>
/// 收藏
/// </summary>
/// <param name="keyValue">主键</param>
void DoCollectFlow(string userId, string modelCode, string id, bool isCollect);
#endregion

}
}

+ 242
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/SSO_Drag_CollectManage/SSO_Drag_CollectManageService.cs 查看文件

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

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-06-02 16:12
/// 描 述:网上办事大厅拖拽版-可用应用收藏管理
/// </summary>
public class SSO_Drag_CollectManageService : RepositoryFactory
{
#region 构造函数和属性

private string fieldSql;
/// <summary>
/// 构造方法
/// </summary>
public SSO_Drag_CollectManageService()
{
fieldSql = @"
t.Id,
t.UserId,
t.ModelCode,
t.SchemeInfoId,
t.Time
";
}
#endregion

#region 获取数据

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">条件参数</param>
/// <returns></returns>
public IEnumerable<SSO_Drag_CollectManageEntity> GetList(string queryJson)
{
try
{
//参考写法
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
var strSql = new StringBuilder();
strSql.Append("SELECT t.*,s.F_Category,s.F_Code,s.F_Name ");
strSql.Append(" FROM SSO_Drag_CollectManage t ");
strSql.Append(" left join LR_NWF_SchemeInfo s on t.SchemeInfoId=s.F_Id ");
strSql.Append(" where 1=1 ");
if (!queryParam["UserId"].IsEmpty())
{
dp.Add("UserId", queryParam["UserId"].ToString(), DbType.String);
strSql.Append(" AND t.UserId = @UserId ");
}
if (!queryParam["ModelCode"].IsEmpty())
{
dp.Add("ModelCode", queryParam["ModelCode"].ToString(), DbType.String);
strSql.Append(" AND t.ModelCode = @ModelCode ");
}
return this.BaseRepository().FindList<SSO_Drag_CollectManageEntity>(strSql.ToString(), dp);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取列表分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">条件参数</param>
/// <returns></returns>
public IEnumerable<SSO_Drag_CollectManageEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT t.* ");
strSql.Append(" FROM SSO_Drag_CollectManage t ");
return this.BaseRepository().FindList<SSO_Drag_CollectManageEntity>(strSql.ToString(), pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

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

#endregion

#region 提交数据

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

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

/// <summary>
/// 收藏
/// </summary>
/// <param name="keyValue">主键</param>
public void DoCollectFlow(string userId, string modelCode, string id, bool isCollect)
{
try
{
if (isCollect)
{
//收藏
var model = this.BaseRepository().FindEntity<SSO_Drag_CollectManageEntity>(x => x.UserId == userId && x.ModelCode == modelCode && x.SchemeInfoId == id);
if (model == null)
{
var entity = new SSO_Drag_CollectManageEntity()
{
UserId = userId,
ModelCode = modelCode,
SchemeInfoId = id,
Time = DateTime.Now
};
entity.Create();
this.BaseRepository().Insert(entity);
}
}
else
{
//取消收藏
this.BaseRepository().Delete<SSO_Drag_CollectManageEntity>(x => x.UserId == userId && x.ModelCode == modelCode && x.SchemeInfoId == id);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

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

@@ -1654,6 +1654,10 @@
<Compile Include="PersonnelManagement\ResourceImport\ResourceImportService.cs" />
<Compile Include="PersonnelManagement\ResourceImport\ResourceImportBLL.cs" />
<Compile Include="PersonnelManagement\ResourceImport\ResourceImportIBLL.cs" />
<Compile Include="LR_Desktop\SSO_Drag_CollectManage\SSO_Drag_CollectManageEntity.cs" />
<Compile Include="LR_Desktop\SSO_Drag_CollectManage\SSO_Drag_CollectManageService.cs" />
<Compile Include="LR_Desktop\SSO_Drag_CollectManage\SSO_Drag_CollectManageIBLL.cs" />
<Compile Include="LR_Desktop\SSO_Drag_CollectManage\SSO_Drag_CollectManageBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/WfProcess/WfProcessInstanceEntity.cs 查看文件

@@ -187,6 +187,11 @@ namespace Learun.Application.WorkFlow
/// </summary>
[NotMapped]
public string F_Kind { get; set; }
/// <summary>
/// 是否收藏【网上办事大厅拖拽版】
/// </summary>
[NotMapped]
public bool IsCollect { get; set; }

#endregion
}


Loading…
取消
儲存