Browse Source

Merge branch 'dev_DY_CC' of http://dev.ccwin-in.com:3000/BoXu.Zheng/WZC2 into dev_DY_CC

dev_DY_CC
郑勃旭 1 year ago
parent
commit
db2659c0f4
  1. 60
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingRequestReader.cs
  2. 17
      be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/Properties/PublishProfiles/FolderProfile2.pubxml
  3. 13
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/Inputs/AssembleJobEditInput.cs
  4. 13
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobEditInput.cs
  5. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/IAssembleRequestAppService.cs
  6. 16
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/ICoatingMaterialRequestAppService.cs
  7. 3
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/AssembleRequests/AssembleRequestAutoMapperProfile.cs
  8. 5
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestAutoMapperProfile.cs
  9. 98
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/AssembleRequestAutoMapperProfile.cs
  10. 97
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/CoatingMaterialRequestAutoMapperProfile.cs
  11. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/AssembleRequestEventHandler.cs
  12. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CoatingMaterialRequestEventHandler.cs

60
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingRequestReader.cs

@ -59,10 +59,12 @@ public class InjectionMoldingRequestReader : IReader
/// 读取注塑叫料任务 /// 读取注塑叫料任务
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public virtual async Task<List<IncomingFromExternal>> ReadAsync() public virtual async Task<List<IncomingFromExternal>> ReadAsync()
{ {
try try
{ {
// 创建 SfsStoreRequestInputBase 对象以设定作业条件
var jobCondition = new SfsStoreRequestInputBase(); var jobCondition = new SfsStoreRequestInputBase();
Filter filter = new Filter() Filter filter = new Filter()
{ {
@ -71,6 +73,7 @@ public class InjectionMoldingRequestReader : IReader
Logic = EnumFilterLogic.And.ToString(), Logic = EnumFilterLogic.And.ToString(),
Value = (EnumRequestStatus.Completed).ToString() Value = (EnumRequestStatus.Completed).ToString()
}; };
// 添加筛选条件:请求状态不等于已完成
jobCondition.Condition.Filters.Add(filter); jobCondition.Condition.Filters.Add(filter);
filter = new Filter() filter = new Filter()
{ {
@ -79,26 +82,32 @@ public class InjectionMoldingRequestReader : IReader
Logic = EnumFilterLogic.And.ToString(), Logic = EnumFilterLogic.And.ToString(),
Value = "Vision" Value = "Vision"
}; };
// 添加筛选条件:类型为 Vision
jobCondition.Condition.Filters.Add(filter); jobCondition.Condition.Filters.Add(filter);
// 通过筛选条件获取作业列表
var jobs = await _injectionRequest.GetAllListByFilterAsync(jobCondition).ConfigureAwait(false); var jobs = await _injectionRequest.GetAllListByFilterAsync(jobCondition).ConfigureAwait(false);
List<InjectionRequestEditInput> joblist = new List<InjectionRequestEditInput>(); List<InjectionRequestEditInput> joblist = new List<InjectionRequestEditInput>();
if (jobs.Count == 0) if (jobs.Count == 0)
{ {
string camera =await ReaderCameraApi().ConfigureAwait(false); // 调用 ReaderCameraApi 方法获取摄像头信息
string camera = await ReaderCameraApi().ConfigureAwait(false);
List<InjectionRequest> cameraList = new List<InjectionRequest>(); List<InjectionRequest> cameraList = new List<InjectionRequest>();
if (camera == "Error occured") if (camera == "Error occured")
{ {
// 记录错误日志并返回空列表
_logger.LogError($"没有读取到摄像头信息{DateTime.Now},请检查网络"); _logger.LogError($"没有读取到摄像头信息{DateTime.Now},请检查网络");
return new List<IncomingFromExternal>(); return new List<IncomingFromExternal>();
} }
cameraList = System.Text.Json.JsonSerializer.Deserialize<List<InjectionRequest>>(camera);//camera转注塑叫料明细任务数据 // 将摄像头信息转换为注塑叫料明细任务数据
cameraList = System.Text.Json.JsonSerializer.Deserialize<List<InjectionRequest>>(camera);
InjectionRequestEditInput input=new InjectionRequestEditInput(); InjectionRequestEditInput input = new InjectionRequestEditInput();
List<InjectionRequestDetailInput> injectionRequestDetails = new List<InjectionRequestDetailInput>(); List<InjectionRequestDetailInput> injectionRequestDetails = new List<InjectionRequestDetailInput>();
foreach (var job in cameraList) { foreach (var job in cameraList)
{
var detailInput = new InjectionRequestDetailInput() var detailInput = new InjectionRequestDetailInput()
{ {
@ -106,21 +115,27 @@ public class InjectionMoldingRequestReader : IReader
ToLocationCode = job.ToLocCode, ToLocationCode = job.ToLocCode,
Qty = job.Qty, Qty = job.Qty,
}; };
// 添加注塑叫料明细任务数据
injectionRequestDetails.Add(detailInput); injectionRequestDetails.Add(detailInput);
} }
input.Details.AddRange(injectionRequestDetails); 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) if (errors.Count > 0)
{ {
foreach (var error in errors) { // 记录错误日志并返回空列表
foreach (var error in errors)
{
_logger.LogError(error); _logger.LogError(error);
} }
return new List<IncomingFromExternal>(); return new List<IncomingFromExternal>();
} }
// 创建新的注塑请求并将数据写入数据库
await _injectionRequest.CreateAsync(input).ConfigureAwait(false); await _injectionRequest.CreateAsync(input).ConfigureAwait(false);
} }
} }
// 捕获特定异常并记录日志
catch (AbpException ex) catch (AbpException ex)
{ {
_logger.LogError(ex.Message); _logger.LogError(ex.Message);
@ -133,32 +148,45 @@ public class InjectionMoldingRequestReader : IReader
{ {
_logger.LogError(ex.Message); _logger.LogError(ex.Message);
} }
// 返回空列表
return new List<IncomingFromExternal>(); return new List<IncomingFromExternal>();
} }
/// <summary>
/// 绑定零件库位信息,如果对错误返回错误新列表
/// </summary>
/// <param name="p_list"></param>
/// <returns></returns>
private async Task<List<string>> BindAsync(List<InjectionRequestDetailInput> p_list) private async Task<List<string>> BindAsync(List<InjectionRequestDetailInput> p_list)
{ {
// 异步方法,将输入的请求绑定到对应的零件和库位信息,返回错误列表
List<string> errors = new List<string>(); List<string> errors = new List<string>();
foreach (var request in p_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 else
{ {
// 更新请求中的零件描述和名称
request.ItemDesc1 = itm.Desc1; request.ItemDesc1 = itm.Desc1;
request.ItemDesc2 = itm.Desc2; request.ItemDesc2 = itm.Desc2;
request.ItemName = itm.Name; request.ItemName = itm.Name;
} }
// 获取对应库位信息
var loc = await _locService.GetByCodeAsync(request.ToLocationCode).ConfigureAwait(false); var loc = await _locService.GetByCodeAsync(request.ToLocationCode).ConfigureAwait(false);
if (loc == null) { errors.Add($"编号:{request.ToLocationCode}库位表中没找到!"); } if (loc == null) { errors.Add($"编号:{request.ToLocationCode}库位表中没找到!"); }
else else
{ {
// 更新请求中的库位相关信息
request.ToLocationCode = loc.Code; request.ToLocationCode = loc.Code;
request.ToLocationGroup = loc.LocationGroupCode; request.ToLocationGroup = loc.LocationGroupCode;
request.ToLocationErpCode = loc.ErpLocationCode; request.ToLocationErpCode = loc.ErpLocationCode;
request.ToWarehouseCode= loc.WarehouseCode; request.ToWarehouseCode = loc.WarehouseCode;
} }
} }
// 返回错误列表
return errors; return errors;
} }
@ -169,15 +197,23 @@ public class InjectionMoldingRequestReader : IReader
/// <returns></returns> /// <returns></returns>
public async Task<string> ReaderCameraApi() public async Task<string> ReaderCameraApi()
{ {
// 从配置中获取远程摄像头的地址、用户名、密码和令牌
var address = _options.Value.AutoRemote.IpAddress; var address = _options.Value.AutoRemote.IpAddress;
var username = _options.Value.AutoRemote.UserName; var username = _options.Value.AutoRemote.UserName;
var password = _options.Value.AutoRemote.Password; var password = _options.Value.AutoRemote.Password;
var token = _options.Value.AutoRemote.Token; var token = _options.Value.AutoRemote.Token;
// 创建一个HttpClient实例
var client = _httpClientFactory.CreateClient(); var client = _httpClientFactory.CreateClient();
// 将用户名和密码转换为Base64编码的凭据,并设置请求的身份验证信息
var credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{username}:{password}")); var credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{username}:{password}"));
client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", credentials); client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", credentials);
// 发送GET请求到远程摄像头地址并等待响应
var response = await client.GetAsync(address).ConfigureAwait(false); var response = await client.GetAsync(address).ConfigureAwait(false);
// 如果请求成功,则返回响应内容,否则返回错误信息
if (response.IsSuccessStatusCode) if (response.IsSuccessStatusCode)
{ {
return await response.Content.ReadAsStringAsync().ConfigureAwait(false); return await response.Content.ReadAsStringAsync().ConfigureAwait(false);
@ -185,13 +221,11 @@ public class InjectionMoldingRequestReader : IReader
return "Error occurred"; return "Error occurred";
} }
private List<InjectionRequest> Parse(string p_str) private List<InjectionRequest> Parse(string p_str)
{ {
List<InjectionRequest> requests = new List<InjectionRequest>(); List<InjectionRequest> requests = new List<InjectionRequest>();
return System.Text.Json.JsonSerializer.Deserialize<List<InjectionRequest>>(p_str); return System.Text.Json.JsonSerializer.Deserialize<List<InjectionRequest>>(p_str);
} }

17
be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/Properties/PublishProfiles/FolderProfile2.pubxml

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<DeleteExistingFiles>false</DeleteExistingFiles>
<ExcludeApp_Data>false</ExcludeApp_Data>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>C:\wms</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<_TargetId>Folder</_TargetId>
</PropertyGroup>
</Project>

13
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/Inputs/AssembleJobEditInput.cs

@ -59,19 +59,6 @@ public class AssembleJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCreateIn
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]
public List<AssembleJobDetailInput> Details { get; set; } = new(); public List<AssembleJobDetailInput> Details { get; set; } = new();
/// <summary>
/// 车间
/// </summary>
[Display(Name = "车间")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Workshop { get; set; }
/// <summary>
/// 生产线
/// </summary>
[Display(Name = "生产线")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string ProdLine { get; set; }
/// <summary> /// <summary>
/// 使用在途库 /// 使用在途库

13
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobEditInput.cs

@ -60,19 +60,6 @@ public class CoatingIssueJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCrea
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]
public List<CoatingIssueJobDetailInput> Details { get; set; } = new(); public List<CoatingIssueJobDetailInput> Details { get; set; } = new();
/// <summary>
/// 车间
/// </summary>
[Display(Name = "车间")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Workshop { get; set; }
/// <summary>
/// 生产线
/// </summary>
[Display(Name = "生产线")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string ProdLine { get; set; }
/// <summary> /// <summary>
/// 使用在途库 /// 使用在途库

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/IAssembleRequestAppService.cs

@ -9,5 +9,5 @@ public interface IAssembleRequestAppService
: ISfsStoreRequestMasterAppServiceBase<AssembleRequestDTO, SfsStoreRequestInputBase, AssembleRequestEditInput, AssembleRequestDetailDTO, SfsStoreRequestInputBase> : ISfsStoreRequestMasterAppServiceBase<AssembleRequestDTO, SfsStoreRequestInputBase, AssembleRequestEditInput, AssembleRequestDetailDTO, SfsStoreRequestInputBase>
{ {
Task<AssembleRequestDTO> CreateAndHandleAsync(AssembleRequestEditInput input);
} }

16
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/ICoatingMaterialRequestAppService.cs

@ -12,20 +12,4 @@ public interface ICoatingMaterialRequestAppService
{ {
Task<CoatingMaterialRequestDTO> CreateAndHandleAsync(CoatingMaterialRequestEditInput input); Task<CoatingMaterialRequestDTO> CreateAndHandleAsync(CoatingMaterialRequestEditInput input);
Task<CoatingMaterialRequestDTO> CreateAndHandleByAPIAsync(CoatingMaterialRequestEditInput input);
/// <summary>
/// 根据类型获取叫料请求
/// </summary>
/// <param name="requestInput"></param>
/// <param name="type">叫料请求类型</param>
/// <param name="includeDetails"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Task<PagedResultDto<CoatingMaterialRequestDTO>> GetListByTypeAsync(SfsStoreRequestInputBase requestInput,
string type, bool includeDetails = false, CancellationToken cancellationToken = default);
Task<List<CoatingMaterialRequestDTO>> GetListByTypeAsync(string type);
} }

3
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<AssembleRequestDetailInput, AssembleRequestDetail>() CreateMap<AssembleRequestDetailInput, AssembleRequestDetail>()
.IgnoreAuditedObjectProperties() .IgnoreAuditedObjectProperties()
.Ignore(x => x.ToLocationArea)
.Ignore(x => x.ToLocationGroup)
.Ignore(x => x.ToWarehouseCode)
.Ignore(x => x.MasterID) .Ignore(x => x.MasterID)
.Ignore(x => x.TenantId) .Ignore(x => x.TenantId)
.Ignore(x => x.Number) .Ignore(x => x.Number)

5
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestAutoMapperProfile.cs

@ -1,6 +1,8 @@
using AutoMapper; using AutoMapper;
using Volo.Abp.AutoMapper; using Volo.Abp.AutoMapper;
using Win_in.Sfs.Shared.Domain.Shared; 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; using Win_in.Sfs.Wms.Store.Requests.MaterialRequests;
namespace Win_in.Sfs.Wms.Store.Application; namespace Win_in.Sfs.Wms.Store.Application;
@ -17,9 +19,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile
CreateMap<CoatingMaterialRequestDetailInput, CoatingMaterialRequestDetail>() CreateMap<CoatingMaterialRequestDetailInput, CoatingMaterialRequestDetail>()
.IgnoreAuditedObjectProperties() .IgnoreAuditedObjectProperties()
.Ignore(x => x.ToLocationArea)
.Ignore(x => x.ToLocationGroup)
.Ignore(x => x.ToWarehouseCode)
.Ignore(x => x.MasterID) .Ignore(x => x.MasterID)
.Ignore(x => x.TenantId) .Ignore(x => x.TenantId)
.Ignore(x => x.Number) .Ignore(x => x.Number)

98
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.AssembleRequestNumber, y => y.MapFrom(d => d.Number))
.ForMember(x => x.RequestType, y => y.MapFrom(d => d.Type)) .ForMember(x => x.RequestType, y => y.MapFrom(d => d.Type))
.Ignore(x => x.WarehouseCode) .Ignore(x => x.WarehouseCode)
.Ignore(x => x.Workshop)
.Ignore(x => x.UpStreamJobNumber) .Ignore(x => x.UpStreamJobNumber)
.Ignore(x => x.JobType) .Ignore(x => x.JobType)
.Ignore(x => x.IsAutoComplete) .Ignore(x => x.IsAutoComplete)
@ -34,102 +33,5 @@ public partial class StoreEventAutoMapperProfile : Profile
.Ignore(x => x.Details) .Ignore(x => x.Details)
; ;
CreateMap<AssembleRequestDetail, AssembleJobDetailInput>()
.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<BalanceDTO, AssembleJobDetailInput>()
.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();
} }
} }

97
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) .Ignore(x => x.Details)
; ;
CreateMap<CoatingMaterialRequestDetail, CoatingIssueJobDetailInput>()
.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<BalanceDTO, CoatingIssueJobDetailInput>()
.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();
} }
} }

2
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.JobStatus = EnumJobStatus.Open;
job.WorkGroupCode = fromLocation.WorkGroupCode; job.WorkGroupCode = fromLocation.WorkGroupCode;
job.WarehouseCode = fromLocation.WarehouseCode; job.WarehouseCode = fromLocation.WarehouseCode;
job.ProdLine = fromLocation.LocationGroupCode;
job.Worker = assembleRequest.Worker; job.Worker = assembleRequest.Worker;
if (string.IsNullOrEmpty(job.Worker)) if (string.IsNullOrEmpty(job.Worker))
{ {

2
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.JobStatus = EnumJobStatus.Open;
job.WorkGroupCode = fromLocation.WorkGroupCode; job.WorkGroupCode = fromLocation.WorkGroupCode;
job.WarehouseCode = fromLocation.WarehouseCode; job.WarehouseCode = fromLocation.WarehouseCode;
job.ProdLine = fromLocation.LocationGroupCode;
job.Worker = CoatingMaterialRequest.Worker; job.Worker = CoatingMaterialRequest.Worker;
job.MaterialRequestNumber = CoatingMaterialRequest.Number; job.MaterialRequestNumber = CoatingMaterialRequest.Number;
return job; return job;

Loading…
Cancel
Save