diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ThirdLocationJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ThirdLocationJobController.cs
index 3d3f29459..3bd5ffa48 100644
--- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ThirdLocationJobController.cs
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ThirdLocationJobController.cs
@@ -46,161 +46,5 @@ public class ThirdLocationJobController : AbpController
_dictApp = dictApp;
}
- ///
- /// 获取任务详情
- ///
- ///
- ///
- [HttpGet("{id}")]
- public virtual async Task> GetAsync(Guid id)
- {
- var result = await _thirdLocationJobAppService.GetAsync(id).ConfigureAwait(false);
- return Ok(result);
- }
-
- ///
- /// 获取列表 筛选
- ///
- ///
- ///
- [HttpPost("list")]
- public virtual async Task> GetListAsync(SfsJobRequestInputBase sfsRequestDTO)
- {
- var list = await _thirdLocationJobAppService.GetPagedListByFilterAsync(sfsRequestDTO, true).ConfigureAwait(false);
- return list;
- }
-
- ///
- /// 获取列表
- ///
- ///
- ///
- ///
- [HttpGet("list")]
- public virtual async Task> GetListAsync(int pageSize, int pageIndex)
- {
- var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing, (int)EnumJobStatus.Partial };
- var jsonStatus = JsonSerializer.Serialize(status);
-
- var request = new SfsJobRequestInputBase
- {
- MaxResultCount = pageSize,
- SkipCount = (pageIndex - 1) * pageSize,
- Sorting = $"{nameof(ThirdLocationJobDTO.CreationTime)} ASC",
- Condition = new Condition
- {
- Filters = new List
- {
- new(nameof(IssueJobDTO.JobStatus),jsonStatus,"In")
- }
- }
-
- };
-
- var list = await _thirdLocationJobAppService.GetPagedListByFilterAsync(request, true).ConfigureAwait(false);
-
-
- return list;
- }
-
- ///
- /// 根据Job Number 获取任务列表
- ///
- ///
- ///
- [HttpGet("by-number/{jobNumber}")]
- public virtual async Task> GetByNumberAsync(string jobNumber)
- {
- var jobDto = await _thirdLocationJobAppService.GetByNumberAsync(jobNumber).ConfigureAwait(false);
- if (jobDto == null)
- {
- throw new UserFriendlyException($"未找到编号为 {jobNumber} 的任务");
- }
- var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false);
- if (!wlgCodes.Contains(jobDto.WorkGroupCode))
- {
- return new NotFoundObjectResult($"任务属于工作组 {jobDto.WorkGroupCode}");
- }
- if (jobDto.JobStatus == EnumJobStatus.Doing && jobDto.AcceptUserId != CurrentUser.Id)
- {
- return new NotFoundObjectResult($"任务正在被 {jobDto.AcceptUserName} 处理");
- }
- return jobDto;
- }
-
- ///
- /// 获取任务数量
- ///
- ///
- [HttpGet("count")]
- public virtual async Task> CountAsync()
- {
- var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false);
- var jsonCodes = JsonSerializer.Serialize(wlgCodes);
-
- var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing, (int)EnumJobStatus.Partial };
- var jsonStatus = JsonSerializer.Serialize(status);
-
- var request = new SfsJobRequestInputBase
- {
- Sorting = $"{nameof(ThirdLocationJobDTO.Priority)} ASC",
- Condition = new Condition
- {
- Filters = new List
- {
- new(nameof(ThirdLocationJobDTO.WorkGroupCode),jsonCodes,"In"),
- new(nameof(ThirdLocationJobDTO.JobStatus),jsonStatus,"In")
- }
- }
- };
-
- var count = await _thirdLocationJobAppService.GetCountByFilterAsync(request).ConfigureAwait(false);
-
- return Ok(count);
- }
-
- ///
- /// 承接任务
- ///
- ///
- ///
- [HttpPost("take/{id}")]
- public virtual async Task TakeAsync(Guid id)
- {
- await _thirdLocationJobAppService.AcceptAsync(id).ConfigureAwait(false);
- }
-
- ///
- /// 取消承接任务
- ///
- ///
- ///
- [HttpPost("cancel-take/{id}")]
- public virtual async Task CancelTakeAsync(Guid id)
- {
- await _thirdLocationJobAppService.CancelAcceptAsync(id).ConfigureAwait(false);
- }
-
- ///
- /// 终止关闭任务
- ///
- ///
- ///
- [HttpPost("close-job/{id}")]
- public virtual async Task CloseJobAsync(Guid id)
- {
- await _thirdLocationJobAppService.CloseJobAsync(id).ConfigureAwait(false);
- }
-
- ///
- /// 执行任务
- ///
- ///
- ///
- ///
- [HttpPost("finish/{id}")]
- public virtual async Task FinishAsync(Guid id, [FromBody] ThirdLocationJobDTO dto)
- {
- await _thirdLocationJobAppService.CompleteAsync(id, dto).ConfigureAwait(false);
- }
+
}
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/ThirdLocationNoteController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/ThirdLocationNoteController.cs
index 0e6e03ead..d40da917e 100644
--- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/ThirdLocationNoteController.cs
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/ThirdLocationNoteController.cs
@@ -24,15 +24,4 @@ public class ThirdLocationNoteController : AbpController
_thirdLocationNoteAppService = thirdLocationNoteAppService;
}
- ///
- /// 创建三方库转移记录
- ///
- /// CreateInput
- ///
- [HttpPost("")]
- public virtual async Task CreateAsync(ThirdLocationNoteEditInput input)
- {
- await _thirdLocationNoteAppService.CreateAsync(input).ConfigureAwait(false);
- }
-
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/DTOs/ThirdLocationJobDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/DTOs/ThirdLocationJobDTO.cs
index 1450c3f17..cc5b32fce 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/DTOs/ThirdLocationJobDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/DTOs/ThirdLocationJobDTO.cs
@@ -1,5 +1,7 @@
+using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain;
+using Win_in.Sfs.Wms.Store.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
@@ -10,37 +12,35 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class ThirdLocationJobDTO : SfsJobDTOBase
{
///
- /// 叫料请求类型
+ /// 请求单号
///
- [Display(Name = "叫料请求类型")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string RequestType { get; set; }
+ [Display(Name = "请求单号")]
+ public string RequestNumber { get; set; }
///
- /// 收货单件码
+ /// 已承接
///
- [Display(Name = "收货单件码")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string SingleCodeJob { get; set; }
+ ///
+ [Display(Name = "是否已承接")]
+ public bool IsClaims { get; set; }
///
- /// 要货申请单号
+ /// 承接人ID
///
- [Display(Name = "要货申请单号")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string RequestNumber { get; set; }
+ ///
+ [Display(Name = "承接人ID")]
+ public string ClaimsUserId { get; set; }
///
- /// 车间
+ /// 承接人
///
- [Display(Name = "车间")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string Workshop { get; set; }
+ ///
+ [Display(Name = "承接人")]
+ public string ClaimsUserName { get; set; }
///
- /// 使用在途库
+ /// 三方库申请类型
///
- [Display(Name = "使用在途库")]
- public bool UseOnTheWayLocation { get; set; }
-
+ [Display(Name = "三方库申请类型")]
+ public string Type { get; set; }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/IThirdLocationJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/IThirdLocationJobAppService.cs
index 6f8a4fa50..a0e156bfa 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/IThirdLocationJobAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/IThirdLocationJobAppService.cs
@@ -9,20 +9,4 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public interface IThirdLocationJobAppService
: ISfsJobAppServiceBase
{
- Task> CheckJobExistByItemCodeAndLocationCode(string itemCode, string locationCode);
-
- Task CancelByMaterialRequestAsync(string thirdLocationNumber);
-
- Task> GetListByTypeAsync(SfsJobRequestInputBase requestInput, string requestType,
- bool includeDetails = false, CancellationToken cancellationToken = default);
-
- Task> GetByRequestNumberAsync(string requestNumber);
- Task CloseJobAsync(Guid id);
-
- ///
- /// 保存拆箱时涉及的明细修改
- ///
- ///
- Task SaveDetail_SplitPackingAsync(SplitPacking_UpdateJobDetailInput input);
-
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/DTOs/ThirdLocationNoteDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/DTOs/ThirdLocationNoteDTO.cs
index 2c4ace218..a93e54248 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/DTOs/ThirdLocationNoteDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/DTOs/ThirdLocationNoteDTO.cs
@@ -1,55 +1,56 @@
using System;
using System.ComponentModel.DataAnnotations;
-using Win_in.Sfs.Shared.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class ThirdLocationNoteDTO : SfsStoreDTOBase, IHasJobNumber, IHasRequestNumber
{
-
///
- /// 任务ID
+ /// 发出时间
///
- [Display(Name = "任务ID")]
- public string JobNumber { get; set; }
-
+ public DateTime IssueTime { get; set; }
///
- /// 车间
+ /// 接收时间
///
- [Display(Name = "车间")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string Workshop { get; set; }
+ public DateTime ReceiptTime { get; set; }
///
- /// 请求代码
+ /// 请求单号
///
- [Display(Name = "请求代码")]
+ [Display(Name = "请求单号")]
public string RequestNumber { get; set; }
///
- /// 叫料请求类型
+ /// 任务单号
///
- [Display(Name = "叫料请求类型")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string RequestType { get; set; }
+ [Display(Name = "任务单号")]
+ public string JobNumber { get; set; }
///
- /// 使用在途库
+ /// 已承接
///
- [Display(Name = "使用在途库")]
- public bool UseOnTheWayLocation { get; set; }
+ ///
+ [Display(Name = "是否已承接")]
+ public bool IsClaims { get; set; }
///
- /// 已确认
+ /// 承接人ID
///
- [Display(Name = "已确认")]
- public bool Confirmed { get; set; }
+ ///
+ [Display(Name = "承接人ID")]
+ public string ClaimsUserId { get; set; }
///
- /// 确认时间
+ /// 承接人
///
- [Display(Name = "确认时间")]
- public DateTime? ConfirmTime { get; set; }
+ ///
+ [Display(Name = "承接人")]
+ public string ClaimsUserName { get; set; }
+ ///
+ /// 三方库申请类型
+ ///
+ [Display(Name = "三方库申请类型")]
+ public string Type { get; set; }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/IThirdLocationNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/IThirdLocationNoteAppService.cs
index 3befdb64d..1a22495df 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/IThirdLocationNoteAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/IThirdLocationNoteAppService.cs
@@ -8,14 +8,5 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public interface IThirdLocationNoteAppService : ISfsStoreMasterReadOnlyAppServiceBase
{
- Task CreateAsync(ThirdLocationNoteEditInput input);
-
- Task ConfirmAsync(Guid id);
-
- Task ConfirmAsync(string number);
-
- Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput,
- string requestType, bool includeDetails = false, CancellationToken cancellationToken = default);
-
- Task> GetListUnConfirmedByTypeAsync(string requestType);
+
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/DTOs/ThirdLocationRequestDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/DTOs/ThirdLocationRequestDTO.cs
index a786e13d3..14308a739 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/DTOs/ThirdLocationRequestDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/DTOs/ThirdLocationRequestDTO.cs
@@ -1,27 +1,15 @@
+using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Domain.Entities;
+using Win_in.Sfs.Wms.Store.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class ThirdLocationRequestDTO : SfsStoreRequestDTOBase, IHasNumber
{
///
- /// 类型
+ /// 三方库申请类型
///
- [Display(Name = "类型")]
+ [Display(Name = "三方库申请类型")]
public string Type { get; set; }
-
- ///
- /// 申请单件码
- ///
- [IgnoreUpdate]
- public string SingleCodeRequest { get; set; }
-
- ///
- /// 是否使用在途库
- ///
- [Display(Name = "是否使用在途库")]
- public bool IsUseOnTheWayLocation { get; set; }
-
-
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/DTOs/ThirdLocationRequestDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/DTOs/ThirdLocationRequestDetailDTO.cs
index 714896f0a..fa3dbd3ee 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/DTOs/ThirdLocationRequestDetailDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/DTOs/ThirdLocationRequestDetailDTO.cs
@@ -8,68 +8,112 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class ThirdLocationRequestDetailDTO : SfsStoreDetailWithQtyDTOBase
{
+ #region 目标库位
+
///
- /// 目标库位
+ /// 到库位
///
- [Display(Name = "目标库位")]
public string ToLocationCode { get; set; }
///
- /// 目标ERP储位
+ /// 到库区
+ ///
+ public string ToLocationArea { get; set; }
+
+ ///
+ /// 到库位组
+ ///
+ public string ToLocationGroup { get; set; }
+
+ ///
+ /// 到ERP库位
///
- [Display(Name = "目标ERP储位")]
public string ToLocationErpCode { get; set; }
///
- /// 来源库位
+ /// 到仓库
///
- [Display(Name = "来源库位")]
- public string FromLocationCode { get; set; }
+ public string ToWarehouseCode { get; set; }
+
+ #endregion
+
+ #region 来源库位
///
- /// 申请单件码
+ /// 到库位
///
- [Display(Name = "申请单件码")]
- public string SingleCodeRequest { get; set; }
+ public string FromLocationCode { get; set; }
///
- /// 来源库区
+ /// 到库区
///
- [Display(Name = "来源库区")]
public string FromLocationArea { get; set; }
///
- /// 已发数量
+ /// 到库位组
+ ///
+ public string FromLocationGroup { get; set; }
+
+ ///
+ /// 到ERP库位
+ ///
+ public string FromLocationErpCode { get; set; }
+
+ ///
+ /// 到仓库
+ ///
+ public string FromWarehouseCode { get; set; }
+
+ #endregion
+
+ #region 在途库位
+
+ ///
+ /// 在途库库位
+ ///
+ public string OnTheWayLocationCode { get; set; }
+
+ #endregion
+
+ ///
+ /// 申请单件码
+ ///
+ public string SingleCodeRequest { get; set; }
+
+ ///
+ /// 已发数量
///
- [Display(Name = "已发数量")]
public decimal IssuedQty { get; set; }
///
- /// 已收数量
+ /// 已收数量
///
- [Display(Name = "已收数量")]
public decimal ReceivedQty { get; set; }
-
///
- /// 请求未发
+ /// 箱码
///
- [Display(Name = "请求未发")]
- [NotMapped]
- public decimal ToBeIssuedQty => Qty - IssuedQty;
+ public string PackingCode { get; set; }
///
- /// 已发未收
+ /// 批次
///
- [Display(Name = "已发未收")]
- [NotMapped]
- public decimal ToBeReceivedQty => IssuedQty - ReceivedQty;
+ public string Lot { get; set; }
+
+ ///
+ /// 过期时间
+ ///
+ public DateTime ExpiredTime { get; set; }
+
+ ///
+ /// 库位状态
+ ///
+ public EnumInventoryStatus EnumInventoryStatus { get; set; }
///
- /// 请求未收
+ /// 请求未收
///
- [Display(Name = "请求未收")]
[NotMapped]
- public decimal NotFinishQty => Qty - ReceivedQty;
+ public decimal NotFinishQty => IssuedQty - ReceivedQty;
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ThirdLocationJobs/ThirdLocationJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ThirdLocationJobs/ThirdLocationJobAppService.cs
index e48dfd201..42cf848e8 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ThirdLocationJobs/ThirdLocationJobAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ThirdLocationJobs/ThirdLocationJobAppService.cs
@@ -37,200 +37,4 @@ public class ThirdLocationJobAppService
_thirdLocationJobManager = thirdLocationJobManager;
}
- ///
- /// 完成任务
- ///
- ///
- ///
- ///
- [HttpPost("handle/{id}")]
- [UnitOfWork]
- public override async Task CompleteAsync(Guid id, ThirdLocationJobDTO dto)
- {
- var handleEntity = ObjectMapper.Map(dto);
- 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()}】");
- }
- if(dto.Details.Count==0)
- {
- throw new UserFriendlyException($"任务错误:编号为【{dto.Number} 的任务未包含明细");
- }
- else
- {
- foreach(var item in dto.Details)
- {
- var jobDetail = job.Details.FirstOrDefault(p => p.ItemCode == item.ItemCode);
-
- if (jobDetail == null)
- {
- throw new UserFriendlyException($"任务错误:未找到物品【{item.ItemCode} 的明细信息");
- }
- else
- {
- if (item.HandledQty > jobDetail.RecommendQty)
- {
- throw new UserFriendlyException($"任务错误:编号为【{job.Number}】的实际数量【{item.HandledQty}】不能大于推荐数量【{item.RecommendQty}】");
- }
- if (jobDetail.ToLocationCode != item.ToLocationCode)
- {
- throw new UserFriendlyException($"任务错误:编号为【{job.Number}】的实际目标库位【{item.ToLocationCode}】与申请目标库位【{jobDetail.ToLocationCode}】不一致");
- }
- }
-
- }
-
-
-
- }
-
-
- var handleResult = await _thirdLocationJobManager.CompleteAsync(handleEntity,CurrentUser).ConfigureAwait(false);
- //判断申请是否执行完成
- if (job.JobStatus == EnumJobStatus.Done)
- {
-
- }
- var handleDto = ObjectMapper.Map(handleResult);
- return handleDto;
- }
-
- ///
- /// 终止关闭任务
- ///
- ///
- ///
- ///
- [HttpPost("close-job/{id}")]
- public virtual async Task CloseJobAsync(Guid id)
- {
- var thirdLocationJob = await _repository.GetAsync(id).ConfigureAwait(false);
- if (thirdLocationJob == null)
- {
- throw new UserFriendlyException($"未找到ID为 {id} 的任务");
- }
- else
- {
- if (thirdLocationJob.JobStatus == EnumJobStatus.Partial)
- {
- thirdLocationJob.JobStatus = EnumJobStatus.Done;
- await Task.CompletedTask.ConfigureAwait(false);
- await LocalEventBus.PublishAsync(new SfsClosedEntityEventData(thirdLocationJob), false).ConfigureAwait(false);
- await Repository.UpdateAsync(thirdLocationJob).ConfigureAwait(false);
-
- }
- else if (thirdLocationJob.JobStatus == EnumJobStatus.Open)
- {
- thirdLocationJob.JobStatus = EnumJobStatus.Closed;
- await Task.CompletedTask.ConfigureAwait(false);
- await LocalEventBus.PublishAsync(new SfsClosedEntityEventData(thirdLocationJob), false).ConfigureAwait(false);
- await Repository.UpdateAsync(thirdLocationJob).ConfigureAwait(false);
-
- }
- else
- {
- throw new UserFriendlyException($"【{thirdLocationJob.JobStatus.GetDisplayName()}】状态不允许终止");
- }
- }
-
-
- }
-
- ///
- /// 根据物品和库位 检查是否存在发料任务
- ///
- ///
- ///
- ///
- ///
- [Authorize]
- [HttpGet("check-job-exist")]
- public virtual async Task> CheckJobExistByItemCodeAndLocationCode(string itemCode,
- string locationCode)
- {
- var entities = await _repository.GetListAsync(c =>
- c.Details.Any(p =>
- (p.ItemCode == itemCode && p.RecommendFromLocationCode == locationCode) ||
- (p.ItemCode == itemCode && p.ToLocationCode == locationCode))
- && (c.JobStatus == EnumJobStatus.Open || c.JobStatus == EnumJobStatus.Doing), true).ConfigureAwait(false);
- var dtos = ObjectMapper.Map, List>(entities);
- return dtos;
- }
-
- [HttpPost("cancel-by-request/{thirdLocationNumber}")]
- public virtual async Task CancelByMaterialRequestAsync(string thirdLocationNumber)
- {
- var entities = await _repository.GetListAsync(p => p.RequestNumber == thirdLocationNumber).ConfigureAwait(false);
- foreach (var entity in entities)
- {
- await _thirdLocationJobManager.CancelAsync(entity).ConfigureAwait(false);
- }
- }
-
- [HttpPost("invalid")]
- public override async Task CancelAsync(Guid id)
- {
- var thirdLocationJob = await _repository.GetAsync(id).ConfigureAwait(false);
- if (thirdLocationJob == null)
- {
- throw new UserFriendlyException($"未找到ID为 {id} 的任务");
- }
-
- await _thirdLocationJobManager.CancelAsync(thirdLocationJob).ConfigureAwait(false);
-
- }
-
- [HttpPost("by-type/{requestType}")]
- public virtual async Task> GetListByTypeAsync(SfsJobRequestInputBase requestInput,
- string requestType, bool includeDetails = false, CancellationToken cancellationToken = default)
- {
- Expression> expression = p => p.RequestType == requestType;
- if (requestInput.Condition.Filters?.Count > 0)
- {
- expression = expression.And(requestInput.Condition.Filters.ToLambda());
- }
-
- return await GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount,
- requestInput.Sorting, includeDetails, cancellationToken).ConfigureAwait(false);
-
- }
-
- [HttpPost("by-request-number/{requestNumber}")]
- public virtual async Task> GetByRequestNumberAsync(string requestNumber)
- {
- var entitys = await _repository.GetListAsync(p => p.RequestNumber == requestNumber).ConfigureAwait(false);
- return ObjectMapper.Map, List>(entitys);
- }
-
- ///
- /// 保存拆箱时涉及的明细修改
- ///
- ///
- [HttpPost("save-detail-split-packing")]
- public virtual async Task SaveDetail_SplitPackingAsync(SplitPacking_UpdateJobDetailInput input)
- {
- var job = await _repository.FindAsync(p => p.Number == input.Number).ConfigureAwait(false);
- ThirdLocationJobDetail detail = job.Details.FirstOrDefault(p => p.RecommendPackingCode == input.FromPackingCode ); /*&& p.HandledQty == input.FromQty*/
- if (detail == null)
- {
- //throw new UserFriendlyException($"根据HandledPackingCode={input.FromPackingCode}取ThirdLocationJobDetail表为空!");
- throw new UserFriendlyException($"根据RecommendPackingCode={input.FromPackingCode}取ThirdLocationJobDetail表为空!");
- }
- //插入目标箱
- var newDetail = CommonHelper.CloneObj(detail);
- newDetail.SetId(GuidGenerator.Create());
- newDetail.RecommendPackingCode = input.ToPackingCode;
- newDetail.RecommendQty = input.ToQty;
- newDetail.HandledPackingCode = detail.HandledPackingCode.HasValue() ? input.ToPackingCode : null; //源实际实际箱码有值,则新记录实际箱码有值
- newDetail.HandledQty = detail.HandledQty > 0 ? input.ToQty : 0;
- //newDetail.CreationTime = CommonHelper.CurTime;
- job.Details.Add(newDetail);
- //修改源箱
- detail.RecommendQty = input.FromQty - input.ToQty;
- detail.HandledQty = detail.HandledQty > 0 ? input.FromQty - input.ToQty : 0;
- var entity = await _repository.UpdateAsync(job).ConfigureAwait(false);
- var ret = ObjectMapper.Map(entity);
- return ret;
- }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ThirdLocationNotes/ThirdLocationNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ThirdLocationNotes/ThirdLocationNoteAppService.cs
index 57fe10118..c746455d6 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ThirdLocationNotes/ThirdLocationNoteAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ThirdLocationNotes/ThirdLocationNoteAppService.cs
@@ -33,76 +33,4 @@ public class ThirdLocationNoteAppService :
{
_thirdLocationNoteManager = thirdLocationNoteManager;
}
-
- [HttpPost("")]
- //[Authorize(ThirdLocationNotePermissions.Create)]
- public override async Task CreateAsync(ThirdLocationNoteEditInput input)
- {
- var entity = ObjectMapper.Map(input);
- await _thirdLocationNoteManager.CreateAsync(entity).ConfigureAwait(false);
- var dto = ObjectMapper.Map(entity);
- return dto;
- }
-
- ///
- /// 确认对应的记录单
- ///
- ///
- ///
- [HttpPost("confirm/{id}")]
- public virtual async Task ConfirmAsync(Guid id)
- {
- var thirdLocationNote= await _repository.GetAsync(id).ConfigureAwait(false);
- thirdLocationNote.Confirmed = true;
- thirdLocationNote=await _repository.UpdateAsync(thirdLocationNote).ConfigureAwait(false);
- await LocalEventBus.PublishAsync(new SfsConfirmedEntityEventData(thirdLocationNote), false).ConfigureAwait(false);
- return ObjectMapper.Map(thirdLocationNote);
- }
-
- [HttpPost("confirm-by-number/{number}")]
- public virtual async Task ConfirmAsync(string number)
- {
- var entity = await _repository.FindAsync(p => p.Number == number).ConfigureAwait(false);
- Check.NotNull(entity, nameof(ThirdLocationNote));
- var result = await _thirdLocationNoteManager.ConfirmAsync(entity.Id).ConfigureAwait(false);
- var dto = ObjectMapper.Map(result);
- return dto;
- }
- ///
- /// 根据叫料请求类型获取发料记录
- ///
- ///
- ///
- /// 叫料请求类型:
- /// 人工拉动:Issue_Manual;
- /// 线边拉动:Issue_WIP;
- ///
- ///
- ///
- ///
- [HttpPost("by-type/{requestType}")]
- public virtual async Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput,
- string requestType, bool includeDetails = false, CancellationToken cancellationToken = default)
- {
- Expression> expression = p => p.RequestType == requestType;
- if (requestInput.Condition.Filters?.Count > 0)
- {
- expression = expression.And(requestInput.Condition.Filters.ToLambda());
- }
-
- return await GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount,
- requestInput.Sorting, includeDetails, cancellationToken).ConfigureAwait(false);
- }
-
- [HttpGet("list/un-confirmed/{requestType}")]
- public virtual async Task> GetListUnConfirmedByTypeAsync(string requestType)
- {
- var entities = await _repository.GetListAsync(c => !c.Confirmed && c.RequestType == requestType)
- .ConfigureAwait(false);
-
- var dtos = ObjectMapper.Map, List>(entities);
-
- return dtos;
- }
-
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAppService.cs
index b3075b3ac..1590f32d8 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAppService.cs
@@ -81,425 +81,4 @@ public class ThirdLocationRequestAppService : SfsStoreRequestAppServiceBase HandleAsync(Guid id)
- {
- var entity = await _repository.GetAsync(id).ConfigureAwait(false);
- await LocalEventBus.PublishAsync(new SfsHandledEntityEventData(entity), false).ConfigureAwait(false);
- return ObjectMapper.Map(entity);
- }
-
- [HttpPost("")]
- //[Authorize(ThirdLocationRequestPermissions.Create)]
- public override async Task CreateAsync(ThirdLocationRequestEditInput input)
- {
-
- foreach (var item in input.Details)
- {
- if (item.Qty <= 0)
- {
- throw new UserFriendlyException($"{item.ItemCode} 物品的需求量必须大于0");
- }
- //校验来源库位
- if(string.IsNullOrEmpty(item.FromLocationCode))
- {
- throw new UserFriendlyException($"{item.ItemCode} 来源库位不能为空");
- }
- else
- {
- var fromLocationDto = await _locationAppService.GetByCodeAsync(item.FromLocationCode).ConfigureAwait(false);
- if(fromLocationDto == null)
- {
- throw new UserFriendlyException($"库位代码为【{item.FromLocationCode}】不存在");
- }
- else
- {
- if (fromLocationDto.Type == EnumLocationType.HOLD || fromLocationDto.Type == EnumLocationType.INSP || fromLocationDto.Type == EnumLocationType.TRANSPORT)
- {
- throw new UserFriendlyException($"{item.ItemCode} 来源库位不允许扫待检库、在途库、隔离库");
- }
- }
-
- }
- //校验目标库位
- if (string.IsNullOrEmpty(item.ToLocationCode))
- {
- throw new UserFriendlyException($"{item.ItemCode} 目标库位不能为空");
- }
- else
- {
- var toLocationDto = await _locationAppService.GetByCodeAsync(item.ToLocationCode).ConfigureAwait(false);
- if (toLocationDto!=null && toLocationDto.Type != EnumLocationType.THIRDPARTY)
- {
- throw new UserFriendlyException($"{item.ItemCode} 目标库位不是三方库库位");
- }
-
- }
-
- }
-
- foreach (var detailInput in input.Details)
- {
- var toLocationDto = await _locationAppService.GetByCodeAsync(detailInput.ToLocationCode).ConfigureAwait(false);
- CheckLocation(toLocationDto, detailInput.ToLocationCode);
-
- var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detailInput.ItemCode).ConfigureAwait(false);
- CheckItemBasic(itemBasicDto, detailInput.ItemCode);
- var balanceNums= await _balanceAppService.GetListByLocationCodeAndItemCodeAsync(detailInput.FromLocationCode, detailInput.ItemCode).ConfigureAwait(false);
- decimal balanceSum = 0;
- foreach (var item in balanceNums)
- {
- balanceSum += item.Qty;
- }
- var expectOutNums= await _expectOutAppService.GetListByItemAsync(detailInput.ItemCode).ConfigureAwait(false);
- decimal expectOutSum = 0;
- foreach (var item in expectOutNums)
- {
- expectOutSum += item.Qty;
- }
- decimal realityBalance = balanceSum - expectOutSum;
- if (detailInput.Qty> realityBalance)
- {
- throw new UserFriendlyException($"{detailInput.ItemCode} 物品的库存为 {realityBalance} ,库存不够");
- }
-
-
- detailInput.ToLocationErpCode = toLocationDto.ErpLocationCode;
-
-
- }
-
-
- await SetRequestAutoPropertiesAsync(input).ConfigureAwait(false);
-
- var entity = ObjectMapper.Map(input);
-
- foreach (var detail in entity.Details)
- {
- var toLocationDto = await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false);
- var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false);
-
- detail.ToLocationArea = toLocationDto.AreaCode;
- detail.ToLocationErpCode = toLocationDto.ErpLocationCode;
- detail.ToLocationGroup = toLocationDto.LocationGroupCode;
- detail.ToWarehouseCode = toLocationDto.WarehouseCode;
- detail.ItemDesc1 = itemBasicDto.Desc1;
- detail.ItemDesc2 = itemBasicDto.Desc2;
- detail.ItemName = itemBasicDto.Name;
- detail.Uom = itemBasicDto.BasicUom;
- detail.StdPackQty = itemBasicDto.StdPackQty;
- detail.IssuedQty = detail.Qty;
- }
-
- var result = await _thirdLocationRequestManager.CreateAsync(entity).ConfigureAwait(false);
-
- var dto = ObjectMapper.Map(result);
-
- return dto;
- }
-
- ///
- /// 用来重写 取消请求
- ///
- ///
- ///
- public override async Task CancelAsync(Guid id)
- {
- var request = await _repository.GetAsync(id).ConfigureAwait(false);
-
- var list = await _thirdLocationJobAppService.GetByRequestNumberAsync(request.Number).ConfigureAwait(false);
- if (list.Any())
- {
- foreach (var thirdLocationJobDto in list)
- {
- if (thirdLocationJobDto.JobStatus == EnumJobStatus.Open)
- {
- await _thirdLocationJobAppService.CancelAsync(thirdLocationJobDto.Id).ConfigureAwait(false);
- }
- else
- {
- throw new UserFriendlyException($"【{thirdLocationJobDto.JobStatus.GetDisplayName()}】状态不允许取消");
- }
- }
- }
-
- if (request.RequestStatus == EnumRequestStatus.Handling ||
- request.RequestStatus == EnumRequestStatus.New)
- {
- request.RequestStatus = EnumRequestStatus.Cancelled;
- await Task.CompletedTask.ConfigureAwait(false);
- await LocalEventBus.PublishAsync(new SfsCancelledEntityEventData(request), false).ConfigureAwait(false);
- await _repository.UpdateAsync(request).ConfigureAwait(false);
-
- }
- else
- {
- throw new UserFriendlyException($"【{request.RequestStatus.GetDisplayName()}】状态不允许取消");
- }
-
- return ObjectMapper.Map(request);
- }
-
- ///
- /// 用来重写 完成请求
- ///
- ///
- ///
- public override async Task CompleteAsync(Guid id)
- {
- var request = await _repository.GetAsync(id).ConfigureAwait(false);
-
- if (request.RequestStatus == EnumRequestStatus.Partial)
- {
- request.RequestStatus = EnumRequestStatus.Completed;
- await Task.CompletedTask.ConfigureAwait(false);
- //await LocalEventBus.PublishAsync(new SfsCompletedEntityEventData(request), false).ConfigureAwait(false);
- await _repository.UpdateAsync(request).ConfigureAwait(false);
-
- }
- else
- {
- throw new UserFriendlyException($"【{request.RequestStatus.GetDisplayName()}】状态不允许取消");
- }
- var entitys = await _thirdLocationJobRepository.GetListAsync(p => p.RequestNumber == request.Number, "", true).ConfigureAwait(false);
-
- if (entitys.Any())
- {
- foreach (var thirdLocationJob in entitys)
- {
- if (thirdLocationJob.JobStatus == EnumJobStatus.Partial)
- {
- thirdLocationJob.JobStatus = EnumJobStatus.Done;
- await Task.CompletedTask.ConfigureAwait(false);
- await LocalEventBus.PublishAsync(new SfsClosedEntityEventData(thirdLocationJob), false).ConfigureAwait(false);
- await _thirdLocationJobRepository.UpdateAsync(thirdLocationJob).ConfigureAwait(false);
- }
- else if (thirdLocationJob.JobStatus == EnumJobStatus.Open)
- {
- thirdLocationJob.JobStatus = EnumJobStatus.Closed;
- await Task.CompletedTask.ConfigureAwait(false);
- await LocalEventBus.PublishAsync(new SfsClosedEntityEventData(thirdLocationJob), false).ConfigureAwait(false);
- await _thirdLocationJobRepository.UpdateAsync(thirdLocationJob).ConfigureAwait(false);
- }
- else
- {
-
- }
- }
- }
-
- return ObjectMapper.Map(request);
- }
-
-
- ///
- /// 赋值Request业务属性
- ///
- ///
- ///
- private async Task SetRequestAutoPropertiesAsync(ThirdLocationRequestEditInput entity)
- {
- var tranType = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.TransferLib, EnumTransSubType.Transfer_Warehouse).ConfigureAwait(false);
-
- Check.NotNull(tranType, "事务类型", "事务类型不存在");
-
-
- entity.AutoSubmit = tranType.AutoSubmitRequest;
- entity.AutoAgree = tranType.AutoAgreeRequest;
- entity.AutoHandle = tranType.AutoHandleRequest;
- entity.AutoCompleteJob = tranType.AutoCompleteJob;
- entity.DirectCreateNote = tranType.DirectCreateNote;
- }
-
- //[Authorize(ThirdLocationRequestPermissions.Create)]
- [HttpPost("create-and-handle")]
- public async Task CreateAndHandleAsync(ThirdLocationRequestEditInput input)
- {
- var thirdLocationRequestDto = await CreateAsync(input).ConfigureAwait(false);
-
- await HandleAsync(thirdLocationRequestDto.Id).ConfigureAwait(false);
-
- return thirdLocationRequestDto;
- }
-
- #endregion
-
- ///
- /// 根据类型 获取叫料申请
- ///
- ///
- ///
- [HttpGet("list/by-type/{type}")]
- public virtual async Task> GetListByTypeAsync(string type)
- {
- var entities = await _repository.GetListAsync(c => c.Type == type).ConfigureAwait(false);
-
- var dtos = ObjectMapper.Map, List>(entities);
-
- return dtos;
- }
-
- #region 导入
-
- ///
- /// 用来重写 导入数据时可以加工数据
- ///
- ///
- ///
- protected override async Task> ImportProcessingEntityAsync(
- Dictionary dictionary)
- {
- var addList = dictionary.Where(p => p.Value == EntityState.Added).Select(p => p.Key);
-
- foreach (var thirdLocationRequest in addList)
- {
- thirdLocationRequest.Worker = CurrentUser.GetUserName();
- thirdLocationRequest.CreatorId = CurrentUser.Id;
- if (thirdLocationRequest.Type == EnumTransSubType.Issue_Manual.GetDisplayName())
- {
- thirdLocationRequest.Type = EnumTransSubType.Issue_Manual.ToString();
- }
-
- foreach (var detail in thirdLocationRequest.Details)
- {
- var locationDto = await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false);
- CheckLocation(locationDto, detail.ToLocationCode);
-
- var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false);
- CheckItemBasic(itemBasicDto, detail.ItemCode);
-
- detail.ToLocationArea = locationDto.AreaCode;
- detail.ToLocationErpCode = locationDto.ErpLocationCode;
- detail.ToLocationGroup = locationDto.LocationGroupCode;
- detail.ToWarehouseCode = locationDto.WarehouseCode;
- detail.ItemDesc1 = itemBasicDto.Desc1;
- detail.ItemDesc2 = itemBasicDto.Desc2;
- detail.ItemName = itemBasicDto.Name;
- detail.Uom = itemBasicDto.BasicUom;
- }
- }
-
- return dictionary;
- }
-
- ///
- /// 导入验证
- ///
- ///
- ///
- ///
- protected override async Task ValidateImportModelAsync(ThirdLocationRequestImportInput model,
- List validationRresult)
- {
- _ = new Dictionary();
- _ = await CheckItemBasicAsync(model, validationRresult).ConfigureAwait(false);
- _ = await CheckLocationAsync(model, validationRresult).ConfigureAwait(false);
- await CheckAreaAsync(model, validationRresult).ConfigureAwait(false);
- await CheckStoreRelationAsync(model, validationRresult).ConfigureAwait(false);
- }
-
- #region 校验
-
- protected override async Task ValidateImportEntities(Dictionary dict)
- {
- foreach (var entity in dict.Keys)
- {
- var tranType = await TransactionTypeAclService
- .GetByTransTypeAsync(EnumTransType.Issue, 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;
- }
-
- return await base.ValidateImportEntities(dict).ConfigureAwait(false);
- }
-
- protected async Task CheckItemBasicAsync(ThirdLocationRequestImportInput importInput,
- List validationRresult)
- {
- var item = await _itemBasicAppService.GetByCodeAsync(importInput.ItemCode).ConfigureAwait(false);
- if (item == null)
- {
- validationRresult.Add(new ValidationResult($"ERP料号{importInput.ItemCode}不存在", new[] { "ERP料号" }));
- }
- else if (item.StdPackQty == 0)
- {
- validationRresult.Add(
- new ValidationResult($"ERP料号{importInput.ItemCode}的物品信息中标准包装等于0或不存在", new[] { "标准包装" }));
- }
-
- return item;
- }
-
- protected async Task CheckLocationAsync(ThirdLocationRequestImportInput importInput,
- List validationRresult)
- {
- var location = await _locationAppService.GetByCodeAsync(importInput.ToLocationCode).ConfigureAwait(false);
- if (location == null)
- {
- validationRresult.Add(new ValidationResult($"目标库位{importInput.ToLocationCode}不存在", new[] { "目标库位" }));
- }
-
- return location;
- }
-
- protected async Task CheckAreaAsync(ThirdLocationRequestImportInput importInput,
- List validationRresult)
- {
- var area = await _areaApp.GetByCodeAsync(importInput.FromLocationArea).ConfigureAwait(false);
- if (area == null)
- {
- validationRresult.Add(new ValidationResult($"调出库区{importInput.FromLocationArea}不存在", new[] { "调出库区" }));
- }
- }
-
- protected async Task CheckStoreRelationAsync(ThirdLocationRequestImportInput importInput,
- List validationRresult)
- {
- var itemStoreRelation = await _itemStoreRelationApp
- .GetFirstAsync(importInput.ItemCode, importInput.ToLocationCode).ConfigureAwait(false);
- if (itemStoreRelation == null)
- {
- validationRresult.Add(new ValidationResult(
- $"ERP料号{importInput.ItemCode}与目标库位{importInput.ToLocationCode}不存在对应关", new[] { "物品库位对应关系" }));
- }
- }
-
- #endregion
-
- #endregion
-
- #region 校验
-
- private void CheckItemBasic(ItemBasicDTO ItemBasicDto, string itemCode)
- {
- if (ItemBasicDto == null)
- {
- throw new UserFriendlyException($"ERP料号为【{itemCode}】不存在");
- }
- }
-
- private void CheckLocation(LocationDTO LocationDto, string LocationCode)
- {
- if (LocationDto == null)
- {
- throw new UserFriendlyException($"库位代码为【{LocationCode}】不存在");
- }
-
- if (LocationDto.Type != EnumLocationType.THIRDPARTY)
- {
- throw new UserFriendlyException($"库位代码【{LocationCode}】不是【{EnumLocationType.THIRDPARTY.GetDisplayName()}】类型");
- }
- }
-
-
- #endregion
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAutoMapperProfile.cs
index 664f4de68..657c21eee 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAutoMapperProfile.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAutoMapperProfile.cs
@@ -30,8 +30,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile
CreateMap()
.IgnoreAuditedObjectProperties()
.ForMember(x => x.Type, y => y.MapFrom(t => t.Type.ToString()))
- .Ignore(x => x.SingleCodeRequest)
- .Ignore(x => x.UseOnTheWayLocation)
.Ignore(x => x.Details)
.Ignore(x => x.Remark)
.Ignore(x => x.TenantId)
@@ -50,13 +48,11 @@ public partial class StoreApplicationAutoMapperProfile : Profile
.Ignore(x => x.ToLocationGroup)
.Ignore(x => x.ItemName).Ignore(x => x.ItemDesc1).Ignore(x => x.ItemDesc2)
.Ignore(x => x.SingleCodeRequest)
- .Ignore(x => x.WorkStation)
+
.Ignore(x => x.ExpiredTime)
.Ignore(x => x.IssuedQty)
.Ignore(x => x.ReceivedQty)
- .Ignore(x => x.ToBeIssuedQty)
- .Ignore(x => x.ToBeReceivedQty)
- .Ignore(x => x.NotFinishQty)
+
.Ignore(x => x.StdPackQty)
.Ignore(x => x.Uom)
.Ignore(x => x.TenantId)
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ThirdLocationJobs/IThirdLocationJobManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ThirdLocationJobs/IThirdLocationJobManager.cs
index 6efac9ee7..1c2745c52 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ThirdLocationJobs/IThirdLocationJobManager.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ThirdLocationJobs/IThirdLocationJobManager.cs
@@ -6,5 +6,5 @@ namespace Win_in.Sfs.Wms.Store.Domain;
public interface IThirdLocationJobManager : IJobManager
{
- Task GetAsync(Expression> expression);
+
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ThirdLocationJobs/ThirdLocationJob.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ThirdLocationJobs/ThirdLocationJob.cs
index 1f8626f8d..8f39f34a5 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ThirdLocationJobs/ThirdLocationJob.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ThirdLocationJobs/ThirdLocationJob.cs
@@ -12,73 +12,41 @@ namespace Win_in.Sfs.Wms.Store.Domain;
[Display(Name = "三方库库移任务")]
public class ThirdLocationJob : SfsJobAggregateRootBase
{
- ///
- /// 叫料请求类型
- ///
- [IgnoreUpdate]
- public string RequestType { get; set; }
-
- ///
- /// 收货单件码
- ///
- [IgnoreUpdate]
- public string SingleCodeJob { get; set; }
-
///
/// 请求单号
///
- [IgnoreUpdate]
+ [Display(Name = "请求单号")]
public string RequestNumber { get; set; }
///
- /// 车间
+ /// 已承接
///
- [IgnoreUpdate]
- public string Workshop { get; set; }
+ ///
+ [Display(Name = "是否已承接")]
+ public bool IsClaims { get; set; }
///
- /// 使用在途库
+ /// 承接人ID
///
- [Display(Name = "使用在途库")]
- [IgnoreUpdate]
- public bool UseOnTheWayLocation { get; set; }
+ ///
+ [Display(Name = "承接人ID")]
+ public string ClaimsUserId { get; set; }
///
- /// 任务明细
+ /// 承接人
///
- [IgnoreUpdate]
- public override List Details { get; set; } = new List();
+ ///
+ [Display(Name = "承接人")]
+ public string ClaimsUserName { get; set; }
///
- /// 设置任务明细的实际库位和实际数量
+ /// 三方库申请类型
///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- public virtual async Task BuildDetail(Guid id, string handledLocationCode, string handledLocationErpCode,
- string handledWarehouseCode, decimal handledQty, string handledSupplierBatch, DateTime handledArriveDate, DateTime handledProduceDate, DateTime handledExpireDate,
- string handledContainerCode, string handledLot, string handledPackingCode)
- {
- var detail = GetDetail(id);
- detail.HandledFromLocationCode = handledLocationCode;
- detail.HandledFromLocationErpCode = handledLocationErpCode;
- detail.HandledFromWarehouseCode = handledWarehouseCode;
- //detail.HandledQty = handledQty;
- detail.HandledSupplierBatch = handledSupplierBatch;
- detail.HandledArriveDate = handledArriveDate;
- detail.HandledProduceDate = handledProduceDate;
- detail.HandledExpireDate = handledExpireDate;
- detail.HandledContainerCode = handledContainerCode;
- detail.HandledLot = handledLot;
- detail.HandledPackingCode = handledPackingCode;
- await Task.CompletedTask.ConfigureAwait(false);
- }
+ [Display(Name = "三方库申请类型")]
+ public string Type { get; set; }
+ ///
+ /// 明细列表
+ ///
+ public override List Details { get; set; } = new();
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ThirdLocationJobs/ThirdLocationJobDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ThirdLocationJobs/ThirdLocationJobDetail.cs
index 55e157862..1dca5a995 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ThirdLocationJobs/ThirdLocationJobDetail.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ThirdLocationJobs/ThirdLocationJobDetail.cs
@@ -1,4 +1,5 @@
using System;
+using System.ComponentModel.DataAnnotations.Schema;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
@@ -7,107 +8,120 @@ namespace Win_in.Sfs.Wms.Store.Domain;
public class ThirdLocationJobDetail : SfsJobRecommendFromDetailEntityBase, IHasToLocation
{
///
- /// 来源库位
+ /// 发出时间
///
- public string FromLocationCode { get; set; }
+ public DateTime IssueTime { get; set; }
///
- /// 来源库区
+ /// 是否在在途
///
- public string FromLocationArea { get; set; }
+ public bool IsOnTheWayLocationCode { get; set; }
+
+ #region 目标库位
///
- /// 到库位
+ /// 到库位
///
public string ToLocationCode { get; set; }
///
- /// 到库区
+ /// 到库区
///
public string ToLocationArea { get; set; }
///
- /// 到库位组
+ /// 到库位组
///
public string ToLocationGroup { get; set; }
///
- /// 到ERP库位
+ /// 到ERP库位
///
public string ToLocationErpCode { get; set; }
///
- /// 到仓库
+ /// 到仓库
///
public string ToWarehouseCode { get; set; }
+ #endregion
+
+ #region 来源库位
+
///
- /// 在途库库位
+ /// 到库位
///
- public string OnTheWayLocationCode { get; set; }
+ public string FromLocationCode { get; set; }
///
- /// 收货单件码
+ /// 到库区
///
- public string SingleCodeJob { get; set; }
+ public string FromLocationArea { get; set; }
///
- /// 申请单件码
+ /// 到库位组
///
- public string SingleCodeRequest { get; set; }
+ public string FromLocationGroup { get; set; }
///
- /// 过期时间
+ /// 到ERP库位
///
- public DateTime ExpiredTime { get; set; }
+ public string FromLocationErpCode { get; set; }
///
- /// 工序
+ /// 到仓库
///
- public string Operation { get; set; }
+ public string FromWarehouseCode { get; set; }
+
+ #endregion
+
+ #region 在途库位
///
- /// 配送方式
+ /// 在途库库位
///
- public EnumDistributionType DistributionType { get; set; }
+ public string OnTheWayLocationCode { get; set; }
+
+ #endregion
///
- /// 取整方式
+ /// 申请单件码
///
- public EnumTruncType TruncType { get; set; }
+ public string SingleCodeRequest { get; set; }
///
- /// 取整后数量
+ /// 已发数量
///
- public decimal RoundedQty { get; set; }
+ public decimal IssuedQty { get; set; }
///
- /// 计划拆分规则
+ /// 已收数量
///
- public EnumPlannedSplitRule PlannedSplitRule { get; set; }
+ public decimal ReceivedQty { get; set; }
///
- /// 计划开始时间
+ /// 箱码
///
- public DateTime PlanBeginTime { get; set; }
+ public string PackingCode { get; set; }
///
- /// 每次配送数量
+ /// 批次
///
- public decimal DeliveryQty { get; set; }
+ public string Lot { get; set; }
///
- /// 位置码
+ /// 过期时间
///
- public string PositionCode { get; set; }
+ public DateTime ExpiredTime { get; set; }
///
- /// 推荐类型
+ /// 库位状态
///
- public EnumRecommendType RecommendType { get; set; }
+ public EnumInventoryStatus EnumInventoryStatus { get; set; }
- public void SetId(Guid id)
- {
- this.Id = id;
- }
+ ///
+ /// 请求未收
+ ///
+ [NotMapped]
+ public decimal NotFinishQty => IssuedQty - ReceivedQty;
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ThirdLocationJobs/ThirdLocationJobManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ThirdLocationJobs/ThirdLocationJobManager.cs
index c175b6355..1d59e901d 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ThirdLocationJobs/ThirdLocationJobManager.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ThirdLocationJobs/ThirdLocationJobManager.cs
@@ -19,101 +19,18 @@ public class ThirdLocationJobManager : SfsJobManagerBase
- /// 执行三方库任务
- ///
- ///
- ///
- ///
- ///
- public override async Task CompleteAsync(ThirdLocationJob input, ICurrentUser user)
- {
- var entity = await Repository.FindAsync(input.Id).ConfigureAwait(false);
-
- foreach (var detail in input.Details)
- {
- //赋值实际收货
- await entity.BuildDetail(detail.Id,
- detail.HandledFromLocationCode,
- detail.HandledFromLocationErpCode,
- detail.HandledFromWarehouseCode,
- detail.HandledQty,
- detail.HandledSupplierBatch,
- detail.HandledArriveDate,
- detail.HandledProduceDate,
- detail.HandledExpireDate,
- detail.HandledContainerCode,
- detail.HandledLot,
- detail.HandledPackingCode).ConfigureAwait(false);
- }
-
-
- bool isDone = false;
- foreach(var jobDetail in entity.Details)
- {
- var inputDetail= input.Details.FirstOrDefault(p=>p.ItemCode== jobDetail.ItemCode);
- jobDetail.HandledQty += inputDetail.HandledQty;
- jobDetail.RecommendQty = jobDetail.RecommendQty - inputDetail.HandledQty;
- jobDetail.SingleCodeJob = inputDetail.SingleCodeJob;
-
- inputDetail.RecommendQty = jobDetail.RecommendQty;
- }
-
- foreach (var item in entity.Details)
- {
- if (item.RecommendQty == 0)
- {
- isDone = true;
- }
- else
- {
- isDone = false;
- }
- }
-
- if (isDone)
- {
- await entity.CompleteAsync(user.Id, user.Name, Clock.Now).ConfigureAwait(false);
-
- await PublishCompletedAsync(input).ConfigureAwait(false);
- return await Repository.UpdateAsync(entity).ConfigureAwait(false);
-
- }
- else
- {
- entity.JobStatus = EnumJobStatus.Partial;
- await PublishCompletedAsync(input).ConfigureAwait(false);
- return await Repository.UpdateAsync(entity).ConfigureAwait(false);
- }
- }
-
public override void CheckDetails(ThirdLocationJob entity, AbpValidationResult result)
{
- var details = entity.Details;
- foreach (var detail in details)
- {
- if (detail.HandledFromLocationCode == null)
- {
- result.Errors.Add(new ValidationResult($"{detail.HandledFromLocationCode} 不能为空"));
- }
-
- }
+ throw new NotImplementedException();
}
- public override async Task> GetWorkingListByPackingAsync(string packingCode)
+ public override Task> GetWorkingListByPackingAsync(string packingCode)
{
- return await Repository.GetListAsync(c => c.Details.Any(p => p.RecommendPackingCode == packingCode) && c.JobStatus != EnumJobStatus.Closed && c.JobStatus != EnumJobStatus.Cancelled, true).ConfigureAwait(false);
-
+ throw new NotImplementedException();
}
- public override async Task> GetWorkingListByContainerAsync(string containerCode)
- {
- return await Repository.GetListAsync(c => c.Details.Any(p => p.RecommendContainerCode == containerCode) && c.JobStatus != EnumJobStatus.Closed && c.JobStatus != EnumJobStatus.Cancelled, true).ConfigureAwait(false);
-
- }
-
- public async Task GetAsync(Expression> expression)
+ public override Task> GetWorkingListByContainerAsync(string containerCode)
{
- return await Repository.FindAsync(expression).ConfigureAwait(false);
+ throw new NotImplementedException();
}
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/IThirdLocationNoteManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/IThirdLocationNoteManager.cs
index 745ce7a8c..dd39812c2 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/IThirdLocationNoteManager.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/IThirdLocationNoteManager.cs
@@ -5,6 +5,4 @@ namespace Win_in.Sfs.Wms.Store.Domain;
public interface IThirdLocationNoteManager : ISfsStoreManager
{
- Task ConfirmAsync(Guid id);
-
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNote.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNote.cs
index 877bdfd72..b4846d676 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNote.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNote.cs
@@ -1,78 +1,65 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
-using Volo.Abp;
-using Win_in.Sfs.Shared.Domain.Entities;
namespace Win_in.Sfs.Wms.Store.Domain;
///
-/// 三方库库移记录
+/// 三方库库移记录
///
public class ThirdLocationNote : SfsStoreAggregateRootBase, IHasJobNumber, IHasRequestNumber
{
///
- /// 任务ID
+ /// 发出时间
///
- [IgnoreUpdate]
- public string JobNumber { get; set; }
-
+ public DateTime IssueTime { get; set; }
///
- /// 车间
+ /// 接收时间
///
- [IgnoreUpdate]
- public string Workshop { get; set; }
+ public DateTime ReceiptTime { get; set; }
///
- /// 明细列表
+ /// 请求单号
///
- [IgnoreUpdate]
- public override List Details { get; set; } = new List();
-
- [IgnoreUpdate]
+ [Display(Name = "请求单号")]
public string RequestNumber { get; set; }
///
- /// 叫料请求类型
+ /// 任务单号
///
- [IgnoreUpdate]
- public string RequestType { get; set; }
+ [Display(Name = "任务单号")]
+ public string JobNumber { get; set; }
///
- /// 使用在途库
+ /// 已承接
///
- [IgnoreUpdate]
- public bool UseOnTheWayLocation { get; set; }
+ ///
+ [Display(Name = "是否已承接")]
+ public bool IsClaims { get; set; }
///
- /// 确认时间
+ /// 承接人ID
///
- [Display(Name = "确认时间")]
- [IgnoreUpdate]
- public DateTime? ConfirmTime { get; set; }
+ ///
+ [Display(Name = "承接人ID")]
+ public string ClaimsUserId { get; set; }
///
- /// 已确认
+ /// 承接人
///
- [Display(Name = "已确认")]
- public bool Confirmed { get; set; }
-
- public void Confirm(DateTime confirmTime)
- {
-
- CheckStatus(Confirmed);
- Confirmed = true;
- ConfirmTime = confirmTime;
- }
+ ///
+ [Display(Name = "承接人")]
+ public string ClaimsUserName { get; set; }
- private static void CheckStatus(bool confirmed)
- {
- if (confirmed)
- {
- throw new UserFriendlyException($"当前状态为 【已确认】 ,无法再次确认!");
- }
-
- }
+ ///
+ /// 三方库申请类型
+ ///
+ [Display(Name = "三方库申请类型")]
+ public string Type { get; set; }
+ ///
+ /// 明细列表
+ ///
+ public override List Details { get; set; } = new();
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNoteDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNoteDetail.cs
index 89298bbdf..6b3c11259 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNoteDetail.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNoteDetail.cs
@@ -1,43 +1,116 @@
using System;
+using System.ComponentModel.DataAnnotations.Schema;
using Win_in.Sfs.Shared.Domain.Shared;
namespace Win_in.Sfs.Wms.Store.Domain;
public class ThirdLocationNoteDetail : SfsStoreRecommendFromDetailWithFromToEntityBase
{
+ #region 目标库位
///
- /// 发出时间
+ /// 到库位
///
- public DateTime IssueTime { get; set; }
+ public string ToLocationCode { get; set; }
///
- /// 过期时间
+ /// 到库区
///
- public DateTime ExpiredTime { get; set; }
+ public string ToLocationArea { get; set; }
///
- /// 收货单件码
+ /// 到库位组
///
- public string SingleCodeJob { get; set; }
+ public string ToLocationGroup { get; set; }
///
- /// 申请单件码
+ /// 到ERP库位
///
- public string SingleCodeRequest { get; set; }
+ public string ToLocationErpCode { get; set; }
+
+ ///
+ /// 到仓库
+ ///
+ public string ToWarehouseCode { get; set; }
+
+ #endregion
+
+ #region 来源库位
+
+ ///
+ /// 到库位
+ ///
+ public string FromLocationCode { get; set; }
///
- /// 在途库库位
+ /// 到库区
+ ///
+ public string FromLocationArea { get; set; }
+
+ ///
+ /// 到库位组
+ ///
+ public string FromLocationGroup { get; set; }
+
+ ///
+ /// 到ERP库位
+ ///
+ public string FromLocationErpCode { get; set; }
+
+ ///
+ /// 到仓库
+ ///
+ public string FromWarehouseCode { get; set; }
+
+ #endregion
+
+ #region 在途库位
+
+ ///
+ /// 在途库库位
///
public string OnTheWayLocationCode { get; set; }
+ #endregion
+
+ ///
+ /// 申请单件码
+ ///
+ public string SingleCodeRequest { get; set; }
+
+ ///
+ /// 已发数量
+ ///
+ public decimal IssuedQty { get; set; }
+
+ ///
+ /// 已收数量
+ ///
+ public decimal ReceivedQty { get; set; }
+
+ ///
+ /// 箱码
+ ///
+ public string PackingCode { get; set; }
+
+ ///
+ /// 批次
+ ///
+ public string Lot { get; set; }
+
+ ///
+ /// 过期时间
+ ///
+ public DateTime ExpiredTime { get; set; }
+
///
- /// 位置码
+ /// 库位状态
///
- public string PositionCode { get; set; }
+ public EnumInventoryStatus EnumInventoryStatus { get; set; }
///
- /// 推荐类型
+ /// 请求未收
///
- public EnumRecommendType RecommendType { get; set; }
+ [NotMapped]
+ public decimal NotFinishQty => IssuedQty - ReceivedQty;
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNoteManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNoteManager.cs
index d71b82c3e..549067573 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNoteManager.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNoteManager.cs
@@ -15,28 +15,4 @@ public class ThirdLocationNoteManager : SfsStoreManagerBase ConfirmAsync(Guid id)
- {
- var entity = await Repository.FindAsync(id).ConfigureAwait(false);
- Check.NotNull(entity, EntityClassName);
- entity.Confirm(Clock.Now);
- await PublishConfirmedAsync(entity).ConfigureAwait(false);
- return await Repository.UpdateAsync(entity).ConfigureAwait(false);
- }
- private async Task PublishConfirmedAsync(ThirdLocationNote entity)
- {
- try
- {
- await LocalEventBus.PublishAsync(new SfsConfirmedEntityEventData(entity), false).ConfigureAwait(false);
- }
- catch (Exception ex)
- {
- Logger.LogDebug($"{nameof(ThirdLocationNote)} Confirmed Event:{ex.Message}", null);
- Console.WriteLine(ex.Source);
- throw;
- }
- }
-
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/AssembleIssueRequests/AssembleIssueRequestDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/AssembleIssueRequests/AssembleIssueRequestDetail.cs
index 0a811be58..502ea2bfe 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/AssembleIssueRequests/AssembleIssueRequestDetail.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/IssueRequests/AssembleIssueRequests/AssembleIssueRequestDetail.cs
@@ -46,7 +46,6 @@ public class AssembleIssueRequestDetail : SfsStoreDetailWithQtyEntityBase, IHasT
#endregion
-
///
/// 生产线
///
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/IThirdLocationRequestManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/IThirdLocationRequestManager.cs
index d17413a2a..02b71010a 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/IThirdLocationRequestManager.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/IThirdLocationRequestManager.cs
@@ -8,9 +8,4 @@ public interface IThirdLocationRequestManager : ISfsStoreRequestManager
{
- Task UpdateDetailsAsync(ThirdLocationRequest entity);
-
- Task CompleteAsync(string number);
-
- Task CreateBynNumberAsync(ThirdLocationRequest entity);
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequest.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequest.cs
index 37e71c87c..d9e0965dc 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequest.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequest.cs
@@ -1,35 +1,16 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
-using Win_in.Sfs.Shared.Domain.Entities;
namespace Win_in.Sfs.Wms.Store.Domain;
///
-/// 三方库移库申请
+/// 三方库移库申请
///
public class ThirdLocationRequest : SfsStoreRequestAggregateRootBase
{
///
- /// 叫料类型
+ /// 三方库申请类型
///
- [Display(Name = "叫料类型")]
- [IgnoreUpdate]
+ [Display(Name = "三方库申请类型")]
public string Type { get; set; }
-
- ///
- /// 申请单件码
- ///
- [IgnoreUpdate]
- public string SingleCodeRequest { get; set; }
-
- ///
- /// 使用在途库
- ///
- public bool UseOnTheWayLocation { get; set; }
-
- ///
- /// 明细列表
- ///
- [IgnoreUpdate]
- public override List Details { get; set; } = new List();
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequestDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequestDetail.cs
index f63e5298b..f2d59d85f 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequestDetail.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequestDetail.cs
@@ -6,104 +6,109 @@ using Win_in.Sfs.Shared.Domain.Shared;
namespace Win_in.Sfs.Wms.Store.Domain;
///
-/// 三方库申请明细
+/// 三方库申请明细
///
public class ThirdLocationRequestDetail : SfsStoreDetailWithQtyEntityBase, IHasToLocation
{
+ #region 目标库位
+
///
- /// 到库位
+ /// 到库位
///
public string ToLocationCode { get; set; }
///
- /// 到库区
+ /// 到库区
///
public string ToLocationArea { get; set; }
///
- /// 到库位组
+ /// 到库位组
///
public string ToLocationGroup { get; set; }
///
- /// 到ERP库位
+ /// 到ERP库位
///
public string ToLocationErpCode { get; set; }
///
- /// 到仓库
+ /// 到仓库
///
public string ToWarehouseCode { get; set; }
+ #endregion
+
+ #region 来源库位
+
///
- /// 来源库位
+ /// 到库位
///
public string FromLocationCode { get; set; }
///
- /// 来源库区
+ /// 到库区
///
public string FromLocationArea { get; set; }
-
-
///
- /// 在途库库位
+ /// 到库位组
///
- public string OnTheWayLocationCode { get; set; }
+ public string FromLocationGroup { get; set; }
///
- /// 申请单件码
+ /// 到ERP库位
///
- public string SingleCodeRequest { get; set; }
+ public string FromLocationErpCode { get; set; }
///
- /// 工作中心
+ /// 到仓库
///
- public string WorkStation { get; set; }
+ public string FromWarehouseCode { get; set; }
+
+ #endregion
+
+ #region 在途库位
///
- /// 过期时间
+ /// 在途库库位
///
- public DateTime ExpiredTime { get; set; }
+ public string OnTheWayLocationCode { get; set; }
+
+ #endregion
///
- /// 已发数量
+ /// 申请单件码
///
- public decimal IssuedQty { get; set; }
+ public string SingleCodeRequest { get; set; }
///
- /// 已收数量
+ /// 已发数量
///
- public decimal ReceivedQty { get; set; }
-
-
+ public decimal IssuedQty { get; set; }
///
- /// 请求未发 还未发送的数量
+ /// 已收数量
///
- [NotMapped]
- public decimal ToBeIssuedQty => Qty - IssuedQty;
+ public decimal ReceivedQty { get; set; }
///
- /// 已发未收
+ /// 箱码
///
- [NotMapped]
- public decimal ToBeReceivedQty => IssuedQty - ReceivedQty;
+ public string PackingCode { get; set; }
///
- /// 请求未收
+ /// 批次
///
- [NotMapped]
- public decimal NotFinishQty => Qty - ReceivedQty;
+ public string Lot { get; set; }
///
- /// 位置码
+ /// 过期时间
///
- public string PositionCode { get; set; }
+ public DateTime ExpiredTime { get; set; }
///
- /// 推荐类型
+ /// 库位状态
///
- public EnumRecommendType RecommendType { get; set; }
+ public EnumInventoryStatus EnumInventoryStatus { get; set; }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequestManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequestManager.cs
index 39543242c..dd04c88bc 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequestManager.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequestManager.cs
@@ -25,124 +25,8 @@ public class ThirdLocationRequestManager
}
-
- #region 东阳V2
-
- #endregion
-
-
- ///
- /// 创建
- ///
- ///
- ///
- public virtual async Task CreateBynNumberAsync(ThirdLocationRequest entity)
- {
- var number = string.IsNullOrEmpty(entity.Number) ? await GenerateNumberAsync(nameof(ThirdLocationRequest), entity.ActiveDate).ConfigureAwait(false) : entity.Number;
- entity.SetIdAndNumberWithDetails(GuidGenerator, number);
- entity.Submit();
- entity.Agree();
- entity.RequestStatus = EnumRequestStatus.Partial;
- await LocalEventBus.PublishAsync(new SfsHandledEntityEventData(entity), false)
- .ConfigureAwait(false);
- await _repository.InsertAsync(entity).ConfigureAwait(false);
- return entity;
- }
-
- public virtual async Task UpdateDetailsAsync(ThirdLocationRequest newEntity)
- {
- var oldEntity = await Repository.FindAsync(newEntity.Id, true).ConfigureAwait(false);
- if(oldEntity!=null)
- {
- foreach (var newDetail in newEntity.Details)
- {
- oldEntity.ReplaceDetail(newDetail.Id, newDetail);
- }
-
- foreach (var detail in oldEntity.Details)
- {
- SetMaterialRequestDetailStatus(detail);
- }
-
- await SetMaterialRequestStatusAsync(oldEntity).ConfigureAwait(false);
-
- await Repository.UpdateAsync(oldEntity).ConfigureAwait(false);
- }
-
- }
-
- private void SetMaterialRequestDetailStatus(ThirdLocationRequestDetail detail)
+ public Task ImportDataAsync(List entities, List deleteEntities = null)
{
- //if (detail.ReceivedQty >= detail.Qty)//执行的时候 实际收料 多余 要料数
- //{
- // detail.Status = EnumStatus.Close;
- //}
- //else
- //{
- // detail.Status = EnumStatus.Open;
- //}
+ throw new NotImplementedException();
}
-
- private async Task SetMaterialRequestStatusAsync(ThirdLocationRequest materialRequest)
- {
- //if (materialRequest.Details.All(p => p.Status == EnumStatus.Close))
- //{
- // materialRequest.RequestStatus = EnumRequestStatus.Completed;
- //}
- //else
- //{
- // var issueJobs = await _issueJobRepository.GetListAsync(t => t.MaterialRequestNumber == materialRequest.Number).ConfigureAwait(false);
- // if (issueJobs.Count > 0)
- // {
- // if (issueJobs.All(t => t.JobStatus is EnumJobStatus.Done or EnumJobStatus.Closed or EnumJobStatus.Cancelled))
- // {
- // if (materialRequest.Details.All(p => p.ReceivedQty >= p.Qty))
- // {
- // materialRequest.RequestStatus = EnumRequestStatus.Completed;
- // }
- // else
- // {
- // materialRequest.RequestStatus = EnumRequestStatus.Partial;
- // }
- // }
- // else
- // {
- // materialRequest.RequestStatus = EnumRequestStatus.Partial;
- // }
- // }
- // else
- // {
- // materialRequest.RequestStatus = EnumRequestStatus.Partial;
- // }
- //}
-
- }
-
- public virtual async Task CompleteAsync(string number)
- {
- var entity = await GetByNumberAsync(number).ConfigureAwait(false);
- if (entity != null && !entity.Details.Any(p => p.ToBeIssuedQty > 0))
- {
- await CompleteAsync(entity).ConfigureAwait(false);
- }
- }
-
-
- #region 导入
-
- ///
- /// 执行导入
- ///
- public virtual async Task ImportDataAsync(List mergeEntities, List deleteEntities = null)
- {
- if (deleteEntities != null && deleteEntities.Count > 0)
- {
- await _repository.BulkDeleteAsync(deleteEntities).ConfigureAwait(false);
- }
-
- await CreateManyAsync(mergeEntities).ConfigureAwait(false);
- }
-
- #endregion
-
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/ThirdLocationJobs/ThirdLocationJobDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/ThirdLocationJobs/ThirdLocationJobDbContextModelCreatingExtensions.cs
index cd357a1c9..3272f0bc4 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/ThirdLocationJobs/ThirdLocationJobDbContextModelCreatingExtensions.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/ThirdLocationJobs/ThirdLocationJobDbContextModelCreatingExtensions.cs
@@ -21,10 +21,7 @@ public static class ThirdLocationJobDbContextModelCreatingExtensions
//Configure Job base properties
b.ConfigureJob();
//Properties
- b.Property(q => q.RequestType).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.RequestNumber).HasMaxLength(SfsPropertyConst.CodeLength);
- b.Property(q => q.Workshop).HasMaxLength(SfsPropertyConst.CodeLength);
- b.Property(q => q.SingleCodeJob).HasMaxLength(SfsPropertyConst.CodeLength);
//Relations
b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired();
//Indexes
@@ -50,16 +47,9 @@ public static class ThirdLocationJobDbContextModelCreatingExtensions
b.Property(q => q.ToLocationGroup).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.FromLocationCode).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.FromLocationArea).HasMaxLength(SfsPropertyConst.CodeLength);
- b.Property(q => q.SingleCodeJob).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.SingleCodeRequest).HasMaxLength(SfsPropertyConst.CodeLength);
- b.Property(q => q.Operation).HasMaxLength(SfsPropertyConst.CodeLength);
- b.Property(q => q.DistributionType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion();
- b.Property(q => q.TruncType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion();
- b.Property(q => q.PlannedSplitRule).HasMaxLength(SfsPropertyConst.NameLength).HasConversion();
b.Property(q => q.OnTheWayLocationCode).HasMaxLength(SfsPropertyConst.CodeLength);
- b.Property(q => q.PositionCode).HasMaxLength(SfsPropertyConst.CodeLength);
- b.Property(q => q.RecommendType).HasMaxLength(SfsPropertyConst.CodeLength).HasConversion();
-
+
//Relations
//None
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240614074403_Added_ThirdLocation.Designer.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240614074403_Added_ThirdLocation.Designer.cs
new file mode 100644
index 000000000..f65b81573
--- /dev/null
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240614074403_Added_ThirdLocation.Designer.cs
@@ -0,0 +1,34547 @@
+//
+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("20240614074403_Added_ThirdLocation")]
+ partial class Added_ThirdLocation
+ {
+ 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