first commit

This commit is contained in:
2026-09-02 16:31:50 +08:00
commit a461727193
911 changed files with 692450 additions and 0 deletions
@@ -0,0 +1,42 @@
namespace JSMachine.WMS.WebHost.Models
{
/// <summary>
/// webapi查询结果封装
/// </summary>
public class CommonQueryResult<T>
{
public CommonQueryResult() { }
public CommonQueryResult(bool isParamValid, bool isSucess, T result)
{
if (!isParamValid)
{
IsSucess = false;
ErrorCode = ErrorCode.InValidInputParam;
}
else
{
IsSucess = isSucess;
ErrorCode = isSucess ? ErrorCode.Sucess : ErrorCode.OperateFailed;
Result = result;
}
}
public bool IsSucess { get; set; }
public ErrorCode ErrorCode { get; set; }
/// <summary>
/// 返回数据(可以是bool也可是实体等等)
/// </summary>
public T Result { get; set; }
public string Msg { get; set; }
}
public enum ErrorCode
{
Sucess = 0,
OperateFailed = 1,
InValidInputParam = 2,
InternalServerError = 3,
UnknownError = 4
}
}
@@ -0,0 +1,9 @@
namespace JSMachine.WMS.WebHost.Models
{
public class ErpTaskQueryParam
{
public DateTime StartTime { get; set; }
public DateTime EndTime { get; set; }
public int TaskType { get; set; }
}
}
@@ -0,0 +1,41 @@
using JSMachine.WMS.App.Dto;
using SqlSugar;
using System.Linq.Expressions;
namespace JSMachine.WMS.WebHost.Models
{
/// <summary>
/// 物料查询参数
/// </summary>
public class MaterialQueryParam
{
/// <summary>
/// 库位编号
/// </summary>
public string StorageRackNo { get; set; }
/// <summary>
/// 合格证号
/// </summary>
public string Barcode { get; set; }
/// <summary>
/// 物料批次号
/// </summary>
public string MaterialBatch { get; set; }
/// <summary>
/// 客户名称
/// </summary>
public string CustomerName { get; set; }
public Expression<Func<StorageRackDto, bool>> BuildExpress()
{
var express = Expressionable.Create<StorageRackDto>();
express.AndIF(!string.IsNullOrEmpty(StorageRackNo), p => p.StorageRackNo.Contains(StorageRackNo));
express.AndIF(!string.IsNullOrEmpty(Barcode), p => p.BarCode.Contains(Barcode));
express.AndIF(!string.IsNullOrEmpty(MaterialBatch), p => p.MateriaBatch.Contains(MaterialBatch));
express.AndIF(!string.IsNullOrEmpty(CustomerName), p => p.CustomName.Contains(CustomerName));
return express.ToExpression();
}
}
}
@@ -0,0 +1,89 @@
using JSMachine.WMS.App.Dto;
using JSMachine.WMS.Application.Dto;
using JSMachine.WMS.Domain.Entity;
using JSMachine.WMS.Domain.Entity.Enums;
using SqlSugar;
using System.Linq.Expressions;
namespace JSMachine.WMS.WebHost.Models
{
public class OperationLogQueryParam
{
public DateTime? StartTime { get; set; }
public DateTime? EndTime { get; set; }
public string UserId { get; set; }
public OperationType OperationType { get; set; }
public OperationSource OperationSource { get; set; }
public int PageIndex { get; set; }
public int PageSize { get; set; }
public PageQueryCondition BuildConditional()
{
List<IConditionalModel> conditionalModels = new();
if (StartTime != null)
{
conditionalModels.Add(new ConditionalModel()
{
FieldName = nameof(OperationLogDto.CreationTime),
ConditionalType = ConditionalType.GreaterThanOrEqual,
FieldValue = StartTime.Value.ToString()
});
}
if (EndTime != null)
{
conditionalModels.Add(new ConditionalModel()
{
FieldName = nameof(OperationLogDto.CreationTime),
ConditionalType = ConditionalType.LessThanOrEqual,
FieldValue = EndTime.Value.ToString()
});
}
if (!string.IsNullOrEmpty(UserId))
{
conditionalModels.Add(new ConditionalModel()
{
FieldName = nameof(OperationLogDto.UserId),
ConditionalType = ConditionalType.Equal,
FieldValue = UserId
});
}
if (OperationType != OperationType.None)
{
conditionalModels.Add(new ConditionalModel()
{
FieldName = nameof(OperationLogDto.OperationType),
ConditionalType = ConditionalType.Equal,
FieldValue = ((int)OperationType).ToString()
});
}
if (OperationSource != OperationSource.None)
{
conditionalModels.Add(new ConditionalModel()
{
FieldName = nameof(OperationLogDto.OperationSource),
ConditionalType = ConditionalType.Equal,
FieldValue = ((int)OperationSource).ToString()
});
}
return new PageQueryCondition
{
CurrentPage = PageIndex,
PageSize = PageSize,
OrderByFiled = nameof(OperationLogDto.CreationTime),
OrderByType = OrderByType.Desc,
Filters = conditionalModels
};
}
}
}
@@ -0,0 +1,133 @@
using System.ComponentModel.DataAnnotations;
namespace JSMachine.WMS.WebHost.Models
{
public class OrderInfo
{
/// <summary>
/// 订单编号
/// </summary>
public string OrderNum { get; set; }
/// <summary>
/// 产品编号(该订单属于哪一种产品)
/// </summary>
public string ProductionNum { get; set; }
/// <summary>
/// 客户名称
/// </summary>
public string CustomerName { get; set; }
/// <summary>
/// 计划数量
/// </summary>
public int PlanningNum { get; set; }
/// <summary>
/// 每捆数
/// </summary>
public int PerBunchNum { get; set; }
/// <summary>
/// 箱型
/// </summary>
public string BoxType { get; set; }
/// <summary>
/// 楞型
/// </summary>
public string Flute { get; set; }
/// <summary>
/// 纸厚
/// </summary>
public decimal PaperThickness { get; set; }
/// <summary>
/// 修边值
/// </summary>
public decimal TrimValue { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 是否开槽
/// </summary>
public bool IsSlotted { get; set; }
/// <summary>
/// 是否模切
/// </summary>
public bool IsMoldCut { get; set; }
/// <summary>
/// 粘箱机是否折叠粘箱
/// </summary>
public bool IsFoldingGlueBox { get; set; }
/// <summary>
/// 横一长(mm)
/// </summary>
public decimal HorizontalFirstWidth { get; set; }
/// <summary>
/// 横二长(mm)
/// </summary>
public decimal HorizontalSecondWidth { get; set; }
/// <summary>
/// 横三长(mm)
/// </summary>
public decimal HorizontalThirdWidth { get; set; }
/// <summary>
/// 横四长(mm)
/// </summary>
public decimal HorizontalFourWidth { get; set; }
/// <summary>
/// 纵一高(mm)
/// </summary>
public decimal VerticalFirstHeight { get; set; }
/// <summary>
/// 纵二高(mm)
/// </summary>
public decimal VerticalSecondHeight { get; set; }
/// <summary>
/// 纵三高(mm)
/// </summary>
public decimal VerticalThridHeight { get; set; }
/// <summary>
/// 舌口宽(mm)
/// </summary>
public decimal TongueWidth { get; set; }
/// <summary>
/// 纸总长
/// </summary>
public decimal PaperLength { get; set; }
/// <summary>
/// 纸总宽
/// </summary>
public decimal PaperWidth { get; set; }
/// <summary>
/// 订单时间(导入等非本系统添加的订单时间以信息源时间为准,本系统添加的订单则取提交订单的时间为准)
/// </summary>
public DateTime? OrderTime { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime? CreationTime { get; set; }
/// <summary>
/// /最近一次得修改时间
/// </summary>
public DateTime? LastModifiedTime { get; set; }
/// <summary>
/// 拆刀提示(旧单使用保存的拆刀提示,新单直接从PLC读取拆刀提示)
/// </summary>
//public string RemoveKnifeInfo { get; set; }
/// <summary>
/// 是否已生产
/// </summary>
public bool IsFinished { get; set; }
/// <summary>
/// 印版补偿值
/// </summary>
public decimal PrintPlateOffset { get; set; }
/// <summary>
/// 模板补偿值
/// </summary>
public decimal MoldCutPlateOffset { get; set; }
}
}
@@ -0,0 +1,29 @@
namespace JSMachine.WMS.WebHost.Models
{
/// <summary>
/// 出入库统计信息
/// </summary>
public class StockInAndOutStatisticInfo
{
/// <summary>
/// 入库数量
/// </summary>
public int StockInCount { get; set; }
/// <summary>
/// 出库数量
/// </summary>
public int StockOutCount { get; set; }
/// <summary>
/// 所有货物数量
/// </summary>
public int AllGoodsCount { get; set; }
/// <summary>
/// 空库位数量
/// </summary>
public int EmptyStorageCount { get; set; }
/// <summary>
/// 库位使用率
/// </summary>
public decimal StorageRackeUsedRatio { get; set; }
}
}
@@ -0,0 +1,62 @@
namespace JSMachine.WMS.WebHost.Models
{
/// <summary>
/// 入库详情
/// </summary>
public class StockInDetail
{
/// <summary>
/// ErpTask的Id
/// </summary>
public Guid Id { get; set; }
/// <summary>
/// 库位编号(起点)
/// </summary>
public string StorageRackNo { get; set; }
/// <summary>
/// 合格证号
/// </summary>
public string BarCode { get; set; }
/// <summary>
/// 用户名称
/// </summary>
public string CustomName { get; set; }
/// <summary>
/// 物料名称
/// </summary>
public string MateriaName { get; set; }
/// <summary>
/// 物料类型
/// </summary>
public string MateriaType { get; set; }
/// <summary>
/// 批次号的生成规则为: 作业单号+日期+班次
/// </summary>
public string MateriaBatch { get; set; }
/// <summary>
/// 物料编号
/// </summary>
public string MateriaCode { get; set; }
/// <summary>
/// erp下发命令中出入库总数量
/// </summary>
public int ErpOrderNum { get; set; }
/// <summary>
/// 已上传给Erp的数量
/// </summary>
public int AlreadyUploadNum { get; set; }
/// <summary>
/// 物料入库最终存放库位
/// </summary>
public string StoragePosition { get; set; }
}
}
@@ -0,0 +1,10 @@
using JSMachine.WMS.App.Dto;
namespace JSMachine.WMS.WebHost.Models
{
public class UserPermission
{
public string Token { get; set; }
public UserInfoDto UserInfo { get; set; }
}
}
@@ -0,0 +1,38 @@
using JSMachine.WMS.App.Dto;
namespace JSMachine.WMS.WebHost.Models
{
/// <summary>
/// 库区信息
/// </summary>
public class WareHouseAreaInfo
{
/// <summary>
/// 库区Id
/// </summary>
public int AreaId { get; set; }
/// <summary>
/// 库区名称
/// </summary>
public string AreaName { get; set; }
/// <summary>
/// 库区列信息
/// </summary>
public List<WareHouseColumnInfo> Columns { get; set; }
}
/// <summary>
/// 库位列信息
/// </summary>
public class WareHouseColumnInfo
{
/// <summary>
/// 列Id
/// </summary>
public int ColId { get; set; }
/// <summary>
///
/// </summary>
public List<StorageRackDto> StorageRacks { get; set; }
}
}