Administrator
2024-01-31 4782a054880ca72f761468da28357cdf1606aa0a
Merge branch 'master' into wxw
4个文件已添加
296 ■■■■■ 已修改文件
Wms/Model/ModelVm/BllAsnVm/LabelBoxVm.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllAsnServer/BllLabelBoxNoServer.cs 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.Entity/BllAsnEntity/BllLabelBoxNo.cs 183 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.IBLL/IBllAsnServer/IBllLabelBoxNoServer.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Model/ModelVm/BllAsnVm/LabelBoxVm.cs
New file
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Model.ModelVm.BllAsnVm
{
    public class LabelBoxVm:IndexPage
    {
        public string AsnNo { get; set; }
        public string BoxNo { get; set; }
    }
}
Wms/WMS.BLL/BllAsnServer/BllLabelBoxNoServer.cs
New file
@@ -0,0 +1,82 @@
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text;
using Model.ModelVm.BllAsnVm;
using SqlSugar;
using WMS.DAL;
using WMS.Entity.BllAsnEntity;
using WMS.Entity.Context;
using WMS.Entity.SysEntity;
using WMS.IBLL.IBllAsnServer;
namespace WMS.BLL.BllAsnServer
{
    public class BllLabelBoxNoServer : DbHelper<BllLabelBoxNo>, IBllLabelBoxNoServer
    {
        private static readonly SqlSugarScope Db = DataContext.Db;
        public BllLabelBoxNoServer() : base(Db)
        {
        }
        //获取标签箱码信息
        public List<BllLabelBoxNo> GetLabelBoxList(LabelBoxVm model, out int count)
        {
            try
            {
                Expression<Func<BllLabelBoxNo, bool>> item = Expressionable.Create<BllLabelBoxNo>()
                    .AndIF(!string.IsNullOrWhiteSpace(model.AsnNo), it => it.ASNNo.Contains(model.AsnNo.Trim()))
                    .AndIF(!string.IsNullOrWhiteSpace(model.BoxNo), it => it.BoxNo.Contains(model.BoxNo.Trim()))
                    //.AndIF(!string.IsNullOrWhiteSpace(model.StartTime), it => it.CreateTime >= Convert.ToDateTime(model.StartTime))
                    //.AndIF(!string.IsNullOrWhiteSpace(model.EndTime), it => it.CreateTime <= Convert.ToDateTime(model.EndTime).AddDays(1))
                    .And(it => it.IsDel == "0")
                    .ToExpression();
                var total = 0;
                var data = GetAllWhereAsync(item)
                    .LeftJoin<SysUserInfor>((a, b) => a.CreateUser == b.Id)
                    .LeftJoin<SysUserInfor>((a, b, c) => a.UpdateUser == c.Id)
                    .Select((a, b, c) => new BllLabelBoxNo()
                    {
                        Id = a.Id,
                        ASNNo = a.ASNNo,
                        ASNDetailNo = a.ASNDetailNo,
                        BoxNo = a.BoxNo,
                        ParentBoxNo = a.ParentBoxNo,
                        Qty = a.Qty,
                        SkuNo = a.SkuNo,
                        SkuName = a.SkuName,
                        LotNo = a.LotNo,
                        LotText = a.LotText,
                        SupplierName = a.SupplierName,
                        SupplierLot = a.SupplierLot,
                        ProductionTime = a.ProductionTime,
                        ExpirationTime = a.ExpirationTime,
                        InspectTime = a.InspectTime,
                        CompleteTime = a.CompleteTime,
                        IsUse = a.IsUse,
                        Level = a.Level,
                        QtyCount = a.QtyCount,
                        QtyOrd = a.QtyOrd,
                        UDF1 = a.UDF1,
                        UDF2 = a.UDF2,
                        UDF3 = a.UDF3,
                        UDF4 = a.UDF4,
                        UDF5 = a.UDF5,
                        //CreateUserName = b.RealName,
                        //UpdateUserName = c.RealName,
                        CreateTime = a.CreateTime,
                        UpdateTime = a.UpdateTime
                    }).OrderByDescending(a => a.CreateTime).OrderBy(a => a.BoxNo).ToOffsetPage(model.Page, model.Limit, ref total);
                count = total;
                //return data;
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
        }
    }
}
Wms/WMS.Entity/BllAsnEntity/BllLabelBoxNo.cs
New file
@@ -0,0 +1,183 @@
using System;
using System.Collections.Generic;
using System.Text;
using SqlSugar;
namespace WMS.Entity.BllAsnEntity
{
    ///<summary>
    ///箱支信息表
    ///</summary>
    [SugarTable("BllLabelBoxNo")]
    public class BllLabelBoxNo : BaseEntity
    {
        /// <summary>
        /// Desc:入库单号
        /// Default:
        /// Nullable:True
        /// </summary>
        public string ASNNo { get; set; }
        /// <summary>
        /// Desc:入库明细号
        /// Default:
        /// Nullable:True
        /// </summary>
        public int? ASNDetailNo { get; set; }
        /// <summary>
        /// Desc:箱号
        /// Default:
        /// Nullable:True
        /// </summary>
        public string BoxNo { get; set; }
        /// <summary>
        /// Desc:父级箱码号
        /// Default:
        /// Nullable:True
        /// </summary>
        public string ParentBoxNo { get; set; }
        /// <summary>
        /// Desc:数量
        /// Default:
        /// Nullable:False
        /// </summary>
        public int Qty { get; set; }
        /// <summary>
        /// Desc:物料编码
        /// Default:
        /// Nullable:True
        /// </summary>
        public string SkuNo { get; set; }
        /// <summary>
        /// Desc:物料名称
        /// Default:
        /// Nullable:True
        /// </summary>
        public string SkuName { get; set; }
        /// <summary>
        /// Desc:批次号
        /// Default:
        /// Nullable:True
        /// </summary>
        public string LotNo { get; set; }
        /// <summary>
        /// Desc:批次描述
        /// Default:
        /// Nullable:True
        /// </summary>
        public string LotText { get; set; }
        /// <summary>
        /// Desc:生产日期
        /// Default:
        /// Nullable:True
        /// </summary>
        public DateTime? ProductionTime { get; set; }
        /// <summary>
        /// Desc:过期时间
        /// Default:
        /// Nullable:True
        /// </summary>
        public DateTime? ExpirationTime { get; set; }
        /// <summary>
        /// Desc:复验期
        /// Default:0
        /// Nullable:True
        /// </summary>
        public DateTime? InspectTime { get; set; }
        /// <summary>
        /// Desc:完成时间
        /// Default:
        /// Nullable:True
        /// </summary>
        public DateTime? CompleteTime { get; set; }
        /// <summary>
        /// Desc:供货商名称
        /// Default:
        /// Nullable:True
        /// </summary>
        public string SupplierName { get; set; }
        /// <summary>
        /// Desc:供货批次
        /// Default:
        /// Nullable:True
        /// </summary>
        public string SupplierLot { get; set; }
        /// <summary>
        /// Desc:是否使用
        /// Default:  0 未使用  1已使用
        /// Nullable:False
        /// </summary>
        public string IsUse { get; set; }
        /// <summary>
        /// Desc:箱码级别
        /// Default:  1一级 2二级  3三级
        /// Nullable:False
        /// </summary>
        public string Level { get; set; }
        /// <summary>
        /// Desc:总件数
        /// Default:
        /// Nullable:True
        /// </summary>
        public int? QtyCount { get; set; }
        /// <summary>
        /// Desc:第几件
        /// Default:
        /// Nullable:True
        /// </summary>
        public int? QtyOrd { get; set; }
        /// <summary>
        /// Desc:备用
        /// Default:
        /// Nullable:True
        /// </summary>
        public string UDF1 { get; set; }
        /// <summary>
        /// Desc:备用
        /// Default:
        /// Nullable:True
        /// </summary>
        public string UDF2 { get; set; }
        /// <summary>
        /// Desc:备用
        /// Default:
        /// Nullable:True
        /// </summary>
        public string UDF3 { get; set; }
        /// <summary>
        /// Desc:备用
        /// Default:
        /// Nullable:True
        /// </summary>
        public string UDF4 { get; set; }
        /// <summary>
        /// Desc:备用
        /// Default:
        /// Nullable:True
        /// </summary>
        public string UDF5 { get; set; }
    }
}
Wms/WMS.IBLL/IBllAsnServer/IBllLabelBoxNoServer.cs
New file
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Text;
using Model.ModelVm.BllAsnVm;
using WMS.Entity.BllAsnEntity;
namespace WMS.IBLL.IBllAsnServer
{
    public interface IBllLabelBoxNoServer
    {
        /// <summary>
        /// 获取标签箱码信息
        /// </summary>
        /// <param name="model">查询条件</param>
        /// <param name="count">数量</param>
        /// <returns>标签箱码信息</returns>
        List<BllLabelBoxNo> GetLabelBoxList(LabelBoxVm model, out int count);
    }
}