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.
 
 
 
 
 
 

888 lines
23 KiB

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Validation;
using Win.Sfs.SettleAccount;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
using Win.Sfs.SettleAccount.Entities.SettleAccountDomain;
using static System.Runtime.CompilerServices.RuntimeHelpers;
namespace SettleAccount.Bases
{
/// <summary>
/// 所有业务单据基类
/// </summary>
public interface ISBASE
{
/// <summary>
/// 客户零件号
/// </summary>
public string LU { set; get; }
/// <summary>
/// 生产号、交付索引号、发货单号(ASN单号)
/// </summary>
public string PN { set; get; }
/// <summary>
/// Key键值(LU+PN)
/// </summary>
public string KeyCode { set; get; }
/// <summary>
/// 发货数量、结算数量、扣减数量
/// </summary>
public decimal Qty { set; get; }
}
public class SA_CAN_BASE_MAIN : AuditedAggregateRoot<Guid>
{
public SA_CAN_BASE_MAIN() { }
public SA_CAN_BASE_MAIN(Guid id) : base(id) { }
[Display(Name = "期间")]
public virtual int Version { get; set; }
[Display(Name = "结算单据")]
public virtual string BillNum { get; set; } = null!;
[Display(Name = "关联结算单号")]
public virtual string SettleBillNum { get; set; } = null!;
/// <summary>
/// 可结算单状态
/// </summary>
[Display(Name = "状态")]
public virtual SettleBillState State { get; set; }
/// <summary>
/// 明细记录行数
/// </summary>
[Display(Name = "发票分组号")]
public virtual string InvGroupNum { get; set; } = null!;
public virtual string Site { get; set; }
public virtual void SetId(Guid guid)
{
Id = guid;
}
}
public class PD_BASE_MAIN : FullAuditedAggregateRoot<Guid>
{
public PD_BASE_MAIN()
{
}
[Display(Name = "期间")]
public virtual int Version { get; set; }
[Display(Name = "结算单据")]
public virtual string BillNum { get; set; } = null!;
[Display(Name = "关联结算单号")]
public virtual string SettleBillNum { get; set; } = null!;
/// <summary>
/// 可结算单状态
/// </summary>
[Display(Name = "状态")]
public virtual SettleBillState State { get; set; }
/// <summary>
/// 明细记录行数
/// </summary>
[Display(Name = "发票分组号")]
public virtual string InvGroupNum { get; set; } = null!;
/// <summary>
/// 地点
/// </summary>
[Display(Name = "地点")]
public virtual string Site { get; set; }
}
public interface ISA_BASE : ISBASE
{
/// <summary>
/// 期间
/// </summary>
public int Version { set; get; }
/// <summary>
/// 单价
/// </summary>
public decimal Price { set; get; }
///// <summary>
///// 结算单
///// </summary>
//public string BillNum { set; get; }
/// <summary>
/// 结算日期
/// </summary>
public DateTime SettleDate { set; get; }
/// <summary>
/// 结算分组号
/// </summary>
public string GroupNum { set; get; }
}
public interface ISA_CAN_BASE : ISBASE
{
/// <summary>
/// 期间
/// </summary>
public int Version { set; get; }
/// <summary>
/// 单价
/// </summary>
public decimal Price { set; get; }
/// <summary>
/// 可出库结算单
/// </summary>
public string BillNum { set; get; }
/// <summary>
/// 结算日期
/// </summary>
public DateTime SettleDate { set; get; }
public string InvGroupNum { set; get; }
/// <summary>
/// 结算分组号
/// </summary>
public string GroupNum { set; get; }
}
public interface ISA_NOT_BASE : ISBASE
{
/// <summary>
/// 单价
/// </summary>
public decimal Price { set; get; }
/// <summary>
/// 期间
/// </summary>
public int Version { set; get; }
/// <summary>
/// 原结算单号
/// </summary>
public string SettleBillNum { set; get; }
/// <summary>
/// 结算日期
/// </summary>
public DateTime SettleDate { set; get; }
/// <summary>
/// 结算分组号
/// </summary>
public string InvGroupNum { set; get; }
/// <summary>
/// 结算分组号
/// </summary>
public string GroupNum { set; get; }
}
public interface IRE_BASE : ISBASE
{
/// 发货时间
/// </summary>
public DateTime ShippingDate { set; get; }
/// <summary>
/// 发运单号
/// </summary>
public string WmsBillNum { set; get; }
}
public class RE_BASE : FullAuditedAggregateRoot<Guid>, IRE_BASE
{
public RE_BASE()
{
}
/// 发货时间
/// </summary>
public DateTime ShippingDate { set; get; }
/// <summary>
/// 发运单号
/// </summary>
public string WmsBillNum { set; get; }
/// <summary>
/// 扣減數據量
/// </summary>
public decimal Qty { set; get; }
/// <summary>
/// 零件號
/// </summary>
public string LU { get; set; }
/// <summary>
/// 發貨單號、
/// </summary>
public string PN { get; set; }
/// <summary>
///
/// </summary>
public string KeyCode { get; set; }
}
public interface ISE_BASE : ISBASE
{
/// <summary>
/// 期间
/// </summary>
public int Version { set; get; }
/// <summary>
/// 发货时间
/// </summary>
public DateTime ShippingDate { set; get; }
/// <summary>
/// 发运单号
/// </summary>
public string WmsBillNum { set; get; }
}
public interface IPD_BASE : ISBASE
{
/// <summary>
/// 期間
/// </summary>
public int Version { set; get; }
/// <summary>
/// 結算單號
/// </summary>
public string BillNum { set; get; }
/// <summary>
/// 單價
/// </summary>
public string Price { set; get; }
/// <summary>
/// 發票分組號
/// </summary>
public string InvGroupNum { set; get; }
/// <summary>
/// 結算日期
/// </summary>
public string SettleDate { set; get; }
/// <summary>
/// 結算分組號
/// </summary>
public string GroupNum { set; get; }
}
/// <summary>
/// 基类检查设置
/// </summary>
public class BASE_CONF
{
/// <summary>
/// 是否检查客户零件表
/// </summary>
public bool IsRelationShip { set; get; }
/// <summary>
/// 是否检查物料主数据
/// </summary>
public bool IsMaterial { set; get; }
/// <summary>
/// 是否检查BOM
/// </summary>
public bool IsBom { set; get; }
public bool IsPriceList { set; get; }
public BASE_CONF(bool isRelationShip, bool isMaterial, bool isBom)
{
IsRelationShip = isRelationShip;
IsMaterial = isMaterial;
IsBom = isBom;
}
public BASE_CONF()
{
}
}
public class SA_BASE : AuditedAggregateRoot<Guid>, ISA_BASE
{
public SA_BASE() { }
public SA_BASE(Guid id) : base(id) { }
/// <summary>
/// 期间
/// </summary>
public virtual int Version { set; get; }
/// <summary>
/// 单价
/// </summary>
public virtual decimal Price { set; get; }
/// <summary>
/// 结算单
/// </summary>
public virtual string BillNum { set; get; }
/// <summary>
/// 结算日期
/// </summary>
public virtual DateTime SettleDate { set; get; }
/// <summary>
/// 客户物料号
/// </summary>
public virtual string LU { get; set; }
/// <summary>
/// 客户零件号(无空格)
/// </summary>
[MaxLength(100)]
public string CustomerPartCodeNoSpace { get; set; }
/// <summary>
/// 生產號
/// </summary>
public virtual string PN { get; set; }
/// <summary>
/// 組合鍵值(LU+PN)
/// </summary>
public virtual string KeyCode { get; set; }
/// <summary>
/// 數量
/// </summary>
public virtual decimal Qty { get; set; }
/// <summary>
/// 結算分組號
/// </summary>
public virtual string GroupNum { get; set; }
/// <summary>
/// 厂内物料号
/// </summary>
public virtual string PartCode { get; set; }
/// <summary>
/// 业务分类
/// </summary>
[Display(Name = "业务分类")]
public EnumBusinessType BusinessType { get; set; }
}
public class SA_CAN_BASE : AuditedAggregateRoot<Guid>, ISA_BASE
{
protected SA_CAN_BASE() { }
public SA_CAN_BASE(Guid id) : base(id) { Id = id; }
/// <summary>
/// 期间
/// </summary>
public int Version { set; get; }
/// <summary>
/// 单价
/// </summary>
public decimal Price { set; get; }
/// <summary>
/// 发票字段
/// </summary>
public string BillNum { set; get; }
/// <summary>
/// 结算日期
/// </summary>
public DateTime SettleDate { set; get; }
/// <summary>
/// 發票分組號
/// </summary>
public string InvGroupNum { set; get; }
/// <summary>
/// 零件號
/// </summary>
public string LU { get; set; }
/// <summary>
/// 生產號
/// </summary>
public string PN { get; set; }
/// <summary>
/// 組合鍵值(LU+PN)
/// </summary>
public string KeyCode { get; set; }
/// <summary>
/// 數量
/// </summary>
public decimal Qty { get; set; }
/// <summary>
/// 結算分組號
/// </summary>
public string GroupNum { get; set; }
/// <summary>
/// 关联结算单号
/// </summary>
public string SettleBillNum { get; set; }
public string InvbillNum { get; set; }
/// <summary>
/// 业务类别
/// </summary>
[Display(Name = "业务类别")]
public EnumBusinessType BusinessType { get; set; }
public string ErpLoc { get; set; } = string.Empty;
public string PartCode { get; set; }
public string RealPartCode { get; set; }
//public SA_CAN_BASE(int version, decimal price, string billNum, DateTime settleDate, string invGroupNum, string lU, string pN, string keyCode, decimal qty, string groupNum)
//{
// Version = version;
// Price = price;
// BillNum = billNum;
// SettleDate = settleDate;
// InvGroupNum = invGroupNum;
// LU = lU;
// PN = pN;
// KeyCode = keyCode;
// Qty = qty;
// GroupNum = groupNum;
//}
}
public class SA_NOT_BASE : AuditedAggregateRoot<Guid>, ISA_BASE
{
public SA_NOT_BASE()
{
}
/// <summary>
/// 单价
/// </summary>
public decimal Price { set; get; }
/// <summary>
/// 期间
/// </summary>
public int Version { set; get; }
/// <summary>
/// 原结算单号
/// </summary>
public string SettleBillNum { set; get; }
/// <summary>
/// 结算日期
/// </summary>
public DateTime SettleDate { set; get; }
/// <summary>
/// 發票分组号
/// </summary>
public string InvGroupNum { set; get; }
/// <summary>
/// 零件號
/// </summary>
public string LU { get; set; }
/// <summary>
/// 生產號
/// </summary>
public string PN { get; set; }
/// <summary>
/// 組合鍵值(LU+PN)
/// </summary>
public string KeyCode { get; set; }
/// <summary>
/// 數量
/// </summary>
public decimal Qty { get; set; }
/// <summary>
/// 結算分組號
/// </summary>
public string GroupNum { get; set; }
public string PartCode { get; set; }
/// <summary>
/// 业务分类
/// </summary>
[Display(Name = "业务分类")]
public EnumBusinessType BusinessType { get; set; }
/// <summary>
/// 实际出库厂内物料号
/// </summary>
public virtual string RealPartCode { get; set; }
public string ErpLoc { get; set; }
//public SA_NOT_BASE(decimal price, int version, string settleBillNum, DateTime settleDate, string invGroupNum, string lU, string pN, string keyCode, decimal qty, string groupNum)
//{
// Price = price;
// Version = version;
// SettleBillNum = settleBillNum;
// SettleDate = settleDate;
// InvGroupNum = invGroupNum;
// LU = lU;
// PN = pN;
// KeyCode = keyCode;
// Qty = qty;
// GroupNum = groupNum;
//}
}
public class SE_BASE : FullAuditedAggregateRoot<Guid>, ISE_BASE
{
/// <summary>
/// 期间
/// </summary>
public int Version { set; get; }
/// <summary>
/// 发货时间
/// </summary>
public DateTime ShippingDate { set; get; }
/// <summary>
/// 发运单号
/// </summary>
public string WmsBillNum { set; get; }
/// <summary>
/// 客户零件号
/// </summary>
public string LU { get; set; }
/// <summary>
/// 客户零件号(无空格)
/// </summary>
[MaxLength(100)]
public string CustomerPartCodeNoSpace { get; set; }
/// <summary>
/// 厂内零件号
/// </summary>
public string FactoryPartCode { get; set; }
/// <summary>
/// 生产号
/// </summary>
public string PN { get; set; }
/// <summary>
/// 组合键值(PN+LU)
/// </summary>
public string KeyCode { get; set; }
/// <summary>
/// 数量
/// </summary>
public decimal Qty { get; set; }
}
public class PD_BASE : FullAuditedAggregateRoot<Guid>, ISBASE
{
public PD_BASE()
{
}
/// <summary>
/// 期间
/// </summary>
public int Version { set; get; }
/// <summary>
/// 发票单号
/// </summary>
public string BillNum { set; get; }
/// <summary>
/// 待出库数量
/// </summary>
public decimal Qty { set; get; }
/// <summary>
/// 单价
/// </summary>
public decimal Price { set; get; }
/// <summary>
/// 发票分组号
/// </summary>
public string InvGroupNum { set; get; }
/// <summary>
/// 下线日期
/// </summary>
public DateTime SettleDate { set; get; }
/// <summary>
/// 结算分组号
/// </summary>
public string GroupNum { set; get; }
public EnumBusinessType BusinessType { set; get; }
/// <summary>
/// LU(零件号)
/// </summary>
public string LU { get; set; }
/// <summary>
/// 生产号、发货单号、交付单号等
/// </summary>
public string PN { get; set; }
/// <summary>
/// 替换LU
/// </summary>
public string RELU { get; set; }
public string REPN { get; set; }
/// <summary>
/// 键值字段
/// </summary>
public string KeyCode { get; set; }
/// <summary>
///扩展字段1
/// </summary>
public string Extend1 { get; set; }
/// <summary>
///扩展字段2
/// </summary>
public string Extend2 { get; set; }
/// <summary>
/// 键值字段3
/// </summary>
public string Extend3 { get; set; }
/// <summary>
/// 键值字段4
/// </summary>
public string Extend4 { get; set; }
}
public class JisSeBase : SE_BASE
{
/// <summary>
/// UID
/// </summary>
[Display(Name = "UID")]
[DisplayName("UID")]
public long UID { get; set; }
/// <summary>
/// JIT订单号
/// </summary>
[Display(Name = "JIT订单号")]
[DisplayName("JIT订单号")]
public string JISNum { get; set; }
/// <summary>
/// JIT排序生产码
/// </summary>
[Display(Name = "JIT排序生产码")]
public string VinCode { get; set; }
/// <summary>
/// JIT排序生产码类型
/// </summary>
[Display(Name = "JIT排序生产码类型")]
public string CodeType { get; set; }
/// <summary>
/// 订单零件号
/// </summary>
[Display(Name = "订单零件号")]
public string PartCode { get; set; }
/// <summary>
/// 订单零件号
/// </summary>
[Display(Name = "订单零件号")]
public string RealPartCode { get; set; }
/// <summary>
/// 批次
/// </summary>
[Display(Name = "批次")]
public string Batch { get; set; }
/// <summary>
/// 客户零件号
/// </summary>
[Display(Name = "客户零件号")]
public string CustPartCode { get; set; }
/// <summary>
/// 订单序号
/// </summary>
[Display(Name = "订单序号")]
public string Seq { get; set; }
/// <summary>
/// 订单时间
/// </summary>
[Display(Name = "订单时间")]
public DateTime AssembleData { get; set; }
/// <summary>
/// 发货条码
/// </summary>
[Display(Name = "发货条码")]
public string DeliverCode { get; set; }
/// <summary>
/// 发货单号
/// </summary>
[Display(Name = "发货单号")]
public string BillNum { get; set; }
/// <summary>
/// 发货时间
/// </summary>
[Display(Name = "发货时间")]
public DateTime? BillTime { get; set; }
/// <summary>
/// 发货人
/// </summary>
[Display(Name = "发货人")]
public string Oper { get; set; }
/// <summary>
/// 客户位置
/// </summary>
[Display(Name = "客户位置")]
public string Position { get; set; }
/// <summary>
/// 工厂
/// </summary>
[Display(Name = "工厂")]
public string Factory { get; set; }
/// <summary>
/// MES配置码
/// </summary>
[Display(Name = "MES配置码")]
public string MESConfigCode { get; set; }
/// <summary>
/// 目标库位
/// </summary>
[Display(Name = "目标库位")]
public string ToLoc { get; set; }
/// <summary>
/// 单据类型
/// </summary>
public EnumBillType BillType { get; set; }
/// <summary>
/// 子单据类型
/// </summary>
[Display(Name = "子单据类型")]
public EnumSubBillType SubBillType { get; set; }
/// <summary>
/// 事务类型
/// </summary>
[Display(Name = "事务类型")]
public EnumDelTransType TransType { get; set; }
/// <summary>
/// 发运主类型
/// </summary>
[Display(Name = "发运主类型")]
public EnumDeliverBjBmpBillType DeliverBillType { get; set; }
/// <summary>
/// 发运子类型
/// </summary>
[Display(Name = "发运子类型")]
public EnumDeliverSubBillType DeliverSubBillType { get; set; }
/// <summary>
/// 单据性质
/// </summary>
[Display(Name = "单据性质")]
public string BillCharacter { get; set; }
/// <summary>
/// 原生产码
/// </summary>
[Display(Name = "原生产码")]
public string OrigiCode { get; set; }
/// <summary>
/// 描述
/// </summary>
[Display(Name = "描述")]
public string PartDesc { get; set; }
/// <summary>
/// 备注
/// </summary>
[Display(Name = "备注")]
public string Remark { get; set; }
/// <summary>
/// 业务类型
/// </summary>
[Display(Name = "业务类型")]
public EnumProTpe ProType { get; set; }
/// <summary>
/// JIS排序单号
/// </summary>
[Display(Name = "JIS排序单号")]
public string OrderNum { get; set; }
/// <summary>
/// JIS实际生产码
/// </summary>
[Display(Name = "JIS实际生产码")]
public string RealCode { get; set; }
/// <summary>
/// 来源库位
/// </summary>
[Display(Name = "来源库位")]
public string FromLoc { get; set; }
/// <summary>
/// 参照订单生产码
/// </summary>
[Display(Name = "参照订单生产码")]
public string RefVinCode { get; set; }
/// <summary>
/// 发货关联单号
/// </summary>
[Display(Name = "发货关联单号")]
public string RefBillNum { get; set; }
/// <summary>
/// Erp目标库位
/// </summary>
[Display(Name = "Erp目标库位")]
public string ErpToLoc { get; set; }
/// <summary>
/// 塑件唯一码
/// </summary>
[Display(Name = "塑件唯一码")]
public string UniqueCode { get; set; }
/// <summary>
/// PJS顺序号
/// </summary>
[Display(Name = "PJS顺序号")]
public string PjsNum { get; set; }
/// <summary>
/// 虚拟小总成
/// </summary>
[Display(Name = "虚拟小总成")]
public string MatchNumber { get; set; }
/// <summary>
/// 状态
/// </summary>
[Display(Name = "状态")]
public EnumBillState State { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Display(Name = "创建时间")]
public DateTime CreateTime { get; set; }
/// <summary>
/// 是否有EDI数据
/// </summary>
[Display(Name = "是否有EDI数据")]
public bool IsHaveEdiData { get; set; }
}
}