用户列表添加字段是否上传签名
This commit is contained in:
parent
de6bdd1a18
commit
cd07269680
@ -1,42 +1,43 @@
|
||||
using APT.Infrastructure.EF.Map;
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace APT.BaseData.Data.Mapping.FM
|
||||
{
|
||||
public class FMUserMap : APTEntityBaseMap<T_FM_USER>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_FM_USER> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.Property(t => t.NAME)
|
||||
.HasMaxLength(50);
|
||||
|
||||
builder.Property(t => t.NAME_ACRONYM).HasMaxLength(100);
|
||||
builder.Property(t => t.CODE).IsRequired()
|
||||
.HasMaxLength(50);
|
||||
|
||||
|
||||
builder.Property(t => t.PHONE)
|
||||
.HasMaxLength(50);
|
||||
|
||||
builder.Property(t => t.PASSWORD)
|
||||
.HasMaxLength(128);
|
||||
|
||||
|
||||
builder.Property(t => t.REMARK).HasMaxLength(300);
|
||||
|
||||
builder.HasOne(t => t.Nav_Department).WithMany(t => t.Nav_UserList).HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
builder.HasOne(t => t.Nav_Person).WithOne(t => t.Nav_User).HasForeignKey<T_FM_USER>(t => t.PERSON_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Ignore(t => t.TEAMNAME);
|
||||
builder.Ignore(t => t.Team);
|
||||
builder.Property(t => t.ID_CARD)
|
||||
.HasMaxLength(50);
|
||||
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.Tenant);
|
||||
}
|
||||
}
|
||||
}
|
||||
using APT.Infrastructure.EF.Map;
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace APT.BaseData.Data.Mapping.FM
|
||||
{
|
||||
public class FMUserMap : APTEntityBaseMap<T_FM_USER>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_FM_USER> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.Property(t => t.NAME)
|
||||
.HasMaxLength(50);
|
||||
|
||||
builder.Property(t => t.NAME_ACRONYM).HasMaxLength(100);
|
||||
builder.Property(t => t.CODE).IsRequired()
|
||||
.HasMaxLength(50);
|
||||
|
||||
|
||||
builder.Property(t => t.PHONE)
|
||||
.HasMaxLength(50);
|
||||
|
||||
builder.Property(t => t.PASSWORD)
|
||||
.HasMaxLength(128);
|
||||
|
||||
|
||||
builder.Property(t => t.REMARK).HasMaxLength(300);
|
||||
|
||||
builder.HasOne(t => t.Nav_Department).WithMany(t => t.Nav_UserList).HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
builder.HasOne(t => t.Nav_Person).WithOne(t => t.Nav_User).HasForeignKey<T_FM_USER>(t => t.PERSON_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Ignore(t => t.TEAMNAME);
|
||||
builder.Ignore(t => t.Team);
|
||||
builder.Property(t => t.ID_CARD)
|
||||
.HasMaxLength(50);
|
||||
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.Tenant);
|
||||
builder.Ignore(t => t.IS_SIGN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,185 +1,187 @@
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.Infrastructure.Utility;
|
||||
using APT.MS.Domain.Entities.PF;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.BaseData.Domain.Entities.FM
|
||||
{
|
||||
[Description("用户表")]
|
||||
/// <summary>
|
||||
/// 用户
|
||||
/// </summary>
|
||||
[Redis("ID","ID","CODE")]
|
||||
[DataClassIndex(new string[] { "CODE", "ORG_ID" }, true)]
|
||||
[IgnoreT4] public partial class T_FM_USER : MesEntityBase
|
||||
{
|
||||
[Description("姓名")]
|
||||
/// <summary>
|
||||
/// 姓名
|
||||
/// </summary>
|
||||
[AcronymField("NAME_ACRONYM")]
|
||||
public string NAME { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称首字母缩写
|
||||
/// </summary>
|
||||
[Description("名称首字母缩写")]
|
||||
public string NAME_ACRONYM { get; set; }
|
||||
[Description("编码")]
|
||||
/// <summary>
|
||||
/// 编码,即为登入账号
|
||||
/// </summary>
|
||||
|
||||
public string CODE { get; set; }
|
||||
[Description("密码")]
|
||||
/// <summary>
|
||||
/// 密码
|
||||
/// </summary>
|
||||
public string PASSWORD { get; set; }
|
||||
[Description("手机")]
|
||||
|
||||
/// <summary>手机号 </summary>
|
||||
public string PHONE { get; set; }
|
||||
|
||||
[Description("部门ID")]
|
||||
/// <summary>
|
||||
/// 部门ID
|
||||
/// </summary>
|
||||
public Guid? DEPARTMENT_ID { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// FMEnableStatusEnum(0启用1停用)
|
||||
/// </summary>
|
||||
[Description("启用标志")]
|
||||
[EnumName("FMEnableStatusEnum")]
|
||||
public int ENABLE_STATUS { get; set; }
|
||||
|
||||
|
||||
[Description("备注")]
|
||||
public string REMARK { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用于记录用户设置的打印机
|
||||
/// </summary>
|
||||
[Description("打印机ID")]
|
||||
public Guid? PRINTER_ID { get; set; }
|
||||
|
||||
|
||||
[Description("人员ID")]
|
||||
public Guid? PERSON_ID { get; set; }
|
||||
|
||||
[Description("租户")]
|
||||
public string Tenant { get; set; }
|
||||
|
||||
[Description("导航:人员")]
|
||||
/// <summary>
|
||||
/// 部门
|
||||
/// </summary>
|
||||
///
|
||||
public virtual T_FM_PERSON Nav_Person { get; set; }
|
||||
|
||||
|
||||
|
||||
[Description("导航:部门")]
|
||||
/// <summary>
|
||||
/// 部门
|
||||
/// </summary>
|
||||
///
|
||||
public virtual T_FM_DEPARTMENT Nav_Department { get; set; }
|
||||
[Description("导航:角色列表")]
|
||||
public virtual ICollection<T_FM_USER_BELONG_ROLE> Nav_BelongRoles { get; set; }
|
||||
[Description("导航:角色组列表")]
|
||||
public virtual ICollection<T_FM_USER_BELONG_ROLE_GROUP> Nav_BelongRoleGroups { get; set; }
|
||||
[Description("导航:用户组列表")]
|
||||
public virtual ICollection<T_FM_USER_BELONG_USER_GROUP> Nav_BelongUserGroups { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 头像文件
|
||||
/// </summary>
|
||||
[Description("导航:头像文件")]
|
||||
public virtual List<T_FM_USER_PHOTO_FILE> Nav_UserPhotoFiles { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 头像文件
|
||||
/// </summary>
|
||||
[Description("导航:签名照片")]
|
||||
public virtual List<T_FM_USER_SIGN_FILE> Nav_UserSignFiles { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 头像文件
|
||||
/// </summary>
|
||||
[Description("班组ID")]
|
||||
[DataFieldIngore]
|
||||
public T_FM_TEAM Team { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 性别
|
||||
/// </summary>
|
||||
[Description("性别")]
|
||||
[FormFieldTable]
|
||||
[FormFieldEdit]
|
||||
[FormFieldQuery]
|
||||
[EnumName("FMSexEnum")]
|
||||
public int SEX { get; set; }
|
||||
/// <summary>
|
||||
/// 班组
|
||||
/// </summary>
|
||||
[Description("班组")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[DataFieldIngore]
|
||||
public string TEAMNAME { get; set; }
|
||||
/// <summary>
|
||||
/// 班组ID
|
||||
/// </summary>
|
||||
[Description("班组ID")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[DataFieldIngore]
|
||||
public Guid? TEAM_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 班组
|
||||
/// </summary>
|
||||
[Description("身份证号")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[DataFieldLength(50)]
|
||||
public string ID_CARD { get; set; }
|
||||
/// <summary>
|
||||
/// 班组
|
||||
/// </summary>
|
||||
[Description("入职时间")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public DateTime ENTRYTIME { get; set; }
|
||||
/// <summary>
|
||||
/// 班组
|
||||
/// </summary>
|
||||
[Description("离职时间")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public DateTime? DEPARTURETIME { get; set; }
|
||||
/// <summary>
|
||||
/// 班组
|
||||
/// </summary>
|
||||
[Description("工龄")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public int WORKINGYEAR { get; set; }
|
||||
[Description("人员ID")]
|
||||
[DataFieldForeignKey("Nav_ApproveRole")]
|
||||
|
||||
public Guid? APPROVE_ROLE_ID { get; set; }
|
||||
|
||||
[Description("导航属性:审批角色")]
|
||||
public virtual T_PF_APPROVAL_ROLE Nav_ApproveRole { get; set; }
|
||||
|
||||
[Description("生产单元")]
|
||||
public virtual ICollection<T_FM_USER_PRODUCTION_UNIT> Nav_ProdutionUnit { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.Infrastructure.Utility;
|
||||
using APT.MS.Domain.Entities.PF;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.BaseData.Domain.Entities.FM
|
||||
{
|
||||
[Description("用户表")]
|
||||
/// <summary>
|
||||
/// 用户
|
||||
/// </summary>
|
||||
[Redis("ID","ID","CODE")]
|
||||
[DataClassIndex(new string[] { "CODE", "ORG_ID" }, true)]
|
||||
[IgnoreT4] public partial class T_FM_USER : MesEntityBase
|
||||
{
|
||||
[Description("姓名")]
|
||||
/// <summary>
|
||||
/// 姓名
|
||||
/// </summary>
|
||||
[AcronymField("NAME_ACRONYM")]
|
||||
public string NAME { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称首字母缩写
|
||||
/// </summary>
|
||||
[Description("名称首字母缩写")]
|
||||
public string NAME_ACRONYM { get; set; }
|
||||
[Description("编码")]
|
||||
/// <summary>
|
||||
/// 编码,即为登入账号
|
||||
/// </summary>
|
||||
|
||||
public string CODE { get; set; }
|
||||
[Description("密码")]
|
||||
/// <summary>
|
||||
/// 密码
|
||||
/// </summary>
|
||||
public string PASSWORD { get; set; }
|
||||
[Description("手机")]
|
||||
|
||||
/// <summary>手机号 </summary>
|
||||
public string PHONE { get; set; }
|
||||
|
||||
[Description("部门ID")]
|
||||
/// <summary>
|
||||
/// 部门ID
|
||||
/// </summary>
|
||||
public Guid? DEPARTMENT_ID { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// FMEnableStatusEnum(0启用1停用)
|
||||
/// </summary>
|
||||
[Description("启用标志")]
|
||||
[EnumName("FMEnableStatusEnum")]
|
||||
public int ENABLE_STATUS { get; set; }
|
||||
|
||||
|
||||
[Description("备注")]
|
||||
public string REMARK { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用于记录用户设置的打印机
|
||||
/// </summary>
|
||||
[Description("打印机ID")]
|
||||
public Guid? PRINTER_ID { get; set; }
|
||||
|
||||
|
||||
[Description("人员ID")]
|
||||
public Guid? PERSON_ID { get; set; }
|
||||
|
||||
[Description("租户")]
|
||||
public string Tenant { get; set; }
|
||||
|
||||
[Description("导航:人员")]
|
||||
/// <summary>
|
||||
/// 部门
|
||||
/// </summary>
|
||||
///
|
||||
public virtual T_FM_PERSON Nav_Person { get; set; }
|
||||
|
||||
|
||||
|
||||
[Description("导航:部门")]
|
||||
/// <summary>
|
||||
/// 部门
|
||||
/// </summary>
|
||||
///
|
||||
public virtual T_FM_DEPARTMENT Nav_Department { get; set; }
|
||||
[Description("导航:角色列表")]
|
||||
public virtual ICollection<T_FM_USER_BELONG_ROLE> Nav_BelongRoles { get; set; }
|
||||
[Description("导航:角色组列表")]
|
||||
public virtual ICollection<T_FM_USER_BELONG_ROLE_GROUP> Nav_BelongRoleGroups { get; set; }
|
||||
[Description("导航:用户组列表")]
|
||||
public virtual ICollection<T_FM_USER_BELONG_USER_GROUP> Nav_BelongUserGroups { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 头像文件
|
||||
/// </summary>
|
||||
[Description("导航:头像文件")]
|
||||
public virtual List<T_FM_USER_PHOTO_FILE> Nav_UserPhotoFiles { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 头像文件
|
||||
/// </summary>
|
||||
[Description("导航:签名照片")]
|
||||
public virtual List<T_FM_USER_SIGN_FILE> Nav_UserSignFiles { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 头像文件
|
||||
/// </summary>
|
||||
[Description("班组ID")]
|
||||
[DataFieldIngore]
|
||||
public T_FM_TEAM Team { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 性别
|
||||
/// </summary>
|
||||
[Description("性别")]
|
||||
[FormFieldTable]
|
||||
[FormFieldEdit]
|
||||
[FormFieldQuery]
|
||||
[EnumName("FMSexEnum")]
|
||||
public int SEX { get; set; }
|
||||
/// <summary>
|
||||
/// 班组
|
||||
/// </summary>
|
||||
[Description("班组")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[DataFieldIngore]
|
||||
public string TEAMNAME { get; set; }
|
||||
/// <summary>
|
||||
/// 班组ID
|
||||
/// </summary>
|
||||
[Description("班组ID")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[DataFieldIngore]
|
||||
public Guid? TEAM_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 班组
|
||||
/// </summary>
|
||||
[Description("身份证号")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[DataFieldLength(50)]
|
||||
public string ID_CARD { get; set; }
|
||||
/// <summary>
|
||||
/// 班组
|
||||
/// </summary>
|
||||
[Description("入职时间")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public DateTime ENTRYTIME { get; set; }
|
||||
/// <summary>
|
||||
/// 班组
|
||||
/// </summary>
|
||||
[Description("离职时间")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public DateTime? DEPARTURETIME { get; set; }
|
||||
/// <summary>
|
||||
/// 班组
|
||||
/// </summary>
|
||||
[Description("工龄")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public int WORKINGYEAR { get; set; }
|
||||
[Description("人员ID")]
|
||||
[DataFieldForeignKey("Nav_ApproveRole")]
|
||||
|
||||
public Guid? APPROVE_ROLE_ID { get; set; }
|
||||
|
||||
[Description("导航属性:审批角色")]
|
||||
public virtual T_PF_APPROVAL_ROLE Nav_ApproveRole { get; set; }
|
||||
|
||||
[Description("生产单元")]
|
||||
public virtual ICollection<T_FM_USER_PRODUCTION_UNIT> Nav_ProdutionUnit { get; set; }
|
||||
[Description("是否上传签名")]
|
||||
[DataFieldIngore]
|
||||
public string IS_SIGN { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -136,7 +136,24 @@ namespace APT.FM.WebApi.Controllers.Api.FM
|
||||
{
|
||||
express = express.And(t => t.Nav_BelongRoles.Any(i => i.Nav_BelongRole.NAME.Contains(pageFilter.Parameter1)));
|
||||
}
|
||||
var result = this.WitOrderPaged(express, pageFilter);
|
||||
var result = this.WitOrderPaged(express, pageFilter);
|
||||
if (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));
|
||||
result.Data.ForEach(t =>
|
||||
{
|
||||
var temp = signs.FirstOrDefault(m => m.USER_ID == t.ID);
|
||||
if (temp != null)
|
||||
{
|
||||
t.IS_SIGN = "是";
|
||||
}
|
||||
else
|
||||
{
|
||||
t.IS_SIGN = "否";
|
||||
}
|
||||
});
|
||||
}
|
||||
return result;
|
||||
//if (string.IsNullOrEmpty(pageFilter.Parameter1))
|
||||
//{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user