From 7cc45c64147e0cbfef8a5afc4019b27c7be6bb0d Mon Sep 17 00:00:00 2001
From: zhouhongjun <565221961@qq.com>
Date: Mon, 15 Apr 2024 11:51:27 +0800
Subject: [PATCH 1/6] =?UTF-8?q?PDA=E7=AB=AF=E5=A2=9E=E5=8A=A0=E6=B3=A8?=
=?UTF-8?q?=E5=A1=91=E5=8F=AB=E6=96=99=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Jobs/InjectionJobController.cs | 195 ++++++++++++++++++
.../Stores/InjectionNoteController.cs | 38 ++++
.../Stores/InjectionRequestController.cs | 51 +++++
.../Stores/ThirdLocationNoteController.cs | 2 +-
.../InjectionRequestAppService.cs | 33 ++-
.../InjectionRequestDetail.cs | 6 +-
6 files changed, 310 insertions(+), 15 deletions(-)
create mode 100644 be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/InjectionJobController.cs
create mode 100644 be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionNoteController.cs
create mode 100644 be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionRequestController.cs
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/InjectionJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/InjectionJobController.cs
new file mode 100644
index 000000000..150bfd5f9
--- /dev/null
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/InjectionJobController.cs
@@ -0,0 +1,195 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text.Json;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Polly.Caching;
+using Volo.Abp;
+using Volo.Abp.Application.Dtos;
+using Volo.Abp.AspNetCore.Mvc;
+using Win_in.Sfs.Auth.Application.Contracts;
+using Win_in.Sfs.Basedata.Application.Contracts;
+using Win_in.Sfs.Shared.Domain;
+using Win_in.Sfs.Shared.Domain.Shared;
+using Win_in.Sfs.Wms.Inventory.Application.Contracts;
+using Win_in.Sfs.Wms.Store.Application.Contracts;
+
+namespace Win_in.Sfs.Wms.Pda.Controllers.Jobs;
+
+///
+/// 注塑叫料任务
+///
+[ApiController]
+[Route($"{PdaHostConst.ROOT_ROUTE}job/injection")]
+public class InjectionJobController : AbpController
+{
+ private readonly IInjectionJobAppService _injectionJobAppService;
+
+ private readonly IUserWorkGroupAppService _userWorkGroupAppService;
+
+ private readonly IDictAppService _dictApp;
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public InjectionJobController(
+ IInjectionJobAppService injectionJobAppService,
+ IDictAppService dictApp
+ , IUserWorkGroupAppService userWorkGroupAppService)
+ {
+ _userWorkGroupAppService = userWorkGroupAppService;
+ _injectionJobAppService = injectionJobAppService;
+ _dictApp = dictApp;
+ }
+
+ ///
+ /// 获取任务详情
+ ///
+ ///
+ ///
+ [HttpGet("{id}")]
+
+ public virtual async Task> GetAsync(Guid id)
+ {
+ var result = await _injectionJobAppService.GetAsync(id).ConfigureAwait(false);
+ return Ok(result);
+ }
+
+ ///
+ /// 获取列表 筛选
+ ///
+ ///
+ ///
+ [HttpPost("list")]
+ public virtual async Task> GetListAsync(SfsJobRequestInputBase sfsRequestDTO)
+ {
+ var list = await _injectionJobAppService.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 };
+ var jsonStatus = JsonSerializer.Serialize(status);
+
+ var request = new SfsJobRequestInputBase
+ {
+ MaxResultCount = pageSize,
+ SkipCount = (pageIndex - 1) * pageSize,
+ Sorting = $"{nameof(InjectionJobDTO.CreationTime)} ASC",
+ Condition = new Condition
+ {
+ Filters = new List
+ {
+ new(nameof(IssueJobDTO.JobStatus),jsonStatus,"In")
+ }
+ }
+
+ };
+
+ var list = await _injectionJobAppService.GetPagedListByFilterAsync(request, true).ConfigureAwait(false);
+
+
+ return list;
+ }
+
+ ///
+ /// 根据Job Number 获取任务列表
+ ///
+ ///
+ ///
+ [HttpGet("by-number/{jobNumber}")]
+ public virtual async Task> GetByNumberAsync(string jobNumber)
+ {
+ var jobDto = await _injectionJobAppService.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 };
+ var jsonStatus = JsonSerializer.Serialize(status);
+
+ var request = new SfsJobRequestInputBase
+ {
+ Sorting = $"{nameof(InjectionJobDTO.Priority)} ASC",
+ Condition = new Condition
+ {
+ Filters = new List
+ {
+ new(nameof(InjectionJobDTO.WorkGroupCode),jsonCodes,"In"),
+ new(nameof(InjectionJobDTO.JobStatus),jsonStatus,"In")
+ }
+ }
+ };
+
+ var count = await _injectionJobAppService.GetCountByFilterAsync(request).ConfigureAwait(false);
+
+ return Ok(count);
+ }
+
+ ///
+ /// 承接任务
+ ///
+ ///
+ ///
+ [HttpPost("take/{id}")]
+ public virtual async Task TakeAsync(Guid id)
+ {
+ await _injectionJobAppService.AcceptAsync(id).ConfigureAwait(false);
+ }
+
+ ///
+ /// 取消承接任务
+ ///
+ ///
+ ///
+ [HttpPost("cancel-take/{id}")]
+ public virtual async Task CancelTakeAsync(Guid id)
+ {
+ await _injectionJobAppService.CancelAcceptAsync(id).ConfigureAwait(false);
+ }
+
+ ///
+ /// 执行任务
+ ///
+ ///
+ ///
+ ///
+ [HttpPost("finish/{id}")]
+ public virtual async Task FinishAsync(Guid id, [FromBody] InjectionJobDTO dto)
+ {
+ await _injectionJobAppService.CompleteAsync(id, dto).ConfigureAwait(false);
+ }
+}
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionNoteController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionNoteController.cs
new file mode 100644
index 000000000..9039a343f
--- /dev/null
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionNoteController.cs
@@ -0,0 +1,38 @@
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Volo.Abp.AspNetCore.Mvc;
+using Win_in.Sfs.Wms.Store.Application.Contracts;
+
+namespace Win_in.Sfs.Wms.Pda.Controllers.Stores;
+
+///
+/// 注塑叫料记录
+///
+[ApiController]
+[Route($"{PdaHostConst.ROOT_ROUTE}store/injection-note")]
+
+public class InjectionNoteController : AbpController
+{
+ private readonly IInjectionNoteAppService _injectionNoteAppService;
+
+ ///
+ ///
+ ///
+ ///
+ public InjectionNoteController(IInjectionNoteAppService injectionNoteAppService)
+ {
+ _injectionNoteAppService = injectionNoteAppService;
+ }
+
+ ///
+ /// 创建注塑叫料记录
+ ///
+ /// CreateInput
+ ///
+ [HttpPost("")]
+ public virtual async Task CreateAsync(InjectionNoteEditInput input)
+ {
+ await _injectionNoteAppService.CreateAsync(input).ConfigureAwait(false);
+ }
+
+}
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionRequestController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionRequestController.cs
new file mode 100644
index 000000000..e3ddeda50
--- /dev/null
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionRequestController.cs
@@ -0,0 +1,51 @@
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Volo.Abp.AspNetCore.Mvc;
+using Win_in.Sfs.Wms.Store.Application.Contracts;
+
+namespace Win_in.Sfs.Wms.Pda.Controllers.Stores;
+
+///
+/// 注塑叫料请求
+///
+[ApiController]
+[Route($"{PdaHostConst.ROOT_ROUTE}store/injection-request")]
+
+public class InjectionRequestController : AbpController
+{
+ private readonly IInjectionRequestAppService _injectionRequestAppService;
+
+ ///
+ ///
+ ///
+ ///
+ public InjectionRequestController(IInjectionRequestAppService InjectionRequestAppService)
+ {
+ _injectionRequestAppService = InjectionRequestAppService;
+ }
+
+ ///
+ /// 注塑叫料申请
+ ///
+ ///
+ ///
+ [HttpPost("")]
+ public virtual async Task CreateAsync(InjectionRequestEditInput input)
+ {
+ _ = await _injectionRequestAppService.CreateAsync(input).ConfigureAwait(false);
+ }
+
+ ///
+ /// 根据number获取注塑叫料申请详情
+ ///
+ ///
+ ///
+ [HttpGet("{number}")]
+
+ public virtual async Task> GetAsync(string number)
+ {
+ var result = await _injectionRequestAppService.GetByNumberAsync(number).ConfigureAwait(false);
+ return Ok(result);
+ }
+
+}
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 9006c134d..0e6e03ead 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
@@ -25,7 +25,7 @@ public class ThirdLocationNoteController : AbpController
}
///
- /// 创建器具转移记录
+ /// 创建三方库转移记录
///
/// CreateInput
///
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/InjectionRequests/InjectionRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/InjectionRequests/InjectionRequestAppService.cs
index b65620308..4286f8906 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/InjectionRequests/InjectionRequestAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/InjectionRequests/InjectionRequestAppService.cs
@@ -15,6 +15,7 @@ using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.ObjectMapping;
+using Win_in.Sfs.Basedata.Application;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
@@ -39,7 +40,8 @@ public class InjectionRequestAppService : SfsStoreRequestAppServiceBase(input);
var result = await _injectionRequestManager.CreateByNumberAsync(entity).ConfigureAwait(false);
@@ -116,6 +115,22 @@ public class InjectionRequestAppService : SfsStoreRequestAppServiceBase
+ /// 赋值Request业务属性
+ ///
+ ///
+ ///
+ private async Task SetRequestAutoPropertiesAsync(InjectionRequestEditInput entity)
+ {
+ var tranType = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None).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;
+ }
+
[HttpPost("create-and-handle")]
public async Task CreateAndHandleAsync(InjectionRequestEditInput input)
{
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/InjectionRequestDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/InjectionRequestDetail.cs
index 2f4759c3a..220f3254c 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/InjectionRequestDetail.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/InjectionRequestDetail.cs
@@ -45,11 +45,7 @@ public class InjectionRequestDetail : SfsStoreDetailWithQtyEntityBase, IHasToLoc
public string ToWarehouseCode { get; set; }
#endregion
-
- // ///
- // /// 在途库库位
- // ///
- // public string OnTheWayLocationCode { get; set; }
+
///
/// 生产线
From 718fd8c021e16b373a97c5cd0ea4e5de70576ee9 Mon Sep 17 00:00:00 2001
From: "boxu.zheng"
Date: Mon, 15 Apr 2024 13:15:08 +0800
Subject: [PATCH 2/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B3=A8=E5=A1=91=20?=
=?UTF-8?q?=E5=8F=91=E6=96=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Balances/IBalanceAppService.cs | 13 ++---
.../Balances/BalanceAppService.cs | 20 +++++---
.../InjectionJobs/InjectionJobManager.cs | 49 +++++++++++++------
.../Requests/InjectionRequestEventHandler.cs | 5 ++
4 files changed, 60 insertions(+), 27 deletions(-)
diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/Balances/IBalanceAppService.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/Balances/IBalanceAppService.cs
index 9be64b26d..f5fd91884 100644
--- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/Balances/IBalanceAppService.cs
+++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/Balances/IBalanceAppService.cs
@@ -110,12 +110,6 @@ public interface IBalanceAppService
Task> GetByHoldLocationCodeAndNoOkAsync(SfsInventoryRequestInputBase sfsRequestDTO, bool includeDetails = false,
CancellationToken cancellationToken = default);
- ///
- /// 获取 【实际库存余额】(不包含预计入,抛出预计出)
- ///
- ///
- Task GetRealQtyByPackingCodeAndItemCodeAndLocationCodeAndStatusAsync(string packingCode, string itemCode, string locationCode, EnumInventoryStatus status);
-
Task> GetListByLocationCodeAndItemCodeAsync(string locationCode, string itemCode);
Task> GetListByLocationCodeAndStatusAsync(string locationCode, EnumInventoryStatus status);
@@ -174,4 +168,11 @@ public interface IBalanceAppService
///
///
Task> GetUsableListAsync(RecommendBalanceRequestInput input);
+
+ ///
+ /// 获取 【实际库存余额】(不包含预计入,计算了预计出)
+ ///
+ ///
+ Task GetRealQtyByPackingCodeAndItemCodeAndLocationCodeAndStatusAsync(string packingCode,
+ string itemCode, string locationCode, EnumInventoryStatus status,string lot);
}
diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs
index a38fc1c14..ba9815c9b 100644
--- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs
+++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs
@@ -39,6 +39,7 @@ public class BalanceAppService
private readonly IBalanceManager _balanceManager;
private readonly IItemBasicAppService _itemBasicAppService;
private readonly IStdCostPriceSheetAppService _stdCostPriceSheetAppService;
+ private readonly IExpectOutAppService _expectOutAppService;
public BalanceAppService(
IBalanceRepository repository,
@@ -47,7 +48,8 @@ public class BalanceAppService
ILocationAclService locationAclService,
IItemBasicAclService itemBasicAclService,
IItemBasicAppService itemBasicAppService,
- IStdCostPriceSheetAppService stdCostPriceSheetAppService) : base(repository)
+ IStdCostPriceSheetAppService stdCostPriceSheetAppService,
+ IExpectOutAppService expectOutAppService) : base(repository)
{
_repository = repository;
_transferLogManager = transferLogManager;
@@ -56,6 +58,7 @@ public class BalanceAppService
_itemBasicAclService = itemBasicAclService;
_itemBasicAppService = itemBasicAppService;
_stdCostPriceSheetAppService = stdCostPriceSheetAppService;
+ _expectOutAppService = expectOutAppService;
}
#region Update
@@ -803,12 +806,12 @@ public class BalanceAppService
}
///
- /// 获取 【实际库存余额】(不包含预计入,抛出预计出)
+ /// 获取 【实际库存余额】(不包含预计入,计算了预计出)
///
///
- [HttpPost("get-real-qty-by-packing-and-item-and-location-and-status")]
+ [HttpPost("get-real-qty-by-packing-and-item-and-location-and-status-and-lot")]
public async Task GetRealQtyByPackingCodeAndItemCodeAndLocationCodeAndStatusAsync(string packingCode,
- string itemCode, string locationCode, EnumInventoryStatus status)
+ string itemCode, string locationCode, EnumInventoryStatus status,string lot)
{
var entity = await _repository.FirstOrDefaultAsync(c =>
c.PackingCode == packingCode && c.ItemCode == itemCode && c.LocationCode == locationCode &&
@@ -818,9 +821,14 @@ public class BalanceAppService
throw new UserFriendlyException($"未找到箱码为 {packingCode},物料代码为 {itemCode},库位代码为 {locationCode} 的库存");
}
- //TODO 减去预计出
-
+ var expectOutDtos=await _expectOutAppService.GetListByItemCodeAndStatusAndPackingCodeAsync(itemCode,locationCode,packingCode,status,lot).ConfigureAwait(false);
var dto = ObjectMapper.Map(entity);
+
+ foreach (var expectOutDto in expectOutDtos)
+ {
+ dto.Qty -= expectOutDto.Qty;
+ }
+
return dto;
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/InjectionJobManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/InjectionJobManager.cs
index 349e5d32e..8d953c3a6 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/InjectionJobManager.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/InjectionJobManager.cs
@@ -4,19 +4,24 @@ using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
+using Volo.Abp;
using Volo.Abp.Users;
using Volo.Abp.Validation;
using Win_in.Sfs.Shared.Domain.Shared;
+using Win_in.Sfs.Wms.Inventory.Application.Contracts;
namespace Win_in.Sfs.Wms.Store.Domain;
public class InjectionJobManager : SfsJobManagerBase, IInjectionJobManager
{
+ private readonly IBalanceAppService _balanceAppService;
+ private readonly IExpectOutAppService _expectOutAppService;
public InjectionJobManager(
- IInjectionJobRepository repository
- ) : base(repository)
+ IInjectionJobRepository repository, IBalanceAppService balanceAppService, IExpectOutAppService expectOutAppService) : base(repository)
{
+ _balanceAppService = balanceAppService;
+ _expectOutAppService = expectOutAppService;
}
///
@@ -33,6 +38,28 @@ public class InjectionJobManager : SfsJobManagerBase GetAsync(Expression> expression)
{
return await Repository.FindAsync(expression).ConfigureAwait(false);
@@ -98,5 +112,10 @@ public class InjectionJobManager : SfsJobManagerBase
Date: Mon, 15 Apr 2024 13:28:55 +0800
Subject: [PATCH 3/6] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Authenticaitons/BaererToken.cs | 19 ++
.../Authenticaitons/ITokenService.cs | 9 +
.../Authenticaitons/TokenService.cs | 57 +++++
.../Client/WebApi.cs | 72 ++++++
.../FawtygAutoMapperProfile.cs | 181 +++++++++++++++
.../HttpAuthorizationHandler.cs | 40 ++++
.../Incoming/InjectionMoldingRequestReader.cs | 218 ++++++++++++++++++
...tionMoldingTaskIncomingBackgroundWorker.cs | 51 ++++
.../InjectionMoldingTaskAgentHostedService.cs | 40 ++++
.../InjectionMoldingTaskAgentModule.cs | 167 ++++++++++++++
.../InjectionMoldingTaskAgentService.cs | 12 +
.../InjectionMoldingTaskOptions.cs | 39 ++++
...tionMoldingTaskOutgoingBackgroundWorker.cs | 54 +++++
.../Program.cs | 53 +++++
...ge.Fawtyg.InjectionMoldingTaskAgent.csproj | 43 ++++
.../appsettings.json | 88 +++++++
.../serilogsettings.json | 39 ++++
.../tempkey.jwk | 1 +
.../Boms/BomManager.cs | 2 +-
.../Caches/Cache.cs | 2 +
...KittingDbContextModelCreatingExtensions.cs | 2 +-
.../Balances/BalanceAppService.cs | 3 -
.../CustomerProductionReturnNoteAppService.cs | 4 +-
.../Notes/MesNotes/MesNoteAppService.cs | 2 +-
.../Transactions/MesNoteEventHandler.cs | 8 +-
be/WZC2.sln | 7 +
26 files changed, 1204 insertions(+), 9 deletions(-)
create mode 100644 be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Authenticaitons/BaererToken.cs
create mode 100644 be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Authenticaitons/ITokenService.cs
create mode 100644 be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Authenticaitons/TokenService.cs
create mode 100644 be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Client/WebApi.cs
create mode 100644 be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/FawtygAutoMapperProfile.cs
create mode 100644 be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/HttpAuthorizationHandler.cs
create mode 100644 be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingRequestReader.cs
create mode 100644 be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingTaskIncomingBackgroundWorker.cs
create mode 100644 be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/InjectionMoldingTaskAgentHostedService.cs
create mode 100644 be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/InjectionMoldingTaskAgentModule.cs
create mode 100644 be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/InjectionMoldingTaskAgentService.cs
create mode 100644 be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/InjectionMoldingTaskOptions.cs
create mode 100644 be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Outgoing/InjectionMoldingTaskOutgoingBackgroundWorker.cs
create mode 100644 be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Program.cs
create mode 100644 be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent.csproj
create mode 100644 be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/appsettings.json
create mode 100644 be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/serilogsettings.json
create mode 100644 be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/tempkey.jwk
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Authenticaitons/BaererToken.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Authenticaitons/BaererToken.cs
new file mode 100644
index 000000000..f03e11afd
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Authenticaitons/BaererToken.cs
@@ -0,0 +1,19 @@
+using System;
+
+namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Authenticaitons;
+
+public class BaererToken
+{
+ public string access_token { get; set; }
+ public long expires_in { get; set; } = 3600;
+ public string token_type { get; set; }
+ public string refresh_token { get; set; }
+ public string scope { get; set; }
+}
+
+public class TokenInfo
+{
+ public BaererToken BaererToken { get; set; } = new();
+ public DateTimeOffset GetTime { get; set; } = DateTimeOffset.Now;
+ public DateTimeOffset ExpireTime => GetTime.AddSeconds(BaererToken.expires_in);
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Authenticaitons/ITokenService.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Authenticaitons/ITokenService.cs
new file mode 100644
index 000000000..66c7736a7
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Authenticaitons/ITokenService.cs
@@ -0,0 +1,9 @@
+using System.Threading.Tasks;
+using Volo.Abp.DependencyInjection;
+
+namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Authenticaitons;
+
+public interface ITokenService : ITransientDependency
+{
+ Task GetTokenAsync();
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Authenticaitons/TokenService.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Authenticaitons/TokenService.cs
new file mode 100644
index 000000000..eb1a54651
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Authenticaitons/TokenService.cs
@@ -0,0 +1,57 @@
+using System;
+using System.Collections.Generic;
+using System.Net.Http;
+using System.Net.Http.Headers;
+using System.Net.Http.Json;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Configuration;
+using Volo.Abp;
+
+namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Authenticaitons;
+
+public class TokenService : ITokenService
+{
+ private readonly IConfiguration _configuration;
+
+ public TokenService(IConfiguration configuration)
+ {
+ _configuration = configuration;
+ }
+
+ public virtual async Task GetTokenAsync()
+ {
+ const string routeString = "connect/token";
+
+ var baseUrl = _configuration["AuthServer:Authority"];
+ var client_id = _configuration["Authentication:client_id"];
+ var client_secret = _configuration["Authentication:client_secret"];
+ var grant_type = _configuration["Authentication:grant_type"];
+ var username = _configuration["Authentication:username"];
+ var password = _configuration["Authentication:password"];
+ var client = new HttpClient();
+ client.BaseAddress = new Uri(baseUrl);
+ client.DefaultRequestHeaders.Accept.Clear();
+ client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
+
+ var content = new FormUrlEncodedContent(new[]
+ {
+ new KeyValuePair("client_id",client_id),
+ new KeyValuePair("client_secret",client_secret),
+ new KeyValuePair("grant_type",grant_type),
+ new KeyValuePair("username",username),
+ new KeyValuePair("password",password),
+ });
+
+ var response = await client.PostAsync(routeString, content).ConfigureAwait(false);
+ Console.WriteLine(response.RequestMessage.RequestUri);
+ if (!response.IsSuccessStatusCode)
+ {
+ var str = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new UserFriendlyException(str);
+ }
+
+ var dto = await response.Content.ReadFromJsonAsync().ConfigureAwait(false);
+ return dto;
+
+ }
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Client/WebApi.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Client/WebApi.cs
new file mode 100644
index 000000000..def81ffb7
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Client/WebApi.cs
@@ -0,0 +1,72 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net.Http;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Options;
+using StackExchange.Redis;
+using Volo.Abp.Application.Services;
+using Win_in.Sfs.Wms.DataExchange.Domain;
+using Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent;
+using static Volo.Abp.Identity.Settings.IdentitySettingNames;
+
+namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent.Client;
+public class WebServiceAppService : IReader
+{
+ private readonly IHttpClientFactory _httpClientFactory;
+ private readonly IOptions _options;
+
+ public WebServiceAppService(IHttpClientFactory httpClientFactory, IOptions options)
+ {
+ _httpClientFactory = httpClientFactory;
+ _options = options;
+ }
+
+ public Task> ReadAsync()
+ {
+ throw new NotImplementedException();
+ }
+
+
+
+
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public async Task WebApi(int p_type)
+ {
+
+ //var client = _httpClientFactory.CreateClient();
+ //// 设置用户名和密码
+ //var credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{username}:{password}"));
+ //client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", credentials);
+ //// 发送HTTP请求
+ //var response = await client.GetAsync("https://example.com/api/data");
+ //if (response.IsSuccessStatusCode)
+ //{
+ // return await response.Content.ReadAsStringAsync();
+ //}
+ // SoapClient
+
+
+
+
+ var address = _options.Value.AutoRemote.IpAddress;
+ var username = _options.Value.AutoRemote.UserName;
+ var password=_options.Value.AutoRemote.Password;
+ var token= _options.Value.AutoRemote.Token;
+ var client = _httpClientFactory.CreateClient();
+ var credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{username}:{password}"));
+ client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", credentials);
+ var response = await client.GetAsync("https://example.com/api/data").ConfigureAwait(false);
+ if (response.IsSuccessStatusCode)
+ {
+ return await response.Content.ReadAsStringAsync();
+ }
+ return "Error occurred";
+ }
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/FawtygAutoMapperProfile.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/FawtygAutoMapperProfile.cs
new file mode 100644
index 000000000..0f32b55f7
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/FawtygAutoMapperProfile.cs
@@ -0,0 +1,181 @@
+using AutoMapper;
+using Volo.Abp.AutoMapper;
+using Win_in.Sfs.Shared.Application;
+using Win_in.Sfs.Wms.DataExchange.Domain;
+using Win_in.Sfs.Wms.DataExchange.WMS.BackFlushNote;
+using Win_in.Sfs.Wms.DataExchange.WMS.MaterialRequest;
+using Win_in.Sfs.Wms.DataExchange.WMS.PCK;
+using Win_in.Sfs.Wms.DataExchange.WMS.ProductReceiptNote;
+using Win_in.Sfs.Wms.DataExchange.WMS.ScrapNote;
+using Win_in.Sfs.Wms.Store.Application.Contracts;
+
+namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent;
+
+public class FawtygAutoMapperProfile : Profile
+{
+ public FawtygAutoMapperProfile()
+ {
+ CreateMap();
+ CreateMap();
+ CreateMap();
+ CreateMap();
+ CreateMap();
+ CreateMap();
+ CreateMap()
+
+ .Ignore(x => x.Number)
+ .Ignore(x => x.ProductionPlanNumber)
+ .Ignore(x => x.JobNumber)
+ .Ignore(x => x.WorkShop) //必填
+ .Ignore(x => x.ReceiptType)
+ .Ignore(x => x.SourceNumber)
+ .Ignore(x => x.Worker)
+ .Ignore(x => x.Remark)
+ .Ignore(x => x.Details)
+ .Ignore(x => x.ExtraProperties);
+
+ CreateMap()
+ .Ignore(x => x.Shift)
+ .Ignore(x => x.ProdLine)
+ .Ignore(x => x.BomVersion)
+ .Ignore(x => x.Status)
+ .Ignore(x => x.PackingCode)
+ .Ignore(x => x.ContainerCode)
+ .Ignore(x => x.StdPackQty)
+ .Ignore(x => x.Lot) //必填
+ .Ignore(x => x.SupplierBatch)
+ .Ignore(x => x.ArriveDate)
+ .Ignore(x => x.ProduceDate)
+ .Ignore(x => x.ExpireDate)
+ .Ignore(x => x.ItemName)
+ .Ignore(x => x.ItemDesc1)
+ .Ignore(x => x.ItemDesc2)
+
+ .Ignore(x => x.RecommendContainerCode)
+ .Ignore(x => x.RecommendPackingCode)
+ .Ignore(x => x.RecommendSupplierBatch)
+ .Ignore(x => x.RecommendArriveDate)
+ .Ignore(x => x.RecommendProduceDate)
+ .Ignore(x => x.RecommendExpireDate)
+ .Ignore(x => x.RecommendLot)
+ .Ignore(x => x.RecommendToLocationCode)
+ .Ignore(x => x.RecommendToLocationArea)
+ .Ignore(x => x.RecommendToLocationGroup)
+ .Ignore(x => x.RecommendToLocationErpCode)
+ .Ignore(x => x.RecommendToWarehouseCode)
+ .Ignore(x => x.RecommendQty)
+
+ .Ignore(t => t.HandledContainerCode)
+ .Ignore(x => x.HandledPackingCode)
+ .Ignore(x => x.HandledSupplierBatch)
+ .Ignore(x => x.HandledArriveDate)
+ .Ignore(x => x.HandledProduceDate)
+ .Ignore(x => x.HandledExpireDate)
+ .Ignore(x => x.HandledLot)
+ .Ignore(x => x.HandledToLocationCode)
+ .Ignore(x => x.HandledToLocationArea)
+ .Ignore(x => x.HandledToLocationGroup)
+ .Ignore(x => x.HandledToLocationErpCode)
+ .Ignore(x => x.HandledToWarehouseCode)
+ .Ignore(x => x.HandledQty);
+
+ CreateMap()
+ //必填
+ .Ignore(x => x.Workshop)
+ .Ignore(x => x.ProdLine)
+ .Ignore(x => x.PreparationPlanNumber)
+ .Ignore(x => x.AutoSubmit)
+ .Ignore(x => x.AutoAgree)
+ .Ignore(x => x.AutoHandle)
+ .Ignore(x => x.AutoCompleteJob)
+ .Ignore(x => x.DirectCreateNote)
+ .Ignore(x => x.Worker)
+ .Ignore(x => x.ActiveDate)
+ .Ignore(x => x.Remark)
+ .Ignore(x => x.Details)
+ .Ignore(x => x.ExtraProperties);
+
+ CreateMap()
+ .Ignore(x => x.ProdLine)
+ .Ignore(x => x.WorkStation)
+ .Ignore(x => x.ExpiredTime)
+ .Ignore(x => x.RequestStatus)
+ .Ignore(x => x.ToLocationErpCode)
+ .Ignore(x => x.Uom)
+ .Ignore(x => x.StdPackQty)
+ .Ignore(x => x.Remark)
+ .Ignore(x => x.ItemName)
+ .Ignore(x => x.ItemDesc1)
+ .Ignore(x => x.ItemDesc2);
+
+ CreateMap()
+ .Ignore(x => x.Details)
+ .Ignore(x => x.ExtraProperties)
+
+ .Ignore(x => x.JobNumber)
+ .Ignore(x => x.Workshop)
+ .Ignore(x => x.RequestNumber)
+ .Ignore(x => x.Worker)
+ .Ignore(x => x.ActiveDate)
+ ;
+
+ CreateMap()
+ .Ignore(x => x.ItemName)
+ .Ignore(x => x.ItemDesc1)
+ .Ignore(x => x.ItemDesc2)
+ .Ignore(x => x.IssueTime)
+ .Ignore(x => x.ExpiredTime)
+ .Ignore(x => x.ProdLine)
+ .Ignore(x => x.WorkStation)
+ .Ignore(x => x.FromContainerCode)
+ .Ignore(x => x.ToContainerCode)
+ .Ignore(x => x.FromLot)
+ .Ignore(x => x.ToLot)
+ .Ignore(x => x.SupplierBatch)
+ .Ignore(x => x.ArriveDate)
+ .Ignore(x => x.ProduceDate)
+ .Ignore(x => x.ExpireDate)
+ .Ignore(x => x.FromLocationCode)
+ .Ignore(x => x.FromLocationErpCode)
+ .Ignore(x => x.FromWarehouseCode)
+ .Ignore(x => x.StdPackQty)
+ .Ignore(x => x.Remark)
+ .Ignore(x => x.ToPackingCode)
+ .Ignore(x => x.ToWarehouseCode)
+ .Ignore(x => x.FromStatus)
+ .Ignore(x => x.ToStatus)
+ .Ignore(x => x.Uom)
+ .IgnoreIHasRecommendAndHandledFrom();
+
+ CreateMap()
+ .Ignore(x => x.Detail)
+ ;
+ CreateMap();
+
+ CreateMap()
+ .Ignore(x => x.Details)
+ .Ignore(x => x.ExtraProperties)
+ .Ignore(x => x.Number)
+ .Ignore(x => x.JobNumber)
+ ;
+ CreateMap()
+ .Ignore(x => x.ItemName)
+ .Ignore(x => x.ItemDesc1)
+ .Ignore(x => x.ItemDesc2)
+ .Ignore(x => x.FromPackingCode)
+ .Ignore(x => x.ToPackingCode)
+ .Ignore(x => x.FromContainerCode)
+ .Ignore(x => x.ToContainerCode)
+ .Ignore(x => x.FromLot)
+ .Ignore(x => x.ToLot)
+ .Ignore(x => x.SupplierBatch)
+ .Ignore(x => x.ArriveDate)
+ .Ignore(x => x.ProduceDate)
+ .Ignore(x => x.ExpireDate)
+ .Ignore(x => x.ToWarehouseCode)
+ .Ignore(x => x.ToWarehouseCode)
+ .Ignore(x => x.Uom)
+ .Ignore(x => x.StdPackQty)
+ ;
+ }
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/HttpAuthorizationHandler.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/HttpAuthorizationHandler.cs
new file mode 100644
index 000000000..55ef3d385
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/HttpAuthorizationHandler.cs
@@ -0,0 +1,40 @@
+using System;
+using Microsoft.Extensions.Configuration;
+using Volo.Abp.DependencyInjection;
+using Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Authenticaitons;
+
+namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent;
+
+public class HttpAuthorizationHandler : ISingletonDependency
+{
+ private readonly ITokenService _tokenService;
+ private readonly IConfiguration _configuration;
+
+ private static TokenInfo TokenInfo { get; } = new();
+
+ public HttpAuthorizationHandler(ITokenService tokenService, IConfiguration configuration)
+ {
+ _tokenService = tokenService;
+ _configuration = configuration;
+ }
+
+ public bool IsLoggedIn()
+ {
+ if (!string.IsNullOrEmpty(TokenInfo.BaererToken?.access_token) &&
+ TokenInfo.ExpireTime > DateTimeOffset.Now)
+ {
+ return true;
+ }
+
+ var token = _tokenService.GetTokenAsync().Result;
+ TokenInfo.BaererToken = token;
+ TokenInfo.GetTime = DateTimeOffset.Now;
+
+ return true;
+ }
+
+ public string GetCurrentBearer()
+ {
+ return TokenInfo.BaererToken.access_token;
+ }
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingRequestReader.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingRequestReader.cs
new file mode 100644
index 000000000..cc8fdbf53
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingRequestReader.cs
@@ -0,0 +1,218 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net.Http;
+using System.Text;
+using System.Text.Json;
+using System.Threading.Tasks;
+using Microsoft.CodeAnalysis;
+using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Options;
+using Volo.Abp.Application.Services;
+using Win_in.Sfs.Basedata.Application.Contracts;
+using Win_in.Sfs.Shared.Domain;
+using Win_in.Sfs.Shared.Domain.Shared;
+using Win_in.Sfs.Wms.DataExchange.Domain;
+using Win_in.Sfs.Wms.DataExchange.Domain.Shared;
+using Win_in.Sfs.Wms.DataExchange.WMS.PCK;
+using Win_in.Sfs.Wms.Store.Application.Contracts;
+using System.Text.Json.Serialization;
+using System.IdentityModel.Tokens.Jwt;
+
+namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Incoming;
+
+public class InjectionMoldingRequestReader : IReader
+{
+
+ private readonly IInjectionRequestAppService _injectionRequest;
+ private readonly IItemBasicAppService _itemService;
+ private readonly ILocationAppService _locService;
+
+ private readonly IIncomingFromExternalManager _incomingFromExternalManager;
+ private readonly ILogger _logger;
+ private readonly IOptions _options;
+ private readonly IHttpClientFactory _httpClientFactory;
+
+
+ public InjectionMoldingRequestReader(
+ IInjectionRequestAppService injectionRequest
+ , IIncomingFromExternalManager incomingFromExternalManager
+ , ILogger logger
+ ,IOptions options
+ , IHttpClientFactory httpClientFactory
+ ,IItemBasicAppService itemService
+ ,ILocationAppService locService
+
+ )
+ {
+ _injectionRequest = injectionRequest;
+ _incomingFromExternalManager = incomingFromExternalManager;
+ _logger = logger;
+ _options = options;
+ _httpClientFactory = httpClientFactory;
+ _itemService=itemService;
+ _locService = locService;
+
+ }
+
+ public virtual async Task> ReadAsync()
+ {
+ try
+ {
+ var jobCondition = new SfsStoreRequestInputBase();
+ Filter filter = new Filter()
+ {
+ Action = "<>",
+ Column = "JobStatus",
+ Logic = EnumFilterLogic.And.ToString(),
+ Value = ((int)EnumJobStatus.Done).ToString()
+ };
+ jobCondition.Condition.Filters.Add(filter);
+ var jobs = await _injectionRequest.GetAllListByFilterAsync(jobCondition).ConfigureAwait(false);
+ List joblist = new List();
+ if (jobs.Count == 0)
+ {
+ string camera =await ReaderCameraApi().ConfigureAwait(false);
+
+ List cameraList = new List();
+
+ if (camera == "Error occured")
+ {
+ _logger.LogError($"没有读取到摄像头信息{DateTime.Now},请检查网络");
+ return new List();
+ }
+
+
+
+ cameraList = System.Text.Json.JsonSerializer.Deserialize>(camera);//camera转注塑叫料明细任务数据
+
+
+ InjectionRequestEditInput input=new InjectionRequestEditInput();
+ List injectionRequestDetails = new List();
+
+ foreach (var job in cameraList) {
+
+ var detailInput = new InjectionRequestDetailInput()
+ {
+ ItemCode = job.ItemCode,
+ ToLocationCode = job.ToLocCode,
+ Qty = job.Qty,
+ };
+ injectionRequestDetails.Add(detailInput);
+ }
+ input.Details.AddRange(injectionRequestDetails);
+ var errors=await BindAsync(input.Details).ConfigureAwait(false);//零件仓库赋值
+ if (errors.Count > 0)
+ {
+ foreach (var error in errors) {
+ _logger.LogError(error);
+ }
+ return new List();
+
+ }
+ await _injectionRequest.CreateAsync(input).ConfigureAwait(false);
+ }
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex.Message);
+ }
+ return new List();
+ }
+
+ private async Task> BindAsync(List p_list)
+ {
+ List errors = new List();
+
+ foreach (var request in p_list)
+ {
+ var itm =await _itemService.GetByCodeAsync(request.ItemCode).ConfigureAwait(false);
+ if(itm == null) { errors.Add($"编号:{request.ItemCode}零件表中没找到!" ); }else
+ {
+ request.ItemDesc1 = itm.Desc1;
+ request.ItemDesc2 = itm.Desc2;
+ request.ItemName = itm.Name;
+
+ }
+ var loc = await _locService.GetByCodeAsync(request.ToLocationCode).ConfigureAwait(false);
+ if (loc == null) { errors.Add($"编号:{request.ToLocationCode}库位表中没找到!"); }else
+ {
+ request.ToLocationCode = loc.Code;
+ request.ToLocationGroup = loc.LocationGroupCode;
+ request.ToLocationErpCode = loc.ErpLocationCode;
+ request.ToWarehouseCode= loc.WarehouseCode;
+ }
+ }
+
+
+ return errors;
+
+ }
+
+
+
+
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public async Task ReaderCameraApi()
+ {
+
+ var address = _options.Value.AutoRemote.IpAddress;
+ var username = _options.Value.AutoRemote.UserName;
+ var password = _options.Value.AutoRemote.Password;
+ var token = _options.Value.AutoRemote.Token;
+ var client = _httpClientFactory.CreateClient();
+ var credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{username}:{password}"));
+ client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", credentials);
+ var response = await client.GetAsync("https://example.com/api/data").ConfigureAwait(false);
+ if (response.IsSuccessStatusCode)
+ {
+ return await response.Content.ReadAsStringAsync().ConfigureAwait(false);
+ }
+
+ return "Error occurred";
+ }
+
+ public class InjectionRequest
+ {
+ ///
+ /// 零件吗
+ ///
+ public string ItemCode { get; set; }
+ ///
+ /// 零件名称
+ ///
+ public string ItemName { get; set; }
+ ///
+ /// 发运库位
+ ///
+ public string ToLocCode { get; set; }
+ ///
+ /// 来源库位
+ ///
+ public string FromLocCode { get; set; }
+ ///
+ /// 数量
+ ///
+ public decimal Qty { get; set; }
+
+
+
+
+
+ }
+
+
+
+
+
+
+
+
+
+
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingTaskIncomingBackgroundWorker.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingTaskIncomingBackgroundWorker.cs
new file mode 100644
index 000000000..0c925031a
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingTaskIncomingBackgroundWorker.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Threading.Tasks;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Options;
+using Volo.Abp.BackgroundWorkers;
+using Volo.Abp.Threading;
+using Volo.Abp.Uow;
+using Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent.Incoming;
+using Win_in.Sfs.Wms.Store.Application.Contracts;
+
+namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent;
+
+public class InjectionMoldingTaskIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
+{
+ private readonly string Incoming = "InjectionMoldingTask Incoming";
+
+ private readonly IOptions _options;
+
+ public InjectionMoldingTaskIncomingBackgroundWorker(
+ AbpAsyncTimer timer,
+ IOptions options,
+ IServiceScopeFactory serviceScopeFactory
+ ) : base(timer, serviceScopeFactory)
+ {
+ _options = options;
+ Timer.Period = options.Value.IncomingOptions.PeriodSeconds * 1000; //default 10 minutes
+ }
+
+ [UnitOfWork]
+ protected override async Task DoWorkAsync(PeriodicBackgroundWorkerContext workerContext)
+ {
+ Logger.LogInformation($"Starting: Handling {Incoming}");
+ if (!_options.Value.IncomingOptions.Active)
+ {
+ Logger.LogInformation($"{Incoming} is not active!");
+ return;
+ }
+ int min = DateTime.Now.Hour*60+ DateTime.Now.Minute;//第二天00:05:00与当天23:55:00不执行避免tyrpnumber重复
+ if ( (24*60-5)<= min || min <= 5)
+ {
+ Logger.LogInformation($"{Incoming} 时间小于第二天00:05:00大于当天23:55:00");
+ return;
+ }
+ Logger.LogInformation($"注塑任务");//缴库
+ var reader = workerContext.ServiceProvider.GetService();
+ await reader.ReadAsync().ConfigureAwait(false);
+ Logger.LogInformation($"Completed: Handling {Incoming}");
+ }
+
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/InjectionMoldingTaskAgentHostedService.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/InjectionMoldingTaskAgentHostedService.cs
new file mode 100644
index 000000000..e74443d3b
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/InjectionMoldingTaskAgentHostedService.cs
@@ -0,0 +1,40 @@
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Hosting;
+using Volo.Abp;
+
+namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent;
+
+public class InjectionMoldingTaskAgentHostedService : IHostedService
+{
+ private readonly IAbpApplicationWithExternalServiceProvider _application;
+ private readonly IServiceProvider _serviceProvider;
+ private readonly InjectionMoldingTaskAgentService _agentService;
+
+ public InjectionMoldingTaskAgentHostedService(
+ IAbpApplicationWithExternalServiceProvider application,
+ IServiceProvider serviceProvider,
+ InjectionMoldingTaskAgentService agentService)
+ {
+ _application = application;
+ _serviceProvider = serviceProvider;
+ _agentService = agentService;
+ }
+
+ public Task StartAsync(CancellationToken cancellationToken)
+ {
+ _application.Initialize(_serviceProvider);
+
+ _agentService.Start();
+
+ return Task.CompletedTask;
+ }
+
+ public Task StopAsync(CancellationToken cancellationToken)
+ {
+ _application.Shutdown();
+
+ return Task.CompletedTask;
+ }
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/InjectionMoldingTaskAgentModule.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/InjectionMoldingTaskAgentModule.cs
new file mode 100644
index 000000000..a147e55cd
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/InjectionMoldingTaskAgentModule.cs
@@ -0,0 +1,167 @@
+using System;
+using System.Net.Http;
+using System.Net.Http.Headers;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using Polly;
+using Volo.Abp;
+using Volo.Abp.Account;
+using Volo.Abp.Autofac;
+using Volo.Abp.AutoMapper;
+using Volo.Abp.BackgroundJobs;
+using Volo.Abp.BackgroundWorkers;
+using Volo.Abp.EntityFrameworkCore;
+using Volo.Abp.Http.Client;
+using Volo.Abp.Modularity;
+using Win_in.Sfs.Basedata.Application.Contracts;
+using Win_in.Sfs.Label.Application.Contracts;
+using Win_in.Sfs.Shared.Host;
+
+using Win_in.Sfs.Wms.DataExchange.EntityFrameworkCore;
+
+using Win_in.Sfs.Wms.Inventory.Application.Contracts;
+using Win_in.Sfs.Wms.Store.Application.Contracts;
+
+namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent;
+
+[DependsOn(
+ typeof(AbpAutofacModule),
+ typeof(AbpAutoMapperModule),
+ typeof(AbpBackgroundJobsModule),
+ typeof(AbpBackgroundWorkersModule),
+ typeof(AbpHttpClientModule)
+)]
+[DependsOn(
+ typeof(StoreApplicationContractsModule),
+ typeof(InventoryApplicationContractsModule),
+ typeof(LabelApplicationContractsModule),
+ typeof(DataExchangeDomainModule),
+ typeof(DataExchangeEntityFrameworkCoreModule),
+ //typeof(DataExchangeDomainFawtygMesModule),
+ //typeof(DataExchangeEntityFrameworkCoreFawtygModule),
+ typeof(AbpAccountApplicationContractsModule)
+ )]
+public class InjectionMoldingTaskAgentModule : AbpModule
+{
+ public override void PreConfigureServices(ServiceConfigurationContext context)
+ {
+
+ PreConfigure(options =>
+ {
+ //Polly 重试3次
+ options.ProxyClientBuildActions.Add((remoteServiceName, clientBuilder) =>
+ {
+ clientBuilder.AddTransientHttpErrorPolicy(policyBuilder =>
+ policyBuilder.WaitAndRetryAsync(
+ 3,
+ i => TimeSpan.FromSeconds(Math.Pow(2, i))
+ )
+ );
+ });
+
+ //默认添加Authorization Header: Bearer Token
+ options.ProxyClientActions.Add((a, s, h) =>
+ {
+ var httpAuthorizationHandler = s.GetService();
+ if (httpAuthorizationHandler != null && httpAuthorizationHandler.IsLoggedIn())
+ {
+ h.DefaultRequestHeaders.Authorization =
+ new AuthenticationHeaderValue("Bearer", httpAuthorizationHandler.GetCurrentBearer());
+ }
+ });
+ });
+
+ }
+
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ var configuration = context.Services.GetConfiguration();
+ var env = context.Services.GetSingletonInstance();
+
+ context.SetConsoleTitleOfConsoleApp("MesAgent", env.EnvironmentName);
+
+ ConfigureDbContext();
+
+ ConfigureOptions(configuration);
+
+ context.Services.AddHostedService();
+
+ ConfigureAutoMapper(context);
+
+ ConfigureHttpClientProxies(context);
+
+ ConfigureAuthentication(context, configuration);
+ }
+
+ private void ConfigureDbContext()
+ {
+ Configure(options =>
+ {
+ options.UseSqlServer();
+ //options.UseSqlServer();
+ });
+ }
+
+ private void ConfigureOptions(IConfiguration configuration)
+ {
+ Configure(configuration.GetSection("InjectionMoldingTaskOptions"));
+ }
+
+ private void ConfigureAutoMapper(ServiceConfigurationContext context)
+ {
+ context.Services.AddAutoMapperObjectMapper();
+ Configure(options => { options.AddMaps(validate: false); });
+ }
+
+ private static void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration)
+ {
+ var isAlwaysAllowAuthorization = configuration.GetValue("AuthServer:AlwaysAllowAuthorization");
+ if (isAlwaysAllowAuthorization)
+ {
+ //绕过授权服务,用于测试
+ context.Services.AddAlwaysAllowAuthorization();
+ }
+ else
+ {
+ context.Services.AddHttpClient();
+ context.Services.AddAuthentication()
+ .AddJwtBearer(options =>
+ {
+ options.Authority = configuration["AuthServer:Authority"];
+ options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]);
+ options.Audience = "DataExchange";
+ options.BackchannelHttpHandler = new HttpClientHandler
+ {
+ ServerCertificateCustomValidationCallback =
+ HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
+ };
+ });
+ }
+ }
+
+ private static void ConfigureHttpClientProxies(ServiceConfigurationContext context)
+ {
+ context.Services.AddHttpClientProxies(
+ typeof(BasedataApplicationContractsModule).Assembly,
+ "BaseData"
+ );
+ context.Services.AddHttpClientProxies(
+ typeof(StoreApplicationContractsModule).Assembly,
+ "Store"
+ );
+ context.Services.AddHttpClientProxies(
+ typeof(LabelApplicationContractsModule).Assembly,
+ "Label"
+ );
+ }
+ public override void OnApplicationInitialization(
+ ApplicationInitializationContext context)
+ {
+
+ context.AddBackgroundWorkerAsync();
+ context.AddBackgroundWorkerAsync();
+ }
+}
+
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/InjectionMoldingTaskAgentService.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/InjectionMoldingTaskAgentService.cs
new file mode 100644
index 000000000..ca7ca6964
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/InjectionMoldingTaskAgentService.cs
@@ -0,0 +1,12 @@
+using System;
+using Volo.Abp.DependencyInjection;
+
+namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent;
+
+public class InjectionMoldingTaskAgentService : ITransientDependency
+{
+ public void Start()
+ {
+ Console.WriteLine("InjectionMoldingTask data exchange service has started...");
+ }
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/InjectionMoldingTaskOptions.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/InjectionMoldingTaskOptions.cs
new file mode 100644
index 000000000..8a21a7193
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/InjectionMoldingTaskOptions.cs
@@ -0,0 +1,39 @@
+using System.Net;
+
+namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent;
+
+public class InjectionMoldingTaskOptions
+{
+ public DataExchangeOptions IncomingOptions { get; set; }
+ public DataExchangeOptions OutgoingOptions { get; set; }
+
+ public InjectionAutoRemote AutoRemote { get; set; }
+
+
+
+
+}
+
+public class InjectionAutoRemote
+{
+
+ public string IpAddress { set; get; }
+ public string UserName { set; get; }
+ public string Password { set; get; }
+ public string Token { set; get; }
+
+}
+
+
+
+
+
+public class DataExchangeOptions
+{
+ public bool Active { get; set; }
+ public int PeriodSeconds { get; set; } = 60;
+ public int BatchSize { get; set; } = 10;
+ public int MaxCount { get; set; } = 100;
+ public int RetryTimes { get; set; } = 3;
+
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Outgoing/InjectionMoldingTaskOutgoingBackgroundWorker.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Outgoing/InjectionMoldingTaskOutgoingBackgroundWorker.cs
new file mode 100644
index 000000000..65c92619e
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Outgoing/InjectionMoldingTaskOutgoingBackgroundWorker.cs
@@ -0,0 +1,54 @@
+using System.Threading.Tasks;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Options;
+using Volo.Abp.BackgroundWorkers;
+using Volo.Abp.Threading;
+using Volo.Abp.Uow;
+
+
+namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent;
+
+public class InjectionMoldingTaskOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
+{
+ private readonly string Outgoing = "InjectionMoldingTaskOptions Outgoing";
+
+ private readonly IOptions _options;
+
+ public InjectionMoldingTaskOutgoingBackgroundWorker(
+ AbpAsyncTimer timer
+
+
+
+ , IOptions options
+ , IServiceScopeFactory serviceScopeFactory
+ ) : base(timer, serviceScopeFactory)
+ {
+ _options = options;
+ Timer.Period = options.Value.OutgoingOptions.PeriodSeconds * 1000; //default 10 minutes
+
+ }
+
+ [UnitOfWork]
+ protected override async Task DoWorkAsync(PeriodicBackgroundWorkerContext workerContext)
+ {
+ Logger.LogInformation($"Starting: Handling {Outgoing}");
+ if (!_options.Value.IncomingOptions.Active)
+ {
+ Logger.LogInformation($"{Outgoing} is not active!");
+ return;
+ }
+
+ Logger.LogInformation($"Write Issue");
+
+
+
+ //var issueConvert = workerContext.ServiceProvider.GetRequiredService();
+ //var issueNoteList = await issueConvert.ConvertAsync().ConfigureAwait(false);
+ //var issueWriter = workerContext.ServiceProvider.GetRequiredService();
+ //await issueWriter.WriteAsync(issueNoteList).ConfigureAwait(false);
+
+ Logger.LogInformation($"Completed: Handling {Outgoing}");
+ }
+
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Program.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Program.cs
new file mode 100644
index 000000000..633c4d089
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Program.cs
@@ -0,0 +1,53 @@
+using System;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using Serilog;
+
+namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent;
+
+public class Program
+{
+ public static async Task Main(string[] args)
+ {
+ IConfigurationRoot configuration =
+ new ConfigurationBuilder()
+ .AddJsonFile("serilogsettings.json", false, true)
+ .Build();
+
+ Log.Logger = new LoggerConfiguration()
+ .ReadFrom.Configuration(configuration)
+ .CreateLogger();
+
+ try
+ {
+ Log.Information("Starting console host.");
+ await CreateHostBuilder(args).RunConsoleAsync().ConfigureAwait(false);
+ return 0;
+ }
+ catch (Exception ex)
+ {
+ Log.Fatal(ex, "Host terminated unexpectedly!");
+ return 1;
+ }
+ finally
+ {
+ Log.CloseAndFlush();
+ }
+
+ }
+
+ internal static IHostBuilder CreateHostBuilder(string[] args) =>
+ Host.CreateDefaultBuilder(args)
+ .UseAutofac()
+ .UseSerilog()
+ .ConfigureAppConfiguration((context, config) =>
+ {
+ //setup your additional configuration sources
+ })
+ .ConfigureServices((hostContext, services) =>
+ {
+ services.AddApplication();
+ });
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent.csproj b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent.csproj
new file mode 100644
index 000000000..12eff23b3
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent.csproj
@@ -0,0 +1,43 @@
+
+
+
+ Exe
+ net6.0
+ latest
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Always
+ PreserveNewest
+
+
+ PreserveNewest
+ true
+ PreserveNewest
+
+
+
+
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/appsettings.json b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/appsettings.json
new file mode 100644
index 000000000..e04cfaf9b
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/appsettings.json
@@ -0,0 +1,88 @@
+{
+ "ConnectionStrings": {
+ "Default": "Server=10.164.113.32,1818\\SHDB;Database=Wms_Dy_ShangHai;uid=ShWmsUser;pwd=Faty@Wms_20230413#SH;TrustServerCertificate=True;Encrypt=false",
+ "DataExchange": "Server=10.164.113.32,1818\\SHDB;Database=Wms_DataExchange_Main_Dy_ShangHai;uid=ShWmsUser;pwd=Faty@Wms_20230413#SH;TrustServerCertificate=True;Encrypt=false",
+ "MES": "Server=10.164.113.32,1818\\SHDB;Database=MES_SH;uid=ShWmsUser;pwd=Faty@Wms_20230413#SH;TrustServerCertificate=True;Encrypt=false"
+ },
+
+ "AuthServer": {
+ "Authority": "http://dev.ccwin-in.com:60083",
+ "RequireHttpsMetadata": "false",
+ "SwaggerClientId": "admin",
+ "SwaggerClientSecret": "1q2w3E*",
+ "grant_type": "password",
+ "AlwaysAllowAuthorization": true
+ },
+
+ "Authentication": {
+ "client_id": "Auth_App",
+ "client_secret": "1q2w3e*",
+ "grant_type": "password",
+ "username": "jiekou",
+ "password": "1q2w3E*"
+ },
+
+
+ "RemoteServices": {
+
+
+ "Inventory": {
+ "BaseUrl": "http://localhost:59095/"
+ },
+ "Job": {
+ "BaseUrl": "http://localhost:59095/"
+ },
+ "Label": {
+ "BaseUrl": "http://dev.ccwin-in.com:60082/"
+ },
+ "Message": {
+ "BaseUrl": "http://dev.ccwin-in.com:60082/"
+ },
+ "Store": {
+ "BaseUrl": "http://localhost:59095/"
+ }
+
+ },
+
+
+
+
+
+ //"RemoteServices": {
+ // "BaseData": {
+ // "BaseUrl": "http://10.164.113.31:60084/"
+ // },
+ // "Store": {
+ // "BaseUrl": "http://10.164.113.31:60085/"
+ // },
+ // "Label": {
+ // "BaseUrl": "http://10.164.113.31:60082/"
+ // }
+
+ //},
+ "InjectionMoldingTaskOptions": {
+
+ "AutoRemote": {
+ "IpAddress": "http://10.164.113.31:60085/",
+ "UserName": "",
+ "Password": "",
+ "Token": ""
+
+ },
+
+ "IncomingOptions": {
+ "Active": true,
+ "PeriodSeconds": 10,
+ "BatchSize": 10,
+ "MaxCount": 100,
+ "RetryTimes": 3
+ },
+ "OutgoingOptions": {
+ "Active": true,
+ "PeriodSeconds": 10,
+ "BatchSize": 10,
+ "MaxCount": 100,
+ "RetryTimes": 3
+ }
+ }
+}
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/serilogsettings.json b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/serilogsettings.json
new file mode 100644
index 000000000..c07a351db
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/serilogsettings.json
@@ -0,0 +1,39 @@
+{
+ "Serilog": {
+ "Using": [ "Serilog.Sinks.File", "Serilog.Sinks.Async", "Serilog.Sinks.Console", "Serilog.Sinks.MSSqlServer" ],
+ "MinimumLevel": {
+ "Default": "Debug",
+ "Override": {
+ "Microsoft": "Information",
+ "Microsoft.EntityFrameworkCore": "Warning"
+ }
+ },
+ "WriteTo": [
+ {
+ "Name": "Async",
+ "Args": {
+ "configure": [
+ {
+ "Name": "File",
+ "Args": {
+ "path": "..//Logs//MesAgent//MesAgent_.log",
+ "rollingInterval": "Day",
+ "fileSizeLimitBytes": "52428800",
+ "rollOnFileSizeLimit": "true",
+ "restrictedToMinimumLevel": "Debug"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "Name": "Console",
+ "Args": {
+ "restrictedToMinimumLevel": "Debug",
+ "outputTemplate": "{Timestamp:HH:mm:ss.fff} [{Level:u3}] {Message} {NewLine}{Exception}"
+ }
+ }
+ ],
+ "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ]
+ }
+}
\ No newline at end of file
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/tempkey.jwk b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/tempkey.jwk
new file mode 100644
index 000000000..a39a188d3
--- /dev/null
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/tempkey.jwk
@@ -0,0 +1 @@
+{"AdditionalData":{},"Alg":"RS256","Crv":null,"D":"oAL-OdQF7tHgMYho6jsPrxtuvDFdF0T6IRBihCrz0b_IB-aqWTVMTe5uilRgmY3aAzQC8mCmkFamneGLZy7QplZlOc57TSv64zAeRBSCyIfn1gvWCj7_p6qI7lElu0QHwnaErfDHsV47sIukRf_q2sE9ZVfHBYKNMLR_kbZZlzs3YZCIiiJwFbE6VKZ2HH2s9gf-DSpJ5WIGnyeAswZflNjkQdUbUl8tJCOHyi7BC60sCoPqASEeRIyarMG7AKjMw44rTs5TGpTp8uoPg4XhV4xP4LzX436gFFjrhf_EOo5UI2d6UCLwQNGWmrpWjLUAs7QjjcxH4sSaniDR51DTnQ","DP":"ayJZOPaME1B4c7tLZJdTpXCF5AUXUnS-Bq_buYxZAYXLaOdxJHjltCSLTdQ7p6Y1Y4tISg74uXFzmx18ERbi5WNMzhsGAezSDV_PWePu6Ujpm--F7TcE3aYRs0srsnbFWq57W2DusxwjWr_a-g08zP10O4IJP5WmE5rd4xQDO_s","DQ":"Q80U7ZCxMDcpmO87VHYS9sIZdoHu7PXK7mdjxTuTXYJTOE4BBMwacF-MbPO_Smno9-p32RnH7rJp8dpSevU5sUwT-xEPpGbJILBnFGesmBMiOiK5aKBhZ60T4gw6VNf_iIBHuIYB9MGybJfbf-7iZ7aGgNGdwr5XKITDahq_5Jk","E":"AQAB","K":null,"KeyId":"D6178DB50135E8E220498A66064AEF08","Kid":"D6178DB50135E8E220498A66064AEF08","Kty":"RSA","N":"tqqOx4HSDkuiEXAzYdJxsXyhXnXYaezE5KCHy4Mx6lFDmJfx6IQf9dhcCrumCga_1PfxXdV0R2OHo4i67yiQm-0XRgx7W87S6LR7ARraVme25SiOnZEtwlauYvEXz0cCR-bhvLwLTOPjptSKHl5DVl8Lcw7PjBpJLDP1zqCFMgU-KVusNoaruLFBb3zdgYt7ovzBOj94UkRAy5cLmAJKh73IOyExM-fO7rTR7dyc1jstNbUGhdX3fui3f0hUGsNOCvIyaaJn2SuGbSo5loWHBFtNkLHrXD9dLirJaXqkP7zK4rAYu0KrFqUp9LA_RNK2QLD2LnucCsmLPzz3jnpufQ","Oth":null,"P":"4D4K7xT2s-TJyUzbFZDsGPzD1kLbuB3lQnp6_tkHg0GrXgojf-obIviQPqhKmOQN-qAq0hoSVYXXmUCf-iMsV0XM6UcChI6GSO3dAQyB-e6TdCIw6kSEEJrhr6tadwOnOFb6HssX7n5nxw47dJV7ORQ6tjrTGi3IdlTUl8uo1-c","Q":"0Ikp47a-_VxvflocNK_6YyeNukMOjEmGqIQWQgXGJv6dd2-_ox6BztA9qcmmfuKU5xmD9aOlj_WIATRi3meSH7DdiGYCd-56QDj-Lvwej6_27rX8lISQ2D0TQqgPZCGAE_1PvIAmYfv0D7GrCFevJrJ2Z5zLC6GK61WjC0V3afs","QI":"Xk7BkXcsdP-RQc1VaJqQ9krQftyYlsxM6hC6x80y7fi7tR6g68GwrNdIw-dPE_bHQuD7DKwq8FFMROzR4t2cRTOGhlKj7VgJ8N8soXzXxUAmerhOXMJ1nJOAnNBSTglVFVUqdZMgOfPbClgg29tRBPQgrKnN_-yzXgglCB6rqPU","Use":null,"X":null,"X5t":null,"X5tS256":null,"X5u":null,"Y":null,"KeySize":2048,"HasPrivateKey":true,"CryptoProviderFactory":{"CryptoProviderCache":{},"CustomCryptoProvider":null,"CacheSignatureProviders":true,"SignatureProviderObjectPoolCacheSize":32}}
\ No newline at end of file
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomManager.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomManager.cs
index c3f7120bd..692ce3ef0 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomManager.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomManager.cs
@@ -129,7 +129,7 @@ public class BomManager : DomainService, IBomManager
{
await _repository.BulkDeleteAsync(deleteEntities).ConfigureAwait(false);
}
-
+ Cache.Boms.Clear();
await _repository.BulkMergeAsync(mergeEntities).ConfigureAwait(false);
}
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Caches/Cache.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Caches/Cache.cs
index 0d3bb63ea..4beb6e0d7 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Caches/Cache.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Caches/Cache.cs
@@ -9,6 +9,8 @@ namespace Win_in.Sfs.Basedata.Caches;
public static class Cache
{
public static List Boms = new List();
+
+
public static async void BomsLifeCycle(int lifetime)
{
var reassigner = new Reassigner(DateTime.Now,new TimeSpan(0,5,0));
diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Kittings/KittingDbContextModelCreatingExtensions.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Kittings/KittingDbContextModelCreatingExtensions.cs
index 8c4d1a813..bede84ba0 100644
--- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Kittings/KittingDbContextModelCreatingExtensions.cs
+++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Kittings/KittingDbContextModelCreatingExtensions.cs
@@ -49,7 +49,7 @@ public static class KittingDbContextModelCreatingExtensions
//Indexes
- //b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired();
+ // b.HasMany(q => q.).WithOne().HasForeignKey(d => d.MasterID).IsRequired();
diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs
index a38fc1c14..3e911266f 100644
--- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs
+++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs
@@ -853,11 +853,9 @@ public class BalanceAppService
var entities = await _repository.GetPagedListAsync(expression, input.SkipCount, input.MaxResultCount,
input.Sorting, true).ConfigureAwait(false);
var list = ObjectMapper.Map, List>(entities);
-
//var hasDetails = typeof(TEntity) is SfsMasterAggregateRootBase detailEntity;
var tt = typeof(Balance).GetBaseClasses(typeof(SfsMasterAggregateRootBase));
var hasDetails = tt.Length > 0 ? true : false;
-
if (list.Count > 0)
{
var itemCodes = list.Select(t => t.ItemCode).Distinct();
@@ -870,7 +868,6 @@ public class BalanceAppService
});
}
}
-
return ExportImportService.Export(list, detailsProptyName: hasDetails ? nameof(EmptyDetail) : null);
}
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 3a3ea6b86..b4850d5fd 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,8 @@ public class CustomerProductionReturnNoteAppService :
itm.ToStatus=EnumInventoryStatus.OK;
itm.FromLocationArea = "OK";
itm.FromLocationErpCode= "OK";
- itm.FromLot = "NONE";
- itm.FromPackingCode = "NONE";
+ 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/MesNotes/MesNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/MesNotes/MesNoteAppService.cs
index 6761b6b39..3b7c91e39 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/MesNotes/MesNoteAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/MesNotes/MesNoteAppService.cs
@@ -92,7 +92,7 @@ public class MesNoteAppService :
var first = balanceLst.FirstOrDefault();
if (first != null)
{
- if (detail.Qty <= first.Qty)
+ if (detail.Qty > first.Qty)
{
throw new UserFriendlyException($"库存数量不足");
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/MesNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/MesNoteEventHandler.cs
index ec09b362f..8e2cd13d9 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/MesNoteEventHandler.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/MesNoteEventHandler.cs
@@ -78,7 +78,13 @@ public class MesNoteEventHandler
var transferLogs = new List();
foreach (var detail in MesNote.Details.Where(detail => detail.Qty != 0))
{
-
+
+ detail.FromPackingCode = "";
+ detail.ToPackingCode = "";
+ detail.FromContainerCode = "";
+ detail.FromLot = "";
+ detail.ToContainerCode = "";
+
var transferLog = ObjectMapper.Map(detail);
transferLog.TransType = Enum.Parse(MesNote.Type); ;
transferLog.TransSubType = EnumTransSubType.None;
diff --git a/be/WZC2.sln b/be/WZC2.sln
index 6daccb5d3..8bc88dfde 100644
--- a/be/WZC2.sln
+++ b/be/WZC2.sln
@@ -264,6 +264,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Win_in.Sfs.Wms.Store.Domain
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "解决方案项", "解决方案项", "{1295E21B-E615-4C99-93A3-218BB082F610}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent", "DataExchange\Fawtyg\Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent\Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent.csproj", "{1552D8A4-E897-4017-B4C4-834E183AB066}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -650,6 +652,10 @@ Global
{666C8442-DF6C-4F1E-855D-851777C2395A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{666C8442-DF6C-4F1E-855D-851777C2395A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{666C8442-DF6C-4F1E-855D-851777C2395A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1552D8A4-E897-4017-B4C4-834E183AB066}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1552D8A4-E897-4017-B4C4-834E183AB066}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1552D8A4-E897-4017-B4C4-834E183AB066}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1552D8A4-E897-4017-B4C4-834E183AB066}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -778,6 +784,7 @@ Global
{637A1F71-B29E-4247-B1C6-695790CE0525} = {F17D371C-DF73-4CD7-8BE1-3254110FB20B}
{EBC2FEC4-BCCC-4430-953B-2712C0416BC6} = {ED39BD34-B85D-4683-BF54-68996C248C1A}
{666C8442-DF6C-4F1E-855D-851777C2395A} = {4D8578B9-A0E1-4A0D-8044-1F417620C34A}
+ {1552D8A4-E897-4017-B4C4-834E183AB066} = {BA78EB96-38FD-4488-B9AA-9CF85481BC36}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7A77C2A7-D19D-40B4-AE22-85473900E6F9}
From fe959a01407f7053a1c44cb50e266c436a737ddd Mon Sep 17 00:00:00 2001
From: zhaoxinyu <89237069@qq.com>
Date: Mon, 15 Apr 2024 13:30:29 +0800
Subject: [PATCH 4/6] =?UTF-8?q?=E5=8F=AA=E6=9C=89=E9=87=87=E9=9B=86?=
=?UTF-8?q?=E5=8E=BB=E6=8E=89=E8=BE=93=E5=87=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../InjectionMoldingTaskAgentModule.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/InjectionMoldingTaskAgentModule.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/InjectionMoldingTaskAgentModule.cs
index a147e55cd..15d305474 100644
--- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/InjectionMoldingTaskAgentModule.cs
+++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/InjectionMoldingTaskAgentModule.cs
@@ -161,7 +161,7 @@ public class InjectionMoldingTaskAgentModule : AbpModule
{
context.AddBackgroundWorkerAsync();
- context.AddBackgroundWorkerAsync();
+ // context.AddBackgroundWorkerAsync();
}
}
From 8aabbcb3d6c76e2798ad1a1dff6558bbf002b9d7 Mon Sep 17 00:00:00 2001
From: liuyunfeng
Date: Mon, 15 Apr 2024 14:12:04 +0800
Subject: [PATCH 5/6] =?UTF-8?q?=E7=94=9F=E6=88=90=E6=95=B0=E6=8D=AE?=
=?UTF-8?q?=E5=BA=93=E5=89=8D=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../DTOs/TransferLibRequestDetailDTO.cs | 420 +-
.../Inputs/TransferLibRequestDetailInput.cs | 283 +-
.../InjectionJobs/InjectionJobAppService.cs | 27 +-
.../TransferLibJobAppService.cs | 9 +-
.../TransferLibNotes/ITransferLibCallback.cs | 8 +-
.../TransferLibRequestAppService.cs | 16 +-
.../NewRecommendHandled/NewRecommendFromTo.cs | 197 -
.../NewRecommendHandledFromTo.cs | 148 -
.../TransferLibJobs/TransferLibJobDetail.cs | 3 +-
.../TransferLibNotes/TransferLibNoteDetail.cs | 2 +-
.../TransferLibRequestDetail.cs | 283 +-
...rLibJobDbContextModelCreatingExtensions.cs | 62 +
...20240415054835_transferLibV222.Designer.cs | 30134 ++++++++++++++++
.../20240415054835_transferLibV222.cs | 3539 ++
.../Migrations/StoreDbContextModelSnapshot.cs | 1024 +-
...LibNoteDbContextModelCreatingExtensions.cs | 66 +-
...RequestDbContextModelCreatingExtensions.cs | 43 +-
.../TransferLibRequestAutoMapperProfile.cs | 46 +-
.../TransferLibRequestEventHandler.cs | 139 +-
19 files changed, 35717 insertions(+), 732 deletions(-)
delete mode 100644 be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Bases/NewRecommendHandled/NewRecommendFromTo.cs
delete mode 100644 be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Bases/NewRecommendHandled/NewRecommendHandledFromTo.cs
create mode 100644 be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240415054835_transferLibV222.Designer.cs
create mode 100644 be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240415054835_transferLibV222.cs
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/DTOs/TransferLibRequestDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/DTOs/TransferLibRequestDetailDTO.cs
index 16aac93aa..18fc0fea2 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/DTOs/TransferLibRequestDetailDTO.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/DTOs/TransferLibRequestDetailDTO.cs
@@ -1,4 +1,7 @@
+using System;
using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using Win_in.Sfs.Shared.Application.Contracts;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Domain;
@@ -7,7 +10,7 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
///
/// 库存转移记录-明细表
///
-public class TransferLibRequestDetailDTO : NewRecommendFromTo
+public class TransferLibRequestDetailDTO : SfsDetailDTOBase
{
///
@@ -47,46 +50,423 @@ public class TransferLibRequestDetailDTO : NewRecommendFromTo
public string CallJobNumber { get; set; }
#endregion
- #region 校验
+ #region 库存基础信息
+
+ ///
+ /// 物品代码
+ ///
+ public string ItemCode { get; set; }
+
+ ///
+ /// 物品名称
+ ///
+ public string ItemName { get; set; }
+
+ ///
+ /// 物品描述1
+ ///
+ public string ItemDesc1 { get; set; }
+
+ ///
+ /// 物品描述2
+ ///
+ public string ItemDesc2 { get; set; }
+
+ ///
+ /// 标包数量
+ ///
+ [Display(Name = "标包数量")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal StdPackQty { get; set; }
+
+ ///
+ /// 库存状态
+ ///
+ public EnumInventoryStatus Status { get; set; }
+
+ ///
+ /// 计量单位
+ ///
+ public string Uom { get; set; }
+
+ #endregion
+
+ #region 请求信息
+
+ ///
+ /// 请求库位
+ ///
+ public string RequestLocationCode { get; set; }
+
+ ///
+ /// 到库区
+ ///
+ public string RequestLocationArea { get; set; }
+
+ ///
+ /// 到库位组
+ ///
+ public string RequestLocationGroup { get; set; }
+
+ ///
+ /// 到ERP库位
+ ///
+ public string RequestLocationErpCode { get; set; }
+
+ ///
+ /// 到仓库
+ ///
+ public string RequestWarehouseCode { get; set; }
+
+ ///
+ /// 在途库库位
+ ///
+ public string OnTheWayLocationCode { get; set; }
+
+ ///
+ /// 生产线
+ ///
+ public string ProdLine { get; set; }
+
+ ///
+ /// 位置码
+ ///
+ public string PositionCode { get; set; }
+
+ ///
+ /// 推荐的类型
+ ///
+ public EnumRecommendType RecommendType { get; set; }
+
+ ///
+ /// 需求数量
+ ///
+ public decimal RequestQty { get; set; }
+
+ #endregion
+
+ #region 推荐来源
+
+ ///
+ /// 推荐来源托标签
+ ///
+ public string RecommendFromContainerCode { get; set; }
+
+ ///
+ /// 推荐来源箱标签
+ ///
+ public string RecommendFromPackingCode { get; set; }
+
+ ///
+ /// 推荐来源批次供应商批次
+ ///
+ public string RecommendFromSupplierBatch { get; set; }
+
+ ///
+ /// 推荐来源批次到货时间
+ ///
+ public DateTime RecommendFromArriveDate { get; set; }
+
+ ///
+ /// 推荐来源批次生产时间
+ ///
+ public DateTime RecommendFromProduceDate { get; set; }
+
+ ///
+ /// 推荐来源批次过期时间
+ ///
+ public DateTime RecommendFromExpireDate { get; set; }
+
+ ///
+ /// 推荐来源批次排序
+ ///
+ public string RecommendFromLot { get; set; }
+
+ ///
+ /// 推荐来源库位
+ ///
+ public string RecommendFromLocationCode { get; set; }
+
+ ///
+ /// 推荐来源库区
+ ///
+ public string RecommendFromLocationArea { get; set; }
+
+ ///
+ /// 推荐来源库位组
+ ///
+ public string RecommendFromLocationGroup { get; set; }
+
+ ///
+ /// 推荐来源ERP库位
+ ///
+ public string RecommendFromLocationErpCode { get; set; }
+
+ ///
+ /// 推荐来源仓库
+ ///
+ public string RecommendFromWarehouseCode { get; set; }
+
+ ///
+ /// 推荐来源数量
+ ///
+ public decimal RecommendFromQty { get; set; }
+
+ #endregion
+
+ #region 推荐目标
+
+ ///
+ /// 推荐目标托标签
+ ///
+ public string RecommendToContainerCode { get; set; }
+
+ ///
+ /// 推荐目标箱标签
+ ///
+ public string RecommendToPackingCode { get; set; }
+
+ ///
+ /// 推荐目标批次供应商批次
+ ///
+ public string RecommendToSupplierBatch { get; set; }
+
+ ///
+ /// 推荐目标批次到货时间
+ ///
+ public DateTime RecommendToArriveDate { get; set; }
+
+ ///
+ /// 推荐目标批次生产时间
+ ///
+ public DateTime RecommendToProduceDate { get; set; }
+
+ ///
+ /// 推荐目标批次过期时间
+ ///
+ public DateTime RecommendToExpireDate { get; set; }
+
+ ///
+ /// 推荐目标批次排序
+ ///
+ public string RecommendToLot { get; set; }
+
+ ///
+ /// 推荐目标库位
+ ///
+ public string RecommendToLocationCode { get; set; }
+
+ ///
+ /// 推荐目标库区
+ ///
+ public string RecommendToLocationArea { get; set; }
+
+ ///
+ /// 推荐目标库位组
+ ///
+ public string RecommendToLocationGroup { get; set; }
+
+ ///
+ /// 推荐目标ERP库位
+ ///
+ public string RecommendToLocationErpCode { get; set; }
+
+ ///
+ /// 推荐目标仓库
+ ///
+ public string RecommendToWarehouseCode { get; set; }
+
+ ///
+ /// 推荐目标数量
+ ///
+ public decimal RecommendToQty { get; set; }
+
+ #endregion
+
+ #region 实际来源
+
+ ///
+ /// 实际目标托标签
+ ///
+ public string HandledFromContainerCode { get; set; }
+
+ ///
+ /// 实际箱标签
+ ///
+ public string HandledFromPackingCode { get; set; }
+
+ ///
+ /// 实际批次供应商批次
+ ///
+ public string HandledFromSupplierBatch { get; set; }
+
+ ///
+ /// 实际批次到货时间
+ ///
+ public DateTime HandledFromArriveDate { get; set; }
+
+ ///
+ /// 实际批次生产时间
+ ///
+ public DateTime HandledFromProduceDate { get; set; }
+
+ ///
+ /// 实际批次过期时间
+ ///
+ public DateTime HandledFromExpireDate { get; set; }
+
+ ///
+ /// 实际批次排序
+ ///
+ public string HandledFromLot { get; set; }
+
+ ///
+ /// 实际库位
+ ///
+ public string HandledFromLocationCode { get; set; }
+
+ ///
+ /// 实际库区
+ ///
+ public string HandledFromLocationArea { get; set; }
+
+ ///
+ /// 实际库位组
+ ///
+ public string HandledFromLocationGroup { get; set; }
+
+ ///
+ /// 实际ERP库位
+ ///
+ public string HandledFromLocationErpCode { get; set; }
+
+ ///
+ /// 实际仓库
+ ///
+ public string HandledFromWarehouseCode { get; set; }
+
+ ///
+ /// 实际数量
+ ///
+ public decimal HandledFromQty { get; set; }
+
+ #endregion
+
+ #region 实际目标
+
+ ///
+ /// 实际目标托标签
+ ///
+ public string HandledToContainerCode { get; set; }
+
+ ///
+ /// 实际箱标签
+ ///
+ public string HandledToPackingCode { get; set; }
+
+ ///
+ /// 实际批次供应商批次
+ ///
+ public string HandledToSupplierBatch { get; set; }
+
+ ///
+ /// 实际批次到货时间
+ ///
+ public DateTime HandledToArriveDate { get; set; }
+
+ ///
+ /// 实际批次生产时间
+ ///
+ public DateTime HandledToProduceDate { get; set; }
+
+ ///
+ /// 实际批次过期时间
+ ///
+ public DateTime HandledToExpireDate { get; set; }
+
+ ///
+ /// 实际批次排序
+ ///
+ public string HandledToLot { get; set; }
+
+ ///
+ /// 实际库位
+ ///
+ public string HandledToLocationCode { get; set; }
+
+ ///
+ /// 实际库区
+ ///
+ public string HandledToLocationArea { get; set; }
+
+ ///
+ /// 实际库位组
+ ///
+ public string HandledToLocationGroup { get; set; }
+
+ ///
+ /// 实际ERP库位
+ ///
+ public string HandledToLocationErpCode { get; set; }
+
+ ///
+ /// 实际仓库
+ ///
+ public string HandledToWarehouseCode { get; set; }
+
+ ///
+ /// 实际数量
+ ///
+ public decimal HandledToQty { get; set; }
+
+ #endregion
+
+ #region 开关
+
//箱码
- public bool CheckPackingCodeFrom { get; set; }
+ public bool IsPackingCodeFrom { get; set; }
+
+ public bool IsPackingCodeTo { get; set; }
- public bool CheckPackingCodeTo { get; set; }
//批次
- public bool CheckLotFrom { get; set; }
+ public bool IsLotFrom { get; set; }
+
+ public bool IsLotTo { get; set; }
- public bool CheckLotTo { get; set; }
//零件号
- public bool CheckItemCodeFrom { get; set; }
+ public bool IsItemCodeFrom { get; set; }
+
+ public bool IsItemCodeTo { get; set; }
- public bool CheckItemCodeTo { get; set; }
//状态
- public bool CheckStatusFrom { get; set; }
+ public bool IsStatusFrom { get; set; }
+
+ public bool IsStatusTo { get; set; }
- public bool CheckStatusTo { get; set; }
//库位
- public bool CheckLocationCodeFrom { get; set; }
+ public bool IsLocationCodeFrom { get; set; }
- public bool CheckLocationCodeTo { get; set; }
+ public bool IsLocationCodeTo { get; set; }
//库位组
- public bool CheckLocationGroupFrom { get; set; }
+ public bool IsLocationGroupFrom { get; set; }
- public bool CheckLocationGroupTo { get; set; }
+ public bool IsLocationGroupTo { get; set; }
//区域
- public bool CheckLocationAreaFrom { get; set; }
+ public bool IsLocationAreaFrom { get; set; }
- public bool CheckLocationAreaTo { get; set; }
+ public bool IsLocationAreaTo { get; set; }
//储位
- public bool CheckLocationErpCodeFrom { get; set; }
+ public bool IsLocationErpCodeFrom { get; set; }
+
+ public bool IsLocationErpCodeTo { get; set; }
- public bool CheckLocationErpCodeTo { get; set; }
//数量
- public bool CheckQtyFrom { get; set; }
+ public bool IsQtyFrom { get; set; }
- public bool CheckQtyTo { get; set; }
+ public bool IsQtyTo { get; set; }
#endregion
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/Inputs/TransferLibRequestDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/Inputs/TransferLibRequestDetailInput.cs
index 4c02b71d9..ddbf2cc21 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/Inputs/TransferLibRequestDetailInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/Inputs/TransferLibRequestDetailInput.cs
@@ -1,4 +1,7 @@
+using System;
using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using Win_in.Sfs.Shared.Application.Contracts;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Domain;
@@ -8,7 +11,7 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
///
/// 库存转移记录-明细表
///
-public class TransferLibRequestDetailInput : NewRecommendFromTo
+public class TransferLibRequestDetailInput : SfsDetailInputBase
{
///
/// 原因
@@ -48,47 +51,285 @@ public class TransferLibRequestDetailInput : NewRecommendFromTo
public string CallJobNumber { get; set; }
#endregion
- #region 校验
+ #region 库存基础信息
+
+ ///
+ /// 物品代码
+ ///
+ public string ItemCode { get; set; }
+
+ ///
+ /// 物品名称
+ ///
+ public string ItemName { get; set; }
+
+ ///
+ /// 物品描述1
+ ///
+ public string ItemDesc1 { get; set; }
+
+ ///
+ /// 物品描述2
+ ///
+ public string ItemDesc2 { get; set; }
+
+ ///
+ /// 标包数量
+ ///
+ [Display(Name = "标包数量")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal StdPackQty { get; set; }
+
+ ///
+ /// 库存状态
+ ///
+ public EnumInventoryStatus Status { get; set; }
+
+ ///
+ /// 计量单位
+ ///
+ public string Uom { get; set; }
+
+ #endregion
+
+ #region 请求信息
+
+ ///
+ /// 请求库位
+ ///
+ public string RequestLocationCode { get; set; }
+
+ ///
+ /// 到库区
+ ///
+ public string RequestLocationArea { get; set; }
+
+ ///
+ /// 到库位组
+ ///
+ public string RequestLocationGroup { get; set; }
+
+ ///
+ /// 到ERP库位
+ ///
+ public string RequestLocationErpCode { get; set; }
+
+ ///
+ /// 到仓库
+ ///
+ public string RequestWarehouseCode { get; set; }
+
+ ///
+ /// 在途库库位
+ ///
+ public string OnTheWayLocationCode { get; set; }
+
+ ///
+ /// 生产线
+ ///
+ public string ProdLine { get; set; }
+
+ ///
+ /// 位置码
+ ///
+ public string PositionCode { get; set; }
+
+ ///
+ /// 推荐的类型
+ ///
+ public EnumRecommendType RecommendType { get; set; }
+
+ ///
+ /// 需求数量
+ ///
+ public decimal RequestQty { get; set; }
+
+ #endregion
+
+ #region 推荐来源
+
+ ///
+ /// 推荐来源托标签
+ ///
+ public string RecommendFromContainerCode { get; set; }
+
+ ///
+ /// 推荐来源箱标签
+ ///
+ public string RecommendFromPackingCode { get; set; }
+
+ ///
+ /// 推荐来源批次供应商批次
+ ///
+ public string RecommendFromSupplierBatch { get; set; }
+
+ ///
+ /// 推荐来源批次到货时间
+ ///
+ public DateTime RecommendFromArriveDate { get; set; }
+
+ ///
+ /// 推荐来源批次生产时间
+ ///
+ public DateTime RecommendFromProduceDate { get; set; }
+
+ ///
+ /// 推荐来源批次过期时间
+ ///
+ public DateTime RecommendFromExpireDate { get; set; }
+
+ ///
+ /// 推荐来源批次排序
+ ///
+ public string RecommendFromLot { get; set; }
+
+ ///
+ /// 推荐来源库位
+ ///
+ public string RecommendFromLocationCode { get; set; }
+
+ ///
+ /// 推荐来源库区
+ ///
+ public string RecommendFromLocationArea { get; set; }
+
+ ///
+ /// 推荐来源库位组
+ ///
+ public string RecommendFromLocationGroup { get; set; }
+
+ ///
+ /// 推荐来源ERP库位
+ ///
+ public string RecommendFromLocationErpCode { get; set; }
+
+ ///
+ /// 推荐来源仓库
+ ///
+ public string RecommendFromWarehouseCode { get; set; }
+
+ ///
+ /// 推荐来源数量
+ ///
+ public decimal RecommendFromQty { get; set; }
+
+ #endregion
+
+ #region 推荐目标
+
+ ///
+ /// 推荐目标托标签
+ ///
+ public string RecommendToContainerCode { get; set; }
+
+ ///
+ /// 推荐目标箱标签
+ ///
+ public string RecommendToPackingCode { get; set; }
+
+ ///
+ /// 推荐目标批次供应商批次
+ ///
+ public string RecommendToSupplierBatch { get; set; }
+
+ ///
+ /// 推荐目标批次到货时间
+ ///
+ public DateTime RecommendToArriveDate { get; set; }
+
+ ///
+ /// 推荐目标批次生产时间
+ ///
+ public DateTime RecommendToProduceDate { get; set; }
+
+ ///
+ /// 推荐目标批次过期时间
+ ///
+ public DateTime RecommendToExpireDate { get; set; }
+
+ ///
+ /// 推荐目标批次排序
+ ///
+ public string RecommendToLot { get; set; }
+
+ ///
+ /// 推荐目标库位
+ ///
+ public string RecommendToLocationCode { get; set; }
+
+ ///
+ /// 推荐目标库区
+ ///
+ public string RecommendToLocationArea { get; set; }
+
+ ///
+ /// 推荐目标库位组
+ ///
+ public string RecommendToLocationGroup { get; set; }
+
+ ///
+ /// 推荐目标ERP库位
+ ///
+ public string RecommendToLocationErpCode { get; set; }
+
+ ///
+ /// 推荐目标仓库
+ ///
+ public string RecommendToWarehouseCode { get; set; }
+
+ ///
+ /// 推荐目标数量
+ ///
+ public decimal RecommendToQty { get; set; }
+
+ #endregion
+
+ #region 开关
+
//箱码
- public bool CheckPackingCodeFrom { get; set; }
+ public bool IsPackingCodeFrom { get; set; }
+
+ public bool IsPackingCodeTo { get; set; }
- public bool CheckPackingCodeTo { get; set; }
//批次
- public bool CheckLotFrom { get; set; }
+ public bool IsLotFrom { get; set; }
+
+ public bool IsLotTo { get; set; }
- public bool CheckLotTo { get; set; }
//零件号
- public bool CheckItemCodeFrom { get; set; }
+ public bool IsItemCodeFrom { get; set; }
+
+ public bool IsItemCodeTo { get; set; }
- public bool CheckItemCodeTo { get; set; }
//状态
- public bool CheckStatusFrom { get; set; }
+ public bool IsStatusFrom { get; set; }
+
+ public bool IsStatusTo { get; set; }
- public bool CheckStatusTo { get; set; }
//库位
- public bool CheckLocationCodeFrom { get; set; }
+ public bool IsLocationCodeFrom { get; set; }
- public bool CheckLocationCodeTo { get; set; }
+ public bool IsLocationCodeTo { get; set; }
//库位组
- public bool CheckLocationGroupFrom { get; set; }
+ public bool IsLocationGroupFrom { get; set; }
- public bool CheckLocationGroupTo { get; set; }
+ public bool IsLocationGroupTo { get; set; }
//区域
- public bool CheckLocationAreaFrom { get; set; }
+ public bool IsLocationAreaFrom { get; set; }
- public bool CheckLocationAreaTo { get; set; }
+ public bool IsLocationAreaTo { get; set; }
//储位
- public bool CheckLocationErpCodeFrom { get; set; }
+ public bool IsLocationErpCodeFrom { get; set; }
+
+ public bool IsLocationErpCodeTo { get; set; }
- public bool CheckLocationErpCodeTo { get; set; }
//数量
- public bool CheckQtyFrom { get; set; }
+ public bool IsQtyFrom { get; set; }
- public bool CheckQtyTo { get; set; }
+ public bool IsQtyTo { get; set; }
#endregion
-
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionJobs/InjectionJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionJobs/InjectionJobAppService.cs
index 0b407c39c..677d30d58 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionJobs/InjectionJobAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionJobs/InjectionJobAppService.cs
@@ -41,12 +41,7 @@ public class InjectionJobAppService
_transferLibJobAppService = transferLibJobAppService;
}
- ///
- /// 批量创建
- ///
- ///
- ///
- [HttpPost("create-many")]
+ [HttpPost("add-many")]
public override async Task> CreateManyAsync(List inputs)
{
foreach (var input in inputs)
@@ -57,11 +52,6 @@ public class InjectionJobAppService
return await base.CreateManyAsync(inputs).ConfigureAwait(false);
}
- ///
- /// 创建
- ///
- ///
- ///
[HttpPost("")]
public override async Task CreateAsync(InjectionJobEditInput input)
{
@@ -82,8 +72,10 @@ public class InjectionJobAppService
var loctionDto = await _locationAppService.GetByCodeAsync(jobDetailInputdetail.RecommendFromLocationCode)
.ConfigureAwait(false);
- if (loctionDto.RowCode == 1)
+ if (loctionDto.RowCode != 1)
{
+ input.JobStatus = EnumJobStatus.Wait;
+
jobDetailInputdetail.TransferLibFromArriveDate = jobDetailInputdetail.RecommendFromArriveDate;
jobDetailInputdetail.TransferLibFromContainerCode = jobDetailInputdetail.RecommendFromContainerCode;
jobDetailInputdetail.TransferLibFromExpireDate = jobDetailInputdetail.RecommendFromExpireDate;
@@ -112,10 +104,6 @@ public class InjectionJobAppService
jobDetailInputdetail.TransferLibToSupplierBatch = jobDetailInputdetail.RecommendToSupplierBatch;
jobDetailInputdetail.TransferLibToWarehouseCode = jobDetailInputdetail.RecommendToWarehouseCode;
}
- else
- {
- input.JobStatus = EnumJobStatus.Wait;
- }
}
[HttpPost("cancel-by-request/{injectionNumber}")]
@@ -149,8 +137,8 @@ public class InjectionJobAppService
return ObjectMapper.Map, List>(entitys);
}
- [HttpPost("do-call-back")]
- public async Task> DoTransferLibCallbackAsync(string businessType, string requestNum, string jobNum)
+ [HttpPost("Do-Call-Back")]
+ public async Task DoTransferLibCallbackAsync(string businessType, string requestNum, string jobNum)
{
var job = await _repository.FindAsync(p => p.Number == jobNum).ConfigureAwait(false);
@@ -193,7 +181,8 @@ public class InjectionJobAppService
await _repository.UpdateAsync(job).ConfigureAwait(false);
- return new Tuple(true,"s");
+ //return new Tuple(true,"s");
+ return new TransferLibJobDTO();
}
[HttpPost("test")]
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/TransferLibJobs/TransferLibJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/TransferLibJobs/TransferLibJobAppService.cs
index f967ab3f7..788e3b817 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/TransferLibJobs/TransferLibJobAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/TransferLibJobs/TransferLibJobAppService.cs
@@ -5,6 +5,7 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp;
+using Volo.Abp.Uow;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
using Win_in.Sfs.Wms.Store.Domain.Shared;
@@ -33,6 +34,8 @@ public class TransferLibJobAppService
///
///
///
+ [HttpPost("handle/{id}")]
+ [UnitOfWork]
public override async Task CompleteAsync(Guid id, TransferLibJobDTO dto)
{
//var str = "Win_in.Sfs.Wms.Store.Application.InjectionJobAppService";
@@ -72,10 +75,10 @@ public class TransferLibJobAppService
{
throw new UserFriendlyException($"{methodPrefix}类型为{dto.CallServerName}的对象没有实现ITransferLibCallback接口");
}
- Tuple callbackRet = await transferLibCallback.DoTransferLibCallbackAsync(dto.CallServerName, dto.CallRequestNumber, dto.CallJobNumber);
- if (callbackRet != null && callbackRet.Item1 == false)
+ TransferLibJobDTO callbackRet = await transferLibCallback.DoTransferLibCallbackAsync(dto.CallServerName, dto.CallRequestNumber, dto.CallJobNumber).ConfigureAwait(false);
+ if (callbackRet == null || callbackRet.Number == null)
{
- throw new UserFriendlyException($"{methodPrefix}执行回调服务{dto.CallServerName}出错,返回错误信息:{callbackRet.Item2}");
+ throw new UserFriendlyException($"{methodPrefix}执行回调服务{dto.CallServerName}出错,返回实体为空!");
}
//var assembly = Assembly.GetExecutingAssembly();
//var ty = assembly.GetType(dto.CallServerName);
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferLibNotes/ITransferLibCallback.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferLibNotes/ITransferLibCallback.cs
index b079a9ad9..b0da0ac6d 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferLibNotes/ITransferLibCallback.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferLibNotes/ITransferLibCallback.cs
@@ -4,11 +4,12 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win_in.Sfs.Wms.Inventory.Application.Contracts;
+using Win_in.Sfs.Wms.Store.Application.Contracts;
namespace Win_in.Sfs.Wms.Store.Notes;
public interface ITransferLibCallback
{
- Task> DoTransferLibCallbackAsync(string businessType, string requestNum, string jobNum);
+ Task DoTransferLibCallbackAsync(string businessType, string requestNum, string jobNum);
}
public class TestTransferLibCallback : ITransferLibCallback
@@ -17,10 +18,9 @@ public class TestTransferLibCallback : ITransferLibCallback
{
}
- public async Task> DoTransferLibCallbackAsync(string businessType, string requestNum,
+ public async Task DoTransferLibCallbackAsync(string businessType, string requestNum,
string jobNum)
{
- return Tuple.Create(true, "调用新移库回调方法成功!");
-
+ return new TransferLibJobDTO();
}
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestAppService.cs
index 5ba4ea5cd..4ca739917 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestAppService.cs
@@ -319,14 +319,14 @@ public class TransferLibRequestAppService : SfsStoreRequestAppServiceBase
var entity = ObjectMapper.Map(input);
var subType = Enum.Parse(input.Type);
- //var tranType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.TransferLib, subType)
- // .ConfigureAwait(false);
- //entity.Type = ((int)subType).ToString();
- //entity.AutoCompleteJob = tranType.AutoCompleteJob;
- //entity.AutoSubmit = tranType.AutoSubmitRequest;
- //entity.AutoAgree = tranType.AutoAgreeRequest;
- //entity.AutoHandle = tranType.AutoHandleRequest;
- //entity.DirectCreateNote = tranType.DirectCreateNote;
+ var tranType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.TransferLib, subType)
+ .ConfigureAwait(false);
+ entity.Type = ((int)subType).ToString();
+ entity.AutoCompleteJob = tranType.AutoCompleteJob;
+ entity.AutoSubmit = tranType.AutoSubmitRequest;
+ entity.AutoAgree = tranType.AutoAgreeRequest;
+ entity.AutoHandle = tranType.AutoHandleRequest;
+ entity.DirectCreateNote = tranType.DirectCreateNote;
await _transferLibRequestManager.CreateAsync(entity).ConfigureAwait(false);
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Bases/NewRecommendHandled/NewRecommendFromTo.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Bases/NewRecommendHandled/NewRecommendFromTo.cs
deleted file mode 100644
index 62a8849ea..000000000
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Bases/NewRecommendHandled/NewRecommendFromTo.cs
+++ /dev/null
@@ -1,197 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Win_in.Sfs.Shared.Domain;
-using Win_in.Sfs.Shared.Domain.Shared;
-
-namespace Win_in.Sfs.Wms.Store.Domain;
-public class NewRecommendFromTo : SfsStoreDetailEntityBase//SfsDetailEntityBase
-{
- #region 库存基础信息
- /*
- ///
- /// 物品代码
- ///
- public string ItemCode { get; set; }
-
- ///
- /// 物品名称
- ///
- public string ItemName { get; set; }
-
- ///
- /// 物品描述1
- ///
- public string ItemDesc1 { get; set; }
-
- ///
- /// 物品描述2
- ///
- public string ItemDesc2 { get; set; }
- */
- ///
- /// 标包数量
- ///
- [Display(Name = "标包数量")]
- [Column(TypeName = "decimal(18,6)")]
- public decimal StdPackQty { get; set; }
-
- ///
- /// 库存状态
- ///
- public EnumInventoryStatus Status { get; set; }
-
- ///
- /// 计量单位
- ///
- public string Uom { get; set; }
-
- #endregion
-
- #region 推荐来源
-
- ///
- /// 推荐来源托标签
- ///
- public string RecommendFromContainerCode { get; set; }
-
- ///
- /// 推荐来源箱标签
- ///
- public string RecommendFromPackingCode { get; set; }
-
- ///
- /// 推荐来源批次供应商批次
- ///
- public string RecommendFromSupplierBatch { get; set; }
-
- ///
- /// 推荐来源批次到货时间
- ///
- public DateTime RecommendFromArriveDate { get; set; }
-
- ///
- /// 推荐来源批次生产时间
- ///
- public DateTime RecommendFromProduceDate { get; set; }
-
- ///
- /// 推荐来源批次过期时间
- ///
- public DateTime RecommendFromExpireDate { get; set; }
-
- ///
- /// 推荐来源批次排序
- ///
- public string RecommendFromLot { get; set; }
-
- ///
- /// 推荐来源库位
- ///
- public string RecommendFromLocationCode { get; set; }
-
- ///
- /// 推荐来源库区
- ///
- public string RecommendFromLocationArea { get; set; }
-
- ///
- /// 推荐来源库位组
- ///
- public string RecommendFromLocationGroup { get; set; }
-
- ///
- /// 推荐来源ERP库位
- ///
- public string RecommendFromLocationErpCode { get; set; }
-
- ///
- /// 推荐来源仓库
- ///
- public string RecommendFromWarehouseCode { get; set; }
-
- ///
- /// 推荐来源数量
- ///
- public decimal RecommendFromQty { get; set; }
-
- #endregion
-
- #region 推荐目标
-
- ///
- /// 推荐目标托标签
- ///
- public string RecommendToContainerCode { get; set; }
-
- ///
- /// 推荐目标箱标签
- ///
- public string RecommendToPackingCode { get; set; }
-
- ///
- /// 推荐目标批次供应商批次
- ///
- public string RecommendToSupplierBatch { get; set; }
-
- ///
- /// 推荐目标批次到货时间
- ///
- public DateTime RecommendToArriveDate { get; set; }
-
- ///
- /// 推荐目标批次生产时间
- ///
- public DateTime RecommendToProduceDate { get; set; }
-
- ///
- /// 推荐目标批次过期时间
- ///
- public DateTime RecommendToExpireDate { get; set; }
-
- ///
- /// 推荐目标批次排序
- ///
- public string RecommendToLot { get; set; }
-
- ///
- /// 推荐目标库位
- ///
- public string RecommendToLocationCode { get; set; }
-
- ///
- /// 推荐目标库区
- ///
- public string RecommendToLocationArea { get; set; }
-
- ///
- /// 推荐目标库位组
- ///
- public string RecommendToLocationGroup { get; set; }
-
- ///
- /// 推荐目标ERP库位
- ///
- public string RecommendToLocationErpCode { get; set; }
-
- ///
- /// 推荐目标仓库
- ///
- public string RecommendToWarehouseCode { get; set; }
-
- ///
- /// 推荐目标数量
- ///
- public decimal RecommendToQty { get; set; }
-
- #endregion
-
- public void SetId(Guid id)
- {
- this.Id = id;
- }
-}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Bases/NewRecommendHandled/NewRecommendHandledFromTo.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Bases/NewRecommendHandled/NewRecommendHandledFromTo.cs
deleted file mode 100644
index 8bf765d58..000000000
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Bases/NewRecommendHandled/NewRecommendHandledFromTo.cs
+++ /dev/null
@@ -1,148 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Win_in.Sfs.Wms.Store.Domain;
-public class NewRecommendHandledFromTo : NewRecommendFromTo
-{
- #region 实际来源
-
- ///
- /// 实际目标托标签
- ///
- public string HandledFromContainerCode { get; set; }
-
- ///
- /// 实际箱标签
- ///
- public string HandledFromPackingCode { get; set; }
-
- ///
- /// 实际批次供应商批次
- ///
- public string HandledFromSupplierBatch { get; set; }
-
- ///
- /// 实际批次到货时间
- ///
- public DateTime HandledFromArriveDate { get; set; }
-
- ///
- /// 实际批次生产时间
- ///
- public DateTime HandledFromProduceDate { get; set; }
-
- ///
- /// 实际批次过期时间
- ///
- public DateTime HandledFromExpireDate { get; set; }
-
- ///
- /// 实际批次排序
- ///
- public string HandledFromLot { get; set; }
-
- ///
- /// 实际库位
- ///
- public string HandledFromLocationCode { get; set; }
-
- ///
- /// 实际库区
- ///
- public string HandledFromLocationArea { get; set; }
-
- ///
- /// 实际库位组
- ///
- public string HandledFromLocationGroup { get; set; }
-
- ///
- /// 实际ERP库位
- ///
- public string HandledFromLocationErpCode { get; set; }
-
- ///
- /// 实际仓库
- ///
- public string HandledFromWarehouseCode { get; set; }
-
- ///
- /// 实际数量
- ///
- public decimal HandledFromQty { get; set; }
-
- #endregion
-
- #region 实际目标
-
- ///
- /// 实际目标托标签
- ///
- public string HandledToContainerCode { get; set; }
-
- ///
- /// 实际箱标签
- ///
- public string HandledToPackingCode { get; set; }
-
- ///
- /// 实际批次供应商批次
- ///
- public string HandledToSupplierBatch { get; set; }
-
- ///
- /// 实际批次到货时间
- ///
- public DateTime HandledToArriveDate { get; set; }
-
- ///
- /// 实际批次生产时间
- ///
- public DateTime HandledToProduceDate { get; set; }
-
- ///
- /// 实际批次过期时间
- ///
- public DateTime HandledToExpireDate { get; set; }
-
- ///
- /// 实际批次排序
- ///
- public string HandledToLot { get; set; }
-
- ///
- /// 实际库位
- ///
- public string HandledToLocationCode { get; set; }
-
- ///
- /// 实际库区
- ///
- public string HandledToLocationArea { get; set; }
-
- ///
- /// 实际库位组
- ///
- public string HandledToLocationGroup { get; set; }
-
- ///
- /// 实际ERP库位
- ///
- public string HandledToLocationErpCode { get; set; }
-
- ///
- /// 实际仓库
- ///
- public string HandledToWarehouseCode { get; set; }
-
- ///
- /// 实际数量
- ///
- public decimal HandledToQty { get; set; }
-
- #endregion
-
-}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/TransferLibJobs/TransferLibJobDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/TransferLibJobs/TransferLibJobDetail.cs
index dc9e6a252..8c2ade890 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/TransferLibJobs/TransferLibJobDetail.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/TransferLibJobs/TransferLibJobDetail.cs
@@ -1,6 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
+using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
namespace Win_in.Sfs.Wms.Store.Domain;
@@ -8,7 +9,7 @@ namespace Win_in.Sfs.Wms.Store.Domain;
///
/// //??TransferLib实体
///
-public class TransferLibJobDetail : SfsStoreDetailEntityBase
+public class TransferLibJobDetail : SfsDetailEntityBase
{
///
/// 原因
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/TransferLibNoteDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/TransferLibNoteDetail.cs
index ac3e17ee0..06ac4c797 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/TransferLibNoteDetail.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/TransferLibNoteDetail.cs
@@ -10,7 +10,7 @@ namespace Win_in.Sfs.Wms.Store.Domain;
///
/// 库存转移记录-明细表 //??TransferLib实体
///
-public class TransferLibNoteDetail : SfsStoreDetailEntityBase
+public class TransferLibNoteDetail : SfsDetailEntityBase//SfsStoreDetailEntityBase
{
///
/// 原因
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/TransferLibRequestDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/TransferLibRequestDetail.cs
index 2f43a52b6..d413e6f47 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/TransferLibRequestDetail.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/TransferLibRequestDetail.cs
@@ -1,4 +1,8 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json;
+using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Domain;
@@ -6,7 +10,7 @@ namespace Win_in.Sfs.Wms.Store.Domain;
///
/// //??TransferLib实体
///
-public class TransferLibRequestDetail : NewRecommendFromTo
+public class TransferLibRequestDetail : SfsDetailEntityBase //SfsStoreDetailEntityBase
{
///
/// 原因代码
@@ -44,46 +48,285 @@ public class TransferLibRequestDetail : NewRecommendFromTo
public string CallJobNumber { get; set; }
#endregion
- #region 校验
+ #region 库存基础信息
+
+ ///
+ /// 物品代码
+ ///
+ public string ItemCode { get; set; }
+
+ ///
+ /// 物品名称
+ ///
+ public string ItemName { get; set; }
+
+ ///
+ /// 物品描述1
+ ///
+ public string ItemDesc1 { get; set; }
+
+ ///
+ /// 物品描述2
+ ///
+ public string ItemDesc2 { get; set; }
+
+ ///
+ /// 标包数量
+ ///
+ [Display(Name = "标包数量")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal StdPackQty { get; set; }
+
+ ///
+ /// 库存状态
+ ///
+ public EnumInventoryStatus Status { get; set; }
+
+ ///
+ /// 计量单位
+ ///
+ public string Uom { get; set; }
+
+ #endregion
+
+ #region 请求信息
+
+ ///
+ /// 请求库位
+ ///
+ public string RequestLocationCode { get; set; }
+
+ ///
+ /// 到库区
+ ///
+ public string RequestLocationArea { get; set; }
+
+ ///
+ /// 到库位组
+ ///
+ public string RequestLocationGroup { get; set; }
+
+ ///
+ /// 到ERP库位
+ ///
+ public string RequestLocationErpCode { get; set; }
+
+ ///
+ /// 到仓库
+ ///
+ public string RequestWarehouseCode { get; set; }
+
+ ///
+ /// 在途库库位
+ ///
+ public string OnTheWayLocationCode { get; set; }
+
+ ///
+ /// 生产线
+ ///
+ public string ProdLine { get; set; }
+
+ ///
+ /// 位置码
+ ///
+ public string PositionCode { get; set; }
+
+ ///
+ /// 推荐的类型
+ ///
+ public EnumRecommendType RecommendType { get; set; }
+
+ ///
+ /// 需求数量
+ ///
+ public decimal RequestQty { get; set; }
+
+ #endregion
+
+ #region 推荐来源
+
+ ///
+ /// 推荐来源托标签
+ ///
+ public string RecommendFromContainerCode { get; set; }
+
+ ///
+ /// 推荐来源箱标签
+ ///
+ public string RecommendFromPackingCode { get; set; }
+
+ ///
+ /// 推荐来源批次供应商批次
+ ///
+ public string RecommendFromSupplierBatch { get; set; }
+
+ ///
+ /// 推荐来源批次到货时间
+ ///
+ public DateTime RecommendFromArriveDate { get; set; }
+
+ ///
+ /// 推荐来源批次生产时间
+ ///
+ public DateTime RecommendFromProduceDate { get; set; }
+
+ ///
+ /// 推荐来源批次过期时间
+ ///
+ public DateTime RecommendFromExpireDate { get; set; }
+
+ ///
+ /// 推荐来源批次排序
+ ///
+ public string RecommendFromLot { get; set; }
+
+ ///
+ /// 推荐来源库位
+ ///
+ public string RecommendFromLocationCode { get; set; }
+
+ ///
+ /// 推荐来源库区
+ ///
+ public string RecommendFromLocationArea { get; set; }
+
+ ///
+ /// 推荐来源库位组
+ ///
+ public string RecommendFromLocationGroup { get; set; }
+
+ ///
+ /// 推荐来源ERP库位
+ ///
+ public string RecommendFromLocationErpCode { get; set; }
+
+ ///
+ /// 推荐来源仓库
+ ///
+ public string RecommendFromWarehouseCode { get; set; }
+
+ ///
+ /// 推荐来源数量
+ ///
+ public decimal RecommendFromQty { get; set; }
+
+ #endregion
+
+ #region 推荐目标
+
+ ///
+ /// 推荐目标托标签
+ ///
+ public string RecommendToContainerCode { get; set; }
+
+ ///
+ /// 推荐目标箱标签
+ ///
+ public string RecommendToPackingCode { get; set; }
+
+ ///
+ /// 推荐目标批次供应商批次
+ ///
+ public string RecommendToSupplierBatch { get; set; }
+
+ ///
+ /// 推荐目标批次到货时间
+ ///
+ public DateTime RecommendToArriveDate { get; set; }
+
+ ///
+ /// 推荐目标批次生产时间
+ ///
+ public DateTime RecommendToProduceDate { get; set; }
+
+ ///
+ /// 推荐目标批次过期时间
+ ///
+ public DateTime RecommendToExpireDate { get; set; }
+
+ ///
+ /// 推荐目标批次排序
+ ///
+ public string RecommendToLot { get; set; }
+
+ ///
+ /// 推荐目标库位
+ ///
+ public string RecommendToLocationCode { get; set; }
+
+ ///
+ /// 推荐目标库区
+ ///
+ public string RecommendToLocationArea { get; set; }
+
+ ///
+ /// 推荐目标库位组
+ ///
+ public string RecommendToLocationGroup { get; set; }
+
+ ///
+ /// 推荐目标ERP库位
+ ///
+ public string RecommendToLocationErpCode { get; set; }
+
+ ///
+ /// 推荐目标仓库
+ ///
+ public string RecommendToWarehouseCode { get; set; }
+
+ ///
+ /// 推荐目标数量
+ ///
+ public decimal RecommendToQty { get; set; }
+
+ #endregion
+
+ #region 开关
+
//箱码
- public bool CheckPackingCodeFrom { get; set; }
+ public bool IsPackingCodeFrom { get; set; }
+
+ public bool IsPackingCodeTo { get; set; }
- public bool CheckPackingCodeTo { get; set; }
//批次
- public bool CheckLotFrom { get; set; }
+ public bool IsLotFrom { get; set; }
+
+ public bool IsLotTo { get; set; }
- public bool CheckLotTo { get; set; }
//零件号
- public bool CheckItemCodeFrom { get; set; }
+ public bool IsItemCodeFrom { get; set; }
+
+ public bool IsItemCodeTo { get; set; }
- public bool CheckItemCodeTo { get; set; }
//状态
- public bool CheckStatusFrom { get; set; }
+ public bool IsStatusFrom { get; set; }
+
+ public bool IsStatusTo { get; set; }
- public bool CheckStatusTo { get; set; }
//库位
- public bool CheckLocationCodeFrom { get; set; }
+ public bool IsLocationCodeFrom { get; set; }
- public bool CheckLocationCodeTo { get; set; }
+ public bool IsLocationCodeTo { get; set; }
//库位组
- public bool CheckLocationGroupFrom { get; set; }
+ public bool IsLocationGroupFrom { get; set; }
- public bool CheckLocationGroupTo { get; set; }
+ public bool IsLocationGroupTo { get; set; }
//区域
- public bool CheckLocationAreaFrom { get; set; }
+ public bool IsLocationAreaFrom { get; set; }
- public bool CheckLocationAreaTo { get; set; }
+ public bool IsLocationAreaTo { get; set; }
//储位
- public bool CheckLocationErpCodeFrom { get; set; }
+ public bool IsLocationErpCodeFrom { get; set; }
+
+ public bool IsLocationErpCodeTo { get; set; }
- public bool CheckLocationErpCodeTo { get; set; }
//数量
- public bool CheckQtyFrom { get; set; }
+ public bool IsQtyFrom { get; set; }
- public bool CheckQtyTo { get; set; }
+ public bool IsQtyTo { get; set; }
#endregion
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/TransferLibJobs/TransferLibJobDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/TransferLibJobs/TransferLibJobDbContextModelCreatingExtensions.cs
index 2597e8524..623e8f2ca 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/TransferLibJobs/TransferLibJobDbContextModelCreatingExtensions.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/TransferLibJobs/TransferLibJobDbContextModelCreatingExtensions.cs
@@ -41,6 +41,68 @@ public static class TransferLibJobDbContextModelCreatingExtensions
//Configure Job base properties
//b.ConfigureJobRecommendFromDetail();
//Properties
+ b.Property(q => q.Reason).HasMaxLength(SfsPropertyConst.CodeLength);
+ //b.Property(q => q.Status).HasMaxLength(SfsPropertyConst.NameLength).HasConversion();
+
+ b.Property(q => q.ItemCode).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.ItemName).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.ItemDesc1).HasMaxLength(SfsPropertyConst.DescLength);
+ b.Property(q => q.ItemDesc2).HasMaxLength(SfsPropertyConst.DescLength);
+
+ b.Property(q => q.CallServerName).HasMaxLength(SfsPropertyConst.TitleLength);
+ b.Property(q => q.CallBusinessType).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.CallRequestNumber).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.CallJobNumber).HasMaxLength(SfsPropertyConst.NameLength);
+
+ b.Property(q => q.Uom).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.RequestLocationCode).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.RequestLocationArea).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.RequestLocationGroup).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.RequestLocationErpCode).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.RequestWarehouseCode).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.OnTheWayLocationCode).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.PositionCode).HasMaxLength(SfsPropertyConst.NameLength);
+
+ b.Property(q => q.HandledFromContainerCode).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.HandledFromLocationArea).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.HandledFromLocationCode).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.HandledFromLocationErpCode).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.HandledFromLocationGroup).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.HandledFromLot).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.HandledFromPackingCode).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.HandledFromSupplierBatch).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.HandledFromWarehouseCode).HasMaxLength(SfsPropertyConst.NameLength);
+
+ b.Property(q => q.HandledToContainerCode).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.HandledToLocationArea).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.HandledToLocationCode).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.HandledToLocationErpCode).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.HandledToLocationGroup).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.HandledToLot).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.HandledToPackingCode).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.HandledToSupplierBatch).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.HandledToWarehouseCode).HasMaxLength(SfsPropertyConst.NameLength);
+
+ b.Property(q => q.RecommendFromContainerCode).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.RecommendFromLocationArea).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.RecommendFromLocationCode).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.RecommendFromLocationErpCode).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.RecommendFromLocationGroup).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.RecommendFromLot).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.RecommendFromPackingCode).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.RecommendFromSupplierBatch).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.RecommendFromWarehouseCode).HasMaxLength(SfsPropertyConst.NameLength);
+
+ b.Property(q => q.RecommendToContainerCode).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.RecommendToLocationArea).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.RecommendToLocationCode).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.RecommendToLocationErpCode).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.RecommendToLocationGroup).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.RecommendToLot).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.RecommendToPackingCode).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.RecommendToSupplierBatch).HasMaxLength(SfsPropertyConst.NameLength);
+ b.Property(q => q.RecommendToWarehouseCode).HasMaxLength(SfsPropertyConst.NameLength);
//Relations
//None
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240415054835_transferLibV222.Designer.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240415054835_transferLibV222.Designer.cs
new file mode 100644
index 000000000..455d930ad
--- /dev/null
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240415054835_transferLibV222.Designer.cs
@@ -0,0 +1,30134 @@
+//
+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("20240415054835_transferLibV222")]
+ partial class transferLibV222
+ {
+ 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.AssembleJob", 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("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("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsAutoComplete")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ 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("RequestType")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ 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.Property("Workshop")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Number")
+ .IsUnique();
+
+ b.ToTable("Job_AssembleJob", (string)null);
+ });
+
+ modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.AssembleJobDetail", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeliveryQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("DistributionType")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ExpiredTime")
+ .HasColumnType("datetime2");
+
+ b.Property("HandledArriveDate")
+ .HasColumnType("datetime2");
+
+ b.Property("HandledContainerCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("HandledContainerCode");
+
+ b.Property("HandledExpireDate")
+ .HasColumnType("datetime2");
+
+ b.Property("HandledFromLocationArea")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("HandledFromLocationArea");
+
+ b.Property("HandledFromLocationCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("HandledFromLocationCode");
+
+ b.Property("HandledFromLocationErpCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("HandledFromLocationErpCode");
+
+ b.Property("HandledFromLocationGroup")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("HandledFromLocationGroup");
+
+ b.Property("HandledFromWarehouseCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("HandledFromWarehouseCode");
+
+ b.Property("HandledLot")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("HandledLot");
+
+ b.Property("HandledPackingCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("HandledPackingCode");
+
+ b.Property("HandledProduceDate")
+ .HasColumnType("datetime2");
+
+ b.Property("HandledQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("HandledSupplierBatch")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("HandledSupplierBatch");
+
+ 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)");
+
+ b.Property("OnTheWayLocationCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Operation")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("PlanBeginTime")
+ .HasColumnType("datetime2");
+
+ b.Property("PlannedSplitRule")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("PositionCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ProdLine")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("RecommendArriveDate")
+ .HasColumnType("datetime2");
+
+ b.Property("RecommendContainerCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("RecommendContainerCode");
+
+ b.Property("RecommendExpireDate")
+ .HasColumnType("datetime2");
+
+ b.Property("RecommendFromLocationArea")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("RecommendFromLocationArea");
+
+ b.Property("RecommendFromLocationCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("RecommendFromLocationCode");
+
+ b.Property("RecommendFromLocationErpCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("RecommendFromLocationErpCode");
+
+ b.Property("RecommendFromLocationGroup")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("RecommendFromLocationGroup");
+
+ b.Property("RecommendFromWarehouseCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("RecommendFromWarehouseCode");
+
+ b.Property("RecommendLot")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("RecommendLot");
+
+ b.Property("RecommendPackingCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("RecommendPackingCode");
+
+ b.Property("RecommendProduceDate")
+ .HasColumnType("datetime2");
+
+ b.Property("RecommendQty")
+ .HasColumnType("decimal(18,6)");
+
+ b.Property("RecommendSupplierBatch")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("RecommendSupplierBatch");
+
+ b.Property("RecommendType")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Remark")
+ .HasMaxLength(3072)
+ .HasColumnType("nvarchar(3072)")
+ .HasColumnName("Remark");
+
+ b.Property("RequestLocationCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("RoundedQty")
+ .HasColumnType("decimal(18,6)");
+
+ 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("ToLocationArea")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ToLocationCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ToLocationErpCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ToLocationGroup")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ToWarehouseCode")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("TruncType")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Uom")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("WorkStation")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("MasterID");
+
+ b.ToTable("Job_AssembleJobDetail", (string)null);
+ });
+
+ modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.AssembleNote", 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("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ 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("RequestType")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("TenantId");
+
+ b.Property("UseOnTheWayLocation")
+ .HasColumnType("bit");
+
+ b.Property("Worker")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Workshop")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Number")
+ .IsUnique();
+
+ b.ToTable("Store_AssembleNote", (string)null);
+ });
+
+ modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.AssembleNoteDetail", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ArriveDate")
+ .HasColumnType("datetime2");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("ExpireDate")
+ .HasColumnType("datetime2");
+
+ b.Property("ExpiredTime")
+ .HasColumnType("datetime2");
+
+ b.Property("FromContainerCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("FromLocationArea")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)")
+ .HasColumnName("FromLocationArea");
+
+ b.Property