148 changed files with 7974 additions and 0 deletions
@ -0,0 +1,51 @@ |
|||
using EFCoreDatabase.Entities; |
|||
using Microsoft.EntityFrameworkCore; |
|||
|
|||
namespace EFCoreDatabase.Data |
|||
{ |
|||
public class DmDBContext:DbContext |
|||
{ |
|||
public DmDBContext(DbContextOptions<DmDBContext> options) |
|||
: base(options) |
|||
{ |
|||
|
|||
} |
|||
|
|||
public DbSet<MANAGE_MAIN> Manage_Main { get; set; } |
|||
public DbSet<MANAGE_LIST> Manage_List { get; set; } |
|||
public DbSet<STORAGE_MAIN> Storage_Main { get; set; } |
|||
public DbSet<STORAGE_LIST> Storage_List { get; set; } |
|||
public DbSet<WH_CELL> Wh_Cell { get; set; } |
|||
public DbSet<IO_CONTROL_ROUTE> Io_Control_Routes { get; set; } |
|||
public DbSet<IO_CONTROL> Io_Control { get; set; } |
|||
public DbSet<RESERVE_CELL> Reserve_Cell { get; set; } |
|||
public DbSet<SYS_ITEM> Sys_Item { get; set; } |
|||
public DbSet<SYS_ITEM_LIST> Sys_Item_List { get; set; } |
|||
|
|||
public DbSet<STACKER_CRANE_STATUS> Stacker_Crane_Status { get; set; } |
|||
public DbSet<IO_CONTROL_APPLY_HIS> Io_Control_Apply_His { get; set; } |
|||
|
|||
public DbSet<GOODS_MAIN> Goods_Main { get; set; } |
|||
|
|||
public virtual DbSet<V_STORAGE_LIST> V_Storage_List { get; set; } |
|||
|
|||
protected override void OnModelCreating(ModelBuilder modelBuilder) |
|||
{ |
|||
//定义视图无主键
|
|||
modelBuilder.Entity<V_STORAGE_LIST>().HasNoKey(); |
|||
modelBuilder.Entity<MANAGE_LIST>(x => x.Property(e => e.WEIGHT_EMPTY_BUCKET).HasColumnType("decimal")); |
|||
modelBuilder.Entity<MANAGE_LIST>(x => x.Property(e => e.WEIGHT_RUBBER).HasColumnType("decimal")); |
|||
modelBuilder.Entity<MANAGE_LIST>(x => x.Property(e => e.MANAGE_LIST_QUANTITY).HasColumnType("decimal")); |
|||
modelBuilder.Entity<STORAGE_LIST>(x => x.Property(e => e.WEIGHT_EMPTY_BUCKET).HasColumnType("decimal")); |
|||
modelBuilder.Entity<STORAGE_LIST>(x => x.Property(e => e.WEIGHT_RUBBER).HasColumnType("decimal")); |
|||
modelBuilder.Entity<STORAGE_LIST>(x => x.Property(e => e.STORAGE_LIST_QUANTITY).HasColumnType("decimal")); |
|||
modelBuilder.Entity<V_STORAGE_LIST>(x => x.Property(e => e.WEIGHT_EMPTY_BUCKET).HasColumnType("decimal")); |
|||
modelBuilder.Entity<V_STORAGE_LIST>(x => x.Property(e => e.WEIGHT_RUBBER).HasColumnType("decimal")); |
|||
modelBuilder.Entity<V_STORAGE_LIST>(x => x.Property(e => e.MANAGE_LIST_QUANTITY).HasColumnType("decimal")); |
|||
modelBuilder.Entity<V_STORAGE_LIST>(x => x.Property(e => e.STORAGE_LIST_QUANTITY).HasColumnType("decimal")); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,21 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>net8.0</TargetFramework> |
|||
<ImplicitUsings>enable</ImplicitUsings> |
|||
<Nullable>enable</Nullable> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<Folder Include="Entities\" /> |
|||
<Folder Include="Repositories\" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="DM.DmProvider" Version="8.3.1.30495" /> |
|||
<PackageReference Include="DM.Microsoft.EntityFrameworkCore" Version="8.0.0.28188" /> |
|||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.13" /> |
|||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
@ -0,0 +1,75 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace EFCoreDatabase.Entities |
|||
{ |
|||
[Table("GOODS_MAIN")] |
|||
public class GOODS_MAIN |
|||
{ |
|||
[Column("GOODS_ID")] |
|||
[Key] |
|||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
|||
public int GOODS_ID { get; set; } |
|||
|
|||
[Column("GOODS_CLASS_ID")] |
|||
public int GOODS_CLASS_ID { get; set; } |
|||
|
|||
[Column("LOGIC_ID")] |
|||
public int LOGIC_ID { get; set; } |
|||
|
|||
[Column("GOODS_CODE")] |
|||
public string GOODS_CODE { get; set; } |
|||
|
|||
[Column("GOODS_NAME")] |
|||
public string GOODS_NAME { get; set; } |
|||
|
|||
[Column("GOODS_UNITS")] |
|||
public string GOODS_UNITS { get; set; } |
|||
|
|||
[Column("GOODS_CONST_PROPERTY1")] |
|||
public string GOODS_CONST_PROPERTY1 { get; set; } |
|||
|
|||
[Column("GOODS_CONST_PROPERTY2")] |
|||
public string GOODS_CONST_PROPERTY2 { get; set; } |
|||
|
|||
[Column("GOODS_CONST_PROPERTY3")] |
|||
public string GOODS_CONST_PROPERTY3 { get; set; } |
|||
|
|||
[Column("GOODS_CONST_PROPERTY4")] |
|||
public string GOODS_CONST_PROPERTY4 { get; set; } |
|||
|
|||
[Column("GOODS_CONST_PROPERTY5")] |
|||
public string GOODS_CONST_PROPERTY5 { get; set; } |
|||
|
|||
[Column("GOODS_CONST_PROPERTY6")] |
|||
public string GOODS_CONST_PROPERTY6 { get; set; } |
|||
|
|||
[Column("GOODS_CONST_PROPERTY7")] |
|||
public string GOODS_CONST_PROPERTY7 { get; set; } |
|||
|
|||
[Column("GOODS_CONST_PROPERTY8")] |
|||
public string GOODS_CONST_PROPERTY8 { get; set; } |
|||
|
|||
[Column("GOODS_LIMIT_UPPER_QUANTITY")] |
|||
public string GOODS_LIMIT_UPPER_QUANTITY { get; set; } |
|||
|
|||
[Column("GOODS_LIMIT_LOWER_QUANTITY")] |
|||
public string GOODS_LIMIT_LOWER_QUANTITY { get; set; } |
|||
|
|||
[Column("GOODS_REMARK")] |
|||
public string GOODS_REMARK { get; set; } |
|||
|
|||
[Column("GOODS_ORDER")] |
|||
public string GOODS_ORDER { get; set; } |
|||
|
|||
[Column("GOODS_FLAG")] |
|||
public string GOODS_FLAG { get; set; } |
|||
|
|||
[Column("GOODS_COLOR")] |
|||
public string GOODS_COLOR { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,67 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
|
|||
namespace EFCoreDatabase.Entities |
|||
{ |
|||
[Table("IO_CONTROL")] |
|||
public class IO_CONTROL |
|||
{ |
|||
[Column("CONTROL_ID")] |
|||
[Key] |
|||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
|||
public int CONTROL_ID { get; set; } |
|||
[Column("RELATIVE_CONTROL_ID")] |
|||
public int RELATIVE_CONTROL_ID { get; set; } |
|||
|
|||
[Column("MANAGE_ID")] |
|||
public int MANAGE_ID { get; set; } |
|||
[Column("CELL_GROUP")] |
|||
public string CELL_GROUP { get; set; } |
|||
[Column("STOCK_BARCODE")] |
|||
public string STOCK_BARCODE { get; set; } |
|||
|
|||
[Column("PRE_CONTROL_STATUS")] |
|||
public string PRE_CONTROL_STATUS { get; set; } |
|||
|
|||
[Column("CONTROL_TASK_TYPE")] |
|||
public int CONTROL_TASK_TYPE { get; set; } |
|||
|
|||
[Column("CONTROL_TASK_LEVEL")] |
|||
public string CONTROL_TASK_LEVEL { get; set; } |
|||
|
|||
[Column("START_WAREHOUSE_CODE")] |
|||
public string START_WAREHOUSE_CODE { get; set; } |
|||
|
|||
[Column("END_WAREHOUSE_CODE")] |
|||
public string END_WAREHOUSE_CODE { get; set; } |
|||
|
|||
[Column("START_DEVICE_CODE")] |
|||
public string START_DEVICE_CODE { get; set; } |
|||
|
|||
[Column("END_DEVICE_CODE")] |
|||
public string END_DEVICE_CODE { get; set; } |
|||
|
|||
[Column("CONTROL_STATUS")] |
|||
public int CONTROL_STATUS { get; set; } |
|||
|
|||
[Column("ERROR_TEXT")] |
|||
public string ERROR_TEXT { get; set; } |
|||
|
|||
[Column("CONTROL_BEGIN_TIME")] |
|||
public string CONTROL_BEGIN_TIME { get; set; } |
|||
|
|||
[Column("CONTROL_END_TIME")] |
|||
public string CONTROL_END_TIME { get; set; } |
|||
|
|||
[Column("CONTROL_REMARK")] |
|||
public string CONTROL_REMARK { get; set; } |
|||
|
|||
[Column("BOX_TYPE")] |
|||
public string BOX_TYPE { get; set; } |
|||
|
|||
[Column("RF_DATA")] |
|||
public string RF_DATA { get; set; } |
|||
[Column("UNLOADING_TASK_COUNT")] |
|||
public int UNLOADING_TASK_COUNT { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,50 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace EFCoreDatabase.Entities |
|||
{ |
|||
[Table("IO_CONTROL_APPLY_HIS")] |
|||
public class IO_CONTROL_APPLY_HIS |
|||
{ |
|||
[Column("CONTROL_APPLY_ID")] |
|||
[Key] |
|||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
|||
public int CONTROL_APPLY_ID { get; set; } |
|||
|
|||
[Column("CONTROL_ID")] |
|||
public int CONTROL_ID { get; set; } |
|||
[Column("CONTROL_APPLY_TYPE")] |
|||
public string CONTROL_APPLY_TYPE { get; set; } |
|||
[Column("WAREHOUSE_CODE")] |
|||
public string WAREHOUSE_CODE { get; set; } |
|||
[Column("DEVICE_CODE")] |
|||
public string DEVICE_CODE { get; set; } |
|||
[Column("STOCK_BARCODE")] |
|||
public string STOCK_BARCODE { get; set; } |
|||
[Column("APPLY_TASK_STATUS")] |
|||
public int APPLY_TASK_STATUS { get; set; } |
|||
[Column("CREATE_TIME")] |
|||
public string CREATE_TIME { get; set; } |
|||
|
|||
[Column("CONTROL_ERROR_TEXT")] |
|||
public string CONTROL_ERROR_TEXT { get; set; } |
|||
|
|||
[Column("MANAGE_ERROR_TEXT")] |
|||
public string MANAGE_ERROR_TEXT { get; set; } |
|||
|
|||
[Column("CONTROL_APPLY_PARAMETER")] |
|||
public string CONTROL_APPLY_PARAMETER { get; set; } |
|||
[Column("CONTROL_APPLY_PARA01")] |
|||
public string CONTROL_APPLY_PARA01 { get; set; } |
|||
[Column("CONTROL_APPLY_PARA02")] |
|||
public string CONTROL_APPLY_PARA02 { get; set; } |
|||
[Column("CONTROL_APPLY_REMARK")] |
|||
public string CONTROL_APPLY_REMARK { get; set; } |
|||
[Column("BUCKET_WEIGHT")] |
|||
public string BUCKET_WEIGHT { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,30 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
|
|||
namespace EFCoreDatabase.Entities |
|||
{ |
|||
[Table("IO_CONTROL_ROUTE")] |
|||
public class IO_CONTROL_ROUTE |
|||
{ |
|||
[Column("CONTROL_ROUTE_ID")] |
|||
[Key] |
|||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
|||
public int CONTROL_ROUTE_ID { get; set; } |
|||
[Column("CONTROL_ROUTE_TYPE")] |
|||
public int CONTROL_ROUTE_TYPE { get; set; } |
|||
[Column("CONTROL_ROUTE_CODE")] |
|||
public string CONTROL_ROUTE_CODE { get; set; } |
|||
|
|||
[Column("CONTROL_ROUTE_NAME")] |
|||
public string CONTROL_ROUTE_NAME { get; set; } |
|||
[Column("START_DEVICE")] |
|||
public string START_DEVICE { get; set; } |
|||
[Column("END_DEVICE")] |
|||
public string END_DEVICE { get; set; } |
|||
[Column("CONTROL_ROUTE_STATUS")] |
|||
public int CONTROL_ROUTE_STATUS { get; set; } |
|||
|
|||
[Column("CONTROL_ROUTE_REMARK")] |
|||
public string CONTROL_ROUTE_REMARK { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,131 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
|
|||
namespace EFCoreDatabase.Entities |
|||
{ |
|||
public class MANAGE_LIST |
|||
{ |
|||
[Column("MANAGE_LIST_ID")] |
|||
[Key] |
|||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
|||
public int MANAGE_LIST_ID { get; set; } |
|||
|
|||
[Column("STORAGE_LIST_ID")] |
|||
public int STORAGE_LIST_ID { get; set; } |
|||
|
|||
[Column("PLAN_LIST_ID")] |
|||
public int PLAN_LIST_ID { get; set; } |
|||
|
|||
[Column("MANAGE_ID")] |
|||
public int MANAGE_ID { get; set; } |
|||
|
|||
[Column("GOODS_ID")] |
|||
public int GOODS_ID { get; set; } |
|||
|
|||
[Column("MANAGE_LIST_QUANTITY")] |
|||
public decimal MANAGE_LIST_QUANTITY { get; set; } |
|||
|
|||
[Column("MANAGE_LIST_REMARK")] |
|||
public string MANAGE_LIST_REMARK { get; set; } |
|||
|
|||
[Column("BOX_BARCODE")] |
|||
public string BOX_BARCODE { get; set; } |
|||
|
|||
[Column("GOODS_PROPERTY1")] |
|||
public string GOODS_PROPERTY1 { get; set; } |
|||
|
|||
[Column("GOODS_PROPERTY2")] |
|||
public string GOODS_PROPERTY2 { get; set; } |
|||
|
|||
[Column("GOODS_PROPERTY3")] |
|||
public string GOODS_PROPERTY3 { get; set; } |
|||
|
|||
[Column("GOODS_PROPERTY4")] |
|||
public string GOODS_PROPERTY4 { get; set; } |
|||
|
|||
[Column("GOODS_PROPERTY5")] |
|||
public string GOODS_PROPERTY5 { get; set; } |
|||
|
|||
[Column("GOODS_PROPERTY6")] |
|||
public string GOODS_PROPERTY6 { get; set; } |
|||
|
|||
[Column("GOODS_PROPERTY7")] |
|||
public string GOODS_PROPERTY7 { get; set; } |
|||
|
|||
[Column("GOODS_PROPERTY8")] |
|||
public string GOODS_PROPERTY8 { get; set; } |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 传输号
|
|||
/// </summary>
|
|||
[Column("BUCKET_TRANSACTION_NUMBER")] |
|||
public string BUCKET_TRANSACTION_NUMBER { get; set; } |
|||
/// <summary>
|
|||
/// 空桶重量
|
|||
/// </summary>
|
|||
[Column("WEIGHT_EMPTY_BUCKET")] |
|||
public decimal WEIGHT_EMPTY_BUCKET { get; set; } |
|||
/// <summary>
|
|||
/// 橡胶重量
|
|||
/// </summary>
|
|||
[Column("WEIGHT_RUBBER")] |
|||
public decimal WEIGHT_RUBBER { get; set; } |
|||
/// <summary>
|
|||
/// ReturnCode
|
|||
/// </summary>
|
|||
[Column("ReturnCode")] |
|||
public string ReturnCode { get; set; } |
|||
/// <summary>
|
|||
/// ReturnCodeLabel
|
|||
/// </summary>
|
|||
[Column("ReturnCodeLabel")] |
|||
public string ReturnCodeLabel { get; set; } |
|||
/// <summary>
|
|||
/// BatchNumber
|
|||
/// </summary>
|
|||
[Column("BatchNumber")] |
|||
public string BatchNumber { get; set; } |
|||
/// <summary>
|
|||
/// ProductCode
|
|||
/// </summary>
|
|||
[Column("ProductCode")] |
|||
public string ProductCode { get; set; } |
|||
/// <summary>
|
|||
/// ProductFamily
|
|||
/// </summary>
|
|||
[Column("ProductFamily")] |
|||
public string ProductFamily { get; set; } |
|||
/// <summary>
|
|||
/// BaseProductCode
|
|||
/// </summary>
|
|||
[Column("BaseProductCode")] |
|||
public string BaseProductCode { get; set; } |
|||
/// <summary>
|
|||
/// MFDCODE
|
|||
/// </summary>
|
|||
[Column("MFDCODE")] |
|||
public string MFDCODE { get; set; } |
|||
/// <summary>
|
|||
/// ItemFabricationDate
|
|||
/// </summary>
|
|||
[Column("ItemFabricationDate")] |
|||
public string ItemFabricationDate { get; set; } |
|||
/// <summary>
|
|||
/// StoreType
|
|||
/// </summary>
|
|||
[Column("StoreType")] |
|||
public string StoreType { get; set; } |
|||
/// <summary>
|
|||
/// StoreCode
|
|||
/// </summary>
|
|||
[Column("StoreCode")] |
|||
public string StoreCode { get; set; } |
|||
/// <summary>
|
|||
/// AddressCode
|
|||
/// </summary>
|
|||
[Column("AddressCode")] |
|||
public string AddressCode { get; set; } |
|||
|
|||
} |
|||
} |
@ -0,0 +1,40 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
|
|||
namespace EFCoreDatabase.Entities |
|||
{ |
|||
[Table("MANAGE_MAIN")] |
|||
public class MANAGE_MAIN |
|||
{ |
|||
[Column("MANAGE_ID")] |
|||
[Key] |
|||
public int MANAGE_ID { get; set; } |
|||
[Column("PLAN_ID")] |
|||
public int PLAN_ID { get; set; } |
|||
[Column("MANAGE_TYPE_CODE")] |
|||
public string MANAGE_TYPE_CODE { get; set; } |
|||
[Column("MANAGE_STATUS")] |
|||
public string MANAGE_STATUS { get; set; } |
|||
[Column("STOCK_BARCODE")] |
|||
public string STOCK_BARCODE { get; set; } |
|||
[Column("START_CELL_ID")] |
|||
public int START_CELL_ID { get; set; } |
|||
[Column("END_CELL_ID")] |
|||
public int END_CELL_ID { get; set; } |
|||
[Column("MANAGE_OPERATOR")] |
|||
public string MANAGE_OPERATOR { get; set; } |
|||
[Column("MANAGE_BEGIN_TIME")] |
|||
public string MANAGE_BEGIN_TIME { get; set; } |
|||
[Column("MANAGE_END_TIME")] |
|||
public string MANAGE_END_TIME { get; set; } |
|||
[Column("MANAGE_LEVEL")] |
|||
public string MANAGE_LEVEL { get; set; } |
|||
[Column("MANAGE_REMARK")] |
|||
public string MANAGE_REMARK { get; set; } |
|||
[Column("MANAGE_CONFIRM_TIME")] |
|||
public string MANAGE_CONFIRM_TIME { get; set; } |
|||
//[Column("ERROR_TXT")]
|
|||
//public string ERROR_TXT { get; set; }
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,41 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
|
|||
namespace EFCoreDatabase.Entities |
|||
{ |
|||
[Table("RESERVE_CELL")] |
|||
public class RESERVE_CELL |
|||
{ |
|||
/// <summary>
|
|||
/// 自增ID
|
|||
/// </summary>
|
|||
[Column("ID")] |
|||
[Key] |
|||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
|||
public int ID { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 货位编码
|
|||
/// </summary>
|
|||
[Column("CELL_CODE")] |
|||
public string CELL_CODE { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 货位ID
|
|||
/// </summary>
|
|||
[Column("CELL_ID")] |
|||
public int CELL_ID { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 设备编码
|
|||
/// </summary>
|
|||
[Column("DEVICE_CODE")] |
|||
public string DEVICE_CODE { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 标志位
|
|||
/// </summary>
|
|||
[Column("FLAG")] |
|||
public int FLAG { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,22 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
|
|||
namespace EFCoreDatabase.Entities |
|||
{ |
|||
public class STACKER_CRANE_STATUS |
|||
{ |
|||
[Column("ID")] |
|||
[Key] |
|||
public int ID { get; set; } |
|||
[Column("StackerCraneName")] |
|||
public string StackerCraneName { get; set; } |
|||
[Column("OperationalStatus")] |
|||
public string OperationalStatus { get; set; } |
|||
[Column("TaskId")] |
|||
public int TaskId { get; set; } |
|||
[Column("Status")] |
|||
public string Status { get; set; } |
|||
[Column("ErrorMessage")] |
|||
public string ErrorMessage { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,101 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
|
|||
namespace EFCoreDatabase.Entities |
|||
{ |
|||
[Table("STORAGE_LIST")] |
|||
public class STORAGE_LIST |
|||
{ |
|||
[Column("STORAGE_LIST_ID")] |
|||
[Key] |
|||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
|||
public int STORAGE_LIST_ID { get; set; } |
|||
|
|||
[Column("STORAGE_ID")] |
|||
public int STORAGE_ID { get; set; } |
|||
|
|||
[Column("STORAGE_LIST_QUANTITY")] |
|||
public decimal STORAGE_LIST_QUANTITY { get; set; } |
|||
|
|||
[Column("GOODS_ID")] |
|||
public int GOODS_ID { get; set; } |
|||
|
|||
[Column("ENTRY_TIME")] |
|||
public string ENTRY_TIME { get; set; } |
|||
|
|||
[Column("UPDATE_TIME")] |
|||
public string UPDATE_TIME { get; set; } |
|||
|
|||
[Column("STORAGE_LIST_REMARK")] |
|||
public string STORAGE_LIST_REMARK { get; set; } |
|||
|
|||
[Column("BOX_BARCODE")] |
|||
public string BOX_BARCODE { get; set; } |
|||
|
|||
[Column("GOODS_PROPERTY1")] |
|||
public string GOODS_PROPERTY1 { get; set; } |
|||
|
|||
[Column("GOODS_PROPERTY2")] |
|||
public string GOODS_PROPERTY2 { get; set; } |
|||
|
|||
[Column("GOODS_PROPERTY3")] |
|||
public string GOODS_PROPERTY3 { get; set; } |
|||
|
|||
[Column("GOODS_PROPERTY4")] |
|||
public string GOODS_PROPERTY4 { get; set; } |
|||
|
|||
[Column("GOODS_PROPERTY5")] |
|||
public string GOODS_PROPERTY5 { get; set; } |
|||
|
|||
[Column("GOODS_PROPERTY6")] |
|||
public string GOODS_PROPERTY6 { get; set; } |
|||
|
|||
[Column("GOODS_PROPERTY7")] |
|||
public string GOODS_PROPERTY7 { get; set; } |
|||
|
|||
[Column("GOODS_PROPERTY8")] |
|||
public string GOODS_PROPERTY8 { get; set; } |
|||
|
|||
[Column("BUCKET_TRANSACTION_NUMBER")] |
|||
public string BUCKET_TRANSACTION_NUMBER { get; set; } |
|||
|
|||
[Column("WEIGHT_EMPTY_BUCKET")] |
|||
public decimal WEIGHT_EMPTY_BUCKET { get; set; } |
|||
|
|||
[Column("WEIGHT_RUBBER")] |
|||
public decimal WEIGHT_RUBBER { get; set; } |
|||
|
|||
[Column("ReturnCode")] |
|||
public string ReturnCode { get; set; } |
|||
|
|||
[Column("ReturnCodeLabel")] |
|||
public string ReturnCodeLabel { get; set; } |
|||
|
|||
[Column("BatchNumber")] |
|||
public string BatchNumber { get; set; } |
|||
|
|||
[Column("ProductCode")] |
|||
public string ProductCode { get; set; } |
|||
|
|||
[Column("ProductFamily")] |
|||
public string ProductFamily { get; set; } |
|||
|
|||
[Column("BaseProductCode")] |
|||
public string BaseProductCode { get; set; } |
|||
|
|||
[Column("MFDCODE")] |
|||
public string MFDCODE { get; set; } |
|||
|
|||
[Column("ItemFabricationDate")] |
|||
public string ItemFabricationDate { get; set; } |
|||
|
|||
[Column("StoreType")] |
|||
public string StoreType { get; set; } |
|||
|
|||
[Column("StoreCode")] |
|||
public string StoreCode { get; set; } |
|||
|
|||
[Column("AddressCode")] |
|||
public string AddressCode { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,113 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
|
|||
namespace EFCoreDatabase.Entities |
|||
{ |
|||
[Table("STORAGE_MAIN")] |
|||
public class STORAGE_MAIN |
|||
{ |
|||
[Column("STORAGE_ID")] |
|||
[Key] |
|||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
|||
public int STORAGE_ID { get; set; } |
|||
|
|||
[Column("CELL_ID")] |
|||
public int CELL_ID { get; set; } |
|||
|
|||
[Column("STOCK_BARCODE")] |
|||
public string STOCK_BARCODE { get; set; } |
|||
[Column("STORAGE_REMARK")] |
|||
public string STORAGE_REMARK { get; set; } |
|||
/// <summary>
|
|||
/// 托盘重量
|
|||
/// </summary>
|
|||
[Column("WEIGHT_PALLET")] |
|||
public string WEIGHT_PALLET { get; set; } |
|||
/// <summary>
|
|||
/// PG CODE
|
|||
/// </summary>
|
|||
[Column("PG_CODE")] |
|||
public string PG_CODE { get; set; } |
|||
/// <summary>
|
|||
/// 传输唯一号码
|
|||
/// </summary>
|
|||
[Column("TRANSACTION_NUMBER")] |
|||
public string TRANSACTION_NUMBER { get; set; } |
|||
/// <summary>
|
|||
/// 桶号
|
|||
/// </summary>
|
|||
[Column("BUCKET_NUMBER")] |
|||
public string BUCKET_NUMBER { get; set; } |
|||
/// <summary>
|
|||
/// 桶组号
|
|||
/// </summary>
|
|||
[Column("BUCKET_GROUP")] |
|||
public string BUCKET_GROUP { get; set; } |
|||
/// <summary>
|
|||
/// OperationRequestID
|
|||
/// </summary>
|
|||
[Column("OperationRequestID")] |
|||
public string OperationRequestID { get; set; } |
|||
/// <summary>
|
|||
/// OperationToExecuteID
|
|||
/// </summary>
|
|||
[Column("OperationToExecuteID")] |
|||
public string OperationToExecuteID { get; set; } |
|||
/// <summary>
|
|||
/// VirtualNameMachinePalletizer
|
|||
/// </summary>
|
|||
[Column("VirtualNameMachinePalletizer")] |
|||
public string VirtualNameMachinePalletizer { get; set; } |
|||
/// <summary>
|
|||
/// MFDCode
|
|||
/// </summary>
|
|||
[Column("MFDCode")] |
|||
public string MFDCode { get; set; } |
|||
/// <summary>
|
|||
/// MATIND
|
|||
/// </summary>
|
|||
[Column("MATIND")] |
|||
public string MATIND { get; set; } |
|||
/// <summary>
|
|||
/// NIP
|
|||
/// </summary>
|
|||
[Column("NIP")] |
|||
public string NIP { get; set; } |
|||
/// <summary>
|
|||
/// IMP
|
|||
/// </summary>
|
|||
[Column("IMP")] |
|||
public string IMP { get; set; } |
|||
/// <summary>
|
|||
/// ItemIdentification
|
|||
/// </summary>
|
|||
[Column("ItemIdentification")] |
|||
public string ItemIdentification { get; set; } |
|||
/// <summary>
|
|||
/// ItemTraceability
|
|||
/// </summary>
|
|||
[Column("ItemTraceability")] |
|||
public string ItemTraceability { get; set; } |
|||
/// <summary>
|
|||
/// ItemHdvDate
|
|||
/// </summary>
|
|||
[Column("ItemHdvDate")] |
|||
public string ItemHdvDate { get; set; } |
|||
/// <summary>
|
|||
/// ItemHdvTime
|
|||
/// </summary>
|
|||
[Column("ItemHdvTime")] |
|||
public string ItemHdvTime { get; set; } |
|||
/// <summary>
|
|||
/// ItemFabricationDate
|
|||
/// </summary>
|
|||
[Column("ItemFabricationDate")] |
|||
public string ItemFabricationDate { get; set; } |
|||
/// <summary>
|
|||
/// ItemFabricationTime
|
|||
/// </summary>
|
|||
[Column("ItemFabricationTime")] |
|||
public string ItemFabricationTime { get; set; } |
|||
|
|||
} |
|||
} |
@ -0,0 +1,32 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
|
|||
namespace EFCoreDatabase.Entities |
|||
{ |
|||
[Table("SYS_ITEM")] |
|||
public class SYS_ITEM |
|||
{ |
|||
[Column("ITEM_ID")] |
|||
[Key] |
|||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
|||
public int ITEM_ID { get; set; } |
|||
|
|||
[Column("ITEM_PARENT_ID")] |
|||
public int ITEM_PARENT_ID { get; set; } |
|||
|
|||
[Column("ITEM_CODE")] |
|||
public string ITEM_CODE { get; set; } |
|||
|
|||
[Column("ITEM_NAME")] |
|||
public string ITEM_NAME { get; set; } |
|||
|
|||
[Column("ITEM_ORDER")] |
|||
public int ITEM_ORDER { get; set; } |
|||
|
|||
[Column("ITEM_REMARK")] |
|||
public string ITEM_REMARK { get; set; } |
|||
|
|||
[Column("ITEM_FLAG")] |
|||
public string ITEM_LIST_FLAG { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,34 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
|
|||
namespace EFCoreDatabase.Entities |
|||
{ |
|||
[Table("SYS_ITEM_LIST")] |
|||
public class SYS_ITEM_LIST |
|||
{ |
|||
[Column("ITEM_LIST_ID")] |
|||
[Key] |
|||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
|||
public int ITEM_LIST_ID { get; set; } |
|||
|
|||
[Column("ITEM_ID")] |
|||
public int ITEM_ID { get; set; } |
|||
|
|||
[Column("ITEM_LIST_CODE")] |
|||
public string ITEM_LIST_CODE { get; set; } |
|||
|
|||
[Column("ITEM_LIST_NAME")] |
|||
public string ITEM_LIST_NAME { get; set; } |
|||
|
|||
[Column("ITEM_LIST_ORDER")] |
|||
public int ITEM_LIST_ORDER { get; set; } |
|||
|
|||
[Column("ITEM_LIST_REMARK")] |
|||
public string ITEM_LIST_REMARK { get; set; } |
|||
|
|||
[Column("ITEM_LIST_FLAG")] |
|||
public string ITEM_LIST_FLAG { get; set; } |
|||
[Column("ITEM_LIST_CELL")] |
|||
public string ITEM_LIST_CELL { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,108 @@ |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
|
|||
namespace EFCoreDatabase.Entities |
|||
{ |
|||
[Table("V_STORAGE_LIST")] |
|||
public class V_STORAGE_LIST |
|||
{ |
|||
[Column("CELL_ID")] |
|||
public int CELL_ID { get; set; } |
|||
[Column("STORAGE_ID")] |
|||
public int STORAGE_ID { get; set; } |
|||
[Column("STOCK_BARCODE")] |
|||
public string STOCK_BARCODE { get; set; } |
|||
[Column("STORAGE_LIST_ID")] |
|||
public int STORAGE_LIST_ID { get; set; } |
|||
[Column("GOODS_ID")] |
|||
public int GOODS_ID { get; set; } |
|||
[Column("STORAGE_LIST_QUANTITY")] |
|||
public decimal STORAGE_LIST_QUANTITY { get; set; } |
|||
[Column("ENTRY_TIME")] |
|||
public string ENTRY_TIME { get; set; } |
|||
[Column("UPDATE_TIME")] |
|||
public string UPDATE_TIME { get; set; } |
|||
[Column("GOODS_TYPE_ID")] |
|||
public int GOODS_TYPE_ID { get; set; } |
|||
[Column("GOODS_CLASS_ID")] |
|||
public int GOODS_CLASS_ID { get; set; } |
|||
[Column("GOODS_CODE")] |
|||
public string GOODS_CODE { get; set; } |
|||
[Column("GOODS_NAME")] |
|||
public string GOODS_NAME { get; set; } |
|||
[Column("GOODS_UNITS")] |
|||
public string GOODS_UNITS { get; set; } |
|||
[Column("RUN_STATUS")] |
|||
public string RUN_STATUS { get; set; } |
|||
[Column("CELL_STATUS")] |
|||
public string CELL_STATUS { get; set; } |
|||
[Column("LOGIC_ID")] |
|||
public int LOGIC_ID { get; set; } |
|||
[Column("CELL_TYPE")] |
|||
public string CELL_TYPE { get; set; } |
|||
[Column("DEVICE_CODE")] |
|||
public string DEVICE_CODE { get; set; } |
|||
[Column("CELL_CODE")] |
|||
public string CELL_CODE { get; set; } |
|||
[Column("CELL_NAME")] |
|||
public string CELL_NAME { get; set; } |
|||
[Column("AREA_ID")] |
|||
public int AREA_ID { get; set; } |
|||
[Column("AREA_CODE")] |
|||
public string AREA_CODE { get; set; } |
|||
[Column("AREA_TYPE")] |
|||
public string AREA_TYPE { get; set; } |
|||
[Column("WAREHOUSE_ID")] |
|||
public int WAREHOUSE_ID { get; set; } |
|||
[Column("WAREHOUSE_CODE")] |
|||
public string WAREHOUSE_CODE { get; set; } |
|||
[Column("WAREHOUSE_NAME")] |
|||
public string WAREHOUSE_NAME { get; set; } |
|||
[Column("LANE_WAY")] |
|||
public string LANE_WAY { get; set; } |
|||
[Column("MANAGE_LIST_QUANTITY")] |
|||
public decimal MANAGE_LIST_QUANTITY { get; set; } |
|||
[Column("CELL_Y")] |
|||
public int CELL_Y { get; set; } |
|||
[Column("CELL_X")] |
|||
public int CELL_X { get; set; } |
|||
[Column("CELL_Z")] |
|||
public int CELL_Z { get; set; } |
|||
[Column("CELL_FORK_TYPE")] |
|||
public string CELL_FORK_TYPE { get; set; } |
|||
[Column("GOODS_TYPE_NAME")] |
|||
public string GOODS_TYPE_NAME { get; set; } |
|||
[Column("BUCKET_TRANSACTION_NUMBER")] |
|||
public string BUCKET_TRANSACTION_NUMBER { get; set; } |
|||
[Column("WEIGHT_EMPTY_BUCKET")] |
|||
public decimal WEIGHT_EMPTY_BUCKET { get; set; } |
|||
[Column("WEIGHT_RUBBER")] |
|||
public decimal WEIGHT_RUBBER { get; set; } |
|||
[Column("ReturnCode")] |
|||
public string ReturnCode { get; set; } |
|||
[Column("ReturnCodeLabel")] |
|||
public string ReturnCodeLabel { get; set; } |
|||
[Column("BatchNumber")] |
|||
public string BatchNumber { get; set; } |
|||
[Column("ProductCode")] |
|||
public string ProductCode { get; set; } |
|||
[Column("ProductFamily")] |
|||
public string ProductFamily { get; set; } |
|||
[Column("BaseProductCode")] |
|||
public string BaseProductCode { get; set; } |
|||
[Column("MFDCODE")] |
|||
public string MFDCODE { get; set; } |
|||
[Column("ItemFabricationDate")] |
|||
public string ItemFabricationDate { get; set; } |
|||
[Column("StoreType")] |
|||
public string StoreType { get; set; } |
|||
[Column("StoreCode")] |
|||
public string StoreCode { get; set; } |
|||
[Column("AddressCode")] |
|||
public string AddressCode { get; set; } |
|||
[Column("BOX_BARCODE")] |
|||
public string BOX_BARCODE { get; set; } |
|||
[Column("CELL_GROUP")] |
|||
public string CELL_GROUP { get; set; } |
|||
|
|||
} |
|||
} |
@ -0,0 +1,103 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
using System.ComponentModel.DataAnnotations.Schema; |
|||
|
|||
namespace EFCoreDatabase.Entities |
|||
{ |
|||
[Table("WH_CELL")] |
|||
public class WH_CELL |
|||
{ |
|||
[Column("CELL_ID")] |
|||
[Key] |
|||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
|||
public int CELL_ID { get; set; } |
|||
|
|||
[Column("WAREHOUSE_ID")] |
|||
public int WAREHOUSE_ID { get; set; } |
|||
|
|||
[Column("AREA_ID")] |
|||
public int AREA_ID { get; set; } |
|||
|
|||
[Column("LOGIC_ID")] |
|||
public int LOGIC_ID { get; set; } |
|||
|
|||
[Column("CELL_NAME")] |
|||
public string CELL_NAME { get; set; } |
|||
|
|||
[Column("CELL_CODE")] |
|||
public string CELL_CODE { get; set; } |
|||
|
|||
[Column("CELL_TYPE")] |
|||
public string CELL_TYPE { get; set; } |
|||
|
|||
[Column("DEVICE_CODE")] |
|||
public string DEVICE_CODE { get; set; } |
|||
|
|||
[Column("CELL_Z")] |
|||
public int CELL_Z { get; set; } |
|||
|
|||
[Column("CELL_X")] |
|||
public int CELL_X { get; set; } |
|||
|
|||
[Column("CELL_Y")] |
|||
public int CELL_Y { get; set; } |
|||
|
|||
[Column("CELL_INOUT")] |
|||
public string CELL_INOUT { get; set; } |
|||
|
|||
[Column("CELL_MODEL")] |
|||
public string CELL_MODEL { get; set; } |
|||
|
|||
[Column("CELL_STATUS")] |
|||
public string CELL_STATUS { get; set; } |
|||
|
|||
[Column("RUN_STATUS")] |
|||
public string RUN_STATUS { get; set; } |
|||
|
|||
[Column("CELL_FORK_TYPE")] |
|||
public string CELL_FORK_TYPE { get; set; } |
|||
|
|||
[Column("CELL_LOGICAL_NAME")] |
|||
public string CELL_LOGICAL_NAME { get; set; } |
|||
|
|||
[Column("LANE_WAY")] |
|||
public string LANE_WAY { get; set; } |
|||
|
|||
[Column("CELL_GROUP")] |
|||
public string CELL_GROUP { get; set; } |
|||
|
|||
[Column("SHELF_TYPE")] |
|||
public string SHELF_TYPE { get; set; } |
|||
|
|||
[Column("SHELF_NEIGHBOUR")] |
|||
public string SHELF_NEIGHBOUR { get; set; } |
|||
|
|||
[Column("CELL_STORAGE_TYPE")] |
|||
public string CELL_STORAGE_TYPE { get; set; } |
|||
|
|||
[Column("LOCK_DEVICE_CODE")] |
|||
public string LOCK_DEVICE_CODE { get; set; } |
|||
|
|||
[Column("CELL_WIDTH")] |
|||
public int CELL_WIDTH { get; set; } |
|||
|
|||
[Column("CELL_HEIGHT")] |
|||
public int CELL_HEIGHT { get; set; } |
|||
|
|||
[Column("LOCK_CELL_ID")] |
|||
public string LOCK_CELL_ID { get; set; } |
|||
|
|||
[Column("BELONG_AREA")] |
|||
public string BELONG_AREA { get; set; } |
|||
|
|||
[Column("BELONG_ZCQ_ID")] |
|||
public int BELONG_ZCQ_ID { get; set; } |
|||
|
|||
[Column("CELL_FLAG")] |
|||
public string CELL_FLAG { get; set; } |
|||
|
|||
[Column("CELL_TRANS_FLAG")] |
|||
public int CELL_TRANS_FLAG { get; set; } |
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,31 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using EFCoreDatabase.Data; |
|||
using EFCoreDatabase.Entities; |
|||
using EFCoreDatabase.Repositories.Interface; |
|||
|
|||
namespace EFCoreDatabase.Repositories.Implement |
|||
{ |
|||
public class ControlApplyHisRepository : IControlHisRepository |
|||
{ |
|||
private readonly DmDBContext _context; |
|||
|
|||
public ControlApplyHisRepository(DmDBContext context) |
|||
{ |
|||
_context = context; |
|||
} |
|||
|
|||
public bool AddIoControlApplyHis(IO_CONTROL_APPLY_HIS io_control_apply_his) |
|||
{ |
|||
if(io_control_apply_his == null) |
|||
{ |
|||
throw new ArgumentNullException(nameof(io_control_apply_his)); |
|||
} |
|||
|
|||
_context.Io_Control_Apply_His.Add(io_control_apply_his); |
|||
_context.SaveChanges(); |
|||
return true; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,72 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using EFCoreDatabase.Data; |
|||
using EFCoreDatabase.Entities; |
|||
using EFCoreDatabase.Repositories.Interface; |
|||
using Microsoft.Extensions.Logging; |
|||
using Newtonsoft.Json; |
|||
|
|||
namespace EFCoreDatabase.Repositories.Implement |
|||
{ |
|||
public class ControlRepository : IControlRepository |
|||
{ |
|||
private readonly DmDBContext _context; |
|||
private readonly ILogger<ControlRepository> _logger; |
|||
public ControlRepository(DmDBContext context, ILogger<ControlRepository> logger) |
|||
{ |
|||
_context = context; |
|||
_logger = logger; |
|||
} |
|||
|
|||
public List<IO_CONTROL_ROUTE> GetControlRoutes(string startCode, string endCode) |
|||
{ |
|||
if (string.IsNullOrEmpty(startCode) || string.IsNullOrEmpty(endCode)) |
|||
{ |
|||
throw new ArgumentNullException(nameof(GetControlRoutes)); |
|||
} |
|||
|
|||
var routers = _context.Io_Control_Routes.Where(x => |
|||
x.START_DEVICE == startCode && x.END_DEVICE == endCode && x.CONTROL_ROUTE_STATUS == 1).ToList(); |
|||
return routers; |
|||
} |
|||
|
|||
public IO_CONTROL GetIoControl(int manageId) |
|||
{ |
|||
if (manageId == 0) |
|||
{ |
|||
throw new ArgumentNullException(nameof(GetIoControl)); |
|||
} |
|||
|
|||
var control = _context.Io_Control.FirstOrDefault(x => x.MANAGE_ID == manageId); |
|||
return control; |
|||
|
|||
} |
|||
|
|||
public bool AddIoControl(IO_CONTROL ioControl) |
|||
{ |
|||
try |
|||
{ |
|||
if (ioControl == null) |
|||
{ |
|||
throw new ArgumentNullException(nameof(ioControl)); |
|||
} |
|||
|
|||
_context.Io_Control.Add(ioControl); |
|||
_context.SaveChanges(); |
|||
//tlt20231212:目的是为了对当前的
|
|||
_logger.LogInformation($"Catch IO_CONTROL INFO ({ioControl.STOCK_BARCODE}|{ioControl.CELL_GROUP}|{ioControl.UNLOADING_TASK_COUNT});"); |
|||
|
|||
return true; |
|||
} |
|||
catch (Exception e) |
|||
{ |
|||
if (ioControl != null) _logger.LogError($"插入io_control数据出现问题:桶信息:{ioControl.CELL_GROUP};错误信息:{e.Message}"); |
|||
throw; |
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,51 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using EFCoreDatabase.Data; |
|||
using EFCoreDatabase.Entities; |
|||
using EFCoreDatabase.Repositories.Interface; |
|||
|
|||
namespace EFCoreDatabase.Repositories.Implement |
|||
{ |
|||
public class GoodsRepository:IGoodsRepository |
|||
{ |
|||
private readonly DmDBContext _context; |
|||
|
|||
public GoodsRepository(DmDBContext context) |
|||
{ |
|||
_context = context; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 获取goodsMain
|
|||
/// </summary>
|
|||
/// <param name="goodsCode"></param>
|
|||
/// <returns></returns>
|
|||
public GOODS_MAIN GetGoodsMain(string goodsCode) |
|||
{ |
|||
var goodsMain = _context.Goods_Main.FirstOrDefault(x => x.GOODS_CODE == goodsCode); |
|||
|
|||
return goodsMain; |
|||
} |
|||
|
|||
public List<GOODS_MAIN> GetGoodsMains() |
|||
{ |
|||
var goodsMains = _context.Goods_Main.Where(x=>x.GOODS_ID>3).ToList(); |
|||
return goodsMains; |
|||
} |
|||
|
|||
public bool AddGoodsMain(GOODS_MAIN goodsMain) |
|||
{ |
|||
if (goodsMain == null) |
|||
{ |
|||
throw new ArgumentNullException(nameof(goodsMain)); |
|||
} |
|||
|
|||
_context.Goods_Main.Add(goodsMain); |
|||
_context.SaveChanges(); |
|||
return true; |
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,170 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using EFCoreDatabase.Data; |
|||
using EFCoreDatabase.Entities; |
|||
using System.Linq; |
|||
using System.Security.Cryptography.X509Certificates; |
|||
using System.Threading.Tasks; |
|||
using EFCoreDatabase.Repositories.Interface; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.Extensions.Logging; |
|||
using Newtonsoft.Json; |
|||
|
|||
namespace EFCoreDatabase.Repositories.Implement |
|||
{ |
|||
public class ManageRepository : IManageRepository |
|||
{ |
|||
private readonly DmDBContext _context; |
|||
private readonly ILogger<ManageRepository> _logger; |
|||
/// <summary>
|
|||
/// 构造函数
|
|||
/// </summary>
|
|||
/// <param name="context"></param>
|
|||
public ManageRepository(DmDBContext context, ILogger<ManageRepository> logger) |
|||
{ |
|||
_context = context; |
|||
_logger = logger; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 获取管理任务信息
|
|||
/// </summary>
|
|||
/// <param name="type">查询类型</param>
|
|||
/// <param name="filterInfo">筛选信息</param>
|
|||
/// <returns></returns>
|
|||
public MANAGE_MAIN GetManageMain(string type, string filterInfo) |
|||
{ |
|||
MANAGE_MAIN manageMain; |
|||
switch (type) |
|||
{ |
|||
//托盘号
|
|||
case "stockBarcode": |
|||
manageMain = _context.Manage_Main.FirstOrDefault(x => x.STOCK_BARCODE == filterInfo); |
|||
break; |
|||
|
|||
//默认选项是托盘号
|
|||
default: |
|||
manageMain = _context.Manage_Main.FirstOrDefault(x => x.STOCK_BARCODE == filterInfo); |
|||
break; |
|||
} |
|||
|
|||
return manageMain; |
|||
} |
|||
|
|||
public List<MANAGE_MAIN> GetManageMains() |
|||
{ |
|||
//var manageManageLists = _context.Manage_Main.ToList();
|
|||
var manageManageLists = _context.Manage_Main.FromSqlRaw("select * from MANAGE_MAIN").ToList(); |
|||
return manageManageLists; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 添加manageMain
|
|||
/// </summary>
|
|||
/// <param name="manageMain"></param>
|
|||
/// <param name="manageId"></param>
|
|||
/// <returns></returns>
|
|||
public bool AddManageMain(MANAGE_MAIN manageMain, out int manageId) |
|||
{ |
|||
try |
|||
{ |
|||
manageId = 0; |
|||
if (manageMain == null) |
|||
{ |
|||
|
|||
return false; |
|||
} |
|||
_context.Manage_Main.Add(manageMain); |
|||
_context.SaveChanges(); |
|||
_logger.LogInformation($"Catch Manage main info({manageMain.STOCK_BARCODE}|);"); |
|||
var managemain = _context.Manage_Main.Where(x => x.STOCK_BARCODE == manageMain.STOCK_BARCODE).AsNoTracking().FirstOrDefault(); |
|||
if (managemain != null) |
|||
{ |
|||
manageId = managemain.MANAGE_ID; |
|||
_logger.LogInformation($"manageMain bucket group number before:; manageMain bucket group number after:"); |
|||
} |
|||
return true; |
|||
} |
|||
catch (Exception e) |
|||
{ |
|||
if (manageMain != null) _logger.LogError($"插入main数据出现问题:桶信息:{manageMain.STOCK_BARCODE};错误信息:{e.Message}"); |
|||
throw; |
|||
} |
|||
} |
|||
|
|||
public bool UpdateManageMain(MANAGE_MAIN manageMain) |
|||
{ |
|||
if (manageMain == null || manageMain.MANAGE_ID == 0) |
|||
{ |
|||
throw new ArgumentNullException(nameof(UpdateManageMain)); |
|||
} |
|||
_context.Manage_Main.Update(manageMain); |
|||
_context.SaveChanges(); |
|||
return true; |
|||
|
|||
} |
|||
|
|||
public bool UpdateManageList(MANAGE_LIST manageList) |
|||
{ |
|||
if (manageList == null || manageList.MANAGE_LIST_ID == 0) |
|||
{ |
|||
throw new ArgumentNullException(nameof(UpdateManageMain)); |
|||
} |
|||
|
|||
_context.Manage_List.Update(manageList); |
|||
_context.SaveChanges(); |
|||
return true; |
|||
|
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 删除主任务
|
|||
/// </summary>
|
|||
/// <param name="manageMain"></param>
|
|||
/// <returns></returns>
|
|||
public void DeleteManageMain(MANAGE_MAIN manageMain) |
|||
{ |
|||
if (manageMain == null) |
|||
{ |
|||
throw new ArgumentNullException(nameof(manageMain)); |
|||
} |
|||
_context.Manage_Main.Remove(manageMain); |
|||
_context.SaveChanges(); |
|||
|
|||
} |
|||
|
|||
public List<MANAGE_LIST> GetManageList(int manageId) |
|||
{ |
|||
if (manageId == 0) |
|||
{ |
|||
throw new ArgumentNullException(nameof(manageId)); |
|||
} |
|||
|
|||
return _context.Manage_List.Where(x => x.MANAGE_ID == manageId).ToList(); |
|||
|
|||
} |
|||
|
|||
public bool AddManageList(MANAGE_LIST manageList) |
|||
{ |
|||
try |
|||
{ |
|||
if (manageList == null) |
|||
{ |
|||
throw new ArgumentNullException(nameof(manageList)); |
|||
} |
|||
|
|||
_context.Manage_List.Add(manageList); |
|||
_context.SaveChanges(); |
|||
|
|||
_logger.LogInformation($"Catch Manage list info({manageList.MANAGE_ID}|{manageList.BOX_BARCODE});"); |
|||
return true; |
|||
} |
|||
catch (Exception e) |
|||
{ |
|||
if (manageList != null) _logger.LogError($"插入list数据出现问题:桶信息:{manageList.BUCKET_TRANSACTION_NUMBER};错误信息:{e.Message}"); |
|||
throw; |
|||
} |
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,104 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using EFCoreDatabase.Data; |
|||
using EFCoreDatabase.Entities; |
|||
using System.Linq; |
|||
using System.Security.Cryptography.X509Certificates; |
|||
using EFCoreDatabase.Repositories.Interface; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Design; |
|||
|
|||
namespace EFCoreDatabase.Repositories.Implement |
|||
{ |
|||
public class StorageRepository:IStorageRepository |
|||
{ |
|||
private readonly DmDBContext _context; |
|||
public StorageRepository(DmDBContext context) |
|||
{ |
|||
_context = context; |
|||
} |
|||
|
|||
public STORAGE_MAIN GetStorageMain(int storageId) |
|||
{ |
|||
var storageMain = _context.Storage_Main.FirstOrDefault(x => x.STORAGE_ID == storageId); |
|||
return storageMain; |
|||
} |
|||
|
|||
public STORAGE_MAIN GetStorageMainByBucket(string bucketNumber) |
|||
{ |
|||
var storageMain = _context.Storage_Main.FirstOrDefault(x => x.STOCK_BARCODE == bucketNumber); |
|||
return storageMain; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 获取当前序列号的库存信息
|
|||
/// </summary>
|
|||
/// <param name="serialList"></param>
|
|||
/// <returns></returns>
|
|||
public List<V_STORAGE_LIST> GetStorageLists(List<string> serialList) |
|||
{ |
|||
//获取当前序列号的库存信息,存在立体库中,并且未被出库;
|
|||
var storageLists = |
|||
_context.V_Storage_List.Where(x => |
|||
serialList.Contains(x.BUCKET_TRANSACTION_NUMBER) && x.CELL_STATUS == "Full" && |
|||
x.RUN_STATUS == "Enable").OrderBy(x=>x.CELL_FORK_TYPE).ToList(); |
|||
|
|||
return storageLists; |
|||
|
|||
} |
|||
|
|||
public V_STORAGE_LIST GetVStorageList(string serialNumber) |
|||
{ |
|||
var vStorageList = _context.V_Storage_List.FirstOrDefault(x => |
|||
x.BUCKET_TRANSACTION_NUMBER == serialNumber); |
|||
return vStorageList; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 检查当前序列号的桶是否在库位上
|
|||
/// </summary>
|
|||
/// <param name="serialNumber"></param>
|
|||
/// <returns></returns>
|
|||
public STORAGE_MAIN GetStorageMainBySerialNumber(string serialNumber) |
|||
{ |
|||
//bucket库存的面中的传输号就是bucket的传输号,并且该桶存放于货位上
|
|||
var storageMain = _context.Storage_Main.FirstOrDefault(x => x.TRANSACTION_NUMBER == serialNumber && _context.Wh_Cell.FirstOrDefault(y=>y.CELL_ID == x.CELL_ID && y.AREA_ID ==1)!=null); |
|||
return storageMain; |
|||
} |
|||
|
|||
public STORAGE_MAIN GetStorageMainByCellId(int cellId) |
|||
{ |
|||
var storageMain = _context.Storage_Main.FirstOrDefault(x => x.CELL_ID == cellId); |
|||
return storageMain; |
|||
} |
|||
|
|||
public STORAGE_LIST GetStorageList(string boxBarcode) |
|||
{ |
|||
var storageList = _context.Storage_List.FirstOrDefault(x => x.BOX_BARCODE == boxBarcode); |
|||
|
|||
return storageList; |
|||
|
|||
} |
|||
|
|||
public List<STORAGE_LIST> GetStorageLists(int storage_id) |
|||
{ |
|||
var storagelists = _context.Storage_List.Where(x => x.STORAGE_ID == storage_id).ToList(); |
|||
|
|||
return storagelists; |
|||
|
|||
} |
|||
|
|||
public void UpdateStorageList(STORAGE_LIST storageList) |
|||
{ |
|||
if (storageList == null) |
|||
{ |
|||
throw new ArgumentNullException(nameof(storageList)); |
|||
} |
|||
|
|||
_context.Storage_List.Update(storageList); |
|||
_context.SaveChanges(); |
|||
|
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,30 @@ |
|||
using EFCoreDatabase.Data; |
|||
using EFCoreDatabase.Entities; |
|||
using System.Linq; |
|||
using EFCoreDatabase.Repositories.Interface; |
|||
|
|||
namespace EFCoreDatabase.Repositories.Implement |
|||
{ |
|||
public class SysItemRepository: ISysItemRepository |
|||
{ |
|||
private readonly DmDBContext _context; |
|||
|
|||
public SysItemRepository(DmDBContext context) |
|||
{ |
|||
_context = context; |
|||
} |
|||
|
|||
public SYS_ITEM GetSysItem(string itemCode) |
|||
{ |
|||
var sysItem = _context.Sys_Item.FirstOrDefault(x => x.ITEM_CODE == itemCode); |
|||
|
|||
return sysItem; |
|||
} |
|||
|
|||
public SYS_ITEM_LIST GetSysItemList(string itemListCode) |
|||
{ |
|||
var sysItemList = _context.Sys_Item_List.FirstOrDefault(x => x.ITEM_LIST_CODE == itemListCode); |
|||
return sysItemList; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,39 @@ |
|||
using System; |
|||
using EFCoreDatabase.Data; |
|||
using EFCoreDatabase.Entities; |
|||
using System.Linq; |
|||
using EFCoreDatabase.Repositories.Interface; |
|||
|
|||
namespace EFCoreDatabase.Repositories.Implement |
|||
{ |
|||
public class WhCellRepository:IWhCellRepository |
|||
{ |
|||
private readonly DmDBContext _context; |
|||
|
|||
public WhCellRepository(DmDBContext context) |
|||
{ |
|||
_context = context; |
|||
} |
|||
|
|||
public WH_CELL GetCell(int cellId) |
|||
{ |
|||
var cell = _context.Wh_Cell.First(x => x.CELL_ID == cellId); |
|||
return cell; |
|||
} |
|||
|
|||
|
|||
|
|||
public bool UpdateCellStatus(WH_CELL whCell) |
|||
{ |
|||
if (whCell == null) |
|||
{ |
|||
throw new ArgumentNullException(nameof(whCell)); |
|||
} |
|||
|
|||
_context.Wh_Cell.Update(whCell); |
|||
_context.SaveChanges(); |
|||
return true; |
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,10 @@ |
|||
using System.Collections.Generic; |
|||
using EFCoreDatabase.Entities; |
|||
|
|||
namespace EFCoreDatabase.Repositories.Interface |
|||
{ |
|||
public interface IControlHisRepository |
|||
{ |
|||
public bool AddIoControlApplyHis(IO_CONTROL_APPLY_HIS io_control_apply_his); |
|||
} |
|||
} |
@ -0,0 +1,14 @@ |
|||
using System.Collections.Generic; |
|||
using EFCoreDatabase.Entities; |
|||
|
|||
namespace EFCoreDatabase.Repositories.Interface |
|||
{ |
|||
public interface IControlRepository |
|||
{ |
|||
public List<IO_CONTROL_ROUTE> GetControlRoutes(string startCode, string endCode); |
|||
|
|||
public IO_CONTROL GetIoControl(int manageId); |
|||
|
|||
public bool AddIoControl(IO_CONTROL ioControl); |
|||
} |
|||
} |
@ -0,0 +1,18 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using EFCoreDatabase.Entities; |
|||
|
|||
namespace EFCoreDatabase.Repositories.Interface |
|||
{ |
|||
|
|||
public interface IGoodsRepository |
|||
{ |
|||
public GOODS_MAIN GetGoodsMain(string goodsCode); |
|||
|
|||
public bool AddGoodsMain(GOODS_MAIN goodsMain); |
|||
|
|||
public List<GOODS_MAIN> GetGoodsMains(); |
|||
} |
|||
} |
@ -0,0 +1,20 @@ |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using EFCoreDatabase.Entities; |
|||
|
|||
namespace EFCoreDatabase.Repositories.Interface |
|||
{ |
|||
public interface IManageRepository |
|||
{ |
|||
public MANAGE_MAIN GetManageMain(string type, string filterInfo); |
|||
public bool AddManageMain(MANAGE_MAIN manageMain, out int manageId); |
|||
public bool UpdateManageMain(MANAGE_MAIN manageMain); |
|||
|
|||
public bool UpdateManageList(MANAGE_LIST manageList); |
|||
|
|||
public void DeleteManageMain(MANAGE_MAIN manageMain); |
|||
public List<MANAGE_LIST> GetManageList(int manageId); |
|||
public bool AddManageList(MANAGE_LIST manageList); |
|||
public List<MANAGE_MAIN> GetManageMains(); |
|||
} |
|||
} |
@ -0,0 +1,18 @@ |
|||
using System.Collections.Generic; |
|||
using EFCoreDatabase.Entities; |
|||
|
|||
namespace EFCoreDatabase.Repositories.Interface |
|||
{ |
|||
public interface IStorageRepository |
|||
{ |
|||
public STORAGE_MAIN GetStorageMain(int storageId); |
|||
public STORAGE_MAIN GetStorageMainByBucket(string bucketNumber); |
|||
public List<V_STORAGE_LIST> GetStorageLists(List<string> serialList); |
|||
public V_STORAGE_LIST GetVStorageList(string seialNumber); |
|||
public STORAGE_MAIN GetStorageMainBySerialNumber(string serialNumber); |
|||
public STORAGE_MAIN GetStorageMainByCellId(int cellId); |
|||
public STORAGE_LIST GetStorageList(string boxBarcode); |
|||
public List<STORAGE_LIST> GetStorageLists(int storage_id); |
|||
public void UpdateStorageList(STORAGE_LIST storageList); |
|||
} |
|||
} |
@ -0,0 +1,10 @@ |
|||
using EFCoreDatabase.Entities; |
|||
|
|||
namespace EFCoreDatabase.Repositories.Interface |
|||
{ |
|||
public interface ISysItemRepository |
|||
{ |
|||
public SYS_ITEM GetSysItem(string itemCode); |
|||
public SYS_ITEM_LIST GetSysItemList(string itemListCode); |
|||
} |
|||
} |
@ -0,0 +1,10 @@ |
|||
using EFCoreDatabase.Entities; |
|||
|
|||
namespace EFCoreDatabase.Repositories.Interface |
|||
{ |
|||
public interface IWhCellRepository |
|||
{ |
|||
public WH_CELL GetCell(int cellId); |
|||
public bool UpdateCellStatus(WH_CELL whCell); |
|||
} |
|||
} |
@ -0,0 +1,34 @@ |
|||
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00 |
|||
# Visual Studio Version 17 |
|||
VisualStudioVersion = 17.12.35527.113 |
|||
MinimumVisualStudioVersion = 10.0.40219.1 |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NewWMSProject", "NewWMSProject\src\NewWMSProject\NewWMSProject.csproj", "{FE560437-1CE9-4460-AA7F-FECE5ACD80F1}" |
|||
EndProject |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NewWMSProject.Client", "NewWMSProject\src\NewWMSProject.Client\NewWMSProject.Client.csproj", "{4CB50B37-E929-4594-A2C3-DDBE0130E27A}" |
|||
EndProject |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EFCoreDatabase", "EFCoreDatabase\EFCoreDatabase.csproj", "{4F4AB9A0-0A0F-4DDC-AB03-D7F04244EE01}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
Release|Any CPU = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{FE560437-1CE9-4460-AA7F-FECE5ACD80F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{FE560437-1CE9-4460-AA7F-FECE5ACD80F1}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{FE560437-1CE9-4460-AA7F-FECE5ACD80F1}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{FE560437-1CE9-4460-AA7F-FECE5ACD80F1}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{4CB50B37-E929-4594-A2C3-DDBE0130E27A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{4CB50B37-E929-4594-A2C3-DDBE0130E27A}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{4CB50B37-E929-4594-A2C3-DDBE0130E27A}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{4CB50B37-E929-4594-A2C3-DDBE0130E27A}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{4F4AB9A0-0A0F-4DDC-AB03-D7F04244EE01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{4F4AB9A0-0A0F-4DDC-AB03-D7F04244EE01}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{4F4AB9A0-0A0F-4DDC-AB03-D7F04244EE01}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{4F4AB9A0-0A0F-4DDC-AB03-D7F04244EE01}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(SolutionProperties) = preSolution |
|||
HideSolutionNode = FALSE |
|||
EndGlobalSection |
|||
EndGlobal |
@ -0,0 +1,9 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
|
|||
<!-- Please keep this file and keep it in the same directory as package.json. |
|||
This ensures that the WorkingDirectory of the build command in NewWMSProject.Client.csproj is correctly located to the current directory. --> |
|||
<Project> |
|||
<PropertyGroup Label="BasePath"> |
|||
<SolutionDir Condition="'$(SolutionDir)'==''">$(MSBuildThisFileDirectory)</SolutionDir> |
|||
</PropertyGroup> |
|||
</Project> |
@ -0,0 +1,31 @@ |
|||
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00 |
|||
# Visual Studio Version 17 |
|||
VisualStudioVersion = 17.11.35005.142 |
|||
MinimumVisualStudioVersion = 10.0.40219.1 |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NewWMSProject", "src\NewWMSProject\NewWMSProject.csproj", "{B5934F21-93C6-46BA-B25D-C2D3B62EDCFC}" |
|||
EndProject |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NewWMSProject.Client", "src\NewWMSProject.Client\NewWMSProject.Client.csproj", "{21B555E8-4868-4C61-A487-269C436022FF}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
Release|Any CPU = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{B5934F21-93C6-46BA-B25D-C2D3B62EDCFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{B5934F21-93C6-46BA-B25D-C2D3B62EDCFC}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{B5934F21-93C6-46BA-B25D-C2D3B62EDCFC}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{B5934F21-93C6-46BA-B25D-C2D3B62EDCFC}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{21B555E8-4868-4C61-A487-269C436022FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{21B555E8-4868-4C61-A487-269C436022FF}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{21B555E8-4868-4C61-A487-269C436022FF}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{21B555E8-4868-4C61-A487-269C436022FF}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(SolutionProperties) = preSolution |
|||
HideSolutionNode = FALSE |
|||
EndGlobalSection |
|||
GlobalSection(ExtensibilityGlobals) = postSolution |
|||
SolutionGuid = {B32E6C35-9526-404C-93D0-5026FD1E48B8} |
|||
EndGlobalSection |
|||
EndGlobal |
@ -0,0 +1 @@ |
|||
# NewWMSProject |
@ -0,0 +1,52 @@ |
|||
@namespace NewWMSProject.Components |
|||
@inherits AntDomComponentBase |
|||
|
|||
<Space Class="@ClassMapper.Class" Size="@("24")"> |
|||
@* <SpaceItem> |
|||
<HeaderSearch Class="action search" |
|||
Placeholder="Site Search" |
|||
DefaultValue="umi ui" |
|||
Options="DefaultOptions" /> |
|||
</SpaceItem> *@ |
|||
@* <SpaceItem> |
|||
<AntDesign.Tooltip Title="@("Help")" Placement="@Placement.Bottom"> |
|||
<Unbound> |
|||
<span @ref="@context.Current" class="action"> |
|||
<Icon Type="question-circle" Theme="IconThemeType.Outline" /> |
|||
</span> |
|||
</Unbound> |
|||
</AntDesign.Tooltip> |
|||
</SpaceItem> *@ |
|||
@* <SpaceItem> |
|||
<NoticeIcon ClearText="Empty" |
|||
ViewMoreText="see more" |
|||
Count="_count" |
|||
OnClear="HandleClear" |
|||
OnViewMore="HandleViewMore"> |
|||
<NoticeList TabKey="notification" |
|||
Title="Notifications" |
|||
EmptyText="You have viewed all notifications" |
|||
ShowViewMore |
|||
Data="_notifications" /> |
|||
<NoticeList TabKey="message" |
|||
Title="Messages" |
|||
EmptyText="You have read all messages" |
|||
ShowViewMore |
|||
Data="_messages" /> |
|||
<NoticeList TabKey="event" |
|||
Title="Upcoming" |
|||
EmptyText="You have completed all to do" |
|||
ShowViewMore |
|||
Data="_events" /> |
|||
</NoticeIcon> |
|||
</SpaceItem> *@ |
|||
<SpaceItem> |
|||
<AvatarDropdown Name="@_currentUser.Name" |
|||
Avatar="@_currentUser.Avatar" |
|||
MenuItems="@AvatarMenuItems" |
|||
OnItemSelected="HandleSelectUser" /> |
|||
</SpaceItem> |
|||
<SpaceItem> |
|||
<SelectLang OnItemSelected="HandleSelectLang" /> |
|||
</SpaceItem> |
|||
</Space> |
@ -0,0 +1,125 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Globalization; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using AntDesign; |
|||
using AntDesign.Extensions.Localization; |
|||
using AntDesign.ProLayout; |
|||
using Microsoft.AspNetCore.Components; |
|||
using Microsoft.Extensions.Localization; |
|||
using NewWMSProject.Models; |
|||
using NewWMSProject.Services; |
|||
|
|||
namespace NewWMSProject.Components |
|||
{ |
|||
public partial class RightContent |
|||
{ |
|||
private CurrentUser _currentUser = new CurrentUser(); |
|||
private NoticeIconData[] _notifications = { }; |
|||
private NoticeIconData[] _messages = { }; |
|||
private NoticeIconData[] _events = { }; |
|||
private int _count = 0; |
|||
|
|||
private List<AutoCompleteDataItem<string>> DefaultOptions { get; set; } = new List<AutoCompleteDataItem<string>> |
|||
{ |
|||
new AutoCompleteDataItem<string> |
|||
{ |
|||
Label = "umi ui", |
|||
Value = "umi ui" |
|||
}, |
|||
new AutoCompleteDataItem<string> |
|||
{ |
|||
Label = "Pro Table", |
|||
Value = "Pro Table" |
|||
}, |
|||
new AutoCompleteDataItem<string> |
|||
{ |
|||
Label = "Pro Layout", |
|||
Value = "Pro Layout" |
|||
} |
|||
}; |
|||
|
|||
private AvatarMenuItem[] AvatarMenuItems => |
|||
[ |
|||
new() { Key = "center", IconType = "user", Option = L["menu.account.center"]}, |
|||
new() { Key = "setting", IconType = "setting", Option = L["menu.account.settings"] }, |
|||
new() { IsDivider = true }, |
|||
new() { Key = "logout", IconType = "logout", Option = L["menu.account.logout"]} |
|||
]; |
|||
|
|||
[Inject] protected NavigationManager NavigationManager { get; set; } |
|||
|
|||
[Inject] protected IUserService UserService { get; set; } |
|||
[Inject] protected IProjectService ProjectService { get; set; } |
|||
[Inject] protected MessageService MessageService { get; set; } |
|||
|
|||
[Inject] private IStringLocalizer<I18n> L { get; set; } |
|||
[Inject] private ILocalizationService LocalizationService { get; set; } |
|||
|
|||
protected override async Task OnInitializedAsync() |
|||
{ |
|||
await base.OnInitializedAsync(); |
|||
SetClassMap(); |
|||
_currentUser = await UserService.GetCurrentUserAsync(); |
|||
var notices = await ProjectService.GetNoticesAsync(); |
|||
_notifications = notices.Where(x => x.Type == "notification").Cast<NoticeIconData>().ToArray(); |
|||
_messages = notices.Where(x => x.Type == "message").Cast<NoticeIconData>().ToArray(); |
|||
_events = notices.Where(x => x.Type == "event").Cast<NoticeIconData>().ToArray(); |
|||
_count = notices.Length; |
|||
} |
|||
|
|||
protected void SetClassMap() |
|||
{ |
|||
ClassMapper |
|||
.Clear() |
|||
.Add("right"); |
|||
} |
|||
|
|||
public void HandleSelectUser(MenuItem item) |
|||
{ |
|||
switch (item.Key) |
|||
{ |
|||
case "center": |
|||
NavigationManager.NavigateTo("/account/center"); |
|||
break; |
|||
case "setting": |
|||
NavigationManager.NavigateTo("/account/settings"); |
|||
break; |
|||
case "logout": |
|||
NavigationManager.NavigateTo("/"); |
|||
break; |
|||
} |
|||
} |
|||
|
|||
public void HandleSelectLang(MenuItem item) |
|||
{ |
|||
LocalizationService.SetLanguage(CultureInfo.GetCultureInfo(item.Key)); |
|||
} |
|||
|
|||
public async Task HandleClear(string key) |
|||
{ |
|||
switch (key) |
|||
{ |
|||
case "notification": |
|||
_notifications = new NoticeIconData[] { }; |
|||
break; |
|||
case "message": |
|||
_messages = new NoticeIconData[] { }; |
|||
break; |
|||
case "event": |
|||
_events = new NoticeIconData[] { }; |
|||
break; |
|||
} |
|||
await MessageService.Success($"清空了{key}"); |
|||
} |
|||
|
|||
public async Task HandleViewMore(string key) |
|||
{ |
|||
await MessageService.Info("Click on view more"); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,62 @@ |
|||
using System; |
|||
|
|||
namespace NewWMSProject |
|||
{ |
|||
public static class DateTimeExtension |
|||
{ |
|||
private const int Second = 1; |
|||
private const int Minute = 60 * Second; |
|||
private const int Hour = 60 * Minute; |
|||
private const int Day = 24 * Hour; |
|||
private const int Month = 30 * Day; |
|||
|
|||
// todo: Need to be localized
|
|||
public static string ToFriendlyDisplay(this DateTime dateTime) |
|||
{ |
|||
var ts = DateTime.Now - dateTime; |
|||
var delta = ts.TotalSeconds; |
|||
if (delta < 0) |
|||
{ |
|||
return "not yet"; |
|||
} |
|||
if (delta < 1 * Minute) |
|||
{ |
|||
return ts.Seconds == 1 ? "1 second ago" : ts.Seconds + " seconds ago"; |
|||
} |
|||
if (delta < 2 * Minute) |
|||
{ |
|||
return "1 minute ago"; |
|||
} |
|||
if (delta < 45 * Minute) |
|||
{ |
|||
return ts.Minutes + "minute"; |
|||
} |
|||
if (delta < 90 * Minute) |
|||
{ |
|||
return "1 hour ago"; |
|||
} |
|||
if (delta < 24 * Hour) |
|||
{ |
|||
return ts.Hours + " hours ago"; |
|||
} |
|||
if (delta < 48 * Hour) |
|||
{ |
|||
return "yesterday"; |
|||
} |
|||
if (delta < 30 * Day) |
|||
{ |
|||
return ts.Days + " days ago"; |
|||
} |
|||
if (delta < 12 * Month) |
|||
{ |
|||
var months = Convert.ToInt32(Math.Floor((double)ts.Days / 30)); |
|||
return months <= 1 ? "A month ago" : months + " months ago"; |
|||
} |
|||
else |
|||
{ |
|||
var years = Convert.ToInt32(Math.Floor((double)ts.Days / 365)); |
|||
return years <= 1 ? "a year ago" : years + " years ago"; |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,2 @@ |
|||
global using AntDesign; |
|||
global using NewWMSProject.Client.Resources; |
@ -0,0 +1,51 @@ |
|||
@namespace NewWMSProject.Layouts |
|||
@inherits LayoutComponentBase |
|||
|
|||
<AntDesign.ProLayout.BasicLayout |
|||
Logo="@("https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg")" |
|||
MenuData="_menuData" |
|||
MenuAccordion |
|||
@bind-Collapsed="collapsed"> |
|||
<HeaderContentRender> |
|||
<Space Size="@("24")"> |
|||
<SpaceItem> |
|||
<Icon Class="action" Type="@(collapsed?"menu-unfold":"menu-fold")" OnClick="Toggle" /> |
|||
</SpaceItem> |
|||
<SpaceItem> |
|||
<Icon Class="action" Type="reload" Theme="@IconThemeType.Outline" OnClick="Reload" /> |
|||
</SpaceItem> |
|||
</Space> |
|||
</HeaderContentRender> |
|||
<RightContentRender> |
|||
<NewWMSProject.Components.RightContent /> |
|||
</RightContentRender> |
|||
<ChildContent> |
|||
<ReuseTabs></ReuseTabs> |
|||
</ChildContent> |
|||
<FooterRender> |
|||
<FooterView Copyright="SIASUN WMS" Links="Links"></FooterView> |
|||
</FooterRender> |
|||
</AntDesign.ProLayout.BasicLayout> |
|||
|
|||
<SettingDrawer /> |
|||
|
|||
@code{ |
|||
bool collapsed; |
|||
|
|||
public LinkItem[] Links = |
|||
{ |
|||
new LinkItem |
|||
{ |
|||
Key = "Blazor", |
|||
Title = "Blazor", |
|||
Href = "https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor?WT.mc_id=DT-MVP-5003987", |
|||
BlankTarget = true, |
|||
} |
|||
}; |
|||
|
|||
void Toggle() |
|||
{ |
|||
collapsed = !collapsed; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,97 @@ |
|||
using System.Globalization; |
|||
using System.Net.Http.Json; |
|||
using AntDesign.Extensions.Localization; |
|||
using AntDesign.ProLayout; |
|||
using Microsoft.AspNetCore.Components; |
|||
|
|||
namespace NewWMSProject.Layouts |
|||
{ |
|||
public partial class BasicLayout : LayoutComponentBase, IDisposable |
|||
{ |
|||
private MenuDataItem[] _menuData; |
|||
|
|||
[Inject] private ReuseTabsService TabService { get; set; } |
|||
|
|||
protected override async Task OnInitializedAsync() |
|||
{ |
|||
_menuData = new[] { |
|||
new MenuDataItem |
|||
{ |
|||
Path = "/Welcome", |
|||
Name = "欢迎页面", |
|||
Key = "welcome", |
|||
Icon = "smile", |
|||
}, |
|||
new MenuDataItem |
|||
{ |
|||
Path = "/material", |
|||
Name = "物料信息", |
|||
Key = "material", |
|||
Icon = "task", |
|||
Children = new MenuDataItem[] |
|||
{ |
|||
new MenuDataItem |
|||
{ |
|||
Path = "/material/main_material", |
|||
Name = "主数据", |
|||
Key = "main_material" |
|||
} |
|||
} |
|||
|
|||
|
|||
}, |
|||
new MenuDataItem |
|||
{ |
|||
Path = "/TaskInfo", |
|||
Name = "任务管理", |
|||
Key = "TaskInfo", |
|||
Icon = "task", |
|||
Children = new MenuDataItem[] |
|||
{ |
|||
new MenuDataItem |
|||
{ |
|||
Path = "/Welcome", |
|||
Name = "欢迎页面", |
|||
Key = "welcome" |
|||
} |
|||
} |
|||
|
|||
|
|||
}, |
|||
new MenuDataItem |
|||
{ |
|||
Path = "/account", |
|||
Name = "权限管理", |
|||
Key = "account", |
|||
Icon = "user", |
|||
Children = new MenuDataItem[] |
|||
{ |
|||
new MenuDataItem |
|||
{ |
|||
Path = "/account/center", |
|||
Name = "个人中心", |
|||
Key = "account.center" |
|||
}, |
|||
new MenuDataItem |
|||
{ |
|||
Path = "/account/settings", |
|||
Name = "权限设置", |
|||
Key = "account.settings" |
|||
} |
|||
} |
|||
} |
|||
}; |
|||
} |
|||
|
|||
void Reload() |
|||
{ |
|||
TabService.ReloadPage(); |
|||
} |
|||
|
|||
public void Dispose() |
|||
{ |
|||
|
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,50 @@ |
|||
@namespace NewWMSProject.Layouts |
|||
@using OneOf |
|||
@inherits LayoutComponentBase |
|||
|
|||
<div class="container__b__0"> |
|||
<div class="lang"> |
|||
<!--todo: selectLang--> |
|||
</div> |
|||
<div class="content"> |
|||
<div class="top"> |
|||
<div class="header"> |
|||
<a> |
|||
<img alt="logo" class="logo" src="assets/logo.svg" /> |
|||
<span class="title">Ant Design</span> |
|||
</a> |
|||
</div> |
|||
<div class="desc">Ant Design Blazor</div> |
|||
</div> |
|||
@Body |
|||
</div> |
|||
<FooterView Copyright="2021 Ant Design Blazor" Links="Links"></FooterView> |
|||
</div> |
|||
|
|||
@code |
|||
{ |
|||
public LinkItem[] Links { get; set; } = |
|||
{ |
|||
new LinkItem |
|||
{ |
|||
Key = "Ant Design Blazor", |
|||
Title = "Ant Design Blazor", |
|||
Href = "https://antblazor.com", |
|||
BlankTarget = true, |
|||
}, |
|||
new LinkItem |
|||
{ |
|||
Key = "github", |
|||
Title = (RenderFragment)(@<Icon Type="github" />), |
|||
Href = "https://github.com/ant-design-blazor/ant-design-pro-blazor", |
|||
BlankTarget = true, |
|||
}, |
|||
new LinkItem |
|||
{ |
|||
Key = "Blazor", |
|||
Title = "Blazor", |
|||
Href = "https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor?WT.mc_id=DT-MVP-5003987", |
|||
BlankTarget = true, |
|||
} |
|||
}; |
|||
} |
@ -0,0 +1,64 @@ |
|||
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ |
|||
/* stylelint-disable no-duplicate-selectors */ |
|||
/* stylelint-disable */ |
|||
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ |
|||
.container__b__0 { |
|||
display: flex; |
|||
flex-direction: column; |
|||
height: 100vh; |
|||
overflow: auto; |
|||
background: #f0f2f5; |
|||
} |
|||
.container__b__0 .lang { |
|||
width: 100%; |
|||
height: 40px; |
|||
line-height: 44px; |
|||
text-align: right; |
|||
} |
|||
.container__b__0 .lang :global(.ant-dropdown-trigger) { |
|||
margin-right: 24px; |
|||
} |
|||
.container__b__0 .content { |
|||
flex: 1; |
|||
padding: 32px 0; |
|||
} |
|||
.container__b__0 .top { |
|||
text-align: center; |
|||
} |
|||
.container__b__0 .header { |
|||
height: 44px; |
|||
line-height: 44px; |
|||
} |
|||
.container__b__0 .header a { |
|||
text-decoration: none; |
|||
} |
|||
.container__b__0 .logo { |
|||
height: 44px; |
|||
margin-right: 16px; |
|||
vertical-align: top; |
|||
} |
|||
.container__b__0 .title { |
|||
position: relative; |
|||
top: 2px; |
|||
color: rgba(0, 0, 0, 0.85); |
|||
font-weight: 600; |
|||
font-size: 33px; |
|||
font-family: Avenir, 'Helvetica Neue', Arial, Helvetica, sans-serif; |
|||
} |
|||
.container__b__0 .desc { |
|||
margin-top: 12px; |
|||
margin-bottom: 40px; |
|||
color: rgba(0, 0, 0, 0.45); |
|||
font-size: 14px; |
|||
} |
|||
@media (min-width: 768px) { |
|||
.container__b__0 { |
|||
background-image: url('https://gw.alipayobjects.com/zos/rmsportal/TVYTbAXWheQpRcWDaDMu.svg'); |
|||
background-repeat: no-repeat; |
|||
background-position: center 110px; |
|||
background-size: 100%; |
|||
} |
|||
.container__b__0 .content { |
|||
padding: 32px 0 24px; |
|||
} |
|||
} |
@ -0,0 +1,14 @@ |
|||
using System; |
|||
|
|||
namespace NewWMSProject.Models |
|||
{ |
|||
public class ActivitiesType |
|||
{ |
|||
public string Id { get; set; } |
|||
public DateTime UpdatedAt { get; set; } |
|||
public ActivityUser User { get; set; } |
|||
public ActivityGroup Group { get; set; } |
|||
public ActivityProject Project { get; set; } |
|||
public string Template { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,8 @@ |
|||
namespace NewWMSProject.Models |
|||
{ |
|||
public class ActivityGroup |
|||
{ |
|||
public string Name { get; set; } |
|||
public string Link { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,8 @@ |
|||
namespace NewWMSProject.Models |
|||
{ |
|||
public class ActivityProject |
|||
{ |
|||
public string Name { get; set; } |
|||
public string Link { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,8 @@ |
|||
namespace NewWMSProject.Models |
|||
{ |
|||
public class ActivityUser |
|||
{ |
|||
public string Name { get; set; } |
|||
public string Avatar { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,12 @@ |
|||
namespace NewWMSProject.Models |
|||
{ |
|||
public class AdvancedOperation |
|||
{ |
|||
public string Key { get; set; } |
|||
public string Type { get; set; } |
|||
public string Name { get; set; } |
|||
public string Status { get; set; } |
|||
public string UpdatedAt { get; set; } |
|||
public string Memo { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,9 @@ |
|||
namespace NewWMSProject.Models |
|||
{ |
|||
public class AdvancedProfileData |
|||
{ |
|||
public AdvancedOperation[] AdvancedOperation1 { get; set; } |
|||
public AdvancedOperation[] AdvancedOperation2 { get; set; } |
|||
public AdvancedOperation[] AdvancedOperation3 { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,12 @@ |
|||
namespace NewWMSProject.Models |
|||
{ |
|||
public class BasicGood |
|||
{ |
|||
public string Id { get; set; } |
|||
public string Name { get; set; } |
|||
public string Barcode { get; set; } |
|||
public string Price { get; set; } |
|||
public string Num { get; set; } |
|||
public string Amount { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,8 @@ |
|||
namespace NewWMSProject.Models |
|||
{ |
|||
public class BasicProfileDataType |
|||
{ |
|||
public BasicGood[] BasicGoods { get; set; } |
|||
public BasicProgress[] BasicProgress { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,12 @@ |
|||
namespace NewWMSProject.Models |
|||
{ |
|||
public class BasicProgress |
|||
{ |
|||
public string Key { get; set; } |
|||
public string Time { get; set; } |
|||
public string Rate { get; set; } |
|||
public string Status { get; set; } |
|||
public string Operator { get; set; } |
|||
public string Cost { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,16 @@ |
|||
namespace NewWMSProject.Models |
|||
{ |
|||
public class ChartData |
|||
{ |
|||
public ChartDataItem[] VisitData { get; set; } |
|||
public ChartDataItem[] VisitData2 { get; set; } |
|||
public ChartDataItem[] SalesData { get; set; } |
|||
public SearchDataItem[] SearchData { get; set; } |
|||
public OfflineDataItem[] OfflineData { get; set; } |
|||
public OfflineChartDataItem[] OfflineChartData { get; set; } |
|||
public ChartDataItem[] SalesTypeData { get; set; } |
|||
public ChartDataItem[] SalesTypeDataOnline { get; set; } |
|||
public ChartDataItem[] SalesTypeDataOffline { get; set; } |
|||
public RadarDataItem[] RadarData { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,8 @@ |
|||
namespace NewWMSProject.Models |
|||
{ |
|||
public class ChartDataItem |
|||
{ |
|||
public string X { get; set; } |
|||
public int Y { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,40 @@ |
|||
namespace NewWMSProject.Models |
|||
{ |
|||
public class TagType |
|||
{ |
|||
public string Key { get; set; } |
|||
public string Label { get; set; } |
|||
} |
|||
|
|||
public class GeographicType |
|||
{ |
|||
public TagType Province { get; set; } |
|||
public TagType City { get; set; } |
|||
} |
|||
|
|||
public class CurrentUser |
|||
{ |
|||
public string Name { get; set; } |
|||
public string Avatar { get; set; } |
|||
public string Userid { get; set; } |
|||
public NoticeType[] Notice { get; set; } = { }; |
|||
public string Email { get; set; } |
|||
public string Signature { get; set; } |
|||
public string Title { get; set; } |
|||
public string Group { get; set; } |
|||
public TagType[] Tags { get; set; } = { }; |
|||
public int NotifyCount { get; set; } |
|||
public int UnreadCount { get; set; } |
|||
public string Country { get; set; } |
|||
public GeographicType Geographic { get; set; } |
|||
public string Address { get; set; } |
|||
public string Phone { get; set; } |
|||
} |
|||
|
|||
public class UserLiteItem |
|||
{ |
|||
public string Avater { get; set; } |
|||
public string Title { get; set; } |
|||
public string Description { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,48 @@ |
|||
using System; |
|||
|
|||
namespace NewWMSProject.Models |
|||
{ |
|||
public class StepFormModel |
|||
{ |
|||
public string ReceiverAccountType { get; set; } = "ant-design@alipay.com"; |
|||
public string ReceiverAccount { get; set; } = "test@example.com"; |
|||
public string ReceiverName { get; set; } = "Alex"; |
|||
public string PayAccount { get; set; } |
|||
public string Password { get; set; } = "500"; |
|||
public string Amount { get; set; } = "12345678"; |
|||
} |
|||
|
|||
public class AdvancedFormModel |
|||
{ |
|||
public string Name { get; set; } |
|||
public string Url { get; set; } |
|||
public string Owner { get; set; } |
|||
public string Approver { get; set; } |
|||
public DateTime?[] DateRange { get; set; } |
|||
public string Type { get; set; } |
|||
public string Name2 { get; set; } |
|||
public string Url2 { get; set; } |
|||
public string Owner2 { get; set; } |
|||
public string Approver2 { get; set; } |
|||
public DateTime? DateRange2 { get; set; } |
|||
public string Type2 { get; set; } |
|||
} |
|||
|
|||
public class BasicFormModel |
|||
{ |
|||
public string Title { get; set; } |
|||
public string Client { get; set; } |
|||
public string Invites { get; set; } |
|||
public int Disclosure { get; set; } |
|||
public int Weight { get; set; } |
|||
public string Standard { get; set; } |
|||
public string Goal { get; set; } |
|||
public DateTime?[] DateRange { get; set; } |
|||
} |
|||
|
|||
public class Owner |
|||
{ |
|||
public string Id { get; set; } |
|||
public string Name { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,17 @@ |
|||
namespace NewWMSProject.Models |
|||
{ |
|||
public class ListFormModel |
|||
{ |
|||
public string Owner { get; set; } = "wzj"; |
|||
|
|||
public string ActiveUser { get; set; } |
|||
|
|||
public string Satisfaction { get; set; } |
|||
} |
|||
|
|||
public class BasicListFormModel |
|||
{ |
|||
public string Status { get; set; } = "all"; |
|||
public string SearchKeyword { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,42 @@ |
|||
using System; |
|||
using System.Text.Json.Serialization; |
|||
using NewWMSProject.Utils; |
|||
|
|||
namespace NewWMSProject.Models |
|||
{ |
|||
public class Member |
|||
{ |
|||
public string Avatar { get; set; } |
|||
public string Name { get; set; } |
|||
public string Id { get; set; } |
|||
} |
|||
|
|||
public class ListItemDataType |
|||
{ |
|||
public string Id { get; set; } |
|||
public string Owner { get; set; } |
|||
public string Title { get; set; } |
|||
public string Avatar { get; set; } |
|||
public string Cover { get; set; } |
|||
public string Status { get; set; } |
|||
public int Percent { get; set; } |
|||
public string Logo { get; set; } |
|||
public string Href { get; set; } |
|||
public string Body { get; set; } |
|||
public string SubDescription { get; set; } |
|||
public string Description { get; set; } |
|||
public int ActiveUser { get; set; } |
|||
public int NewUser { get; set; } |
|||
public int Star { get; set; } |
|||
public int Like { get; set; } |
|||
public int Message { get; set; } |
|||
public string Content { get; set; } |
|||
public Member[] Members { get; set; } |
|||
|
|||
[JsonConverter(typeof(LongToDateTimeConverter))] |
|||
public DateTime UpdatedAt { get; set; } |
|||
|
|||
[JsonConverter(typeof(LongToDateTimeConverter))] |
|||
public DateTime CreatedAt { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,19 @@ |
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
namespace NewWMSProject.Models |
|||
{ |
|||
public class LoginParamsType |
|||
{ |
|||
[Required] public string UserName { get; set; } |
|||
|
|||
[Required] public string Password { get; set; } |
|||
|
|||
public string Mobile { get; set; } |
|||
|
|||
public string Captcha { get; set; } |
|||
|
|||
public string LoginType { get; set; } |
|||
|
|||
public bool AutoLogin { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,11 @@ |
|||
using AntDesign.ProLayout; |
|||
|
|||
namespace NewWMSProject.Models |
|||
{ |
|||
public class NoticeItem : NoticeIconData |
|||
{ |
|||
public string Id { get; set; } |
|||
public string Type { get; set; } |
|||
public string Status { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,14 @@ |
|||
namespace NewWMSProject.Models |
|||
{ |
|||
public class NoticeType |
|||
{ |
|||
public string Id { get; set; } |
|||
public string Title { get; set; } |
|||
public string Logo { get; set; } |
|||
public string Description { get; set; } |
|||
public string UpdatedAt { get; set; } |
|||
public string Member { get; set; } |
|||
public string Href { get; set; } |
|||
public string MemberLink { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,9 @@ |
|||
namespace NewWMSProject.Models |
|||
{ |
|||
public class OfflineChartDataItem |
|||
{ |
|||
public long X { get; set; } |
|||
public int Y1 { get; set; } |
|||
public int Y2 { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,8 @@ |
|||
namespace NewWMSProject.Models |
|||
{ |
|||
public class OfflineDataItem |
|||
{ |
|||
public string Name { get; set; } |
|||
public float Cvr { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,9 @@ |
|||
namespace NewWMSProject.Models |
|||
{ |
|||
public class RadarDataItem |
|||
{ |
|||
public string Name { get; set; } |
|||
public string Label { get; set; } |
|||
public int Value { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,11 @@ |
|||
namespace NewWMSProject.Models |
|||
{ |
|||
public class SearchDataItem |
|||
{ |
|||
public int Index { get; set; } |
|||
public string Keywod { get; set; } |
|||
public int Count { get; set; } |
|||
public int Range { get; set; } |
|||
public int Status { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,27 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly"> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>net8.0</TargetFramework> |
|||
<ImplicitUsings>enable</ImplicitUsings> |
|||
<Nullable>enable</Nullable> |
|||
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile> |
|||
<StaticWebAssetProjectMode>Default</StaticWebAssetProjectMode> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="AntDesign.Charts" Version="0.4.0" /> |
|||
<PackageReference Include="AntDesign.Extensions.Localization" Version="1.1.4" /> |
|||
<PackageReference Include="AntDesign.ProLayout" Version="1.1.4" /> |
|||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.13" /> |
|||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.13" PrivateAssets="all" /> |
|||
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.1" /> |
|||
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" /> |
|||
<PackageReference Include="System.Net.Http.Json" Version="8.0.1" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\..\..\EFCoreDatabase\EFCoreDatabase.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
|
|||
</Project> |
@ -0,0 +1,60 @@ |
|||
|
|||
@namespace NewWMSProject.Pages.Account.Center |
|||
|
|||
<AntList TItem="ListItemDataType" |
|||
Class="filterCardList" |
|||
Grid="_listGridType" |
|||
DataSource="List"> |
|||
<ListItem NoFlex> |
|||
<Card Bordered |
|||
Hoverable |
|||
BodyStyle="padding-bottom: 20px;" |
|||
Actions="Actions"> |
|||
<CardMeta> |
|||
<AvatarTemplate> |
|||
<Avatar Size="@AvatarSize.Small" Src="@context.Avatar" /> |
|||
</AvatarTemplate> |
|||
<TitleTemplate>@context.Title</TitleTemplate> |
|||
</CardMeta> |
|||
<div class="cardItemContent"> |
|||
<div class="cardInfo"> |
|||
<div> |
|||
<p>Active User</p> |
|||
<p>@FormatWan(context.ActiveUser)</p> |
|||
</div> |
|||
<div> |
|||
<p>New Users</p> |
|||
<p>@context.NewUser.ToString("0,0")</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</Card> |
|||
</ListItem> |
|||
</AntList> |
|||
|
|||
@code |
|||
{ |
|||
|
|||
private static readonly RenderFragment Download =@<AntDesign.Tooltip Title="@("下载")"> |
|||
<Icon Type="download" Theme="@IconThemeType.Outline" /> |
|||
</AntDesign.Tooltip>; |
|||
|
|||
private static readonly IList<RenderFragment> Actions = new List<RenderFragment> |
|||
{ |
|||
Download, |
|||
@<AntDesign.Tooltip Title="@("Edit")"><Icon Type="edit" Theme="@IconThemeType.Outline" /></AntDesign.Tooltip>, |
|||
@<AntDesign.Tooltip Title="@("Share")"><Icon Type="share-alt" Theme="@IconThemeType.Outline" /></AntDesign.Tooltip>, |
|||
@<Dropdown><Icon Type="ellipsis" Theme="@IconThemeType.Outline" /></Dropdown> |
|||
}; |
|||
|
|||
private static RenderFragment FormatWan(int val) { |
|||
if (val > 10000) { |
|||
val = (int) Math.Floor((double) val / 10000); |
|||
} |
|||
|
|||
return @<span> |
|||
@val |
|||
<span style="position: relative; top: -2px; font-size: 14px; font-style: normal; margin-left: 2px;">万</span> |
|||
</span>; |
|||
} |
|||
} |
@ -0,0 +1,18 @@ |
|||
using System.Collections.Generic; |
|||
using AntDesign; |
|||
using Microsoft.AspNetCore.Components; |
|||
using NewWMSProject.Models; |
|||
|
|||
namespace NewWMSProject.Pages.Account.Center |
|||
{ |
|||
public partial class Applications |
|||
{ |
|||
private readonly ListGridType _listGridType = new ListGridType |
|||
{ |
|||
Gutter = 24, |
|||
Column = 4 |
|||
}; |
|||
|
|||
[Parameter] public IList<ListItemDataType> List { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,49 @@ |
|||
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ |
|||
/* stylelint-disable no-duplicate-selectors */ |
|||
/* stylelint-disable */ |
|||
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ |
|||
.filterCardList { |
|||
margin-bottom: -24px; |
|||
} |
|||
.filterCardList :global .ant-card-meta-content { |
|||
margin-top: 0; |
|||
} |
|||
.filterCardList :global .ant-card-meta-avatar { |
|||
font-size: 0; |
|||
} |
|||
.filterCardList :global .ant-list .ant-list-item-content-single { |
|||
max-width: 100%; |
|||
} |
|||
.filterCardList .cardInfo { |
|||
margin-top: 16px; |
|||
margin-left: 40px; |
|||
zoom: 1; |
|||
} |
|||
.filterCardList .cardInfo::before, |
|||
.filterCardList .cardInfo::after { |
|||
display: table; |
|||
content: ' '; |
|||
} |
|||
.filterCardList .cardInfo::after { |
|||
clear: both; |
|||
height: 0; |
|||
font-size: 0; |
|||
visibility: hidden; |
|||
} |
|||
.filterCardList .cardInfo > div { |
|||
position: relative; |
|||
float: left; |
|||
width: 50%; |
|||
text-align: left; |
|||
} |
|||
.filterCardList .cardInfo > div p { |
|||
margin: 0; |
|||
font-size: 24px; |
|||
line-height: 32px; |
|||
} |
|||
.filterCardList .cardInfo > div p:first-child { |
|||
margin-bottom: 4px; |
|||
color: rgba(0, 0, 0, 0.45); |
|||
font-size: 12px; |
|||
line-height: 20px; |
|||
} |
@ -0,0 +1,16 @@ |
|||
@using NewWMSProject.Models |
|||
@namespace NewWMSProject.Pages.Account.Center |
|||
|
|||
<div class="listContent"> |
|||
<div class="description">@Data.Content</div> |
|||
<div class="extra"> |
|||
<Avatar Src="@Data.Avatar" Size="@AvatarSize.Small" /> |
|||
<a href="@Data.Href">@Data.Owner</a> Posted on <a href="@Data.Href">@Data.Href</a> |
|||
<em>@Data.UpdatedAt.ToString("yyyy-MM-dd HH:mm:ss")</em> |
|||
</div> |
|||
</div> |
|||
|
|||
@code |
|||
{ |
|||
[Parameter] public ListItemDataType Data { get; set; } |
|||
} |
@ -0,0 +1,33 @@ |
|||
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ |
|||
/* stylelint-disable no-duplicate-selectors */ |
|||
/* stylelint-disable */ |
|||
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ |
|||
.listContent .description { |
|||
max-width: 720px; |
|||
line-height: 22px; |
|||
} |
|||
.listContent .extra { |
|||
margin-top: 16px; |
|||
color: rgba(0, 0, 0, 0.45); |
|||
line-height: 22px; |
|||
} |
|||
.listContent .extra > :global(.ant-avatar) { |
|||
position: relative; |
|||
top: 1px; |
|||
width: 20px; |
|||
height: 20px; |
|||
margin-right: 8px; |
|||
vertical-align: top; |
|||
} |
|||
.listContent .extra > em { |
|||
margin-left: 16px; |
|||
color: rgba(0, 0, 0, 0.25); |
|||
font-style: normal; |
|||
} |
|||
@media screen and (max-width: 480px) { |
|||
.listContent .extra > em { |
|||
display: block; |
|||
margin-top: 8px; |
|||
margin-left: 0; |
|||
} |
|||
} |
@ -0,0 +1,16 @@ |
|||
@namespace NewWMSProject.Pages.Account.Center |
|||
|
|||
<AntList |
|||
TItem="ListItemDataType" |
|||
Size="ListSize.Large" |
|||
Class="articleList" |
|||
DataSource="List"> |
|||
<ListItem NoFlex> |
|||
<ListItemMeta Description=""> |
|||
<TitleTemplate> |
|||
<a href="https://ng.ant.design">@context.Title</a> |
|||
</TitleTemplate> |
|||
</ListItemMeta> |
|||
<ArticleListContent Data="@context" /> |
|||
</ListItem> |
|||
</AntList> |
@ -0,0 +1,11 @@ |
|||
using System.Collections.Generic; |
|||
using Microsoft.AspNetCore.Components; |
|||
using NewWMSProject.Models; |
|||
|
|||
namespace NewWMSProject.Pages.Account.Center |
|||
{ |
|||
public partial class Articles |
|||
{ |
|||
[Parameter] public IList<ListItemDataType> List { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,10 @@ |
|||
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ |
|||
/* stylelint-disable no-duplicate-selectors */ |
|||
/* stylelint-disable */ |
|||
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ |
|||
.articleList :global .ant-list-item:first-child { |
|||
padding-top: 0; |
|||
} |
|||
a.listItemMetaTitle { |
|||
color: rgba(0, 0, 0, 0.85); |
|||
} |
@ -0,0 +1,7 @@ |
|||
@namespace NewWMSProject.Pages.Account.Center |
|||
|
|||
<div class="avatarList"> |
|||
<ul> |
|||
@ChildContent |
|||
</ul> |
|||
</div> |
@ -0,0 +1,9 @@ |
|||
using Microsoft.AspNetCore.Components; |
|||
|
|||
namespace NewWMSProject.Pages.Account.Center |
|||
{ |
|||
public partial class AvatarList |
|||
{ |
|||
[Parameter] public RenderFragment ChildContent { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,43 @@ |
|||
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ |
|||
/* stylelint-disable no-duplicate-selectors */ |
|||
/* stylelint-disable */ |
|||
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ |
|||
.avatarList { |
|||
display: inline-block; |
|||
} |
|||
.avatarList ul { |
|||
display: inline-block; |
|||
margin-left: 8px; |
|||
font-size: 0; |
|||
} |
|||
.avatarItem { |
|||
display: inline-block; |
|||
width: 32px; |
|||
height: 32px; |
|||
margin-left: -8px; |
|||
font-size: 14px; |
|||
} |
|||
.avatarItem :global .ant-avatar { |
|||
border: 1px solid #d9d9d9; |
|||
} |
|||
.avatarItemLarge { |
|||
width: 40px; |
|||
height: 40px; |
|||
} |
|||
.avatarItemSmall { |
|||
width: 24px; |
|||
height: 24px; |
|||
} |
|||
.avatarItemMini { |
|||
width: 20px; |
|||
height: 20px; |
|||
} |
|||
.avatarItemMini :global .ant-avatar { |
|||
width: 20px; |
|||
height: 20px; |
|||
line-height: 20px; |
|||
} |
|||
.avatarItemMini :global .ant-avatar .ant-avatar-string { |
|||
font-size: 12px; |
|||
line-height: 18px; |
|||
} |
@ -0,0 +1,17 @@ |
|||
@namespace NewWMSProject.Pages.Account.Center |
|||
@inherits AntDomComponentBase |
|||
|
|||
<li class="@ClassMapper.Class" @onclick="OnClick"> |
|||
@if (string.IsNullOrEmpty(Tips)) |
|||
{ |
|||
<AntDesign.Tooltip Title="@Tips"> |
|||
<Unbound> |
|||
<Avatar Src="@Src" Size="@Size" Style="cursor: pointer;" RefBack="@context"/> |
|||
</Unbound> |
|||
</AntDesign.Tooltip> |
|||
} |
|||
else |
|||
{ |
|||
<Avatar Src="@Src" Size="@Size" /> |
|||
} |
|||
</li> |
@ -0,0 +1,28 @@ |
|||
using Microsoft.AspNetCore.Components; |
|||
|
|||
namespace NewWMSProject.Pages.Account.Center |
|||
{ |
|||
public partial class AvatarListItem |
|||
{ |
|||
[Parameter] public string Size { get; set; } |
|||
[Parameter] public string Tips { get; set; } |
|||
[Parameter] public string Src { get; set; } |
|||
[Parameter] public EventCallback OnClick { get; set; } |
|||
|
|||
protected override void OnInitialized() |
|||
{ |
|||
base.OnInitialized(); |
|||
SetClassMap(); |
|||
} |
|||
|
|||
protected void SetClassMap() |
|||
{ |
|||
ClassMapper |
|||
.Clear() |
|||
.Add("avatarItem") |
|||
.If("avatarItemLarge", () => Size == "large") |
|||
.If("avatarItemSmall", () => Size == "small") |
|||
.If("avatarItemMini", () => Size == "mini"); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,35 @@ |
|||
@namespace NewWMSProject.Pages.Account.Center |
|||
|
|||
<AntList |
|||
TItem="ListItemDataType" |
|||
Class="coverCardList" |
|||
Grid="_listGridType" |
|||
DataSource="List"> |
|||
<ListItem NoFlex> |
|||
<Card Class="card" Hoverable Bordered> |
|||
<Cover> |
|||
<img alt="@context.Title" src="@context.Cover"/> |
|||
</Cover> |
|||
<ChildContent> |
|||
<CardMeta> |
|||
<DescriptionTemplate>@context.SubDescription</DescriptionTemplate> |
|||
<TitleTemplate><a>@context.Title</a></TitleTemplate> |
|||
</CardMeta> |
|||
<div class="cardItemContent"> |
|||
<span>@context.UpdatedAt.ToFriendlyDisplay()</span> |
|||
<div class="avatarList"> |
|||
<AvatarList> |
|||
@foreach (var member in context.Members) |
|||
{ |
|||
<AvatarListItem |
|||
Size="small" |
|||
Src="@member.Avatar" |
|||
Tips="@member.Name"/> |
|||
} |
|||
</AvatarList> |
|||
</div> |
|||
</div> |
|||
</ChildContent> |
|||
</Card> |
|||
</ListItem> |
|||
</AntList> |
@ -0,0 +1,19 @@ |
|||
using System.Collections.Generic; |
|||
using AntDesign; |
|||
using Microsoft.AspNetCore.Components; |
|||
using NewWMSProject.Models; |
|||
|
|||
namespace NewWMSProject.Pages.Account.Center |
|||
{ |
|||
public partial class Projects |
|||
{ |
|||
private readonly ListGridType _listGridType = new ListGridType |
|||
{ |
|||
Gutter = 24, |
|||
Column = 4 |
|||
}; |
|||
|
|||
[Parameter] |
|||
public IList<ListItemDataType> List { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,41 @@ |
|||
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ |
|||
/* stylelint-disable no-duplicate-selectors */ |
|||
/* stylelint-disable */ |
|||
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ |
|||
.coverCardList .card .ant-card-meta-title { |
|||
margin-bottom: 4px; |
|||
} |
|||
.coverCardList .card .ant-card-meta-title > a { |
|||
display: inline-block; |
|||
max-width: 100%; |
|||
color: rgba(0, 0, 0, 0.85); |
|||
} |
|||
.coverCardList .card .ant-card-meta-description { |
|||
height: 44px; |
|||
overflow: hidden; |
|||
line-height: 22px; |
|||
} |
|||
.coverCardList .card:hover .ant-card-meta-title > a { |
|||
color: #1890ff; |
|||
} |
|||
.coverCardList .cardItemContent { |
|||
display: flex; |
|||
height: 20px; |
|||
margin-top: 16px; |
|||
margin-bottom: -4px; |
|||
line-height: 20px; |
|||
} |
|||
.coverCardList .cardItemContent > span { |
|||
flex: 1; |
|||
color: rgba(0, 0, 0, 0.45); |
|||
font-size: 12px; |
|||
} |
|||
.coverCardList .cardItemContent .avatarList { |
|||
flex: 0 1 auto; |
|||
} |
|||
.coverCardList .cardList { |
|||
margin-top: 24px; |
|||
} |
|||
.coverCardList .ant-list .ant-list-item-content-single { |
|||
max-width: 100%; |
|||
} |
@ -0,0 +1,86 @@ |
|||
@namespace NewWMSProject.Pages.Account.Center |
|||
@page "/account/center" |
|||
|
|||
<GridContent> |
|||
<Row Gutter="24"> |
|||
<AntDesign.Col Lg="7" Md="24"> |
|||
<Card Style="margin-bottom: 24px;"> |
|||
<div class="avatarHolder"> |
|||
<img alt="" src="@_currentUser.Avatar" /> |
|||
<div className="name">@_currentUser.Name</div> |
|||
<div>@_currentUser.Signature</div> |
|||
</div> |
|||
|
|||
<div class="detail"> |
|||
<p> |
|||
<Icon Type="contacts" Theme="@IconThemeType.Outline" Style="margin-right:8px;" /> |
|||
@_currentUser.Title |
|||
</p> |
|||
<p> |
|||
<Icon Type="cluster" Theme="@IconThemeType.Outline" Style="margin-right:8px;" /> |
|||
@_currentUser.Group |
|||
</p> |
|||
<p> |
|||
<Icon Type="home" Theme="@IconThemeType.Outline" Style="margin-right:8px;" /> |
|||
<!--todo: add userinfo--> |
|||
@_currentUser.Geographic.Province.Label |
|||
@_currentUser.Geographic.City.Label |
|||
</p> |
|||
</div> |
|||
|
|||
<Divider Dashed /> |
|||
|
|||
<div class="tags"> |
|||
<div class="tagsTitle">Tags</div> |
|||
@foreach (var tag in _currentUser.Tags) |
|||
{ |
|||
<Tag>@tag.Label</Tag> |
|||
} |
|||
|
|||
@if (_inputVisible) |
|||
{ |
|||
<AntDesign.Input Type="InputType.Text" Size="InputSize.Small" Style="width: 78px" |
|||
@bind-Value="InputValue" OnBlur="HandleInputConfirm" /> |
|||
} |
|||
else |
|||
{ |
|||
<Tag OnClick="ShowInput" Style="border-style: dashed"> |
|||
<Icon Type="plus" Theme="@IconThemeType.Outline" /> |
|||
</Tag> |
|||
} |
|||
</div> |
|||
|
|||
<Divider Dashed Style="margin-top: 16px;" /> |
|||
|
|||
<div class="team"> |
|||
<div class="teamTitle">Team</div> |
|||
<!--todo: add notice--> |
|||
</div> |
|||
</Card> |
|||
</AntDesign.Col> |
|||
<AntDesign.Col Lg="17" Md="24"> |
|||
<Card Class="tabsCard"> |
|||
<Tabs DefaultActiveKey="1"> |
|||
<TabPane Key="1"> |
|||
<TabTemplate>Articles (@_fakeList.Count)</TabTemplate> |
|||
<ChildContent> |
|||
<Articles List="_fakeList" /> |
|||
</ChildContent> |
|||
</TabPane> |
|||
<TabPane Key="2"> |
|||
<TabTemplate>Applications (@_fakeList.Count)</TabTemplate> |
|||
<ChildContent> |
|||
<Applications List="_fakeList" /> |
|||
</ChildContent> |
|||
</TabPane> |
|||
<TabPane Key="3"> |
|||
<TabTemplate>Projects (@_fakeList.Count)</TabTemplate> |
|||
<ChildContent> |
|||
<Projects List="_fakeList" /> |
|||
</ChildContent> |
|||
</TabPane> |
|||
</Tabs> |
|||
</Card> |
|||
</AntDesign.Col> |
|||
</Row> |
|||
</GridContent> |
@ -0,0 +1,40 @@ |
|||
using System.Collections.Generic; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Components; |
|||
using NewWMSProject.Models; |
|||
using NewWMSProject.Services; |
|||
|
|||
namespace NewWMSProject.Pages.Account.Center |
|||
{ |
|||
public partial class Index |
|||
{ |
|||
private CurrentUser _currentUser = new CurrentUser |
|||
{ |
|||
Geographic = new GeographicType { City = new TagType(), Province = new TagType() } |
|||
}; |
|||
|
|||
private IList<ListItemDataType> _fakeList = new List<ListItemDataType>(); |
|||
private bool _inputVisible; |
|||
public string InputValue { get; set; } |
|||
|
|||
[Inject] public IProjectService ProjectService { get; set; } |
|||
[Inject] public IUserService UserService { get; set; } |
|||
|
|||
protected override async Task OnInitializedAsync() |
|||
{ |
|||
await base.OnInitializedAsync(); |
|||
_currentUser = await UserService.GetCurrentUserAsync(); |
|||
_fakeList = await ProjectService.GetFakeListAsync(); |
|||
} |
|||
|
|||
protected void ShowInput() |
|||
{ |
|||
_inputVisible = true; |
|||
} |
|||
|
|||
protected void HandleInputConfirm() |
|||
{ |
|||
_inputVisible = false; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,63 @@ |
|||
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ |
|||
/* stylelint-disable no-duplicate-selectors */ |
|||
/* stylelint-disable */ |
|||
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ |
|||
.avatarHolder { |
|||
margin-bottom: 24px; |
|||
text-align: center; |
|||
} |
|||
.avatarHolder > img { |
|||
width: 104px; |
|||
height: 104px; |
|||
margin-bottom: 20px; |
|||
} |
|||
.avatarHolder .name { |
|||
margin-bottom: 4px; |
|||
color: rgba(0, 0, 0, 0.85); |
|||
font-weight: 500; |
|||
font-size: 20px; |
|||
line-height: 28px; |
|||
} |
|||
.detail p { |
|||
position: relative; |
|||
margin-bottom: 8px; |
|||
padding-left: 26px; |
|||
} |
|||
.detail p:last-child { |
|||
margin-bottom: 0; |
|||
} |
|||
.detail i { |
|||
position: absolute; |
|||
top: 4px; |
|||
left: 0; |
|||
width: 14px; |
|||
height: 14px; |
|||
} |
|||
.tagsTitle, |
|||
.teamTitle { |
|||
margin-bottom: 12px; |
|||
color: rgba(0, 0, 0, 0.85); |
|||
font-weight: 500; |
|||
} |
|||
.tags .ant-tag { |
|||
margin-bottom: 8px; |
|||
} |
|||
.team .ant-avatar { |
|||
margin-right: 12px; |
|||
} |
|||
.team a { |
|||
display: block; |
|||
margin-bottom: 24px; |
|||
overflow: hidden; |
|||
color: rgba(0, 0, 0, 0.85); |
|||
white-space: nowrap; |
|||
text-overflow: ellipsis; |
|||
word-break: break-all; |
|||
transition: color 0.3s; |
|||
} |
|||
.team a:hover { |
|||
color: #1890ff; |
|||
} |
|||
.tabsCard .ant-card-head { |
|||
padding: 0 16px; |
|||
} |
@ -0,0 +1,60 @@ |
|||
@namespace NewWMSProject.Pages.Account.Settings |
|||
|
|||
<div class="baseView"> |
|||
<div class="left" style="min-width: 310px;"> |
|||
<Form |
|||
Layout="@FormLayout.Vertical" |
|||
OnFinish="HandleFinish" |
|||
Model="@_currentUser"> |
|||
<FormItem Label="Email"> |
|||
<AntDesign.Input @bind-Value="@context.Email" /> |
|||
</FormItem> |
|||
<FormItem Label="Nickname"> |
|||
<AntDesign.Input @bind-Value="@context.Name" /> |
|||
</FormItem> |
|||
<FormItem Label="Personal profile"> |
|||
<AntDesign.TextArea @bind-Value="@context.Signature" /> |
|||
</FormItem> |
|||
<FormItem Label="Country/Region"> |
|||
<Select |
|||
TItem="string" |
|||
TItemValue="string" |
|||
Style="max-width: 220px;" |
|||
@bind-Value="@context.Country"> |
|||
<SelectOptions> |
|||
<SelectOption TItem="string" TItemValue="string" Value="@("China")" Label="中国"/> |
|||
</SelectOptions> |
|||
</Select> |
|||
</FormItem> |
|||
<FormItem Label="Province or city"> |
|||
<GeographicView /> |
|||
</FormItem> |
|||
<FormItem Label="Street Address"> |
|||
<AntDesign.Input @bind-Value="@context.Address" /> |
|||
</FormItem> |
|||
<FormItem Label="Phone Number"> |
|||
<PhoneView /> |
|||
</FormItem> |
|||
<FormItem> |
|||
<Button HtmlType="submit" Type="@ButtonType.Primary"> |
|||
Update Information |
|||
</Button> |
|||
</FormItem> |
|||
</Form> |
|||
</div> |
|||
<div class="right__b__1"> |
|||
<div class="avatar_title"> |
|||
Avatar |
|||
</div> |
|||
<div class="avatar"> |
|||
<img src="@_currentUser.Avatar" alt="avatar" /> |
|||
</div> |
|||
<Upload ShowUploadList="false"> |
|||
<div class="button_view"> |
|||
<Button Icon="upload"> |
|||
Change avatar |
|||
</Button> |
|||
</div> |
|||
</Upload> |
|||
</div> |
|||
</div> |
@ -0,0 +1,24 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Components; |
|||
using NewWMSProject.Models; |
|||
using NewWMSProject.Services; |
|||
|
|||
namespace NewWMSProject.Pages.Account.Settings |
|||
{ |
|||
public partial class BaseView |
|||
{ |
|||
private CurrentUser _currentUser = new CurrentUser(); |
|||
|
|||
[Inject] protected IUserService UserService { get; set; } |
|||
|
|||
private void HandleFinish() |
|||
{ |
|||
} |
|||
|
|||
protected override async Task OnInitializedAsync() |
|||
{ |
|||
await base.OnInitializedAsync(); |
|||
_currentUser = await UserService.GetCurrentUserAsync(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,54 @@ |
|||
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ |
|||
/* stylelint-disable no-duplicate-selectors */ |
|||
/* stylelint-disable */ |
|||
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ |
|||
.baseView { |
|||
display: flex; |
|||
padding-top: 12px; |
|||
} |
|||
.baseView :global .ant-legacy-form-item .ant-legacy-form-item-control-wrapper { |
|||
width: 100%; |
|||
} |
|||
.baseView .left { |
|||
min-width: 224px; |
|||
max-width: 448px; |
|||
} |
|||
.baseView .right__b__1 { |
|||
flex: 1; |
|||
padding-left: 104px; |
|||
} |
|||
.baseView .right__b__1 .avatar_title { |
|||
height: 22px; |
|||
margin-bottom: 8px; |
|||
color: rgba(0, 0, 0, 0.85); |
|||
font-size: 14px; |
|||
line-height: 22px; |
|||
} |
|||
.baseView .right__b__1 .avatar { |
|||
width: 144px; |
|||
height: 144px; |
|||
margin-bottom: 12px; |
|||
overflow: hidden; |
|||
} |
|||
.baseView .right__b__1 .avatar img { |
|||
width: 100%; |
|||
} |
|||
.baseView .right__b__1 .button_view { |
|||
width: 144px; |
|||
text-align: center; |
|||
} |
|||
@media screen and (max-width: 1200px) { |
|||
.baseView { |
|||
flex-direction: column-reverse; |
|||
} |
|||
.baseView .right__b__1 { |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
max-width: 448px; |
|||
padding: 20px; |
|||
} |
|||
.baseView .right__b__1 .avatar_title { |
|||
display: none; |
|||
} |
|||
} |
@ -0,0 +1,21 @@ |
|||
@namespace NewWMSProject.Pages.Account.Settings |
|||
|
|||
<AntList |
|||
TItem="UserLiteItem" |
|||
ItemLayout="ListItemLayout.Horizontal" |
|||
DataSource="_data"> |
|||
<ListItem Actions="_actions"> |
|||
<ListItemMeta Title="@context.Title" Description="@context.Description"> |
|||
<AvatarTemplate> |
|||
<Icon Type="@context.Avater" Theme="@IconThemeType.Outline" Class="@context.Avater" /> |
|||
</AvatarTemplate> |
|||
</ListItemMeta> |
|||
</ListItem> |
|||
</AntList> |
|||
|
|||
@code |
|||
{ |
|||
private static RenderFragment _modify = @<a key="bind">Bind</a>; |
|||
|
|||
private readonly RenderFragment[] _actions = {_modify}; |
|||
} |
@ -0,0 +1,29 @@ |
|||
using NewWMSProject.Models; |
|||
|
|||
namespace NewWMSProject.Pages.Account.Settings |
|||
{ |
|||
public partial class BindingView |
|||
{ |
|||
private readonly UserLiteItem[] _data = |
|||
{ |
|||
new UserLiteItem |
|||
{ |
|||
Avater = "taobao", |
|||
Title = "Binding Taobao", |
|||
Description = "Currently unbound Taobao account" |
|||
}, |
|||
new UserLiteItem |
|||
{ |
|||
Avater = "alipay", |
|||
Title = "Binding Alipay", |
|||
Description = "Currently unbound Alipay account" |
|||
}, |
|||
new UserLiteItem |
|||
{ |
|||
Avater = "dingding", |
|||
Title = "Binding DingTalk", |
|||
Description = "Currently unbound DingTalk account" |
|||
} |
|||
}; |
|||
} |
|||
} |
@ -0,0 +1,5 @@ |
|||
@namespace NewWMSProject.Pages.Account.Settings |
|||
|
|||
<h1> |
|||
GeographicView |
|||
</h1> |
@ -0,0 +1,18 @@ |
|||
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ |
|||
/* stylelint-disable no-duplicate-selectors */ |
|||
/* stylelint-disable */ |
|||
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ |
|||
.row .item { |
|||
width: 50%; |
|||
max-width: 220px; |
|||
} |
|||
.row .item:first-child { |
|||
width: calc(50% - 8px); |
|||
margin-right: 8px; |
|||
} |
|||
@media screen and (max-width: 576px) { |
|||
.item:first-child { |
|||
margin: 0; |
|||
margin-bottom: 8px; |
|||
} |
|||
} |
@ -0,0 +1,18 @@ |
|||
@namespace NewWMSProject.Pages.Account.Settings |
|||
|
|||
<AntList |
|||
TItem="UserLiteItem" |
|||
ItemLayout="ListItemLayout.Horizontal" |
|||
DataSource="_data"> |
|||
<ListItem Actions="_actions"> |
|||
<ListItemMeta Avatar="" Description="@context.Description"> |
|||
<TitleTemplate>@context.Title</TitleTemplate> |
|||
</ListItemMeta> |
|||
</ListItem> |
|||
</AntList> |
|||
|
|||
@code |
|||
{ |
|||
private static RenderFragment _switch = @<Switch CheckedChildren="@("Open")" UnCheckedChildren="@("Close")" Checked="true"/>; |
|||
private readonly RenderFragment[] _actions = {_switch}; |
|||
} |
@ -0,0 +1,26 @@ |
|||
using NewWMSProject.Models; |
|||
|
|||
namespace NewWMSProject.Pages.Account.Settings |
|||
{ |
|||
public partial class NotificationView |
|||
{ |
|||
private readonly UserLiteItem[] _data = |
|||
{ |
|||
new UserLiteItem |
|||
{ |
|||
Title = "Account Password", |
|||
Description = "Messages from other users will be notified in the form of a station letter" |
|||
}, |
|||
new UserLiteItem |
|||
{ |
|||
Title = "System Messages", |
|||
Description = "System messages will be notified in the form of a station letter" |
|||
}, |
|||
new UserLiteItem |
|||
{ |
|||
Title = "To-do Notification", |
|||
Description = "The to-do list will be notified in the form of a letter from the station" |
|||
} |
|||
}; |
|||
} |
|||
} |
@ -0,0 +1,5 @@ |
|||
@namespace NewWMSProject.Pages.Account.Settings |
|||
|
|||
<h1> |
|||
PhoneView |
|||
</h1> |
@ -0,0 +1,13 @@ |
|||
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ |
|||
/* stylelint-disable no-duplicate-selectors */ |
|||
/* stylelint-disable */ |
|||
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ |
|||
.area_code { |
|||
width: 30%; |
|||
max-width: 128px; |
|||
margin-right: 8px; |
|||
} |
|||
.phone_number { |
|||
width: calc(70% - 8px); |
|||
max-width: 312px; |
|||
} |
@ -0,0 +1,18 @@ |
|||
@namespace NewWMSProject.Pages.Account.Settings |
|||
|
|||
<AntList |
|||
TItem="UserLiteItem" |
|||
ItemLayout="ListItemLayout.Horizontal" |
|||
DataSource="_data"> |
|||
<ListItem Actions="_actions"> |
|||
<ListItemMeta Avatar="" Description="@context.Description"> |
|||
<TitleTemplate>@context.Title</TitleTemplate> |
|||
</ListItemMeta> |
|||
</ListItem> |
|||
</AntList> |
|||
|
|||
@code |
|||
{ |
|||
private static RenderFragment _modify = @<a key="modify">Modify</a>; |
|||
private readonly RenderFragment[] _actions = {_modify}; |
|||
} |
@ -0,0 +1,37 @@ |
|||
using NewWMSProject.Models; |
|||
|
|||
namespace NewWMSProject.Pages.Account.Settings |
|||
{ |
|||
public partial class SecurityView |
|||
{ |
|||
private readonly UserLiteItem[] _data = |
|||
{ |
|||
new UserLiteItem |
|||
{ |
|||
Title = "Account Password", |
|||
Description = "Current password strength: : Strong" |
|||
}, |
|||
new UserLiteItem |
|||
{ |
|||
Title = "Security Phone", |
|||
Description = "Bound phone: : 138****8293" |
|||
}, |
|||
new UserLiteItem |
|||
{ |
|||
Title = "Security Question", |
|||
Description = |
|||
"The security question is not set, and the security policy can effectively protect the account security" |
|||
}, |
|||
new UserLiteItem |
|||
{ |
|||
Title = "Backup Email", |
|||
Description = "Bound Email: : ant***sign.com" |
|||
}, |
|||
new UserLiteItem |
|||
{ |
|||
Title = "MFA Device", |
|||
Description = "Unbound MFA device, after binding, can be confirmed twice" |
|||
} |
|||
}; |
|||
} |
|||
} |
@ -0,0 +1,36 @@ |
|||
@namespace NewWMSProject.Pages.Account.Settings |
|||
@page "/account/settings" |
|||
|
|||
<GridContent> |
|||
<div class="main__b__2"> |
|||
<div class="leftMenu"> |
|||
<Menu |
|||
Mode="MenuMode.Inline" |
|||
SelectedKeys="new []{_selectKey}" |
|||
OnMenuItemClicked="SelectKey"> |
|||
@foreach (var item in _menuMap) |
|||
{ |
|||
<MenuItem Key="@item.Key">@item.Value</MenuItem> |
|||
} |
|||
</Menu> |
|||
</div> |
|||
<div class="right__b__0"> |
|||
<div class="title">@_menuMap[_selectKey]</div> |
|||
@switch (_selectKey) |
|||
{ |
|||
case "base": |
|||
<BaseView /> |
|||
break; |
|||
case "security": |
|||
<SecurityView /> |
|||
break; |
|||
case "binding": |
|||
<BindingView /> |
|||
break; |
|||
case "notification": |
|||
<NotificationView /> |
|||
break; |
|||
} |
|||
</div> |
|||
</div> |
|||
</GridContent> |
@ -0,0 +1,23 @@ |
|||
using System.Collections.Generic; |
|||
using AntDesign; |
|||
|
|||
namespace NewWMSProject.Pages.Account.Settings |
|||
{ |
|||
public partial class Index |
|||
{ |
|||
private readonly Dictionary<string, string> _menuMap = new Dictionary<string, string> |
|||
{ |
|||
{"base", "Basic Settings"}, |
|||
{"security", "Security Settings"}, |
|||
{"binding", "Account Binding"}, |
|||
{"notification", "New Message Notification"}, |
|||
}; |
|||
|
|||
private string _selectKey = "base"; |
|||
|
|||
private void SelectKey(MenuItem item) |
|||
{ |
|||
_selectKey = item.Key; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,87 @@ |
|||
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ |
|||
/* stylelint-disable no-duplicate-selectors */ |
|||
/* stylelint-disable */ |
|||
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */ |
|||
.main__b__2 { |
|||
display: flex; |
|||
width: 100%; |
|||
height: 100%; |
|||
padding-top: 16px; |
|||
padding-bottom: 16px; |
|||
overflow: auto; |
|||
background-color: #fff; |
|||
} |
|||
.main__b__2 .leftMenu { |
|||
width: 224px; |
|||
border-right: 1px solid #f0f0f0; |
|||
} |
|||
.main__b__2 .leftMenu :global .ant-menu-inline { |
|||
border: none; |
|||
} |
|||
.main__b__2 .leftMenu :global .ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected { |
|||
font-weight: bold; |
|||
} |
|||
.main__b__2 .right__b__0 { |
|||
flex: 1; |
|||
padding-top: 8px; |
|||
padding-right: 40px; |
|||
padding-bottom: 8px; |
|||
padding-left: 40px; |
|||
} |
|||
.main__b__2 .right__b__0 .title { |
|||
margin-bottom: 12px; |
|||
color: rgba(0, 0, 0, 0.85); |
|||
font-weight: 500; |
|||
font-size: 20px; |
|||
line-height: 28px; |
|||
} |
|||
.main__b__2 .ant-list-split .ant-list-item:last-child { |
|||
border-bottom: 1px solid #f0f0f0; |
|||
} |
|||
.main__b__2 .ant-list-item { |
|||
padding-top: 14px; |
|||
padding-bottom: 14px; |
|||
} |
|||
.ant-list-item-meta .taobao { |
|||
display: block; |
|||
color: #ff4000; |
|||
font-size: 48px; |
|||
line-height: 48px; |
|||
border-radius: 2px; |
|||
} |
|||
.ant-list-item-meta .dingding { |
|||
margin: 2px; |
|||
padding: 6px; |
|||
color: #fff; |
|||
font-size: 32px; |
|||
line-height: 32px; |
|||
background-color: #2eabff; |
|||
border-radius: 2px; |
|||
} |
|||
.ant-list-item-meta .alipay { |
|||
color: #2eabff; |
|||
font-size: 48px; |
|||
line-height: 48px; |
|||
border-radius: 2px; |
|||
} |
|||
font.strong { |
|||
color: #52c41a; |
|||
} |
|||
font.medium { |
|||
color: #faad14; |
|||
} |
|||
font.weak { |
|||
color: #ff4d4f; |
|||
} |
|||
@media screen and (max-width: 768px) { |
|||
.main__b__2 { |
|||
flex-direction: column; |
|||
} |
|||
.main__b__2 .leftMenu { |
|||
width: 100%; |
|||
border: none; |
|||
} |
|||
.main__b__2 .right__b__0 { |
|||
padding: 40px; |
|||
} |
|||
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue