Merge branch 'main' of http://47.122.43.22:3000/wjn/mh_sms
This commit is contained in:
commit
e5a74a5054
@ -37,8 +37,6 @@ namespace APT.BaseData.Data.Mapping.FM
|
|||||||
builder.HasOne(t => t.Nav_ApproveRole).WithMany().HasForeignKey(t => t.APPROVE_ROLE_ID).OnDelete(DeleteBehavior.Restrict);
|
builder.HasOne(t => t.Nav_ApproveRole).WithMany().HasForeignKey(t => t.APPROVE_ROLE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||||
builder.Ignore(t => t.TEAM_ID);
|
builder.Ignore(t => t.TEAM_ID);
|
||||||
builder.Ignore(t => t.Tenant);
|
builder.Ignore(t => t.Tenant);
|
||||||
builder.Property(t => t.MineType)
|
|
||||||
.HasMaxLength(50);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,8 +31,6 @@ namespace APT.BaseData.Data.Mapping
|
|||||||
|
|
||||||
builder.Property(t => t.REMARK).HasMaxLength(400);
|
builder.Property(t => t.REMARK).HasMaxLength(400);
|
||||||
|
|
||||||
builder.Property(t => t.MineType)
|
|
||||||
.HasMaxLength(50);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -181,11 +181,5 @@ namespace APT.BaseData.Domain.Entities.FM
|
|||||||
[Description("生产单元")]
|
[Description("生产单元")]
|
||||||
public virtual ICollection<T_FM_USER_PRODUCTION_UNIT> Nav_ProdutionUnit { get; set; }
|
public virtual ICollection<T_FM_USER_PRODUCTION_UNIT> Nav_ProdutionUnit { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 生产单元类型
|
|
||||||
/// </summary>
|
|
||||||
[Description("生产单元类型")]
|
|
||||||
[EnumName("FMProductionUnit")]
|
|
||||||
public string MineType { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,29 +0,0 @@
|
|||||||
using APT.Infrastructure.Core;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace APT.BaseData.Domain.Entities.OP
|
|
||||||
{
|
|
||||||
[Description("用户表(租户平台)")]
|
|
||||||
public partial class T_OP_ALLUSER : MesEntityBase
|
|
||||||
{
|
|
||||||
|
|
||||||
[Description("编码")]
|
|
||||||
[FormFieldTable]
|
|
||||||
[FormFieldEdit]
|
|
||||||
[DataFieldLength(30)]
|
|
||||||
public string CODE { get; set; }
|
|
||||||
|
|
||||||
[Description("租户")]
|
|
||||||
[FormFieldTable]
|
|
||||||
[FormFieldEdit]
|
|
||||||
public string TENANT { get; set; }
|
|
||||||
[Description("手机")]
|
|
||||||
[FormFieldTable]
|
|
||||||
[FormFieldEdit]
|
|
||||||
[DataFieldLength(30)]
|
|
||||||
public string PHONE { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -96,11 +96,5 @@ namespace APT.BaseData.Domain.Entities
|
|||||||
[Description("是否移动端菜单")]
|
[Description("是否移动端菜单")]
|
||||||
public bool IS_MOBILE_MENU { get; set; }
|
public bool IS_MOBILE_MENU { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 生产单元类型
|
|
||||||
/// </summary>
|
|
||||||
[Description("生产单元类型")]
|
|
||||||
[EnumName("FMProductionUnit")]
|
|
||||||
public string MineType { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
92238
APT.Data.Migrations/Migrations/20240129014020_wjn202401-2901.Designer.cs
generated
Normal file
92238
APT.Data.Migrations/Migrations/20240129014020_wjn202401-2901.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,53 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace APT.Data.Migrations.Migrations
|
||||||
|
{
|
||||||
|
public partial class wjn2024012901 : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "T_OP_ALLUSER");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "T_OP_ALLUSER",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
CODE = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
|
||||||
|
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
|
||||||
|
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
|
||||||
|
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
|
||||||
|
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
|
||||||
|
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
PHONE = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
|
||||||
|
TENANT = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_T_OP_ALLUSER", x => x.ID);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_T_OP_ALLUSER_T_FM_ORGANIZATION_ORG_ID",
|
||||||
|
column: x => x.ORG_ID,
|
||||||
|
principalTable: "T_FM_ORGANIZATION",
|
||||||
|
principalColumn: "ID",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_T_OP_ALLUSER_ORG_ID",
|
||||||
|
table: "T_OP_ALLUSER",
|
||||||
|
column: "ORG_ID");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
92230
APT.Data.Migrations/Migrations/20240129071553_wjn202401-2902.Designer.cs
generated
Normal file
92230
APT.Data.Migrations/Migrations/20240129071553_wjn202401-2902.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,35 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace APT.Data.Migrations.Migrations
|
||||||
|
{
|
||||||
|
public partial class wjn2024012902 : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "MineType",
|
||||||
|
table: "T_PF_MENU");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "MineType",
|
||||||
|
table: "T_FM_USER");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "MineType",
|
||||||
|
table: "T_PF_MENU",
|
||||||
|
type: "nvarchar(50)",
|
||||||
|
maxLength: 50,
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "MineType",
|
||||||
|
table: "T_FM_USER",
|
||||||
|
type: "nvarchar(50)",
|
||||||
|
maxLength: 50,
|
||||||
|
nullable: true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -6261,10 +6261,6 @@ namespace APT.Data.Migrations.Migrations
|
|||||||
b.Property<DateTime?>("MODIFY_TIME")
|
b.Property<DateTime?>("MODIFY_TIME")
|
||||||
.HasColumnType("datetime2");
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
b.Property<string>("MineType")
|
|
||||||
.HasMaxLength(50)
|
|
||||||
.HasColumnType("nvarchar(50)");
|
|
||||||
|
|
||||||
b.Property<string>("NAME")
|
b.Property<string>("NAME")
|
||||||
.HasMaxLength(50)
|
.HasMaxLength(50)
|
||||||
.HasColumnType("nvarchar(50)");
|
.HasColumnType("nvarchar(50)");
|
||||||
@ -8288,65 +8284,6 @@ namespace APT.Data.Migrations.Migrations
|
|||||||
b.ToTable("T_NW_ROLE_MENU");
|
b.ToTable("T_NW_ROLE_MENU");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_ALLUSER", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("ID")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("uniqueidentifier");
|
|
||||||
|
|
||||||
b.Property<string>("CODE")
|
|
||||||
.HasMaxLength(30)
|
|
||||||
.HasColumnType("nvarchar(30)");
|
|
||||||
|
|
||||||
b.Property<Guid?>("CREATER_ID")
|
|
||||||
.HasColumnType("uniqueidentifier");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("CREATE_TIME")
|
|
||||||
.HasColumnType("datetime2");
|
|
||||||
|
|
||||||
b.Property<int>("ENTITY_ORG_TPYE")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<Guid?>("FLOW_ID")
|
|
||||||
.HasColumnType("uniqueidentifier");
|
|
||||||
|
|
||||||
b.Property<int>("FLOW_SEND_STATUS")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("FLOW_STATUS")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<Guid?>("FORM_ID")
|
|
||||||
.HasColumnType("uniqueidentifier");
|
|
||||||
|
|
||||||
b.Property<bool>("IS_DELETED")
|
|
||||||
.HasColumnType("bit");
|
|
||||||
|
|
||||||
b.Property<Guid?>("MODIFIER_ID")
|
|
||||||
.HasColumnType("uniqueidentifier");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("MODIFY_TIME")
|
|
||||||
.HasColumnType("datetime2");
|
|
||||||
|
|
||||||
b.Property<Guid?>("ORG_ID")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("uniqueidentifier");
|
|
||||||
|
|
||||||
b.Property<string>("PHONE")
|
|
||||||
.HasMaxLength(30)
|
|
||||||
.HasColumnType("nvarchar(30)");
|
|
||||||
|
|
||||||
b.Property<string>("TENANT")
|
|
||||||
.HasMaxLength(500)
|
|
||||||
.HasColumnType("nvarchar(500)");
|
|
||||||
|
|
||||||
b.HasKey("ID");
|
|
||||||
|
|
||||||
b.HasIndex("ORG_ID");
|
|
||||||
|
|
||||||
b.ToTable("T_OP_ALLUSER");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_BILLING_RULE", b =>
|
modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_BILLING_RULE", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("ID")
|
b.Property<Guid>("ID")
|
||||||
@ -14042,10 +13979,6 @@ namespace APT.Data.Migrations.Migrations
|
|||||||
b.Property<DateTime?>("MODIFY_TIME")
|
b.Property<DateTime?>("MODIFY_TIME")
|
||||||
.HasColumnType("datetime2");
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
b.Property<string>("MineType")
|
|
||||||
.HasMaxLength(50)
|
|
||||||
.HasColumnType("nvarchar(50)");
|
|
||||||
|
|
||||||
b.Property<string>("NAME")
|
b.Property<string>("NAME")
|
||||||
.HasMaxLength(50)
|
.HasMaxLength(50)
|
||||||
.HasColumnType("nvarchar(50)");
|
.HasColumnType("nvarchar(50)");
|
||||||
@ -69241,17 +69174,6 @@ namespace APT.Data.Migrations.Migrations
|
|||||||
b.Navigation("Nav_Org");
|
b.Navigation("Nav_Org");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_ALLUSER", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("ORG_ID")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Nav_Org");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_BILLING_RULE", b =>
|
modelBuilder.Entity("APT.BaseData.Domain.Entities.OP.T_OP_BILLING_RULE", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
|
b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
|
||||||
|
|||||||
@ -8499,18 +8499,6 @@ builder.Ignore(t => t.CheckKeys);
|
|||||||
{
|
{
|
||||||
base.Configure(builder);
|
base.Configure(builder);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
#region Alluser
|
|
||||||
public partial class OPAlluserMap :APTEntityBaseMap<T_OP_ALLUSER>
|
|
||||||
{
|
|
||||||
public override void Configure(EntityTypeBuilder<T_OP_ALLUSER> builder)
|
|
||||||
{
|
|
||||||
base.Configure(builder);
|
|
||||||
builder.Property(t => t.CODE).HasMaxLength(30);
|
|
||||||
builder.Property(t => t.TENANT).HasMaxLength(500);
|
|
||||||
builder.Property(t => t.PHONE).HasMaxLength(30);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region BillingRule
|
#region BillingRule
|
||||||
|
|||||||
@ -395,7 +395,6 @@ namespace APT.FM.WebApi.Controllers.Api.FM
|
|||||||
// enumValues.Add(value);
|
// enumValues.Add(value);
|
||||||
//});
|
//});
|
||||||
//t.MineType = string.Join(",", enumValues);
|
//t.MineType = string.Join(",", enumValues);
|
||||||
t.MineType = entity.MineType.ToString();
|
|
||||||
T_FM_USER_PRODUCTION_UNIT unit = new T_FM_USER_PRODUCTION_UNIT();
|
T_FM_USER_PRODUCTION_UNIT unit = new T_FM_USER_PRODUCTION_UNIT();
|
||||||
unit.ORG_ID = t.ORG_ID; unit.USER_ID = t.ID; unit.ENUMS_ID = enumList?.ID;
|
unit.ORG_ID = t.ORG_ID; unit.USER_ID = t.ID; unit.ENUMS_ID = enumList?.ID;
|
||||||
unit.Nav_Enums = null;
|
unit.Nav_Enums = null;
|
||||||
|
|||||||
@ -368,21 +368,6 @@ namespace APT.FM.WebApi.Controllers.Api.FM
|
|||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 增加新增人员到ops表
|
|
||||||
using (var context = new MigrationContext(ConfigurationManager.ConnectionStrings["default"]))
|
|
||||||
{
|
|
||||||
var tennant = context.GetEntity<T_OP_TENANT>(t => t.ID == entity.ORG_ID, new string[] { "CODE" }).CODE;
|
|
||||||
T_OP_ALLUSER alluser = new T_OP_ALLUSER();
|
|
||||||
alluser.ID = entity.ID;
|
|
||||||
alluser.CODE = entity.CODE;
|
|
||||||
alluser.TENANT = tennant;
|
|
||||||
alluser.ORG_ID = entity.ORG_ID;
|
|
||||||
alluser.PHONE = entity.PHONE;
|
|
||||||
context.AddEntity(alluser);
|
|
||||||
context.SaveChanges();
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region //wyw 密码初始化 Xyy+code(姓名拼音首字母(第一个大写) + 工号(取数字)
|
#region //wyw 密码初始化 Xyy+code(姓名拼音首字母(第一个大写) + 工号(取数字)
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(entity.NAME) && !string.IsNullOrEmpty(entity.CODE))
|
if (!string.IsNullOrEmpty(entity.NAME) && !string.IsNullOrEmpty(entity.CODE))
|
||||||
@ -413,7 +398,6 @@ namespace APT.FM.WebApi.Controllers.Api.FM
|
|||||||
if (departInfo != null && departInfo.MineType != null && !isAdd.Any())
|
if (departInfo != null && departInfo.MineType != null && !isAdd.Any())
|
||||||
{
|
{
|
||||||
var enumList = this.GetEntity<T_FM_ENUMS>(t => t.CODE == "BSMineTypeEnum" && t.VALUE == departInfo.MineType);
|
var enumList = this.GetEntity<T_FM_ENUMS>(t => t.CODE == "BSMineTypeEnum" && t.VALUE == departInfo.MineType);
|
||||||
entity.MineType = departInfo.MineType.ToString();
|
|
||||||
T_FM_USER_PRODUCTION_UNIT unit = new T_FM_USER_PRODUCTION_UNIT();
|
T_FM_USER_PRODUCTION_UNIT unit = new T_FM_USER_PRODUCTION_UNIT();
|
||||||
unit.ORG_ID = entity.ORG_ID; unit.USER_ID = entity.ID; unit.ENUMS_ID = enumList?.ID;
|
unit.ORG_ID = entity.ORG_ID; unit.USER_ID = entity.ID; unit.ENUMS_ID = enumList?.ID;
|
||||||
unit.Nav_Enums = null;
|
unit.Nav_Enums = null;
|
||||||
@ -602,7 +586,6 @@ namespace APT.FM.WebApi.Controllers.Api.FM
|
|||||||
var value = enumList.FirstOrDefault(m => m.ID == t.ENUMS_ID)?.VALUE.ToString();
|
var value = enumList.FirstOrDefault(m => m.ID == t.ENUMS_ID)?.VALUE.ToString();
|
||||||
enumValues.Add(value);
|
enumValues.Add(value);
|
||||||
});
|
});
|
||||||
entity.MineType = string.Join(",", enumValues);
|
|
||||||
}
|
}
|
||||||
List<Guid> deleteBelongRoleIds = new List<Guid>();
|
List<Guid> deleteBelongRoleIds = new List<Guid>();
|
||||||
List<Guid> deleteBelongRoleGroupIds = new List<Guid>();
|
List<Guid> deleteBelongRoleGroupIds = new List<Guid>();
|
||||||
|
|||||||
@ -15,111 +15,6 @@ using APT.BaseData.Domain.ApiModel.PF;
|
|||||||
namespace APT.LG.WebApi.Controllers.Api
|
namespace APT.LG.WebApi.Controllers.Api
|
||||||
{
|
{
|
||||||
using APT.BaseData.Domain.Entities.OP;
|
using APT.BaseData.Domain.Entities.OP;
|
||||||
#region Alluser-用户表(租户平台)
|
|
||||||
/// <summary>
|
|
||||||
/// 用户表(租户平台)
|
|
||||||
/// </summary>
|
|
||||||
[Route("api/OP/Alluser")]
|
|
||||||
public partial class AlluserController : AuthorizeApiController<T_OP_ALLUSER>
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 查询所有数据
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="filter">过滤实体</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Entities")]
|
|
||||||
public JsonActionResult<IEnumerable<T_OP_ALLUSER>> Entities([FromBody]KeywordFilter filter)
|
|
||||||
{
|
|
||||||
return WitEntities(null, filter);
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
/// 排序查询所有数据
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="filter">过滤实体</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
|
|
||||||
[HttpPost, Route("OrderEntities")]
|
|
||||||
public JsonActionResult<IEnumerable<T_OP_ALLUSER>> OrderEntities([FromBody]KeywordFilter filter)
|
|
||||||
{
|
|
||||||
return WitOrderEntities(null, filter);
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
/// 分页查询数据
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="pageFilter">分页过滤实体</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("Paged")]
|
|
||||||
public PagedActionResult<T_OP_ALLUSER> Paged([FromBody]KeywordPageFilter pageFilter)
|
|
||||||
{
|
|
||||||
return WitPaged(null, pageFilter);
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
/// 排序分页查询数据
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="pageFilter">分页过滤实体</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("OrderPaged")]
|
|
||||||
public PagedActionResult<T_OP_ALLUSER> 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_OP_ALLUSER entity)
|
|
||||||
{
|
|
||||||
return WitUpdate(entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 批量更新
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="entity">对象实体</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("BatchUpdate")]
|
|
||||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_OP_ALLUSER> 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_OP_ALLUSER> Get([FromBody] KeywordFilter filter)
|
|
||||||
{
|
|
||||||
return WitEntity(null, filter);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
#region BillingRule-计费规则表
|
#region BillingRule-计费规则表
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 计费规则表
|
/// 计费规则表
|
||||||
|
|||||||
@ -230,7 +230,6 @@ namespace APT.PF.WebApiControllers.Api.PF
|
|||||||
user = this.GetEntity<T_FM_USER>(uExpress, userFilter);
|
user = this.GetEntity<T_FM_USER>(uExpress, userFilter);
|
||||||
if (user == null)
|
if (user == null)
|
||||||
throw new Exception(ErrMsg.PM_PSD_ERROR);
|
throw new Exception(ErrMsg.PM_PSD_ERROR);
|
||||||
user.MineType = string.Join(",", user.Nav_ProdutionUnit?.Select(i => i?.Nav_Enums.VALUE));
|
|
||||||
userId = user.ID.GetString();
|
userId = user.ID.GetString();
|
||||||
}
|
}
|
||||||
#region 手机验证码
|
#region 手机验证码
|
||||||
@ -280,7 +279,6 @@ namespace APT.PF.WebApiControllers.Api.PF
|
|||||||
user = this.GetEntity<T_FM_USER>(expression, userFilter);
|
user = this.GetEntity<T_FM_USER>(expression, userFilter);
|
||||||
if (user == null)
|
if (user == null)
|
||||||
throw new Exception(ErrMsg.PM_PSD_ERROR);
|
throw new Exception(ErrMsg.PM_PSD_ERROR);
|
||||||
user.MineType = string.Join(",", user.Nav_ProdutionUnit?.Select(i => i?.Nav_Enums.VALUE));
|
|
||||||
//filter.OrgId = user.ORG_ID;
|
//filter.OrgId = user.ORG_ID;
|
||||||
//filter.IsSpecifyDb = true;
|
//filter.IsSpecifyDb = true;
|
||||||
//filter.SpecifyDbConn = user.DbConn;//切换数据库
|
//filter.SpecifyDbConn = user.DbConn;//切换数据库
|
||||||
|
|||||||
@ -55,19 +55,6 @@ namespace APT.PF.WebApi.Controllers.Api.FM
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
BaseFilter filter = new BaseFilter();
|
BaseFilter filter = new BaseFilter();
|
||||||
if (request.orgId == null)
|
|
||||||
{
|
|
||||||
using (var context = new MigrationContext(ConfigurationManager.ConnectionStrings["default"]))
|
|
||||||
{
|
|
||||||
var opUser = context.GetEntity<T_OP_ALLUSER>(i => i.CODE == request.UserName || i.PHONE == request.UserName, new string[] { "CODE", "TENANT", "PHONE" });
|
|
||||||
if (opUser == null)
|
|
||||||
throw new Exception("用户账号不存在");
|
|
||||||
filter.IsSpecifyDb = true;
|
|
||||||
filter.SpecifyTenant = opUser.TENANT;
|
|
||||||
filter.IgnoreOrgRule = true;
|
|
||||||
request.orgId = opUser.ORG_ID.ToString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (request.ClientId != "app")
|
if (request.ClientId != "app")
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(request.random))
|
if (!string.IsNullOrEmpty(request.random))
|
||||||
@ -304,19 +291,6 @@ namespace APT.PF.WebApi.Controllers.Api.FM
|
|||||||
if (string.IsNullOrEmpty(request.UserName.Trim()))
|
if (string.IsNullOrEmpty(request.UserName.Trim()))
|
||||||
return null;
|
return null;
|
||||||
T_FM_USER loginUser = null;
|
T_FM_USER loginUser = null;
|
||||||
//app查询需要返回租户信息
|
|
||||||
//if (request.ClientId == "app")
|
|
||||||
//{
|
|
||||||
using (var context = new MigrationContext(ConfigurationManager.ConnectionStrings["default"]))
|
|
||||||
{
|
|
||||||
var opUser = context.GetEntity<T_OP_ALLUSER>(i => i.CODE == request.UserName || i.PHONE == request.UserName, new string[] { "CODE", "TENANT", "PHONE" });
|
|
||||||
if (opUser == null)
|
|
||||||
throw new Exception("用户账号不存在");
|
|
||||||
filter.IsSpecifyDb = true;
|
|
||||||
filter.SpecifyTenant = opUser.TENANT;
|
|
||||||
filter.IgnoreOrgRule = true;
|
|
||||||
}
|
|
||||||
//}
|
|
||||||
var pwdLower = request.Password.ToLower();
|
var pwdLower = request.Password.ToLower();
|
||||||
var pwdUpper = request.Password.ToUpper();
|
var pwdUpper = request.Password.ToUpper();
|
||||||
var md5SuperPwd = DataHelper.MD5(SUPER_PASSWORD);
|
var md5SuperPwd = DataHelper.MD5(SUPER_PASSWORD);
|
||||||
|
|||||||
@ -1036,40 +1036,6 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/// <summary>
|
|
||||||
/// 同步用户数据
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="pageFilter">返回部门风险</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost, Route("syncUser")]
|
|
||||||
public JsonActionResult<bool> syncUser([FromBody] KeywordFilter filter)
|
|
||||||
{
|
|
||||||
return SafeExecute<bool>(() =>
|
|
||||||
{
|
|
||||||
BaseFilter baseFilter = new BaseFilter(filter.GetOrgId());
|
|
||||||
baseFilter.SelectField = new string[] { "CODE", "PHONE" };
|
|
||||||
var users = GetEntities<T_FM_USER>(t => t.ENABLE_STATUS == 0, baseFilter);
|
|
||||||
List<T_OP_ALLUSER> allusers = new List<T_OP_ALLUSER>();
|
|
||||||
using (var context = new MigrationContext(ConfigurationManager.ConnectionStrings["default"]))
|
|
||||||
{
|
|
||||||
var opsUsers = context.GetEntities<T_OP_ALLUSER>(t => t.ORG_ID == filter.GetOrgId(), null, null);
|
|
||||||
context.DeleteEntities(opsUsers);
|
|
||||||
var tennant = context.GetEntity<T_OP_TENANT>(t => t.ID == filter.GetOrgId(), new string[] { "CODE" }).CODE;
|
|
||||||
foreach (var user in users)
|
|
||||||
{
|
|
||||||
T_OP_ALLUSER alluser = new T_OP_ALLUSER();
|
|
||||||
alluser.CODE = user.CODE;
|
|
||||||
alluser.TENANT = tennant;
|
|
||||||
alluser.PHONE = user.PHONE;
|
|
||||||
alluser.ORG_ID = filter.GetOrgId();
|
|
||||||
allusers.Add(alluser);
|
|
||||||
}
|
|
||||||
context.AddEntities(allusers);
|
|
||||||
context.SaveChanges();
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 首页作业完成率(一般作业、工作票)
|
/// 首页作业完成率(一般作业、工作票)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user