箱唛接口功能
This commit is contained in:
135
src/WMS.Web.Domain/Entitys/BoxMark.cs
Normal file
135
src/WMS.Web.Domain/Entitys/BoxMark.cs
Normal file
@@ -0,0 +1,135 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text;
|
||||
using WMS.Web.Core;
|
||||
|
||||
namespace WMS.Web.Domain.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 箱唛表
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[Table("t_wms_box_mark")]
|
||||
public class BoxMark : EntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// ID
|
||||
/// </summary>
|
||||
public override int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 箱唛编号
|
||||
/// </summary>
|
||||
public string BillNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 箱唛编号-首位
|
||||
/// </summary>
|
||||
public int FirstBillNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 箱唛编号-末尾序号
|
||||
/// </summary>
|
||||
public int LastBillNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 订单编号
|
||||
/// </summary>
|
||||
public string OrderBillNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料ID
|
||||
/// </summary>
|
||||
public int MaterialId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 产品数量
|
||||
/// </summary>
|
||||
public decimal ProductQty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 装箱数量
|
||||
/// </summary>
|
||||
public decimal CratingQty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 装箱净重
|
||||
/// </summary>
|
||||
public decimal CratingNetWeightQty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 装箱毛重
|
||||
/// </summary>
|
||||
public decimal CratingGrossWeightQty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 尾箱数量
|
||||
/// </summary>
|
||||
public decimal TailboxQty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 尾箱净重
|
||||
/// </summary>
|
||||
public decimal TailboxNetWeightQty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 尾箱毛重
|
||||
/// </summary>
|
||||
public decimal TailboxGrossWeightQty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作人
|
||||
/// </summary>
|
||||
public int CreatorId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间(生成时间)
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建
|
||||
/// </summary>
|
||||
/// <param name="creatorId"></param>
|
||||
public void Create(int creatorId)
|
||||
{
|
||||
this.CreatorId = creatorId;
|
||||
this.CreateTime = DateTime.Now;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 生成编号
|
||||
/// </summary>
|
||||
/// <param name="firstBillNo"></param>
|
||||
/// <param name="lastBillNo"></param>
|
||||
public void GenerateBillNo(int firstBillNo,int lastBillNo)
|
||||
{
|
||||
this.FirstBillNo=Convert.ToInt32(DateTime.Now.ToString("yyMMdd"));
|
||||
if (this.FirstBillNo == firstBillNo)
|
||||
this.LastBillNo = lastBillNo + 1;
|
||||
else
|
||||
this.LastBillNo = 1;
|
||||
|
||||
if (this.LastBillNo.ToString().Length >= 5)
|
||||
{
|
||||
this.BillNo = "XM" + this.FirstBillNo + this.LastBillNo;
|
||||
return;
|
||||
}
|
||||
|
||||
string lastStr = this.LastBillNo.ToString();
|
||||
while (true)
|
||||
{
|
||||
lastStr = "0" + lastStr;
|
||||
if (lastStr.Length >= 5) break;
|
||||
}
|
||||
this.BillNo = "XM" + this.FirstBillNo + lastStr;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user