From 6752c3756674830fd35ce8af961246c313960a8a Mon Sep 17 00:00:00 2001
From: zhaoxinyu <89237069@qq.com>
Date: Tue, 16 Apr 2024 11:50:20 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Incoming/InjectionMoldingRequestReader.cs | 90 +++++++++++++------
.../PublishProfiles/FolderProfile2.pubxml | 17 ++++
2 files changed, 79 insertions(+), 28 deletions(-)
create mode 100644 be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/Properties/PublishProfiles/FolderProfile2.pubxml
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
index b4e8d7c3e..6ae2b1616 100644
--- 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
@@ -59,10 +59,12 @@ public class InjectionMoldingRequestReader : IReader
/// 读取注塑叫料任务
///
///
+
public virtual async Task> ReadAsync()
{
try
{
+ // 创建 SfsStoreRequestInputBase 对象以设定作业条件
var jobCondition = new SfsStoreRequestInputBase();
Filter filter = new Filter()
{
@@ -71,6 +73,7 @@ public class InjectionMoldingRequestReader : IReader
Logic = EnumFilterLogic.And.ToString(),
Value = (EnumRequestStatus.Completed).ToString()
};
+ // 添加筛选条件:请求状态不等于已完成
jobCondition.Condition.Filters.Add(filter);
filter = new Filter()
{
@@ -79,26 +82,32 @@ public class InjectionMoldingRequestReader : IReader
Logic = EnumFilterLogic.And.ToString(),
Value = "Vision"
};
+ // 添加筛选条件:类型为 Vision
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);
+ // 调用 ReaderCameraApi 方法获取摄像头信息
+ 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转注塑叫料明细任务数据
+ // 将摄像头信息转换为注塑叫料明细任务数据
+ cameraList = System.Text.Json.JsonSerializer.Deserialize>(camera);
- InjectionRequestEditInput input=new InjectionRequestEditInput();
+ InjectionRequestEditInput input = new InjectionRequestEditInput();
List injectionRequestDetails = new List();
- foreach (var job in cameraList) {
+ foreach (var job in cameraList)
+ {
var detailInput = new InjectionRequestDetailInput()
{
@@ -106,24 +115,30 @@ public class InjectionMoldingRequestReader : IReader
ToLocationCode = job.ToLocCode,
Qty = job.Qty,
};
+ // 添加注塑叫料明细任务数据
injectionRequestDetails.Add(detailInput);
}
input.Details.AddRange(injectionRequestDetails);
- var errors=await BindAsync(input.Details).ConfigureAwait(false);//零件仓库赋值
+ // 通过 BindAsync 方法对零件仓库进行赋值
+ var errors = await BindAsync(input.Details).ConfigureAwait(false);
if (errors.Count > 0)
{
- foreach (var error in errors) {
+ // 记录错误日志并返回空列表
+ foreach (var error in errors)
+ {
_logger.LogError(error);
}
return new List();
}
+ // 创建新的注塑请求并将数据写入数据库
await _injectionRequest.CreateAsync(input).ConfigureAwait(false);
}
}
+ // 捕获特定异常并记录日志
catch (AbpException ex)
{
- _logger.LogError(ex.Message);
+ _logger.LogError(ex.Message);
}
catch (JsonException ex)
{
@@ -133,32 +148,45 @@ public class InjectionMoldingRequestReader : IReader
{
_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}零件表中没找到!" ); }
+ // 获取对应零件信息
+ 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;
+ request.ToWarehouseCode = loc.WarehouseCode;
}
}
+ // 返回错误列表
return errors;
}
@@ -169,28 +197,34 @@ public class InjectionMoldingRequestReader : IReader
///
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(address).ConfigureAwait(false);
- if (response.IsSuccessStatusCode)
- {
- return await response.Content.ReadAsStringAsync().ConfigureAwait(false);
- }
-
+ // 从配置中获取远程摄像头的地址、用户名、密码和令牌
+ var address = _options.Value.AutoRemote.IpAddress;
+ var username = _options.Value.AutoRemote.UserName;
+ var password = _options.Value.AutoRemote.Password;
+ var token = _options.Value.AutoRemote.Token;
+
+ // 创建一个HttpClient实例
+ var client = _httpClientFactory.CreateClient();
+
+ // 将用户名和密码转换为Base64编码的凭据,并设置请求的身份验证信息
+ var credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{username}:{password}"));
+ client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", credentials);
+
+ // 发送GET请求到远程摄像头地址并等待响应
+ var response = await client.GetAsync(address).ConfigureAwait(false);
+
+ // 如果请求成功,则返回响应内容,否则返回错误信息
+ if (response.IsSuccessStatusCode)
+ {
+ return await response.Content.ReadAsStringAsync().ConfigureAwait(false);
+ }
+
return "Error occurred";
}
+
private List Parse(string p_str)
{
- List requests = new List();
-
-
-
+ List requests = new List();
return System.Text.Json.JsonSerializer.Deserialize>(p_str);
}
diff --git a/be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/Properties/PublishProfiles/FolderProfile2.pubxml b/be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/Properties/PublishProfiles/FolderProfile2.pubxml
new file mode 100644
index 000000000..d5b645c0e
--- /dev/null
+++ b/be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/Properties/PublishProfiles/FolderProfile2.pubxml
@@ -0,0 +1,17 @@
+
+
+
+
+ false
+ false
+ true
+ Release
+ Any CPU
+ FileSystem
+ C:\wms
+ FileSystem
+ <_TargetId>Folder
+
+
\ No newline at end of file
From 7336f1a4283c631030650a30e98210201f6e46ee Mon Sep 17 00:00:00 2001
From: zhouhongjun <565221961@qq.com>
Date: Tue, 16 Apr 2024 11:51:12 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../IAssembleRequestAppService.cs | 2 +-
.../ICoatingMaterialRequestAppService.cs | 20 +---
.../AssembleRequestAutoMapperProfile.cs | 7 +-
...CoatingMaterialRequestAutoMapperProfile.cs | 9 +-
.../AssembleRequestAutoMapperProfile.cs | 98 -------------------
...CoatingMaterialRequestAutoMapperProfile.cs | 97 ------------------
6 files changed, 9 insertions(+), 224 deletions(-)
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/IAssembleRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/IAssembleRequestAppService.cs
index 34e3ec465..db3e91029 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/IAssembleRequestAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/IAssembleRequestAppService.cs
@@ -9,5 +9,5 @@ public interface IAssembleRequestAppService
: ISfsStoreRequestMasterAppServiceBase
{
-
+ Task CreateAndHandleAsync(AssembleRequestEditInput input);
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/ICoatingMaterialRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/ICoatingMaterialRequestAppService.cs
index c34757dc4..98d1ce710 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/ICoatingMaterialRequestAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/ICoatingMaterialRequestAppService.cs
@@ -10,22 +10,6 @@ public interface ICoatingMaterialRequestAppService
: ISfsStoreRequestMasterAppServiceBase
{
- Task CreateAndHandleAsync(CoatingMaterialRequestEditInput input);
-
-
- Task CreateAndHandleByAPIAsync(CoatingMaterialRequestEditInput input);
-
- ///
- /// 根据类型获取叫料请求
- ///
- ///
- /// 叫料请求类型
- ///
- ///
- ///
- Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput,
- string type, bool includeDetails = false, CancellationToken cancellationToken = default);
-
- Task> GetListByTypeAsync(string type);
-
+ Task CreateAndHandleAsync(CoatingMaterialRequestEditInput input);
+
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/AssembleRequests/AssembleRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/AssembleRequests/AssembleRequestAutoMapperProfile.cs
index 41423325d..ed88d670e 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/AssembleRequests/AssembleRequestAutoMapperProfile.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/AssembleRequests/AssembleRequestAutoMapperProfile.cs
@@ -18,9 +18,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile
CreateMap()
.IgnoreAuditedObjectProperties()
- .Ignore(x => x.ToLocationArea)
- .Ignore(x => x.ToLocationGroup)
- .Ignore(x => x.ToWarehouseCode)
.Ignore(x => x.MasterID)
.Ignore(x => x.TenantId)
.Ignore(x => x.Number)
@@ -28,7 +25,7 @@ public partial class StoreApplicationAutoMapperProfile : Profile
CreateMap()
.IgnoreAuditedObjectProperties()
- .ForMember(x => x.Type, y => y.MapFrom(t => t.Type.ToString()))
+ .ForMember(x => x.Type, y => y.MapFrom(t => t.Type.ToString()))
.Ignore(x => x.UseOnTheWayLocation)
.Ignore(x => x.Details)
.Ignore(x => x.Remark)
@@ -48,7 +45,7 @@ public partial class StoreApplicationAutoMapperProfile : Profile
.Ignore(x => x.ToLocationArea)
.Ignore(x => x.ToLocationGroup)
.Ignore(x => x.ItemName).Ignore(x => x.ItemDesc1).Ignore(x => x.ItemDesc2)
- .Ignore(x => x.ProdLine)
+ .Ignore(x => x.ProdLine)
.Ignore(x => x.IssuedQty)
.Ignore(x => x.ReceivedQty)
.Ignore(x => x.ToBeIssuedQty)
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestAutoMapperProfile.cs
index 9e6aa8499..4e519ec6e 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestAutoMapperProfile.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestAutoMapperProfile.cs
@@ -1,6 +1,8 @@
using AutoMapper;
using Volo.Abp.AutoMapper;
using Win_in.Sfs.Shared.Domain.Shared;
+using Win_in.Sfs.Wms.Store.Application.Contracts;
+using Win_in.Sfs.Wms.Store.Domain;
using Win_in.Sfs.Wms.Store.Requests.MaterialRequests;
namespace Win_in.Sfs.Wms.Store.Application;
@@ -17,9 +19,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile
CreateMap()
.IgnoreAuditedObjectProperties()
- .Ignore(x => x.ToLocationArea)
- .Ignore(x => x.ToLocationGroup)
- .Ignore(x => x.ToWarehouseCode)
.Ignore(x => x.MasterID)
.Ignore(x => x.TenantId)
.Ignore(x => x.Number)
@@ -27,7 +26,7 @@ public partial class StoreApplicationAutoMapperProfile : Profile
CreateMap()
.IgnoreAuditedObjectProperties()
- .ForMember(x => x.Type, y => y.MapFrom(t => t.Type.ToString()))
+ .ForMember(x => x.Type, y => y.MapFrom(t => t.Type.ToString()))
.Ignore(x => x.UseOnTheWayLocation)
.Ignore(x => x.Details)
.Ignore(x => x.Remark)
@@ -47,7 +46,7 @@ public partial class StoreApplicationAutoMapperProfile : Profile
.Ignore(x => x.ToLocationArea)
.Ignore(x => x.ToLocationGroup)
.Ignore(x => x.ItemName).Ignore(x => x.ItemDesc1).Ignore(x => x.ItemDesc2)
- .Ignore(x => x.ProdLine)
+ .Ignore(x => x.ProdLine)
.Ignore(x => x.IssuedQty)
.Ignore(x => x.ReceivedQty)
.Ignore(x => x.ToBeIssuedQty)
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/AssembleRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/AssembleRequestAutoMapperProfile.cs
index dcf76a76b..f380fda18 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/AssembleRequestAutoMapperProfile.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/AssembleRequestAutoMapperProfile.cs
@@ -15,7 +15,6 @@ public partial class StoreEventAutoMapperProfile : Profile
.ForMember(x => x.AssembleRequestNumber, y => y.MapFrom(d => d.Number))
.ForMember(x => x.RequestType, y => y.MapFrom(d => d.Type))
.Ignore(x => x.WarehouseCode)
- .Ignore(x => x.Workshop)
.Ignore(x => x.UpStreamJobNumber)
.Ignore(x => x.JobType)
.Ignore(x => x.IsAutoComplete)
@@ -34,102 +33,5 @@ public partial class StoreEventAutoMapperProfile : Profile
.Ignore(x => x.Details)
;
- CreateMap()
- .ForMember(x => x.RequestLocationCode, y => y.MapFrom(d => d.ToLocationCode))
- .Ignore(x => x.RecommendFromLocationArea)
- .Ignore(x => x.RecommendFromLocationGroup)
- .Ignore(x => x.HandledFromLocationArea)
- .Ignore(x => x.HandledFromLocationGroup)
- .Ignore(x => x.RecommendFromWarehouseCode)
- .Ignore(x => x.HandledFromWarehouseCode)
- .Ignore(x => x.OnTheWayLocationCode)
- .Ignore(x => x.DistributionType)
- .Ignore(x => x.RoundedQty)
- .Ignore(x => x.Operation)
- .Ignore(x => x.ExpiredTime)
- .Ignore(x => x.TruncType)
- .Ignore(x => x.PlanBeginTime)
- .Ignore(x => x.PlannedSplitRule)
- .Ignore(x => x.DeliveryQty)
- .Ignore(x => x.Status)
- .Ignore(x => x.RecommendContainerCode)
- .Ignore(x => x.StdPackQty)
- .Ignore(x => x.RecommendPackingCode)
- .Ignore(x => x.HandledContainerCode)
- .Ignore(x => x.HandledPackingCode)
- .Ignore(x => x.RecommendSupplierBatch)
- .Ignore(x => x.RecommendProduceDate)
- .Ignore(x => x.RecommendArriveDate)
- .Ignore(x => x.RecommendExpireDate)
- .Ignore(x => x.HandledFromLocationCode)
- .Ignore(x => x.HandledFromLocationErpCode)
- .Ignore(x => x.HandledUom)
- .Ignore(x => x.RecommendFromLocationErpCode)
- .Ignore(x => x.HandledExpireDate)
- .Ignore(x => x.HandledLot)
- .Ignore(x => x.HandledArriveDate)
- .Ignore(x => x.HandledProduceDate)
- .Ignore(x => x.HandledQty)
- .Ignore(x => x.RecommendQty)
- .Ignore(x => x.Uom)
- .Ignore(x => x.HandledSupplierBatch)
- .Ignore(x => x.RecommendFromLocationCode)
- .Ignore(x => x.RecommendLot)
- .IgnoreIHasRecommendAndHandledFrom();
-
- CreateMap()
- .ForMember(x => x.RecommendArriveDate, y => y.MapFrom(d => d.ArriveDate))
- .ForMember(x => x.RecommendContainerCode, y => y.MapFrom(d => d.ContainerCode))
- .ForMember(x => x.RecommendExpireDate, y => y.MapFrom(d => d.ExpireDate))
- .ForMember(x => x.RecommendFromLocationCode, y => y.MapFrom(d => d.LocationCode))
- .ForMember(x => x.RecommendFromLocationErpCode, y => y.MapFrom(d => d.LocationErpCode))
- .ForMember(x => x.RecommendFromWarehouseCode, y => y.MapFrom(d => d.WarehouseCode))
- .ForMember(x => x.RecommendFromLocationArea, y => y.MapFrom(d => d.LocationArea))
- .ForMember(x => x.RecommendFromLocationGroup, y => y.MapFrom(d => d.LocationGroup))
- .ForMember(x => x.RecommendLot, y => y.MapFrom(d => d.Lot))
- .ForMember(x => x.RecommendPackingCode, y => y.MapFrom(d => d.PackingCode))
- .ForMember(x => x.RecommendProduceDate, y => y.MapFrom(d => d.ProduceDate))
- .ForMember(x => x.RecommendQty, y => y.MapFrom(d => d.Qty))
- .ForMember(x => x.RecommendSupplierBatch, y => y.MapFrom(d => d.SupplierBatch))
- .ForMember(x => x.Uom, y => y.MapFrom(d => d.Uom)).Ignore(x => x.HandledArriveDate)
- .Ignore(x => x.HandledFromLocationArea)
- .Ignore(x => x.HandledFromLocationGroup)
- .Ignore(x => x.ToLocationErpCode)
- .Ignore(x => x.ToWarehouseCode)
- .Ignore(x => x.ToLocationArea)
- .Ignore(x => x.ToLocationGroup)
- .Ignore(x => x.HandledFromWarehouseCode)
- .Ignore(x => x.RequestLocationCode)
- .Ignore(x => x.ToLocationCode)
- .Ignore(x => x.ProdLine)
- .Ignore(x => x.WorkStation)
- .Ignore(x => x.HandledContainerCode)
- .Ignore(x => x.HandledExpireDate)
- .Ignore(x => x.HandledFromLocationCode)
- .Ignore(x => x.HandledFromLocationErpCode)
- .Ignore(x => x.HandledLot)
- .Ignore(x => x.HandledPackingCode)
- .Ignore(x => x.HandledProduceDate)
- .Ignore(x => x.HandledQty)
- .Ignore(x => x.HandledSupplierBatch)
- .Ignore(x => x.HandledUom)
- .Ignore(x => x.Remark)
- .Ignore(x => x.OnTheWayLocationCode)
- .Ignore(x => x.DistributionType)
- .Ignore(x => x.RoundedQty)
- .Ignore(x => x.Operation)
- .Ignore(x => x.ExpiredTime)
- .Ignore(x => x.TruncType)
- .Ignore(x => x.PlanBeginTime)
- .Ignore(x => x.PlannedSplitRule)
- .Ignore(x => x.DeliveryQty)
- .Ignore(x => x.RequestLocationCode)
- .Ignore(x => x.ToLocationCode)
- .Ignore(x => x.ProdLine)
- .Ignore(x => x.WorkStation)
- .Ignore(x => x.PositionCode)
- .Ignore(x => x.RecommendType)
- .IgnoreIHasRecommendAndHandledFrom();
-
}
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/CoatingMaterialRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/CoatingMaterialRequestAutoMapperProfile.cs
index bd08e04bb..ba680ff7c 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/CoatingMaterialRequestAutoMapperProfile.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/CoatingMaterialRequestAutoMapperProfile.cs
@@ -35,102 +35,5 @@ public partial class StoreEventAutoMapperProfile : Profile
.Ignore(x => x.Details)
;
- CreateMap()
- .ForMember(x => x.RequestLocationCode, y => y.MapFrom(d => d.ToLocationCode))
- .Ignore(x => x.RecommendFromLocationArea)
- .Ignore(x => x.RecommendFromLocationGroup)
- .Ignore(x => x.HandledFromLocationArea)
- .Ignore(x => x.HandledFromLocationGroup)
- .Ignore(x => x.RecommendFromWarehouseCode)
- .Ignore(x => x.HandledFromWarehouseCode)
- .Ignore(x => x.OnTheWayLocationCode)
- .Ignore(x => x.DistributionType)
- .Ignore(x => x.RoundedQty)
- .Ignore(x => x.Operation)
- .Ignore(x => x.ExpiredTime)
- .Ignore(x => x.TruncType)
- .Ignore(x => x.PlanBeginTime)
- .Ignore(x => x.PlannedSplitRule)
- .Ignore(x => x.DeliveryQty)
- .Ignore(x => x.Status)
- .Ignore(x => x.RecommendContainerCode)
- .Ignore(x => x.StdPackQty)
- .Ignore(x => x.RecommendPackingCode)
- .Ignore(x => x.HandledContainerCode)
- .Ignore(x => x.HandledPackingCode)
- .Ignore(x => x.RecommendSupplierBatch)
- .Ignore(x => x.RecommendProduceDate)
- .Ignore(x => x.RecommendArriveDate)
- .Ignore(x => x.RecommendExpireDate)
- .Ignore(x => x.HandledFromLocationCode)
- .Ignore(x => x.HandledFromLocationErpCode)
- .Ignore(x => x.HandledUom)
- .Ignore(x => x.RecommendFromLocationErpCode)
- .Ignore(x => x.HandledExpireDate)
- .Ignore(x => x.HandledLot)
- .Ignore(x => x.HandledArriveDate)
- .Ignore(x => x.HandledProduceDate)
- .Ignore(x => x.HandledQty)
- .Ignore(x => x.RecommendQty)
- .Ignore(x => x.Uom)
- .Ignore(x => x.HandledSupplierBatch)
- .Ignore(x => x.RecommendFromLocationCode)
- .Ignore(x => x.RecommendLot)
- .IgnoreIHasRecommendAndHandledFrom();
-
- CreateMap()
- .ForMember(x => x.RecommendArriveDate, y => y.MapFrom(d => d.ArriveDate))
- .ForMember(x => x.RecommendContainerCode, y => y.MapFrom(d => d.ContainerCode))
- .ForMember(x => x.RecommendExpireDate, y => y.MapFrom(d => d.ExpireDate))
- .ForMember(x => x.RecommendFromLocationCode, y => y.MapFrom(d => d.LocationCode))
- .ForMember(x => x.RecommendFromLocationErpCode, y => y.MapFrom(d => d.LocationErpCode))
- .ForMember(x => x.RecommendFromWarehouseCode, y => y.MapFrom(d => d.WarehouseCode))
- .ForMember(x => x.RecommendFromLocationArea, y => y.MapFrom(d => d.LocationArea))
- .ForMember(x => x.RecommendFromLocationGroup, y => y.MapFrom(d => d.LocationGroup))
- .ForMember(x => x.RecommendLot, y => y.MapFrom(d => d.Lot))
- .ForMember(x => x.RecommendPackingCode, y => y.MapFrom(d => d.PackingCode))
- .ForMember(x => x.RecommendProduceDate, y => y.MapFrom(d => d.ProduceDate))
- .ForMember(x => x.RecommendQty, y => y.MapFrom(d => d.Qty))
- .ForMember(x => x.RecommendSupplierBatch, y => y.MapFrom(d => d.SupplierBatch))
- .ForMember(x => x.Uom, y => y.MapFrom(d => d.Uom)).Ignore(x => x.HandledArriveDate)
- .Ignore(x => x.HandledFromLocationArea)
- .Ignore(x => x.HandledFromLocationGroup)
- .Ignore(x => x.ToLocationErpCode)
- .Ignore(x => x.ToWarehouseCode)
- .Ignore(x => x.ToLocationArea)
- .Ignore(x => x.ToLocationGroup)
- .Ignore(x => x.HandledFromWarehouseCode)
- .Ignore(x => x.RequestLocationCode)
- .Ignore(x => x.ToLocationCode)
- .Ignore(x => x.ProdLine)
- .Ignore(x => x.WorkStation)
- .Ignore(x => x.HandledContainerCode)
- .Ignore(x => x.HandledExpireDate)
- .Ignore(x => x.HandledFromLocationCode)
- .Ignore(x => x.HandledFromLocationErpCode)
- .Ignore(x => x.HandledLot)
- .Ignore(x => x.HandledPackingCode)
- .Ignore(x => x.HandledProduceDate)
- .Ignore(x => x.HandledQty)
- .Ignore(x => x.HandledSupplierBatch)
- .Ignore(x => x.HandledUom)
- .Ignore(x => x.Remark)
- .Ignore(x => x.OnTheWayLocationCode)
- .Ignore(x => x.DistributionType)
- .Ignore(x => x.RoundedQty)
- .Ignore(x => x.Operation)
- .Ignore(x => x.ExpiredTime)
- .Ignore(x => x.TruncType)
- .Ignore(x => x.PlanBeginTime)
- .Ignore(x => x.PlannedSplitRule)
- .Ignore(x => x.DeliveryQty)
- .Ignore(x => x.RequestLocationCode)
- .Ignore(x => x.ToLocationCode)
- .Ignore(x => x.ProdLine)
- .Ignore(x => x.WorkStation)
- .Ignore(x => x.PositionCode)
- .Ignore(x => x.RecommendType)
- .IgnoreIHasRecommendAndHandledFrom();
-
}
}
From 6c5dcc0cbf13dfa3b4eefecc6eb1d5465d17b32a Mon Sep 17 00:00:00 2001
From: zhouhongjun <565221961@qq.com>
Date: Tue, 16 Apr 2024 12:44:24 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../AssembleJobs/Inputs/AssembleJobEditInput.cs | 15 +--------------
.../CoatingIssueJobs/CoatingIssueJobEditInput.cs | 15 +--------------
.../Requests/AssembleRequestEventHandler.cs | 2 +-
.../CoatingMaterialRequestEventHandler.cs | 2 +-
4 files changed, 4 insertions(+), 30 deletions(-)
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/Inputs/AssembleJobEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/Inputs/AssembleJobEditInput.cs
index 8e719283c..e5c187236 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/Inputs/AssembleJobEditInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/Inputs/AssembleJobEditInput.cs
@@ -58,20 +58,7 @@ public class AssembleJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCreateIn
[Display(Name = "任务明细")]
[Required(ErrorMessage = "{0}是必填项")]
public List Details { get; set; } = new();
-
- ///
- /// 车间
- ///
- [Display(Name = "车间")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string Workshop { get; set; }
-
- ///
- /// 生产线
- ///
- [Display(Name = "生产线")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string ProdLine { get; set; }
+
///
/// 使用在途库
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobEditInput.cs
index d1975b46e..45f024128 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobEditInput.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobEditInput.cs
@@ -59,20 +59,7 @@ public class CoatingIssueJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCrea
[Display(Name = "任务明细")]
[Required(ErrorMessage = "{0}是必填项")]
public List Details { get; set; } = new();
-
- ///
- /// 车间
- ///
- [Display(Name = "车间")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string Workshop { get; set; }
-
- ///
- /// 生产线
- ///
- [Display(Name = "生产线")]
- [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
- public string ProdLine { get; set; }
+
///
/// 使用在途库
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/AssembleRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/AssembleRequestEventHandler.cs
index 102ac62a2..85bc4ca67 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/AssembleRequestEventHandler.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/AssembleRequestEventHandler.cs
@@ -190,7 +190,7 @@ public class AssembleRequestEventHandler
job.JobStatus = EnumJobStatus.Open;
job.WorkGroupCode = fromLocation.WorkGroupCode;
job.WarehouseCode = fromLocation.WarehouseCode;
- job.ProdLine = fromLocation.LocationGroupCode;
+
job.Worker = assembleRequest.Worker;
if (string.IsNullOrEmpty(job.Worker))
{
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CoatingMaterialRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CoatingMaterialRequestEventHandler.cs
index d11d7ac96..b5fb25d5e 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CoatingMaterialRequestEventHandler.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CoatingMaterialRequestEventHandler.cs
@@ -194,7 +194,7 @@ public class CoatingMaterialRequestEventHandler
job.JobStatus = EnumJobStatus.Open;
job.WorkGroupCode = fromLocation.WorkGroupCode;
job.WarehouseCode = fromLocation.WarehouseCode;
- job.ProdLine = fromLocation.LocationGroupCode;
+
job.Worker = CoatingMaterialRequest.Worker;
job.MaterialRequestNumber = CoatingMaterialRequest.Number;
return job;