Merge branch 'master' of http://121.41.2.71:3000/wyw/mh_jy_safe
This commit is contained in:
commit
56709e04ff
@ -311,6 +311,12 @@ namespace APT.BaseData.Domain.Entities.FM
|
||||
|
||||
[Description("人员类别名称")]
|
||||
[DataFieldLength(50)]
|
||||
public string USER_TYPE_NAME { get; set; }
|
||||
public string USER_TYPE_NAME { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否接收短信
|
||||
/// </summary>
|
||||
[Description("是否接收短信")]
|
||||
public bool ISGETMSG { get; set; } = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -60,36 +60,76 @@ namespace APT.BaseData.Domain.Enums.PF
|
||||
/// </summary>
|
||||
public enum FilePathHead
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 金源
|
||||
/// </summary>
|
||||
[Description("00300000-0000-0000-0000-000000000000")]
|
||||
JY = 5,
|
||||
|
||||
JY = 3,
|
||||
/// <summary>
|
||||
/// 邦泰
|
||||
/// </summary>
|
||||
[Description("00500000-0000-0000-0000-000000000000")]
|
||||
BT = 5,
|
||||
|
||||
/// <summary>
|
||||
/// 路源
|
||||
/// </summary>
|
||||
[Description("01000000-0000-0000-0000-000000000000")]
|
||||
LY = 10,
|
||||
|
||||
/// <summary>
|
||||
/// 金能昆仑
|
||||
/// </summary>
|
||||
[Description("01500000-0000-0000-0000-000000000000")]
|
||||
JNKL = 15,
|
||||
|
||||
/// <summary>
|
||||
/// 西拓
|
||||
/// </summary>
|
||||
[Description("02000000-0000-0000-0000-000000000000")]
|
||||
XT = 20,
|
||||
/// <summary>
|
||||
/// 聚源
|
||||
/// </summary>
|
||||
[Description("02500000-0000-0000-0000-000000000000")]
|
||||
JUYUAN = 25,
|
||||
/// <summary>
|
||||
/// 彩宏
|
||||
/// </summary>
|
||||
[Description("03000000-0000-0000-0000-000000000000")]
|
||||
CH = 30,
|
||||
/// <summary>
|
||||
/// 鑫源
|
||||
/// </summary>
|
||||
[Description("03500000-0000-0000-0000-000000000000")]
|
||||
XY = 35,
|
||||
/// <summary>
|
||||
/// 天山
|
||||
/// </summary>
|
||||
[Description("04000000-0000-0000-0000-000000000000")]
|
||||
TS = 40,
|
||||
/// <summary>
|
||||
/// 嘉鑫
|
||||
/// </summary>
|
||||
[Description("04500000-0000-0000-0000-000000000000")]
|
||||
JX = 45,
|
||||
/// <summary>
|
||||
/// 硝尔库勒
|
||||
/// </summary>
|
||||
[Description("05000000-0000-0000-0000-000000000000")]
|
||||
XEKL = 50,
|
||||
/// <summary>
|
||||
/// 浩特元素
|
||||
/// </summary>
|
||||
[Description("05500000-0000-0000-0000-000000000000")]
|
||||
HTYS = 55,
|
||||
/// <summary>
|
||||
/// 兴泰
|
||||
/// </summary>
|
||||
[Description("06000000-0000-0000-0000-000000000000")]
|
||||
XINGTAI = 60,
|
||||
/// <summary>
|
||||
/// 宝硕
|
||||
/// </summary>
|
||||
[Description("06500000-0000-0000-0000-000000000000")]
|
||||
BS = 65,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -105,9 +105,9 @@ namespace APT.BaseData.Domain.IServices.FM
|
||||
List<T_FM_USER> GetDepPostUser(ref string Msg, Guid DEPARTMENT_ID, Guid POST_ID, bool IsOnly);
|
||||
|
||||
/// <summary>
|
||||
/// 找安环部人员
|
||||
/// 找安环部人员 默认 安环安全员
|
||||
/// </summary>
|
||||
/// <param name="UserType">1 NUM 从小到大 找第一个 2 NUM 找老大</param>
|
||||
/// <param name="UserType">1 NUM 从小到大 找第一个 10 NUM 找老大</param>
|
||||
/// <param name="ORG_ID">1</param>
|
||||
/// <returns></returns>
|
||||
T_FM_USER GetSafeApproveUser(Guid ORG_ID, int UserType = 1);
|
||||
|
||||
@ -463,24 +463,24 @@ namespace APT.BaseData.Services.Services.FM
|
||||
if (detail.APPROVE_USER_ID != null)
|
||||
appdetails.Add(detail);
|
||||
});
|
||||
appdetails.OrderBy(t => t.NUM);
|
||||
var loginUser = users.FirstOrDefault(t => t.ID == loginUserId);
|
||||
var departUser = this.GetEntity<T_FM_DEPARTMENT>(t => (t.USER_ID == loginUserId || t.CHARGEUSER_ID == loginUserId) && (t.NAME.Contains("安全环保") || t.NAME.Contains("安环部")));
|
||||
if (departUser != null || (loginUser.Nav_ApproveRole != null && loginUser.Nav_ApproveRole.NAME.Contains("安环部负责人")) || (loginUser.Nav_ApproveRole != null && loginUser.Nav_ApproveRole.NAME.Contains("安环部安全员")))
|
||||
{
|
||||
var tempSafeD = appdetails.FirstOrDefault(m => m.Nav_ApproveRole != null && m.Nav_ApproveRole.NAME.Contains("部门安全员"));
|
||||
var tempSafe = appdetails.FirstOrDefault(m => m.Nav_ApproveRole != null && m.Nav_ApproveRole.NAME.Contains("安环部安全员"));
|
||||
if (tempSafe != null && tempSafeD != null && appdetails.Count() > 1 && tempSafeD.APPROVE_USER_ID == tempSafe.APPROVE_USER_ID)
|
||||
{
|
||||
appdetails.Remove(tempSafe);
|
||||
}
|
||||
var tempChargeD = appdetails.FirstOrDefault(m => m.Nav_ApproveRole != null && m.Nav_ApproveRole.NAME.Contains("部门负责人"));
|
||||
var tempCharge = appdetails.FirstOrDefault(m => m.Nav_ApproveRole != null && m.Nav_ApproveRole.NAME.Contains("安环部负责人"));
|
||||
if (tempCharge != null && tempChargeD != null && appdetails.Count() > 1 && tempChargeD.APPROVE_USER_ID == tempCharge.APPROVE_USER_ID)
|
||||
{
|
||||
appdetails.Remove(tempCharge);
|
||||
}
|
||||
}
|
||||
appdetails = appdetails.OrderBy(t => t.NUM).GroupBy(m=>m.APPROVE_USER_ID).Select(n=>n.LastOrDefault()).ToList();
|
||||
//var loginUser = users.FirstOrDefault(t => t.ID == loginUserId);
|
||||
//var departUser = this.GetEntity<T_FM_DEPARTMENT>(t => (t.USER_ID == loginUserId || t.CHARGEUSER_ID == loginUserId) && (t.NAME.Contains("安全环保") || t.NAME.Contains("安环部")));
|
||||
//if (departUser != null || (loginUser.Nav_ApproveRole != null && loginUser.Nav_ApproveRole.NAME.Contains("安环部负责人")) || (loginUser.Nav_ApproveRole != null && loginUser.Nav_ApproveRole.NAME.Contains("安环部安全员")))
|
||||
//{
|
||||
// var tempSafeD = appdetails.FirstOrDefault(m => m.Nav_ApproveRole != null && m.Nav_ApproveRole.NAME.Contains("部门安全员"));
|
||||
// var tempSafe = appdetails.FirstOrDefault(m => m.Nav_ApproveRole != null && m.Nav_ApproveRole.NAME.Contains("安环部安全员"));
|
||||
// if (tempSafe != null && tempSafeD != null && appdetails.Count() > 1 && tempSafeD.APPROVE_USER_ID == tempSafe.APPROVE_USER_ID)
|
||||
// {
|
||||
// appdetails.Remove(tempSafe);
|
||||
// }
|
||||
// var tempChargeD = appdetails.FirstOrDefault(m => m.Nav_ApproveRole != null && m.Nav_ApproveRole.NAME.Contains("部门负责人"));
|
||||
// var tempCharge = appdetails.FirstOrDefault(m => m.Nav_ApproveRole != null && m.Nav_ApproveRole.NAME.Contains("安环部负责人"));
|
||||
// if (tempCharge != null && tempChargeD != null && appdetails.Count() > 1 && tempChargeD.APPROVE_USER_ID == tempCharge.APPROVE_USER_ID)
|
||||
// {
|
||||
// appdetails.Remove(tempCharge);
|
||||
// }
|
||||
//}
|
||||
appdetails.ForEach(i => i.Nav_ApproveRole = null);
|
||||
appdetails.Where(i => i.NUM == appdetails.Min(x => x.NUM)).ForEach(i => i.IS_CURRENT = true);
|
||||
|
||||
@ -1572,7 +1572,50 @@ namespace APT.BaseData.Services.Services.FM
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据部门树查找审核人(新)去除层级
|
||||
/// </summary>
|
||||
/// <param name="approveDetails"></param>
|
||||
/// <param name="approveNode"></param>
|
||||
/// <returns></returns>
|
||||
private Guid? GetApproveUserNew(T_PF_APPROVE_TEMP_DETAIL approveTempDetail, List<T_FM_USER> users, List<T_FM_DEPARTMENT> departs, Guid loginUserId)
|
||||
{
|
||||
Guid? approveId = null;
|
||||
var user = users.FirstOrDefault(t => t.ID == loginUserId);
|
||||
var approveIds = users.Where(x => x.APPROVE_ROLE_ID == approveTempDetail.APPROVE_ROLE_ID).Select(t => t.ID).ToList();
|
||||
if (approveIds.Count() == 0)
|
||||
{
|
||||
//当前审批节点未配人员,返回Null
|
||||
return approveId;
|
||||
}
|
||||
else if (approveIds.Count() == 1)
|
||||
{
|
||||
//当前节点只有一个人
|
||||
approveId = approveIds.FirstOrDefault();
|
||||
}
|
||||
else
|
||||
{
|
||||
//当前节点很多人,按当前登录人的层级及上级组织,只会取到一个
|
||||
if (user.DEPARTMENT_ID != null)
|
||||
{
|
||||
List<Guid> departmentIds = new List<Guid>();
|
||||
GetDepartmentId((Guid)user.DEPARTMENT_ID, ref departmentIds);
|
||||
if (departmentIds.Any())
|
||||
{
|
||||
var userTemp = users.FirstOrDefault(x => x.DEPARTMENT_ID!=null && x.APPROVE_ROLE_ID == approveTempDetail.APPROVE_ROLE_ID && departmentIds.Contains((Guid)x.DEPARTMENT_ID) && approveIds.Contains(x.ID));
|
||||
if (userTemp != null)
|
||||
{
|
||||
approveId = userTemp.ID;
|
||||
}
|
||||
else
|
||||
{
|
||||
return approveId;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return approveId;
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据部门树查找审核人
|
||||
/// </summary>
|
||||
@ -1582,7 +1625,37 @@ namespace APT.BaseData.Services.Services.FM
|
||||
private Guid? GetApproveUser(T_PF_APPROVE_TEMP_DETAIL approveTempDetail, List<T_FM_USER> users, Guid loginUserId)
|
||||
{
|
||||
Guid? approveId = null;
|
||||
if (approveTempDetail.DEPARTMENT_TYPE == (int)FMDepartmentType.Company)
|
||||
var approveRole = this.GetEntity<T_PF_APPROVAL_ROLE>(t => t.ID == approveTempDetail.APPROVE_ROLE_ID);
|
||||
if (approveRole != null && approveRole.NAME == "分管领导")
|
||||
{
|
||||
var user = users.FirstOrDefault(t => t.ID == loginUserId);
|
||||
if (user.DEPARTMENT_ID != null)
|
||||
{
|
||||
List<Guid> departmentIds = new List<Guid>();
|
||||
GetDepartmentId((Guid)user.DEPARTMENT_ID, ref departmentIds);
|
||||
if (departmentIds.Any())
|
||||
{
|
||||
var dep = GetEntity<T_FM_DEPARTMENT>(t => departmentIds.Contains(t.ID) && t.DEPARTMENT_TYPE == approveRole.DEPARTMENT_TYPE);
|
||||
if (dep != null && dep.CHARGEUSER_ID != null)
|
||||
{
|
||||
approveId = dep.CHARGEUSER_ID;
|
||||
}
|
||||
else
|
||||
{
|
||||
return approveId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return approveId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return approveId;
|
||||
}
|
||||
}
|
||||
else if (approveTempDetail.DEPARTMENT_TYPE == (int)FMDepartmentType.Company)
|
||||
{
|
||||
var approveIds = users.Where(x => x.APPROVE_ROLE_ID == approveTempDetail.APPROVE_ROLE_ID).Select(t => t.ID).ToList();
|
||||
if (approveIds.Count() == 0)
|
||||
|
||||
@ -997,7 +997,7 @@ namespace APT.BaseData.Services.Services.FM
|
||||
#region 找安环部人员
|
||||
|
||||
/// <summary>
|
||||
/// 找安环部人员
|
||||
/// 找安环部人员 默认 安环安全员
|
||||
/// </summary>
|
||||
/// <param name="UserType">1 NUM 从小到大 找第一个 10 NUM 找老大</param>
|
||||
/// <param name="ORG_ID">1</param>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
136509
APT.Data.Migrations/Migrations/20251201125645_wyw2025120101.Designer.cs
generated
Normal file
136509
APT.Data.Migrations/Migrations/20251201125645_wyw2025120101.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,34 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace APT.Data.Migrations.Migrations
|
||||
{
|
||||
public partial class wyw2025120101 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SE_NEW_USER_DETAIL_NEXT_DEPARTMENT_ID",
|
||||
table: "T_SE_NEW_USER_DETAIL",
|
||||
column: "NEXT_DEPARTMENT_ID");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_T_SE_NEW_USER_DETAIL_T_FM_DEPARTMENT_NEXT_DEPARTMENT_ID",
|
||||
table: "T_SE_NEW_USER_DETAIL",
|
||||
column: "NEXT_DEPARTMENT_ID",
|
||||
principalTable: "T_FM_DEPARTMENT",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_T_SE_NEW_USER_DETAIL_T_FM_DEPARTMENT_NEXT_DEPARTMENT_ID",
|
||||
table: "T_SE_NEW_USER_DETAIL");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_T_SE_NEW_USER_DETAIL_NEXT_DEPARTMENT_ID",
|
||||
table: "T_SE_NEW_USER_DETAIL");
|
||||
}
|
||||
}
|
||||
}
|
||||
136691
APT.Data.Migrations/Migrations/20251203153918_hmr2025120301.Designer.cs
generated
Normal file
136691
APT.Data.Migrations/Migrations/20251203153918_hmr2025120301.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
244
APT.Data.Migrations/Migrations/20251203153918_hmr2025120301.cs
Normal file
244
APT.Data.Migrations/Migrations/20251203153918_hmr2025120301.cs
Normal file
@ -0,0 +1,244 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace APT.Data.Migrations.Migrations
|
||||
{
|
||||
public partial class hmr2025120301 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_T_FM_USER_POST_POST_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_T_FM_USER_POST_POST_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "POST_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST",
|
||||
newName: "DEPARTMENT_ID");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_POST_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST",
|
||||
newName: "IX_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DEPARTMENT_ID");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "POST_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST",
|
||||
newName: "DEPARTMENT_ID");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_POST_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST",
|
||||
newName: "IX_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DEPARTMENT_ID");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "DEPARTMENT_TYPE",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "DEPARTMENT_TYPE",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL",
|
||||
columns: table => new
|
||||
{
|
||||
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
RISK_IDENTIFY_DETAIL_RESULT_POST_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
POST_ID = 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_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL", x => x.ID);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL_T_FM_ORGANIZATION_ORG_ID",
|
||||
column: x => x.ORG_ID,
|
||||
principalTable: "T_FM_ORGANIZATION",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL_T_FM_USER_POST_POST_ID",
|
||||
column: x => x.POST_ID,
|
||||
principalTable: "T_FM_USER_POST",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_RISK_IDENTIFY_DETAIL_RESULT_POST_ID",
|
||||
column: x => x.RISK_IDENTIFY_DETAIL_RESULT_POST_ID,
|
||||
principalTable: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL",
|
||||
columns: table => new
|
||||
{
|
||||
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
IDENTIFY_RESULT_SUMMARY_POST_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
POST_ID = 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_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL", x => x.ID);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL_T_FM_ORGANIZATION_ORG_ID",
|
||||
column: x => x.ORG_ID,
|
||||
principalTable: "T_FM_ORGANIZATION",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL_T_FM_USER_POST_POST_ID",
|
||||
column: x => x.POST_ID,
|
||||
principalTable: "T_FM_USER_POST",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_IDENTIFY_RESULT_SUMMARY_POST_ID",
|
||||
column: x => x.IDENTIFY_RESULT_SUMMARY_POST_ID,
|
||||
principalTable: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL_ORG_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL",
|
||||
column: "ORG_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL_POST_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL",
|
||||
column: "POST_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL_RISK_IDENTIFY_DETAIL_RESULT_POST_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL",
|
||||
column: "RISK_IDENTIFY_DETAIL_RESULT_POST_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL_IDENTIFY_RESULT_SUMMARY_POST_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL",
|
||||
column: "IDENTIFY_RESULT_SUMMARY_POST_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL_ORG_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL",
|
||||
column: "ORG_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL_POST_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL",
|
||||
column: "POST_ID");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_T_FM_DEPARTMENT_DEPARTMENT_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST",
|
||||
column: "DEPARTMENT_ID",
|
||||
principalTable: "T_FM_DEPARTMENT",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_T_FM_DEPARTMENT_DEPARTMENT_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST",
|
||||
column: "DEPARTMENT_ID",
|
||||
principalTable: "T_FM_DEPARTMENT",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_T_FM_DEPARTMENT_DEPARTMENT_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_T_FM_DEPARTMENT_DEPARTMENT_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DEPARTMENT_TYPE",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DEPARTMENT_TYPE",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "DEPARTMENT_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST",
|
||||
newName: "POST_ID");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DEPARTMENT_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST",
|
||||
newName: "IX_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_POST_ID");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "DEPARTMENT_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST",
|
||||
newName: "POST_ID");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DEPARTMENT_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST",
|
||||
newName: "IX_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_POST_ID");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_T_FM_USER_POST_POST_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST",
|
||||
column: "POST_ID",
|
||||
principalTable: "T_FM_USER_POST",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_T_FM_USER_POST_POST_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST",
|
||||
column: "POST_ID",
|
||||
principalTable: "T_FM_USER_POST",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
136949
APT.Data.Migrations/Migrations/20251205141546_hmr2025120501.Designer.cs
generated
Normal file
136949
APT.Data.Migrations/Migrations/20251205141546_hmr2025120501.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
194
APT.Data.Migrations/Migrations/20251205141546_hmr2025120501.cs
Normal file
194
APT.Data.Migrations/Migrations/20251205141546_hmr2025120501.cs
Normal file
@ -0,0 +1,194 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace APT.Data.Migrations.Migrations
|
||||
{
|
||||
public partial class hmr2025120501 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "T_FO_TECH_DISCLOSURE_FILE",
|
||||
columns: table => new
|
||||
{
|
||||
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TECH_DISCLOSURE_FROM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
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_FO_TECH_DISCLOSURE_FILE", x => x.ID);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_FO_TECH_DISCLOSURE_FILE_T_FM_ORGANIZATION_ORG_ID",
|
||||
column: x => x.ORG_ID,
|
||||
principalTable: "T_FM_ORGANIZATION",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_FO_TECH_DISCLOSURE_FILE_T_FO_TECH_DISCLOSURE_FROM_TECH_DISCLOSURE_FROM_ID",
|
||||
column: x => x.TECH_DISCLOSURE_FROM_ID,
|
||||
principalTable: "T_FO_TECH_DISCLOSURE_FROM",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_FO_TECH_DISCLOSURE_FILE_T_PF_IMG_FILE_IMG_FILE_ID",
|
||||
column: x => x.IMG_FILE_ID,
|
||||
principalTable: "T_PF_IMG_FILE",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "T_FO_TECH_DISCLOSURE_FROM_SAFE_FILE",
|
||||
columns: table => new
|
||||
{
|
||||
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TECH_DISCLOSURE_FROM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
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_FO_TECH_DISCLOSURE_FROM_SAFE_FILE", x => x.ID);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_FO_TECH_DISCLOSURE_FROM_SAFE_FILE_T_FM_ORGANIZATION_ORG_ID",
|
||||
column: x => x.ORG_ID,
|
||||
principalTable: "T_FM_ORGANIZATION",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_FO_TECH_DISCLOSURE_FROM_SAFE_FILE_T_FO_TECH_DISCLOSURE_FROM_SAFE_TECH_DISCLOSURE_FROM_ID",
|
||||
column: x => x.TECH_DISCLOSURE_FROM_ID,
|
||||
principalTable: "T_FO_TECH_DISCLOSURE_FROM_SAFE",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_FO_TECH_DISCLOSURE_FROM_SAFE_FILE_T_PF_IMG_FILE_IMG_FILE_ID",
|
||||
column: x => x.IMG_FILE_ID,
|
||||
principalTable: "T_PF_IMG_FILE",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "T_FO_TECH_DISCLOSURE_FROM_TECH_FILE",
|
||||
columns: table => new
|
||||
{
|
||||
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TECH_DISCLOSURE_FROM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
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_FO_TECH_DISCLOSURE_FROM_TECH_FILE", x => x.ID);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_FO_TECH_DISCLOSURE_FROM_TECH_FILE_T_FM_ORGANIZATION_ORG_ID",
|
||||
column: x => x.ORG_ID,
|
||||
principalTable: "T_FM_ORGANIZATION",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_FO_TECH_DISCLOSURE_FROM_TECH_FILE_T_FO_TECH_DISCLOSURE_FROM_TECH_TECH_DISCLOSURE_FROM_ID",
|
||||
column: x => x.TECH_DISCLOSURE_FROM_ID,
|
||||
principalTable: "T_FO_TECH_DISCLOSURE_FROM_TECH",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_FO_TECH_DISCLOSURE_FROM_TECH_FILE_T_PF_IMG_FILE_IMG_FILE_ID",
|
||||
column: x => x.IMG_FILE_ID,
|
||||
principalTable: "T_PF_IMG_FILE",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_FO_TECH_DISCLOSURE_FILE_IMG_FILE_ID",
|
||||
table: "T_FO_TECH_DISCLOSURE_FILE",
|
||||
column: "IMG_FILE_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_FO_TECH_DISCLOSURE_FILE_ORG_ID",
|
||||
table: "T_FO_TECH_DISCLOSURE_FILE",
|
||||
column: "ORG_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_FO_TECH_DISCLOSURE_FILE_TECH_DISCLOSURE_FROM_ID",
|
||||
table: "T_FO_TECH_DISCLOSURE_FILE",
|
||||
column: "TECH_DISCLOSURE_FROM_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_FO_TECH_DISCLOSURE_FROM_SAFE_FILE_IMG_FILE_ID",
|
||||
table: "T_FO_TECH_DISCLOSURE_FROM_SAFE_FILE",
|
||||
column: "IMG_FILE_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_FO_TECH_DISCLOSURE_FROM_SAFE_FILE_ORG_ID",
|
||||
table: "T_FO_TECH_DISCLOSURE_FROM_SAFE_FILE",
|
||||
column: "ORG_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_FO_TECH_DISCLOSURE_FROM_SAFE_FILE_TECH_DISCLOSURE_FROM_ID",
|
||||
table: "T_FO_TECH_DISCLOSURE_FROM_SAFE_FILE",
|
||||
column: "TECH_DISCLOSURE_FROM_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_FO_TECH_DISCLOSURE_FROM_TECH_FILE_IMG_FILE_ID",
|
||||
table: "T_FO_TECH_DISCLOSURE_FROM_TECH_FILE",
|
||||
column: "IMG_FILE_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_FO_TECH_DISCLOSURE_FROM_TECH_FILE_ORG_ID",
|
||||
table: "T_FO_TECH_DISCLOSURE_FROM_TECH_FILE",
|
||||
column: "ORG_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_FO_TECH_DISCLOSURE_FROM_TECH_FILE_TECH_DISCLOSURE_FROM_ID",
|
||||
table: "T_FO_TECH_DISCLOSURE_FROM_TECH_FILE",
|
||||
column: "TECH_DISCLOSURE_FROM_ID");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_FO_TECH_DISCLOSURE_FILE");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_FO_TECH_DISCLOSURE_FROM_SAFE_FILE");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_FO_TECH_DISCLOSURE_FROM_TECH_FILE");
|
||||
}
|
||||
}
|
||||
}
|
||||
136984
APT.Data.Migrations/Migrations/20251206043336_hmr2025120601.Designer.cs
generated
Normal file
136984
APT.Data.Migrations/Migrations/20251206043336_hmr2025120601.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
125
APT.Data.Migrations/Migrations/20251206043336_hmr2025120601.cs
Normal file
125
APT.Data.Migrations/Migrations/20251206043336_hmr2025120601.cs
Normal file
@ -0,0 +1,125 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace APT.Data.Migrations.Migrations
|
||||
{
|
||||
public partial class hmr2025120601 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "USER_ID",
|
||||
table: "T_FO_SCHEDULING",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true,
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uniqueidentifier");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "CLASS_ID",
|
||||
table: "T_FO_SCHEDULING",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "DRIVER_ID",
|
||||
table: "T_FO_SCHEDULING",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "TECH_ID",
|
||||
table: "T_FO_SCHEDULING",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_FO_SCHEDULING_CLASS_ID",
|
||||
table: "T_FO_SCHEDULING",
|
||||
column: "CLASS_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_FO_SCHEDULING_DRIVER_ID",
|
||||
table: "T_FO_SCHEDULING",
|
||||
column: "DRIVER_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_FO_SCHEDULING_TECH_ID",
|
||||
table: "T_FO_SCHEDULING",
|
||||
column: "TECH_ID");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_T_FO_SCHEDULING_T_FM_CLASS_CLASS_ID",
|
||||
table: "T_FO_SCHEDULING",
|
||||
column: "CLASS_ID",
|
||||
principalTable: "T_FM_CLASS",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_T_FO_SCHEDULING_T_FM_USER_DRIVER_ID",
|
||||
table: "T_FO_SCHEDULING",
|
||||
column: "DRIVER_ID",
|
||||
principalTable: "T_FM_USER",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_T_FO_SCHEDULING_T_FM_USER_TECH_ID",
|
||||
table: "T_FO_SCHEDULING",
|
||||
column: "TECH_ID",
|
||||
principalTable: "T_FM_USER",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_T_FO_SCHEDULING_T_FM_CLASS_CLASS_ID",
|
||||
table: "T_FO_SCHEDULING");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_T_FO_SCHEDULING_T_FM_USER_DRIVER_ID",
|
||||
table: "T_FO_SCHEDULING");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_T_FO_SCHEDULING_T_FM_USER_TECH_ID",
|
||||
table: "T_FO_SCHEDULING");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_T_FO_SCHEDULING_CLASS_ID",
|
||||
table: "T_FO_SCHEDULING");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_T_FO_SCHEDULING_DRIVER_ID",
|
||||
table: "T_FO_SCHEDULING");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_T_FO_SCHEDULING_TECH_ID",
|
||||
table: "T_FO_SCHEDULING");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CLASS_ID",
|
||||
table: "T_FO_SCHEDULING");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DRIVER_ID",
|
||||
table: "T_FO_SCHEDULING");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TECH_ID",
|
||||
table: "T_FO_SCHEDULING");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "USER_ID",
|
||||
table: "T_FO_SCHEDULING",
|
||||
type: "uniqueidentifier",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uniqueidentifier",
|
||||
oldNullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
136988
APT.Data.Migrations/Migrations/20251206092548_hmr2025120602.Designer.cs
generated
Normal file
136988
APT.Data.Migrations/Migrations/20251206092548_hmr2025120602.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,46 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace APT.Data.Migrations.Migrations
|
||||
{
|
||||
public partial class hmr2025120602 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "PHONE",
|
||||
table: "T_FO_SCHEDULING",
|
||||
type: "nvarchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(500)",
|
||||
oldMaxLength: 500,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "REMARK",
|
||||
table: "T_FO_SCHEDULING",
|
||||
type: "nvarchar(500)",
|
||||
maxLength: 500,
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "REMARK",
|
||||
table: "T_FO_SCHEDULING");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "PHONE",
|
||||
table: "T_FO_SCHEDULING",
|
||||
type: "nvarchar(500)",
|
||||
maxLength: 500,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(50)",
|
||||
oldMaxLength: 50,
|
||||
oldNullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
136996
APT.Data.Migrations/Migrations/20251207110557_hmr2025120701.Designer.cs
generated
Normal file
136996
APT.Data.Migrations/Migrations/20251207110557_hmr2025120701.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace APT.Data.Migrations.Migrations
|
||||
{
|
||||
public partial class hmr2025120701 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IS_AUTO",
|
||||
table: "T_SK_CHECK_SET",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IS_HOLIDAY",
|
||||
table: "T_FO_FIRE_JOB_WB",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IS_HOLIDAY",
|
||||
table: "T_FO_FIRE_JOB",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "NEXT_CLASS_TEAM_ID",
|
||||
table: "T_FO_CURRENT_CLASS_RECORD",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true,
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uniqueidentifier");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "CLASS_TEAM_ID",
|
||||
table: "T_FO_CURRENT_CLASS_RECORD",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true,
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uniqueidentifier");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IS_AUTO",
|
||||
table: "T_SK_CHECK_SET");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IS_HOLIDAY",
|
||||
table: "T_FO_FIRE_JOB_WB");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IS_HOLIDAY",
|
||||
table: "T_FO_FIRE_JOB");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "NEXT_CLASS_TEAM_ID",
|
||||
table: "T_FO_CURRENT_CLASS_RECORD",
|
||||
type: "uniqueidentifier",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uniqueidentifier",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "CLASS_TEAM_ID",
|
||||
table: "T_FO_CURRENT_CLASS_RECORD",
|
||||
type: "uniqueidentifier",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uniqueidentifier",
|
||||
oldNullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
137040
APT.Data.Migrations/Migrations/20251210082458_hmr2025121001.Designer.cs
generated
Normal file
137040
APT.Data.Migrations/Migrations/20251210082458_hmr2025121001.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
133
APT.Data.Migrations/Migrations/20251210082458_hmr2025121001.cs
Normal file
133
APT.Data.Migrations/Migrations/20251210082458_hmr2025121001.cs
Normal file
@ -0,0 +1,133 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace APT.Data.Migrations.Migrations
|
||||
{
|
||||
public partial class hmr2025121001 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "NOTICE_CODE",
|
||||
table: "T_SK_SECURITY_INSPECTION_RECORD_SUMMARY",
|
||||
type: "nvarchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "NOTICE_CODE",
|
||||
table: "T_SK_SECURITY_INSPECTION_RECORD",
|
||||
type: "nvarchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "NOTICE_CODE",
|
||||
table: "T_SK_SECURITY_INSPECTION_NOTICE",
|
||||
type: "nvarchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "NOTICE_CODE",
|
||||
table: "T_SK_HIDDEN_DANGER_REPORT",
|
||||
type: "nvarchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "NOTICE_CODE",
|
||||
table: "T_SK_HIDDEN_DANGER_RECTIFY_RECORD",
|
||||
type: "nvarchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "NOTICE_CODE",
|
||||
table: "T_SK_HIDDEN_DANGER_RECTIFY_NOTICE",
|
||||
type: "nvarchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "NOTICE_CODE",
|
||||
table: "T_SK_HIDDEN_DANGER_HAND_REPORT",
|
||||
type: "nvarchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "NOTICE_CODE",
|
||||
table: "T_SK_HIDDEN_DANGER_CONFIRM",
|
||||
type: "nvarchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "FIRE_JOB_ID",
|
||||
table: "T_FO_TECH_DISCLOSURE_FROM_SAFE",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_FO_TECH_DISCLOSURE_FROM_SAFE_FIRE_JOB_ID",
|
||||
table: "T_FO_TECH_DISCLOSURE_FROM_SAFE",
|
||||
column: "FIRE_JOB_ID");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_T_FO_TECH_DISCLOSURE_FROM_SAFE_T_FO_FIRE_JOB_FIRE_JOB_ID",
|
||||
table: "T_FO_TECH_DISCLOSURE_FROM_SAFE",
|
||||
column: "FIRE_JOB_ID",
|
||||
principalTable: "T_FO_FIRE_JOB",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_T_FO_TECH_DISCLOSURE_FROM_SAFE_T_FO_FIRE_JOB_FIRE_JOB_ID",
|
||||
table: "T_FO_TECH_DISCLOSURE_FROM_SAFE");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_T_FO_TECH_DISCLOSURE_FROM_SAFE_FIRE_JOB_ID",
|
||||
table: "T_FO_TECH_DISCLOSURE_FROM_SAFE");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "NOTICE_CODE",
|
||||
table: "T_SK_SECURITY_INSPECTION_RECORD_SUMMARY");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "NOTICE_CODE",
|
||||
table: "T_SK_SECURITY_INSPECTION_RECORD");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "NOTICE_CODE",
|
||||
table: "T_SK_SECURITY_INSPECTION_NOTICE");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "NOTICE_CODE",
|
||||
table: "T_SK_HIDDEN_DANGER_REPORT");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "NOTICE_CODE",
|
||||
table: "T_SK_HIDDEN_DANGER_RECTIFY_RECORD");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "NOTICE_CODE",
|
||||
table: "T_SK_HIDDEN_DANGER_RECTIFY_NOTICE");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "NOTICE_CODE",
|
||||
table: "T_SK_HIDDEN_DANGER_HAND_REPORT");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "NOTICE_CODE",
|
||||
table: "T_SK_HIDDEN_DANGER_CONFIRM");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "FIRE_JOB_ID",
|
||||
table: "T_FO_TECH_DISCLOSURE_FROM_SAFE");
|
||||
}
|
||||
}
|
||||
}
|
||||
137043
APT.Data.Migrations/Migrations/20251218062611_wyw2025121801.Designer.cs
generated
Normal file
137043
APT.Data.Migrations/Migrations/20251218062611_wyw2025121801.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,24 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace APT.Data.Migrations.Migrations
|
||||
{
|
||||
public partial class wyw2025121801 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "ISGETMSG",
|
||||
table: "T_FM_USER",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ISGETMSG",
|
||||
table: "T_FM_USER");
|
||||
}
|
||||
}
|
||||
}
|
||||
137122
APT.Data.Migrations/Migrations/20251219062203_wyw2025121901.Designer.cs
generated
Normal file
137122
APT.Data.Migrations/Migrations/20251219062203_wyw2025121901.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
107
APT.Data.Migrations/Migrations/20251219062203_wyw2025121901.cs
Normal file
107
APT.Data.Migrations/Migrations/20251219062203_wyw2025121901.cs
Normal file
@ -0,0 +1,107 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace APT.Data.Migrations.Migrations
|
||||
{
|
||||
public partial class wyw2025121901 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TEACHER",
|
||||
table: "T_SE_NEW_USERS");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TRAIN_MODEL",
|
||||
table: "T_SE_NEW_USERS");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "TRAINTYPE",
|
||||
table: "T_SE_NEW_USERS",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "T_SE_NEW_USERS_TEACHER",
|
||||
columns: table => new
|
||||
{
|
||||
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
NEW_USERS_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
USER_ID = 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_SE_NEW_USERS_TEACHER", x => x.ID);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SE_NEW_USERS_TEACHER_T_FM_ORGANIZATION_ORG_ID",
|
||||
column: x => x.ORG_ID,
|
||||
principalTable: "T_FM_ORGANIZATION",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SE_NEW_USERS_TEACHER_T_FM_USER_USER_ID",
|
||||
column: x => x.USER_ID,
|
||||
principalTable: "T_FM_USER",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SE_NEW_USERS_TEACHER_T_SE_NEW_USERS_NEW_USERS_ID",
|
||||
column: x => x.NEW_USERS_ID,
|
||||
principalTable: "T_SE_NEW_USERS",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SE_NEW_USERS_TEACHER_NEW_USERS_ID",
|
||||
table: "T_SE_NEW_USERS_TEACHER",
|
||||
column: "NEW_USERS_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SE_NEW_USERS_TEACHER_ORG_ID",
|
||||
table: "T_SE_NEW_USERS_TEACHER",
|
||||
column: "ORG_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SE_NEW_USERS_TEACHER_USER_ID",
|
||||
table: "T_SE_NEW_USERS_TEACHER",
|
||||
column: "USER_ID");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_SE_NEW_USERS_TEACHER");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TRAINTYPE",
|
||||
table: "T_SE_NEW_USERS");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "TEACHER",
|
||||
table: "T_SE_NEW_USERS",
|
||||
type: "nvarchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "TRAIN_MODEL",
|
||||
table: "T_SE_NEW_USERS",
|
||||
type: "nvarchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
137122
APT.Data.Migrations/Migrations/20251219071541_wyw2025121902.Designer.cs
generated
Normal file
137122
APT.Data.Migrations/Migrations/20251219071541_wyw2025121902.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,31 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace APT.Data.Migrations.Migrations
|
||||
{
|
||||
public partial class wyw2025121902 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "TRAINTYPE",
|
||||
table: "T_SE_NEW_USERS",
|
||||
type: "int",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "TRAINTYPE",
|
||||
table: "T_SE_NEW_USERS",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int",
|
||||
oldNullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
137231
APT.Data.Migrations/Migrations/20251219081742_wyw2025121903.Designer.cs
generated
Normal file
137231
APT.Data.Migrations/Migrations/20251219081742_wyw2025121903.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
108
APT.Data.Migrations/Migrations/20251219081742_wyw2025121903.cs
Normal file
108
APT.Data.Migrations/Migrations/20251219081742_wyw2025121903.cs
Normal file
@ -0,0 +1,108 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace APT.Data.Migrations.Migrations
|
||||
{
|
||||
public partial class wyw2025121903 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "TEXT_ID",
|
||||
table: "T_SE_NEW_USER_DETAIL_PAPER",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "T_SE_NEW_USER_DETAIL_TEXT",
|
||||
columns: table => new
|
||||
{
|
||||
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
RECORD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
SCORE = table.Column<int>(type: "int", nullable: true),
|
||||
TEXT_TIMES = table.Column<int>(type: "int", nullable: false),
|
||||
ISPASS = table.Column<bool>(type: "bit", nullable: false),
|
||||
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_NEW_USER_DETAIL_TEXT", x => x.ID);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SE_NEW_USER_DETAIL_TEXT_T_FM_ORGANIZATION_ORG_ID",
|
||||
column: x => x.ORG_ID,
|
||||
principalTable: "T_FM_ORGANIZATION",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SE_NEW_USER_DETAIL_TEXT_T_FM_USER_USER_ID",
|
||||
column: x => x.USER_ID,
|
||||
principalTable: "T_FM_USER",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SE_NEW_USER_DETAIL_TEXT_T_SE_NEW_USER_DETAIL_RECORD_ID",
|
||||
column: x => x.RECORD_ID,
|
||||
principalTable: "T_SE_NEW_USER_DETAIL",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SE_NEW_USER_DETAIL_PAPER_TEXT_ID",
|
||||
table: "T_SE_NEW_USER_DETAIL_PAPER",
|
||||
column: "TEXT_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SE_NEW_USER_DETAIL_TEXT_ORG_ID",
|
||||
table: "T_SE_NEW_USER_DETAIL_TEXT",
|
||||
column: "ORG_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SE_NEW_USER_DETAIL_TEXT_RECORD_ID",
|
||||
table: "T_SE_NEW_USER_DETAIL_TEXT",
|
||||
column: "RECORD_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SE_NEW_USER_DETAIL_TEXT_USER_ID",
|
||||
table: "T_SE_NEW_USER_DETAIL_TEXT",
|
||||
column: "USER_ID");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_T_SE_NEW_USER_DETAIL_PAPER_T_SE_NEW_USER_DETAIL_TEXT_TEXT_ID",
|
||||
table: "T_SE_NEW_USER_DETAIL_PAPER",
|
||||
column: "TEXT_ID",
|
||||
principalTable: "T_SE_NEW_USER_DETAIL_TEXT",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_T_SE_NEW_USER_DETAIL_PAPER_T_SE_NEW_USER_DETAIL_TEXT_TEXT_ID",
|
||||
table: "T_SE_NEW_USER_DETAIL_PAPER");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_SE_NEW_USER_DETAIL_TEXT");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_T_SE_NEW_USER_DETAIL_PAPER_TEXT_ID",
|
||||
table: "T_SE_NEW_USER_DETAIL_PAPER");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TEXT_ID",
|
||||
table: "T_SE_NEW_USER_DETAIL_PAPER");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -2114,8 +2114,12 @@ builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_Tech).WithMany().HasForeignKey(t => t.TECH_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_Driver).WithMany().HasForeignKey(t => t.DRIVER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Property(t => t.WEEK).HasMaxLength(500);
|
||||
builder.Property(t => t.PHONE).HasMaxLength(500);
|
||||
builder.Property(t => t.PHONE).HasMaxLength(50);
|
||||
builder.HasOne(t => t.Nav_Class).WithMany().HasForeignKey(t => t.CLASS_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Property(t => t.REMARK).HasMaxLength(500);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@ -2195,6 +2199,17 @@ builder.Property(t => t.SLOGAN).HasMaxLength(500);
|
||||
builder.Property(t => t.SAFETY_OATH).HasMaxLength(2000);
|
||||
builder.Property(t => t.LOCATION).HasMaxLength(500);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region TechDisclosureFile
|
||||
public partial class FOTechDisclosureFileMap :APTEntityBaseMap<T_FO_TECH_DISCLOSURE_FILE>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_FO_TECH_DISCLOSURE_FILE> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_TechDisclosure).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.TECH_DISCLOSURE_FROM_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region TechDisclosureFrom
|
||||
@ -2230,6 +2245,18 @@ builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelet
|
||||
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Property(t => t.DisclosureContent).HasMaxLength(2000);
|
||||
builder.Ignore(t => t.PUBLISH);
|
||||
builder.HasOne(t => t.Nav_Job).WithMany().HasForeignKey(t => t.FIRE_JOB_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region TechDisclosureFromSafeFile
|
||||
public partial class FOTechDisclosureFromSafeFileMap :APTEntityBaseMap<T_FO_TECH_DISCLOSURE_FROM_SAFE_FILE>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_FO_TECH_DISCLOSURE_FROM_SAFE_FILE> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_TechDisclosure).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.TECH_DISCLOSURE_FROM_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@ -2259,6 +2286,17 @@ builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT
|
||||
builder.Property(t => t.DisclosureContent).HasMaxLength(2000);
|
||||
builder.Ignore(t => t.PUBLISH);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region TechDisclosureFromTechFile
|
||||
public partial class FOTechDisclosureFromTechFileMap :APTEntityBaseMap<T_FO_TECH_DISCLOSURE_FROM_TECH_FILE>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_FO_TECH_DISCLOSURE_FROM_TECH_FILE> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_TechDisclosure).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.TECH_DISCLOSURE_FROM_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region TechDisclosureFromTechPerson
|
||||
@ -10209,8 +10247,6 @@ builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).
|
||||
base.Configure(builder);
|
||||
builder.Property(t => t.TAINNING_ADDR).HasMaxLength(100);
|
||||
builder.Property(t => t.TRAINNING_TIME).HasMaxLength(10);
|
||||
builder.Property(t => t.TEACHER).HasMaxLength(50);
|
||||
builder.Property(t => t.TRAIN_MODEL).HasMaxLength(50);
|
||||
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_Content).WithMany().HasForeignKey(t => t.CONTENT_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
@ -10245,6 +10281,7 @@ builder.HasOne(t => t.Nav_Post).WithMany().HasForeignKey(t => t.USER_POST_ID).On
|
||||
builder.Property(t => t.SCORE).HasMaxLength(10);
|
||||
builder.Ignore(t => t.PUBLISH);
|
||||
builder.Ignore(t => t.IS_OVERTIME);
|
||||
builder.HasOne(t => t.Nav_DepartmentNext).WithMany().HasForeignKey(t => t.NEXT_DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@ -10266,6 +10303,7 @@ builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_Record).WithMany(t=>t.Nav_Papers).HasForeignKey(t => t.RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_Text).WithMany(t=>t.Nav_ListPaper).HasForeignKey(t => t.TEXT_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_Test).WithMany().HasForeignKey(t => t.TEST_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
@ -10754,6 +10792,28 @@ builder.HasIndex("NAME").IsUnique();
|
||||
{
|
||||
base.Configure(builder);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region NewUsersTeacher
|
||||
public partial class SENewUsersTeacherMap :APTEntityBaseMap<T_SE_NEW_USERS_TEACHER>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_SE_NEW_USERS_TEACHER> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_Users).WithMany(t=>t.Nav_Teachers).HasForeignKey(t => t.NEW_USERS_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region NewUserDetailText
|
||||
public partial class SENewUserDetailTextMap :APTEntityBaseMap<T_SE_NEW_USER_DETAIL_TEXT>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_SE_NEW_USER_DETAIL_TEXT> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
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);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region RenewalTrain
|
||||
@ -13680,6 +13740,7 @@ builder.Ignore(t => t.CONTEXT);
|
||||
builder.Property(t => t.ApplyDepartmentName).HasMaxLength(50);
|
||||
builder.Property(t => t.ApplyPostName).HasMaxLength(50);
|
||||
builder.Property(t => t.HIDDEN_REASON).HasMaxLength(200);
|
||||
builder.Property(t => t.NOTICE_CODE).HasMaxLength(50);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@ -13742,6 +13803,7 @@ builder.Property(t => t.HIDDEN_DESCRIPTION).HasMaxLength(500);
|
||||
builder.Ignore(t => t.PUBLISH);
|
||||
builder.Property(t => t.ApplyDepartmentName).HasMaxLength(50);
|
||||
builder.Property(t => t.ApplyPostName).HasMaxLength(50);
|
||||
builder.Property(t => t.NOTICE_CODE).HasMaxLength(50);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@ -13798,6 +13860,7 @@ builder.Property(t => t.ImplementUser).HasMaxLength(500);
|
||||
builder.Property(t => t.AcceptUser).HasMaxLength(500);
|
||||
builder.Property(t => t.ApplyDepartmentName).HasMaxLength(50);
|
||||
builder.Property(t => t.ApplyPostName).HasMaxLength(50);
|
||||
builder.Property(t => t.NOTICE_CODE).HasMaxLength(50);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@ -13904,6 +13967,7 @@ builder.Property(t => t.REMARK).HasMaxLength(500);
|
||||
builder.Property(t => t.ApplyDepartmentName).HasMaxLength(50);
|
||||
builder.Property(t => t.ApplyPostName).HasMaxLength(50);
|
||||
builder.Property(t => t.HIDDEN_REASON).HasMaxLength(200);
|
||||
builder.Property(t => t.NOTICE_CODE).HasMaxLength(50);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@ -13977,6 +14041,7 @@ builder.Ignore(t => t.PUBLISH);
|
||||
builder.Ignore(t => t.CONTEXT);
|
||||
builder.Property(t => t.ApplyDepartmentName).HasMaxLength(50);
|
||||
builder.Property(t => t.ApplyPostName).HasMaxLength(50);
|
||||
builder.Property(t => t.NOTICE_CODE).HasMaxLength(50);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@ -14319,6 +14384,7 @@ builder.HasOne(t => t.Nav_ProductionUnit).WithMany().HasForeignKey(t => t.PRODUC
|
||||
builder.HasOne(t => t.Nav_UserSend).WithMany().HasForeignKey(t => t.USER_ID_SEND).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Ignore(t => t.MONTHStr);
|
||||
builder.Ignore(t => t.DATAStr);
|
||||
builder.Ignore(t => t.WEEKStr);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@ -14685,6 +14751,17 @@ builder.Property(t => t.EMERGENCY).HasMaxLength(500);
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_IdentifyDetail).WithMany(t=>t.Nav_DetailPosts).HasForeignKey(t => t.RISK_IDENTIFY_RESULT_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region RiskIdentifyDetailResultPostDetail
|
||||
public partial class SKRiskIdentifyDetailResultPostDetailMap :APTEntityBaseMap<T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_DetailPost).WithMany(t=>t.Nav_ResultPostDets).HasForeignKey(t => t.RISK_IDENTIFY_DETAIL_RESULT_POST_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_Post).WithMany().HasForeignKey(t => t.POST_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
@ -14857,6 +14934,17 @@ builder.Property(t => t.EMERGENCY).HasMaxLength(500);
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_SummaryDetail).WithMany(t=>t.Nav_DetailPosts).HasForeignKey(t => t.IDENTIFY_RESULT_SUMMARY_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region RiskIdentifyResultSummaryPostDetail
|
||||
public partial class SKRiskIdentifyResultSummaryPostDetailMap :APTEntityBaseMap<T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_SummaryPost).WithMany(t=>t.Nav_SumPostDets).HasForeignKey(t => t.IDENTIFY_RESULT_SUMMARY_POST_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_Post).WithMany().HasForeignKey(t => t.POST_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
@ -14942,6 +15030,7 @@ builder.Ignore(t => t.PUBLISH);
|
||||
builder.Ignore(t => t.CONTEXT);
|
||||
builder.Property(t => t.ApplyDepartmentName).HasMaxLength(50);
|
||||
builder.Property(t => t.ApplyPostName).HasMaxLength(50);
|
||||
builder.Property(t => t.NOTICE_CODE).HasMaxLength(50);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@ -15010,6 +15099,7 @@ builder.HasOne(t => t.Nav_Type).WithMany().HasForeignKey(t => t.TYPE_ID).OnDelet
|
||||
builder.HasOne(t => t.Nav_RecordUser).WithMany().HasForeignKey(t => t.RECORD_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Property(t => t.ApplyDepartmentName).HasMaxLength(50);
|
||||
builder.Property(t => t.ApplyPostName).HasMaxLength(50);
|
||||
builder.Property(t => t.NOTICE_CODE).HasMaxLength(50);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@ -15102,6 +15192,7 @@ builder.Property(t => t.CHECK_PERSON).HasMaxLength(500);
|
||||
builder.Ignore(t => t.PUBLISH);
|
||||
builder.Property(t => t.ApplyDepartmentName).HasMaxLength(50);
|
||||
builder.Property(t => t.ApplyPostName).HasMaxLength(50);
|
||||
builder.Property(t => t.NOTICE_CODE).HasMaxLength(50);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@ -15191,6 +15282,7 @@ builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).
|
||||
builder.Property(t => t.NAME).HasMaxLength(500);
|
||||
builder.Ignore(t => t.MONTHStr);
|
||||
builder.Ignore(t => t.DATAStr);
|
||||
builder.Ignore(t => t.WEEKStr);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -11,7 +11,7 @@ namespace APT.MS.Domain.Entities.FO
|
||||
/// 岗位当班工作记录表
|
||||
/// </summary>
|
||||
[Description("岗位当班工作记录表")]
|
||||
[DataRuleField("Nav_Team.DEPARTMENT_ID")]
|
||||
//[DataRuleField("Nav_Team.DEPARTMENT_ID")]
|
||||
public class T_FO_CURRENT_CLASS_RECORD : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
@ -292,14 +292,14 @@ namespace APT.MS.Domain.Entities.FO
|
||||
/// 下个排班排班表ID
|
||||
/// </summary>
|
||||
[Description("下个排班排班表ID")]
|
||||
public Guid NEXT_CLASS_TEAM_ID { get; set; }
|
||||
public Guid? NEXT_CLASS_TEAM_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 当前班组ID
|
||||
/// </summary>
|
||||
[Description("当前班组ID")]
|
||||
[FormFieldTable]
|
||||
[DataFieldForeignKey("Nav_Team")]
|
||||
public Guid CLASS_TEAM_ID { get; set; }
|
||||
public Guid? CLASS_TEAM_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 班组
|
||||
/// </summary>
|
||||
|
||||
@ -247,5 +247,8 @@ namespace APT.MS.Domain.Entities.FO
|
||||
public FOFireStatus FIRE_STATUS { get; set; }
|
||||
[Description("是否已触发")]
|
||||
public bool IS_RUN { get; set; } = false;
|
||||
|
||||
[Description("是否节假日")]
|
||||
public bool IS_HOLIDAY { get; set; } = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -261,5 +261,7 @@ namespace APT.MS.Domain.Entities.FO
|
||||
|
||||
[Description("是否已触发")]
|
||||
public bool IS_RUN { get; set; } = false;
|
||||
[Description("是否节假日")]
|
||||
public bool IS_HOLIDAY { get; set; } = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,17 +13,41 @@ namespace APT.MS.Domain.Entities.FO
|
||||
[Description("日期")]
|
||||
public DateTime DATE { get; set; }
|
||||
|
||||
[Description("人员")]
|
||||
[Description("值班领导")]
|
||||
[DataFieldForeignKey("Nav_User")]
|
||||
public Guid USER_ID { get; set; }
|
||||
[Description("导航:人员")]
|
||||
public Guid? USER_ID { get; set; }
|
||||
[Description("导航:值班领导")]
|
||||
[FormFieldQuery]
|
||||
public virtual T_FM_USER Nav_User { get; set; }
|
||||
public virtual T_FM_USER Nav_User { get; set; }
|
||||
[Description("技术人员")]
|
||||
[DataFieldForeignKey("Nav_Tech")]
|
||||
public Guid? TECH_ID { get; set; }
|
||||
[Description("导航:技术人员")]
|
||||
[FormFieldQuery]
|
||||
public virtual T_FM_USER Nav_Tech { get; set; }
|
||||
[Description("值班司机")]
|
||||
[DataFieldForeignKey("Nav_Driver")]
|
||||
public Guid? DRIVER_ID { get; set; }
|
||||
[Description("导航:值班司机")]
|
||||
[FormFieldQuery]
|
||||
public virtual T_FM_USER Nav_Driver { get; set; }
|
||||
|
||||
[Description("星期")]
|
||||
public string WEEK { get; set; }
|
||||
|
||||
[Description("电话")]
|
||||
public string PHONE { get; set; }
|
||||
[DataFieldLength(50)]
|
||||
public string PHONE { get; set; }
|
||||
|
||||
[Description("班次")]
|
||||
[DataFieldForeignKey("Nav_Class")]
|
||||
public Guid? CLASS_ID { get; set; }
|
||||
[Description("导航:班次")]
|
||||
[FormFieldQuery]
|
||||
public virtual T_FM_CLASS Nav_Class { get; set; }
|
||||
|
||||
[Description("备注")]
|
||||
[DataFieldLength(500)]
|
||||
public string REMARK { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
27
APT.MS.Domain/Entities/FO/T_FO_TECH_DISCLOSURE_FILE.cs
Normal file
27
APT.MS.Domain/Entities/FO/T_FO_TECH_DISCLOSURE_FILE.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Text;
|
||||
|
||||
namespace APT.MS.Domain.Entities.FO
|
||||
{
|
||||
[Description("附件")]
|
||||
public class T_FO_TECH_DISCLOSURE_FILE : MesEntityBase
|
||||
{
|
||||
[Description("技术交底表ID")]
|
||||
[DataFieldForeignKey("Nav_TechDisclosure", "Nav_Files")]
|
||||
public Guid TECH_DISCLOSURE_FROM_ID { get; set; }
|
||||
|
||||
[Description("导航属性:技术交底表")]
|
||||
public virtual T_FO_TECH_DISCLOSURE_FROM Nav_TechDisclosure { get; set; }
|
||||
|
||||
[DataFieldForeignKey("Nav_ImgFile")]
|
||||
[Description("附件ID")]
|
||||
public Guid IMG_FILE_ID { get; set; }
|
||||
|
||||
[Description("导航:附件文件表")]
|
||||
public virtual T_PF_IMG_FILE Nav_ImgFile { get; set; }
|
||||
}
|
||||
}
|
||||
@ -139,6 +139,10 @@ namespace APT.MS.Domain.Entities.FO
|
||||
/// 相关方
|
||||
/// </summary>
|
||||
[Description("相关方")]
|
||||
public Guid? RELATED_ID { get; set; }
|
||||
public Guid? RELATED_ID { get; set; }
|
||||
|
||||
[Description("附件")]
|
||||
[FormFieldEdit]
|
||||
public ICollection<T_FO_TECH_DISCLOSURE_FILE> Nav_Files { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,5 +91,21 @@ namespace APT.MS.Domain.Entities.FO
|
||||
[Description("导航属性:被交底人")]
|
||||
[FormFieldEdit]
|
||||
public ICollection<T_FO_TECH_DISCLOSURE_FROM_SAFE_PERSON> Nav_Person { get; set; }
|
||||
[Description("附件")]
|
||||
[FormFieldEdit]
|
||||
public ICollection<T_FO_TECH_DISCLOSURE_FROM_SAFE_FILE> Nav_Files { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联工作票
|
||||
/// </summary>
|
||||
[Description("关联工作票")]
|
||||
[DataFieldForeignKey("Nav_Job")]
|
||||
public Guid? FIRE_JOB_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 导航属性:关联工作票
|
||||
/// </summary>
|
||||
[Description("导航属性:关联工作票")]
|
||||
public T_FO_FIRE_JOB Nav_Job { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Text;
|
||||
|
||||
namespace APT.MS.Domain.Entities.FO
|
||||
{
|
||||
[Description("附件")]
|
||||
public class T_FO_TECH_DISCLOSURE_FROM_SAFE_FILE : MesEntityBase
|
||||
{
|
||||
[Description("技术交底表ID")]
|
||||
[DataFieldForeignKey("Nav_TechDisclosure", "Nav_Files")]
|
||||
public Guid TECH_DISCLOSURE_FROM_ID { get; set; }
|
||||
|
||||
[Description("导航属性:技术交底表")]
|
||||
public virtual T_FO_TECH_DISCLOSURE_FROM_SAFE Nav_TechDisclosure { get; set; }
|
||||
|
||||
[DataFieldForeignKey("Nav_ImgFile")]
|
||||
[Description("附件ID")]
|
||||
public Guid IMG_FILE_ID { get; set; }
|
||||
|
||||
[Description("导航:附件文件表")]
|
||||
public virtual T_PF_IMG_FILE Nav_ImgFile { get; set; }
|
||||
}
|
||||
}
|
||||
@ -91,5 +91,9 @@ namespace APT.MS.Domain.Entities.FO
|
||||
[Description("导航属性:被交底人")]
|
||||
[FormFieldEdit]
|
||||
public ICollection<T_FO_TECH_DISCLOSURE_FROM_TECH_PERSON> Nav_Person { get; set; }
|
||||
|
||||
[Description("附件")]
|
||||
[FormFieldEdit]
|
||||
public ICollection<T_FO_TECH_DISCLOSURE_FROM_TECH_FILE> Nav_Files { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Text;
|
||||
|
||||
namespace APT.MS.Domain.Entities.FO
|
||||
{
|
||||
[Description("附件")]
|
||||
public class T_FO_TECH_DISCLOSURE_FROM_TECH_FILE : MesEntityBase
|
||||
{
|
||||
[Description("技术交底表ID")]
|
||||
[DataFieldForeignKey("Nav_TechDisclosure", "Nav_Files")]
|
||||
public Guid TECH_DISCLOSURE_FROM_ID { get; set; }
|
||||
|
||||
[Description("导航属性:技术交底表")]
|
||||
public virtual T_FO_TECH_DISCLOSURE_FROM_TECH Nav_TechDisclosure { get; set; }
|
||||
|
||||
[DataFieldForeignKey("Nav_ImgFile")]
|
||||
[Description("附件ID")]
|
||||
public Guid IMG_FILE_ID { get; set; }
|
||||
|
||||
[Description("导航:附件文件表")]
|
||||
public virtual T_PF_IMG_FILE Nav_ImgFile { get; set; }
|
||||
}
|
||||
}
|
||||
@ -48,23 +48,7 @@ namespace APT.MS.Domain.Entities.SE
|
||||
[FormFieldEdit]
|
||||
[DataFieldLength(10)]
|
||||
public string? TRAINNING_TIME { get; set; }
|
||||
/// <summary>
|
||||
/// 培训老师
|
||||
/// </summary>
|
||||
[Description("培训老师")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
[DataFieldLength(50)]
|
||||
public string TEACHER { get; set; }
|
||||
/// <summary>
|
||||
/// 培训形式
|
||||
/// </summary>
|
||||
[Description("培训形式")]
|
||||
[EnumName("TRAINMODELENUM")]
|
||||
[DataFieldLength(50)]
|
||||
[FormFieldEdit]
|
||||
public string TRAIN_MODEL { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 组织部门
|
||||
/// </summary>
|
||||
@ -147,5 +131,19 @@ namespace APT.MS.Domain.Entities.SE
|
||||
[EnumName("SETrainNeedSuvey")]
|
||||
[FormFieldQuery]
|
||||
public SETrainNeedSuvey IS_CREATETEST { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 培训形式 线上培训/线下培训 委外培训
|
||||
/// </summary>
|
||||
[Description("培训形式")]
|
||||
[FormFieldEdit]
|
||||
[EnumName("TrainType")]
|
||||
public TrainType? TRAINTYPE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 培训老师
|
||||
/// </summary>
|
||||
[Description("培训老师")]
|
||||
public ICollection<T_SE_NEW_USERS_TEACHER> Nav_Teachers { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -124,6 +124,13 @@ namespace APT.MS.Domain.Entities.SE
|
||||
/// </summary>
|
||||
[Description("下个部门ID")]
|
||||
[FormFieldEdit]
|
||||
[DataFieldForeignKey("Nav_DepartmentNext")]
|
||||
public Guid? NEXT_DEPARTMENT_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 下个部门
|
||||
/// </summary>
|
||||
[Description("下个部门")]
|
||||
public T_FM_DEPARTMENT Nav_DepartmentNext { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,6 +21,19 @@ namespace APT.MS.Domain.Entities.SE
|
||||
/// </summary>
|
||||
[Description("导航: 培训记录")]
|
||||
public T_SE_NEW_USER_DETAIL Nav_Record { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 考试记录 就是会有值,但是新增字段旧数据问题
|
||||
/// </summary>
|
||||
[Description("考试记录")]
|
||||
[DataFieldForeignKey("Nav_Text", "Nav_ListPaper")]
|
||||
public Guid? TEXT_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 考试记录
|
||||
/// </summary>
|
||||
[Description("考试记录")]
|
||||
public T_SE_NEW_USER_DETAIL_TEXT Nav_Text { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 人员ID
|
||||
/// </summary>
|
||||
|
||||
48
APT.MS.Domain/Entities/SC/SE/T_SE_NEW_USERS_TEACHER.cs
Normal file
48
APT.MS.Domain/Entities/SC/SE/T_SE_NEW_USERS_TEACHER.cs
Normal file
@ -0,0 +1,48 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.SE
|
||||
{
|
||||
/// <summary>
|
||||
/// 培训老师
|
||||
/// </summary>
|
||||
[Description("培训老师")]
|
||||
public class T_SE_NEW_USERS_TEACHER : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 新注册用户
|
||||
/// </summary>
|
||||
[Description("新注册用户")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
[DataFieldForeignKey("Nav_Users", "Nav_Teachers")]
|
||||
public Guid? NEW_USERS_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 新注册用户
|
||||
/// </summary>
|
||||
[Description("新注册用户")]
|
||||
public T_SE_NEW_USERS Nav_Users { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 培训老师
|
||||
/// </summary>
|
||||
[Description("培训老师")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
[DataFieldForeignKey("Nav_User")]
|
||||
public Guid? USER_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 培训老师
|
||||
/// </summary>
|
||||
[Description("培训老师")]
|
||||
public T_FM_USER Nav_User { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
60
APT.MS.Domain/Entities/SC/SE/T_SE_NEW_USER_DETAIL_TEXT.cs
Normal file
60
APT.MS.Domain/Entities/SC/SE/T_SE_NEW_USER_DETAIL_TEXT.cs
Normal file
@ -0,0 +1,60 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
namespace APT.MS.Domain.Entities.SE
|
||||
{
|
||||
/// <summary>
|
||||
/// 人员试题
|
||||
/// </summary>
|
||||
[Description("人员试题")]
|
||||
public class T_SE_NEW_USER_DETAIL_TEXT : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 培训记录
|
||||
/// </summary>
|
||||
[Description("培训记录")]
|
||||
[DataFieldForeignKey("Nav_Record")]
|
||||
public Guid RECORD_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航: 培训记录
|
||||
/// </summary>
|
||||
[Description("导航: 培训记录")]
|
||||
public T_SE_NEW_USER_DETAIL Nav_Record { get; set; }
|
||||
/// <summary>
|
||||
/// 人员ID
|
||||
/// </summary>
|
||||
[Description("人员")]
|
||||
[DataFieldForeignKey("Nav_User")]
|
||||
public Guid? USER_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航: 人员
|
||||
/// </summary>
|
||||
[Description("导航: 人员")]
|
||||
public T_FM_USER Nav_User { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 试题
|
||||
/// </summary>
|
||||
[Description("试题")]
|
||||
public ICollection<T_SE_NEW_USER_DETAIL_PAPER> Nav_ListPaper { get; set; }
|
||||
/// <summary>
|
||||
/// 考试得分
|
||||
/// </summary>
|
||||
[Description("考试得分")]
|
||||
public int? SCORE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 考试次数
|
||||
/// </summary>
|
||||
[Description("考试次数")]
|
||||
public int TEXT_TIMES { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 考试是否通过
|
||||
/// </summary>
|
||||
[Description("考试是否通过")]
|
||||
public bool ISPASS { get; set; } = false;
|
||||
}
|
||||
}
|
||||
@ -79,6 +79,9 @@ namespace APT.MS.Domain.Entities.SK
|
||||
|
||||
[Description("检查人")]
|
||||
[FormFieldEdit]
|
||||
public ICollection<T_SK_CHECK_SET_USER> Nav_CheckUsers { get; set; }
|
||||
public ICollection<T_SK_CHECK_SET_USER> Nav_CheckUsers { get; set; }
|
||||
[Description("是否自动触发")]
|
||||
public bool IS_AUTO { get; set; } = false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -233,6 +233,10 @@ namespace APT.MS.Domain.Entities.SK
|
||||
public string HIDDEN_REASON { get; set; }
|
||||
|
||||
[Description("导航:隐患原因")]
|
||||
public virtual ICollection<T_SK_HIDDEN_DANGER_CONFIRM_REASON> Nav_Reasons { get; set; }
|
||||
public virtual ICollection<T_SK_HIDDEN_DANGER_CONFIRM_REASON> Nav_Reasons { get; set; }
|
||||
|
||||
[Description("检查通知编号")]
|
||||
[DataFieldLength(50)]
|
||||
public string NOTICE_CODE { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -88,6 +88,10 @@ namespace APT.MS.Domain.Entities.SK
|
||||
public string ApplyDepartmentName { get; set; }
|
||||
[DataFieldLength(50)]
|
||||
[Description("发起人岗位")]
|
||||
public string ApplyPostName { get; set; }
|
||||
public string ApplyPostName { get; set; }
|
||||
|
||||
[Description("编号")]
|
||||
[DataFieldLength(50)]
|
||||
public string NOTICE_CODE { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -144,6 +144,10 @@ namespace APT.MS.Domain.Entities.SK
|
||||
public string ApplyDepartmentName { get; set; }
|
||||
[DataFieldLength(50)]
|
||||
[Description("发起人岗位")]
|
||||
public string ApplyPostName { get; set; }
|
||||
public string ApplyPostName { get; set; }
|
||||
|
||||
[Description("检查通知编号")]
|
||||
[DataFieldLength(50)]
|
||||
public string NOTICE_CODE { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -288,6 +288,10 @@ namespace APT.MS.Domain.Entities.SK
|
||||
public string HIDDEN_REASON { get; set; }
|
||||
|
||||
[Description("导航:隐患原因")]
|
||||
public virtual ICollection<T_SK_HIDDEN_DANGER_RECTIFY_RECORD_REASON> Nav_RectifyReasons { get; set; }
|
||||
public virtual ICollection<T_SK_HIDDEN_DANGER_RECTIFY_RECORD_REASON> Nav_RectifyReasons { get; set; }
|
||||
|
||||
[Description("检查通知编号")]
|
||||
[DataFieldLength(50)]
|
||||
public string NOTICE_CODE { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -114,6 +114,10 @@ namespace APT.MS.Domain.Entities.SK
|
||||
public string ApplyDepartmentName { get; set; }
|
||||
[DataFieldLength(50)]
|
||||
[Description("发起人岗位")]
|
||||
public string ApplyPostName { get; set; }
|
||||
public string ApplyPostName { get; set; }
|
||||
|
||||
[Description("检查通知编号")]
|
||||
[DataFieldLength(50)]
|
||||
public string NOTICE_CODE { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -156,6 +156,9 @@ namespace APT.MS.Domain.Entities.SK
|
||||
[DataFieldIngore]
|
||||
public string MONTHStr { get; set; }
|
||||
[DataFieldIngore]
|
||||
public string DATAStr { get; set; }
|
||||
public string DATAStr { get; set; }
|
||||
|
||||
[DataFieldIngore]
|
||||
public string WEEKStr { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Enums.SK;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@ -21,17 +23,26 @@ namespace APT.MS.Domain.Entities.SK
|
||||
/// 导航:安全风险辨识结果明细
|
||||
/// </summary>
|
||||
[Description("导航:安全风险辨识结果明细")]
|
||||
public virtual T_SK_RISK_IDENTIFY_RESULT_DETAIL Nav_IdentifyDetail { get; set; }
|
||||
|
||||
|
||||
public virtual T_SK_RISK_IDENTIFY_RESULT_DETAIL Nav_IdentifyDetail { get; set; }
|
||||
|
||||
[Description("序号")]
|
||||
public int? NUM { get; set; }
|
||||
|
||||
[Description("岗位")]
|
||||
[DataFieldForeignKey("Nav_Post")]
|
||||
public Guid? POST_ID { get; set; }
|
||||
[Description("辨识层级")]
|
||||
[EnumName("SKDepartmentTypeEnum")]
|
||||
public SKDepartmentTypeEnum DEPARTMENT_TYPE { get; set; }
|
||||
|
||||
[Description("导航属性:岗位")]
|
||||
public virtual T_FM_USER_POST Nav_Post { get; set; }
|
||||
[Description("部门")]
|
||||
[DataFieldForeignKey("Nav_Department")]
|
||||
public Guid? DEPARTMENT_ID { get; set; }
|
||||
|
||||
[Description("导航属性:部门")]
|
||||
public virtual T_FM_DEPARTMENT Nav_Department { get; set; }
|
||||
|
||||
[Description("辨识岗位")]
|
||||
[FormFieldEdit]
|
||||
public ICollection<T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL> Nav_ResultPostDets { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Text;
|
||||
|
||||
namespace APT.MS.Domain.Entities.SK
|
||||
{
|
||||
[Description("辨识岗位")]
|
||||
public class T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 安全风险辨识结果明细
|
||||
/// </summary>
|
||||
[Description("安全风险辨识结果明细")]
|
||||
[DataFieldForeignKey("Nav_DetailPost", "Nav_ResultPostDets")]
|
||||
public Guid RISK_IDENTIFY_DETAIL_RESULT_POST_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 导航:安全风险辨识结果明细
|
||||
/// </summary>
|
||||
[Description("导航:安全风险辨识结果明细")]
|
||||
public virtual T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST Nav_DetailPost { get; set; }
|
||||
|
||||
[Description("岗位")]
|
||||
[DataFieldForeignKey("Nav_Post")]
|
||||
public Guid? POST_ID { get; set; }
|
||||
|
||||
[Description("导航属性:岗位")]
|
||||
public virtual T_FM_USER_POST Nav_Post { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Enums.SK;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@ -26,11 +27,21 @@ namespace APT.MS.Domain.Entities.SK
|
||||
[Description("序号")]
|
||||
public int? NUM { get; set; }
|
||||
|
||||
[Description("岗位")]
|
||||
[DataFieldForeignKey("Nav_Post")]
|
||||
public Guid? POST_ID { get; set; }
|
||||
[Description("辨识层级")]
|
||||
[EnumName("SKDepartmentTypeEnum")]
|
||||
public SKDepartmentTypeEnum DEPARTMENT_TYPE { get; set; }
|
||||
|
||||
[Description("导航属性:岗位")]
|
||||
public virtual T_FM_USER_POST Nav_Post { get; set; }
|
||||
[Description("部门")]
|
||||
[DataFieldForeignKey("Nav_Department")]
|
||||
public Guid? DEPARTMENT_ID { get; set; }
|
||||
|
||||
[Description("导航属性:部门")]
|
||||
public virtual T_FM_DEPARTMENT Nav_Department { get; set; }
|
||||
|
||||
[Description("辨识岗位")]
|
||||
[FormFieldEdit]
|
||||
public ICollection<T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL> Nav_SumPostDets { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Text;
|
||||
|
||||
namespace APT.MS.Domain.Entities.SK
|
||||
{
|
||||
[Description("辨识岗位")]
|
||||
public class T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 安全风险辨识结果汇总明细
|
||||
/// </summary>
|
||||
[Description("安全风险辨识结果汇总明细")]
|
||||
[DataFieldForeignKey("Nav_SummaryPost", "Nav_SumPostDets")]
|
||||
public Guid IDENTIFY_RESULT_SUMMARY_POST_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 导航:安全风险辨识结果汇总明细
|
||||
/// </summary>
|
||||
[Description("导航:安全风险辨识结果汇总明细")]
|
||||
public virtual T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST Nav_SummaryPost { get; set; }
|
||||
|
||||
[Description("岗位")]
|
||||
[DataFieldForeignKey("Nav_Post")]
|
||||
public Guid? POST_ID { get; set; }
|
||||
|
||||
[Description("导航属性:岗位")]
|
||||
public virtual T_FM_USER_POST Nav_Post { get; set; }
|
||||
}
|
||||
}
|
||||
@ -111,6 +111,10 @@ namespace APT.MS.Domain.Entities.SK
|
||||
public string ApplyDepartmentName { get; set; }
|
||||
[DataFieldLength(50)]
|
||||
[Description("发起人岗位")]
|
||||
public string ApplyPostName { get; set; }
|
||||
public string ApplyPostName { get; set; }
|
||||
|
||||
[Description("编号")]
|
||||
[DataFieldLength(50)]
|
||||
public string NOTICE_CODE { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -131,6 +131,9 @@ namespace APT.MS.Domain.Entities.SK
|
||||
public string ApplyDepartmentName { get; set; }
|
||||
[DataFieldLength(50)]
|
||||
[Description("发起人岗位")]
|
||||
public string ApplyPostName { get; set; }
|
||||
public string ApplyPostName { get; set; }
|
||||
[Description("检查通知编号")]
|
||||
[DataFieldLength(50)]
|
||||
public string NOTICE_CODE { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -112,6 +112,10 @@ namespace APT.MS.Domain.Entities.SK
|
||||
public string ApplyDepartmentName { get; set; }
|
||||
[DataFieldLength(50)]
|
||||
[Description("发起人岗位")]
|
||||
public string ApplyPostName { get; set; }
|
||||
public string ApplyPostName { get; set; }
|
||||
|
||||
[Description("检查通知编号")]
|
||||
[DataFieldLength(50)]
|
||||
public string NOTICE_CODE { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -78,6 +78,9 @@ namespace APT.MS.Domain.Entities.SK
|
||||
[DataFieldIngore]
|
||||
public string MONTHStr { get; set; }
|
||||
[DataFieldIngore]
|
||||
public string DATAStr { get; set; }
|
||||
public string DATAStr { get; set; }
|
||||
|
||||
[DataFieldIngore]
|
||||
public string WEEKStr { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -140,7 +140,8 @@ namespace APT.MS.Domain.Enums
|
||||
签到中 = 1,
|
||||
已归档 = 2,
|
||||
审核中 = 3,
|
||||
已驳回 = 4,
|
||||
已驳回 = 4,
|
||||
完工验收 = 5,
|
||||
终止 = 6,
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
28
APT.MS.Domain/IServices/SC/SE/ISENewUserService.cs
Normal file
28
APT.MS.Domain/IServices/SC/SE/ISENewUserService.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.Infrastructure.Api;
|
||||
using APT.MS.Domain.Entities.SE;
|
||||
|
||||
namespace APT.BaseData.Domain.IServices
|
||||
{
|
||||
public interface ISENewUserService : ICommonService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取试题 三级安全教育
|
||||
/// </summary>
|
||||
/// <param name="ORG_ID"></param>
|
||||
/// <param name="RECORD_ID"></param>
|
||||
/// <param name="USER_ID"></param>
|
||||
/// <param name="eduCard"></param>
|
||||
/// <param name="config"></param>
|
||||
/// <param name="modelText"></param>
|
||||
/// <param name="ListPapers"></param>
|
||||
/// <param name="sendNotice"></param>
|
||||
/// <param name="Msg"></param>
|
||||
/// <param name="TEXT_TIMES"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="Exception"></exception>
|
||||
bool GetText(Guid ORG_ID, Guid RECORD_ID, Guid USER_ID, T_SE_NEW_USERS eduCard, T_SE_SECONFIG config, ref T_SE_NEW_USER_DETAIL_TEXT modelText, ref List<T_SE_NEW_USER_DETAIL_PAPER> ListPapers, ref T_FM_NOTIFICATION_TASK sendNotice, ref string Msg, int TEXT_TIMES = 1);
|
||||
}
|
||||
}
|
||||
205
APT.MS.Services/Services/SC/SE/SENewUserService.cs
Normal file
205
APT.MS.Services/Services/SC/SE/SENewUserService.cs
Normal file
@ -0,0 +1,205 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.BaseData.Domain.IServices;
|
||||
using APT.BaseData.Domain.IServices.FM;
|
||||
using APT.Infrastructure.Api;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.SC;
|
||||
using APT.MS.Domain.Entities.SE;
|
||||
using APT.MS.Domain.Enums;
|
||||
using InfluxData.Net.InfluxDb.Models.Responses;
|
||||
using MySqlX.XDevAPI.Common;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using Org.BouncyCastle.Utilities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
namespace APT.BaseData.Services.DomainServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取会议Model T_SE_NEW_USERS
|
||||
/// </summary>
|
||||
public class SENewUserService : CommonService, ISENewUserService
|
||||
{
|
||||
IFMNotificationTaskService NotificationTaskService { get; set; }
|
||||
public SENewUserService(IRepository repository, IFMNotificationTaskService notificationTaskService)
|
||||
: base(repository)
|
||||
{
|
||||
NotificationTaskService = notificationTaskService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取试题 三级安全教育
|
||||
/// </summary>
|
||||
/// <param name="ORG_ID"></param>
|
||||
/// <param name="RECORD_ID"></param>
|
||||
/// <param name="USER_ID"></param>
|
||||
/// <param name="eduCard"></param>
|
||||
/// <param name="config"></param>
|
||||
/// <param name="modelText"></param>
|
||||
/// <param name="ListPapers"></param>
|
||||
/// <param name="sendNotice"></param>
|
||||
/// <param name="Msg"></param>
|
||||
/// <param name="TEXT_TIMES"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="Exception"></exception>
|
||||
public bool GetText(Guid ORG_ID, Guid RECORD_ID, Guid USER_ID, T_SE_NEW_USERS eduCard, T_SE_SECONFIG config, ref T_SE_NEW_USER_DETAIL_TEXT modelText, ref List<T_SE_NEW_USER_DETAIL_PAPER> ListPapers, ref T_FM_NOTIFICATION_TASK sendNotice, ref string Msg, int TEXT_TIMES = 1)
|
||||
{
|
||||
List<T_FM_NOTIFICATION_TASK> sendNotices = new List<T_FM_NOTIFICATION_TASK>();
|
||||
if (config == null)
|
||||
{
|
||||
config = GetEntity<T_SE_SECONFIG>(t => true);
|
||||
}
|
||||
var SCount = 1;
|
||||
var MCount = 1;
|
||||
var CCount = 1;
|
||||
if (config != null)
|
||||
{
|
||||
if (config.M_TEST_COUNT > 0 || config.S_TEST_COUNT > 0 || config.C_TEST_COUNT > 0)
|
||||
{
|
||||
//王永文 只要有配置 就获取
|
||||
MCount = config.M_TEST_COUNT;
|
||||
SCount = config.S_TEST_COUNT;
|
||||
CCount = config.C_TEST_COUNT;
|
||||
}
|
||||
else
|
||||
{
|
||||
//保持原来的版本
|
||||
if (config.M_TEST_COUNT > 0)
|
||||
{
|
||||
MCount = config.M_TEST_COUNT;
|
||||
}
|
||||
if (config.S_TEST_COUNT > 0)
|
||||
{
|
||||
SCount = config.S_TEST_COUNT;
|
||||
}
|
||||
if (config.C_TEST_COUNT > 0)
|
||||
{
|
||||
CCount = config.C_TEST_COUNT;
|
||||
}
|
||||
}
|
||||
}
|
||||
var testidlist = new List<Guid>();
|
||||
var testFilter = new BaseFilter(ORG_ID);
|
||||
testFilter.Include = new string[] { "Nav_Points" };
|
||||
var currStatus = eduCard.TRAIN_STATUS;
|
||||
IEnumerable<T_SE_TEST_ENUM_POINT> pointS = new List<T_SE_TEST_ENUM_POINT>();
|
||||
string PointName = "";
|
||||
if (eduCard.TRAIN_STATUS == SEThreeLevelSafeTrainType.公司级)
|
||||
{
|
||||
PointName = "三级安全教育-公司级";
|
||||
}
|
||||
else if (eduCard.TRAIN_STATUS == SEThreeLevelSafeTrainType.部门级)
|
||||
{
|
||||
PointName = "三级安全教育-部门级";
|
||||
}
|
||||
else if (eduCard.TRAIN_STATUS == SEThreeLevelSafeTrainType.班组级)
|
||||
{
|
||||
PointName = "三级安全教育-班组级";
|
||||
}
|
||||
pointS = GetEntities<T_SE_TEST_ENUM_POINT>(t => t.NAME == PointName, new BaseFilter(ORG_ID));
|
||||
if (pointS == null || pointS.Count() < 1)
|
||||
{
|
||||
throw new Exception("未找到试题知识点【" + PointName + "】的配置信息,配置路径:系统管理 > 安全教育培训配置 > 知识点类型。");
|
||||
}
|
||||
var pointIDS = pointS.Select(t => t.ID).ToList();
|
||||
var allTests = GetEntities<T_SE_TEST>(st => st.Nav_Points.Any(pt => pointIDS.Contains((Guid)pt.POINT_ID)), testFilter).ToList();
|
||||
foreach (var testPoint in pointIDS)
|
||||
{
|
||||
var havepoint = allTests.Where(st => st.Nav_Points.Any(pt => pt.POINT_ID == testPoint));
|
||||
if (havepoint.Count() < 1)
|
||||
{
|
||||
var noPoint = GetEntity<T_SE_TEST_ENUM_POINT>(testPoint);
|
||||
Msg += noPoint.NAME + ",";
|
||||
}
|
||||
}
|
||||
if (Msg != "")
|
||||
{
|
||||
Msg = "知识点 " + Msg + " 没有题目!";
|
||||
return false;
|
||||
}
|
||||
var SCurrentCount = allTests.Count(t => t.TYPE == SETestTypeEnum.单选题);
|
||||
var MCurrentCount = allTests.Count(t => t.TYPE == SETestTypeEnum.多选题);
|
||||
var CCurrentCount = allTests.Count(t => t.TYPE == SETestTypeEnum.是非题);
|
||||
Msg = "";
|
||||
if (SCurrentCount < SCount)
|
||||
{
|
||||
Msg += "题库中题目数量不足!";
|
||||
Msg += "单选题还需" + (SCount - SCurrentCount) + "题\n";
|
||||
}
|
||||
if (MCurrentCount < MCount)
|
||||
{
|
||||
Msg += "题库中题目数量不足!";
|
||||
Msg += "多选题还需" + (MCount - MCurrentCount) + "题\n";
|
||||
}
|
||||
if (CCurrentCount < CCount)
|
||||
{
|
||||
Msg += "题库中题目数量不足!";
|
||||
Msg += "是非题还需" + (CCount - CCurrentCount) + "题\n";
|
||||
}
|
||||
|
||||
if (Msg != "")
|
||||
{
|
||||
Msg = "知识点 " + Msg + " 没有题目!";
|
||||
return false;
|
||||
}
|
||||
CreateTestList(allTests, testidlist, pointIDS, (int)SETestTypeEnum.是非题, CCount);
|
||||
CreateTestList(allTests, testidlist, pointIDS, (int)SETestTypeEnum.单选题, SCount);
|
||||
CreateTestList(allTests, testidlist, pointIDS, (int)SETestTypeEnum.多选题, MCount);
|
||||
|
||||
if (testidlist.Count == 0 || testidlist.Count < (SCount + MCount + CCount))
|
||||
{
|
||||
Msg = "当前题库数据不足,未能正常生成试卷! 知识点:" + PointName + "是非题:" + CCount + "题,单选题:" + SCount + "题,多选题:" + MCount + "题!";
|
||||
return false;
|
||||
}
|
||||
|
||||
modelText = new T_SE_NEW_USER_DETAIL_TEXT();
|
||||
Guid TEXT_ID = Guid.NewGuid();
|
||||
modelText.RECORD_ID = RECORD_ID;
|
||||
modelText.ID = TEXT_ID;
|
||||
modelText.ORG_ID = ORG_ID;
|
||||
modelText.USER_ID = USER_ID;
|
||||
modelText.TEXT_TIMES = TEXT_TIMES;
|
||||
if (ListPapers == null)
|
||||
{
|
||||
ListPapers = new List<T_SE_NEW_USER_DETAIL_PAPER>();
|
||||
}
|
||||
List<T_SE_NEW_USER_DETAIL_PAPER> temp = new List<T_SE_NEW_USER_DETAIL_PAPER>();
|
||||
testidlist.ForEach(testid =>
|
||||
{
|
||||
var p = new T_SE_NEW_USER_DETAIL_PAPER
|
||||
{
|
||||
RECORD_ID = RECORD_ID,
|
||||
ID = Guid.NewGuid(),
|
||||
ORG_ID = ORG_ID,
|
||||
TEXT_ID = TEXT_ID,
|
||||
USER_ID = USER_ID,
|
||||
TEST_ID = testid,
|
||||
ANSWER = 0,
|
||||
};
|
||||
temp.Add(p);
|
||||
});
|
||||
ListPapers = temp;
|
||||
string userNAME = GetEntity<T_FM_USER>(USER_ID).NAME;
|
||||
sendNotice = NotificationTaskService.InsertUserNoticeTaskModel("三级安全教育在线答题-" + eduCard.TRAIN_STATUS.GetDescription(), modelText.ID, modelText.ORG_ID, USER_ID, userNAME, DateTime.Now, DateTime.Now.AddHours(12), 1, "SE061_PAPERPAGE");
|
||||
return true;
|
||||
}
|
||||
|
||||
private void CreateTestList(List<T_SE_TEST> allTests, List<Guid> ret, List<Guid> contentFilter, int type, int count)
|
||||
{
|
||||
var tests = allTests.Where(st =>
|
||||
st.Nav_Points.Any(pt => contentFilter.Contains(pt.POINT_ID.Value)) &&
|
||||
st.TYPE == (SETestTypeEnum)type).OrderBy(t => Guid.NewGuid()).Take(count); ;
|
||||
if (tests != null)
|
||||
{
|
||||
ret.AddRange(tests.Select(it => it.ID));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -5,7 +5,7 @@
|
||||
"commandName": "Project",
|
||||
"launchUrl": "api/values",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Pdev"
|
||||
"ASPNETCORE_ENVIRONMENT": "Test"
|
||||
},
|
||||
"nativeDebugging": true,
|
||||
"applicationUrl": "http://localhost:5101"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -5,7 +5,7 @@
|
||||
"commandName": "Project",
|
||||
"launchUrl": "api/values",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Pdev"
|
||||
"ASPNETCORE_ENVIRONMENT": "Test"
|
||||
},
|
||||
"nativeDebugging": true,
|
||||
"applicationUrl": "http://localhost:5178"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -280,24 +280,34 @@ namespace APT.FM.WebApi.Controllers.Api.FM
|
||||
List<Guid> listDepIDs = new List<Guid>();
|
||||
if (this.Request.Headers.ContainsKey("Datarule"))
|
||||
{
|
||||
string strDeps = this.Request.Headers["Datarule"].ToString();
|
||||
if (strDeps.Length > 0)
|
||||
string telnetCode = Request.Headers["Tenant"];
|
||||
Guid? ORGID = APT.Infrastructure.Api.AppContext.CurrentSession.OrgId;
|
||||
|
||||
if (ORGID.HasValue && ORGID.Value.ToString().StartsWith(telnetCode))
|
||||
{
|
||||
string[] arry = strDeps.Split(",");
|
||||
foreach (var item in arry)
|
||||
string strDeps = this.Request.Headers["Datarule"].ToString();
|
||||
if (strDeps.Length > 0)
|
||||
{
|
||||
try
|
||||
string[] arry = strDeps.Split(",");
|
||||
foreach (var item in arry)
|
||||
{
|
||||
listDepIDs.Add(new Guid(item));
|
||||
try
|
||||
{
|
||||
listDepIDs.Add(new Guid(item));
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
express = express.And(e => e.DEPARTMENT_ID.HasValue && listDepIDs.Contains(e.DEPARTMENT_ID.Value));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
express = express.And(e => e.DEPARTMENT_ID.HasValue && listDepIDs.Contains(e.DEPARTMENT_ID.Value));
|
||||
}
|
||||
|
||||
var result = this.WitOrderPaged(express, pageFilter);
|
||||
if (result.Data.Count() > 0)
|
||||
if (result.Data != null && result.Data.Count() > 0)
|
||||
{
|
||||
var userIds = result.Data.Select(t => t.ID).ToList();
|
||||
var signs = this.GetEntities<T_FM_USER_SIGN_FILE>(t => userIds.Contains(t.USER_ID), new BaseFilter(pageFilter.OrgId));
|
||||
@ -774,7 +784,7 @@ namespace APT.FM.WebApi.Controllers.Api.FM
|
||||
personTeam = teamPersons;
|
||||
if (entity.APPROVE_ROLE_ID != null)
|
||||
{
|
||||
var isExist = userList.FirstOrDefault(t => t.APPROVE_ROLE_ID == entity.APPROVE_ROLE_ID && t.DEPARTMENT_ID == entity.DEPARTMENT_ID);
|
||||
var isExist = userList.FirstOrDefault(t => t.APPROVE_ROLE_ID == entity.APPROVE_ROLE_ID && t.DEPARTMENT_ID == entity.DEPARTMENT_ID && t.ENABLE_STATUS == 0);
|
||||
if (isExist != null)
|
||||
this.ThrowError("070001");
|
||||
}
|
||||
@ -1447,6 +1457,7 @@ namespace APT.FM.WebApi.Controllers.Api.FM
|
||||
else
|
||||
{
|
||||
user.ENABLE_STATUS = 1;
|
||||
user.APPROVE_ROLE_ID = null;
|
||||
}
|
||||
T_FM_TEAM_PERSON teamPerson = new T_FM_TEAM_PERSON();
|
||||
if (user.ENABLE_STATUS == 0 && department.DEPARTMENT_TYPE == (int)FMDepartmentType.Class)
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"commandName": "Project",
|
||||
"launchUrl": "api/values",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Pdev"
|
||||
"ASPNETCORE_ENVIRONMENT": "Test"
|
||||
},
|
||||
"nativeDebugging": false,
|
||||
"applicationUrl": "http://localhost:5107"
|
||||
|
||||
@ -85,7 +85,7 @@ namespace APT.FO.WebApi.Controllers
|
||||
if (string.IsNullOrEmpty(id))
|
||||
this.ThrowError("060010");
|
||||
var result = this.GetEntity<T_FO_CRUCIAL_LICENSE_JOB>(id, new string[] { "Nav_CrucialLicensePerson", "Nav_CrucialLicensePerson.Nav_User","Nav_Files.Nav_ImgFile",
|
||||
"Nav_CrucialLicensePerson.Nav_User.Nav_Department","Nav_OperationStep","Nav_ApplyUser","Nav_MonitorUser","Nav_JobScheme","Nav_Risks",
|
||||
"Nav_CrucialLicensePerson.Nav_User.Nav_Department","Nav_OperationStep","Nav_ApplyUser","Nav_MonitorUser","Nav_JobScheme","Nav_Risks","Nav_Area",
|
||||
"Nav_JobScheme.Nav_PreOperSchFile","Nav_JobScheme.Nav_PreOperSchFile.Nav_ImgFile","Nav_JobScheme.Nav_PreOperSchFile.Nav_ImgFile"});
|
||||
if (result != null)
|
||||
{
|
||||
@ -161,7 +161,7 @@ namespace APT.FO.WebApi.Controllers
|
||||
// "Nav_JobScheme.Nav_PreOperSchFile.Nav_ImgFile", "Nav_CrucialLicensePerson.Nav_User" };
|
||||
//var entity = this.GetEntity<T_FO_CRUCIAL_LICENSE_JOB>(id);
|
||||
var entity = this.GetEntity<T_FO_CRUCIAL_LICENSE_JOB>(id,
|
||||
"Nav_OperationStep", "Nav_ApplyUser", "Nav_MonitorUser", "Nav_Files.Nav_ImgFile", "Nav_Department", "Nav_Risks");
|
||||
"Nav_OperationStep", "Nav_ApplyUser", "Nav_MonitorUser", "Nav_Files.Nav_ImgFile", "Nav_Department", "Nav_Risks", "Nav_Area");
|
||||
if (entity != null)
|
||||
{
|
||||
var newFilter = new BaseFilter(filter.OrgId);
|
||||
@ -594,22 +594,8 @@ namespace APT.FO.WebApi.Controllers
|
||||
return SafeGetPagedData<T_HM_OPERATION_STEP>((result) =>
|
||||
{
|
||||
var orgId = APT.Infrastructure.Api.AppContext.CurrentSession.OrgId.ToString();
|
||||
var mineType = APT.Infrastructure.Api.AppContext.CurrentSession.MineType;
|
||||
var tempList = mineType.Split(",").ToList();
|
||||
Expression<Func<T_HM_OPERATION_STEP, bool>> expressionStep = e => !e.IS_DELETED && e.STATUS == STATUSEnum.启用;
|
||||
Expression<Func<T_HM_OPERATION_LINK, bool>> expressionLink = t => !t.IS_DELETED && t.STATUS == (int)STATUSEnum.启用;
|
||||
if (tempList != null && tempList.Any())
|
||||
{
|
||||
var temp = tempList.FirstOrDefault(t => t == "0" || t.Contains("公司"));
|
||||
if (temp == null)
|
||||
{
|
||||
expressionLink = expressionLink.And(t => tempList.Contains(t.MineType.ToString()));
|
||||
}
|
||||
}
|
||||
if (orgId == "8b3c41aa-51b1-7ce9-1879-248a038c1b5c" || orgId == "d9871ba8-0eec-9e4a-bb87-7d5a540d8913")
|
||||
{
|
||||
expressionLink = expressionLink.And(t => t.TASK_LEVEL == 3 && t.CYCLE_TYPE == HMCycleTypeEnum.Need);
|
||||
}
|
||||
Expression<Func<T_HM_OPERATION_LINK, bool>> expressionLink = t => !t.IS_DELETED && t.STATUS == (int)STATUSEnum.启用 && t.TASK_LEVEL != 1;
|
||||
var operationLink = this.GetEntities<T_HM_OPERATION_LINK>(expressionLink, new BaseFilter(pageFilter.OrgId)).Select(t=>t.OPERATION_STEP_ID).Distinct().ToList();
|
||||
expressionStep = expressionStep.And(e => operationLink.Contains(e.ID));
|
||||
var info = this.GetOrderPageEntities<T_HM_OPERATION_STEP>(expressionStep, pageFilter, null);
|
||||
@ -865,7 +851,37 @@ namespace APT.FO.WebApi.Controllers
|
||||
var zbRoles = roles.FirstOrDefault(t => t.NAME.Contains("值班"));
|
||||
var sdRoles = roles.Where(t => t.NAME.Contains("属地")).ToList();
|
||||
var roleIds = sdRoles.Select(t => t.ID).ToList();
|
||||
if (zbRoles != null && approveTempDetail.APPROVE_ROLE_ID == zbRoles.ID)
|
||||
var approveRole = this.GetEntity<T_PF_APPROVAL_ROLE>(t => t.ID == approveTempDetail.APPROVE_ROLE_ID);
|
||||
if (approveRole != null && approveRole.NAME == "分管领导")
|
||||
{
|
||||
var user = users.FirstOrDefault(t => t.ID == loginUserId);
|
||||
if (user.DEPARTMENT_ID != null)
|
||||
{
|
||||
List<Guid> departmentIds = new List<Guid>();
|
||||
GetDepartmentId((Guid)user.DEPARTMENT_ID, ref departmentIds);
|
||||
if (departmentIds.Any())
|
||||
{
|
||||
var dep = GetEntity<T_FM_DEPARTMENT>(t => departmentIds.Contains(t.ID) && t.DEPARTMENT_TYPE == approveRole.DEPARTMENT_TYPE);
|
||||
if (dep != null && dep.CHARGEUSER_ID != null)
|
||||
{
|
||||
approveId = dep.CHARGEUSER_ID;
|
||||
}
|
||||
else
|
||||
{
|
||||
return approveId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return approveId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return approveId;
|
||||
}
|
||||
}
|
||||
else if (zbRoles != null && approveTempDetail.APPROVE_ROLE_ID == zbRoles.ID)
|
||||
{
|
||||
var job = this.GetEntity<T_FO_SCHEDULING>(t=>t.DATE.Date == DateTime.Now.Date);
|
||||
if (job != null)
|
||||
|
||||
@ -56,7 +56,7 @@ namespace APT.FO.WebApi.Controllers
|
||||
if (string.IsNullOrEmpty(id))
|
||||
this.ThrowError("060010");
|
||||
var entity = this.GetEntity<T_FO_CRUCIAL_LICENSE_JOB_OUTSOURCE>(id,
|
||||
"Nav_OperationStep", "Nav_ApplyUser", "Nav_MonitorUser", "Nav_Related", "Nav_Department","Nav_Risks");
|
||||
"Nav_OperationStep", "Nav_ApplyUser", "Nav_MonitorUser", "Nav_Related", "Nav_Department","Nav_Risks", "Nav_Area");
|
||||
if (entity != null)
|
||||
{
|
||||
var newFilter = new BaseFilter(filter.OrgId);
|
||||
@ -576,7 +576,37 @@ namespace APT.FO.WebApi.Controllers
|
||||
var zbRoles = roles.FirstOrDefault(t => t.NAME.Contains("值班"));
|
||||
var sdRoles = roles.Where(t => t.NAME.Contains("属地")).ToList();
|
||||
var roleIds = sdRoles.Select(t => t.ID).ToList();
|
||||
if (zbRoles != null && approveTempDetail.APPROVE_ROLE_ID == zbRoles.ID)
|
||||
var approveRole = this.GetEntity<T_PF_APPROVAL_ROLE>(t => t.ID == approveTempDetail.APPROVE_ROLE_ID);
|
||||
if (approveRole != null && approveRole.NAME == "分管领导")
|
||||
{
|
||||
var user = users.FirstOrDefault(t => t.ID == loginUserId);
|
||||
if (user.DEPARTMENT_ID != null)
|
||||
{
|
||||
List<Guid> departmentIds = new List<Guid>();
|
||||
GetDepartmentId((Guid)user.DEPARTMENT_ID, ref departmentIds);
|
||||
if (departmentIds.Any())
|
||||
{
|
||||
var dep = GetEntity<T_FM_DEPARTMENT>(t => departmentIds.Contains(t.ID) && t.DEPARTMENT_TYPE == approveRole.DEPARTMENT_TYPE);
|
||||
if (dep != null && dep.CHARGEUSER_ID != null)
|
||||
{
|
||||
approveId = dep.CHARGEUSER_ID;
|
||||
}
|
||||
else
|
||||
{
|
||||
return approveId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return approveId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return approveId;
|
||||
}
|
||||
}
|
||||
else if (zbRoles != null && approveTempDetail.APPROVE_ROLE_ID == zbRoles.ID)
|
||||
{
|
||||
var job = this.GetEntity<T_FO_SCHEDULING>(t => t.DATE.Date == DateTime.Now.Date);
|
||||
if (job != null)
|
||||
|
||||
@ -87,7 +87,7 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
entity.CLASS_TEAM_ID = team.ID;
|
||||
}
|
||||
}
|
||||
if (entity.CLASS_TEAM_ID == Guid.Empty || entity.DEPARTMENT_POST_ID == null)
|
||||
if (entity.DEPARTMENT_POST_ID == Guid.Empty || entity.DEPARTMENT_POST_ID == null)
|
||||
{
|
||||
entity.DEPARTMENT_POST_ID = currFMUser.Nav_Person.POST_ID;
|
||||
}
|
||||
|
||||
@ -87,16 +87,50 @@ namespace APT.FO.WebApi.Controllers
|
||||
}
|
||||
if (string.IsNullOrEmpty(entity.CODE))
|
||||
{
|
||||
entity.CODE = "DHZY" + DateTime.Now.ToShortDateString().Replace("/", "") + new Random().Next(1, 999);
|
||||
var num = "001";
|
||||
var record = this.GetEntities<T_FO_FIRE_JOB>(t => t.CREATE_TIME.Value.Date == DateTime.Now.Date,new BaseFilter(entity.ORG_ID)).OrderByDescending(m => m.CREATE_TIME).FirstOrDefault();
|
||||
if (record != null)
|
||||
{
|
||||
var codeTake = record.CODE.Substring(record.CODE.Length - 3).ToString();
|
||||
var temp = int.Parse(codeTake) + 1;
|
||||
num = temp.ToString().PadLeft(3, '0');
|
||||
}
|
||||
entity.CODE = "DHZY" + DateTime.Now.Date.ToString("yyyyMMdd") + num;
|
||||
}
|
||||
if (entity.FIRE_USER_ID == null)
|
||||
{
|
||||
throw new Exception("动火负责人必须填写");
|
||||
throw new Exception("施工单位负责人必须填写");
|
||||
}
|
||||
if (entity.SAFE_USER_ID == null)
|
||||
{
|
||||
throw new Exception("安全管理人员必须填写");
|
||||
}
|
||||
if (entity.JOB_DATE == null)
|
||||
{
|
||||
throw new Exception("计划开始时间必须填写");
|
||||
}
|
||||
if (entity.JOB_END_DATE == null)
|
||||
{
|
||||
throw new Exception("计划结束时间必须填写");
|
||||
}
|
||||
entity.ACT_DATE = entity.JOB_DATE;
|
||||
entity.ACT_END_DATE = entity.JOB_END_DATE;
|
||||
if (entity.JOB_END_DATE > entity.JOB_DATE.Value.AddHours(8))
|
||||
{
|
||||
throw new Exception("计划开始和计划结束时间不能超过8小时");
|
||||
}
|
||||
if (entity.ACT_DATE != null && entity.ACT_DATE < entity.JOB_DATE)
|
||||
{
|
||||
throw new Exception("动火实际开始时间不能早于计划开始时间");
|
||||
}
|
||||
if (entity.ACT_END_DATE!=null && entity.ACT_END_DATE > entity.JOB_END_DATE)
|
||||
{
|
||||
throw new Exception("动火实际结束时间不能晚于计划结束时间");
|
||||
}
|
||||
if (entity.LEAVE_DATE!=null && entity.ACT_END_DATE != null && entity.LEAVE_DATE < entity.ACT_END_DATE.Value.AddHours(1))
|
||||
{
|
||||
throw new Exception("离开现场时间必须大于实际动火结束时间1小时以上");
|
||||
}
|
||||
var details = entity.Nav_Details;
|
||||
if (details != null && details.Any())
|
||||
{
|
||||
@ -304,8 +338,8 @@ namespace APT.FO.WebApi.Controllers
|
||||
throw new Exception("动火实际结束时间必须填写");
|
||||
if (entity.LEAVE_DATE == null)
|
||||
throw new Exception("离开现场时间必须填写");
|
||||
if (monitorFileList == null || !monitorFileList.Any())
|
||||
throw new Exception("必须上传完工验收附件");
|
||||
//if (monitorFileList == null || !monitorFileList.Any())
|
||||
// throw new Exception("必须上传完工验收附件");
|
||||
var detailNeed = detailList.FirstOrDefault(t => (t.JOB_STEP == FOJobStepEnum.Ing && t.IS_CONFIRM_NEW == false) || (t.JOB_STEP == FOJobStepEnum.After && t.IS_CONFIRM_NEW == false));
|
||||
if (detailNeed != null)
|
||||
throw new Exception("作业中或作业后未全部确认!");
|
||||
@ -336,8 +370,8 @@ namespace APT.FO.WebApi.Controllers
|
||||
throw new Exception("不可动火请稍后再进行验收");
|
||||
if (entity.ACT_DATE == null)
|
||||
throw new Exception("动火实际开始时间必须填写");
|
||||
if (fireFileList == null || !fireFileList.Any())
|
||||
throw new Exception("必须上传现场条件验收附件");
|
||||
//if (fireFileList == null || !fireFileList.Any())
|
||||
// throw new Exception("必须上传现场条件验收附件");
|
||||
var detailNeed = detailList.FirstOrDefault(t => t.JOB_STEP == FOJobStepEnum.Pre && t.IS_CONFIRM_NEW == false);
|
||||
if (detailNeed != null)
|
||||
throw new Exception("作业前未全部确认!");
|
||||
@ -353,17 +387,17 @@ namespace APT.FO.WebApi.Controllers
|
||||
}
|
||||
else
|
||||
{
|
||||
//没有审阅人就触发给监护人填写
|
||||
var monitorUser = this.GetEntity<T_FM_USER>(t => t.ID == entity.MONITOR_USER_ID);
|
||||
//没有审阅人就触发给安全管理人员填写,原设计是监护人entity.MONITOR_USER_ID
|
||||
var monitorUser = this.GetEntity<T_FM_USER>(t => t.ID == entity.SAFE_USER_ID);
|
||||
if (monitorUser != null)
|
||||
{
|
||||
entity.FIRE_STATUS = FOFireStatus.Monitor;
|
||||
notices.Add(NotificationTaskService.InsertUserNoticeTaskModel("动火作业全程监护", entity.ID, entity.ORG_ID, monitorUser.ID, monitorUser.NAME, DateTime.Now,
|
||||
DateTime.Now.AddHours(24), (int)FMNoticeTypeEnum.消息, "FO043"));
|
||||
DateTime.Now.AddHours(24), (int)FMNoticeTypeEnum.消息, "FO043_2"));
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("监护人不能为空,请联系管理员补充填写");
|
||||
throw new Exception("安全管理人员不能为空,请联系管理员补充填写");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -379,11 +413,10 @@ namespace APT.FO.WebApi.Controllers
|
||||
sysFilter.OrgId = entity.ORG_ID;
|
||||
var codes = CodeRuleService.NewGenSerial(sysFilter);
|
||||
var serialCode = codes.Split(new char[] { ',' });
|
||||
var department = this.GetEntity<T_FM_DEPARTMENT>(t => t.ID == departmentId);
|
||||
var param = Enum.GetName(typeof(FMDepartmentType), department.DEPARTMENT_TYPE);
|
||||
if (department.DEPARTMENT_STATUS == 2)
|
||||
var param = "工作日";
|
||||
if (entity.IS_HOLIDAY == true)
|
||||
{
|
||||
param = "公司";
|
||||
param = "节假日";
|
||||
}
|
||||
MFlowPermitService.InsertApprove(serialCode[0], "FO043", param, entity.ID, "FO043_SHOWPRINT", entity.TaskID, true, () =>
|
||||
{
|
||||
@ -516,17 +549,17 @@ namespace APT.FO.WebApi.Controllers
|
||||
}
|
||||
if (fire.USER_DEAL_STATUS == FOUserShiftStatusEnum.已处理 && fire.SAFE_DEAL_STATUS == FOUserShiftStatusEnum.已处理 && fire.DISPATCH_DEAL_STATUS == FOUserShiftStatusEnum.已处理)
|
||||
{
|
||||
//触发给监护人填写
|
||||
var monitorUser = this.GetEntity<T_FM_USER>(t => t.ID == fire.MONITOR_USER_ID);
|
||||
//触发给安全管理人员填写
|
||||
var monitorUser = this.GetEntity<T_FM_USER>(t => t.ID == fire.SAFE_USER_ID);
|
||||
if (monitorUser != null)
|
||||
{
|
||||
fire.FIRE_STATUS = FOFireStatus.Monitor;
|
||||
notice = NotificationTaskService.InsertUserNoticeTaskModel("动火作业全程监护", fire.ID, fire.ORG_ID, monitorUser.ID, monitorUser.NAME, DateTime.Now,
|
||||
DateTime.Now.AddHours(24), (int)FMNoticeTypeEnum.消息, "FO043");
|
||||
DateTime.Now.AddHours(24), (int)FMNoticeTypeEnum.消息, "FO043_2");
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("监护人不能为空,请联系管理员补充填写");
|
||||
throw new Exception("安全管理人员不能为空,请联系管理员补充填写");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -366,6 +366,10 @@ namespace APT.FO.WebApi.Controllers
|
||||
users.ForEach(t => t.DEAL_STATUS = 1);
|
||||
//触发完工验收
|
||||
GetAutoNext(entity, ref notices);
|
||||
if (notices != null && notices.Any())
|
||||
{
|
||||
entity.FORM_STATUS = (int)FOTeamActivityState.完工验收;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -389,20 +393,32 @@ namespace APT.FO.WebApi.Controllers
|
||||
notices = NotificationTaskService.InsertUserNoticeTaskModels("作业活动记录表单(关键和许可作业)", entity.ID, entity.ORG_ID, userIds, UserNames, DateTime.Now,
|
||||
dtEnd, (int)FMNoticeTypeEnum.消息, "FO021_SHOWPRINT");
|
||||
//触发完工验收
|
||||
GetAutoNext(entity, ref notices);
|
||||
GetAutoNext(entity, ref notices);
|
||||
if (notices != null && notices.Any())
|
||||
{
|
||||
entity.FORM_STATUS = (int)FOTeamActivityState.完工验收;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
entity.FORM_STATUS = (int)FOTeamActivityState.已归档;
|
||||
//触发完工验收
|
||||
GetAutoNext(entity, ref notices);
|
||||
GetAutoNext(entity, ref notices);
|
||||
if (notices != null && notices.Any())
|
||||
{
|
||||
entity.FORM_STATUS = (int)FOTeamActivityState.完工验收;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//触发完工验收
|
||||
GetAutoNext(entity,ref notices);
|
||||
GetAutoNext(entity,ref notices);
|
||||
if (notices != null && notices.Any())
|
||||
{
|
||||
entity.FORM_STATUS = (int)FOTeamActivityState.完工验收;
|
||||
}
|
||||
}
|
||||
//查询消息表
|
||||
//var userID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
@ -615,12 +631,12 @@ namespace APT.FO.WebApi.Controllers
|
||||
var user = this.GetEntity<T_FO_JOB_ACTIVITY_PERSON>(t => t.JOB_ACTIVITY_RECORD_ID == entity.ID && t.USER_ID == userID, new BaseFilter(orgId));
|
||||
user.DEAL_STATUS = (int)FOUserShiftStatusEnum.已处理;
|
||||
var todoCount = this.GetCount<T_FO_JOB_ACTIVITY_PERSON>(t => t.JOB_ACTIVITY_RECORD_ID == entity.ID && t.DEAL_STATUS == 0 && t.USER_ID != userID, new BaseFilter(orgId));
|
||||
T_FO_JOB_ACTIVITY_RECORD model = null;
|
||||
//T_FO_JOB_ACTIVITY_RECORD model = null;
|
||||
//List<T_FM_NOTIFICATION_TASK> notices = new List<T_FM_NOTIFICATION_TASK>();
|
||||
if (todoCount == 0)
|
||||
{
|
||||
model = GetEntity<T_FO_JOB_ACTIVITY_RECORD>(entity.ID.ToString());
|
||||
model.FORM_STATUS = (int)FOTeamActivityState.已归档;
|
||||
//model = GetEntity<T_FO_JOB_ACTIVITY_RECORD>(entity.ID.ToString());
|
||||
//model.FORM_STATUS = (int)FOTeamActivityState.已归档;
|
||||
//触发完工验收
|
||||
//var userIds = new List<Guid>();
|
||||
//var record = this.GetEntity<T_FO_JOB_ACTIVITY_RECORD>(t=>t.ID == entity.ID);
|
||||
@ -663,8 +679,8 @@ namespace APT.FO.WebApi.Controllers
|
||||
}
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (model != null)
|
||||
UpdateEntityNoCommit(model);
|
||||
//if (model != null)
|
||||
// UpdateEntityNoCommit(model);
|
||||
if (task != null)
|
||||
this.UpdateEntityNoCommit(task);
|
||||
if (user != null)
|
||||
@ -698,10 +714,18 @@ namespace APT.FO.WebApi.Controllers
|
||||
task = NotificationTaskService.GetTaskFinishModel(entity.TaskID);
|
||||
task.SOURCE_FORMCODE = "FO022_SHOWPRINT";
|
||||
}
|
||||
var record = this.GetEntity<T_FO_JOB_ACTIVITY_RECORD>(t => t.ID == entity.ID);
|
||||
var taskFinish = GetEntity<T_FM_NOTIFICATION_TASK>(t => t.SOURCE_DATA_ID == entity.ID && t.ID != entity.TaskID && t.NOTICE_STATUS == 0 && t.NOTICE_TITLE.Contains("完工验收"));
|
||||
if (taskFinish == null)
|
||||
{
|
||||
record.FORM_STATUS = (int)FOTeamActivityState.已归档;
|
||||
}
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (task != null)
|
||||
this.UpdateEntityNoCommit(task);
|
||||
this.UpdateEntityNoCommit(task);
|
||||
if (record != null)
|
||||
this.UpdateEntityNoCommit(record);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
|
||||
@ -110,10 +110,12 @@ namespace APT.FO.WebApi.Controllers
|
||||
entity.Nav_Users = null;
|
||||
if (users != null && users.Any())
|
||||
{
|
||||
foreach (var item in users)
|
||||
foreach (var use in users.Where(t=>!t.IS_DELETED))
|
||||
{
|
||||
T_FO_LEADER_WELL_RECORD_USER item = new T_FO_LEADER_WELL_RECORD_USER();
|
||||
item.ORG_ID = entity.ORG_ID;
|
||||
item.LEADER_WELL_RECORD_ID = entity.ID;
|
||||
item.USER_ID = use.USER_ID;
|
||||
item.Nav_User = null;
|
||||
if (item.USER_ID == loginUserId)
|
||||
{
|
||||
@ -123,16 +125,19 @@ namespace APT.FO.WebApi.Controllers
|
||||
}
|
||||
}
|
||||
var afterUsers = entity.Nav_AfterUsers;
|
||||
entity.Nav_AfterUsers = null;
|
||||
if (afterUsers != null && afterUsers.Any())
|
||||
{
|
||||
afterUsers = afterUsers.Where(t => !t.IS_DELETED).ToList();
|
||||
}
|
||||
if (afterUsers != null && afterUsers.Any())
|
||||
{
|
||||
foreach (var item in afterUsers)
|
||||
foreach (var after in afterUsers)
|
||||
{
|
||||
T_FO_LEADER_WELL_RECORD_AFTERUSER item = new T_FO_LEADER_WELL_RECORD_AFTERUSER();
|
||||
item.ORG_ID = entity.ORG_ID;
|
||||
item.LEADER_WELL_RECORD_ID = entity.ID;
|
||||
item.AFTER_USER_ID = after.AFTER_USER_ID;
|
||||
item.Nav_AfterUser = null;
|
||||
afterUserList.Add(item);
|
||||
}
|
||||
@ -147,22 +152,42 @@ namespace APT.FO.WebApi.Controllers
|
||||
{
|
||||
foreach (var item in details)
|
||||
{
|
||||
T_FO_LEADER_WELL_RECORD_DETAIL de = new T_FO_LEADER_WELL_RECORD_DETAIL();
|
||||
de.ORG_ID = entity.ORG_ID;
|
||||
de.LEADER_WELL_RECORD_ID = entity.ID;
|
||||
de.START_DATE = item.START_DATE;
|
||||
de.END_DATE = item.END_DATE;
|
||||
de.USER_ID = item.USER_ID;
|
||||
de.DESCRIPTION = item.DESCRIPTION;
|
||||
de.QUESTION = item.QUESTION;
|
||||
de.MEASURE = item.MEASURE;
|
||||
de.ITEM = item.ITEM;
|
||||
de.PLACE = item.PLACE;
|
||||
if (de.USER_ID == loginUserId)
|
||||
{
|
||||
de.USER_DEAL_STATUS = MS.Domain.Enums.FOUserShiftStatusEnum.已处理;
|
||||
}
|
||||
detailList.Add(de);
|
||||
if (item.Nav_DetailFiles != null && item.Nav_DetailFiles.Any())
|
||||
{
|
||||
foreach (var item2 in item.Nav_DetailFiles)
|
||||
foreach (var file in item.Nav_DetailFiles.Where(t=>!t.IS_DELETED))
|
||||
{
|
||||
T_FO_LEADER_WELL_RECORD_DETAIL_FILE item2 = new T_FO_LEADER_WELL_RECORD_DETAIL_FILE();
|
||||
item2.ORG_ID = entity.ORG_ID;
|
||||
item2.LEADER_WELL_RECORD_DETAIL_ID = item.ID;
|
||||
item2.LEADER_WELL_RECORD_DETAIL_ID = de.ID;
|
||||
item2.Nav_ImgFile = null;
|
||||
item2.IMG_FILE_ID = file.IMG_FILE_ID;
|
||||
detailFileList.Add(item2);
|
||||
}
|
||||
}
|
||||
if (item.Nav_DetailAreas != null && item.Nav_DetailAreas.Any())
|
||||
{
|
||||
foreach (var item2 in item.Nav_DetailAreas)
|
||||
foreach (var area in item.Nav_DetailAreas.Where(t=>!t.IS_DELETED))
|
||||
{
|
||||
T_FO_LEADER_WELL_RECORD_DETAIL_AREA item2 = new T_FO_LEADER_WELL_RECORD_DETAIL_AREA();
|
||||
item2.ORG_ID = entity.ORG_ID;
|
||||
item2.LEADER_WELL_RECORD_DETAIL_ID = item.ID;
|
||||
item2.LEADER_WELL_RECORD_DETAIL_ID = de.ID;
|
||||
item2.AREA_ID = area.AREA_ID;
|
||||
item2.Nav_Area = null;
|
||||
detailAreaList.Add(item2);
|
||||
}
|
||||
@ -212,14 +237,7 @@ namespace APT.FO.WebApi.Controllers
|
||||
// detailAfterUserList.Add(item2);
|
||||
// }
|
||||
//}
|
||||
item.ORG_ID = entity.ORG_ID;
|
||||
item.LEADER_WELL_RECORD_ID = entity.ID;
|
||||
item.Nav_DetailFiles = null;
|
||||
if (item.USER_ID == loginUserId)
|
||||
{
|
||||
item.USER_DEAL_STATUS = MS.Domain.Enums.FOUserShiftStatusEnum.已处理;
|
||||
}
|
||||
detailList.Add(item);
|
||||
|
||||
}
|
||||
}
|
||||
var files = entity.Nav_Files;
|
||||
@ -230,15 +248,18 @@ namespace APT.FO.WebApi.Controllers
|
||||
entity.Nav_Files = null;
|
||||
if (files != null && files.Any())
|
||||
{
|
||||
foreach (var item in files)
|
||||
foreach (var file in files)
|
||||
{
|
||||
T_FO_LEADER_WELL_RECORD_FILE item = new T_FO_LEADER_WELL_RECORD_FILE();
|
||||
item.ORG_ID = entity.ORG_ID;
|
||||
item.LEADER_WELL_RECORD_ID = entity.ID;
|
||||
item.IMG_FILE_ID = file.IMG_FILE_ID;
|
||||
item.Nav_ImgFile = null;
|
||||
fileList.Add(item);
|
||||
}
|
||||
}
|
||||
entity.STATUS = FOStatusEnum.Draft;
|
||||
T_FM_NOTIFICATION_TASK task = null;
|
||||
var sendNotices = new List<T_FM_NOTIFICATION_TASK>();
|
||||
if (entity.PUBLISH != null && entity.PUBLISH.Equals("SaveAndNotify"))
|
||||
{
|
||||
@ -263,7 +284,7 @@ namespace APT.FO.WebApi.Controllers
|
||||
}
|
||||
else
|
||||
{
|
||||
var sendAfterUserIds = afterUserList.Where(t => t.AFTER_USER_ID != loginUserId && t.AFTER_USER_ID != null).Select(m => (Guid)m.AFTER_USER_ID).Distinct().ToList();
|
||||
var sendAfterUserIds = afterUserList.Where(t => t.AFTER_USER_ID != null).Select(m => (Guid)m.AFTER_USER_ID).Distinct().ToList();
|
||||
if (sendAfterUserIds != null && sendAfterUserIds.Any())
|
||||
{
|
||||
//触发给接班人签字确认
|
||||
@ -273,7 +294,12 @@ namespace APT.FO.WebApi.Controllers
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (entity.TaskID != Guid.Empty)
|
||||
{
|
||||
task = NotificationTaskService.GetTaskFinishModel(entity.TaskID);
|
||||
task.SOURCE_FORMCODE = "FO041_SHOWPRINT";
|
||||
}
|
||||
}
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
@ -309,6 +335,8 @@ namespace APT.FO.WebApi.Controllers
|
||||
this.BantchSaveEntityNoCommit(fileList);
|
||||
if (sendNotices != null && sendNotices.Any())
|
||||
this.BantchSaveEntityNoCommit(sendNotices);
|
||||
if (task != null)
|
||||
this.UpdateEntityNoCommit(task);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
@ -360,7 +388,7 @@ namespace APT.FO.WebApi.Controllers
|
||||
}
|
||||
else
|
||||
{
|
||||
var afterUserIds = this.GetEntities<T_FO_LEADER_WELL_RECORD_AFTERUSER>(t => t.LEADER_WELL_RECORD_ID == record.ID && t.AFTER_USER_ID != userID && t.AFTER_USER_ID != null, new BaseFilter(orgId)).Select(m => (Guid)m.AFTER_USER_ID).Distinct().ToList();
|
||||
var afterUserIds = this.GetEntities<T_FO_LEADER_WELL_RECORD_AFTERUSER>(t => t.LEADER_WELL_RECORD_ID == record.ID && t.AFTER_USER_ID != null, new BaseFilter(orgId)).Select(m => (Guid)m.AFTER_USER_ID).Distinct().ToList();
|
||||
if (afterUserIds != null && afterUserIds.Any())
|
||||
{
|
||||
//触发给接班人签字确认
|
||||
@ -387,7 +415,7 @@ namespace APT.FO.WebApi.Controllers
|
||||
if (todoCount == 0)
|
||||
{
|
||||
var detailIds = details.Select(m => m.ID).ToList();
|
||||
var afterUserIds = this.GetEntities<T_FO_LEADER_WELL_RECORD_AFTERUSER>(t => t.LEADER_WELL_RECORD_ID == record.ID && t.AFTER_USER_ID != userID && t.AFTER_USER_ID != null, new BaseFilter(orgId)).Select(m => (Guid)m.AFTER_USER_ID).Distinct().ToList();
|
||||
var afterUserIds = this.GetEntities<T_FO_LEADER_WELL_RECORD_AFTERUSER>(t => t.LEADER_WELL_RECORD_ID == record.ID && t.AFTER_USER_ID != null, new BaseFilter(orgId)).Select(m => (Guid)m.AFTER_USER_ID).Distinct().ToList();
|
||||
if (afterUserIds != null && afterUserIds.Any())
|
||||
{
|
||||
//触发给接班人签字确认
|
||||
|
||||
@ -159,8 +159,8 @@ namespace APT.FO.WebApi.Controllers.Api.FO
|
||||
else
|
||||
{
|
||||
var currTeam = GetEntity<T_FM_TEAM>(t => t.DEPARTMENT_ID == entity.DEPARTMENT_ID);
|
||||
entity.TEAM_ID = currTeam.ID;
|
||||
TeamName = currTeam.NAME;
|
||||
entity.TEAM_ID = currTeam?.ID;
|
||||
TeamName = currTeam?.NAME;
|
||||
}
|
||||
if (entity.NAME == null)
|
||||
{
|
||||
|
||||
@ -84,11 +84,12 @@ namespace APT.FO.WebApi.Controllers
|
||||
{
|
||||
if (item.Nav_DetailFiles != null && item.Nav_DetailFiles.Any())
|
||||
{
|
||||
foreach (var item2 in item.Nav_DetailFiles)
|
||||
foreach (var file in item.Nav_DetailFiles)
|
||||
{
|
||||
T_FO_PROFESSIONAL_RESUME_DETAIL_FILE item2 = new T_FO_PROFESSIONAL_RESUME_DETAIL_FILE();
|
||||
item2.ORG_ID = entity.ORG_ID;
|
||||
item2.PROFESSIONAL_RESUME_DETAIL_ID = item.ID;
|
||||
item2.Nav_ImgFile = null;
|
||||
item2.IMG_FILE_ID = file.IMG_FILE_ID;
|
||||
detailFileList.Add(item2);
|
||||
}
|
||||
}
|
||||
@ -108,11 +109,12 @@ namespace APT.FO.WebApi.Controllers
|
||||
var educationalList = new List<T_FO_PROFESSIONAL_RESUME_EDUCATIONAL_FILE>();
|
||||
if (educationals != null && educationals.Any())
|
||||
{
|
||||
foreach (var item in educationals)
|
||||
foreach (var file in educationals)
|
||||
{
|
||||
T_FO_PROFESSIONAL_RESUME_EDUCATIONAL_FILE item = new T_FO_PROFESSIONAL_RESUME_EDUCATIONAL_FILE();
|
||||
item.ORG_ID = entity.ORG_ID;
|
||||
item.PROFESSIONAL_RESUME_ID = entity.ID;
|
||||
item.Nav_ImgFile = null;
|
||||
item.IMG_FILE_ID = file.IMG_FILE_ID;
|
||||
educationalList.Add(item);
|
||||
}
|
||||
}
|
||||
@ -126,11 +128,12 @@ namespace APT.FO.WebApi.Controllers
|
||||
var postList = new List<T_FO_PROFESSIONAL_RESUME_POST_FILE>();
|
||||
if (posts != null && posts.Any())
|
||||
{
|
||||
foreach (var item in posts)
|
||||
foreach (var file in posts)
|
||||
{
|
||||
T_FO_PROFESSIONAL_RESUME_POST_FILE item = new T_FO_PROFESSIONAL_RESUME_POST_FILE();
|
||||
item.ORG_ID = entity.ORG_ID;
|
||||
item.PROFESSIONAL_RESUME_ID = entity.ID;
|
||||
item.Nav_ImgFile = null;
|
||||
item.IMG_FILE_ID = file.IMG_FILE_ID;
|
||||
postList.Add(item);
|
||||
}
|
||||
}
|
||||
@ -144,11 +147,12 @@ namespace APT.FO.WebApi.Controllers
|
||||
var certificateList = new List<T_FO_PROFESSIONAL_RESUME_CERTIFICATE_FILE>();
|
||||
if (certificates != null && certificates.Any())
|
||||
{
|
||||
foreach (var item in certificates)
|
||||
foreach (var file in certificates)
|
||||
{
|
||||
T_FO_PROFESSIONAL_RESUME_CERTIFICATE_FILE item = new T_FO_PROFESSIONAL_RESUME_CERTIFICATE_FILE();
|
||||
item.ORG_ID = entity.ORG_ID;
|
||||
item.PROFESSIONAL_RESUME_ID = entity.ID;
|
||||
item.Nav_ImgFile = null;
|
||||
item.IMG_FILE_ID = file.IMG_FILE_ID;
|
||||
certificateList.Add(item);
|
||||
}
|
||||
}
|
||||
@ -162,11 +166,12 @@ namespace APT.FO.WebApi.Controllers
|
||||
var medicalList = new List<T_FO_PROFESSIONAL_RESUME_MEDICAL_FILE>();
|
||||
if (medicals != null && medicals.Any())
|
||||
{
|
||||
foreach (var item in medicals)
|
||||
foreach (var file in medicals)
|
||||
{
|
||||
T_FO_PROFESSIONAL_RESUME_MEDICAL_FILE item = new T_FO_PROFESSIONAL_RESUME_MEDICAL_FILE();
|
||||
item.ORG_ID = entity.ORG_ID;
|
||||
item.PROFESSIONAL_RESUME_ID = entity.ID;
|
||||
item.Nav_ImgFile = null;
|
||||
item.IMG_FILE_ID = file.IMG_FILE_ID;
|
||||
medicalList.Add(item);
|
||||
}
|
||||
}
|
||||
@ -180,11 +185,12 @@ namespace APT.FO.WebApi.Controllers
|
||||
var trainList = new List<T_FO_PROFESSIONAL_RESUME_TRAIN_FILE>();
|
||||
if (trains != null && trains.Any())
|
||||
{
|
||||
foreach (var item in trains)
|
||||
foreach (var file in trains)
|
||||
{
|
||||
T_FO_PROFESSIONAL_RESUME_TRAIN_FILE item = new T_FO_PROFESSIONAL_RESUME_TRAIN_FILE();
|
||||
item.ORG_ID = entity.ORG_ID;
|
||||
item.PROFESSIONAL_RESUME_ID = entity.ID;
|
||||
item.Nav_ImgFile = null;
|
||||
item.IMG_FILE_ID = file.IMG_FILE_ID;
|
||||
trainList.Add(item);
|
||||
}
|
||||
}
|
||||
@ -198,11 +204,12 @@ namespace APT.FO.WebApi.Controllers
|
||||
var otherList = new List<T_FO_PROFESSIONAL_RESUME_OTHER_FILE>();
|
||||
if (others != null && others.Any())
|
||||
{
|
||||
foreach (var item in others)
|
||||
foreach (var file in others)
|
||||
{
|
||||
T_FO_PROFESSIONAL_RESUME_OTHER_FILE item = new T_FO_PROFESSIONAL_RESUME_OTHER_FILE();
|
||||
item.ORG_ID = entity.ORG_ID;
|
||||
item.PROFESSIONAL_RESUME_ID = entity.ID;
|
||||
item.Nav_ImgFile = null;
|
||||
item.IMG_FILE_ID = file.IMG_FILE_ID;
|
||||
otherList.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
290
APT.MicroApi/APT.FO.WebApi/Controllers/SchedulingController.cs
Normal file
290
APT.MicroApi/APT.FO.WebApi/Controllers/SchedulingController.cs
Normal file
@ -0,0 +1,290 @@
|
||||
using APT.BaseData.Domain.ApiModel;
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.FO;
|
||||
using APT.MS.Domain.Entities.SC;
|
||||
using APT.MS.Domain.Entities.SC.SC;
|
||||
using APT.MS.Domain.Enums;
|
||||
using APT.Utility;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace APT.FO.WebApi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 工作票排班明细
|
||||
/// </summary>
|
||||
[Route("api/FO/FOScheduling")]
|
||||
public partial class SchedulingController : AuthorizeApiController<T_FO_SCHEDULING>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取导入数据
|
||||
/// 参考 [Route("api/PF/Import")]
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("GetImportData")]
|
||||
public JsonActionResult<ImportDataModel> GetImportData()
|
||||
{
|
||||
return SafeExecute<ImportDataModel>(() =>
|
||||
{
|
||||
var orgId = APT.Infrastructure.Api.AppContext.CurrentSession.OrgId;
|
||||
var httpRequest = this.HttpContext.Request;
|
||||
string orgIdStr = httpRequest.Form["OrgId"];// 获取 组织
|
||||
ImportDataModel result = new ImportDataModel();
|
||||
var dic = Path.Combine(System.AppContext.BaseDirectory, "tempImportFiles");
|
||||
if (!Directory.Exists(dic))
|
||||
Directory.CreateDirectory(dic);
|
||||
foreach (var key in httpRequest.Form.Files) // 文件键
|
||||
{
|
||||
var postedFile = key; // 获取文件键对应的文件对象
|
||||
string filePath = Path.Combine(dic, DateTime.Now.ToString("yyyy_MM_dd_hh_mm_ss") + "_" + postedFile.FileName);
|
||||
Byte[] fileData = new Byte[postedFile.Length];
|
||||
Stream sr = postedFile.OpenReadStream();//创建数据流对象
|
||||
sr.Read(fileData, 0, (int)postedFile.Length);
|
||||
using (FileStream fs = new FileStream(filePath, FileMode.CreateNew))
|
||||
{
|
||||
fs.Write(fileData, 0, fileData.Length);
|
||||
fs.Flush();
|
||||
fs.Close();
|
||||
}
|
||||
|
||||
//获取数据
|
||||
Dictionary<int, int> startRowIndexs = new Dictionary<int, int>();
|
||||
startRowIndexs.Add(0, 1);//根据Excel格式数据赋值
|
||||
var dataTables = FileUtils.ReadExcelByOledb(filePath, startRowIndexs);
|
||||
string Msg = string.Empty;
|
||||
|
||||
bool isOK = InsertModel(dataTables.Tables[0], orgId, ref Msg);
|
||||
|
||||
try
|
||||
{
|
||||
System.IO.File.Delete(filePath);
|
||||
}
|
||||
catch { }
|
||||
|
||||
result.Data = Msg;
|
||||
result.MessageList = new List<string> { Msg };
|
||||
}
|
||||
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 数据插入
|
||||
/// </summary>
|
||||
/// <param name="dtSource"></param>
|
||||
/// <param name="orgId"></param>
|
||||
/// <param name="Msg"></param>
|
||||
/// <param name="rowIndex"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="Exception"></exception>
|
||||
public bool InsertModel(DataTable dtSource, Guid? orgId, ref string Msg, int rowIndex = 1)
|
||||
{
|
||||
if (dtSource == null || dtSource.Rows.Count < rowIndex)
|
||||
{
|
||||
Msg = "未获取到导入数据";
|
||||
throw new Exception(Msg);
|
||||
}
|
||||
int rowAll = dtSource.Rows.Count;
|
||||
if (!string.IsNullOrEmpty(Msg))
|
||||
{
|
||||
throw new Exception(Msg);
|
||||
}
|
||||
var newFilter = new BaseFilter(orgId);
|
||||
newFilter.SelectField = new List<string> { "NAME" };
|
||||
var fmClass = this.GetEntities<T_FM_CLASS>(t => !t.IS_DELETED, newFilter, "Nav_ClassDetail");
|
||||
var users = GetEntities<T_FM_USER>(t => t.IS_DELETED == false && t.ENABLE_STATUS == 0, new BaseFilter(orgId));
|
||||
if (dtSource.Rows.Count == 1)
|
||||
{
|
||||
throw new Exception("导入必须两条以上,一条请直接新增");
|
||||
}
|
||||
for (int i = 0; i < rowAll; i++)
|
||||
{
|
||||
if (string.IsNullOrEmpty(dtSource.Rows[i][0].ToString().Trim()))
|
||||
{
|
||||
if (string.IsNullOrEmpty(Msg))
|
||||
Msg = "第"+(i+1)+"行第1列:日期不能为空";
|
||||
else
|
||||
Msg = Msg + "\n" + "第" + (i + 1) + "行第1列:日期不能为空";
|
||||
}
|
||||
if (string.IsNullOrEmpty(dtSource.Rows[i][1].ToString().Trim()))
|
||||
{
|
||||
if (string.IsNullOrEmpty(Msg))
|
||||
Msg = "第" + (i + 1) + "行第2列:班次不能为空";
|
||||
else
|
||||
Msg = Msg + "\n" + "第" + (i + 1) + "行第2列:班次不能为空";
|
||||
}
|
||||
else
|
||||
{
|
||||
var firstClass = fmClass.FirstOrDefault(t => t.NAME == dtSource.Rows[i][1].ToString().Trim());
|
||||
if (firstClass == null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(Msg))
|
||||
Msg = "第" + (i + 1) + "行第2列:班次未找到,请先到班次管理添加";
|
||||
else
|
||||
Msg = Msg + "\n" + "第" + (i + 1) + "行第2列:班次未找到,请先到班次管理添加";
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrEmpty(dtSource.Rows[i][2].ToString().Trim()))
|
||||
{
|
||||
if (string.IsNullOrEmpty(Msg))
|
||||
Msg = "第" + (i + 1) + "行第3列:带班领导不能为空";
|
||||
else
|
||||
Msg = Msg + "\n" + "第" + (i + 1) + "行第3列:带班领导不能为空";
|
||||
}
|
||||
else
|
||||
{
|
||||
var firstUser = users.FirstOrDefault(t => t.NAME == dtSource.Rows[i][2].ToString().Trim());
|
||||
if (firstUser == null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(Msg))
|
||||
Msg = "第" + (i + 1) + "行第3列:带班领导未找到,请先到用户列表添加";
|
||||
else
|
||||
Msg = Msg + "\n" + "第" + (i + 1) + "行第3列:带班领导未找到,请先到用户列表添加";
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrEmpty(dtSource.Rows[i][5].ToString().Trim()))
|
||||
{
|
||||
if (string.IsNullOrEmpty(Msg))
|
||||
Msg = "第" + (i + 1) + "行第6列:班次不能为空";
|
||||
else
|
||||
Msg = Msg + "\n" + "第" + (i + 1) + "行第6列:班次不能为空";
|
||||
}
|
||||
else
|
||||
{
|
||||
var firstClass = fmClass.FirstOrDefault(t => t.NAME == dtSource.Rows[i][5].ToString().Trim());
|
||||
if (firstClass == null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(Msg))
|
||||
Msg = "第" + (i + 1) + "行第6列:班次未找到,请先到班次管理添加";
|
||||
else
|
||||
Msg = Msg + "\n" + "第" + (i + 1) + "行第6列:班次未找到,请先到班次管理添加";
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrEmpty(dtSource.Rows[i][6].ToString().Trim()))
|
||||
{
|
||||
if (string.IsNullOrEmpty(Msg))
|
||||
Msg = "第" + (i + 1) + "行第7列:带班领导不能为空";
|
||||
else
|
||||
Msg = Msg + "\n" + "第" + (i + 1) + "行第7列:带班领导不能为空";
|
||||
}
|
||||
else
|
||||
{
|
||||
var firstUser = users.FirstOrDefault(t => t.NAME == dtSource.Rows[i][6].ToString().Trim());
|
||||
if (firstUser == null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(Msg))
|
||||
Msg = "第" + (i + 1) + "行第7列:带班领导未找到,请先到用户列表添加";
|
||||
else
|
||||
Msg = Msg + "\n" + "第" + (i + 1) + "行第7列:带班领导未找到,请先到用户列表添加";
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrEmpty(dtSource.Rows[i][9].ToString().Trim()))
|
||||
{
|
||||
if (string.IsNullOrEmpty(Msg))
|
||||
Msg = "第" + (i + 1) + "行第10列:班次不能为空";
|
||||
else
|
||||
Msg = Msg + "\n" + "第" + (i + 1) + "行第10列:班次不能为空";
|
||||
}
|
||||
else
|
||||
{
|
||||
var firstClass = fmClass.FirstOrDefault(t => t.NAME == dtSource.Rows[i][9].ToString().Trim());
|
||||
if (firstClass == null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(Msg))
|
||||
Msg = "第" + (i + 1) + "行第10列:班次未找到,请先到班次管理添加";
|
||||
else
|
||||
Msg = Msg + "\n" + "第" + (i + 1) + "行第10列:班次未找到,请先到班次管理添加";
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrEmpty(dtSource.Rows[i][10].ToString().Trim()))
|
||||
{
|
||||
if (string.IsNullOrEmpty(Msg))
|
||||
Msg = "第" + (i + 1) + "行第11列:带班领导不能为空";
|
||||
else
|
||||
Msg = Msg + "\n" + "第" + (i + 1) + "行第11列:带班领导不能为空";
|
||||
}
|
||||
else
|
||||
{
|
||||
var firstUser = users.FirstOrDefault(t => t.NAME == dtSource.Rows[i][10].ToString().Trim());
|
||||
if (firstUser == null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(Msg))
|
||||
Msg = "第" + (i + 1) + "行第11列:带班领导未找到,请先到用户列表添加";
|
||||
else
|
||||
Msg = Msg + "\n" + "第" + (i + 1) + "行第11列:带班领导未找到,请先到用户列表添加";
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Msg))
|
||||
{
|
||||
throw new Exception(Msg);
|
||||
}
|
||||
var classFirst = fmClass.FirstOrDefault(t => t.NAME == dtSource.Rows[0][1].ToString().Trim());
|
||||
var classScond = fmClass.FirstOrDefault(t => t.NAME == dtSource.Rows[0][5].ToString().Trim());
|
||||
var classThird = fmClass.FirstOrDefault(t => t.NAME == dtSource.Rows[0][9].ToString().Trim());
|
||||
List<T_FO_SCHEDULING> sches = new List<T_FO_SCHEDULING>();
|
||||
string[] Day = new string[] { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" };
|
||||
for (int i = 0; i < rowAll; i++)
|
||||
{
|
||||
var firstUser = users.FirstOrDefault(t => t.NAME == dtSource.Rows[i][2].ToString().Trim());
|
||||
var techUser = users.FirstOrDefault(t => t.NAME == dtSource.Rows[i][3].ToString().Trim());
|
||||
var driverUser = users.FirstOrDefault(t => t.NAME == dtSource.Rows[i][4].ToString().Trim());
|
||||
var scondUser = users.FirstOrDefault(t => t.NAME == dtSource.Rows[i][6].ToString().Trim());
|
||||
var techScondUser = users.FirstOrDefault(t => t.NAME == dtSource.Rows[i][7].ToString().Trim());
|
||||
var driverScondUser = users.FirstOrDefault(t => t.NAME == dtSource.Rows[i][8].ToString().Trim());
|
||||
var thirdUser = users.FirstOrDefault(t => t.NAME == dtSource.Rows[i][10].ToString().Trim());
|
||||
var techThirdUser = users.FirstOrDefault(t => t.NAME == dtSource.Rows[i][11].ToString().Trim());
|
||||
var driverThirdUser = users.FirstOrDefault(t => t.NAME == dtSource.Rows[i][12].ToString().Trim());
|
||||
T_FO_SCHEDULING sche = new T_FO_SCHEDULING();
|
||||
sche.ID = Guid.NewGuid();
|
||||
sche.ORG_ID = orgId;
|
||||
sche.DATE = Convert.ToDateTime(dtSource.Rows[i][0].ToString().Trim());
|
||||
sche.USER_ID = firstUser.ID;
|
||||
sche.TECH_ID = techUser?.ID;
|
||||
sche.DRIVER_ID = driverUser?.ID;
|
||||
sche.CLASS_ID = classFirst.ID;
|
||||
sche.REMARK = dtSource.Rows[i][13].ToString().Trim();
|
||||
sche.WEEK = Day[Convert.ToInt32(sche.DATE.DayOfWeek.ToString("d"))].ToString().Trim();
|
||||
sches.Add(sche);
|
||||
T_FO_SCHEDULING sche2 = new T_FO_SCHEDULING();
|
||||
sche2.ID = Guid.NewGuid();
|
||||
sche2.ORG_ID = orgId;
|
||||
sche2.DATE = Convert.ToDateTime(dtSource.Rows[i][0].ToString().Trim());
|
||||
sche2.USER_ID = scondUser.ID;
|
||||
sche2.TECH_ID = techScondUser?.ID;
|
||||
sche2.DRIVER_ID = driverScondUser?.ID;
|
||||
sche2.CLASS_ID = classScond.ID;
|
||||
sche2.REMARK = dtSource.Rows[i][13].ToString().Trim();
|
||||
sche2.WEEK = Day[Convert.ToInt32(sche.DATE.DayOfWeek.ToString("d"))].ToString().Trim();
|
||||
sches.Add(sche2);
|
||||
T_FO_SCHEDULING sche3 = new T_FO_SCHEDULING();
|
||||
sche3.ID = Guid.NewGuid();
|
||||
sche3.ORG_ID = orgId;
|
||||
sche3.DATE = Convert.ToDateTime(dtSource.Rows[i][0].ToString().Trim());
|
||||
sche3.USER_ID = thirdUser.ID;
|
||||
sche3.TECH_ID = techThirdUser?.ID;
|
||||
sche3.DRIVER_ID = driverThirdUser?.ID;
|
||||
sche3.CLASS_ID = classThird.ID;
|
||||
sche3.REMARK = dtSource.Rows[i][13].ToString().Trim();
|
||||
sche3.WEEK = Day[Convert.ToInt32(sche.DATE.DayOfWeek.ToString("d"))].ToString().Trim();
|
||||
sches.Add(sche3);
|
||||
}
|
||||
UnifiedCommit(() =>
|
||||
{
|
||||
if (sches != null && sches.Any())
|
||||
BantchAddEntityNoCommit(sches);
|
||||
});
|
||||
//Msg = "导入成功!";
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -68,7 +68,7 @@ namespace APT.FO.WebApi.Controllers
|
||||
var id = filter.FilterGroup.Rules.FirstOrDefault(t => t.Field == "ID").Value.ToString();
|
||||
if (string.IsNullOrEmpty(id))
|
||||
this.ThrowError("060010");
|
||||
var entity = this.GetEntity<T_FO_TECH_DISCLOSURE_FROM>(id, "Nav_OperationStep", "Nav_JobName", "Nav_JobNameOut", "Nav_DisclosurePerson");
|
||||
var entity = this.GetEntity<T_FO_TECH_DISCLOSURE_FROM>(id, "Nav_OperationStep", "Nav_JobName", "Nav_JobNameOut", "Nav_DisclosurePerson", "Nav_Files.Nav_ImgFile");
|
||||
if (entity != null)
|
||||
{
|
||||
var newFilter = new BaseFilter(filter.OrgId);
|
||||
@ -96,7 +96,14 @@ namespace APT.FO.WebApi.Controllers
|
||||
{
|
||||
persons = persons.Where(t => !t.IS_DELETED && t.USER_ID != null).ToList();
|
||||
}
|
||||
entity.Nav_Person = null;
|
||||
entity.Nav_Person = null;
|
||||
var files = entity.Nav_Files;
|
||||
var deleteFileIds = this.GetEntities<T_FO_TECH_DISCLOSURE_FILE>(t => t.TECH_DISCLOSURE_FROM_ID == entity.ID, new BaseFilter(entity.ORG_ID)).Select(m => m.ID).ToList();
|
||||
if (files != null && files.Any())
|
||||
{
|
||||
files = files.Where(t => !t.IS_DELETED).ToList();
|
||||
}
|
||||
entity.Nav_Files = null;
|
||||
List<T_FM_NOTIFICATION_TASK> notices = new List<T_FM_NOTIFICATION_TASK>();
|
||||
T_FM_NOTIFICATION_TASK task = null;
|
||||
T_FO_JOB_ACTIVITY_RECORD record = null;
|
||||
@ -385,11 +392,15 @@ namespace APT.FO.WebApi.Controllers
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (deleteIds != null && deleteIds.Any())
|
||||
this.BantchDeleteEntityNoCommit<T_FO_TECH_DISCLOSURE_PERSON>(deleteIds);
|
||||
this.BantchDeleteEntityNoCommit<T_FO_TECH_DISCLOSURE_PERSON>(deleteIds);
|
||||
if (deleteFileIds != null && deleteFileIds.Any())
|
||||
this.BantchDeleteEntityNoCommit<T_FO_TECH_DISCLOSURE_FILE>(deleteFileIds);
|
||||
if (entity != null)
|
||||
UpdateEntityNoCommit(entity);
|
||||
if (persons != null && persons.Any())
|
||||
this.BantchSaveEntityNoCommit(persons);
|
||||
this.BantchSaveEntityNoCommit(persons);
|
||||
if (files != null && files.Any())
|
||||
this.BantchSaveEntityNoCommit(files);
|
||||
if (notices != null && notices.Any())
|
||||
this.BantchSaveEntityNoCommit(notices);
|
||||
if (task != null)
|
||||
|
||||
@ -4,6 +4,7 @@ using APT.BaseData.Domain.Enums;
|
||||
using APT.BaseData.Domain.IServices.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.FO;
|
||||
using APT.MS.Domain.Entities.OG;
|
||||
using APT.MS.Domain.Enums;
|
||||
using APT.Utility;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@ -36,7 +37,7 @@ namespace APT.FO.WebApi.Controllers
|
||||
var id = filter.FilterGroup.Rules.FirstOrDefault(t => t.Field == "ID").Value.ToString();
|
||||
if (string.IsNullOrEmpty(id))
|
||||
this.ThrowError("060010");
|
||||
var entity = this.GetEntity<T_FO_TECH_DISCLOSURE_FROM_SAFE>(id, "Nav_OperationStep", "Nav_User.Nav_UserSignFiles.Nav_ImgFile", "Nav_Department");
|
||||
var entity = this.GetEntity<T_FO_TECH_DISCLOSURE_FROM_SAFE>(id, "Nav_OperationStep", "Nav_User.Nav_UserSignFiles.Nav_ImgFile", "Nav_Department","Nav_Files.Nav_ImgFile");
|
||||
if (entity != null)
|
||||
{
|
||||
var newFilter = new BaseFilter(filter.OrgId);
|
||||
@ -65,6 +66,14 @@ namespace APT.FO.WebApi.Controllers
|
||||
persons = persons.Where(t => !t.IS_DELETED && t.USER_ID != null).ToList();
|
||||
}
|
||||
entity.Nav_Person = null;
|
||||
var files = entity.Nav_Files;
|
||||
var deleteFileIds = this.GetEntities<T_FO_TECH_DISCLOSURE_FROM_SAFE_FILE>(t => t.TECH_DISCLOSURE_FROM_ID == entity.ID, new BaseFilter(entity.ORG_ID)).Select(m => m.ID).ToList();
|
||||
if (files != null && files.Any())
|
||||
{
|
||||
files = files.Where(t => !t.IS_DELETED).ToList();
|
||||
}
|
||||
entity.Nav_Files = null;
|
||||
T_FO_FIRE_JOB job = null;
|
||||
List<T_FM_NOTIFICATION_TASK> notices = new List<T_FM_NOTIFICATION_TASK>();
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var departmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
@ -86,6 +95,7 @@ namespace APT.FO.WebApi.Controllers
|
||||
t.Nav_User = null;
|
||||
});
|
||||
}
|
||||
T_FM_NOTIFICATION_TASK task = null;
|
||||
if (entity.PUBLISH != null && entity.PUBLISH.Equals("SaveAndNotify"))
|
||||
{
|
||||
if (entity.DISCLOSURE_DATE == null || entity.DISCLOSURE_DATE == DateTime.Parse("0001-01-01 00:00:00"))
|
||||
@ -116,18 +126,50 @@ namespace APT.FO.WebApi.Controllers
|
||||
else
|
||||
{
|
||||
entity.FORM_STATUS = (int)FOTeamActivityState.已归档;
|
||||
if (entity.FIRE_JOB_ID != null)
|
||||
{
|
||||
job = this.GetEntity<T_FO_FIRE_JOB>(t => t.ID == entity.FIRE_JOB_ID);
|
||||
if (job != null)
|
||||
{
|
||||
job.IS_RUN = true;
|
||||
job.FIRE_STATUS = FOFireStatus.Sign;
|
||||
var jobUsers= this.GetEntities<T_FO_FIRE_JOB_USER>(t => t.FIRE_JOB_ID == job.ID,new BaseFilter(job.ORG_ID));
|
||||
var userType = this.GetEntity<T_OG_RELATED_USER_TYPE>(t => t.NAME == "动火操作人员");
|
||||
var sendUser = jobUsers.FirstOrDefault(t => t.USER_TYPE_ID == userType.ID);
|
||||
if (sendUser != null)
|
||||
{
|
||||
var userName = this.GetEntity<T_FM_USER>(t => t.ID == sendUser.USER_ID)?.NAME;
|
||||
var notice = NotificationTaskService.InsertUserNoticeTaskModel("动火作业现场条件验收", job.ID, job.ORG_ID, (Guid)sendUser.USER_ID, userName, DateTime.Now,
|
||||
DateTime.Now.AddHours(24), (int)FMNoticeTypeEnum.消息, "FO043_1");
|
||||
notices.Add(notice);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (entity.TaskID != Guid.Empty)
|
||||
{
|
||||
task = NotificationTaskService.GetTaskFinishModel(entity.TaskID);
|
||||
task.SOURCE_FORMCODE = "FO037_SHOWPRINT";
|
||||
}
|
||||
}
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (deleteIds != null && deleteIds.Any())
|
||||
this.BantchDeleteEntityNoCommit<T_FO_TECH_DISCLOSURE_FROM_SAFE_PERSON>(deleteIds);
|
||||
if (deleteFileIds != null && deleteFileIds.Any())
|
||||
this.BantchDeleteEntityNoCommit<T_FO_TECH_DISCLOSURE_FROM_SAFE_FILE>(deleteFileIds);
|
||||
if (entity != null)
|
||||
UpdateEntityNoCommit(entity);
|
||||
if (persons != null && persons.Any())
|
||||
this.BantchSaveEntityNoCommit(persons);
|
||||
if (files != null && files.Any())
|
||||
this.BantchSaveEntityNoCommit(files);
|
||||
if (notices != null && notices.Any())
|
||||
this.BantchSaveEntityNoCommit(notices);
|
||||
if (job != null)
|
||||
UpdateEntityNoCommit(job);
|
||||
if (task != null)
|
||||
UpdateEntityNoCommit(task);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
@ -153,13 +195,33 @@ namespace APT.FO.WebApi.Controllers
|
||||
userID = currTask.USER_ID;
|
||||
}
|
||||
}
|
||||
T_FO_FIRE_JOB job = null;
|
||||
T_FM_NOTIFICATION_TASK notice = null;
|
||||
var tech = this.GetEntity<T_FO_TECH_DISCLOSURE_FROM_SAFE>(entity.ID);
|
||||
var user = this.GetEntity<T_FO_TECH_DISCLOSURE_FROM_SAFE_PERSON>(t => t.TECH_DISCLOSURE_FROM_ID == tech.ID && t.USER_ID == userID, new BaseFilter(orgId));
|
||||
user.DEAL_STATUS = FOUserShiftStatusEnum.已处理;
|
||||
var todoCount = this.GetCount<T_FO_TECH_DISCLOSURE_FROM_SAFE_PERSON>(t => t.TECH_DISCLOSURE_FROM_ID == tech.ID && t.DEAL_STATUS == 0 && t.USER_ID != null && t.USER_ID != userID, new BaseFilter(orgId));
|
||||
if (todoCount == 0 || todoCount == 1)
|
||||
if (todoCount == 0)
|
||||
{
|
||||
tech.FORM_STATUS = (int)FOTeamActivityState.已归档;
|
||||
if (tech.FIRE_JOB_ID != null)
|
||||
{
|
||||
job = this.GetEntity<T_FO_FIRE_JOB>(t => t.ID == tech.FIRE_JOB_ID);
|
||||
if (job != null)
|
||||
{
|
||||
job.IS_RUN = true;
|
||||
job.FIRE_STATUS = FOFireStatus.Sign;
|
||||
var jobUsers = this.GetEntities<T_FO_FIRE_JOB_USER>(t => t.FIRE_JOB_ID == job.ID, new BaseFilter(job.ORG_ID));
|
||||
var userType = this.GetEntity<T_OG_RELATED_USER_TYPE>(t => t.NAME == "动火操作人员");
|
||||
var sendUser = jobUsers.FirstOrDefault(t => t.USER_TYPE_ID == userType.ID);
|
||||
if (sendUser != null)
|
||||
{
|
||||
var userName = this.GetEntity<T_FM_USER>(t => t.ID == sendUser.USER_ID)?.NAME;
|
||||
notice = NotificationTaskService.InsertUserNoticeTaskModel("动火作业现场条件验收", job.ID, job.ORG_ID, (Guid)sendUser.USER_ID, userName, DateTime.Now,
|
||||
DateTime.Now.AddHours(24), (int)FMNoticeTypeEnum.消息, "FO043_1");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
T_FM_NOTIFICATION_TASK task = null;
|
||||
if (entity.TaskID != Guid.Empty)
|
||||
@ -175,6 +237,10 @@ namespace APT.FO.WebApi.Controllers
|
||||
this.UpdateEntityNoCommit(user);
|
||||
if (task != null)
|
||||
this.UpdateEntityNoCommit(task);
|
||||
if (job != null)
|
||||
this.UpdateEntityNoCommit(job);
|
||||
if (notice != null)
|
||||
this.AddEntityNoCommit(notice);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
|
||||
@ -38,7 +38,7 @@ namespace APT.FO.WebApi.Controllers
|
||||
var id = filter.FilterGroup.Rules.FirstOrDefault(t => t.Field == "ID").Value.ToString();
|
||||
if (string.IsNullOrEmpty(id))
|
||||
this.ThrowError("060010");
|
||||
var entity = this.GetEntity<T_FO_TECH_DISCLOSURE_FROM_TECH>(id, "Nav_OperationStep", "Nav_User.Nav_UserSignFiles.Nav_ImgFile", "Nav_Department");
|
||||
var entity = this.GetEntity<T_FO_TECH_DISCLOSURE_FROM_TECH>(id, "Nav_OperationStep", "Nav_User.Nav_UserSignFiles.Nav_ImgFile", "Nav_Department", "Nav_Files.Nav_ImgFile");
|
||||
if (entity != null)
|
||||
{
|
||||
var newFilter = new BaseFilter(filter.OrgId);
|
||||
@ -67,6 +67,13 @@ namespace APT.FO.WebApi.Controllers
|
||||
persons = persons.Where(t => !t.IS_DELETED && t.USER_ID != null).ToList();
|
||||
}
|
||||
entity.Nav_Person = null;
|
||||
var files = entity.Nav_Files;
|
||||
var deleteFileIds = this.GetEntities<T_FO_TECH_DISCLOSURE_FROM_TECH_FILE>(t => t.TECH_DISCLOSURE_FROM_ID == entity.ID, new BaseFilter(entity.ORG_ID)).Select(m => m.ID).ToList();
|
||||
if (files != null && files.Any())
|
||||
{
|
||||
files = files.Where(t => !t.IS_DELETED).ToList();
|
||||
}
|
||||
entity.Nav_Files = null;
|
||||
List<T_FM_NOTIFICATION_TASK> notices = new List<T_FM_NOTIFICATION_TASK>();
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var departmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
@ -88,6 +95,7 @@ namespace APT.FO.WebApi.Controllers
|
||||
t.Nav_User = null;
|
||||
});
|
||||
}
|
||||
T_FM_NOTIFICATION_TASK task = null;
|
||||
if (entity.PUBLISH != null && entity.PUBLISH.Equals("SaveAndNotify"))
|
||||
{
|
||||
if (entity.DISCLOSURE_DATE == null || entity.DISCLOSURE_DATE == DateTime.Parse("0001-01-01 00:00:00"))
|
||||
@ -119,17 +127,28 @@ namespace APT.FO.WebApi.Controllers
|
||||
{
|
||||
entity.FORM_STATUS = (int)FOTeamActivityState.已归档;
|
||||
}
|
||||
if (entity.TaskID != Guid.Empty)
|
||||
{
|
||||
task = NotificationTaskService.GetTaskFinishModel(entity.TaskID);
|
||||
task.SOURCE_FORMCODE = "FO035_SHOWPRINT";
|
||||
}
|
||||
}
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (deleteIds != null && deleteIds.Any())
|
||||
this.BantchDeleteEntityNoCommit<T_FO_TECH_DISCLOSURE_FROM_TECH_PERSON>(deleteIds);
|
||||
if (deleteFileIds != null && deleteFileIds.Any())
|
||||
this.BantchDeleteEntityNoCommit<T_FO_TECH_DISCLOSURE_FROM_TECH_FILE>(deleteFileIds);
|
||||
if (entity != null)
|
||||
UpdateEntityNoCommit(entity);
|
||||
if (persons != null && persons.Any())
|
||||
this.BantchSaveEntityNoCommit(persons);
|
||||
if (files != null && files.Any())
|
||||
this.BantchSaveEntityNoCommit(files);
|
||||
if (notices != null && notices.Any())
|
||||
this.BantchSaveEntityNoCommit(notices);
|
||||
if (task != null)
|
||||
UpdateEntityNoCommit(task);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"commandName": "Project",
|
||||
"launchUrl": "api/values",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Pdev"
|
||||
"ASPNETCORE_ENVIRONMENT": "Test"
|
||||
},
|
||||
"applicationUrl": "http://localhost:5119",
|
||||
"nativeDebugging": false
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -5,7 +5,7 @@
|
||||
"commandName": "Project",
|
||||
"launchUrl": "api/values",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Pdev"
|
||||
"ASPNETCORE_ENVIRONMENT": "Test"
|
||||
},
|
||||
"nativeDebugging": true,
|
||||
"applicationUrl": "http://localhost:5117"
|
||||
|
||||
@ -1,128 +1,137 @@
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// 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.LG.WebApi.Controllers.Api
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// 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.LG.WebApi.Controllers.Api
|
||||
{
|
||||
using APT.BaseData.Domain.Entities.LG;
|
||||
#region Oprate-表单操作日志表
|
||||
/// <summary>
|
||||
/// 表单操作日志表
|
||||
/// </summary>
|
||||
[Route("api/LG/Oprate")]
|
||||
public partial class OprateController : AuthorizeApiController<T_LG_OPRATE>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_LG_OPRATE>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_LG_OPRATE>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_LG_OPRATE> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_LG_OPRATE> 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_LG_OPRATE entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_LG_OPRATE> 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_LG_OPRATE> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
#region Oprate-表单操作日志表
|
||||
/// <summary>
|
||||
/// 表单操作日志表
|
||||
/// </summary>
|
||||
[Route("api/LG/Oprate")]
|
||||
public partial class OprateController : AuthorizeApiController<T_LG_OPRATE>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_LG_OPRATE>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_LG_OPRATE>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_LG_OPRATE> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_LG_OPRATE> 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_LG_OPRATE entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_LG_OPRATE> 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_LG_OPRATE> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"commandName": "Project",
|
||||
"launchUrl": "api/values",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Pdev"
|
||||
"ASPNETCORE_ENVIRONMENT": "Test"
|
||||
},
|
||||
"nativeDebugging": false,
|
||||
"applicationUrl": "http://localhost:5109"
|
||||
|
||||
@ -1,356 +1,370 @@
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// 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
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// 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
|
||||
{
|
||||
using APT.BaseData.Domain.Entities.NW;
|
||||
#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
|
||||
}
|
||||
|
||||
#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
|
||||
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"commandName": "Project",
|
||||
"launchUrl": "api/values",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Pdev"
|
||||
"ASPNETCORE_ENVIRONMENT": "Test"
|
||||
},
|
||||
"nativeDebugging": false,
|
||||
"applicationUrl": "http://localhost:5111"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -5,7 +5,7 @@
|
||||
"commandName": "Project",
|
||||
"launchUrl": "api/values",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Pdev"
|
||||
"ASPNETCORE_ENVIRONMENT": "Test"
|
||||
},
|
||||
"nativeDebugging": false,
|
||||
"applicationUrl": "http://localhost:5116"
|
||||
|
||||
@ -49,9 +49,9 @@ namespace APT.PF.WebApi.Controllers.Api
|
||||
}
|
||||
|
||||
var orgId = APT.Infrastructure.Api.AppContext.CurrentSession.OrgId;
|
||||
//var roleCodes = this.GetEntities<T_PF_APPROVAL_ROLE>(t => true, new BaseFilter(orgId)).Select(x => x.NAME).ToList();
|
||||
//if (roleCodes.Contains(entity.NAME))
|
||||
// throw new Exception("系统已存在审批角色编码为" + entity.NAME + "的数据,请勿重复!");
|
||||
var roleCodes = this.GetEntities<T_PF_APPROVAL_ROLE>(t => !t.IS_DELETED, new BaseFilter(orgId)).Select(x => x.NAME).ToList();
|
||||
if (roleCodes.Contains(entity.NAME))
|
||||
throw new Exception("系统已存在审批角色为" + entity.NAME + "的数据,请勿重复!");
|
||||
var departs = entity.Nav_ApproveDeparts;
|
||||
entity.Nav_ApproveDeparts = null;
|
||||
if (departs != null && departs.Any())
|
||||
|
||||
@ -650,6 +650,19 @@ namespace APT.PF.WebApiControllers.Api.PF
|
||||
dynamic result = new ExpandoObject();
|
||||
|
||||
var httpRequest = HttpContext.Request;
|
||||
string PBN = string.Empty;
|
||||
if (httpRequest.Headers.ContainsKey("PBN"))
|
||||
{
|
||||
try
|
||||
{
|
||||
PBN = httpRequest.Headers["PBN"];
|
||||
}
|
||||
catch
|
||||
{
|
||||
PBN = "";
|
||||
}
|
||||
}
|
||||
|
||||
var strOrgId = httpRequest.Form["OrgId"][0]; // 获取 组织
|
||||
var strImgID = string.Empty;
|
||||
if (httpRequest.Form.ContainsKey("imgFileID"))
|
||||
@ -680,7 +693,7 @@ namespace APT.PF.WebApiControllers.Api.PF
|
||||
var now = DateTime.Now;
|
||||
//文件存储路径
|
||||
//var filePath = string.Format("/{0}/{1}/{2}/", now.ToString("yyyy"), now.ToString("yyyyMM"), now.ToString("yyyyMMdd"));
|
||||
string filePath = GetFilePath(orgId);
|
||||
string filePath = GetFilePath(orgId, PBN);
|
||||
|
||||
var fullFilePath = $"{ ConfigurationManager.AppSettings["Img_Local"]}{filePath}";
|
||||
|
||||
@ -846,14 +859,246 @@ namespace APT.PF.WebApiControllers.Api.PF
|
||||
this.BantchAddEntity(fileList);
|
||||
this.BantchAddEntity(imgFileList);
|
||||
this.BantchAddEntity(imgFileDetailList);
|
||||
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 上次文件转为图片
|
||||
/// </summary>
|
||||
/// <param name="filter"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("UploadVideo")]
|
||||
public JsonActionResult<dynamic> UploadVideo()
|
||||
{
|
||||
return SafeExecute<dynamic>(() =>
|
||||
{
|
||||
dynamic result = new ExpandoObject();
|
||||
try
|
||||
{
|
||||
var httpRequest = HttpContext.Request;
|
||||
string PBN = string.Empty;
|
||||
if (httpRequest.Headers.ContainsKey("PBN"))
|
||||
{
|
||||
try
|
||||
{
|
||||
PBN = httpRequest.Headers["PBN"];
|
||||
}
|
||||
catch
|
||||
{
|
||||
PBN = "";
|
||||
}
|
||||
}
|
||||
|
||||
var strOrgId = httpRequest.Form["OrgId"][0]; // 获取 组织
|
||||
var strImgID = string.Empty;
|
||||
if (httpRequest.Form.ContainsKey("imgFileID"))
|
||||
{
|
||||
strImgID = httpRequest.Form["imgFileID"][0];
|
||||
} // 获取 组织
|
||||
|
||||
var isSaveSelfStr = httpRequest.Form["IsSaveSelf"].Any() ? httpRequest.Form["IsSaveSelf"][0] : "false"; // 是否存储本身
|
||||
if (string.IsNullOrEmpty(strOrgId))
|
||||
throw new Exception("组织不允许为空");
|
||||
var orgId = new Guid(strOrgId);
|
||||
Guid ImgID = Guid.Empty;
|
||||
if (strImgID != null && !string.IsNullOrEmpty(strImgID))
|
||||
{
|
||||
try
|
||||
{
|
||||
ImgID = new Guid(strImgID.ToString());
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
if (ImgID == Guid.Empty)
|
||||
{
|
||||
ImgID = Guid.NewGuid();
|
||||
}
|
||||
|
||||
//返回的文件地址
|
||||
//List<string> filenames = new List<string>();
|
||||
var now = DateTime.Now;
|
||||
//文件存储路径
|
||||
//var filePath = string.Format("/{0}/{1}/{2}/", now.ToString("yyyy"), now.ToString("yyyyMM"), now.ToString("yyyyMMdd"));
|
||||
string filePath = GetFilePath(orgId, PBN);
|
||||
|
||||
var fullFilePath = $"{ ConfigurationManager.AppSettings["Img_Local"]}{filePath}";
|
||||
|
||||
ImageConverterFactory imageConverterFactory = new ImageConverterFactory();
|
||||
var host = ConfigurationManager.AppSettings["SapInvokeHost"];
|
||||
|
||||
List<T_PF_FILE> fileList = new List<T_PF_FILE>();
|
||||
List<T_PF_IMG_FILE> imgFileList = new List<T_PF_IMG_FILE>();
|
||||
List<T_PF_IMG_FILE_DETAIL> imgFileDetailList = new List<T_PF_IMG_FILE_DETAIL>();
|
||||
|
||||
var files = httpRequest.Form.Files;
|
||||
|
||||
if (!Directory.Exists(fullFilePath))
|
||||
{
|
||||
Directory.CreateDirectory(fullFilePath);
|
||||
}
|
||||
|
||||
//wyw 2023-12-15 保存的文件还是用自动生成的文件名吧 省得处理url转译
|
||||
foreach (var item in files)
|
||||
{
|
||||
if (item != null)
|
||||
{
|
||||
//文件后缀
|
||||
var fileExtension = Path.GetExtension(item.FileName);
|
||||
|
||||
var strDateTime = DateTime.Now.ToString("yyMMddhhmmssfff"); //取得时间字符串
|
||||
var strRan = Convert.ToString(new Random().Next(100, 999)); //生成三位随机数
|
||||
var saveName = strDateTime + strRan + fileExtension;
|
||||
string fileName = item.FileName;
|
||||
|
||||
//插入图片数据
|
||||
using (FileStream fs = System.IO.File.Create(fullFilePath + saveName))//fullFilePath + fileName wyw
|
||||
{
|
||||
item.CopyTo(fs);
|
||||
fs.Flush();
|
||||
}
|
||||
if (fileExtension == ".jpg" || fileExtension == ".png" || fileExtension == ".jpeg")
|
||||
{
|
||||
using (FileStream inputFileStream = new FileStream(fullFilePath + saveName, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
MemoryStream compressedStream = CompressImageFileStream(inputFileStream);
|
||||
inputFileStream.Close();
|
||||
using (FileStream outputFileStream = new FileStream(fullFilePath + saveName, FileMode.Create, FileAccess.Write))
|
||||
{
|
||||
compressedStream.CopyTo(outputFileStream);
|
||||
}
|
||||
}
|
||||
}
|
||||
//filenames.Add(filePath + fileName);
|
||||
var pos = fileName.LastIndexOf(".");
|
||||
var extendName = fileName.Substring(pos);
|
||||
List<ConvertImageFile> list = new List<ConvertImageFile>();
|
||||
bool isSuppot = imageConverterFactory.Support(extendName);
|
||||
bool isSaveSelf = true;
|
||||
|
||||
T_PF_IMG_FILE imgFile = new T_PF_IMG_FILE
|
||||
{
|
||||
ID = ImgID,
|
||||
FILE_NAME = fileName,
|
||||
FILE_TYPE = item.ContentType,
|
||||
ORG_ID = orgId
|
||||
};
|
||||
|
||||
var inputStream = item.OpenReadStream();
|
||||
//支持转换时,按类型转为图片,否则直接存储
|
||||
if (isSuppot)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(host))
|
||||
{
|
||||
ConvertImageFileParam param = new ConvertImageFileParam();
|
||||
param.FileName = fileName;
|
||||
Byte[] fileData = new Byte[(int)item.Length];
|
||||
Stream sr = inputStream;//创建数据流对象
|
||||
sr.Read(fileData, 0, (int)item.Length);
|
||||
param.FileData = fileData;
|
||||
string url = host + "ImageConvert/ImageConvert";
|
||||
ConvertImageFileParam retModel =
|
||||
WebUtils.Execute<ConvertImageFileParam>(url, param, string.Empty, SendType.Post);
|
||||
if (retModel != null && retModel.Files != null && retModel.Files.Any())
|
||||
list.AddRange(retModel.Files);
|
||||
}
|
||||
else
|
||||
{
|
||||
var convert = imageConverterFactory.CreateImageConverter(fileName);
|
||||
convert.ConvertToImage(fileName, inputStream, list);
|
||||
}
|
||||
if (isSaveSelf)//保存自身数据
|
||||
{
|
||||
Byte[] fileData = new Byte[(int)item.Length];
|
||||
Stream sr = inputStream;//创建数据流对象
|
||||
sr.Read(fileData, 0, (int)item.Length);
|
||||
T_PF_FILE file = new T_PF_FILE
|
||||
{
|
||||
FILE_NAME = fileName,
|
||||
FILE_TYPE = item.ContentType,
|
||||
//FILE_DATA = fileData,
|
||||
ORG_ID = orgId,
|
||||
//FILE_PATH = filePath + fileName
|
||||
FILE_PATH = filePath + saveName//wyw
|
||||
};
|
||||
imgFile.FILE_ID = file.ID;
|
||||
imgFile.Nav_File = file;
|
||||
fileList.Add(file);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ConvertImageFile tmpImgFile = new ConvertImageFile();
|
||||
//tmpImgFile.FileName = fileName;
|
||||
tmpImgFile.FileName = saveName;//wyw
|
||||
tmpImgFile.FileType = item.ContentType;
|
||||
Byte[] fileData = new Byte[(int)item.Length];
|
||||
Stream sr = inputStream;//创建数据流对象
|
||||
sr.Read(fileData, 0, (int)item.Length);
|
||||
tmpImgFile.FileData = fileData;
|
||||
list.Add(tmpImgFile);
|
||||
}
|
||||
//保存文件数据
|
||||
if (list.Any())
|
||||
{
|
||||
int i = 1;
|
||||
foreach (var fileitem in list)
|
||||
{
|
||||
T_PF_FILE file = new T_PF_FILE
|
||||
{
|
||||
ID = Guid.NewGuid(),
|
||||
FILE_NAME = fileitem.FileName,
|
||||
FILE_TYPE = fileitem.FileType,
|
||||
//FILE_DATA = fileitem.FileData,
|
||||
//FILE_PATH = filePath + fileName,
|
||||
FILE_PATH = filePath + saveName,//wyw,
|
||||
ORG_ID = orgId
|
||||
};
|
||||
|
||||
if (!isSuppot && isSaveSelf)
|
||||
{
|
||||
imgFile.FILE_ID = file.ID;
|
||||
imgFile.Nav_File = file;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(imgFile.FILE_PATH) && !string.IsNullOrEmpty(file.FILE_PATH))
|
||||
{
|
||||
imgFile.FILE_PATH = file.FILE_PATH;
|
||||
}
|
||||
|
||||
T_PF_IMG_FILE_DETAIL detail = new T_PF_IMG_FILE_DETAIL
|
||||
{
|
||||
ORG_ID = orgId,
|
||||
IMG_FILE_ID = imgFile.ID,
|
||||
FILE_ID = file.ID,
|
||||
NUM = i
|
||||
};
|
||||
i++;
|
||||
fileList.Add(file);
|
||||
imgFileDetailList.Add(detail);
|
||||
}
|
||||
}
|
||||
imgFileList.Add(imgFile);
|
||||
result.imgFileID = imgFile.ID;
|
||||
result.imgFilePath = imgFile.Nav_File?.FILE_PATH;
|
||||
}
|
||||
}
|
||||
this.BantchAddEntity(fileList);
|
||||
this.BantchAddEntity(imgFileList);
|
||||
this.BantchAddEntity(imgFileDetailList);
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result.status = 200;
|
||||
result.CODE = 400;
|
||||
result.ERROR = "视频上传失败!" + ex.Message;
|
||||
}
|
||||
return result;
|
||||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据ID获取文件数据
|
||||
/// </summary>
|
||||
@ -968,8 +1213,9 @@ namespace APT.PF.WebApiControllers.Api.PF
|
||||
/// 根据OrgId获取文件夹名称
|
||||
/// </summary>
|
||||
/// <param name="OrgId"></param>
|
||||
/// <param name="PBN">文件包名称</param>
|
||||
/// <returns></returns>
|
||||
public string GetFilePath(Guid OrgId)
|
||||
public string GetFilePath(Guid OrgId, string PBN = "")
|
||||
{
|
||||
string orgid = OrgId.ToString().ToUpperInvariant();
|
||||
string pathHead = "";
|
||||
@ -985,7 +1231,12 @@ namespace APT.PF.WebApiControllers.Api.PF
|
||||
}
|
||||
DateTime dtNow = DateTime.Now;
|
||||
//var strRan = Convert.ToString(new Random().Next(100, 999)); //生成三位随机数
|
||||
var filePath = string.Format("/{0}/{1}/{2}/", dtNow.ToString("yyyy"), dtNow.ToString("yyyyMM"), dtNow.ToString("yyyyMMdd"));
|
||||
string filePath = "";
|
||||
if (string.IsNullOrEmpty(PBN))
|
||||
filePath = string.Format("/{0}/{1}/{2}/", dtNow.ToString("yyyy"), dtNow.ToString("yyyyMM"), dtNow.ToString("yyyyMMdd"));
|
||||
else
|
||||
filePath = string.Format("/{0}/{1}/", PBN, dtNow.ToString("yyyyMMdd"));//不要那么多层级不然太难找了
|
||||
|
||||
return string.IsNullOrEmpty(pathHead) ? filePath : "/" + pathHead + filePath;
|
||||
}
|
||||
|
||||
|
||||
@ -51,6 +51,10 @@
|
||||
//2、IIS有限制IIS上传附件大小 本地服务器暂时不做大附件处理
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
if (string.IsNullOrEmpty(entity.NAME))
|
||||
{
|
||||
throw new Exception("视频库名称不能为空!");
|
||||
}
|
||||
var files = entity.Nav_Files;
|
||||
entity.Nav_Files = null;
|
||||
if (files != null && files.Any())
|
||||
@ -60,6 +64,12 @@
|
||||
item.Nav_FileDB = null;
|
||||
}
|
||||
}
|
||||
|
||||
var check = GetEntity<T_PF_FILE_DB>(e => e.TYPE_ID == entity.TYPE_ID && e.NAME == entity.NAME);
|
||||
if (check != null)
|
||||
{
|
||||
throw new Exception("视频库中已存在该视频类型与视频名称,不能重复添加!");
|
||||
}
|
||||
UnifiedCommit(() =>
|
||||
{
|
||||
this.UpdateEntityNoCommit(entity);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -5,7 +5,7 @@
|
||||
"commandName": "Project",
|
||||
"launchUrl": "api/values",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Pdev"
|
||||
"ASPNETCORE_ENVIRONMENT": "Test"
|
||||
},
|
||||
"nativeDebugging": false,
|
||||
"applicationUrl": "http://localhost:5112"
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
"ConnDataKey": "MHKSAQ1212010101",
|
||||
"TenantConnKey": "MHJY",
|
||||
"RedisFormConfig": "false",
|
||||
"Img_Local": "C:\\release\\jy\\uploadFile\\"
|
||||
"Img_Local": "D:\\uploadFile\\"
|
||||
},
|
||||
"RedisConfig": {
|
||||
"RedisConnectionString": "121.41.2.71:6379,password=mhsaferedis,defaultDatabase=5",
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
"RedisFormConfig": "false",
|
||||
"ConnDataKey": "MHKSAQ1212010101",
|
||||
"TenantConnKey": "MHJY",
|
||||
"Img_Local": "C:\\release\\jy\\uploadFile\\"
|
||||
"Img_Local": "D:\\uploadFile\\"
|
||||
},
|
||||
"RedisConfig": {
|
||||
"RedisConnectionString": "120.25.146.51:6379",
|
||||
|
||||
@ -293,15 +293,15 @@ namespace APT.SC.WebApi.Controllers.Api.BI
|
||||
{
|
||||
try
|
||||
{
|
||||
AlibabaCloud.SDK.Dysmsapi20170525.Client client = CreateClient("LTAI5t6Pc52xRjzHgsVszgNY", "FxuLo87JVr0kXK6LjRRioVZpCw4frs");
|
||||
AlibabaCloud.SDK.Dysmsapi20170525.Client client = CreateClient("LTAI5t6Pc52xRjzHqsVszgNY", "FxuLo87JVr0kXK6LjRRioVZpCw4frs");
|
||||
DateTime now = DateTime.Now;
|
||||
BaseFilter userfilter = new BaseFilter(filter.GetOrgId());
|
||||
userfilter.SelectField = new string[] { "PHONE" };
|
||||
var allUsers = GetEntities<T_FM_USER>(t => t.ENABLE_STATUS == 0, userfilter);
|
||||
var approveUsers = GetEntities<T_FM_USER>(t => t.Nav_Department.DEPARTMENT_TYPE != 2 && t.ENABLE_STATUS == 0, new BaseFilter(filter.GetOrgId()));
|
||||
var allUsers = GetEntities<T_FM_USER>(t => t.ENABLE_STATUS == 0 && t.ISGETMSG && t.PHONE != null && t.PHONE.Length == 11, userfilter);
|
||||
var approveUsers = GetEntities<T_FM_USER>(t => t.Nav_Department.DEPARTMENT_TYPE != 2 && t.ENABLE_STATUS == 0 && t.ISGETMSG && t.PHONE != null && t.PHONE.Length == 11, new BaseFilter(filter.GetOrgId()));
|
||||
var userIds = approveUsers.Select(t => t.ID);
|
||||
List<T_FM_NOTIFICATION_TASK> sendSMSs = null;
|
||||
if (now.Hour >= 7 && now.Hour < 23)
|
||||
if (now.Hour >= 8 && now.Hour < 24)
|
||||
{
|
||||
sendSMSs = GetEntities<T_FM_NOTIFICATION_TASK>(t => t.NOTICE_STATUS == 0 && t.CREATE_TIME > now.AddDays(-6) && !t.SOURCE_FORMCODE.Contains("FO005") && t.SENDTIME == DateTime.MinValue, new BaseFilter(filter.GetOrgId())).ToList();
|
||||
var sendSMSs2 = sendSMSs.Where(t => t.TASK_ENDDT < now.AddHours(1) && t.TASK_ENDDT > t.TASK_STARTDT);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user