mirror of
https://github.com/cq-panda/Vue.NetCore.git
synced 2026-10-16 21:13:22 +08:00
增加8.0升级说明
This commit is contained in:
@@ -101,3 +101,9 @@
|
||||
/vol.api/VOL.Entity/bin
|
||||
/vol.api/VOL.MES/obj
|
||||
/vol.api/VOL.MES/bin
|
||||
/vol.api/.vs
|
||||
/vol.api/VOL.Sys/obj
|
||||
/vol.api/VOL.Sys/bin
|
||||
/vol.api/VOL.WebApi/obj
|
||||
/vol.api/VOL.WebApi/bin
|
||||
/vol.api.sqlsugar/.vs
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,14 +0,0 @@
|
||||
1、现有后台与SqlSugar区别:SqlSugar版本只有SqlSugar一种操作数据库并且是独立同步维护的;现有版本(.net6后台文件夹)数据库访问是EF+Dapper
|
||||
2、两个后台版本都会同步维护,按需使用其中一个版本即可;
|
||||
|
||||
3、现有代码迁移SqlSugar版本:
|
||||
(1)为了更好的开发体验,SqlSugar版本不对框架做兼容,而是重写了整个框架数据库访问,所以现有项目不能直接升级;
|
||||
(2)升级方式:
|
||||
a、 现有后台项目不要了,数据库与前端不变;
|
||||
b、SqlSugar版本项目,修改配置appsettings.json数据库链接
|
||||
c、后台双击builder_run.bat启动项目,将现有数据表在代码生成器全部重新点一次【生成model】与【生成业务类】
|
||||
d、 业务逻辑迁移:将【表Service】类中的代码直接复制过来即可,里面调用数据库操作大部分方法是一样的。如果有差异自行修改或者截图发群里
|
||||
|
||||
|
||||
其他问题:截图发群里
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*如果要增加方法请在当前目录下Partial文件夹FormCollectionObjectController编写
|
||||
*/
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using VOL.Core.Controllers.Basic;
|
||||
using VOL.Entity.AttributeManager;
|
||||
using VOL.Sys.IServices;
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
[Route("api/FormCollectionObject")]
|
||||
[PermissionTable(Name = "FormCollectionObject")]
|
||||
public partial class FormCollectionObjectController : ApiBaseController<IFormCollectionObjectService>
|
||||
{
|
||||
public FormCollectionObjectController(IFormCollectionObjectService service)
|
||||
: base(service)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*如果要增加方法请在当前目录下Partial文件夹FormDesignOptionsController编写
|
||||
*/
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using VOL.Core.Controllers.Basic;
|
||||
using VOL.Entity.AttributeManager;
|
||||
using VOL.Sys.IServices;
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
[Route("api/FormDesignOptions")]
|
||||
[PermissionTable(Name = "FormDesignOptions")]
|
||||
public partial class FormDesignOptionsController : ApiBaseController<IFormDesignOptionsService>
|
||||
{
|
||||
public FormDesignOptionsController(IFormDesignOptionsService service)
|
||||
: base(service)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
*接口编写处...
|
||||
*如果接口需要做Action的权限验证,请在Action上使用属性
|
||||
*如: [ApiActionPermission("FormCollectionObject",Enums.ActionPermissionOptions.Search)]
|
||||
*/
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Sys.IServices;
|
||||
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
public partial class FormCollectionObjectController
|
||||
{
|
||||
private readonly IFormCollectionObjectService _service;//访问业务代码
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
|
||||
[ActivatorUtilitiesConstructor]
|
||||
public FormCollectionObjectController(
|
||||
IFormCollectionObjectService service,
|
||||
IHttpContextAccessor httpContextAccessor
|
||||
)
|
||||
: base(service)
|
||||
{
|
||||
_service = service;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
*接口编写处...
|
||||
*如果接口需要做Action的权限验证,请在Action上使用属性
|
||||
*如: [ApiActionPermission("FormDesignOptions",Enums.ActionPermissionOptions.Search)]
|
||||
*/
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Sys.IServices;
|
||||
using VOL.Sys.IRepositories;
|
||||
using System.Linq;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using VOL.Sys.Services;
|
||||
using VOL.Core.DBManager;
|
||||
using SqlSugar;
|
||||
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
public partial class FormDesignOptionsController
|
||||
{
|
||||
private readonly IFormDesignOptionsService _service;//访问业务代码
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
private readonly IFormCollectionObjectRepository _formCollectionRepository;
|
||||
private readonly IFormDesignOptionsRepository _formDesignOptionsRepository;
|
||||
[ActivatorUtilitiesConstructor]
|
||||
public FormDesignOptionsController(
|
||||
IFormDesignOptionsService service,
|
||||
IHttpContextAccessor httpContextAccessor,
|
||||
IFormCollectionObjectRepository formCollectionRepository,
|
||||
IFormDesignOptionsRepository formDesignOptionsRepository
|
||||
)
|
||||
: base(service)
|
||||
{
|
||||
_service = service;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
_formCollectionRepository = formCollectionRepository;
|
||||
_formDesignOptionsRepository = formDesignOptionsRepository;
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[Route("getFormOptions"), HttpGet]
|
||||
public async Task<IActionResult> GetFormOptions(Guid id)
|
||||
{
|
||||
var options = await _formDesignOptionsRepository.FindAsIQueryable(x => x.FormId == id)
|
||||
.Select(s => new { s.Title, s.FormOptions })
|
||||
.FirstOrDefaultAsync();
|
||||
return Json(new { data = options });
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="saveModel"></param>
|
||||
/// <returns></returns>
|
||||
[Route("submit"), HttpPost]
|
||||
public IActionResult Submit([FromBody] SaveModel saveModel)
|
||||
{
|
||||
var result = FormCollectionObjectService.Instance.Add(saveModel);
|
||||
return Json(result);
|
||||
}
|
||||
/// <summary>
|
||||
///获取有数据的设计器
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Route("getList"), HttpGet]
|
||||
public IActionResult GetList()
|
||||
{
|
||||
var query = _formCollectionRepository.FindAsIQueryable(x => true);
|
||||
var data = _formDesignOptionsRepository.FindAsIQueryable(x => SqlFunc.Subqueryable<FormCollectionObject>().Where(c => c.FormId == x.FormId).Any())
|
||||
.Select(s => new { s.FormId, s.Title, s.FormOptions })
|
||||
.ToList();
|
||||
return Json(data);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
*接口编写处...
|
||||
*如果接口需要做Action的权限验证,请在Action上使用属性
|
||||
*如: [ApiActionPermission("Sys_Department",Enums.ActionPermissionOptions.Search)]
|
||||
*/
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Sys.IServices;
|
||||
using VOL.Core.Filters;
|
||||
using VOL.Core.Enums;
|
||||
using VOL.Core.Extensions;
|
||||
using VOL.Sys.IRepositories;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Linq;
|
||||
using VOL.Core.ManageUser;
|
||||
using VOL.Core.UserManager;
|
||||
using SqlSugar;
|
||||
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
public partial class Sys_DepartmentController
|
||||
{
|
||||
private readonly ISys_DepartmentService _service;//访问业务代码
|
||||
private readonly ISys_DepartmentRepository _repository;
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
|
||||
[ActivatorUtilitiesConstructor]
|
||||
public Sys_DepartmentController(
|
||||
ISys_DepartmentService service,
|
||||
ISys_DepartmentRepository repository,
|
||||
IHttpContextAccessor httpContextAccessor
|
||||
)
|
||||
: base(service)
|
||||
{
|
||||
_service = service;
|
||||
_repository = repository;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// treetable 获取子节点数据(2021.05.02)
|
||||
/// </summary>
|
||||
/// <param name="loadData"></param>
|
||||
/// <returns></returns>
|
||||
[ApiActionPermission(ActionPermissionOptions.Search)]
|
||||
[HttpPost, Route("GetPageData")]
|
||||
public override ActionResult GetPageData([FromBody] PageDataOptions loadData)
|
||||
{
|
||||
if (loadData.Value.GetInt() == 1)
|
||||
{
|
||||
return GetTreeTableRootData(loadData).Result;
|
||||
}
|
||||
return base.GetPageData(loadData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// treetable 获取子节点数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("getTreeTableRootData")]
|
||||
[ApiActionPermission(ActionPermissionOptions.Search)]
|
||||
public async Task<ActionResult> GetTreeTableRootData([FromBody] PageDataOptions options)
|
||||
{
|
||||
//页面加载根节点数据条件x => x.ParentId == 0,自己根据需要设置
|
||||
var query = _repository.FindAsIQueryable(x => true);
|
||||
if (UserContext.Current.IsSuperAdmin)
|
||||
{
|
||||
query = query.Where(x => x.ParentId == null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var deptIds = UserContext.Current.DeptIds;
|
||||
var list = DepartmentContext.GetAllDept().Where(c => deptIds.Contains(c.id)).ToList();
|
||||
deptIds = list.Where(c => !list.Any(x => x.id == c.parentId)).Select(x => x.id).ToList();
|
||||
query = query.Where(x => deptIds.Contains(x.DepartmentId));
|
||||
}
|
||||
var queryChild = _repository.FindAsIQueryable(x => true);
|
||||
var rows = await query.TakeOrderByPage(options.Page, options.Rows)
|
||||
.OrderBy(x => x.DepartmentName).Select(s => new
|
||||
{
|
||||
s.DepartmentId,
|
||||
s.ParentId,
|
||||
s.DepartmentName,
|
||||
s.DepartmentCode,
|
||||
s.Enable,
|
||||
s.Remark,
|
||||
s.CreateDate,
|
||||
s.Creator,
|
||||
s.Modifier,
|
||||
s.ModifyDate,
|
||||
hasChildren = SqlFunc.Subqueryable<Sys_Department>().Where(x => x.ParentId == s.DepartmentId).Any()
|
||||
}).ToListAsync();
|
||||
return JsonNormal(new { total = await query.CountAsync(), rows });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///treetable 获取子节点数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("getTreeTableChildrenData")]
|
||||
[ApiActionPermission(ActionPermissionOptions.Search)]
|
||||
public async Task<ActionResult> GetTreeTableChildrenData(Guid departmentId)
|
||||
{
|
||||
//点击节点时,加载子节点数据
|
||||
var query = _repository.FindAsIQueryable(x => true);
|
||||
var rows = await query.Where(x => x.ParentId == departmentId)
|
||||
.Select(s => new
|
||||
{
|
||||
s.DepartmentId,
|
||||
s.ParentId,
|
||||
s.DepartmentName,
|
||||
s.DepartmentCode,
|
||||
s.Enable,
|
||||
s.Remark,
|
||||
s.CreateDate,
|
||||
s.Creator,
|
||||
s.Modifier,
|
||||
s.ModifyDate,
|
||||
hasChildren = SqlFunc.Subqueryable<Sys_Department>().Where(x => x.ParentId == s.DepartmentId).Any()
|
||||
}).ToListAsync();
|
||||
return JsonNormal(new { rows });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.Controllers.Basic;
|
||||
using VOL.Core.Extensions;
|
||||
using VOL.Core.Filters;
|
||||
using VOL.Sys.IServices;
|
||||
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
public partial class Sys_DictionaryController
|
||||
{
|
||||
[HttpPost, Route("GetVueDictionary")]
|
||||
[ApiActionPermission()]
|
||||
public IActionResult GetVueDictionary([FromBody] string[] dicNos)
|
||||
{
|
||||
return Content(Service.GetVueDictionary(dicNos).Serialize());
|
||||
}
|
||||
/// <summary>
|
||||
/// table加载数据后刷新当前table数据的字典项(适用字典数据量比较大的情况)
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("getTableDictionary")]
|
||||
public IActionResult GetTableDictionary([FromBody] Dictionary<string, object[]> keyData)
|
||||
{
|
||||
return Json(Service.GetTableDictionary(keyData));
|
||||
}
|
||||
/// <summary>
|
||||
/// 远程搜索
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("getSearchDictionary")]
|
||||
public IActionResult GetSearchDictionary(string dicNo, string value)
|
||||
{
|
||||
return Json(Service.GetSearchDictionary(dicNo, value));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 表单设置为远程查询,重置或第一次添加表单时,获取字典的key、value
|
||||
/// </summary>
|
||||
/// <param name="dicNo"></param>
|
||||
/// <param name="key"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("getRemoteDefaultKeyValue")]
|
||||
public async Task<IActionResult> GetRemoteDefaultKeyValue(string dicNo, string key)
|
||||
{
|
||||
return Json(await Service.GetRemoteDefaultKeyValue(dicNo, key));
|
||||
}
|
||||
/// <summary>
|
||||
/// 代码生成器获取所有字典项(超级管理权限)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("GetBuilderDictionary")]
|
||||
// [ApiActionPermission(ActionRolePermission.SuperAdmin)]
|
||||
public async Task<IActionResult> GetBuilderDictionary()
|
||||
{
|
||||
return Json(await Service.GetBuilderDictionary());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
*接口编写处...
|
||||
*如果接口需要做Action的权限验证,请在Action上使用属性
|
||||
*如: [ApiActionPermission("Sys_DictionaryList",Enums.ActionPermissionOptions.Search)]
|
||||
*/
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Sys.IServices;
|
||||
using VOL.Core.Filters;
|
||||
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
public partial class Sys_DictionaryListController
|
||||
{
|
||||
private readonly ISys_DictionaryListService _service;//访问业务代码
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
|
||||
[ActivatorUtilitiesConstructor]
|
||||
public Sys_DictionaryListController(
|
||||
ISys_DictionaryListService service,
|
||||
IHttpContextAccessor httpContextAccessor
|
||||
)
|
||||
: base(service)
|
||||
{
|
||||
_service = service;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
}
|
||||
/// <summary>
|
||||
/// 导出明细
|
||||
/// (重写权限)将子表的权限指向主表权限
|
||||
/// </summary>
|
||||
/// <param name="loadData"></param>
|
||||
/// <returns></returns>
|
||||
[ApiActionPermission("Sys_Dictionary", Core.Enums.ActionPermissionOptions.Export)]
|
||||
[ApiExplorerSettings(IgnoreApi = false)]
|
||||
[HttpPost, Route("Export")]
|
||||
public override ActionResult Export([FromBody] PageDataOptions loadData)
|
||||
{
|
||||
return base.Export(loadData);
|
||||
}
|
||||
/// <summary>
|
||||
/// 导入表数据Excel
|
||||
/// (重写权限)将子表的权限指向主表权限
|
||||
/// </summary>
|
||||
/// <param name="fileInput"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Import")]
|
||||
[ApiActionPermission("Sys_Dictionary", Core.Enums.ActionPermissionOptions.Import)]
|
||||
[ApiExplorerSettings(IgnoreApi = false)]
|
||||
public override ActionResult Import(List<IFormFile> fileInput)
|
||||
{
|
||||
return base.Import(fileInput);
|
||||
}
|
||||
/// <summary>
|
||||
/// 下载导入Excel模板
|
||||
/// (重写权限)将子表的权限指向主表权限
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("DownLoadTemplate")]
|
||||
[ApiActionPermission("Sys_Dictionary", Core.Enums.ActionPermissionOptions.Import)]
|
||||
[ApiExplorerSettings(IgnoreApi = false)]
|
||||
public override ActionResult DownLoadTemplate()
|
||||
{
|
||||
return base.DownLoadTemplate();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.Enums;
|
||||
using VOL.Core.Filters;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Sys.IServices;
|
||||
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
public partial class Sys_MenuController
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet, HttpPost, Route("getTreeMenu")]
|
||||
//2019.10.24屏蔽用户查询自己权限菜单
|
||||
// [ApiActionPermission("Sys_Menu", ActionPermissionOptions.Search)]
|
||||
public async Task<IActionResult> GetTreeMenu()
|
||||
{
|
||||
return Json(await _service.GetCurrentMenuActionList());
|
||||
}
|
||||
[HttpPost, Route("getMenu")]
|
||||
[ApiActionPermission("Sys_Menu", ActionPermissionOptions.Search)]
|
||||
public async Task<IActionResult> GetMenu()
|
||||
{
|
||||
return Json(await _service.GetMenu());
|
||||
}
|
||||
|
||||
[HttpPost, Route("getTreeItem")]
|
||||
[ApiActionPermission("Sys_Menu", "1", ActionPermissionOptions.Search)]
|
||||
public async Task<IActionResult> GetTreeItem(int menuId)
|
||||
{
|
||||
return Json(await _service.GetTreeItem(menuId));
|
||||
}
|
||||
|
||||
//[ActionPermission("Sys_Menu", "1", ActionPermissionOptions.Add)]
|
||||
//只有角色ID为1的才能进行保存操作
|
||||
[HttpPost, Route("save"), ApiActionPermission(ActionRolePermission.SuperAdmin)]
|
||||
public async Task<ActionResult> Save([FromBody] Sys_Menu menu)
|
||||
{
|
||||
return Json(await _service.Save(menu));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 限制只能超级管理员才删除菜单
|
||||
/// </summary>
|
||||
/// <param name="keys"></param>
|
||||
/// <returns></returns>
|
||||
[ApiActionPermission(ActionRolePermission.SuperAdmin)]
|
||||
[HttpPost, Route("delMenu")]
|
||||
public async Task<ActionResult> DelMenu(int menuId)
|
||||
{
|
||||
return Json(await Service.DelMenu(menuId));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
*接口编写处...
|
||||
*如果接口需要做Action的权限验证,请在Action上使用属性
|
||||
*如: [ApiActionPermission("Sys_QuartzLog",Enums.ActionPermissionOptions.Search)]
|
||||
*/
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Sys.IServices;
|
||||
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
public partial class Sys_QuartzLogController
|
||||
{
|
||||
private readonly ISys_QuartzLogService _service;//访问业务代码
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
|
||||
[ActivatorUtilitiesConstructor]
|
||||
public Sys_QuartzLogController(
|
||||
ISys_QuartzLogService service,
|
||||
IHttpContextAccessor httpContextAccessor
|
||||
)
|
||||
: base(service)
|
||||
{
|
||||
_service = service;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
*接口编写处...
|
||||
*如果接口需要做Action的权限验证,请在Action上使用属性
|
||||
*如: [ApiActionPermission("Sys_QuartzOptions",Enums.ActionPermissionOptions.Search)]
|
||||
*/
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Sys.IServices;
|
||||
using VOL.Core.Filters;
|
||||
using VOL.Core.Enums;
|
||||
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
public partial class Sys_QuartzOptionsController
|
||||
{
|
||||
private readonly ISys_QuartzOptionsService _service;//访问业务代码
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
|
||||
[ActivatorUtilitiesConstructor]
|
||||
public Sys_QuartzOptionsController(
|
||||
ISys_QuartzOptionsService service,
|
||||
IHttpContextAccessor httpContextAccessor
|
||||
)
|
||||
: base(service)
|
||||
{
|
||||
_service = service;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// api加上属性 [ApiTask]
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[ApiTask]
|
||||
[HttpGet, HttpPost, Route("test2")]
|
||||
public IActionResult Test2()
|
||||
{
|
||||
return Content(DateTime.Now.ToString("yyyy-MM-dd HH:mm:sss"));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// api加上属性 [ApiTask]
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[ApiTask]
|
||||
[HttpGet, HttpPost, Route("taskTest")]
|
||||
public IActionResult TaskTest()
|
||||
{
|
||||
return Content(DateTime.Now.ToString("yyyy-MM-dd HH:mm:sss"));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 手动执行一次
|
||||
/// </summary>
|
||||
/// <param name="taskOptions"></param>
|
||||
/// <returns></returns>
|
||||
[Route("run"), HttpPost]
|
||||
[ActionPermission(ActionPermissionOptions.Update)]
|
||||
public async Task<object> Run([FromBody] Sys_QuartzOptions taskOptions)
|
||||
{
|
||||
return await Service.Run(taskOptions);
|
||||
}
|
||||
/// <summary>
|
||||
/// 开启任务
|
||||
/// </summary>
|
||||
/// <param name="schedulerFactory"></param>
|
||||
/// <param name="taskOptions"></param>
|
||||
/// <returns></returns>
|
||||
[Route("start"), HttpPost]
|
||||
[ActionPermission(ActionPermissionOptions.Update)]
|
||||
public async Task<object> Start([FromBody] Sys_QuartzOptions taskOptions)
|
||||
{
|
||||
return await Service.Start(taskOptions);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 暂停任务
|
||||
/// </summary>
|
||||
/// <param name="schedulerFactory"></param>
|
||||
/// <param name="taskOptions"></param>
|
||||
/// <returns></returns>
|
||||
[Route("pause"), HttpPost]
|
||||
[ActionPermission(ActionPermissionOptions.Update)]
|
||||
public async Task<object> Pause([FromBody] Sys_QuartzOptions taskOptions)
|
||||
{
|
||||
return await Service.Pause(taskOptions);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,191 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using SqlSugar;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.Controllers.Basic;
|
||||
using VOL.Core.Enums;
|
||||
using VOL.Core.Extensions;
|
||||
using VOL.Core.Filters;
|
||||
using VOL.Core.ManageUser;
|
||||
using VOL.Core.UserManager;
|
||||
using VOL.Core.Utilities;
|
||||
using VOL.Entity.AttributeManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Sys.IRepositories;
|
||||
using VOL.Sys.IServices;
|
||||
using VOL.Sys.Repositories;
|
||||
using VOL.Sys.Services;
|
||||
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
[Route("api/role")]
|
||||
public partial class Sys_RoleController
|
||||
{
|
||||
private readonly ISys_RoleService _service;//访问业务代码
|
||||
private readonly ISys_RoleRepository _repository;
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
|
||||
[ActivatorUtilitiesConstructor]
|
||||
public Sys_RoleController(
|
||||
ISys_RoleService service,
|
||||
ISys_RoleRepository repository,
|
||||
IHttpContextAccessor httpContextAccessor
|
||||
)
|
||||
: base(service)
|
||||
{
|
||||
_service = service;
|
||||
_repository = repository;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
}
|
||||
|
||||
|
||||
[HttpPost, Route("getCurrentTreePermission")]
|
||||
[ApiActionPermission(ActionPermissionOptions.Search)]
|
||||
public async Task<IActionResult> GetCurrentTreePermission()
|
||||
{
|
||||
return Json(await Service.GetCurrentTreePermission());
|
||||
}
|
||||
|
||||
[HttpPost, Route("getUserTreePermission")]
|
||||
[ApiActionPermission(ActionPermissionOptions.Search)]
|
||||
public async Task<IActionResult> GetUserTreePermission(int roleId)
|
||||
{
|
||||
return Json(await Service.GetUserTreePermission(roleId));
|
||||
}
|
||||
|
||||
[HttpPost, Route("savePermission")]
|
||||
[ApiActionPermission(ActionPermissionOptions.Update)]
|
||||
public async Task<IActionResult> SavePermission([FromBody] List<UserPermissions> userPermissions, int roleId)
|
||||
{
|
||||
return Json(await Service.SavePermission(userPermissions, roleId));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前角色下的所有角色
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("getUserChildRoles")]
|
||||
[ApiActionPermission(ActionPermissionOptions.Search)]
|
||||
public IActionResult GetUserChildRoles()
|
||||
{
|
||||
int roleId = UserContext.Current.RoleId;
|
||||
var data = RoleContext.GetAllChildren(UserContext.Current.RoleId);
|
||||
|
||||
if (UserContext.Current.IsSuperAdmin)
|
||||
{
|
||||
return Json(WebResponseContent.Instance.OK(null, data));
|
||||
}
|
||||
//不是超级管理,将自己的角色查出来,在树形菜单上作为根节点
|
||||
var self = _repository.FindAsIQueryable(x => x.Role_Id == roleId)
|
||||
.Select(s => new VOL.Core.UserManager.RoleNodes()
|
||||
{
|
||||
Id = s.Role_Id,
|
||||
ParentId = 0,//将自己的角色作为root节点
|
||||
RoleName = s.RoleName
|
||||
}).ToList();
|
||||
data.AddRange(self);
|
||||
return Json(WebResponseContent.Instance.OK(null, data));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// treetable 获取子节点数据(2021.05.02)
|
||||
/// </summary>
|
||||
/// <param name="loadData"></param>
|
||||
/// <returns></returns>
|
||||
[ApiActionPermission(ActionPermissionOptions.Search)]
|
||||
[HttpPost, Route("GetPageData")]
|
||||
public override ActionResult GetPageData([FromBody] PageDataOptions loadData)
|
||||
{
|
||||
//获取根节点数据(对应Sys_Role1.js中searchBefore方法)
|
||||
if (loadData.Value.GetInt() == 1)
|
||||
{
|
||||
return GetTreeTableRootData(loadData).Result;
|
||||
}
|
||||
return base.GetPageData(loadData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// treetable 获取子节点数据(2021.05.02)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("getTreeTableRootData")]
|
||||
[ApiActionPermission(ActionPermissionOptions.Search)]
|
||||
public async Task<ActionResult> GetTreeTableRootData([FromBody] PageDataOptions options)
|
||||
{
|
||||
//页面加载根节点数据条件x => x.ParentId == 0,自己根据需要设置
|
||||
var query = _repository.FindAsIQueryable(x => true);
|
||||
if (UserContext.Current.IsSuperAdmin)
|
||||
{
|
||||
query = query.Where(x => x.ParentId == 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
int roleId = UserContext.Current.RoleId;
|
||||
query = query.Where(x => x.Role_Id == roleId);
|
||||
}
|
||||
var queryChild = _repository.FindAsIQueryable(x => true);
|
||||
var rows = await query.TakeOrderByPage(options.Page, options.Rows)
|
||||
.OrderBy(x => x.Role_Id).Select(s => new
|
||||
{
|
||||
s.Role_Id,
|
||||
// ParentId=0,
|
||||
s.ParentId,
|
||||
s.RoleName,
|
||||
s.DeptName,
|
||||
s.Dept_Id,
|
||||
s.Enable,
|
||||
s.CreateDate,
|
||||
s.Creator,
|
||||
s.Modifier,
|
||||
s.ModifyDate,
|
||||
s.OrderNo,
|
||||
hasChildren = SqlFunc.Subqueryable<Sys_Role>().Where(x => x.ParentId == s.Role_Id).Any()
|
||||
}).ToListAsync();
|
||||
return JsonNormal(new { total = await query.CountAsync(), rows });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///treetable 获取子节点数据(2021.05.02)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("getTreeTableChildrenData")]
|
||||
[ApiActionPermission(ActionPermissionOptions.Search)]
|
||||
public async Task<ActionResult> GetTreeTableChildrenData(int roleId)
|
||||
{
|
||||
if (!UserContext.Current.IsSuperAdmin && roleId != UserContext.Current.RoleId && !RoleContext.GetAllChildren(UserContext.Current.RoleId).Any(x => x.Id == roleId))
|
||||
{
|
||||
return JsonNormal(new { rows = new object[] { } });
|
||||
}
|
||||
//点击节点时,加载子节点数据
|
||||
var roleRepository = Sys_RoleRepository.Instance.FindAsIQueryable(x => true);
|
||||
var rows = await roleRepository.Where(x => x.ParentId == roleId)
|
||||
.Select(s => new
|
||||
{
|
||||
s.Role_Id,
|
||||
s.ParentId,
|
||||
s.RoleName,
|
||||
s.DeptName,
|
||||
s.Dept_Id,
|
||||
s.Enable,
|
||||
s.CreateDate,
|
||||
s.Creator,
|
||||
s.Modifier,
|
||||
s.ModifyDate,
|
||||
s.OrderNo,
|
||||
hasChildren = SqlFunc.Subqueryable<Sys_Role>().Where(x => x.ParentId == s.Role_Id).Any()
|
||||
}).ToListAsync();
|
||||
return JsonNormal(new { rows });
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.CacheManager;
|
||||
using VOL.Core.Configuration;
|
||||
using VOL.Core.Controllers.Basic;
|
||||
using VOL.Core.DBManager;
|
||||
using VOL.Core.DbContext;
|
||||
using VOL.Core.Enums;
|
||||
using VOL.Core.Extensions;
|
||||
using VOL.Core.Filters;
|
||||
using VOL.Core.Infrastructure;
|
||||
using VOL.Core.ManageUser;
|
||||
using VOL.Core.ObjectActionValidator;
|
||||
using VOL.Core.Services;
|
||||
using VOL.Core.Utilities;
|
||||
using VOL.Entity.AttributeManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Sys.IRepositories;
|
||||
using VOL.Sys.IServices;
|
||||
using VOL.Sys.Repositories;
|
||||
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
[Route("api/User")]
|
||||
public partial class Sys_UserController
|
||||
{
|
||||
private ISys_UserRepository _userRepository;
|
||||
private ICacheService _cache;
|
||||
[ActivatorUtilitiesConstructor]
|
||||
public Sys_UserController(
|
||||
ISys_UserService userService,
|
||||
ISys_UserRepository userRepository,
|
||||
ICacheService cahce
|
||||
)
|
||||
: base(userService)
|
||||
{
|
||||
_userRepository = userRepository;
|
||||
_cache = cahce;
|
||||
}
|
||||
|
||||
[HttpPost, HttpGet, Route("login"), AllowAnonymous]
|
||||
[ObjectModelValidatorFilter(ValidatorModel.Login)]
|
||||
public async Task<IActionResult> Login([FromBody] LoginInfo loginInfo)
|
||||
{
|
||||
return Json(await Service.Login(loginInfo));
|
||||
}
|
||||
|
||||
private readonly ConcurrentDictionary<int, object> _lockCurrent = new ConcurrentDictionary<int, object>();
|
||||
[HttpPost, Route("replaceToken")]
|
||||
public IActionResult ReplaceToken()
|
||||
{
|
||||
WebResponseContent responseContent = new WebResponseContent();
|
||||
string error = "";
|
||||
string key = $"rp:Token:{UserContext.Current.UserId}";
|
||||
UserInfo userInfo = null;
|
||||
try
|
||||
{
|
||||
//如果5秒内替换过token,直接使用最新的token(防止一个页面多个并发请求同时替换token导致token错位)
|
||||
if (_cache.Exists(key))
|
||||
{
|
||||
return Json(responseContent.OK(null, _cache.Get(key)));
|
||||
}
|
||||
var _obj = _lockCurrent.GetOrAdd(UserContext.Current.UserId, new object() { });
|
||||
lock (_obj)
|
||||
{
|
||||
if (_cache.Exists(key))
|
||||
{
|
||||
return Json(responseContent.OK(null, _cache.Get(key)));
|
||||
}
|
||||
string requestToken = HttpContext.Request.Headers[AppSetting.TokenHeaderName];
|
||||
requestToken = requestToken?.Replace("Bearer ", "");
|
||||
|
||||
if (JwtHelper.IsExp(requestToken)) return Json(responseContent.Error("Token已过期!"));
|
||||
|
||||
int userId = UserContext.Current.UserId;
|
||||
|
||||
userInfo = _userRepository.FindAsIQueryable(x => x.User_Id == userId).Select(
|
||||
s => new UserInfo()
|
||||
{
|
||||
User_Id = userId,
|
||||
UserName = s.UserName,
|
||||
UserTrueName = s.UserTrueName,
|
||||
Role_Id = s.Role_Id,
|
||||
RoleName = s.RoleName
|
||||
}).FirstOrDefault();
|
||||
|
||||
if (userInfo == null) return Json(responseContent.Error("未查到用户信息!"));
|
||||
|
||||
string token = JwtHelper.IssueJwt(userInfo);
|
||||
//移除当前缓存
|
||||
_cache.Remove(userId.GetUserIdKey());
|
||||
//只更新的token字段
|
||||
_userRepository.Update(new Sys_User() { User_Id = userId, Token = token }, x => x.Token, true);
|
||||
//添加一个5秒缓存
|
||||
_cache.Add(key, token, 5);
|
||||
responseContent.OK(null, token);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
error = ex.Message + ex.StackTrace;
|
||||
responseContent.Error("token替换异常");
|
||||
}
|
||||
finally
|
||||
{
|
||||
_lockCurrent.TryRemove(UserContext.Current.UserId, out object val);
|
||||
string _message = $"用户{userInfo?.User_Id}_{userInfo?.UserTrueName},({(responseContent.Status ? "token替换成功": "token替换失败")})";
|
||||
Logger.Info(LoggerType.ReplaceToeken, _message, null, error);
|
||||
}
|
||||
return Json(responseContent);
|
||||
}
|
||||
|
||||
|
||||
[HttpPost, Route("modifyPwd")]
|
||||
[ApiActionPermission]
|
||||
public async Task<IActionResult> ModifyPwd([FromBody] Dictionary<string, string> info)
|
||||
{
|
||||
return Json(await Service.ModifyPwd(info?["oldPwd"], info?["newPwd"]));
|
||||
}
|
||||
|
||||
|
||||
|
||||
[HttpPost, Route("getCurrentUserInfo")]
|
||||
public async Task<IActionResult> GetCurrentUserInfo()
|
||||
{
|
||||
return Json(await Service.GetCurrentUserInfo());
|
||||
}
|
||||
|
||||
[HttpPost, Route("modifyUserPwd"), ApiActionPermission(ActionPermissionOptions.Update)]
|
||||
public IActionResult ModifyUserPwd([FromBody] LoginInfo loginInfo)
|
||||
{
|
||||
string userName = loginInfo?.UserName;
|
||||
string password = loginInfo?.Password;
|
||||
WebResponseContent webResponse = new WebResponseContent();
|
||||
if (string.IsNullOrEmpty(password) || string.IsNullOrEmpty(userName))
|
||||
{
|
||||
return Json(webResponse.Error("参数不完整"));
|
||||
}
|
||||
if (password.Length < 6) return Json(webResponse.Error("密码长度不能少于6位"));
|
||||
|
||||
ISys_UserRepository repository = Sys_UserRepository.Instance;
|
||||
Sys_User user = repository.FindFirst(x => x.UserName == userName);
|
||||
if (user == null)
|
||||
{
|
||||
return Json(webResponse.Error("用户不存在"));
|
||||
}
|
||||
user.UserPwd = password.EncryptDES(AppSetting.Secret.User);
|
||||
repository.Update(user, x => new { x.UserPwd }, true);
|
||||
//如果用户在线,强制下线
|
||||
UserContext.Current.LogOut(user.User_Id);
|
||||
return Json(webResponse.OK("密码修改成功"));
|
||||
}
|
||||
/// <summary>
|
||||
/// 2020.06.15增加登陆验证码
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("getVierificationCode"), AllowAnonymous]
|
||||
public IActionResult GetVierificationCode()
|
||||
{
|
||||
string code = VierificationCode.RandomText();
|
||||
var data = new
|
||||
{
|
||||
img = VierificationCode.CreateBase64Imgage(code),
|
||||
uuid = Guid.NewGuid()
|
||||
};
|
||||
HttpContext.GetService<IMemoryCache>().Set(data.uuid.ToString(), code, new TimeSpan(0, 5, 0));
|
||||
return Json(data);
|
||||
}
|
||||
|
||||
[ApiActionPermission()]
|
||||
public override IActionResult Upload(IEnumerable<IFormFile> fileInput)
|
||||
{
|
||||
return base.Upload(fileInput);
|
||||
}
|
||||
[HttpPost, Route("updateUserInfo")]
|
||||
public IActionResult UpdateUserInfo([FromBody] Sys_User user)
|
||||
{
|
||||
user.User_Id = UserContext.Current.UserId;
|
||||
|
||||
_userRepository.Update(user, x => new { x.UserTrueName, x.Gender, x.Remark, x.HeadImageUrl }, true);
|
||||
return Content("修改成功");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,255 @@
|
||||
/*
|
||||
*接口编写处...
|
||||
*如果接口需要做Action的权限验证,请在Action上使用属性
|
||||
*如: [ApiActionPermission("Sys_WorkFlow",Enums.ActionPermissionOptions.Search)]
|
||||
*/
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Sys.IServices;
|
||||
using VOL.Core.WorkFlow;
|
||||
using VOL.Sys.IRepositories;
|
||||
using System.Linq;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using VOL.Core.ManageUser;
|
||||
using VOL.Core.Services;
|
||||
using VOL.Core.Infrastructure;
|
||||
using VOL.Core.DBManager;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||
using VOL.Core.Extensions;
|
||||
using VOL.Core.UserManager;
|
||||
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
public partial class Sys_WorkFlowController
|
||||
{
|
||||
private readonly ISys_WorkFlowService _service;//访问业务代码
|
||||
private readonly ISys_UserRepository _userRepository;
|
||||
private readonly ISys_RoleRepository _roleRepository;
|
||||
private readonly ISys_DepartmentRepository _departmentRepository;
|
||||
private readonly ISys_WorkFlowRepository _workFlowRepository;
|
||||
private readonly ISys_WorkFlowTableRepository _workFlowTableRepository;
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
|
||||
[ActivatorUtilitiesConstructor]
|
||||
public Sys_WorkFlowController(
|
||||
ISys_WorkFlowService service,
|
||||
ISys_UserRepository userRepository,
|
||||
ISys_RoleRepository roleRepository,
|
||||
ISys_WorkFlowRepository workFlowRepository,
|
||||
ISys_WorkFlowTableRepository workFlowTableRepository,
|
||||
IHttpContextAccessor httpContextAccessor,
|
||||
ISys_DepartmentRepository departmentRepository
|
||||
)
|
||||
: base(service)
|
||||
{
|
||||
_service = service;
|
||||
_userRepository = userRepository;
|
||||
_roleRepository = roleRepository;
|
||||
_departmentRepository = departmentRepository;
|
||||
_workFlowRepository = workFlowRepository;
|
||||
_workFlowTableRepository = workFlowTableRepository;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取工作流程表数据源
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("getTableInfo")]
|
||||
public IActionResult GetTableInfo()
|
||||
{
|
||||
return Json(WorkFlowContainer.GetDic());
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取流程节点数据源(用户与角色)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("getNodeDic")]
|
||||
public async Task<IActionResult> GetNodeDic()
|
||||
{
|
||||
var data = new
|
||||
{
|
||||
users = await _userRepository.FindAsIQueryable(x => true).Select(s => new { key = s.User_Id, value = s.UserTrueName }).Take(5000).ToListAsync(),
|
||||
roles = await _roleRepository.FindAsIQueryable(x => true).Select(s => new { key = s.Role_Id, value = s.RoleName }).ToListAsync(),
|
||||
dept = await _departmentRepository.FindAsIQueryable(x => true).Select(s => new { key = s.DepartmentId, value = s.DepartmentName }).ToListAsync(),
|
||||
};
|
||||
return Json(data);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取单据的审批流程进度
|
||||
/// </summary>
|
||||
/// <param name="tableName"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("getSteps")]
|
||||
public async Task<IActionResult> GetSteps([FromBody] List<string> ids, string tableName)
|
||||
{
|
||||
var flows = await _workFlowTableRepository.FindAsIQueryable(x => x.WorkTable == tableName && ids.Contains(x.WorkTableKey))
|
||||
.Includes(x => x.Sys_WorkFlowTableStep)
|
||||
.ToListAsync();
|
||||
//不在审核中的数据
|
||||
if (flows.Count == 0)
|
||||
{
|
||||
return Json(new { status = true });
|
||||
}
|
||||
if (flows.Count > 1 || flows.Count != ids.Count)
|
||||
{
|
||||
return Json(new { status = false, message = "只能选择一条数据进行审核" });
|
||||
}
|
||||
|
||||
var flow = flows[0];
|
||||
var user = UserContext.Current.UserInfo;
|
||||
// 获取按用户审核的id,如果多用户要进行分割
|
||||
// 转换成int数组
|
||||
//var auditUsers = flow.Sys_WorkFlowTableStep
|
||||
// .Where(x => x.StepType == (int)AuditType.用户审批 && x.StepValue != null)
|
||||
// .SelectMany(x => x.StepValue.Split(",")).Select(int.Parse).ToArray();
|
||||
|
||||
//未审批时的用户信息
|
||||
var unauditSteps = flow.Sys_WorkFlowTableStep
|
||||
.Where(x => (x.AuditId == null || x.AuditId == 0) && x.StepType == (int)AuditType.用户审批)
|
||||
.Select(s => new { s.Sys_WorkFlowTableStep_Id, userIds = s.StepValue.Split(",").Select(s => s.GetInt()) }
|
||||
).ToList();
|
||||
|
||||
var unauditUsers = unauditSteps.SelectMany(c => c.userIds).ToList();
|
||||
List<(int userId, string userName)> userInfo = new List<(int userId, string userName)>();
|
||||
if (unauditUsers.Count > 0)
|
||||
{
|
||||
userInfo = (await _userRepository.FindAsIQueryable(x => unauditUsers.Contains(x.User_Id))
|
||||
.Select(u => new { u.User_Id, u.UserTrueName }).ToListAsync())
|
||||
.Select(c => (c.User_Id, c.UserTrueName)).ToList();
|
||||
}
|
||||
|
||||
var log = await _workFlowTableRepository.DbContext.Set<Sys_WorkFlowTableAuditLog>()
|
||||
.Where(x => x.WorkFlowTable_Id == flow.WorkFlowTable_Id)
|
||||
.OrderBy(x => x.CreateDate)
|
||||
.ToListAsync();
|
||||
|
||||
string GetAuditUsers(Sys_WorkFlowTableStep step)
|
||||
{
|
||||
if (step.StepType == (int)AuditType.角色审批)
|
||||
{
|
||||
int roleId = step.StepValue.GetInt();
|
||||
return RoleContext.GetAllRoleId().Where(c => c.Id == roleId).Select(c => c.RoleName).FirstOrDefault();
|
||||
}
|
||||
//按部门审批
|
||||
if (step.StepType == (int)AuditType.部门审批)
|
||||
{
|
||||
var deptId = step.StepValue.GetGuid();
|
||||
return DepartmentContext.GetAllDept().Where(c => c.id == deptId).Select(c => c.value).FirstOrDefault();
|
||||
}
|
||||
var userIds = unauditSteps.Where(c => c.Sys_WorkFlowTableStep_Id == step.Sys_WorkFlowTableStep_Id)
|
||||
.Select(c => c.userIds).FirstOrDefault();
|
||||
if (userIds == null)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
return string.Join("/", userInfo.Where(c => userIds.Contains(c.userId)).Select(s => s.userName));
|
||||
}
|
||||
|
||||
var steps = flow.Sys_WorkFlowTableStep
|
||||
.Select(c => new
|
||||
{
|
||||
c.AuditId,
|
||||
Auditor = c.Auditor ?? GetAuditUsers(c),
|
||||
//Auditor = auditor,
|
||||
c.AuditDate,
|
||||
c.AuditStatus,
|
||||
c.Remark,
|
||||
c.StepValue,
|
||||
c.StepName,
|
||||
c.OrderId,
|
||||
c.Enable,
|
||||
c.StepId,
|
||||
c.StepAttrType,
|
||||
c.CreateDate,
|
||||
c.Creator,
|
||||
//判断是按角色审批 还是用户帐号审批
|
||||
isCurrentUser = (c.AuditStatus == null || c.AuditStatus == (int)AuditStatus.审核中 || c.AuditStatus == (int)AuditStatus.待审核)
|
||||
&& c.StepId == flow.CurrentStepId && GetAuditStepValue(c),
|
||||
isCurrent = c.StepId == flow.CurrentStepId && c.AuditStatus != (int)AuditStatus.审核通过
|
||||
}).OrderBy(o => o.OrderId);
|
||||
|
||||
object form = await WorkFlowManager.GetAuditFormDataAsync(ids[0], tableName);
|
||||
|
||||
var data = new
|
||||
{
|
||||
status = true,
|
||||
step = flow.CurrentStepId,
|
||||
flow.AuditStatus,
|
||||
auditDic = DictionaryManager.GetDictionary("audit")?.Sys_DictionaryList?.Select(s => new { key = s.DicValue, value = s.DicName }),
|
||||
list = steps.OrderBy(x => x.OrderId).ToList(),
|
||||
log = log,
|
||||
form
|
||||
};
|
||||
|
||||
return Json(data);
|
||||
}
|
||||
[HttpPost, Route("getFields")]
|
||||
public async Task<IActionResult> GetFields(string table)
|
||||
{
|
||||
var query = _workFlowTableRepository.DbContext.Set<Sys_TableColumn>().Where(c => c.TableName == table);
|
||||
var fields = WorkFlowContainer.GetFilterFields(table);
|
||||
if (fields != null && fields.Length > 0)
|
||||
{
|
||||
query = query.Where(x => fields.Contains(x.ColumnName));
|
||||
}
|
||||
else
|
||||
{
|
||||
query = query.Where(x => x.IsDisplay == 1);
|
||||
}
|
||||
var columns = await query.OrderByDescending(c => c.OrderNo)
|
||||
.Select(s => new
|
||||
{
|
||||
field = s.ColumnName,
|
||||
name = s.ColumnCnName,
|
||||
dicNo = s.DropNo,
|
||||
s.ColumnType
|
||||
}).ToListAsync();
|
||||
|
||||
|
||||
var data = columns.Select(s => new
|
||||
{
|
||||
s.field,
|
||||
s.name,
|
||||
s.dicNo,
|
||||
columnType = s.ColumnType,
|
||||
data = string.IsNullOrEmpty(s.dicNo)
|
||||
? null
|
||||
: DictionaryManager.GetDictionary(s.dicNo)?.Sys_DictionaryList?.Select(c => new { key = c.DicValue, value = c.DicName })?.ToList()
|
||||
}).ToList();
|
||||
return JsonNormal(data);
|
||||
|
||||
}
|
||||
|
||||
private bool GetAuditStepValue(Sys_WorkFlowTableStep flow)
|
||||
{
|
||||
if (flow.StepType == (int)AuditType.角色审批)
|
||||
{
|
||||
return UserContext.Current.RoleId.ToString() == flow.StepValue;
|
||||
}
|
||||
//按部门审批
|
||||
if (flow.StepType == (int)AuditType.部门审批)
|
||||
{
|
||||
return UserContext.Current.UserInfo.DeptIds.Select(s => s.ToString()).Contains(flow.StepValue);
|
||||
}
|
||||
//按用户审批
|
||||
//return UserContext.Current.UserId.ToString() == flow.StepValue;
|
||||
return flow.StepValue.Split(",").Contains(UserContext.Current.UserId.ToString());
|
||||
|
||||
}
|
||||
[Route("getOptions"), HttpGet]
|
||||
public async Task<IActionResult> GetOptions(Guid id)
|
||||
{
|
||||
var data = await _workFlowRepository.FindAsIQueryable(x => x.WorkFlow_Id == id)
|
||||
.Includes(c => c.Sys_WorkFlowStep)
|
||||
.FirstOrDefaultAsync();
|
||||
return JsonNormal(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
*接口编写处...
|
||||
*如果接口需要做Action的权限验证,请在Action上使用属性
|
||||
*如: [ApiActionPermission("Sys_WorkFlowStep",Enums.ActionPermissionOptions.Search)]
|
||||
*/
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Sys.IServices;
|
||||
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
public partial class Sys_WorkFlowStepController
|
||||
{
|
||||
private readonly ISys_WorkFlowStepService _service;//访问业务代码
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
|
||||
[ActivatorUtilitiesConstructor]
|
||||
public Sys_WorkFlowStepController(
|
||||
ISys_WorkFlowStepService service,
|
||||
IHttpContextAccessor httpContextAccessor
|
||||
)
|
||||
: base(service)
|
||||
{
|
||||
_service = service;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
}
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
*接口编写处...
|
||||
*如果接口需要做Action的权限验证,请在Action上使用属性
|
||||
*如: [ApiActionPermission("Sys_WorkFlowTableAuditLog",Enums.ActionPermissionOptions.Search)]
|
||||
*/
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Sys.IServices;
|
||||
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
public partial class Sys_WorkFlowTableAuditLogController
|
||||
{
|
||||
private readonly ISys_WorkFlowTableAuditLogService _service;//访问业务代码
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
|
||||
[ActivatorUtilitiesConstructor]
|
||||
public Sys_WorkFlowTableAuditLogController(
|
||||
ISys_WorkFlowTableAuditLogService service,
|
||||
IHttpContextAccessor httpContextAccessor
|
||||
)
|
||||
: base(service)
|
||||
{
|
||||
_service = service;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
*接口编写处...
|
||||
*如果接口需要做Action的权限验证,请在Action上使用属性
|
||||
*如: [ApiActionPermission("Sys_WorkFlowTable",Enums.ActionPermissionOptions.Search)]
|
||||
*/
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Sys.IServices;
|
||||
using VOL.Core.Filters;
|
||||
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
public partial class Sys_WorkFlowTableController
|
||||
{
|
||||
private readonly ISys_WorkFlowTableService _service;//访问业务代码
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
|
||||
[ActivatorUtilitiesConstructor]
|
||||
public Sys_WorkFlowTableController(
|
||||
ISys_WorkFlowTableService service,
|
||||
IHttpContextAccessor httpContextAccessor
|
||||
)
|
||||
: base(service)
|
||||
{
|
||||
_service = service;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
}
|
||||
[ApiActionPermission()]
|
||||
public override ActionResult GetPageData([FromBody] PageDataOptions loadData)
|
||||
{
|
||||
return base.GetPageData(loadData);
|
||||
}
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
*接口编写处...
|
||||
*如果接口需要做Action的权限验证,请在Action上使用属性
|
||||
*如: [ApiActionPermission("Sys_WorkFlowTableStep",Enums.ActionPermissionOptions.Search)]
|
||||
*/
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Sys.IServices;
|
||||
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
public partial class Sys_WorkFlowTableStepController
|
||||
{
|
||||
private readonly ISys_WorkFlowTableStepService _service;//访问业务代码
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
|
||||
[ActivatorUtilitiesConstructor]
|
||||
public Sys_WorkFlowTableStepController(
|
||||
ISys_WorkFlowTableStepService service,
|
||||
IHttpContextAccessor httpContextAccessor
|
||||
)
|
||||
: base(service)
|
||||
{
|
||||
_service = service;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*如果要增加方法请在当前目录下Partial文件夹Sys_DepartmentController编写
|
||||
*/
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using VOL.Core.Controllers.Basic;
|
||||
using VOL.Entity.AttributeManager;
|
||||
using VOL.Sys.IServices;
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
[Route("api/Sys_Department")]
|
||||
[PermissionTable(Name = "Sys_Department")]
|
||||
public partial class Sys_DepartmentController : ApiBaseController<ISys_DepartmentService>
|
||||
{
|
||||
public Sys_DepartmentController(ISys_DepartmentService service)
|
||||
: base(service)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.Controllers.Basic;
|
||||
using VOL.Core.Extensions;
|
||||
using VOL.Core.Filters;
|
||||
using VOL.Sys.IServices;
|
||||
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
[Route("api/Sys_Dictionary")]
|
||||
public partial class Sys_DictionaryController : ApiBaseController<ISys_DictionaryService>
|
||||
{
|
||||
public Sys_DictionaryController(ISys_DictionaryService service)
|
||||
: base("System", "System", "Sys_Dictionary", service)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*如果要增加方法请在当前目录下Partial文件夹Sys_DictionaryListController编写
|
||||
*/
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using VOL.Core.Controllers.Basic;
|
||||
using VOL.Entity.AttributeManager;
|
||||
using VOL.Sys.IServices;
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
[Route("api/Sys_DictionaryList")]
|
||||
[PermissionTable(Name = "Sys_DictionaryList")]
|
||||
public partial class Sys_DictionaryListController : ApiBaseController<ISys_DictionaryListService>
|
||||
{
|
||||
public Sys_DictionaryListController(ISys_DictionaryListService service)
|
||||
: base(service)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.Controllers.Basic;
|
||||
using VOL.Core.DBManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Sys.IServices;
|
||||
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
[Route("api/Sys_Log")]
|
||||
public partial class Sys_LogController : ApiBaseController<ISys_LogService>
|
||||
{
|
||||
public Sys_LogController(ISys_LogService service)
|
||||
: base("System", "System", "Sys_Log", service)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.Controllers.Basic;
|
||||
using VOL.Core.Enums;
|
||||
using VOL.Core.Filters;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Sys.IServices;
|
||||
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
[Route("api/menu")]
|
||||
[ApiController, JWTAuthorize()]
|
||||
public partial class Sys_MenuController : ApiBaseController<ISys_MenuService>
|
||||
{
|
||||
private ISys_MenuService _service { get; set; }
|
||||
public Sys_MenuController(ISys_MenuService service) :
|
||||
base("System", "System", "Sys_Menu", service)
|
||||
{
|
||||
_service = service;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*如果要增加方法请在当前目录下Partial文件夹Sys_QuartzLogController编写
|
||||
*/
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using VOL.Core.Controllers.Basic;
|
||||
using VOL.Entity.AttributeManager;
|
||||
using VOL.Sys.IServices;
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
[Route("api/Sys_QuartzLog")]
|
||||
[PermissionTable(Name = "Sys_QuartzLog")]
|
||||
public partial class Sys_QuartzLogController : ApiBaseController<ISys_QuartzLogService>
|
||||
{
|
||||
public Sys_QuartzLogController(ISys_QuartzLogService service)
|
||||
: base(service)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*如果要增加方法请在当前目录下Partial文件夹Sys_QuartzOptionsController编写
|
||||
*/
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using VOL.Core.Controllers.Basic;
|
||||
using VOL.Entity.AttributeManager;
|
||||
using VOL.Sys.IServices;
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
[Route("api/Sys_QuartzOptions")]
|
||||
[PermissionTable(Name = "Sys_QuartzOptions")]
|
||||
public partial class Sys_QuartzOptionsController : ApiBaseController<ISys_QuartzOptionsService>
|
||||
{
|
||||
public Sys_QuartzOptionsController(ISys_QuartzOptionsService service)
|
||||
: base(service)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.Controllers.Basic;
|
||||
using VOL.Core.Enums;
|
||||
using VOL.Core.Filters;
|
||||
using VOL.Entity.AttributeManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Sys.IServices;
|
||||
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
[Route("api/Sys_Role")]
|
||||
[PermissionTable(Name = "Sys_Role")]
|
||||
public partial class Sys_RoleController : ApiBaseController<ISys_RoleService>
|
||||
{
|
||||
public Sys_RoleController(ISys_RoleService service)
|
||||
: base("System", "System", "Sys_Role", service)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*如果要增加方法请在当前目录下Partial文件夹Sys_UserController编写
|
||||
*/
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using VOL.Core.Controllers.Basic;
|
||||
using VOL.Entity.AttributeManager;
|
||||
using VOL.Sys.IServices;
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
[Route("api/Sys_User")]
|
||||
[PermissionTable(Name = "Sys_User")]
|
||||
public partial class Sys_UserController : ApiBaseController<ISys_UserService>
|
||||
{
|
||||
public Sys_UserController(ISys_UserService service)
|
||||
: base(service)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*如果要增加方法请在当前目录下Partial文件夹Sys_WorkFlowController编写
|
||||
*/
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using VOL.Core.Controllers.Basic;
|
||||
using VOL.Entity.AttributeManager;
|
||||
using VOL.Sys.IServices;
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
[Route("api/Sys_WorkFlow")]
|
||||
[PermissionTable(Name = "Sys_WorkFlow")]
|
||||
public partial class Sys_WorkFlowController : ApiBaseController<ISys_WorkFlowService>
|
||||
{
|
||||
public Sys_WorkFlowController(ISys_WorkFlowService service)
|
||||
: base(service)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*如果要增加方法请在当前目录下Partial文件夹Sys_WorkFlowStepController编写
|
||||
*/
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using VOL.Core.Controllers.Basic;
|
||||
using VOL.Entity.AttributeManager;
|
||||
using VOL.Sys.IServices;
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
[Route("api/Sys_WorkFlowStep")]
|
||||
[PermissionTable(Name = "Sys_WorkFlowStep")]
|
||||
public partial class Sys_WorkFlowStepController : ApiBaseController<ISys_WorkFlowStepService>
|
||||
{
|
||||
public Sys_WorkFlowStepController(ISys_WorkFlowStepService service)
|
||||
: base(service)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*如果要增加方法请在当前目录下Partial文件夹Sys_WorkFlowTableAuditLogController编写
|
||||
*/
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using VOL.Core.Controllers.Basic;
|
||||
using VOL.Entity.AttributeManager;
|
||||
using VOL.Sys.IServices;
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
[Route("api/Sys_WorkFlowTableAuditLog")]
|
||||
[PermissionTable(Name = "Sys_WorkFlowTableAuditLog")]
|
||||
public partial class Sys_WorkFlowTableAuditLogController : ApiBaseController<ISys_WorkFlowTableAuditLogService>
|
||||
{
|
||||
public Sys_WorkFlowTableAuditLogController(ISys_WorkFlowTableAuditLogService service)
|
||||
: base(service)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*如果要增加方法请在当前目录下Partial文件夹Sys_WorkFlowTableController编写
|
||||
*/
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using VOL.Core.Controllers.Basic;
|
||||
using VOL.Entity.AttributeManager;
|
||||
using VOL.Sys.IServices;
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
[Route("api/Sys_WorkFlowTable")]
|
||||
[PermissionTable(Name = "Sys_WorkFlowTable")]
|
||||
public partial class Sys_WorkFlowTableController : ApiBaseController<ISys_WorkFlowTableService>
|
||||
{
|
||||
public Sys_WorkFlowTableController(ISys_WorkFlowTableService service)
|
||||
: base(service)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*如果要增加方法请在当前目录下Partial文件夹Sys_WorkFlowTableStepController编写
|
||||
*/
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using VOL.Core.Controllers.Basic;
|
||||
using VOL.Entity.AttributeManager;
|
||||
using VOL.Sys.IServices;
|
||||
namespace VOL.Sys.Controllers
|
||||
{
|
||||
[Route("api/Sys_WorkFlowTableStep")]
|
||||
[PermissionTable(Name = "Sys_WorkFlowTableStep")]
|
||||
public partial class Sys_WorkFlowTableStepController : ApiBaseController<ISys_WorkFlowTableStepService>
|
||||
{
|
||||
public Sys_WorkFlowTableStepController(ISys_WorkFlowTableStepService service)
|
||||
: base(service)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user