!提交代码

This commit is contained in:
hehaibing-1996
2024-04-15 18:43:28 +08:00
commit e89b64ea3a
232 changed files with 22292 additions and 0 deletions

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WCS.Model
{
public class GetShelfStatusRequest : RequestBase
{
public int ShelfTypeId { get; set; }
public string? ShelfTypeName { get; set; } = string.Empty;
public List<string> GroupNames { get; set; }
}
}

View File

@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WCS.Model
{
public class GetShelfStatusResponse : ResponseBase
{
public List<Shelf> Data { get; set; }
}
public class Shelf
{
public int ShelfId { get; set; }
/// <summary>
/// 货架编码
/// </summary>
public string ShelfCode { get; set; }
/// <summary>
/// 货架当前模式
/// </summary>
public int CurentMode { get; set; }
public string ModulesStr { get; set; }
/// <summary>
/// 货架组别
/// </summary>
public string GroupName { get; set; }
}
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace WCS.Model.ApiModel.Home
{
public class ShelfTypeModel()
{
public int Id { get; set; }
public string ShelfTypeName { get; set; }
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WCS.Model
{
public class QueryByMatSnRequest : RequestBase
{
public string MatSn { get; set; } = string.Empty;
public string ShelfCode { get; set; } = string.Empty;
public string IpAddress { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WCS.Model
{
public class QueryByMatSnResponse : ResponseBase
{
public MatInfoModel Data { get; set; }
}
public class MatInfoModel
{
public string materialBar { get; set; }
public string materialCode { get; set; }
public string materialName { get; set; }
public string materialSpec { get; set; }
public double materialQty { get; set; }
public string batchNo { get; set; }
public string supplier { get; set; }
public string customer { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace WCS.Model
{
public class ShelfGoInInstoreRequest : RequestBase
{
public string ModuleCode { get; set; }
public string? IpAdress { get; set; }//调用设备的Ip地址
}
}

View File

@ -0,0 +1,13 @@
namespace WCS.Model
{
public class ShelfGoInInstoreResponse : ResponseBase
{
public ShelfGoInInstoreDto? Data { get; set; }
}
public class ShelfGoInInstoreDto
{
public string ShelfCode { get; set; } = string.Empty;
public string ModulesStr { get; set;} = string.Empty;
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WCS.Model
{
public class ShelfGoOutInStoreRequest : RequestBase
{
public string ShelfCode { get; set; } = string.Empty;
public string IPAdress { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace WCS.Model.ApiModel
{
public class GetInterfaceRecordsRequest : PageQueryRequestBase
{
public string RequestType { get; set; }
public string RequestUrl { get; set; }
public string RequestBody { get; set; }
public TimeType TimeType { get; set; }
public DateTime? StartTime { get; set; }
public DateTime? EndTime { get; set; }
}
public enum TimeType
{
= 0,
= 1
}
}

View File

@ -0,0 +1,36 @@
using System;
namespace WCS.Model.ApiModel.InterfaceRecord
{
public class SystemApiLogModel
{
public int Id { get; set; }
public string Type { get; set; }
public string UserName { get; set; }
public string DeviceType { get; set; }
public string DeviceIp { get; set; }
public string RequestUrl { get; set; }
public string RequestBody { get; set; }
public string QueryString { get; set; }
public bool IsResponse { get; set; }
public string ResponseJson { get; set; }
public DateTime RequestTime { get; set; }
public DateTime ResponseTime { get; set; }
public long ExecutionTime { get; set; }
public int RowNumber { get; set; }
}
}

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;
using WCS.Model.ApiModel.User;
namespace WCS.Model.ApiModel.MatBaseInfo
{
public class AddMatBaseInfoRequest<T> : RequestBase
{
public T MatBaseInfo { get; set; }
public AddOrUpdate AddOrUpdate { get; set; }
}
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Text;
using WCS.Model.ApiModel.User;
namespace WCS.Model.ApiModel.MatBaseInfo
{
public class DeleteMatBaseInfosRequest : RequestBase
{
public List<int> MatBaseInfoIds { get; set; }
}
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace WCS.Model.ApiModel.MatBaseInfo
{
public class GetMatBaseInfoRequest : PageQueryRequestBase
{
public string MatCode { get; set; }
public string MatName { get; set; }
public string MatSpec { get; set; }
public bool? IsEnable { get; set; } = null;
}
}

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace WCS.Model.ApiModel.MatBaseInfo
{
public class GetMatCodeListRequest : RequestBase
{
//是否是从基础数据返回 如果为false 从库存数据返回
public bool IsFromBaseData { get; set; }
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace WCS.Model.ApiModel.MatBaseInfo
{
public class MatBaseInfoImportModel
{
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
}
}

View File

@ -0,0 +1,64 @@
using System;
using System.ComponentModel;
namespace WCS.BLL.DbModels
{
///<summary>
///物料基础信息
///</summary>
public partial class MatBaseInfoModel: INotifyPropertyChanged
{
public int Id { get; set; }
public string MatCode { get; set; }
public string MatName { get; set; }
public string MatSpec { get; set; }
public string MatUnit { get; set; }
public string MatBatch { get; set; }
public string MatSupplier { get; set; }
public string MatCustomer { get; set; }
public string ModifyUser { get; set; }
public DateTime? ModifyTime { get; set; } = DateTime.Now;
public bool IsEnable { get; set; } = true;
public string IsEnableStr
{
get
{
if (IsEnable)
return "启用";
else
return "禁用";
}
}
public bool IsSelected
{
get { return isSelected; }
set
{
isSelected = value;
OnPropertyChanged(nameof(IsSelected));
}
}
public bool isSelected;
public int RowNumber { get; set; }
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged(string propertyName)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}

View File

@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace WCS.Model.ApiModel.MatInventoryDetail
{
public class GetMatInventoryDetailRequest : PageQueryRequestBase
{
#region
public string MatSN { get; set; }
public string MatCode { get; set; }
public string MatName { get; set; }
public string MatSpec { get; set; }
public string MatBatch { get; set; }
public string MatSupplier { get; set; }
public string MatCustomer { get; set; }
#endregion
#region
public List<int> ShelfTypeId { get; set; }
public List<int> ShelfId { get; set; }
public int StoreId { get; set; }
public string StoreCode { get; set; }
#endregion
}
}

View File

@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace WCS.Model.ApiModel.MatInventoryDetail
{
public class MatInventoryDetailModel
{
public int Id { get; set; }
#region
public int StoreId { get; set; }
public string StoreCode { get; set; }
//public StoreInfo StoreInfo { get; set; }
#endregion
#region
public string MatSN { get; set; }
public string MatCode { get; set; }
public string MatName { get; set; }
public string MatSpec { get; set; }
public string MatBatch { get; set; }
public int MatQty { get; set; }
public string? MatSupplier { get; set; }
public string? MatCustomer { get; set; }
#endregion
public DateTime InstoreTime { get; set; } = DateTime.Now;
public string InstoreUser { get; set; }
public bool IsLocked { get; set; } = false;
public int RowNumber { get; set; }
public bool IsSelected { get; set; }
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WCS.Model
{
public class GetOutOrderDetailRequest : ResponseBase
{
public int OrderId { get; set; }
public string OrderNumber { get; set; }
}
}

View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WCS.Model
{
public class GetOutOrderListRequest : PageQueryRequestBase
{
public string OrderNumber { get; set; }
public int OrderStatus { get; set; }
//public int PageNumber { get; set; }
//public int PageSize { get; set; }
}
}

View File

@ -0,0 +1,30 @@
using System.Collections.Generic;
namespace WCS.Model
{
public class SysOutOrderByMatCodeRequest : RequestBase
{
/// <summary>
/// 单据编号
/// </summary>
public string OrderNumber { get; set; }
/// <summary>
/// 单据来源
/// </summary>
public string OrderSource { get; set; }
/// <summary>
/// 单据类型
/// </summary>
public string OrderType { get; set; }
public List<MatCodeItemList> ItemList { get; set; }
}
public class MatCodeItemList
{
public string MatCode { get; set; }
public string MatBatch { get; set; }
public int ReqQty { get; set; }
}
}

View File

@ -0,0 +1,22 @@
using System.Collections.Generic;
namespace WCS.Model
{
public class SysOutOrderByMatSnRequest : RequestBase
{
/// <summary>
/// 单据编号
/// </summary>
public string OrderNumber { get; set; }
/// <summary>
/// 单据来源
/// </summary>
public string OrderSource { get; set; }
/// <summary>
/// 单据类型
/// </summary>
public string OrderType { get; set; }
public List<string> SnList { get; set; }
}
}

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace WCS.Model
{
public class PageQueryResponse<T> : ResponseCommon
{
public PageQueryResponseData<T> Data { get; set; }
}
public class PageQueryResponseData<T>
{
public int Count { get; set; }
public int MaxPage { get; set; }
public int TotalCount { get; set; }
public List<T> Lists { get; set; }
}
}

View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WCS.Model
{
public class RequestBase
{
public string UserName { get; set; }
public string DeviceType { get; set; }
}
public class PageQueryRequestBase: RequestBase
{
public int PageNumber { get; set; }
public int PageSize { get; set; }
}
}

View File

@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WCS.Model
{
public class ResponseBase
{
public int Code { get; set; }
public string Message { get; set; }
}
public class ResponseBase<T> : ResponseBase
{
public T Data { get; set; }
}
public class ResponseCommon : ResponseBase
{
public object Data { get; set; }
}
public class ResponseCommon<T> : ResponseBase
{
public T Data { get; set; }
}
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Text;
using WCS.Model.ApiModel.User;
namespace WCS.Model.ApiModel.StoreInfo
{
public class AddShelfInfoRequest<T> : RequestBase
{
public T ShelfInfo { get; set; }
public AddOrUpdate AddOrUpdate { get; set; }
}
}

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace WCS.Model.ApiModel.StoreInfo
{
public class GetShelvesRequest : PageQueryRequestBase
{
public int ShelfTypeId { get; set; }
public string ShelfCode { get; set; }
}
}

View File

@ -0,0 +1,74 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
namespace WCS.Model.ApiModel.StoreInfo
{
public class ShelfInfoModel : INotifyPropertyChanged
{
public int Id { get; set; }
public string ShelfCode { get; set; }
public int ShelfTypeId { get; set; }
/// <summary>
/// 货架类型名称
/// </summary>
public string ShelfTypeName { get; set; }
/// <summary>
/// 货架当前状态
/// </summary>
public int CurrentMode { get; set; }
/// <summary>
/// 货架行数
/// </summary>
public int Rowcounts { get; set; }
/// <summary>
/// 货架列数
/// </summary>
public int Columncounts { get; set; }
/// <summary>
/// 货架对应警示灯的Id
/// </summary>
public int LightId { get; set; }
/// <summary>
/// 货架对应Can模块的Ip
/// </summary>
public string ClientIp { get; set; }
/// <summary>
/// 货架的组别、区域(区分单个软件管哪些货架的,前端的配置文件配置一个组别,查询时只显示当前组别的货架)
/// </summary>
public string GroupName { get; set; }
public bool IsBind { get; set; }
public string BindShelfCode { get; set; } = string.Empty;
public int RowNumber { get; set; }
public bool IsSelected
{
get { return isSelected; }
set
{
isSelected = value;
OnPropertyChanged(nameof(IsSelected));
}
}
public bool isSelected;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged(string propertyName)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace WCS.Model.ApiModel.User
{
public class AddRoleRequest<T> : RequestBase
{
public T Role { get; set; }
public AddOrUpdate AddOrUpdate { get; set; }
}
}

View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace WCS.Model.ApiModel.User
{
public class AddUserRequest<T> : RequestBase
{
public T User { get; set; }
public AddOrUpdate AddOrUpdate { get; set; }
}
public enum AddOrUpdate
{
Add = 0,
Update = 1,
Delete = 2
}
}

View File

@ -0,0 +1,58 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace WCS.Model.ApiModel
{
/// <summary>
/// 认证项
/// </summary>
public enum AuthEnum
{
/* 注意枚举的值必须大于0 */
= 1000,
= 2000,
//[Description("用户")]
//[EnumTree(权限, new[] { 用户新增, 用户删除, 用户修改 })]
//用户管理 = 3100, 用户新增 = 3110, 用户删除, 用户修改,
//[Description("角色")]
//[EnumTree(权限, new[] { 角色新增, 角色删除, 角色修改 })]
//角色管理 = 3200, 角色新增 = 3210, 角色删除, 角色修改,
= 3000,
= 4000,
}
public class EnumTreeAttribute : Attribute
{
public EnumTreeAttribute() { }
public EnumTreeAttribute(AuthEnum parent)
{
Parent = parent;
}
public EnumTreeAttribute(AuthEnum[] childs)
{
Childs = childs;
}
public EnumTreeAttribute(AuthEnum parent, AuthEnum[] childs)
{
Parent = parent;
Childs = childs;
}
/// <summary>
/// 父级
/// </summary>
public AuthEnum? Parent { get; set; } = null;
/// <summary>
/// 子级
/// </summary>
public AuthEnum[]? Childs { get; set; } = null;
}
}

View File

@ -0,0 +1,59 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WCS.Model.ApiModel
{
public class UserModel
{
public int Id { get; set; }
/// <summary>
/// 登录名
/// </summary>
public string LoginName { get; set; }
/// <summary>
/// 密码
/// </summary>
public string Password { get; set; }
public List<int> RoleIds { get; set; } = new List<int>();
public List<string> RoleNames { get; set; }
/// <summary>
/// 是否最大权限
/// </summary>
public bool IsAdmin { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime Time { get; set; }
/// <summary>
/// 用户拥有的权限
/// </summary>
public List<RoleModel> GetRoles { get; set; }
}
public class RoleModel
{
public int Id { get; set; }
/// <summary>
/// 角色名
/// </summary>
public string Name { get; set; }
public List<int> Auths { get; set; } = new List<int>();
public List<string> AuthNames { get => (Auths == null || !Auths.Any()) ? new List<string>() : EnumHelps.GetEnumDescriptionList(typeof(AuthEnum), true).Where(o => Auths.Contains(o.Item1)).Select(o => o.Item3).ToList(); }
/// <summary>
/// 是否最大权限
/// </summary>
public bool IsAdmin { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime Time { get; set; }
}
}

View File

@ -0,0 +1,68 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Reflection;
using System.Text;
namespace WCS.Model.ApiModel
{
public static class EnumHelps
{
public static List<string> GetEnumList(Type type)
{
List<string> strings = new List<string>();
if (type.IsEnum)
{
var fields = type.GetFields(BindingFlags.Static | BindingFlags.Public) ?? new FieldInfo[] { };
foreach (var field in fields)
{
strings.Add(field.Name);
}
}
else
{
}
return strings;
}
/// <summary>
/// 得到枚举详情
/// </summary>
/// <param name="type">枚举</param>
/// <param name="isDescriptionNullInName">描述为空时,是否采用名称值</param>
/// <returns>枚举值,名称,描述</returns>
public static List<Tuple<int, string, string>> GetEnumDescriptionList(Type type, bool isDescriptionNullInName = false)
{
var strings = new List<Tuple<int, string, string>>();
if (type.IsEnum)
{
var fields = type.GetFields(BindingFlags.Static | BindingFlags.Public);
if (fields == null)
return strings;
foreach (var field in fields)
{
int enumValue = Convert.ToInt32(field.GetRawConstantValue());
string enumName = field.Name;
string description = string.Empty;
var descriptionAttribute = field.GetCustomAttribute<DescriptionAttribute>(false);
if (descriptionAttribute != null)
description = descriptionAttribute.Description;
else if (isDescriptionNullInName)
description = enumName;
strings.Add(new Tuple<int, string, string>(enumValue, enumName, description));
}
}
else
{
}
return strings;
}
}
}

View File

@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace WCS.Model.ApiModel.User
{
public class GetUsersRequest : RequestBase
{
public string Info { get; set; }
}
}

View File

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace WCS.Model.ApiModel.User
{
public class UserLoginRequest : RequestBase
{
/// <summary>
/// 密码
/// </summary>
public string PassWord { get; set; }
/// <summary>
/// 是否配置为不登陆(如果不登陆 直接获取admin 且不验证密码了)
/// </summary>
public bool IsNoLogin { get; set; } = false;
}
}

View File

@ -0,0 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>
</Project>