2025-10-23 09:54:36 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
|
// T4模板文件:基础接口类
|
|
|
|
|
|
// 此代码由T4模板自动生成
|
|
|
|
|
|
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
|
using APT.Infrastructure.Core;
|
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using APT.Utility;
|
|
|
|
|
|
using APT.Infrastructure.Api;
|
|
|
|
|
|
using APT.BaseData.Domain.ApiModel.PF;
|
|
|
|
|
|
namespace APT.NW.WebApi.Controllers.Api
|
|
|
|
|
|
{
|
2025-09-23 15:56:16 +08:00
|
|
|
|
using APT.BaseData.Domain.Entities.NW;
|
2025-10-23 09:54:36 +08:00
|
|
|
|
#region Enterprise-子企业表
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 子企业表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Route("api/NW/Enterprise")]
|
|
|
|
|
|
public partial class EnterpriseController : AuthorizeTreeApiController<T_NW_ENTERPRISE>
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询所有数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="filter">过滤实体</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost, Route("Entities")]
|
|
|
|
|
|
public JsonActionResult<IEnumerable<T_NW_ENTERPRISE>> Entities([FromBody]KeywordFilter filter)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitEntities(null, filter);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 排序查询所有数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="filter">过滤实体</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
|
|
|
|
|
|
[HttpPost, Route("OrderEntities")]
|
|
|
|
|
|
public JsonActionResult<IEnumerable<T_NW_ENTERPRISE>> OrderEntities([FromBody]KeywordFilter filter)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitOrderEntities(null, filter);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 分页查询数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="pageFilter">分页过滤实体</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost, Route("Paged")]
|
|
|
|
|
|
public PagedActionResult<T_NW_ENTERPRISE> Paged([FromBody]KeywordPageFilter pageFilter)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitPaged(null, pageFilter);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 排序分页查询数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="pageFilter">分页过滤实体</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost, Route("OrderPaged")]
|
|
|
|
|
|
public PagedActionResult<T_NW_ENTERPRISE> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitOrderPaged(null, pageFilter);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 根据主键删除数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="id">主键ID</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet, Route("Delete")]
|
|
|
|
|
|
public JsonActionResult<bool> Delete(string id)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitRealDelete(id);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 更新或新增数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="entity">对象实体</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost, Route("Update")]
|
|
|
|
|
|
public JsonActionResult<bool> Update([FromBody]T_NW_ENTERPRISE entity)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitUpdate(entity);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 批量更新
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="entity">对象实体</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost, Route("BatchUpdate")]
|
|
|
|
|
|
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ENTERPRISE> entity)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitBantchUpdate(entity?.Data);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 批量删除数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet, Route("BatchDelete")]
|
|
|
|
|
|
public JsonActionResult<bool> BatchDelete(string ids)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitRealBatchDelete(ids);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获得单条实体数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="filter">过滤实体</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost, Route("Get")]
|
|
|
|
|
|
public JsonActionResult<T_NW_ENTERPRISE> Get([FromBody] KeywordFilter filter)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitEntity(null, filter);
|
|
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获得树形实体数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="filter"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost, Route("TreeData")]
|
|
|
|
|
|
public JsonActionResult<IEnumerable<TreeNode<T_NW_ENTERPRISE>>> TreeData([FromBody] KeywordFilter filter)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitTreeOrderEntities(null, filter);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RoleDataPerm-子企业数据权限表
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 子企业数据权限表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Route("api/NW/RoleDataPerm")]
|
|
|
|
|
|
public partial class RoleDataPermController : AuthorizeApiController<T_NW_ROLE_DATA_PERM>
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询所有数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="filter">过滤实体</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost, Route("Entities")]
|
|
|
|
|
|
public JsonActionResult<IEnumerable<T_NW_ROLE_DATA_PERM>> Entities([FromBody]KeywordFilter filter)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitEntities(null, filter);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 排序查询所有数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="filter">过滤实体</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
|
|
|
|
|
|
[HttpPost, Route("OrderEntities")]
|
|
|
|
|
|
public JsonActionResult<IEnumerable<T_NW_ROLE_DATA_PERM>> OrderEntities([FromBody]KeywordFilter filter)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitOrderEntities(null, filter);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 分页查询数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="pageFilter">分页过滤实体</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost, Route("Paged")]
|
|
|
|
|
|
public PagedActionResult<T_NW_ROLE_DATA_PERM> Paged([FromBody]KeywordPageFilter pageFilter)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitPaged(null, pageFilter);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 排序分页查询数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="pageFilter">分页过滤实体</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost, Route("OrderPaged")]
|
|
|
|
|
|
public PagedActionResult<T_NW_ROLE_DATA_PERM> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitOrderPaged(null, pageFilter);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 根据主键删除数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="id">主键ID</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet, Route("Delete")]
|
|
|
|
|
|
public JsonActionResult<bool> Delete(string id)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitRealDelete(id);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 更新或新增数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="entity">对象实体</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost, Route("Update")]
|
|
|
|
|
|
public JsonActionResult<bool> Update([FromBody]T_NW_ROLE_DATA_PERM entity)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitUpdate(entity);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 批量更新
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="entity">对象实体</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost, Route("BatchUpdate")]
|
|
|
|
|
|
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ROLE_DATA_PERM> entity)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitBantchUpdate(entity?.Data);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 批量删除数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet, Route("BatchDelete")]
|
|
|
|
|
|
public JsonActionResult<bool> BatchDelete(string ids)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitRealBatchDelete(ids);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获得单条实体数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="filter">过滤实体</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost, Route("Get")]
|
|
|
|
|
|
public JsonActionResult<T_NW_ROLE_DATA_PERM> Get([FromBody] KeywordFilter filter)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitEntity(null, filter);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region RoleMenu-子企业权限表
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 子企业权限表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Route("api/NW/RoleMenu")]
|
|
|
|
|
|
public partial class RoleMenuController : AuthorizeApiController<T_NW_ROLE_MENU>
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询所有数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="filter">过滤实体</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost, Route("Entities")]
|
|
|
|
|
|
public JsonActionResult<IEnumerable<T_NW_ROLE_MENU>> Entities([FromBody]KeywordFilter filter)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitEntities(null, filter);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 排序查询所有数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="filter">过滤实体</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
|
|
|
|
|
|
[HttpPost, Route("OrderEntities")]
|
|
|
|
|
|
public JsonActionResult<IEnumerable<T_NW_ROLE_MENU>> OrderEntities([FromBody]KeywordFilter filter)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitOrderEntities(null, filter);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 分页查询数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="pageFilter">分页过滤实体</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost, Route("Paged")]
|
|
|
|
|
|
public PagedActionResult<T_NW_ROLE_MENU> Paged([FromBody]KeywordPageFilter pageFilter)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitPaged(null, pageFilter);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 排序分页查询数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="pageFilter">分页过滤实体</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost, Route("OrderPaged")]
|
|
|
|
|
|
public PagedActionResult<T_NW_ROLE_MENU> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitOrderPaged(null, pageFilter);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 根据主键删除数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="id">主键ID</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet, Route("Delete")]
|
|
|
|
|
|
public JsonActionResult<bool> Delete(string id)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitRealDelete(id);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 更新或新增数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="entity">对象实体</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost, Route("Update")]
|
|
|
|
|
|
public JsonActionResult<bool> Update([FromBody]T_NW_ROLE_MENU entity)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitUpdate(entity);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 批量更新
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="entity">对象实体</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost, Route("BatchUpdate")]
|
|
|
|
|
|
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ROLE_MENU> entity)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitBantchUpdate(entity?.Data);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 批量删除数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet, Route("BatchDelete")]
|
|
|
|
|
|
public JsonActionResult<bool> BatchDelete(string ids)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitRealBatchDelete(ids);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获得单条实体数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="filter">过滤实体</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost, Route("Get")]
|
|
|
|
|
|
public JsonActionResult<T_NW_ROLE_MENU> Get([FromBody] KeywordFilter filter)
|
|
|
|
|
|
{
|
|
|
|
|
|
return WitEntity(null, filter);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
}
|