diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/UnplannedReceiptJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/UnplannedReceiptJobController.cs
index 22bf2370e..b63dbf140 100644
--- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/UnplannedReceiptJobController.cs
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/UnplannedReceiptJobController.cs
@@ -217,9 +217,9 @@ public class UnplannedReceiptJobController : AbpController
///
///
[HttpPost("finish/{id}")]
- public virtual async Task FinishAsync(Guid id, [FromBody] UnplannedReceiptJobDTO dto)
+ public virtual async Task FinishAsync(string jobNumber,string worker,List list)
{
- await _unplannedReceiptJobAppService.CompleteAsync(id, dto).ConfigureAwait(false);
+ await _unplannedReceiptJobAppService.DoByFreeAsync(jobNumber,worker,list).ConfigureAwait(false);
}
///
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/DTOs/UnplannedReceiptJobDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/DTOs/UnplannedReceiptJobDTO.cs
index b45beb94e..f6ade924b 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/DTOs/UnplannedReceiptJobDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/DTOs/UnplannedReceiptJobDTO.cs
@@ -6,45 +6,110 @@ using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
///
-/// 非生产领料任务
+/// 非生产领料任务
///
[Display(Name = "非生产领料任务")]
public class UnplannedReceiptJobDTO : SfsJobDTOBase
{
///
- /// 非生产领料申请单号
+ /// 非生产领料申请单号
///
[Display(Name = "非生产领料申请单号")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string UnplannedReceiptRequestNumber { get; set; }
- [Display(Name = "退料类别")]
- public EnumUnplannedReceiptType UnplannedReceiptType { get; set; }
+ [Display(Name = "退料类别")] public EnumUnplannedReceiptType UnplannedReceiptType { get; set; }
+
///
- /// 部门代码
+ /// 部门代码
///
[Display(Name = "部门代码")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string DeptCode { get; set; }
///
- /// 部门名称
+ /// 部门名称
///
[Display(Name = "部门名称")]
[StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string DeptName { get; set; }
-
///
- /// 建档日
+ /// 建档日
///
[Display(Name = "建档日")]
public DateTime BuildDate { get; set; }
+
///
- /// OA单据号
+ /// OA单据号
///
[Display(Name = "OA单据号")]
[StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string OANumber { get; set; }
+ ///
+ /// 原因代码
+ ///
+ [Display(Name = "原因代码")]
+ public string ReasonCode { get; set; }
+
+ ///
+ /// 专案
+ ///
+ [Display(Name = "专案")]
+ public string CaseCode { get; set; }
+
+ ///
+ /// 项目分类
+ ///
+ [Display(Name = "项目分类")]
+ public string ProjCapacityCode { get; set; }
+
+ ///
+ /// 次交易码
+ ///
+ [Display(Name = "次交易码")]
+ public string OnceBusiCode { get; set; }
+
+ ///
+ /// 说明
+ ///
+ [Display(Name = "说明")]
+ public string Explain { get; set; }
+
+ ///
+ /// ERP料号
+ ///
+ [Display(Name = "ERP料号")]
+ public string ItemCode { get; set; }
+
+ ///
+ /// 物品名称
+ ///
+ [Display(Name = "物品名称")]
+ public string ItemName { get; set; }
+
+ ///
+ /// 物品描述1
+ ///
+ [Display(Name = "物品描述1")]
+ public string ItemDesc1 { get; set; }
+
+ ///
+ /// 物品描述2
+ ///
+ [Display(Name = "物品描述2")]
+ public string ItemDesc2 { get; set; }
+
+ ///
+ /// ERP储位
+ ///
+ [Display(Name = "ERP储位")]
+ public string FromErpLocationCode { get; set; }
+
+ ///
+ /// 数量
+ ///
+ [Display(Name = "数量")]
+ public decimal Qty { get; set; }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/DTOs/UnplannedReceiptJobDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/DTOs/UnplannedReceiptJobDetailDTO.cs
index 6aab85cab..0a4a73a71 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/DTOs/UnplannedReceiptJobDetailDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/DTOs/UnplannedReceiptJobDetailDTO.cs
@@ -1,47 +1,13 @@
-using DocumentFormat.OpenXml.Wordprocessing;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Data;
-using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class UnplannedReceiptJobDetailDTO : SfsJobRecommendToDetailDTOBase
{
///
- /// 原因代码
- ///
- [Display(Name = "原因代码")]
- public string ReasonCode { get; set; }
-
- ///
- /// 专案
- ///
- [Display(Name = "专案")]
- public string CaseCode { get; set; }
-
- ///
- /// 项目分类
- ///
- [Display(Name = "项目分类")]
- public string ProjCapacityCode { get; set; }
-
- ///
- /// 次交易码
- ///
- [Display(Name = "次交易码")]
- public string OnceBusiCode { get; set; }
-
- ///
- /// 扩展属性
+ /// 扩展属性
///
[Display(Name = "扩展属性")]
- public ExtraPropertyDictionary ExtraProperties { get; set; } = new ExtraPropertyDictionary();
-
- ///
- /// 说明
- ///
- [Display(Name = "说明")]
- public string Explain { get; set; }
-
-
+ public ExtraPropertyDictionary ExtraProperties { get; set; } = new();
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/IUnplannedReceiptJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/IUnplannedReceiptJobAppService.cs
index c41bea8e3..d0f3daa2d 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/IUnplannedReceiptJobAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/IUnplannedReceiptJobAppService.cs
@@ -1,4 +1,6 @@
+using System.Collections.Generic;
using System.Threading.Tasks;
+using Volo.Abp;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@@ -6,4 +8,26 @@ public interface IUnplannedReceiptJobAppService
: ISfsJobAppServiceBase
{
Task CancelByRequestNumberAsync(string number);
+
+ ///
+ /// 根据储位任意退料
+ ///
+ ///
+ Task CreateByFreeAsync(UnplannedReceiptRequestDTO requestDto);
+
+ ///
+ /// 执行任务储位任意退料
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ Task DoByFreeAsync(string jobNumber,string worker,List detailDtos);
+
+ ///
+ ///
+ ///
+ ///
+ Task IsAllJobOverByRequestNumberAsync(string requestNumber);
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/Inputs/UnplannedReceiptJobDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/Inputs/UnplannedReceiptJobDetailInput.cs
index 5c43f7c65..5b7a3b980 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/Inputs/UnplannedReceiptJobDetailInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/Inputs/UnplannedReceiptJobDetailInput.cs
@@ -1,45 +1,13 @@
-namespace Win_in.Sfs.Wms.Store.Application.Contracts;
-
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Data;
-using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
+
+namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class UnplannedReceiptJobDetailInput : SfsJobRecommendToDetailInputBase, IHasExtraProperties
{
///
- /// 原因代码
- ///
- [Display(Name = "原因代码")]
- public string ReasonCode { get; set; }
-
- ///
- /// 专案
- ///
- [Display(Name = "专案")]
- public string CaseCode { get; set; }
-
- ///
- /// 项目分类
- ///
- [Display(Name = "项目分类")]
- public string ProjCapacityCode { get; set; }
-
- ///
- /// 次交易码
- ///
- [Display(Name = "次交易码")]
- public string OnceBusiCode { get; set; }
-
- ///
- /// 扩展属性
+ /// 扩展属性
///
[Display(Name = "扩展属性")]
- public ExtraPropertyDictionary ExtraProperties { get; set; } = new ExtraPropertyDictionary();
-
-
- ///
- /// 说明
- ///
- [Display(Name = "说明")]
- public string Explain { get; set; }
+ public ExtraPropertyDictionary ExtraProperties { get; set; } = new();
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/Inputs/UnplannedReceiptJobEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/Inputs/UnplannedReceiptJobEditInput.cs
index bed75f30f..83b2ad5ee 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/Inputs/UnplannedReceiptJobEditInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/UnplannedReceiptJobs/Inputs/UnplannedReceiptJobEditInput.cs
@@ -7,11 +7,11 @@ using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
-public class UnplannedReceiptJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCreateInput
+public class UnplannedReceiptJobEditInput : SfsJobCreateUpdateInputBase,
+ ISfsJobCreateInput
{
- #region Create
///
- /// 要货单号
+ /// 要货单号
///
[Display(Name = "要货单号")]
[Required(ErrorMessage = "{0}是必填项")]
@@ -19,59 +19,123 @@ public class UnplannedReceiptJobEditInput : SfsJobCreateUpdateInputBase, ISfsJob
public string UnplannedReceiptRequestNumber { get; set; }
///
- /// 部门代码
+ /// 部门代码
///
[Display(Name = "部门代码")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string DeptCode { get; set; }
///
- /// 部门名称
+ /// 部门名称
///
[Display(Name = "部门名称")]
[StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string DeptName { get; set; }
///
- /// 建档日
+ /// 建档日
///
[Display(Name = "建档日")]
public DateTime BuildDate { get; set; }
///
- /// 任务类型
+ /// 任务类型
///
[Display(Name = "任务类型")]
[Required(ErrorMessage = "{0}是必填项")]
public EnumJobType JobType { get; set; }
///
- /// 是否自动完成
+ /// 是否自动完成
///
[Display(Name = "是否自动完成")]
[Required(ErrorMessage = "{0}是必填项")]
public bool IsAutoComplete { get; set; }
///
- /// 上游任务单号
+ /// 上游任务单号
///
[Display(Name = "上游任务单号")]
public string UpStreamJobNumber { get; set; }
///
- /// 任务明细
+ /// 任务明细
///
[Display(Name = "任务明细")]
[Required(ErrorMessage = "{0}是必填项")]
public List Details { get; set; }
- #endregion
- [Display(Name = "退料类别", Order = 0)]
- public EnumUnplannedReceiptType UnplannedReceiptType { get; set; }
+ [Display(Name = "退料类别", Order = 0)] public EnumUnplannedReceiptType UnplannedReceiptType { get; set; }
///
- /// OA单据号
+ /// OA单据号
///
[Display(Name = "OA单据号")]
public string OANumber { get; set; }
+
+ ///
+ /// 原因代码
+ ///
+ [Display(Name = "原因代码")]
+ public string ReasonCode { get; set; }
+
+ ///
+ /// 专案
+ ///
+ [Display(Name = "专案")]
+ public string CaseCode { get; set; }
+
+ ///
+ /// 项目分类
+ ///
+ [Display(Name = "项目分类")]
+ public string ProjCapacityCode { get; set; }
+
+ ///
+ /// 次交易码
+ ///
+ [Display(Name = "次交易码")]
+ public string OnceBusiCode { get; set; }
+
+ ///
+ /// 说明
+ ///
+ [Display(Name = "说明")]
+ public string Explain { get; set; }
+
+ ///
+ /// ERP料号
+ ///
+ [Display(Name = "ERP料号")]
+ public string ItemCode { get; set; }
+
+ ///
+ /// 物品名称
+ ///
+ [Display(Name = "物品名称")]
+ public string ItemName { get; set; }
+
+ ///
+ /// 物品描述1
+ ///
+ [Display(Name = "物品描述1")]
+ public string ItemDesc1 { get; set; }
+
+ ///
+ /// 物品描述2
+ ///
+ [Display(Name = "物品描述2")]
+ public string ItemDesc2 { get; set; }
+
+ ///
+ /// ERP储位
+ ///
+ [Display(Name = "ERP储位")]
+ public string FromErpLocationCode { get; set; }
+
+ ///
+ /// 数量
+ ///
+ [Display(Name = "数量")]
+ public decimal Qty { get; set; }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedReceiptRequests/DTOs/UnplannedReceiptRequestDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedReceiptRequests/DTOs/UnplannedReceiptRequestDetailDTO.cs
index 777dd9a17..0c7d0d23d 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedReceiptRequests/DTOs/UnplannedReceiptRequestDetailDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedReceiptRequests/DTOs/UnplannedReceiptRequestDetailDTO.cs
@@ -48,5 +48,5 @@ public class UnplannedReceiptRequestDetailDTO
/// 储位
///
[Display(Name = "储位")]
- public string ErpLocationCode { get; set; }
+ public string FromErpLocationCode { get; set; }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedReceiptRequests/IUnplannedReceiptRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedReceiptRequests/IUnplannedReceiptRequestAppService.cs
index f618eeecd..08876468d 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedReceiptRequests/IUnplannedReceiptRequestAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedReceiptRequests/IUnplannedReceiptRequestAppService.cs
@@ -6,4 +6,5 @@ public interface IUnplannedReceiptRequestAppService
: ISfsStoreRequestMasterAppServiceBase
{
Task CreateByOAAsync(UnplannedReceiptRequestEditInput input);
+ Task UpdateStatusByJobAsync(string requestNumber);
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedReceiptRequests/Inputs/UnplannedReceiptRequestDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedReceiptRequests/Inputs/UnplannedReceiptRequestDetailInput.cs
index 0838024e7..9d8063ca0 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedReceiptRequests/Inputs/UnplannedReceiptRequestDetailInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedReceiptRequests/Inputs/UnplannedReceiptRequestDetailInput.cs
@@ -41,5 +41,5 @@ public class UnplannedReceiptRequestDetailInput : SfsStoreDetailWithLotPackingQt
/// 储位
///
[Display(Name = "储位")]
- public string ErpLocationCode { get; set; }
+ public string FromErpLocationCode { get; set; }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedReceiptRequests/Inputs/UnplannedReceiptRequestImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedReceiptRequests/Inputs/UnplannedReceiptRequestImportInput.cs
index bf86d2508..47af3ed0b 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedReceiptRequests/Inputs/UnplannedReceiptRequestImportInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/UnplannedReceiptRequests/Inputs/UnplannedReceiptRequestImportInput.cs
@@ -68,12 +68,6 @@ public class UnplannedReceiptRequestImportInput : SfsStoreImportInputBase
[ExporterHeader(IsIgnore = true)]
public string WarehouseCode { get; set; }
- ///
- /// 说明
- ///
- //[Display(Name = "说明2")]
- //public string Remark { get; set; }
-
///
/// 说明
///
@@ -85,5 +79,6 @@ public class UnplannedReceiptRequestImportInput : SfsStoreImportInputBase
/// 储位
///
[Display(Name = "储位")]
- public string ErpLocationCode { get; set; }
+ [Required(ErrorMessage = "储位不能为空")]
+ public string FromErpLocationCode { get; set; }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedReceiptJobs/UnplannedReceiptJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedReceiptJobs/UnplannedReceiptJobAppService.cs
index 10b775088..3ea3af4ff 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedReceiptJobs/UnplannedReceiptJobAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/UnplannedReceiptJobs/UnplannedReceiptJobAppService.cs
@@ -1,3 +1,4 @@
+using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
@@ -21,6 +22,8 @@ using Castle.Components.DictionaryAdapter;
using Irony;
using Win_in.Sfs.Basedata.Application.Contracts;
+using Win_in.Sfs.Basedata.Domain;
+using Win_in.Sfs.Shared.Event;
using Win_in.Sfs.Wms.Inventory.Application.Contracts;
[Authorize]
@@ -30,22 +33,26 @@ public class UnplannedReceiptJobAppService
: SfsJobAppServiceBase,
IUnplannedReceiptJobAppService
{
+ protected IUnplannedReceiptRequestAppService UnplannedReceiptRequestAppService=>
+ LazyServiceProvider.LazyGetRequiredService();
private readonly IUnplannedReceiptJobManager _unplannedReceiptJobManager;
private readonly ILocationAppService _locationAppService;
private readonly IBalanceAppService _balanceAppService;
private readonly IExpectOutAppService _expectOutAppService;
+ private readonly IItemBasicAppService _itemBasicAppService;
public UnplannedReceiptJobAppService(
IUnplannedReceiptJobRepository repository, IUnplannedReceiptJobManager UnplannedReceiptJobManager,
ILocationAppService locationAppService,
IBalanceAppService balanceAppService,
- IExpectOutAppService expectOutAppService) : base(repository, UnplannedReceiptJobManager)
+ IExpectOutAppService expectOutAppService, IItemBasicAppService itemBasicAppService) : base(repository, UnplannedReceiptJobManager)
{
_unplannedReceiptJobManager = UnplannedReceiptJobManager;
_locationAppService = locationAppService;
_balanceAppService = balanceAppService;
_expectOutAppService = expectOutAppService;
+ _itemBasicAppService = itemBasicAppService;
}
@@ -71,27 +78,141 @@ public class UnplannedReceiptJobAppService
[HttpPost("create-by-free")]
public async Task CreateByFreeAsync(UnplannedReceiptRequestDTO requestDto)
{
- var jobs=await BuildUnplannedIssueJobAsync(requestDto).ConfigureAwait(false);
- await _repository.InsertManyAsync(jobs).ConfigureAwait(false);
+ var jobs=await BuildUnplannedReceiptJobAsync(requestDto).ConfigureAwait(false);
+ await CreateManyAsync(jobs).ConfigureAwait(false);
}
- private async Task> BuildUnplannedIssueJobAsync(UnplannedReceiptRequestDTO requestDto)
+ ///
+ /// 执行任务储位任意退料
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpPost("do-by-free")]
+ public async Task DoByFreeAsync(string jobNumber,string worker,List detailDtos)
+ {
+ var details = ObjectMapper.Map, List>(detailDtos);
+ var job=await _repository.FindAsync(p => p.Number == jobNumber).ConfigureAwait(false);
+ if (job == null)
+ {
+ throw new UserFriendlyException($"{jobNumber}【任务】不存在");
+ }
+
+ if (job.JobStatus != EnumJobStatus.Open)
+ {
+ throw new UserFriendlyException($"{jobNumber}【任务】不是【打开】状态");
+ }
+
+ if (detailDtos.Count(p => p.ItemCode != job.ItemCode)>0)
+ {
+ throw new UserFriendlyException("请确认ERP料号是否正确");
+ }
+
+ if (detailDtos.Sum(p => p.HandledQty) > job.Qty)
+ {
+ throw new UserFriendlyException("实际数量大于申请数量");
+ }
+
+ foreach (var detail in details)
+ {
+ var locationDto=await _locationAppService.GetByCodeAsync(detail.HandledToLocationCode).ConfigureAwait(false);
+ var itemBasicDto=await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false);
+
+ detail.HandledToLocationArea = locationDto.AreaCode;
+ detail.HandledToLocationErpCode = locationDto.ErpLocationCode;
+ detail.HandledToLocationGroup = locationDto.LocationGroupCode;
+ detail.HandledToLocationCode=locationDto.Code;
+ detail.Status = EnumInventoryStatus.OK;
+ detail.HandledArriveDate=DateTime.Now;
+ detail.HandledProduceDate = DateTime.Now;
+ detail.Uom = itemBasicDto.BasicUom;
+ detail.ItemName=itemBasicDto.Name;
+ detail.ItemDesc1 = itemBasicDto.Desc1;
+ detail.ItemDesc2 = itemBasicDto.Desc2;
+ detail.StdPackQty=itemBasicDto.StdPackQty;
+ #region 过期时间
+
+ if (itemBasicDto.ValidityUnit == EnumValidityUnit.Day)
+ {
+ detail.HandledExpireDate = detail.HandledArriveDate.AddDays(itemBasicDto.Validity);
+ }
+ else if (itemBasicDto.ValidityUnit == EnumValidityUnit.WeeK)
+ {
+ detail.HandledExpireDate = detail.HandledArriveDate.AddDays(itemBasicDto.Validity * 7);
+ }
+ else if (itemBasicDto.ValidityUnit == EnumValidityUnit.Month)
+ {
+ detail.HandledExpireDate = detail.HandledArriveDate.AddDays(itemBasicDto.Validity * 30);
+ }
+ else if (itemBasicDto.ValidityUnit == EnumValidityUnit.Infinite)
+ {
+ detail.HandledExpireDate = DateTime.MaxValue;
+ }
+
+ #endregion
+
+ if (locationDto.ErpLocationCode != job.FromErpLocationCode)
+ {
+ throw new UserFriendlyException($"库位【{locationDto.ErpLocationCode}】不在【{job.FromErpLocationCode}】储位下");
+ }
+
+ if (locationDto.Type == EnumLocationType.DimensionalStorehouse)
+ {
+ throw new UserFriendlyException("立库功能暂未开放");
+ }
+ }
+
+ job.Details = details;
+ job.CompleteUserName = worker;
+ job.JobStatus = EnumJobStatus.Done;
+ job =await _repository.UpdateAsync(job).ConfigureAwait(false);
+ await LocalEventBus.PublishAsync(new SfsCompletedEntityEventData(job), false).ConfigureAwait(false);
+ await UpdateRequestStatusAsync(job.UnplannedReceiptRequestNumber).ConfigureAwait(false);
+ }
+
+ ///
+ /// 构造任务Dto
+ ///
+ ///
+ ///
+ ///
+ private async Task> BuildUnplannedReceiptJobAsync(UnplannedReceiptRequestDTO requestDto)
{
- List jobs = new EditableList();
+ List jobs = new EditableList();
foreach (var requestDtoDetail in requestDto.Details)
{
- var locationDtos = await _locationAppService.GetListByErpLocationCodes(new List{ requestDtoDetail.ErpLocationCode }).ConfigureAwait(false);
- var job = new UnplannedReceiptJob();
+ var locationDtos = await _locationAppService.GetListByErpLocationCodes(new List{ requestDtoDetail.FromErpLocationCode }).ConfigureAwait(false);
+ var job = new UnplannedReceiptJobEditInput();
job.UnplannedReceiptRequestNumber = requestDto.Number;
job.JobType = EnumJobType.UnplannedReceiptJob;
job.JobStatus = EnumJobStatus.Open;
job.IsAutoComplete = false;
job.OANumber = requestDto.OANumber;
- job.Details = new List();
+ job.Details = new List();
job.WarehouseCode = requestDtoDetail.WarehouseCode;
- switch (locationDtos.First().Type)
+ job.CaseCode = requestDtoDetail.CaseCode;
+ job.Explain = requestDtoDetail.Explain;
+ job.OnceBusiCode = requestDtoDetail.OnceBusiCode;
+ job.ProjCapacityCode = requestDtoDetail.ProjCapacityCode;
+ job.ReasonCode = requestDtoDetail.ReasonCode;
+ job.ItemCode = requestDtoDetail.ItemCode;
+ job.ItemDesc1 = requestDtoDetail.ItemDesc1;
+ job.ItemDesc2 = requestDtoDetail.ItemDesc2;
+ job.ItemName = requestDtoDetail.ItemName;
+ job.FromErpLocationCode= requestDtoDetail.FromErpLocationCode;
+ job.DeptCode = requestDto.DeptCode;
+ job.DeptName = requestDto.DeptName;
+ job.Qty = requestDtoDetail.Qty;
+ if (locationDtos == null || locationDtos.Count < 1)
+ {
+ throw new UserFriendlyException($"该【{requestDtoDetail.FromErpLocationCode}】储位下没有库位");
+ }
+
+ switch(locationDtos.First().Type)
{
case EnumLocationType.RAW:
job.UnplannedReceiptType = EnumUnplannedReceiptType.Raw;
@@ -108,33 +229,41 @@ public class UnplannedReceiptJobAppService
break;
}
- var jobDetail = new UnplannedReceiptJobDetail();
- jobDetail.CaseCode = requestDtoDetail.CaseCode;
- jobDetail.Explain = requestDtoDetail.Explain;
- jobDetail.OnceBusiCode = requestDtoDetail.OnceBusiCode;
- jobDetail.ProjCapacityCode = requestDtoDetail.ProjCapacityCode;
- jobDetail.ReasonCode = requestDtoDetail.ReasonCode;
- jobDetail.ItemCode = requestDtoDetail.ItemCode;
- jobDetail.ItemDesc1 = requestDtoDetail.ItemDesc1;
- jobDetail.ItemDesc2 = requestDtoDetail.ItemDesc2;
- jobDetail.ItemName = requestDtoDetail.ItemName;
- job.Details.Add(jobDetail);
+ jobs.Add(job);
}
return jobs;
}
- private async Task> BuildExpectOutAsync(List balanceDtos)
- {
- return ObjectMapper.Map, List>(balanceDtos);
- }
-
///
/// 给立体库发送
///
///
+ [HttpPost("send-dimensional-storehouse")]
public async Task SendDimensionalStorehouseAsync()
{
throw new System.NotImplementedException();
}
+
+ private async Task UpdateRequestStatusAsync(string requestNumber)
+ {
+ await UnplannedReceiptRequestAppService.UpdateStatusByJobAsync(requestNumber).ConfigureAwait(false);
+ }
+
+ ///
+ /// 根据申请单号判断下面的任务是否都是完成或取消
+ ///
+ ///
+ [HttpPost("is-all-job-over-by-request-number")]
+ public async Task IsAllJobOverByRequestNumberAsync(string requestNumber)
+ {
+ var unplannedReceiptJobs=await _repository.GetListAsync(p=>p.UnplannedReceiptRequestNumber==requestNumber).ConfigureAwait(false);
+ if (unplannedReceiptJobs.Any(p =>
+ p.JobStatus == EnumJobStatus.Open || p.JobStatus == EnumJobStatus.Partial ||
+ p.JobStatus == EnumJobStatus.Doing || p.JobStatus == EnumJobStatus.Wait))
+ {
+ return false;
+ }
+ return true;
+ }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs
index 61968abcd..145b858b3 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CustomerProductionReturnNotes/CustomerProductionReturnNoteAppService.cs
@@ -92,8 +92,6 @@ public class CustomerProductionReturnNoteAppService :
itm.ToStatus=EnumInventoryStatus.OK;
itm.FromLocationArea = "OK";
itm.FromLocationErpCode= "OK";
- itm.FromLot = "";
- itm.FromPackingCode = "";
itm.FromWarehouseCode = "OK";
itm.FromLocationGroup = "OK";
itm.FromContainerCode = "OK";
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/UnplannedReceiptNotes/UnplannedReceiptNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/UnplannedReceiptNotes/UnplannedReceiptNoteAppService.cs
index 0bd57cfd9..e9c9e4f37 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/UnplannedReceiptNotes/UnplannedReceiptNoteAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/UnplannedReceiptNotes/UnplannedReceiptNoteAppService.cs
@@ -51,7 +51,6 @@ public class UnplannedReceiptNoteAppService :
var userName = await _userAppService.GetUserNameByUserAsync(input.Worker).ConfigureAwait(false);
entity.Details.Add(detail);
- entity.Worker = userName;
}
await _unplannedReceiptNoteManager.CreateAsync(entity).ConfigureAwait(false);
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestAppService.cs
index 43e8003e4..5fab4adbf 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestAppService.cs
@@ -57,4 +57,9 @@ public abstract class UnplannedReceiptRequestAppService :
var dto = ObjectMapper.Map(entity);
return dto;
}
+ [HttpPost("update-status-by-job")]
+ public virtual async Task UpdateStatusByJobAsync(string requestNumber)
+ {
+ throw new System.NotImplementedException();
+ }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestForDongyangAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestForDongyangAppService.cs
index a6f9205c6..fd318bf3b 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestForDongyangAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestForDongyangAppService.cs
@@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Volo.Abp;
using Volo.Abp.Data;
+using Volo.Abp.ObjectMapping;
using Win_in.Sfs.Auth.Application.Contracts;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Basedata.Domain;
@@ -24,27 +25,23 @@ namespace Win_in.Sfs.Wms.Store.Application;
public class UnplannedReceiptRequestForDongyangAppService : UnplannedReceiptRequestAppService
{
private readonly IDepartmentAppService _departmentApp;
- private readonly LocationManager _locationManager;
private readonly ILocationAppService _locationAppService;
private readonly IUnplannedReceiptRequestManager _unplannedReceiptRequestManager;
private readonly IBalanceAppService _balanceAppService;
- private new readonly IDictAclService DictAclService;
+ private readonly IUnplannedReceiptJobAppService _unplannedReceiptJobAppService;
public UnplannedReceiptRequestForDongyangAppService(IUnplannedReceiptRequestRepository repository,
IUnplannedReceiptRequestManager unplannedReceiptRequestManager,
IDepartmentAppService departmentApp,
- //LocationManager locationManager,
ILocationAppService locationAppService,
IBalanceAppService balanceAppService,
- IDictAclService dictAclService
- ) : base(repository, unplannedReceiptRequestManager)
+ IUnplannedReceiptJobAppService unplannedReceiptJobAppService) : base(repository, unplannedReceiptRequestManager)
{
_unplannedReceiptRequestManager = unplannedReceiptRequestManager;
_departmentApp = departmentApp;
- //_locationManager = locationManager;
_locationAppService = locationAppService;
_balanceAppService = balanceAppService;
- DictAclService = dictAclService;
+ _unplannedReceiptJobAppService = unplannedReceiptJobAppService;
}
///
/// OA创建计划外入库申请
@@ -65,19 +62,23 @@ public class UnplannedReceiptRequestForDongyangAppService : UnplannedReceiptRequ
entity.AutoAgree = true;
entity.AutoHandle = true;
entity.DirectCreateNote = false;
- //if (entity.UnplannedReceiptType == EnumUnplannedReceiptType.Wip)
- //{
- // entity.DirectCreateNote = true; //线边直接生成记录
- //}
- //else
- //{
- // entity.DirectCreateNote = false; //原料先生成任务、再生成记录
- //}
var res = await _unplannedReceiptRequestManager.CreateAsync(entity).ConfigureAwait(false);
var dto = ObjectMapper.Map(entity);
return dto;
}
+
+ [HttpPost("update-status-by-job")]
+ public override async Task UpdateStatusByJobAsync(string requestNumber)
+ {
+ var flag = await _unplannedReceiptJobAppService.IsAllJobOverByRequestNumberAsync(requestNumber).ConfigureAwait(false);
+ if (flag)
+ {
+ var unplannedReceiptRequest = await _repository.FindAsync(p => p.Number == requestNumber).ConfigureAwait(false);
+ await _repository.UpdateAsync(unplannedReceiptRequest).ConfigureAwait(false);
+ }
+ }
+
///
/// 用来重写 导入数据时可以加工数据
///
@@ -100,40 +101,6 @@ public class UnplannedReceiptRequestForDongyangAppService : UnplannedReceiptRequ
foreach (var detail in unplannedReceiptRequest.Details)
{
- if (unplannedReceiptRequest.UnplannedReceiptType == EnumUnplannedReceiptType.Raw)
- {
- var locationDto = await _locationAppService.GetByCodeAsync(detail.LocationCode).ConfigureAwait(false);
- if (locationDto.Type != EnumLocationType.RAW && locationDto.Type != EnumLocationType.SEMI && locationDto.Type != EnumLocationType.FG)
- {
- throw new UserFriendlyException($"【{detail.LocationCode}】库位类型错误," +
- $"不是{EnumLocationType.RAW.GetDisplayName()}" +
- $"或{EnumLocationType.SEMI.GetDisplayName()}】" +
- $"或{EnumLocationType.FG.GetDisplayName()}】");
- }
- // unplannedReceiptRequest.DirectCreateNote = false;
- //需要复制一个这个方法 去掉区域参数 换成库位参数
- //RecommendBalanceRequestInput input = new RecommendBalanceRequestInput();
- //input.ItemCode = detail.ItemCode;
- //input.Locations = new List() { detail.LocationCode };
- //await _balanceAppService.GetRecommendBalancesByLocationsAsync(input).ConfigureAwait(false);
- }
-
- if (unplannedReceiptRequest.UnplannedReceiptType == EnumUnplannedReceiptType.Wip)
- {
- var locationDto = await _locationAppService.GetByCodeAsync(detail.LocationCode).ConfigureAwait(false);
- if (locationDto.Type != EnumLocationType.WIP)
- {
- throw new UserFriendlyException($"【{detail.LocationCode}】库位类型错误," +
- $"不是{EnumLocationType.WIP.GetDisplayName()}");
- }
-
- //需要复制一个这个方法 去掉区域参数 换成库位参数
- //RecommendBalanceRequestInput input = new RecommendBalanceRequestInput();
- //input.ItemCode = detail.ItemCode;
- //input.Locations = new List() { detail.LocationCode };
- //await _balanceAppService.GetRecommendBalancesByLocationsAsync(input).ConfigureAwait(false);
- }
-
await SetDetailPropertiesAsync(detail).ConfigureAwait(false);
}
}
@@ -141,7 +108,6 @@ public class UnplannedReceiptRequestForDongyangAppService : UnplannedReceiptRequ
return dictionary;
}
-
#region 赋值
///
@@ -153,7 +119,6 @@ public class UnplannedReceiptRequestForDongyangAppService : UnplannedReceiptRequ
{
var itemBasic = await ItemBasicAclService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false);
CheckItemBasic(itemBasic, detail.ItemCode);
- //CheckOnceBusiCodeAsync(detail);
if (itemBasic != null)
{
detail.ItemName = itemBasic.Name;
@@ -163,65 +128,15 @@ public class UnplannedReceiptRequestForDongyangAppService : UnplannedReceiptRequ
detail.Uom = itemBasic.BasicUom;
}
- var location = await LocationAclService.GetByCodeAsync(detail.LocationCode).ConfigureAwait(false);
- CheckLocation(location, detail.LocationCode);
- if (location != null)
- {
- detail.LocationErpCode = location.ErpLocationCode;
- detail.WarehouseCode = location.WarehouseCode;
- detail.LocationArea = location.AreaCode;
- detail.LocationGroup = location.LocationGroupCode;
- }
-
detail.Lot = string.Empty;
detail.ContainerCode = string.Empty;
detail.PackingCode = string.Empty;
detail.Status = EnumInventoryStatus.OK;
-
- //if (!string.IsNullOrEmpty(detail.OnceBusiCode))
- //{
- // var dict = await DictAclService.GetByCodeAsync(nameof(input.OnceBusiCode)).ConfigureAwait(false);
-
- // if (dict.Items != null && dict.Items.Count > 0)
- // {
- // var item = dict.Items.FirstOrDefault(t => t.Code == input.OnceBusiCode);
-
- // Check.NotNull(item, "次交易码", "次交易码不存在");
-
- // detail.SetProperty("OnceBusiCode", item.Code);
- // detail.SetProperty("OnceBusiName", item.Name);
- // }
- //}
-
- //if (!string.IsNullOrEmpty(input.CaseCode))
- //{
- // var dict = await DictAclService.GetByCodeAsync(nameof(input.CaseCode)).ConfigureAwait(false);
-
- // if (dict.Items != null && dict.Items.Count > 0)
- // {
- // var item = dict.Items.FirstOrDefault(t => t.Code == input.CaseCode);
-
- // Check.NotNull(item, "专案代码", "专案代码不存在");
-
- // detail.SetProperty("CaseCode", item.Code);
- // detail.SetProperty("CaseName", item.Name);
- // }
- //}
-
- //if (!string.IsNullOrEmpty(input.ProjCapacityCode))
- //{
- // var dict = await DictAclService.GetByCodeAsync(nameof(input.ProjCapacityCode)).ConfigureAwait(false);
-
- // if (dict.Items != null && dict.Items.Count > 0)
- // {
- // var item = dict.Items.FirstOrDefault(t => t.Code == input.ProjCapacityCode);
-
- // Check.NotNull(item, "项目分类代码", "项目分类代码不存在");
-
- // detail.SetProperty("ProjCapacityCode", item.Code);
- // detail.SetProperty("ProjCapacityName", item.Name);
- // }
- //}
+ detail.LocationCode = "随便填";
+ detail.LocationArea = "随便填";
+ detail.LocationGroup = "随便填";
+ detail.LocationErpCode = "随便填";
+ detail.WarehouseCode = "随便填";
}
///
@@ -258,15 +173,11 @@ public class UnplannedReceiptRequestForDongyangAppService : UnplannedReceiptRequ
///
private async Task SetRequestAutoPropertiesAsync(UnplannedReceiptRequest entity)
{
- var tranType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.UnplannedReceipt, EnumTransSubType.None).ConfigureAwait(false);
-
- Check.NotNull(tranType, "事务类型", "事务类型不存在");
-
- entity.AutoCompleteJob = tranType.AutoCompleteJob;
- entity.AutoSubmit = tranType.AutoSubmitRequest;
- entity.AutoAgree = tranType.AutoAgreeRequest;
- entity.AutoHandle = tranType.AutoHandleRequest;
- entity.DirectCreateNote = tranType.DirectCreateNote;
+ entity.AutoCompleteJob = false;
+ entity.AutoSubmit = true;
+ entity.AutoAgree = false;
+ entity.AutoHandle = true;
+ entity.DirectCreateNote = false;
}
#endregion
@@ -293,11 +204,11 @@ public class UnplannedReceiptRequestForDongyangAppService : UnplannedReceiptRequ
var balance = await BalanceAclService.GetByItemLocationAndPackingAsync(
string.Empty,
importInput.ItemCode,
- importInput.ErpLocationCode).ConfigureAwait(false);
+ importInput.FromErpLocationCode).ConfigureAwait(false);
if (balance == null)
{
- validationRresult.Add("库存余额", $"ERP料号{importInput.ItemCode}在储位{importInput.ErpLocationCode}没有库存记录");
+ validationRresult.Add("库存余额", $"ERP料号{importInput.ItemCode}在储位{importInput.FromErpLocationCode}没有库存记录");
}
else
{
@@ -347,7 +258,7 @@ public class UnplannedReceiptRequestForDongyangAppService : UnplannedReceiptRequ
//await base.CheckImportInputBusinessAsync(importInput, importMethod);
_ = await CheckItemBasicAsync(importInput, validationRresult).ConfigureAwait(false);
- _ = await CheckLocationAsync(importInput.ErpLocationCode, validationRresult).ConfigureAwait(false);
+ await CheckErpLocationAsync(importInput.FromErpLocationCode, validationRresult).ConfigureAwait(false);
await CheckOnceBusiCodeAsync(importInput, validationRresult).ConfigureAwait(false);//次交易码
// await CheckCaseCodeAsync(importInput, validationRresult).ConfigureAwait(false);//专案代码
@@ -375,14 +286,13 @@ public class UnplannedReceiptRequestForDongyangAppService : UnplannedReceiptRequ
return item;
}
- protected virtual async Task CheckLocationAsync(string locationCode, List validationRresult)
+ protected virtual async Task CheckErpLocationAsync(string locationCode, List validationRresult)
{
- var location = await LocationAclService.GetByCodeAsync(locationCode).ConfigureAwait(false);
- if (location == null)
+ var location = await _locationAppService.GetListByErpLocationCodes(new List{ locationCode }).ConfigureAwait(false);
+ if (location == null||location.Count==0)
{
- validationRresult.Add("调入库位", $"调入库位{locationCode}不存在");
+ validationRresult.Add("调入储位", $"调入库位{locationCode}不存在");
}
- return location;
}
protected virtual async Task CheckOnceBusiCodeAsync(UnplannedReceiptRequestImportInput importInput, List validationRresult)
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/UnplannedReceiptJobs/UnplannedReceiptJob.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/UnplannedReceiptJobs/UnplannedReceiptJob.cs
index 1f0ca641d..87bf6a96b 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/UnplannedReceiptJobs/UnplannedReceiptJob.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/UnplannedReceiptJobs/UnplannedReceiptJob.cs
@@ -9,51 +9,117 @@ using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Domain;
///
-/// 计划外出库任务
+/// 计划外出库任务
///
[Display(Name = "计划外出库任务")]
public class UnplannedReceiptJob : SfsJobAggregateRootBase
{
///
- /// 要货单号
+ /// 要货单号
///
[IgnoreUpdate]
public string UnplannedReceiptRequestNumber { get; set; }
///
- /// 部门代码
+ /// 部门代码
///
[IgnoreUpdate]
public string DeptCode { get; set; }
///
- /// 部门名称
+ /// 部门名称
///
[IgnoreUpdate]
public string DeptName { get; set; }
///
- /// 建档日
+ /// 建档日
///
[IgnoreUpdate]
public DateTime BuildDate { get; set; }
- [Display(Name = "退料类别", Order = 0)]
- public EnumUnplannedReceiptType UnplannedReceiptType { get; set; }
+ [Display(Name = "退料类别", Order = 0)] public EnumUnplannedReceiptType UnplannedReceiptType { get; set; }
///
- /// OA单据号
+ /// OA单据号
///
[Display(Name = "OA单据号")]
public string OANumber { get; set; }
+
+ ///
+ /// 原因代码
+ ///
+ [Display(Name = "原因代码")]
+ public string ReasonCode { get; set; }
+
+ ///
+ /// 专案
+ ///
+ [Display(Name = "专案")]
+ public string CaseCode { get; set; }
+
+ ///
+ /// 项目分类
+ ///
+ [Display(Name = "项目分类")]
+ public string ProjCapacityCode { get; set; }
+
+ ///
+ /// 次交易码
+ ///
+ [Display(Name = "次交易码")]
+ public string OnceBusiCode { get; set; }
+
+ ///
+ /// 说明
+ ///
+ [Display(Name = "说明")]
+ public string Explain { get; set; }
+
+ ///
+ /// ERP料号
+ ///
+ [Display(Name = "ERP料号")]
+ public string ItemCode { get; set; }
+
+ ///
+ /// 物品名称
+ ///
+ [Display(Name = "物品名称")]
+ public string ItemName { get; set; }
+
+ ///
+ /// 物品描述1
+ ///
+ [Display(Name = "物品描述1")]
+ public string ItemDesc1 { get; set; }
+
+ ///
+ /// 物品描述2
+ ///
+ [Display(Name = "物品描述2")]
+ public string ItemDesc2 { get; set; }
+
+ ///
+ /// ERP储位
+ ///
+ [Display(Name = "ERP储位")]
+ public string FromErpLocationCode { get; set; }
+
+ ///
+ /// 数量
+ ///
+ [Display(Name = "数量")]
+ public decimal Qty { get; set; }
+
///
- /// 任务明细
+ /// 任务明细
///
[IgnoreUpdate]
- public override List Details { get; set; } = new List();
+ public override List Details { get; set; } = new();
///
- /// 设置任务明细的实际库位和实际数量
+ /// 设置任务明细的实际库位和实际数量
///
///
///
@@ -66,7 +132,11 @@ public class UnplannedReceiptJob : SfsJobAggregateRootBase
///
///
- public virtual async Task BuildDetail(Guid id,string handledLocationGroup ,string handledLocationArea, string handledLocationCode, string handledLocationErpCode, string handledWarehouseCode, decimal handledQty, string handledSupplierBatch, DateTime handledArriveDate, DateTime handledProduceDate, DateTime handledExpireDate, string handledContainerCode, string handledLot, string handledPackingCode, ExtraPropertyDictionary extraProperty)
+ public virtual async Task BuildDetail(Guid id, string handledLocationGroup, string handledLocationArea,
+ string handledLocationCode, string handledLocationErpCode, string handledWarehouseCode, decimal handledQty,
+ string handledSupplierBatch, DateTime handledArriveDate, DateTime handledProduceDate,
+ DateTime handledExpireDate, string handledContainerCode, string handledLot, string handledPackingCode,
+ ExtraPropertyDictionary extraProperty)
{
var detail = GetDetail(id);
detail.HandledToLocationGroup = handledLocationGroup;
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/UnplannedReceiptJobs/UnplannedReceiptJobDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/UnplannedReceiptJobs/UnplannedReceiptJobDetail.cs
index 740fe376b..9fee9b4cb 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/UnplannedReceiptJobs/UnplannedReceiptJobDetail.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/UnplannedReceiptJobs/UnplannedReceiptJobDetail.cs
@@ -1,45 +1,12 @@
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Data;
-using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
namespace Win_in.Sfs.Wms.Store.Domain;
public class UnplannedReceiptJobDetail : SfsJobRecommendToDetailEntityBase, IHasExtraProperties
{
-
- ///
- /// 原因代码
- ///
- public string ReasonCode { get; set; }
-
- ///
- /// 专案
- ///
- [Display(Name = "专案")]
- public string CaseCode { get; set; }
-
- ///
- /// 项目分类
- ///
- [Display(Name = "项目分类")]
- public string ProjCapacityCode { get; set; }
-
///
- /// 次交易码
+ /// 扩展属性
///
- [Display(Name = "次交易码")]
- public string OnceBusiCode { get; set; }
-
- ///
- /// 扩展属性
- ///
- public ExtraPropertyDictionary ExtraProperties { get; set; } = new ExtraPropertyDictionary();
-
-
- ///
- /// 说明
- ///
- [Display(Name = "说明")]
- public string Explain { get; set; }
-
+ public ExtraPropertyDictionary ExtraProperties { get; set; } = new();
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestDetail.cs
index 2b45ddbee..34f53e13a 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestDetail.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/UnplannedReceiptRequests/UnplannedReceiptRequestDetail.cs
@@ -48,6 +48,6 @@ public class UnplannedReceiptRequestDetail : SfsStoreDetailWithLotPackingQtyLoca
/// 储位
///
[Display(Name = "储位")]
- public string ErpLocationCode { get; set; }
+ public string FromErpLocationCode { get; set; }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/ExchangeData/ExchangeDataDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/ExchangeData/ExchangeDataDbContextModelCreatingExtensions.cs
index 1321c944e..4caa0d8e4 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/ExchangeData/ExchangeDataDbContextModelCreatingExtensions.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/ExchangeData/ExchangeDataDbContextModelCreatingExtensions.cs
@@ -30,7 +30,8 @@ public static class ExchangeDataDbContextModelCreatingExtensions
b.Property(p => p.ReadTime);
b.Property(p => p.ErrorCode).IsRequired().HasMaxLength(SfsPropertyConst.NameLength).HasConversion();
b.Property(p => p.ErrorMessage).HasMaxLength(SfsPropertyConst.RemarkLength);
- b.Property(p => p.TyrpNumber).IsRequired().HasDefaultValueSql();
+ //b.Property(p => p.TyrpNumber).IsRequired().HasDefaultValueSql();
+ b.Property(p => p.TyrpNumber).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength);
//Relations
//Indexes
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20241009052809_Updata_UnplannedReceipt2.Designer.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20241009052809_Updata_UnplannedReceipt2.Designer.cs
new file mode 100644
index 000000000..c6f33d378
--- /dev/null
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20241009052809_Updata_UnplannedReceipt2.Designer.cs
@@ -0,0 +1,34581 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Volo.Abp.EntityFrameworkCore;
+using Win_in.Sfs.Wms.Store.EntityFrameworkCore;
+
+#nullable disable
+
+namespace Win_in.Sfs.Wms.Store.Migrations
+{
+ [DbContext(typeof(StoreDbContext))]
+ [Migration("20241009052809_Updata_UnplannedReceipt2")]
+ partial class Updata_UnplannedReceipt2
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
+ .HasAnnotation("ProductVersion", "6.0.13")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
+
+ modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.AssembleIssueJob", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AcceptTime")
+ .HasColumnType("datetime2");
+
+ b.Property("AcceptUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AcceptUserName")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("AssembleRequestNumber")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ClaimsUserId")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ClaimsUserName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CompleteTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CompleteUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CompleteUserName")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("EnumIssueSendType")
+ .HasColumnType("int");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsAutoComplete")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("IsClaims")
+ .HasColumnType("bit");
+
+ b.Property("IssueRequestType")
+ .HasColumnType("int");
+
+ b.Property("JobDescription")
+ .HasMaxLength(1024)
+ .HasColumnType("nvarchar(1024)");
+
+ b.Property("JobStatus")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("JobType")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Number")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Priority")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasDefaultValue(0);
+
+ b.Property("PriorityIncrement")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int")
+ .HasDefaultValue(0);
+
+ b.Property("ProdLine")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Remark")
+ .HasMaxLength(3072)
+ .HasColumnType("nvarchar(3072)")
+ .HasColumnName("Remark");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("UpStreamJobNumber")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("UseOnTheWayLocation")
+ .HasColumnType("bit");
+
+ b.Property("WarehouseCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("WorkGroupCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Worker")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Number")
+ .IsUnique();
+
+ b.ToTable("Job_AssembleIssueJob", (string)null);
+ });
+
+ modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.AssembleIssueJobDetail", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("HandledFromArriveDate")
+ .HasColumnType("datetime2");
+
+ b.Property("HandledFromContainerCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledFromExpireDate")
+ .HasColumnType("datetime2");
+
+ b.Property("HandledFromLocationArea")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledFromLocationCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledFromLocationErpCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledFromLocationGroup")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledFromLot")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledFromPackingCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledFromProduceDate")
+ .HasColumnType("datetime2");
+
+ b.Property("HandledFromQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("HandledFromSupplierBatch")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledFromWarehouseCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToArriveDate")
+ .HasColumnType("datetime2");
+
+ b.Property("HandledToContainerCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToExpireDate")
+ .HasColumnType("datetime2");
+
+ b.Property("HandledToLocationArea")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToLocationCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToLocationErpCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToLocationGroup")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToLot")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToPackingCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToProduceDate")
+ .HasColumnType("datetime2");
+
+ b.Property("HandledToQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("HandledToSupplierBatch")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToWarehouseCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ItemCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ItemDesc1")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ItemDesc2")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ItemName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("MasterID")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Number")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("OnTheWayLocationCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("PositionCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ProdLine")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("RecommendFromArriveDate")
+ .HasColumnType("datetime2");
+
+ b.Property("RecommendFromContainerCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendFromExpireDate")
+ .HasColumnType("datetime2");
+
+ b.Property("RecommendFromLocationArea")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendFromLocationCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendFromLocationErpCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendFromLocationGroup")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendFromLot")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendFromPackingCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendFromProduceDate")
+ .HasColumnType("datetime2");
+
+ b.Property("RecommendFromQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("RecommendFromSupplierBatch")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendFromWarehouseCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToArriveDate")
+ .HasColumnType("datetime2");
+
+ b.Property("RecommendToContainerCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToExpireDate")
+ .HasColumnType("datetime2");
+
+ b.Property("RecommendToLocationArea")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToLocationCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToLocationErpCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToLocationGroup")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToLot")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToPackingCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToProduceDate")
+ .HasColumnType("datetime2");
+
+ b.Property("RecommendToQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("RecommendToSupplierBatch")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToWarehouseCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendType")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Remark")
+ .HasMaxLength(3072)
+ .HasColumnType("nvarchar(3072)")
+ .HasColumnName("Remark");
+
+ b.Property("RequestLocationArea")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RequestLocationCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("RequestLocationErpCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RequestLocationGroup")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RequestQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("RequestWarehouseCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Status")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("StdPackQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("TransferLibFromArriveDate")
+ .HasColumnType("datetime2");
+
+ b.Property("TransferLibFromContainerCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TransferLibFromExpireDate")
+ .HasColumnType("datetime2");
+
+ b.Property("TransferLibFromLocationArea")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TransferLibFromLocationCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TransferLibFromLocationErpCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TransferLibFromLocationGroup")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TransferLibFromLot")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TransferLibFromPackingCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TransferLibFromProduceDate")
+ .HasColumnType("datetime2");
+
+ b.Property("TransferLibFromQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("TransferLibFromSupplierBatch")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TransferLibFromWarehouseCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TransferLibToArriveDate")
+ .HasColumnType("datetime2");
+
+ b.Property("TransferLibToContainerCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TransferLibToExpireDate")
+ .HasColumnType("datetime2");
+
+ b.Property("TransferLibToLocationArea")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TransferLibToLocationCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TransferLibToLocationErpCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TransferLibToLocationGroup")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TransferLibToLot")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TransferLibToPackingCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TransferLibToProduceDate")
+ .HasColumnType("datetime2");
+
+ b.Property("TransferLibToQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("TransferLibToSupplierBatch")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TransferLibToWarehouseCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Uom")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("MasterID");
+
+ b.ToTable("Job_AssembleIssueJobDetail", (string)null);
+ });
+
+ modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.AssembleIssueNote", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ActiveDate")
+ .HasColumnType("datetime2");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("nvarchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("ConfirmTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Confirmed")
+ .HasColumnType("bit");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("EnumIssueSendType")
+ .HasColumnType("int");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IssueRequestType")
+ .HasColumnType("int");
+
+ b.Property("JobNumber")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("JobNumber");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Number")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("Number");
+
+ b.Property("Remark")
+ .HasMaxLength(3072)
+ .HasColumnType("nvarchar(3072)")
+ .HasColumnName("Remark");
+
+ b.Property("RequestNumber")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("UseOnTheWayLocation")
+ .HasColumnType("bit");
+
+ b.Property("Worker")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Number")
+ .IsUnique();
+
+ b.ToTable("Store_AssembleIssueNote", (string)null);
+ });
+
+ modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.AssembleIssueNoteDetail", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("HandledFromArriveDate")
+ .HasColumnType("datetime2");
+
+ b.Property("HandledFromContainerCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledFromExpireDate")
+ .HasColumnType("datetime2");
+
+ b.Property("HandledFromLocationArea")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledFromLocationCode")
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("HandledFromLocationErpCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledFromLocationGroup")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledFromLot")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledFromPackingCode")
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("HandledFromProduceDate")
+ .HasColumnType("datetime2");
+
+ b.Property("HandledFromQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("HandledFromSupplierBatch")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledFromWarehouseCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToArriveDate")
+ .HasColumnType("datetime2");
+
+ b.Property("HandledToContainerCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToExpireDate")
+ .HasColumnType("datetime2");
+
+ b.Property("HandledToLocationArea")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToLocationCode")
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("HandledToLocationErpCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToLocationGroup")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToLot")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToPackingCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToProduceDate")
+ .HasColumnType("datetime2");
+
+ b.Property("HandledToQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("HandledToSupplierBatch")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HandledToWarehouseCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ItemCode")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("ItemCode");
+
+ b.Property("ItemDesc1")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("ItemDesc1");
+
+ b.Property("ItemDesc2")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("ItemDesc2");
+
+ b.Property("ItemName")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("ItemName");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("MasterID")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Number")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("Number");
+
+ b.Property("OnTheWayLocationCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("PositionCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ProdLine")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("RecommendFromArriveDate")
+ .HasColumnType("datetime2");
+
+ b.Property("RecommendFromContainerCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendFromExpireDate")
+ .HasColumnType("datetime2");
+
+ b.Property("RecommendFromLocationArea")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendFromLocationCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendFromLocationErpCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendFromLocationGroup")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendFromLot")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendFromPackingCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendFromProduceDate")
+ .HasColumnType("datetime2");
+
+ b.Property("RecommendFromQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("RecommendFromSupplierBatch")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendFromWarehouseCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToArriveDate")
+ .HasColumnType("datetime2");
+
+ b.Property("RecommendToContainerCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToExpireDate")
+ .HasColumnType("datetime2");
+
+ b.Property("RecommendToLocationArea")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToLocationCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToLocationErpCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToLocationGroup")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToLot")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToPackingCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToProduceDate")
+ .HasColumnType("datetime2");
+
+ b.Property("RecommendToQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("RecommendToSupplierBatch")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RecommendToWarehouseCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property