培训类型情况 报表修改
标语修改
This commit is contained in:
parent
23ad0c6b7b
commit
2a5ac52e2d
66
APT.BaseData.Domain/Entities/PF/T_PF_BITITLE.cs
Normal file
66
APT.BaseData.Domain/Entities/PF/T_PF_BITITLE.cs
Normal file
@ -0,0 +1,66 @@
|
||||
using APT.BaseData.Domain.Entities.BD;
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
namespace APT.BaseData.Domain.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// BI标语
|
||||
/// </summary>
|
||||
[Description("标语")]
|
||||
public partial class T_PF_BITITLE : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 标语
|
||||
/// </summary>
|
||||
[Description("标语")]
|
||||
[FormFieldEdit]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[DataFieldLength(500)]
|
||||
public string TITLE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 版本号
|
||||
/// </summary>
|
||||
[Description("版本号")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public int VERSION { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
[Description("状态")]
|
||||
[FormFieldEdit]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public STATEEnum STATUS { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[Description("创建人")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[DataFieldForeignKey("Nav_User")]
|
||||
public Guid USER_ID_CREATER { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[Description("创建人")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public T_FM_USER Nav_User { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 父级ID
|
||||
/// </summary>
|
||||
[Description("父级ID")]
|
||||
public Guid? PARENTID { get; set; }
|
||||
}
|
||||
}
|
||||
@ -216,4 +216,28 @@ namespace APT.BaseData.Domain.Enums.PF
|
||||
Approve = 20,
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发布状态
|
||||
/// </summary>
|
||||
public enum STATEEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// 未发布 0
|
||||
/// </summary>
|
||||
[Description("未发布")]
|
||||
Draft = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 已发布 10
|
||||
/// </summary>
|
||||
[Description("已发布")]
|
||||
release = 10,
|
||||
|
||||
/// <summary>
|
||||
/// 撤回 20
|
||||
/// </summary>
|
||||
[Description("撤回")]
|
||||
Back = 20,
|
||||
}
|
||||
}
|
||||
|
||||
139372
APT.Data.Migrations/Migrations/20260422085359_wyw2026042201.Designer.cs
generated
Normal file
139372
APT.Data.Migrations/Migrations/20260422085359_wyw2026042201.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace APT.Data.Migrations.Migrations
|
||||
{
|
||||
public partial class wyw2026042201 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "T_PF_BITITLE",
|
||||
columns: table => new
|
||||
{
|
||||
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TITLE = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
VERSION = table.Column<int>(type: "int", nullable: false),
|
||||
STATUS = table.Column<int>(type: "int", nullable: false),
|
||||
USER_ID_CREATER = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
PARENTID = table.Column<Guid>(type: "uniqueidentifier", 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_PF_BITITLE", x => x.ID);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_PF_BITITLE_T_FM_ORGANIZATION_ORG_ID",
|
||||
column: x => x.ORG_ID,
|
||||
principalTable: "T_FM_ORGANIZATION",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_PF_BITITLE_T_FM_USER_USER_ID_CREATER",
|
||||
column: x => x.USER_ID_CREATER,
|
||||
principalTable: "T_FM_USER",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_PF_BITITLE_ORG_ID",
|
||||
table: "T_PF_BITITLE",
|
||||
column: "ORG_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_PF_BITITLE_USER_ID_CREATER",
|
||||
table: "T_PF_BITITLE",
|
||||
column: "USER_ID_CREATER");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_PF_BITITLE");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -12145,6 +12145,71 @@ namespace APT.Data.Migrations.Migrations
|
||||
b.ToTable("T_PF_APPROVE_TEMP_DETAIL");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_BITITLE", b =>
|
||||
{
|
||||
b.Property<Guid>("ID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("CREATER_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime?>("CREATE_TIME")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
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>("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?>("PARENTID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("STATUS")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("TITLE")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<Guid>("USER_ID_CREATER")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("VERSION")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.HasIndex("ORG_ID");
|
||||
|
||||
b.HasIndex("USER_ID_CREATER");
|
||||
|
||||
b.ToTable("T_PF_BITITLE");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_BTN", b =>
|
||||
{
|
||||
b.Property<Guid>("ID")
|
||||
@ -103246,6 +103311,25 @@ namespace APT.Data.Migrations.Migrations
|
||||
b.Navigation("Nav_Org");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_BITITLE", b =>
|
||||
{
|
||||
b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
|
||||
.WithMany()
|
||||
.HasForeignKey("ORG_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
|
||||
.WithMany()
|
||||
.HasForeignKey("USER_ID_CREATER")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Nav_Org");
|
||||
|
||||
b.Navigation("Nav_User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_BTN", b =>
|
||||
{
|
||||
b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
|
||||
|
||||
@ -16851,6 +16851,17 @@ builder.Property(t => t.REMARK).HasMaxLength(500);
|
||||
builder.HasOne(t => t.Nav_AppVersion).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.APP_VERSION_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Bititle
|
||||
public partial class PFBititleMap :APTEntityBaseMap<T_PF_BITITLE>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_PF_BITITLE> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.Property(t => t.TITLE).HasMaxLength(500);
|
||||
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID_CREATER).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region ClientScopes
|
||||
|
||||
@ -0,0 +1,71 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.BaseData.Domain.IServices;
|
||||
using APT.Infrastructure.Core;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using APT.Utility;
|
||||
using APT.Infrastructure.Api;
|
||||
using APT.Migrations;
|
||||
using APT.BaseData.Domain.Entities.OP;
|
||||
using APT.BaseData.Domain.Enums.OP;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.BaseData.Domain.IServices.OP;
|
||||
using Microsoft.Data.SqlClient;
|
||||
|
||||
namespace APT.PF.WebApiControllers.Api.PF
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Route("api/PF/PFBititle")]
|
||||
public class PFBititleController : AuthorizeApiController<T_PF_BITITLE>
|
||||
{
|
||||
IOPTenantDBConnService OPTenantDBConnService { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="opTenantDBConnService"></param>
|
||||
public PFBititleController(IOPTenantDBConnService opTenantDBConnService)
|
||||
{
|
||||
OPTenantDBConnService = opTenantDBConnService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新或新增数据
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("FullUpdate")]
|
||||
public JsonActionResult<bool> FullUpdate([FromBody] T_PF_BITITLE entity)
|
||||
{
|
||||
return SafeExecute(() =>
|
||||
{
|
||||
T_PF_BITITLE check = null;
|
||||
T_PF_BITITLE ModelUpdateOld = null;
|
||||
if (entity.STATUS == STATEEnum.release)
|
||||
{
|
||||
check = GetEntity<T_PF_BITITLE>(e => e.STATUS == STATEEnum.release);
|
||||
if (check != null)
|
||||
{
|
||||
if (check.ID == entity.ID)
|
||||
{
|
||||
//旧数据 撤回状态 本条修改ID 父项ID 版本号等
|
||||
ModelUpdateOld = check;
|
||||
ModelUpdateOld.STATUS = STATEEnum.Draft;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("只能有一条已发布的标语!入需发布本本条,请撤回已发布的标语!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1466,6 +1466,117 @@ using APT.BaseData.Domain.Entities.T4;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Bititle-标语
|
||||
/// <summary>
|
||||
/// 标语
|
||||
/// </summary>
|
||||
[Route("api/PF/Bititle")]
|
||||
public partial class BititleController : AuthorizeApiController<T_PF_BITITLE>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_PF_BITITLE>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_PF_BITITLE>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_PF_BITITLE> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_PF_BITITLE> 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_PF_BITITLE entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_PF_BITITLE> 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_PF_BITITLE> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@ -466,7 +466,19 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
||||
dtSecrch = Convert.ToDateTime(dtSecrch.ToString("yyyy-MM-01 00:00:00"));
|
||||
dic.Add("@dtMin", dtSecrch.ToString("yyyy-MM-01 00:00:00"));
|
||||
dic.Add("@dtMax", dtSecrch.AddMonths(1).AddSeconds(-1));
|
||||
|
||||
Guid? OrgID = null;
|
||||
if (!string.IsNullOrEmpty(filter.Parameter2))
|
||||
{
|
||||
try
|
||||
{
|
||||
OrgID = new Guid(filter.Parameter2.Trim());
|
||||
}
|
||||
catch
|
||||
{
|
||||
OrgID = null;
|
||||
}
|
||||
}
|
||||
dic.Add("@OrgId", OrgID == null ? "" : OrgID.ToString());
|
||||
// 场次 人次
|
||||
//"文件学习", "日常培训", "专项培训"、三级安全教育
|
||||
string strConn = OPTenantDBConnService.GetConnByORGID(filter.OrgId.Value);
|
||||
@ -506,7 +518,7 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
||||
{
|
||||
if (item["NAME"].ToString() == listNAME[i])
|
||||
{
|
||||
Count += (int.Parse(item["YCount"].ToString()));
|
||||
Count += (int.Parse(item["RCount"].ToString()));
|
||||
}
|
||||
}
|
||||
MonthRecordCount.Add(Count);
|
||||
@ -516,7 +528,7 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
||||
{
|
||||
if (item["NAME"].ToString() == listNAME[i])
|
||||
{
|
||||
Count += (int.Parse(item["YCount"].ToString()));
|
||||
Count += (int.Parse(item["PCount"].ToString()));
|
||||
}
|
||||
}
|
||||
MonthPersonCount.Add(Count);
|
||||
@ -586,7 +598,7 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user