52 changed files with 7063 additions and 398 deletions
@ -0,0 +1,272 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using Volo.Abp.Domain.Values; |
||||
|
using Win_in.Sfs.Shared.Domain; |
||||
|
|
||||
|
namespace Win_in.Sfs.Basedata; |
||||
|
#region 枚举及实体
|
||||
|
/// <summary>
|
||||
|
/// 标签类别
|
||||
|
/// </summary>
|
||||
|
public enum EnumLabelType |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 空枚举
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "未定义")] |
||||
|
None = 0, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 采购标签
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "采购标签")] |
||||
|
PurchaseLabel = 1, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 生产标签
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "生产标签")] |
||||
|
ProductionLabel = 2, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 销售标签
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "销售标签")] |
||||
|
SaleLabel = 3, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 托盘标签
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "托盘标签")] |
||||
|
PalletLabel = 4, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盘点标签
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "盘点标签")] |
||||
|
CountLabel = 5, |
||||
|
} |
||||
|
|
||||
|
public enum LabelStatus |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 未定义
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "未定义")] |
||||
|
None = 0, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 有效
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "有效")] |
||||
|
Enable = 1, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 无效
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "无效")] |
||||
|
Disable = 2 |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 质量信息
|
||||
|
/// </summary>
|
||||
|
public class QualityInfo : ValueObject |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 质量等级
|
||||
|
/// </summary>
|
||||
|
[MaxLength(SfsEfCorePropertyConst.CodeLength)] |
||||
|
public string QLevel { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 质检文件
|
||||
|
/// </summary>
|
||||
|
[MaxLength(SfsEfCorePropertyConst.CodeLength)] |
||||
|
public string QualityFile { get; set; } |
||||
|
|
||||
|
protected override IEnumerable<object> GetAtomicValues() |
||||
|
{ |
||||
|
yield return QLevel; |
||||
|
yield return QualityFile; |
||||
|
} |
||||
|
|
||||
|
public QualityInfo(string qLevel, string qualityFile) |
||||
|
{ |
||||
|
QLevel = qLevel; |
||||
|
QualityFile = qualityFile; |
||||
|
} |
||||
|
|
||||
|
public QualityInfo() |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 采购信息
|
||||
|
/// </summary>
|
||||
|
[Owned] |
||||
|
public class PurchaseInfo : ValueObject |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 供应商代码
|
||||
|
/// </summary>
|
||||
|
[MaxLength(SfsEfCorePropertyConst.CodeLength)] |
||||
|
public string SupplierCode { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 订单号
|
||||
|
/// </summary>
|
||||
|
[MaxLength(SfsEfCorePropertyConst.CodeLength)] |
||||
|
public string PoNumber { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 要货计划号
|
||||
|
/// </summary>
|
||||
|
[MaxLength(SfsEfCorePropertyConst.CodeLength)] |
||||
|
public string RpNumber { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 发货单号
|
||||
|
/// </summary>
|
||||
|
[MaxLength(SfsEfCorePropertyConst.CodeLength)] |
||||
|
public string AsnNumber { get; set; } |
||||
|
|
||||
|
protected override IEnumerable<object> GetAtomicValues() |
||||
|
{ |
||||
|
yield return SupplierCode; |
||||
|
yield return PoNumber; |
||||
|
yield return RpNumber; |
||||
|
yield return AsnNumber; |
||||
|
} |
||||
|
|
||||
|
public PurchaseInfo(string supplierCode, string poNumber, string rpNumber, string asnNumber) |
||||
|
{ |
||||
|
SupplierCode = supplierCode; |
||||
|
PoNumber = poNumber; |
||||
|
RpNumber = rpNumber; |
||||
|
AsnNumber = asnNumber; |
||||
|
} |
||||
|
|
||||
|
public PurchaseInfo() |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 生产信息
|
||||
|
/// </summary>
|
||||
|
public class ProductionInfo : ValueObject |
||||
|
{ |
||||
|
public ProductionInfo() |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public ProductionInfo(string prodLine, string team, string shift) |
||||
|
{ |
||||
|
ProdLine = prodLine; |
||||
|
Team = team; |
||||
|
Shift = shift; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 生产线
|
||||
|
/// </summary>
|
||||
|
[MaxLength(SfsEfCorePropertyConst.CodeLength)] |
||||
|
public string ProdLine { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 班组
|
||||
|
/// </summary>
|
||||
|
[MaxLength(SfsEfCorePropertyConst.CodeLength)] |
||||
|
public string Team { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 班次
|
||||
|
/// </summary>
|
||||
|
[MaxLength(SfsEfCorePropertyConst.CodeLength)] |
||||
|
public string Shift { get; set; } |
||||
|
|
||||
|
protected override IEnumerable<object> GetAtomicValues() |
||||
|
{ |
||||
|
|
||||
|
yield return ProdLine; |
||||
|
yield return Team; |
||||
|
yield return Shift; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
#region 接口
|
||||
|
public interface IHasPurchaseInfo |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 采购信息
|
||||
|
/// </summary>
|
||||
|
public PurchaseInfo PurchaseInfo { get; set; } |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public interface IHasProductionInfo |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 生产信息
|
||||
|
/// </summary>
|
||||
|
public ProductionInfo ProductionInfo { get; set; } |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public interface IHasPurchaseInfoDto |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 供应商编号
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "供应商编号")] |
||||
|
public string SupplierCode { get; set; } |
||||
|
|
||||
|
public string PoNumber { get; set; } |
||||
|
|
||||
|
public string RpNumber { get; set; } |
||||
|
|
||||
|
public string AsnNumber { get; set; } |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public interface IHasProductionInfoDto |
||||
|
{ |
||||
|
public string ProdLine { get; set; } |
||||
|
public string Team { get; set; } |
||||
|
public string Shift { get; set; } |
||||
|
} |
||||
|
|
||||
|
public interface IHasQualityInfo |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 质量信息
|
||||
|
/// </summary>
|
||||
|
public QualityInfo QualityInfo { get; set; } |
||||
|
} |
||||
|
|
||||
|
public interface IHasQualityInfoDto |
||||
|
{ |
||||
|
public string QLevel { get; set; } |
||||
|
|
||||
|
public string QualityFile { get; set; } |
||||
|
|
||||
|
} |
||||
|
|
||||
|
#endregion
|
File diff suppressed because it is too large
@ -0,0 +1,424 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
#nullable disable |
||||
|
|
||||
|
namespace Win_in.Sfs.Basedata.Migrations |
||||
|
{ |
||||
|
public partial class BaseData : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropPrimaryKey( |
||||
|
name: "PK_Basedata_ProductionLineItem", |
||||
|
table: "Basedata_ProductionLineItem"); |
||||
|
|
||||
|
migrationBuilder.DropIndex( |
||||
|
name: "IX_Basedata_ProductionLineItem_ProdLineCode_ItemCode", |
||||
|
table: "Basedata_ProductionLineItem"); |
||||
|
|
||||
|
migrationBuilder.DropIndex( |
||||
|
name: "IX_Basedata_PositionCode_PartCode", |
||||
|
table: "Basedata_PositionCode"); |
||||
|
|
||||
|
migrationBuilder.RenameColumn( |
||||
|
name: "PartCode", |
||||
|
table: "Basedata_KittingDetail", |
||||
|
newName: "ItemCode"); |
||||
|
|
||||
|
migrationBuilder.RenameColumn( |
||||
|
name: "Desc2", |
||||
|
table: "Basedata_KittingDetail", |
||||
|
newName: "ItemDesc2"); |
||||
|
|
||||
|
migrationBuilder.RenameColumn( |
||||
|
name: "Desc1", |
||||
|
table: "Basedata_KittingDetail", |
||||
|
newName: "ItemName"); |
||||
|
|
||||
|
migrationBuilder.AddColumn<DateTime>( |
||||
|
name: "ArriveDate", |
||||
|
table: "Basedata_SplitPackingRec", |
||||
|
type: "datetime2", |
||||
|
nullable: false, |
||||
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "ContainerCode", |
||||
|
table: "Basedata_SplitPackingRec", |
||||
|
type: "nvarchar(64)", |
||||
|
maxLength: 64, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<DateTime>( |
||||
|
name: "ExpireDate", |
||||
|
table: "Basedata_SplitPackingRec", |
||||
|
type: "datetime2", |
||||
|
nullable: false, |
||||
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "FullBarcodeString", |
||||
|
table: "Basedata_SplitPackingRec", |
||||
|
type: "nvarchar(64)", |
||||
|
maxLength: 64, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<int>( |
||||
|
name: "LabelStatus", |
||||
|
table: "Basedata_SplitPackingRec", |
||||
|
type: "int", |
||||
|
nullable: false, |
||||
|
defaultValue: 0); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "LocationErpCode", |
||||
|
table: "Basedata_SplitPackingRec", |
||||
|
type: "nvarchar(64)", |
||||
|
maxLength: 64, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<DateTime>( |
||||
|
name: "PlanArriveDate", |
||||
|
table: "Basedata_SplitPackingRec", |
||||
|
type: "datetime2", |
||||
|
nullable: false, |
||||
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
||||
|
|
||||
|
migrationBuilder.AddColumn<DateTime>( |
||||
|
name: "ProduceDate", |
||||
|
table: "Basedata_SplitPackingRec", |
||||
|
type: "datetime2", |
||||
|
nullable: false, |
||||
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "ProductionInfo_ProdLine", |
||||
|
table: "Basedata_SplitPackingRec", |
||||
|
type: "nvarchar(64)", |
||||
|
maxLength: 64, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "ProductionInfo_Shift", |
||||
|
table: "Basedata_SplitPackingRec", |
||||
|
type: "nvarchar(64)", |
||||
|
maxLength: 64, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "ProductionInfo_Team", |
||||
|
table: "Basedata_SplitPackingRec", |
||||
|
type: "nvarchar(64)", |
||||
|
maxLength: 64, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "PurchaseInfo_AsnNumber1", |
||||
|
table: "Basedata_SplitPackingRec", |
||||
|
type: "nvarchar(64)", |
||||
|
maxLength: 64, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "PurchaseInfo_PoNumber1", |
||||
|
table: "Basedata_SplitPackingRec", |
||||
|
type: "nvarchar(64)", |
||||
|
maxLength: 64, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "PurchaseInfo_RpNumber", |
||||
|
table: "Basedata_SplitPackingRec", |
||||
|
type: "nvarchar(64)", |
||||
|
maxLength: 64, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "PurchaseInfo_SupplierCode", |
||||
|
table: "Basedata_SplitPackingRec", |
||||
|
type: "nvarchar(64)", |
||||
|
maxLength: 64, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "QualityInfo_QLevel", |
||||
|
table: "Basedata_SplitPackingRec", |
||||
|
type: "nvarchar(64)", |
||||
|
maxLength: 64, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "QualityInfo_QualityFile", |
||||
|
table: "Basedata_SplitPackingRec", |
||||
|
type: "nvarchar(64)", |
||||
|
maxLength: 64, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "RecommendLocationCode", |
||||
|
table: "Basedata_SplitPackingRec", |
||||
|
type: "nvarchar(64)", |
||||
|
maxLength: 64, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "Specifications", |
||||
|
table: "Basedata_SplitPackingRec", |
||||
|
type: "nvarchar(64)", |
||||
|
maxLength: 64, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "SupplierBatch", |
||||
|
table: "Basedata_SplitPackingRec", |
||||
|
type: "nvarchar(64)", |
||||
|
maxLength: 64, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "SupplierItemCode", |
||||
|
table: "Basedata_SplitPackingRec", |
||||
|
type: "nvarchar(64)", |
||||
|
maxLength: 64, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "SupplierItemName", |
||||
|
table: "Basedata_SplitPackingRec", |
||||
|
type: "nvarchar(64)", |
||||
|
maxLength: 64, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "SupplierName", |
||||
|
table: "Basedata_SplitPackingRec", |
||||
|
type: "nvarchar(64)", |
||||
|
maxLength: 64, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "SupplierSimpleName", |
||||
|
table: "Basedata_SplitPackingRec", |
||||
|
type: "nvarchar(64)", |
||||
|
maxLength: 64, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<string>( |
||||
|
name: "ItemCode", |
||||
|
table: "Basedata_ProductionLineItem", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: false, |
||||
|
oldClrType: typeof(string), |
||||
|
oldType: "nvarchar(450)"); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<string>( |
||||
|
name: "ProdLineCode", |
||||
|
table: "Basedata_ProductionLineItem", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: false, |
||||
|
oldClrType: typeof(string), |
||||
|
oldType: "nvarchar(450)"); |
||||
|
|
||||
|
migrationBuilder.AddColumn<int>( |
||||
|
name: "ProductionLineType", |
||||
|
table: "Basedata_ProductionLine", |
||||
|
type: "int", |
||||
|
nullable: false, |
||||
|
defaultValue: 0); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "Configuration", |
||||
|
table: "Basedata_KittingDetail", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "ItemDesc1", |
||||
|
table: "Basedata_KittingDetail", |
||||
|
type: "nvarchar(1024)", |
||||
|
maxLength: 1024, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "LocationCode", |
||||
|
table: "Basedata_CustomerItem", |
||||
|
type: "nvarchar(64)", |
||||
|
maxLength: 64, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddPrimaryKey( |
||||
|
name: "PK_Basedata_ProductionLineItem", |
||||
|
table: "Basedata_ProductionLineItem", |
||||
|
column: "Id"); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropPrimaryKey( |
||||
|
name: "PK_Basedata_ProductionLineItem", |
||||
|
table: "Basedata_ProductionLineItem"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ArriveDate", |
||||
|
table: "Basedata_SplitPackingRec"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ContainerCode", |
||||
|
table: "Basedata_SplitPackingRec"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ExpireDate", |
||||
|
table: "Basedata_SplitPackingRec"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "FullBarcodeString", |
||||
|
table: "Basedata_SplitPackingRec"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "LabelStatus", |
||||
|
table: "Basedata_SplitPackingRec"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "LocationErpCode", |
||||
|
table: "Basedata_SplitPackingRec"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "PlanArriveDate", |
||||
|
table: "Basedata_SplitPackingRec"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ProduceDate", |
||||
|
table: "Basedata_SplitPackingRec"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ProductionInfo_ProdLine", |
||||
|
table: "Basedata_SplitPackingRec"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ProductionInfo_Shift", |
||||
|
table: "Basedata_SplitPackingRec"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ProductionInfo_Team", |
||||
|
table: "Basedata_SplitPackingRec"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "PurchaseInfo_AsnNumber1", |
||||
|
table: "Basedata_SplitPackingRec"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "PurchaseInfo_PoNumber1", |
||||
|
table: "Basedata_SplitPackingRec"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "PurchaseInfo_RpNumber", |
||||
|
table: "Basedata_SplitPackingRec"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "PurchaseInfo_SupplierCode", |
||||
|
table: "Basedata_SplitPackingRec"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "QualityInfo_QLevel", |
||||
|
table: "Basedata_SplitPackingRec"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "QualityInfo_QualityFile", |
||||
|
table: "Basedata_SplitPackingRec"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "RecommendLocationCode", |
||||
|
table: "Basedata_SplitPackingRec"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "Specifications", |
||||
|
table: "Basedata_SplitPackingRec"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "SupplierBatch", |
||||
|
table: "Basedata_SplitPackingRec"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "SupplierItemCode", |
||||
|
table: "Basedata_SplitPackingRec"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "SupplierItemName", |
||||
|
table: "Basedata_SplitPackingRec"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "SupplierName", |
||||
|
table: "Basedata_SplitPackingRec"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "SupplierSimpleName", |
||||
|
table: "Basedata_SplitPackingRec"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ProductionLineType", |
||||
|
table: "Basedata_ProductionLine"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "Configuration", |
||||
|
table: "Basedata_KittingDetail"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ItemDesc1", |
||||
|
table: "Basedata_KittingDetail"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "LocationCode", |
||||
|
table: "Basedata_CustomerItem"); |
||||
|
|
||||
|
migrationBuilder.RenameColumn( |
||||
|
name: "ItemName", |
||||
|
table: "Basedata_KittingDetail", |
||||
|
newName: "Desc1"); |
||||
|
|
||||
|
migrationBuilder.RenameColumn( |
||||
|
name: "ItemDesc2", |
||||
|
table: "Basedata_KittingDetail", |
||||
|
newName: "Desc2"); |
||||
|
|
||||
|
migrationBuilder.RenameColumn( |
||||
|
name: "ItemCode", |
||||
|
table: "Basedata_KittingDetail", |
||||
|
newName: "PartCode"); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<string>( |
||||
|
name: "ProdLineCode", |
||||
|
table: "Basedata_ProductionLineItem", |
||||
|
type: "nvarchar(450)", |
||||
|
nullable: false, |
||||
|
oldClrType: typeof(string), |
||||
|
oldType: "nvarchar(max)"); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<string>( |
||||
|
name: "ItemCode", |
||||
|
table: "Basedata_ProductionLineItem", |
||||
|
type: "nvarchar(450)", |
||||
|
nullable: false, |
||||
|
oldClrType: typeof(string), |
||||
|
oldType: "nvarchar(max)"); |
||||
|
|
||||
|
migrationBuilder.AddPrimaryKey( |
||||
|
name: "PK_Basedata_ProductionLineItem", |
||||
|
table: "Basedata_ProductionLineItem", |
||||
|
column: "ProdLineCode"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Basedata_ProductionLineItem_ProdLineCode_ItemCode", |
||||
|
table: "Basedata_ProductionLineItem", |
||||
|
columns: new[] { "ProdLineCode", "ItemCode" }, |
||||
|
unique: true); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_Basedata_PositionCode_PartCode", |
||||
|
table: "Basedata_PositionCode", |
||||
|
column: "PartCode", |
||||
|
unique: true, |
||||
|
filter: "[PartCode] IS NOT NULL"); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,40 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.EventBus; |
||||
|
using Volo.Abp.Uow; |
||||
|
using Win_in.Sfs.Shared.Event; |
||||
|
using Win_in.Sfs.Wms.Store.Application.Contracts; |
||||
|
using Win_in.Sfs.Wms.Store.Domain; |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Store.Event.DataExchanges; |
||||
|
|
||||
|
public class CustomerProductionReturnNoteEventHandler |
||||
|
: StoreDataExchangeEventHandlerBase<CustomerProductionReturnNote> |
||||
|
, ILocalEventHandler<SfsCreatedEntityEventData<CustomerProductionReturnNote>> |
||||
|
, ILocalEventHandler<SfsCreatedEntityEventData<List<CustomerProductionReturnNote>>> |
||||
|
|
||||
|
{ |
||||
|
private const EnumExchangeDataType ExchangeDataType = EnumExchangeDataType.CustomerReturn; |
||||
|
|
||||
|
[UnitOfWork] |
||||
|
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<CustomerProductionReturnNote> eventData) |
||||
|
{ |
||||
|
var entity = eventData.Entity; |
||||
|
await AddExchangeDataAsync(entity).ConfigureAwait(false); |
||||
|
} |
||||
|
|
||||
|
[UnitOfWork] |
||||
|
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<List<CustomerProductionReturnNote>> eventData) |
||||
|
{ |
||||
|
var entities = eventData.Entity; |
||||
|
await AddExchangeDataAsync(entities).ConfigureAwait(false); |
||||
|
} |
||||
|
|
||||
|
protected override async Task AddExchangeDataAsync(List<CustomerProductionReturnNote> entities) |
||||
|
{ |
||||
|
var dtos = ObjectMapper.Map<List<CustomerProductionReturnNote>, List<CustomerReturnNoteDTO>>(entities); |
||||
|
var exchangeData = await BuildExchangeDataAsync(StoreEventConsts.WMS, StoreEventConsts.ERP, ExchangeDataType, dtos).ConfigureAwait(false); |
||||
|
await AddManyAsync(exchangeData).ConfigureAwait(false); |
||||
|
} |
||||
|
|
||||
|
} |
Loading…
Reference in new issue