Compare commits
No commits in common. "c8769e0b27d708fa89dd3360a465da2efd6643a3" and "0eeb6b46336a8ecefb071ba9f600bf68a217df71" have entirely different histories.
c8769e0b27
...
0eeb6b4633
@ -1,66 +0,0 @@
|
|||||||
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,28 +216,4 @@ namespace APT.BaseData.Domain.Enums.PF
|
|||||||
Approve = 20,
|
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,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,66 +0,0 @@
|
|||||||
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,71 +12145,6 @@ namespace APT.Data.Migrations.Migrations
|
|||||||
b.ToTable("T_PF_APPROVE_TEMP_DETAIL");
|
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 =>
|
modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_BTN", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("ID")
|
b.Property<Guid>("ID")
|
||||||
@ -103316,25 +103251,6 @@ namespace APT.Data.Migrations.Migrations
|
|||||||
b.Navigation("Nav_Org");
|
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 =>
|
modelBuilder.Entity("APT.BaseData.Domain.Entities.T_PF_BTN", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
|
b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
|
||||||
|
|||||||
@ -16853,17 +16853,6 @@ 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_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);
|
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
|
#endregion
|
||||||
#region ClientScopes
|
#region ClientScopes
|
||||||
|
|||||||
@ -1,71 +0,0 @@
|
|||||||
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;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -466,19 +466,7 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
|||||||
dtSecrch = Convert.ToDateTime(dtSecrch.ToString("yyyy-MM-01 00:00:00"));
|
dtSecrch = Convert.ToDateTime(dtSecrch.ToString("yyyy-MM-01 00:00:00"));
|
||||||
dic.Add("@dtMin", 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));
|
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);
|
string strConn = OPTenantDBConnService.GetConnByORGID(filter.OrgId.Value);
|
||||||
@ -518,7 +506,7 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
|||||||
{
|
{
|
||||||
if (item["NAME"].ToString() == listNAME[i])
|
if (item["NAME"].ToString() == listNAME[i])
|
||||||
{
|
{
|
||||||
Count += (int.Parse(item["RCount"].ToString()));
|
Count += (int.Parse(item["YCount"].ToString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MonthRecordCount.Add(Count);
|
MonthRecordCount.Add(Count);
|
||||||
@ -528,7 +516,7 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
|||||||
{
|
{
|
||||||
if (item["NAME"].ToString() == listNAME[i])
|
if (item["NAME"].ToString() == listNAME[i])
|
||||||
{
|
{
|
||||||
Count += (int.Parse(item["PCount"].ToString()));
|
Count += (int.Parse(item["YCount"].ToString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MonthPersonCount.Add(Count);
|
MonthPersonCount.Add(Count);
|
||||||
@ -598,7 +586,7 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
|||||||
return result;
|
return result;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user