删除生产单元
This commit is contained in:
		
							parent
							
								
									b8fe7cf387
								
							
						
					
					
						commit
						a9324b66b9
					
				@ -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; }
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -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; }
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										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)");
 | 
				
			||||||
@ -13983,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)");
 | 
				
			||||||
 | 
				
			|||||||
@ -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;
 | 
				
			||||||
 | 
				
			|||||||
@ -398,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;
 | 
				
			||||||
@ -587,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>();
 | 
				
			||||||
 | 
				
			|||||||
@ -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;//切换数据库
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user