Browse Source

测试差一点

dev_DY_CC
刘云峰 1 year ago
parent
commit
9d1742da2a
  1. 4
      be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/StoreHttpApiHostModule.cs
  2. 1
      be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/Win_in.Sfs.Wms.Store.HttpApi.Host.csproj
  3. 26
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/DTOs/TransferLibRequestDTO.cs
  4. 26
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/DTOs/TransferLibRequestDetailDTO.cs
  5. 25
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/Inputs/TransferLibRequestDetailInput.cs
  6. 27
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/Inputs/TransferLibRequestEditInput.cs
  7. 4
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Bases/SfsJobAppServiceBase.cs
  8. 4
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferLibNotes/ITransferLibCallback.cs
  9. 4
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Bases/SfsStoreManagerBase.cs
  10. 1
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/TransferLibRequestDetail.cs
  11. 27363
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240403071320_transferLib_3temp.Designer.cs
  12. 454
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240403071320_transferLib_3temp.cs
  13. 1112
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs
  14. 3
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/TransferLibRequestAutoMapperProfile.cs
  15. 10
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/TransferLibRequestEventHandler.cs

4
be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/StoreHttpApiHostModule.cs

@ -19,6 +19,7 @@ using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.Swashbuckle;
using Volo.Abp.TenantManagement.EntityFrameworkCore;
using Volo.Abp.VirtualFileSystem;
using Win_in.Sfs.Auth;
using Win_in.Sfs.Basedata.Application.Contracts;
@ -77,7 +78,8 @@ namespace Win_in.Sfs.Wms.Store;
typeof(BasedataApplicationContractsModule),
typeof(FileStorageApplicationContractsModule),
typeof(MessageApplicationContractsModule),
typeof(LabelApplicationContractsModule)
typeof(LabelApplicationContractsModule),
typeof(AbpTenantManagementEntityFrameworkCoreModule)
)]
public class StoreHttpApiHostModule : ModuleBase<StoreHttpApiHostModule>
{

1
be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/Win_in.Sfs.Wms.Store.HttpApi.Host.csproj

@ -30,6 +30,7 @@
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="5.3.5" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="5.3.5" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="5.3.5" />
<PackageReference Include="Volo.Abp.TenantManagement.EntityFrameworkCore" Version="5.3.5" />
</ItemGroup>
<ItemGroup>

26
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/DTOs/TransferLibRequestDTO.cs

@ -20,4 +20,30 @@ public class TransferLibRequestDTO : SfsStoreRequestDTOBase<TransferLibRequestDe
[Display(Name = "使用中间库")]
public bool UseOnTheWayLocation { get; set; }
#region 回调服务相关
/// <summary>
/// 回调服务名称
/// </summary>
[Display(Name = "回调服务名称")]
public string CallServerName { get; set; }
/// <summary>
/// 回调业务类型
/// </summary>
[Display(Name = "回调业务类型")]
public string CallBusinessType { get; set; }
/// <summary>
/// 调用者传入申请单号
/// </summary>
[Display(Name = "传入申请单号")]
public string CallRequestNumber { get; set; }
/// <summary>
/// 调用者传入任务单号
/// </summary>
[Display(Name = "传入任务单号")]
public string CallJobNumber { get; set; }
#endregion
}

26
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/DTOs/TransferLibRequestDetailDTO.cs

@ -20,4 +20,30 @@ public class TransferLibRequestDetailDTO : SfsStoreDetailWithFromToDTOBase
/// </summary>
public EnumJobStatus JobStatus { get; set; }
#region 回调服务相关
/// <summary>
/// 回调服务名称
/// </summary>
[Display(Name = "回调服务名称")]
public string CallServerName { get; set; }
/// <summary>
/// 回调业务类型
/// </summary>
[Display(Name = "回调业务类型")]
public string CallBusinessType { get; set; }
/// <summary>
/// 调用者传入申请单号
/// </summary>
[Display(Name = "传入申请单号")]
public string CallRequestNumber { get; set; }
/// <summary>
/// 调用者传入任务单号
/// </summary>
[Display(Name = "传入任务单号")]
public string CallJobNumber { get; set; }
#endregion
}

25
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/Inputs/TransferLibRequestDetailInput.cs

@ -21,5 +21,30 @@ public class TransferLibRequestDetailInput : SfsStoreDetailWithFromToInputBase
/// </summary>
public EnumJobStatus JobStatus { get; set; }
#region 回调服务相关
/// <summary>
/// 回调服务名称
/// </summary>
[Display(Name = "回调服务名称")]
public string CallServerName { get; set; }
/// <summary>
/// 回调业务类型
/// </summary>
[Display(Name = "回调业务类型")]
public string CallBusinessType { get; set; }
/// <summary>
/// 调用者传入申请单号
/// </summary>
[Display(Name = "传入申请单号")]
public string CallRequestNumber { get; set; }
/// <summary>
/// 调用者传入任务单号
/// </summary>
[Display(Name = "传入任务单号")]
public string CallJobNumber { get; set; }
#endregion
}

27
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/Inputs/TransferLibRequestEditInput.cs

@ -37,4 +37,31 @@ public class TransferLibRequestEditInput : SfsStoreRequestCreateOrUpdateInputBas
[Display(Name = "明细列表")]
public List<TransferLibRequestDetailInput> Details { get; set; }
#endregion
#region 回调服务相关
/// <summary>
/// 回调服务名称
/// </summary>
[Display(Name = "回调服务名称")]
public string CallServerName { get; set; }
/// <summary>
/// 回调业务类型
/// </summary>
[Display(Name = "回调业务类型")]
public string CallBusinessType { get; set; }
/// <summary>
/// 调用者传入申请单号
/// </summary>
[Display(Name = "传入申请单号")]
public string CallRequestNumber { get; set; }
/// <summary>
/// 调用者传入任务单号
/// </summary>
[Display(Name = "传入任务单号")]
public string CallJobNumber { get; set; }
#endregion
}

4
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Bases/SfsJobAppServiceBase.cs

@ -153,12 +153,12 @@ public abstract class SfsJobAppServiceBase<TEntity, TDetail, TEntityDto, TReques
[UnitOfWork]
public virtual async Task<TEntityDto> CompleteAsync(Guid id, TEntityDto dto)
{
var handleEntity = ObjectMapper.Map<TEntityDto, TEntity>(dto);
var job= await _repository.GetAsync(id).ConfigureAwait(false);
var job = await _repository.GetAsync(id).ConfigureAwait(false);
if (job.JobStatus is EnumJobStatus.Closed or EnumJobStatus.Cancelled or EnumJobStatus.None or EnumJobStatus.Done)//需要考虑下 多次提交的问题 所以不判断 进行中
{
throw new UserFriendlyException($"任务状态错误:编号为【{job.Number}】的任务已经【{job.JobStatus.GetDisplayName()}】");
}
var handleEntity = ObjectMapper.Map<TEntityDto, TEntity>(dto);
var handleResult = await _jobManager.CompleteAsync(handleEntity, CurrentUser).ConfigureAwait(false);
var handleDto = ObjectMapper.Map<TEntity, TEntityDto>(handleResult);

4
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/ITransferLibCallback.cs → be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferLibNotes/ITransferLibCallback.cs

@ -12,6 +12,10 @@ public interface ITransferLibCallback
public class TestTransferLibCallback : ITransferLibCallback
{
public TestTransferLibCallback()
{
}
public Tuple<bool?, string> DoTransferLibCallback(string businessType, string requestNum, string jobNum)
{
return Tuple.Create<bool?, string>(true, "调用新移库回调方法成功!");

4
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Bases/SfsStoreManagerBase.cs

@ -85,7 +85,9 @@ public abstract class SfsStoreManagerBase<TEntity, TDetailEntity>
public virtual async Task<TEntity> GetByNumberAsync(string number)
{
return await Repository.FindAsync(p => p.Number == number).ConfigureAwait(false);
//return await Repository.FindAsync(p => p.Number == number).ConfigureAwait(false);
var ret = await Repository.FirstOrDefaultAsync(itm => itm.Number == number).ConfigureAwait(false);
return ret;
}
[UnitOfWork]

1
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/TransferLibRequestDetail.cs

@ -7,7 +7,6 @@ namespace Win_in.Sfs.Wms.Store.Domain;
/// </summary>
public class TransferLibRequestDetail : SfsStoreDetailWithFromToEntityBase
{
/// <summary>
/// 原因代码
/// </summary>

27363
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240403071320_transferLib_3temp.Designer.cs

File diff suppressed because it is too large

454
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240403071320_transferLib_3temp.cs

@ -0,0 +1,454 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Win_in.Sfs.Wms.Store.Migrations
{
public partial class transferLib_3temp : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "PreparationPlanNumber",
table: "Store_InjectionRequest");
migrationBuilder.DropColumn(
name: "Workshop",
table: "Store_InjectionRequest");
migrationBuilder.AddColumn<string>(
name: "JobNumber",
table: "Store_ProductRecycleNote",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<decimal>(
name: "ExecutedQty",
table: "Job_ProductRecycleJobDetail",
type: "decimal(18,6)",
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn<string>(
name: "RequestNumber",
table: "Job_ProductRecycleJob",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.CreateTable(
name: "Job_AssembleJob",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RequestType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ProdLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
AssembleRequestNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Workshop = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
UseOnTheWayLocation = table.Column<bool>(type: "bit", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Remark = table.Column<string>(type: "nvarchar(3072)", maxLength: 3072, nullable: true),
Worker = table.Column<string>(type: "nvarchar(max)", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
UpStreamJobNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
JobDescription = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true),
JobType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
JobStatus = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Priority = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
PriorityIncrement = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
WorkGroupCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
IsAutoComplete = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
AcceptUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
AcceptUserName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
AcceptTime = table.Column<DateTime>(type: "datetime2", nullable: true),
CompleteUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CompleteUserName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CompleteTime = table.Column<DateTime>(type: "datetime2", nullable: true),
WarehouseCode = table.Column<string>(type: "nvarchar(max)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Job_AssembleJob", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Store_AssembleNote",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
JobNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Workshop = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RequestNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RequestType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
UseOnTheWayLocation = table.Column<bool>(type: "bit", nullable: false),
ConfirmTime = table.Column<DateTime>(type: "datetime2", nullable: true),
Confirmed = table.Column<bool>(type: "bit", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Remark = table.Column<string>(type: "nvarchar(3072)", maxLength: 3072, nullable: true),
Worker = table.Column<string>(type: "nvarchar(max)", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ActiveDate = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Store_AssembleNote", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Store_AssembleRequest",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Type = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ProdLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
UseOnTheWayLocation = table.Column<bool>(type: "bit", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Remark = table.Column<string>(type: "nvarchar(3072)", maxLength: 3072, nullable: true),
Worker = table.Column<string>(type: "nvarchar(max)", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ActiveDate = table.Column<DateTime>(type: "datetime2", nullable: false),
AutoSubmit = table.Column<bool>(type: "bit", nullable: false),
AutoAgree = table.Column<bool>(type: "bit", nullable: false),
AutoHandle = table.Column<bool>(type: "bit", nullable: false),
AutoCompleteJob = table.Column<bool>(type: "bit", nullable: false),
DirectCreateNote = table.Column<bool>(type: "bit", nullable: false),
RequestStatus = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Store_AssembleRequest", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Job_AssembleJobDetail",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RequestLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ToLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ToLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ToLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ToLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ToWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
OnTheWayLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ProdLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
WorkStation = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ExpiredTime = table.Column<DateTime>(type: "datetime2", nullable: false),
Operation = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
DistributionType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
TruncType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
RoundedQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
PlannedSplitRule = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
PlanBeginTime = table.Column<DateTime>(type: "datetime2", nullable: false),
DeliveryQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
PositionCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Remark = table.Column<string>(type: "nvarchar(3072)", maxLength: 3072, nullable: true),
ItemName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ItemDesc1 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ItemDesc2 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ItemCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
StdPackQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
Status = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
RecommendContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendSupplierBatch = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false),
RecommendProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false),
RecommendExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false),
RecommendLot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendFromLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendFromLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendFromLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendFromLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendFromWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Uom = table.Column<string>(type: "nvarchar(max)", nullable: true),
RecommendQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
HandledContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledSupplierBatch = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false),
HandledProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false),
HandledExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false),
HandledLot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledFromLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledFromLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledFromLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledFromLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledFromWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Job_AssembleJobDetail", x => x.Id);
table.ForeignKey(
name: "FK_Job_AssembleJobDetail_Job_AssembleJob_MasterID",
column: x => x.MasterID,
principalTable: "Job_AssembleJob",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Store_AssembleNoteDetail",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IssueTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ExpiredTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ProdLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
WorkStation = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
OnTheWayLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
PositionCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Remark = table.Column<string>(type: "nvarchar(3072)", maxLength: 3072, nullable: true),
ItemName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ItemDesc1 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ItemDesc2 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ItemCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Uom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Qty = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false),
StdPackQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
FromPackingCode = table.Column<string>(type: "nvarchar(450)", nullable: true),
ToPackingCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
FromContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
ToContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
FromLot = table.Column<string>(type: "nvarchar(max)", nullable: true),
ToLot = table.Column<string>(type: "nvarchar(max)", nullable: true),
SupplierBatch = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false),
ProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false),
ExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false),
FromLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
FromLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
FromLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
FromLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
FromWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
FromStatus = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ToLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ToLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ToLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ToLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ToWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ToStatus = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
RecommendContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendSupplierBatch = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false),
RecommendProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false),
RecommendExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false),
RecommendLot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendFromLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendFromLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendFromLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendFromLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendFromWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false),
HandledContainerCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledPackingCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledSupplierBatch = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false),
HandledProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false),
HandledExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false),
HandledLot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledFromLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledFromLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledFromLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledFromLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledFromWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
HandledQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Store_AssembleNoteDetail", x => x.Id);
table.ForeignKey(
name: "FK_Store_AssembleNoteDetail_Store_AssembleNote_MasterID",
column: x => x.MasterID,
principalTable: "Store_AssembleNote",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Store_AssembleRequestDetail",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ToLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ToLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ToLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ToLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ToWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
FromLocationArea = table.Column<string>(type: "nvarchar(max)", nullable: true),
ProdLine = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
WorkStation = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ExpiredTime = table.Column<DateTime>(type: "datetime2", nullable: false),
IssuedQty = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false),
ReceivedQty = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false),
Status = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
PositionCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
RecommendType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Remark = table.Column<string>(type: "nvarchar(3072)", maxLength: 3072, nullable: true),
ItemName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ItemDesc1 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ItemDesc2 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ItemCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Uom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Qty = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false),
StdPackQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Store_AssembleRequestDetail", x => x.Id);
table.ForeignKey(
name: "FK_Store_AssembleRequestDetail_Store_AssembleRequest_MasterID",
column: x => x.MasterID,
principalTable: "Store_AssembleRequest",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_Job_AssembleJob_Number",
table: "Job_AssembleJob",
column: "Number",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_Job_AssembleJobDetail_MasterID",
table: "Job_AssembleJobDetail",
column: "MasterID");
migrationBuilder.CreateIndex(
name: "IX_Store_AssembleNote_Number",
table: "Store_AssembleNote",
column: "Number",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_Store_AssembleNoteDetail_FromPackingCode",
table: "Store_AssembleNoteDetail",
column: "FromPackingCode");
migrationBuilder.CreateIndex(
name: "IX_Store_AssembleNoteDetail_MasterID",
table: "Store_AssembleNoteDetail",
column: "MasterID");
migrationBuilder.CreateIndex(
name: "IX_Store_AssembleNoteDetail_Number_FromPackingCode_FromLocationCode_ToLocationCode",
table: "Store_AssembleNoteDetail",
columns: new[] { "Number", "FromPackingCode", "FromLocationCode", "ToLocationCode" },
unique: true,
filter: "[FromPackingCode] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_Store_AssembleRequest_Number",
table: "Store_AssembleRequest",
column: "Number",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_Store_AssembleRequestDetail_ItemCode",
table: "Store_AssembleRequestDetail",
column: "ItemCode");
migrationBuilder.CreateIndex(
name: "IX_Store_AssembleRequestDetail_MasterID",
table: "Store_AssembleRequestDetail",
column: "MasterID");
migrationBuilder.CreateIndex(
name: "IX_Store_AssembleRequestDetail_Number_ItemCode_ToLocationCode",
table: "Store_AssembleRequestDetail",
columns: new[] { "Number", "ItemCode", "ToLocationCode" },
unique: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Job_AssembleJobDetail");
migrationBuilder.DropTable(
name: "Store_AssembleNoteDetail");
migrationBuilder.DropTable(
name: "Store_AssembleRequestDetail");
migrationBuilder.DropTable(
name: "Job_AssembleJob");
migrationBuilder.DropTable(
name: "Store_AssembleNote");
migrationBuilder.DropTable(
name: "Store_AssembleRequest");
migrationBuilder.DropColumn(
name: "JobNumber",
table: "Store_ProductRecycleNote");
migrationBuilder.DropColumn(
name: "ExecutedQty",
table: "Job_ProductRecycleJobDetail");
migrationBuilder.DropColumn(
name: "RequestNumber",
table: "Job_ProductRecycleJob");
migrationBuilder.AddColumn<string>(
name: "PreparationPlanNumber",
table: "Store_InjectionRequest",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Workshop",
table: "Store_InjectionRequest",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
}
}
}

1112
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs

File diff suppressed because it is too large

3
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/TransferLibRequestAutoMapperProfile.cs

@ -25,12 +25,13 @@ public partial class StoreEventAutoMapperProfile : Profile
.IgnoreAuditedObjectProperties()
.ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.Number))
.ForMember(x => x.Confirmed, y => y.MapFrom(d => !d.UseOnTheWayLocation))
.ForMember(dest => dest.Details, option => option.MapFrom(src => src.Details))
.Ignore(x => x.ConfirmTime)
.Ignore(x => x.JobNumber)
.Ignore(x => x.Number)
.Ignore(x => x.Id)
.Ignore(x => x.WarehouseCode)
.Ignore(x => x.Details)
//.Ignore(x => x.Details)
.Ignore(x => x.IsAutoComplete)
.Ignore(x => x.JobType)
.Ignore(x => x.JobDescription)

10
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/TransferLibRequestEventHandler.cs

@ -106,11 +106,11 @@ public class TransferLibRequestEventHandler
[UnitOfWork]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<TransferLibRequest> eventData)
{
var entity = eventData.Entity;
if (entity.AutoSubmit)
{
await _transferLibRequestManager.SubmitAsync(entity).ConfigureAwait(false);
}
//var entity = eventData.Entity;
//if (entity.AutoSubmit)
//{
// await _transferLibRequestManager.SubmitAsync(entity).ConfigureAwait(false);
//}
}
/// <summary>

Loading…
Cancel
Save