Compare commits
2 Commits
fb6a81d225
...
6c900b5cc9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c900b5cc9 | ||
|
|
c124a29fa8 |
138042
APT.Data.Migrations/Migrations/20260331092249_wyw2026033101.Designer.cs
generated
Normal file
138042
APT.Data.Migrations/Migrations/20260331092249_wyw2026033101.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,56 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace APT.Data.Migrations.Migrations
|
||||||
|
{
|
||||||
|
public partial class wyw2026033101 : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "T_SE_TRAIN_RECORD_VIEW",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
RECORD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
TEXT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
EDU_CARD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
ISEND = table.Column<bool>(type: "bit", nullable: false),
|
||||||
|
VIEWSEC = table.Column<int>(type: "int", nullable: true),
|
||||||
|
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
|
||||||
|
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
|
||||||
|
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
|
||||||
|
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
|
||||||
|
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_T_SE_TRAIN_RECORD_VIEW", x => x.ID);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_T_SE_TRAIN_RECORD_VIEW_T_FM_ORGANIZATION_ORG_ID",
|
||||||
|
column: x => x.ORG_ID,
|
||||||
|
principalTable: "T_FM_ORGANIZATION",
|
||||||
|
principalColumn: "ID",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_T_SE_TRAIN_RECORD_VIEW_ORG_ID",
|
||||||
|
table: "T_SE_TRAIN_RECORD_VIEW",
|
||||||
|
column: "ORG_ID");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "T_SE_TRAIN_RECORD_VIEW");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -75838,6 +75838,71 @@ namespace APT.Data.Migrations.Migrations
|
|||||||
b.ToTable("T_SE_TRAIN_RECORD_USER_FILE");
|
b.ToTable("T_SE_TRAIN_RECORD_USER_FILE");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD_VIEW", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("ID")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CREATER_ID")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("CREATE_TIME")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<Guid>("EDU_CARD_ID")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<int>("ENTITY_ORG_TPYE")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<Guid?>("FLOW_ID")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<int>("FLOW_SEND_STATUS")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<int>("FLOW_STATUS")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<Guid?>("FORM_ID")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<bool>("ISEND")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<bool>("IS_DELETED")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("MODIFIER_ID")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("MODIFY_TIME")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<Guid?>("ORG_ID")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid>("RECORD_ID")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid>("TEXT_ID")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid>("USER_ID")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<int?>("VIEWSEC")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.HasKey("ID");
|
||||||
|
|
||||||
|
b.HasIndex("ORG_ID");
|
||||||
|
|
||||||
|
b.ToTable("T_SE_TRAIN_RECORD_VIEW");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_SURVEY", b =>
|
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_SURVEY", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("ID")
|
b.Property<Guid>("ID")
|
||||||
@ -125808,6 +125873,17 @@ namespace APT.Data.Migrations.Migrations
|
|||||||
b.Navigation("Nav_RecordUser");
|
b.Navigation("Nav_RecordUser");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD_VIEW", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("ORG_ID")
|
||||||
|
.OnDelete(DeleteBehavior.Restrict)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Nav_Org");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_SURVEY", b =>
|
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_SURVEY", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_LaunchDepartment")
|
b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_LaunchDepartment")
|
||||||
|
|||||||
@ -11106,6 +11106,15 @@ builder.Ignore(t => t.START_TIME_E);
|
|||||||
builder.HasOne(t => t.Nav_Record).WithMany().HasForeignKey(t => t.RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
builder.HasOne(t => t.Nav_Record).WithMany().HasForeignKey(t => t.RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
||||||
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
#region TrainRecordView
|
||||||
|
public partial class SETrainRecordViewMap :APTEntityBaseMap<T_SE_TRAIN_RECORD_VIEW>
|
||||||
|
{
|
||||||
|
public override void Configure(EntityTypeBuilder<T_SE_TRAIN_RECORD_VIEW> builder)
|
||||||
|
{
|
||||||
|
base.Configure(builder);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region TrainTypeEnum
|
#region TrainTypeEnum
|
||||||
|
|||||||
52
APT.MS.Domain/Entities/SC/SE/T_SE_TRAIN_RECORD_VIEW.cs
Normal file
52
APT.MS.Domain/Entities/SC/SE/T_SE_TRAIN_RECORD_VIEW.cs
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
using APT.BaseData.Domain.Entities.FM;
|
||||||
|
using APT.Infrastructure.Core;
|
||||||
|
using System;
|
||||||
|
using System.ComponentModel;
|
||||||
|
namespace APT.MS.Domain.Entities.SE
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 考试查看情况
|
||||||
|
/// 暂存时 添加记录
|
||||||
|
/// 提交答题清空 记录
|
||||||
|
/// </summary>
|
||||||
|
[Description("考试查看情况")]
|
||||||
|
public class T_SE_TRAIN_RECORD_VIEW : MesEntityBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 人员ID
|
||||||
|
/// </summary>
|
||||||
|
[Description("人员ID")]
|
||||||
|
public Guid USER_ID { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 培训记录ID
|
||||||
|
/// </summary>
|
||||||
|
[Description("培训记录ID")]
|
||||||
|
public Guid RECORD_ID { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 人员试卷 必填
|
||||||
|
/// </summary>
|
||||||
|
[Description("人员试卷")]
|
||||||
|
public Guid TEXT_ID { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 课件
|
||||||
|
/// </summary>
|
||||||
|
[Description("课件")]
|
||||||
|
|
||||||
|
public Guid EDU_CARD_ID { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否看完
|
||||||
|
/// </summary>
|
||||||
|
[Description("是否看完")]
|
||||||
|
public bool ISEND { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 看到几秒
|
||||||
|
/// </summary>
|
||||||
|
[Description("看到几秒")]
|
||||||
|
public int? VIEWSEC { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,137 +1,128 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// T4模板文件:基础接口类
|
||||||
|
// 此代码由T4模板自动生成
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
using APT.Infrastructure.Core;
|
||||||
//------------------------------------------------------------------------------
|
using Microsoft.AspNetCore.Mvc;
|
||||||
// T4模板文件:基础接口类
|
using System.Collections.Generic;
|
||||||
// 此代码由T4模板自动生成
|
using APT.Utility;
|
||||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
using APT.Infrastructure.Api;
|
||||||
//------------------------------------------------------------------------------
|
using APT.BaseData.Domain.ApiModel.PF;
|
||||||
using APT.Infrastructure.Core;
|
namespace APT.LG.WebApi.Controllers.Api
|
||||||
using Microsoft.AspNetCore.Mvc;
|
{
|
||||||
using System.Collections.Generic;
|
|
||||||
using APT.Utility;
|
|
||||||
using APT.Infrastructure.Api;
|
|
||||||
using APT.BaseData.Domain.ApiModel.PF;
|
|
||||||
namespace APT.LG.WebApi.Controllers.Api
|
|
||||||
{
|
|
||||||
using APT.BaseData.Domain.Entities.LG;
|
using APT.BaseData.Domain.Entities.LG;
|
||||||
|
#region Oprate-表单操作日志表
|
||||||
#region Oprate-表单操作日志表
|
/// <summary>
|
||||||
/// <summary>
|
/// 表单操作日志表
|
||||||
/// 表单操作日志表
|
/// </summary>
|
||||||
/// </summary>
|
[Route("api/LG/Oprate")]
|
||||||
[Route("api/LG/Oprate")]
|
public partial class OprateController : AuthorizeApiController<T_LG_OPRATE>
|
||||||
public partial class OprateController : AuthorizeApiController<T_LG_OPRATE>
|
{
|
||||||
{
|
/// <summary>
|
||||||
/// <summary>
|
/// 查询所有数据
|
||||||
/// 查询所有数据
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="filter">过滤实体</param>
|
||||||
/// <param name="filter">过滤实体</param>
|
/// <returns></returns>
|
||||||
/// <returns></returns>
|
[HttpPost, Route("Entities")]
|
||||||
[HttpPost, Route("Entities")]
|
public JsonActionResult<IEnumerable<T_LG_OPRATE>> Entities([FromBody]KeywordFilter filter)
|
||||||
public JsonActionResult<IEnumerable<T_LG_OPRATE>> Entities([FromBody]KeywordFilter filter)
|
{
|
||||||
{
|
return WitEntities(null, filter);
|
||||||
return WitEntities(null, filter);
|
}
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// 排序查询所有数据
|
||||||
/// 排序查询所有数据
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="filter">过滤实体</param>
|
||||||
/// <param name="filter">过滤实体</param>
|
/// <returns></returns>
|
||||||
/// <returns></returns>
|
|
||||||
|
[HttpPost, Route("OrderEntities")]
|
||||||
[HttpPost, Route("OrderEntities")]
|
public JsonActionResult<IEnumerable<T_LG_OPRATE>> OrderEntities([FromBody]KeywordFilter filter)
|
||||||
public JsonActionResult<IEnumerable<T_LG_OPRATE>> OrderEntities([FromBody]KeywordFilter filter)
|
{
|
||||||
{
|
return WitOrderEntities(null, filter);
|
||||||
return WitOrderEntities(null, filter);
|
}
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// 分页查询数据
|
||||||
/// 分页查询数据
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="pageFilter">分页过滤实体</param>
|
||||||
/// <param name="pageFilter">分页过滤实体</param>
|
/// <returns></returns>
|
||||||
/// <returns></returns>
|
[HttpPost, Route("Paged")]
|
||||||
[HttpPost, Route("Paged")]
|
public PagedActionResult<T_LG_OPRATE> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||||
public PagedActionResult<T_LG_OPRATE> Paged([FromBody]KeywordPageFilter pageFilter)
|
{
|
||||||
{
|
return WitPaged(null, pageFilter);
|
||||||
return WitPaged(null, pageFilter);
|
}
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// 排序分页查询数据
|
||||||
/// 排序分页查询数据
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="pageFilter">分页过滤实体</param>
|
||||||
/// <param name="pageFilter">分页过滤实体</param>
|
/// <returns></returns>
|
||||||
/// <returns></returns>
|
[HttpPost, Route("OrderPaged")]
|
||||||
[HttpPost, Route("OrderPaged")]
|
public PagedActionResult<T_LG_OPRATE> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
||||||
public PagedActionResult<T_LG_OPRATE> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
{
|
||||||
{
|
return WitOrderPaged(null, pageFilter);
|
||||||
return WitOrderPaged(null, pageFilter);
|
}
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// 根据主键删除数据
|
||||||
/// 根据主键删除数据
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="id">主键ID</param>
|
||||||
/// <param name="id">主键ID</param>
|
/// <returns></returns>
|
||||||
/// <returns></returns>
|
[HttpGet, Route("Delete")]
|
||||||
[HttpGet, Route("Delete")]
|
public JsonActionResult<bool> Delete(string id)
|
||||||
public JsonActionResult<bool> Delete(string id)
|
{
|
||||||
{
|
return WitRealDelete(id);
|
||||||
return WitRealDelete(id);
|
}
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// 更新或新增数据
|
||||||
/// 更新或新增数据
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="entity">对象实体</param>
|
||||||
/// <param name="entity">对象实体</param>
|
/// <returns></returns>
|
||||||
/// <returns></returns>
|
[HttpPost, Route("Update")]
|
||||||
[HttpPost, Route("Update")]
|
public JsonActionResult<bool> Update([FromBody]T_LG_OPRATE entity)
|
||||||
public JsonActionResult<bool> Update([FromBody]T_LG_OPRATE entity)
|
{
|
||||||
{
|
return WitUpdate(entity);
|
||||||
return WitUpdate(entity);
|
}
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// 批量更新
|
||||||
/// 批量更新
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="entity">对象实体</param>
|
||||||
/// <param name="entity">对象实体</param>
|
/// <returns></returns>
|
||||||
/// <returns></returns>
|
[HttpPost, Route("BatchUpdate")]
|
||||||
[HttpPost, Route("BatchUpdate")]
|
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_LG_OPRATE> entity)
|
||||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_LG_OPRATE> entity)
|
{
|
||||||
{
|
return WitBantchUpdate(entity?.Data);
|
||||||
return WitBantchUpdate(entity?.Data);
|
}
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// 批量删除数据
|
||||||
/// 批量删除数据
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
||||||
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
/// <returns></returns>
|
||||||
/// <returns></returns>
|
[HttpGet, Route("BatchDelete")]
|
||||||
[HttpGet, Route("BatchDelete")]
|
public JsonActionResult<bool> BatchDelete(string ids)
|
||||||
public JsonActionResult<bool> BatchDelete(string ids)
|
{
|
||||||
{
|
return WitRealBatchDelete(ids);
|
||||||
return WitRealBatchDelete(ids);
|
}
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// 获得单条实体数据
|
||||||
/// 获得单条实体数据
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="filter">过滤实体</param>
|
||||||
/// <param name="filter">过滤实体</param>
|
/// <returns></returns>
|
||||||
/// <returns></returns>
|
[HttpPost, Route("Get")]
|
||||||
[HttpPost, Route("Get")]
|
public JsonActionResult<T_LG_OPRATE> Get([FromBody] KeywordFilter filter)
|
||||||
public JsonActionResult<T_LG_OPRATE> Get([FromBody] KeywordFilter filter)
|
{
|
||||||
{
|
return WitEntity(null, filter);
|
||||||
return WitEntity(null, filter);
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@ -1,370 +1,356 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// T4模板文件:基础接口类
|
||||||
|
// 此代码由T4模板自动生成
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
using APT.Infrastructure.Core;
|
||||||
//------------------------------------------------------------------------------
|
using Microsoft.AspNetCore.Mvc;
|
||||||
// T4模板文件:基础接口类
|
using System.Collections.Generic;
|
||||||
// 此代码由T4模板自动生成
|
using APT.Utility;
|
||||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
using APT.Infrastructure.Api;
|
||||||
//------------------------------------------------------------------------------
|
using APT.BaseData.Domain.ApiModel.PF;
|
||||||
using APT.Infrastructure.Core;
|
namespace APT.NW.WebApi.Controllers.Api
|
||||||
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
|
|
||||||
{
|
|
||||||
using APT.BaseData.Domain.Entities.NW;
|
using APT.BaseData.Domain.Entities.NW;
|
||||||
|
#region Enterprise-子企业表
|
||||||
#region Enterprise-子企业表
|
/// <summary>
|
||||||
/// <summary>
|
/// 子企业表
|
||||||
/// 子企业表
|
/// </summary>
|
||||||
/// </summary>
|
[Route("api/NW/Enterprise")]
|
||||||
[Route("api/NW/Enterprise")]
|
public partial class EnterpriseController : AuthorizeTreeApiController<T_NW_ENTERPRISE>
|
||||||
public partial class EnterpriseController : AuthorizeTreeApiController<T_NW_ENTERPRISE>
|
{
|
||||||
{
|
/// <summary>
|
||||||
/// <summary>
|
/// 查询所有数据
|
||||||
/// 查询所有数据
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="filter">过滤实体</param>
|
||||||
/// <param name="filter">过滤实体</param>
|
/// <returns></returns>
|
||||||
/// <returns></returns>
|
[HttpPost, Route("Entities")]
|
||||||
[HttpPost, Route("Entities")]
|
public JsonActionResult<IEnumerable<T_NW_ENTERPRISE>> Entities([FromBody]KeywordFilter filter)
|
||||||
public JsonActionResult<IEnumerable<T_NW_ENTERPRISE>> Entities([FromBody]KeywordFilter filter)
|
{
|
||||||
{
|
return WitEntities(null, filter);
|
||||||
return WitEntities(null, filter);
|
}
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// 排序查询所有数据
|
||||||
/// 排序查询所有数据
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="filter">过滤实体</param>
|
||||||
/// <param name="filter">过滤实体</param>
|
/// <returns></returns>
|
||||||
/// <returns></returns>
|
|
||||||
|
[HttpPost, Route("OrderEntities")]
|
||||||
[HttpPost, Route("OrderEntities")]
|
public JsonActionResult<IEnumerable<T_NW_ENTERPRISE>> OrderEntities([FromBody]KeywordFilter filter)
|
||||||
public JsonActionResult<IEnumerable<T_NW_ENTERPRISE>> OrderEntities([FromBody]KeywordFilter filter)
|
{
|
||||||
{
|
return WitOrderEntities(null, filter);
|
||||||
return WitOrderEntities(null, filter);
|
}
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// 分页查询数据
|
||||||
/// 分页查询数据
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="pageFilter">分页过滤实体</param>
|
||||||
/// <param name="pageFilter">分页过滤实体</param>
|
/// <returns></returns>
|
||||||
/// <returns></returns>
|
[HttpPost, Route("Paged")]
|
||||||
[HttpPost, Route("Paged")]
|
public PagedActionResult<T_NW_ENTERPRISE> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||||
public PagedActionResult<T_NW_ENTERPRISE> Paged([FromBody]KeywordPageFilter pageFilter)
|
{
|
||||||
{
|
return WitPaged(null, pageFilter);
|
||||||
return WitPaged(null, pageFilter);
|
}
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// 排序分页查询数据
|
||||||
/// 排序分页查询数据
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="pageFilter">分页过滤实体</param>
|
||||||
/// <param name="pageFilter">分页过滤实体</param>
|
/// <returns></returns>
|
||||||
/// <returns></returns>
|
[HttpPost, Route("OrderPaged")]
|
||||||
[HttpPost, Route("OrderPaged")]
|
public PagedActionResult<T_NW_ENTERPRISE> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
||||||
public PagedActionResult<T_NW_ENTERPRISE> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
{
|
||||||
{
|
return WitOrderPaged(null, pageFilter);
|
||||||
return WitOrderPaged(null, pageFilter);
|
}
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// 根据主键删除数据
|
||||||
/// 根据主键删除数据
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="id">主键ID</param>
|
||||||
/// <param name="id">主键ID</param>
|
/// <returns></returns>
|
||||||
/// <returns></returns>
|
[HttpGet, Route("Delete")]
|
||||||
[HttpGet, Route("Delete")]
|
public JsonActionResult<bool> Delete(string id)
|
||||||
public JsonActionResult<bool> Delete(string id)
|
{
|
||||||
{
|
return WitRealDelete(id);
|
||||||
return WitRealDelete(id);
|
}
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// 更新或新增数据
|
||||||
/// 更新或新增数据
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="entity">对象实体</param>
|
||||||
/// <param name="entity">对象实体</param>
|
/// <returns></returns>
|
||||||
/// <returns></returns>
|
[HttpPost, Route("Update")]
|
||||||
[HttpPost, Route("Update")]
|
public JsonActionResult<bool> Update([FromBody]T_NW_ENTERPRISE entity)
|
||||||
public JsonActionResult<bool> Update([FromBody]T_NW_ENTERPRISE entity)
|
{
|
||||||
{
|
return WitUpdate(entity);
|
||||||
return WitUpdate(entity);
|
}
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// 批量更新
|
||||||
/// 批量更新
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="entity">对象实体</param>
|
||||||
/// <param name="entity">对象实体</param>
|
/// <returns></returns>
|
||||||
/// <returns></returns>
|
[HttpPost, Route("BatchUpdate")]
|
||||||
[HttpPost, Route("BatchUpdate")]
|
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ENTERPRISE> entity)
|
||||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ENTERPRISE> entity)
|
{
|
||||||
{
|
return WitBantchUpdate(entity?.Data);
|
||||||
return WitBantchUpdate(entity?.Data);
|
}
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// 批量删除数据
|
||||||
/// 批量删除数据
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
||||||
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
/// <returns></returns>
|
||||||
/// <returns></returns>
|
[HttpGet, Route("BatchDelete")]
|
||||||
[HttpGet, Route("BatchDelete")]
|
public JsonActionResult<bool> BatchDelete(string ids)
|
||||||
public JsonActionResult<bool> BatchDelete(string ids)
|
{
|
||||||
{
|
return WitRealBatchDelete(ids);
|
||||||
return WitRealBatchDelete(ids);
|
}
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// 获得单条实体数据
|
||||||
/// 获得单条实体数据
|
/// </summary>
|
||||||
/// </summary>
|
/// <param name="filter">过滤实体</param>
|
||||||
/// <param name="filter">过滤实体</param>
|
/// <returns></returns>
|
||||||
/// <returns></returns>
|
[HttpPost, Route("Get")]
|
||||||
[HttpPost, Route("Get")]
|
public JsonActionResult<T_NW_ENTERPRISE> Get([FromBody] KeywordFilter filter)
|
||||||
public JsonActionResult<T_NW_ENTERPRISE> Get([FromBody] KeywordFilter filter)
|
{
|
||||||
{
|
return WitEntity(null, filter);
|
||||||
return WitEntity(null, filter);
|
}
|
||||||
}
|
/// <summary>
|
||||||
|
/// 获得树形实体数据
|
||||||
/// <summary>
|
/// </summary>
|
||||||
/// 获得树形实体数据
|
/// <param name="filter"></param>
|
||||||
/// </summary>
|
/// <returns></returns>
|
||||||
/// <param name="filter"></param>
|
[HttpPost, Route("TreeData")]
|
||||||
/// <returns></returns>
|
public JsonActionResult<IEnumerable<TreeNode<T_NW_ENTERPRISE>>> TreeData([FromBody] KeywordFilter filter)
|
||||||
[HttpPost, Route("TreeData")]
|
{
|
||||||
public JsonActionResult<IEnumerable<TreeNode<T_NW_ENTERPRISE>>> TreeData([FromBody] KeywordFilter filter)
|
return WitTreeOrderEntities(null, filter);
|
||||||
{
|
}
|
||||||
return WitTreeOrderEntities(null, filter);
|
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
#region RoleDataPerm-子企业数据权限表
|
||||||
}
|
/// <summary>
|
||||||
#endregion
|
/// 子企业数据权限表
|
||||||
|
/// </summary>
|
||||||
#region RoleDataPerm-子企业数据权限表
|
[Route("api/NW/RoleDataPerm")]
|
||||||
/// <summary>
|
public partial class RoleDataPermController : AuthorizeApiController<T_NW_ROLE_DATA_PERM>
|
||||||
/// 子企业数据权限表
|
{
|
||||||
/// </summary>
|
/// <summary>
|
||||||
[Route("api/NW/RoleDataPerm")]
|
/// 查询所有数据
|
||||||
public partial class RoleDataPermController : AuthorizeApiController<T_NW_ROLE_DATA_PERM>
|
/// </summary>
|
||||||
{
|
/// <param name="filter">过滤实体</param>
|
||||||
/// <summary>
|
/// <returns></returns>
|
||||||
/// 查询所有数据
|
[HttpPost, Route("Entities")]
|
||||||
/// </summary>
|
public JsonActionResult<IEnumerable<T_NW_ROLE_DATA_PERM>> Entities([FromBody]KeywordFilter filter)
|
||||||
/// <param name="filter">过滤实体</param>
|
{
|
||||||
/// <returns></returns>
|
return WitEntities(null, filter);
|
||||||
[HttpPost, Route("Entities")]
|
}
|
||||||
public JsonActionResult<IEnumerable<T_NW_ROLE_DATA_PERM>> Entities([FromBody]KeywordFilter filter)
|
|
||||||
{
|
/// <summary>
|
||||||
return WitEntities(null, filter);
|
/// 排序查询所有数据
|
||||||
}
|
/// </summary>
|
||||||
|
/// <param name="filter">过滤实体</param>
|
||||||
/// <summary>
|
/// <returns></returns>
|
||||||
/// 排序查询所有数据
|
|
||||||
/// </summary>
|
[HttpPost, Route("OrderEntities")]
|
||||||
/// <param name="filter">过滤实体</param>
|
public JsonActionResult<IEnumerable<T_NW_ROLE_DATA_PERM>> OrderEntities([FromBody]KeywordFilter filter)
|
||||||
/// <returns></returns>
|
{
|
||||||
|
return WitOrderEntities(null, filter);
|
||||||
[HttpPost, Route("OrderEntities")]
|
}
|
||||||
public JsonActionResult<IEnumerable<T_NW_ROLE_DATA_PERM>> OrderEntities([FromBody]KeywordFilter filter)
|
|
||||||
{
|
/// <summary>
|
||||||
return WitOrderEntities(null, filter);
|
/// 分页查询数据
|
||||||
}
|
/// </summary>
|
||||||
|
/// <param name="pageFilter">分页过滤实体</param>
|
||||||
/// <summary>
|
/// <returns></returns>
|
||||||
/// 分页查询数据
|
[HttpPost, Route("Paged")]
|
||||||
/// </summary>
|
public PagedActionResult<T_NW_ROLE_DATA_PERM> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||||
/// <param name="pageFilter">分页过滤实体</param>
|
{
|
||||||
/// <returns></returns>
|
return WitPaged(null, pageFilter);
|
||||||
[HttpPost, Route("Paged")]
|
}
|
||||||
public PagedActionResult<T_NW_ROLE_DATA_PERM> Paged([FromBody]KeywordPageFilter pageFilter)
|
|
||||||
{
|
/// <summary>
|
||||||
return WitPaged(null, pageFilter);
|
/// 排序分页查询数据
|
||||||
}
|
/// </summary>
|
||||||
|
/// <param name="pageFilter">分页过滤实体</param>
|
||||||
/// <summary>
|
/// <returns></returns>
|
||||||
/// 排序分页查询数据
|
[HttpPost, Route("OrderPaged")]
|
||||||
/// </summary>
|
public PagedActionResult<T_NW_ROLE_DATA_PERM> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
||||||
/// <param name="pageFilter">分页过滤实体</param>
|
{
|
||||||
/// <returns></returns>
|
return WitOrderPaged(null, pageFilter);
|
||||||
[HttpPost, Route("OrderPaged")]
|
}
|
||||||
public PagedActionResult<T_NW_ROLE_DATA_PERM> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
|
||||||
{
|
/// <summary>
|
||||||
return WitOrderPaged(null, pageFilter);
|
/// 根据主键删除数据
|
||||||
}
|
/// </summary>
|
||||||
|
/// <param name="id">主键ID</param>
|
||||||
/// <summary>
|
/// <returns></returns>
|
||||||
/// 根据主键删除数据
|
[HttpGet, Route("Delete")]
|
||||||
/// </summary>
|
public JsonActionResult<bool> Delete(string id)
|
||||||
/// <param name="id">主键ID</param>
|
{
|
||||||
/// <returns></returns>
|
return WitRealDelete(id);
|
||||||
[HttpGet, Route("Delete")]
|
}
|
||||||
public JsonActionResult<bool> Delete(string id)
|
|
||||||
{
|
/// <summary>
|
||||||
return WitRealDelete(id);
|
/// 更新或新增数据
|
||||||
}
|
/// </summary>
|
||||||
|
/// <param name="entity">对象实体</param>
|
||||||
/// <summary>
|
/// <returns></returns>
|
||||||
/// 更新或新增数据
|
[HttpPost, Route("Update")]
|
||||||
/// </summary>
|
public JsonActionResult<bool> Update([FromBody]T_NW_ROLE_DATA_PERM entity)
|
||||||
/// <param name="entity">对象实体</param>
|
{
|
||||||
/// <returns></returns>
|
return WitUpdate(entity);
|
||||||
[HttpPost, Route("Update")]
|
}
|
||||||
public JsonActionResult<bool> Update([FromBody]T_NW_ROLE_DATA_PERM entity)
|
|
||||||
{
|
/// <summary>
|
||||||
return WitUpdate(entity);
|
/// 批量更新
|
||||||
}
|
/// </summary>
|
||||||
|
/// <param name="entity">对象实体</param>
|
||||||
/// <summary>
|
/// <returns></returns>
|
||||||
/// 批量更新
|
[HttpPost, Route("BatchUpdate")]
|
||||||
/// </summary>
|
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ROLE_DATA_PERM> entity)
|
||||||
/// <param name="entity">对象实体</param>
|
{
|
||||||
/// <returns></returns>
|
return WitBantchUpdate(entity?.Data);
|
||||||
[HttpPost, Route("BatchUpdate")]
|
}
|
||||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ROLE_DATA_PERM> entity)
|
|
||||||
{
|
/// <summary>
|
||||||
return WitBantchUpdate(entity?.Data);
|
/// 批量删除数据
|
||||||
}
|
/// </summary>
|
||||||
|
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
||||||
/// <summary>
|
/// <returns></returns>
|
||||||
/// 批量删除数据
|
[HttpGet, Route("BatchDelete")]
|
||||||
/// </summary>
|
public JsonActionResult<bool> BatchDelete(string ids)
|
||||||
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
{
|
||||||
/// <returns></returns>
|
return WitRealBatchDelete(ids);
|
||||||
[HttpGet, Route("BatchDelete")]
|
}
|
||||||
public JsonActionResult<bool> BatchDelete(string ids)
|
|
||||||
{
|
/// <summary>
|
||||||
return WitRealBatchDelete(ids);
|
/// 获得单条实体数据
|
||||||
}
|
/// </summary>
|
||||||
|
/// <param name="filter">过滤实体</param>
|
||||||
/// <summary>
|
/// <returns></returns>
|
||||||
/// 获得单条实体数据
|
[HttpPost, Route("Get")]
|
||||||
/// </summary>
|
public JsonActionResult<T_NW_ROLE_DATA_PERM> Get([FromBody] KeywordFilter filter)
|
||||||
/// <param name="filter">过滤实体</param>
|
{
|
||||||
/// <returns></returns>
|
return WitEntity(null, filter);
|
||||||
[HttpPost, Route("Get")]
|
}
|
||||||
public JsonActionResult<T_NW_ROLE_DATA_PERM> Get([FromBody] KeywordFilter filter)
|
|
||||||
{
|
}
|
||||||
return WitEntity(null, filter);
|
#endregion
|
||||||
}
|
#region RoleMenu-子企业权限表
|
||||||
|
/// <summary>
|
||||||
|
/// 子企业权限表
|
||||||
}
|
/// </summary>
|
||||||
#endregion
|
[Route("api/NW/RoleMenu")]
|
||||||
|
public partial class RoleMenuController : AuthorizeApiController<T_NW_ROLE_MENU>
|
||||||
#region RoleMenu-子企业权限表
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 子企业权限表
|
/// 查询所有数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Route("api/NW/RoleMenu")]
|
/// <param name="filter">过滤实体</param>
|
||||||
public partial class RoleMenuController : AuthorizeApiController<T_NW_ROLE_MENU>
|
/// <returns></returns>
|
||||||
{
|
[HttpPost, Route("Entities")]
|
||||||
/// <summary>
|
public JsonActionResult<IEnumerable<T_NW_ROLE_MENU>> Entities([FromBody]KeywordFilter filter)
|
||||||
/// 查询所有数据
|
{
|
||||||
/// </summary>
|
return WitEntities(null, filter);
|
||||||
/// <param name="filter">过滤实体</param>
|
}
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Entities")]
|
/// <summary>
|
||||||
public JsonActionResult<IEnumerable<T_NW_ROLE_MENU>> Entities([FromBody]KeywordFilter filter)
|
/// 排序查询所有数据
|
||||||
{
|
/// </summary>
|
||||||
return WitEntities(null, filter);
|
/// <param name="filter">过滤实体</param>
|
||||||
}
|
/// <returns></returns>
|
||||||
|
|
||||||
/// <summary>
|
[HttpPost, Route("OrderEntities")]
|
||||||
/// 排序查询所有数据
|
public JsonActionResult<IEnumerable<T_NW_ROLE_MENU>> OrderEntities([FromBody]KeywordFilter filter)
|
||||||
/// </summary>
|
{
|
||||||
/// <param name="filter">过滤实体</param>
|
return WitOrderEntities(null, filter);
|
||||||
/// <returns></returns>
|
}
|
||||||
|
|
||||||
[HttpPost, Route("OrderEntities")]
|
/// <summary>
|
||||||
public JsonActionResult<IEnumerable<T_NW_ROLE_MENU>> OrderEntities([FromBody]KeywordFilter filter)
|
/// 分页查询数据
|
||||||
{
|
/// </summary>
|
||||||
return WitOrderEntities(null, filter);
|
/// <param name="pageFilter">分页过滤实体</param>
|
||||||
}
|
/// <returns></returns>
|
||||||
|
[HttpPost, Route("Paged")]
|
||||||
/// <summary>
|
public PagedActionResult<T_NW_ROLE_MENU> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||||
/// 分页查询数据
|
{
|
||||||
/// </summary>
|
return WitPaged(null, pageFilter);
|
||||||
/// <param name="pageFilter">分页过滤实体</param>
|
}
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Paged")]
|
/// <summary>
|
||||||
public PagedActionResult<T_NW_ROLE_MENU> Paged([FromBody]KeywordPageFilter pageFilter)
|
/// 排序分页查询数据
|
||||||
{
|
/// </summary>
|
||||||
return WitPaged(null, pageFilter);
|
/// <param name="pageFilter">分页过滤实体</param>
|
||||||
}
|
/// <returns></returns>
|
||||||
|
[HttpPost, Route("OrderPaged")]
|
||||||
/// <summary>
|
public PagedActionResult<T_NW_ROLE_MENU> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
||||||
/// 排序分页查询数据
|
{
|
||||||
/// </summary>
|
return WitOrderPaged(null, pageFilter);
|
||||||
/// <param name="pageFilter">分页过滤实体</param>
|
}
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("OrderPaged")]
|
/// <summary>
|
||||||
public PagedActionResult<T_NW_ROLE_MENU> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
/// 根据主键删除数据
|
||||||
{
|
/// </summary>
|
||||||
return WitOrderPaged(null, pageFilter);
|
/// <param name="id">主键ID</param>
|
||||||
}
|
/// <returns></returns>
|
||||||
|
[HttpGet, Route("Delete")]
|
||||||
/// <summary>
|
public JsonActionResult<bool> Delete(string id)
|
||||||
/// 根据主键删除数据
|
{
|
||||||
/// </summary>
|
return WitRealDelete(id);
|
||||||
/// <param name="id">主键ID</param>
|
}
|
||||||
/// <returns></returns>
|
|
||||||
[HttpGet, Route("Delete")]
|
/// <summary>
|
||||||
public JsonActionResult<bool> Delete(string id)
|
/// 更新或新增数据
|
||||||
{
|
/// </summary>
|
||||||
return WitRealDelete(id);
|
/// <param name="entity">对象实体</param>
|
||||||
}
|
/// <returns></returns>
|
||||||
|
[HttpPost, Route("Update")]
|
||||||
/// <summary>
|
public JsonActionResult<bool> Update([FromBody]T_NW_ROLE_MENU entity)
|
||||||
/// 更新或新增数据
|
{
|
||||||
/// </summary>
|
return WitUpdate(entity);
|
||||||
/// <param name="entity">对象实体</param>
|
}
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Update")]
|
/// <summary>
|
||||||
public JsonActionResult<bool> Update([FromBody]T_NW_ROLE_MENU entity)
|
/// 批量更新
|
||||||
{
|
/// </summary>
|
||||||
return WitUpdate(entity);
|
/// <param name="entity">对象实体</param>
|
||||||
}
|
/// <returns></returns>
|
||||||
|
[HttpPost, Route("BatchUpdate")]
|
||||||
/// <summary>
|
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ROLE_MENU> entity)
|
||||||
/// 批量更新
|
{
|
||||||
/// </summary>
|
return WitBantchUpdate(entity?.Data);
|
||||||
/// <param name="entity">对象实体</param>
|
}
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("BatchUpdate")]
|
/// <summary>
|
||||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ROLE_MENU> entity)
|
/// 批量删除数据
|
||||||
{
|
/// </summary>
|
||||||
return WitBantchUpdate(entity?.Data);
|
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
||||||
}
|
/// <returns></returns>
|
||||||
|
[HttpGet, Route("BatchDelete")]
|
||||||
/// <summary>
|
public JsonActionResult<bool> BatchDelete(string ids)
|
||||||
/// 批量删除数据
|
{
|
||||||
/// </summary>
|
return WitRealBatchDelete(ids);
|
||||||
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
}
|
||||||
/// <returns></returns>
|
|
||||||
[HttpGet, Route("BatchDelete")]
|
/// <summary>
|
||||||
public JsonActionResult<bool> BatchDelete(string ids)
|
/// 获得单条实体数据
|
||||||
{
|
/// </summary>
|
||||||
return WitRealBatchDelete(ids);
|
/// <param name="filter">过滤实体</param>
|
||||||
}
|
/// <returns></returns>
|
||||||
|
[HttpPost, Route("Get")]
|
||||||
/// <summary>
|
public JsonActionResult<T_NW_ROLE_MENU> Get([FromBody] KeywordFilter filter)
|
||||||
/// 获得单条实体数据
|
{
|
||||||
/// </summary>
|
return WitEntity(null, filter);
|
||||||
/// <param name="filter">过滤实体</param>
|
}
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Get")]
|
}
|
||||||
public JsonActionResult<T_NW_ROLE_MENU> Get([FromBody] KeywordFilter filter)
|
#endregion
|
||||||
{
|
}
|
||||||
return WitEntity(null, filter);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,13 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// T4模板文件:基础接口类
|
// T4模板文件:基础接口类
|
||||||
// 此代码由T4模板自动生成
|
// 此代码由T4模板自动生成
|
||||||
@ -21,5 +15,4 @@ using APT.Infrastructure.Api;
|
|||||||
using APT.BaseData.Domain.ApiModel.PF;
|
using APT.BaseData.Domain.ApiModel.PF;
|
||||||
namespace APT.PP.WebApi.Controllers.Api
|
namespace APT.PP.WebApi.Controllers.Api
|
||||||
{
|
{
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -18,6 +18,7 @@ using APT.BaseData.Domain.ApiModel;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using InfluxData.Net.InfluxDb.Models.Responses;
|
using InfluxData.Net.InfluxDb.Models.Responses;
|
||||||
|
using System.Linq.Expressions;
|
||||||
|
|
||||||
namespace APT.SC.WebApi.Controllers.Api.SE
|
namespace APT.SC.WebApi.Controllers.Api.SE
|
||||||
{
|
{
|
||||||
@ -268,6 +269,11 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
/// 培训记录状态
|
/// 培训记录状态
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public SETrainRecordStatus STATUS_RECORD { get; set; }
|
public SETrainRecordStatus STATUS_RECORD { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 视频观看情况
|
||||||
|
/// </summary>
|
||||||
|
public List<T_SE_TRAIN_RECORD_VIEW> ListViewInfo { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost, Route("GetUserPapers")]
|
[HttpPost, Route("GetUserPapers")]
|
||||||
@ -278,6 +284,9 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
var ret = new JsonActionResult<TrainUserPaperModel>();
|
var ret = new JsonActionResult<TrainUserPaperModel>();
|
||||||
List<string> listPath = new List<string>();
|
List<string> listPath = new List<string>();
|
||||||
SETrainRecordStatus STATUS = SETrainRecordStatus.草稿;
|
SETrainRecordStatus STATUS = SETrainRecordStatus.草稿;
|
||||||
|
|
||||||
|
List<T_SE_TRAIN_RECORD_VIEW> ListViewInfo = null;
|
||||||
|
|
||||||
if (papers != null && papers.Any())
|
if (papers != null && papers.Any())
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(filter.Keyword))
|
if (!string.IsNullOrEmpty(filter.Keyword))
|
||||||
@ -292,6 +301,8 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
{
|
{
|
||||||
STATUS = record.STATUS;
|
STATUS = record.STATUS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ListViewInfo = GetEntities<T_SE_TRAIN_RECORD_VIEW>(e => e.RECORD_ID == papers[0].RECORD_ID && e.TEXT_ID == papers[0].TEXT_ID && e.USER_ID == papers[0].USER_ID, null, null).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
ret.Data = new TrainUserPaperModel
|
ret.Data = new TrainUserPaperModel
|
||||||
@ -299,6 +310,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
Nav_Papers = papers,
|
Nav_Papers = papers,
|
||||||
Nav_Config = config,
|
Nav_Config = config,
|
||||||
listPath = listPath,
|
listPath = listPath,
|
||||||
|
ListViewInfo = ListViewInfo,
|
||||||
STATUS_RECORD = STATUS
|
STATUS_RECORD = STATUS
|
||||||
};
|
};
|
||||||
ret.IsSuccessful = true;
|
ret.IsSuccessful = true;
|
||||||
@ -361,7 +373,9 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
T_SE_TRAIN_RECORD_USER RecordUser = null;
|
T_SE_TRAIN_RECORD_USER RecordUser = null;
|
||||||
|
|
||||||
T_SE_TRAIN_RECORD_TEXT modelText = GetEntity<T_SE_TRAIN_RECORD_TEXT>(entity.TEXT_ID);
|
T_SE_TRAIN_RECORD_TEXT modelText = GetEntity<T_SE_TRAIN_RECORD_TEXT>(entity.TEXT_ID);
|
||||||
if (APT.Infrastructure.Api.AppContext.CurrentSession.UserID.HasValue)
|
|
||||||
|
Guid? LogiID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||||
|
if (LogiID.HasValue)
|
||||||
{
|
{
|
||||||
RecordUser = GetEntity<T_SE_TRAIN_RECORD_USER>(e => e.RECORD_ID == modelText.RECORD_ID && e.USER_ID == APT.Infrastructure.Api.AppContext.CurrentSession.UserID);
|
RecordUser = GetEntity<T_SE_TRAIN_RECORD_USER>(e => e.RECORD_ID == modelText.RECORD_ID && e.USER_ID == APT.Infrastructure.Api.AppContext.CurrentSession.UserID);
|
||||||
}
|
}
|
||||||
@ -491,6 +505,15 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
Expression<Func<T_SE_TRAIN_RECORD_VIEW, bool>> expressionDel = e => e.USER_ID == LogiID.Value;
|
||||||
|
if (record != null)
|
||||||
|
{
|
||||||
|
expressionDel = expressionDel.And(e => e.RECORD_ID == record.ID);
|
||||||
|
if (entity.Nav_Papers[0].TEXT_ID.HasValue)
|
||||||
|
{
|
||||||
|
expressionDel = expressionDel.And(e => e.TEXT_ID == entity.Nav_Papers[0].TEXT_ID.Value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
UnifiedCommit(() =>
|
UnifiedCommit(() =>
|
||||||
{
|
{
|
||||||
@ -513,6 +536,9 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
UpdateEntityNoCommit(record);
|
UpdateEntityNoCommit(record);
|
||||||
if (sendNotices != null)
|
if (sendNotices != null)
|
||||||
UpdateEntityNoCommit(sendNotices);
|
UpdateEntityNoCommit(sendNotices);
|
||||||
|
|
||||||
|
DeleteEntityNoCommit(expressionDel);
|
||||||
|
|
||||||
});
|
});
|
||||||
SavePapersResult result = new SavePapersResult();
|
SavePapersResult result = new SavePapersResult();
|
||||||
result.IsOperateSuccessful = true;
|
result.IsOperateSuccessful = true;
|
||||||
@ -533,6 +559,66 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 考试
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entity"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <exception cref="Exception"></exception>
|
||||||
|
[HttpPost, Route("SavePapersTemp")]
|
||||||
|
public JsonActionResult<SavePapersResult> SavePapersTemp([FromBody] TrainUserPaperModel entity)
|
||||||
|
{
|
||||||
|
return SafeExecute(() =>
|
||||||
|
{
|
||||||
|
if (entity.TaskID == Guid.Empty)
|
||||||
|
{
|
||||||
|
throw new Exception("获取待办传参失败,请在首页待办进入考试!");
|
||||||
|
}
|
||||||
|
var Nav_Papers = entity.Nav_Papers;
|
||||||
|
if (Nav_Papers == null || Nav_Papers.Count == 0)
|
||||||
|
{
|
||||||
|
throw new Exception("试卷不能为空");
|
||||||
|
}
|
||||||
|
var ListViewInfo = entity.ListViewInfo;
|
||||||
|
|
||||||
|
Guid TEXT_ID = Guid.Empty;
|
||||||
|
foreach (var item in Nav_Papers)
|
||||||
|
{
|
||||||
|
if (TEXT_ID == Guid.Empty && item.TEXT_ID.HasValue)
|
||||||
|
{
|
||||||
|
TEXT_ID = item.TEXT_ID.Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var item in ListViewInfo)
|
||||||
|
{
|
||||||
|
if (item.USER_ID == Guid.Empty)
|
||||||
|
{
|
||||||
|
item.USER_ID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID.Value;
|
||||||
|
}
|
||||||
|
if (item.RECORD_ID == Guid.Empty)
|
||||||
|
{
|
||||||
|
item.RECORD_ID = Nav_Papers[0].RECORD_ID;
|
||||||
|
}
|
||||||
|
if (item.TEXT_ID == Guid.Empty)
|
||||||
|
{
|
||||||
|
item.TEXT_ID = TEXT_ID;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
UnifiedCommit(() =>
|
||||||
|
{
|
||||||
|
BantchSaveEntityNoCommit(Nav_Papers);
|
||||||
|
//保存视频观看记录
|
||||||
|
if (ListViewInfo != null && ListViewInfo.Count > 0)
|
||||||
|
BantchSaveEntityNoCommit(ListViewInfo);
|
||||||
|
});
|
||||||
|
SavePapersResult result = new SavePapersResult();
|
||||||
|
result.IsOperateSuccessful = true;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
#region 旧版 SavePapers
|
#region 旧版 SavePapers
|
||||||
|
|
||||||
//[HttpPost, Route("SavePapers")]
|
//[HttpPost, Route("SavePapers")]
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user