You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

114 lines
2.5 KiB

using Forks.EnterpriseServices.DataDictionary;
using Forks.EnterpriseServices.DomainObjects2;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ButcherFactory.BO
{
[MapToTable("Butcher_SegmentProduction")]
[DBIndex("IDX_Butcher_SegmentProduction_Clustered", "GroupID", false, 0)]
[DBIndexType("IDX_Butcher_SegmentProduction_Clustered", IndexType.Clustered)]
public class SegmentProduction : SyncBill
{
public string BarCode { get; set; }
[NonDmoProperty]
public string ShortCode
{
get
{
if (string.IsNullOrEmpty(BarCode))
return null;
var tag = "260912011" + DateTime.Today.Year;
if (BarCode.Contains(tag))
return BarCode.Replace(tag, "");
return BarCode;
}
}
public long? WorkUnit_ID { get; set; }
public long ProductBatch_ID { get; set; }
public long Goods_ID { get; set; }
public decimal Weight { get; set; }
[ReferenceTo(typeof(Goods), "Name")]
[Join("Goods_ID", "ID")]
public string Goods_Name { get; set; }
[ReferenceTo(typeof(Goods), "Spec")]
[Join("Goods_ID", "ID")]
public string Goods_Spec { get; set; }
[ReferenceTo(typeof(Goods), "Code")]
[Join("Goods_ID", "ID")]
public string Goods_Code { get; set; }
public long? GroupID { get; set; }
public bool Submited { get; set; }
////挂起状态
//public bool TrunOut { get; set; }
public long? TrunOutID { get; set; }
[DbColumn(DefaultValue = false)]
public bool InStored { get; set; }
[DbColumn(DefaultValue = 0)]
public bool StandardPic { get; set; }
public string MsgID { get; set; }
}
[MapToTable("Butcher_SegmentLog")]
[KeyField("ID", KeyGenType.identity)]
public class SegmentLog
{
private SegmentLog()
{ }
public SegmentLog(string barCode,string action)
{
Time = DateTime.Now;
BarCode = barCode;
Action = action;
}
public long ID { get; set; }
public string Message { get; set; }
public string BarCode { get; set; }
public string Action { get; set; }
public DateTime Time { get; set; }
}
public class ProductTask
{
public string Item { get; set; }
public decimal? Need { get; set; }
public decimal? Done { get; set; }
public decimal? Last
{
get
{
if (Need.HasValue && Done.HasValue)
return Need.Value - Done.Value;
return null;
}
}
}
}