Browse Source

修改 三方库

dev_DY_CC
郑勃旭 10 months ago
parent
commit
fe7771b6ab
  1. 2
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs
  2. 2
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ReturnConverter.cs
  3. 1
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/FawtygAutoMapperProfile.cs
  4. 4
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryReader.cs
  5. 10
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/TyrpIncomingBackgroundWorker.cs
  6. 2
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/CustomerReturnNoteConverter.cs
  7. 17
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs
  8. 4
      be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/appsettings.json
  9. 9
      be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestExchangeDto.cs
  10. 10
      be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/Win_in.Sfs.Wms.DataExchange.Application.Contracts.xml
  11. 4
      be/Hosts/Core.Host/Win_in.Sfs.Core.Host/Properties/PublishProfiles/FolderProfile.pubxml
  12. 45
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionPlanRequestController.cs
  13. 2
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/IssueRequest/InjectionRequestController.cs
  14. 15
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReceiptRequestController.cs
  15. 2
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnNoteController.cs
  16. 5
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnRequestController.cs
  17. 13
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAppService.cs
  18. 12
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCodes/PositionCodeAppService.cs
  19. 62
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRecManager.cs
  20. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/PositionCodes/PositionCodeDbContextModelCreatingExtensions.cs
  21. 2
      be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Transactions/Transaction.cs
  22. 2
      be/Modules/Shared/src/Win_in.Sfs.Shared.Application/ExportAndImport/ClosedXmlExportImportService.cs
  23. 4
      be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransType.cs
  24. 4
      be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Job/EnumJobStatus.cs
  25. 6
      be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueRequestType.cs
  26. 5
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/DeliverJobs/DTOs/DeliverJobDTO.cs
  27. 5
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/DeliverJobs/Inputs/DeliverJobEditInput.cs
  28. 5
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDTO.cs
  29. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteEditInput.cs
  30. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/InventoryInitialNotes/Inputs/InventoryInitialNoteImportInput.cs
  31. 4
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/DTOs/DeliverRequestDTO.cs
  32. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestEditInput.cs
  33. 5
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestImportInput.cs
  34. 1
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/InjectionPlanRequests/IInjectionPlanRequestAppService.cs
  35. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/IKittingIssueRequestAppService.cs
  36. 3
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/SparePartIssueRequests/Inputs/SparePartIssueRequestImportInput.cs
  37. 17
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/PurchaseReceiptRequests/IPurchaseReceiptRequestAppService.cs
  38. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ScrapRequests/Inputs/ScrapRequestImportInput.cs
  39. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/ITransferLibRequestAppService.cs
  40. 4
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferRequests/Inputs/TransferRequestImportInput.cs
  41. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InjectionPlanJobs/InjectionPlanJobAppService.cs
  42. 3
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InspectJobs/InspectJobAppService.cs
  43. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs
  44. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs
  45. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs
  46. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/IssueJobAppService.cs
  47. 10
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs
  48. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/SparePartIssueJobs/SparePartIssueJobAppService.cs
  49. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/PurchaseReceiptJobs/PurchaseReceiptJobAppService.cs
  50. 4
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/InventoryInitialNotes/InventoryInitialNoteAppService.cs
  51. 9
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReceiptNotes/PurchaseReceiptNoteAppService.cs
  52. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs
  53. 85
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/InjectionPlanRequests/InjectionPlanRequestAppService.cs
  54. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/InjectionPlanRequests/InjectionPlanRequestAutoMapperProfile.cs
  55. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/AssembleIssueRequests/AssembleIssueRequestAppService.cs
  56. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/CoatingIssueRequests/CoatingIssueRequestAppService.cs
  57. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAppService.cs
  58. 10
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/KittingIssueRequests/KittingIssueRequestAppService.cs
  59. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/SparePartIssueRequests/SparePartIssueRequestAppService.cs
  60. 43
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestAppService.cs
  61. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestAppService.cs
  62. 5
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/ExchangeDatas/EnumExchangeDataType.cs
  63. 4
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/DeliverJobs/DeliverJob.cs
  64. 5
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNote.cs
  65. 5
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequest.cs
  66. 1
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/DeliverJobs/DeliverJobDbContextModelCreatingExtensions.cs
  67. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/DeliverNotes/DeliverNoteDbContextModelCreatingExtensions.cs
  68. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/DeliverRequests/DeliverRequestDbContextModelCreatingExtensions.cs
  69. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/CustomerProductionReturnNoteAutoMapperProfile.cs
  70. 3
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ThirdLocationRequestAutoMapperProfile.cs
  71. 40
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/CustomerProductionReturnNoteEventHandler.cs
  72. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/AssembleIssueNoteEventHandler.cs
  73. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/CoatingIssueNoteEventHandler.cs
  74. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/InjectionIssueNoteEventHandler.cs
  75. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/SparePartIssueNoteEventHandler.cs
  76. 13
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/PurchaseReturnNoteEventHandler.cs
  77. 23
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/PutawayNoteEventHandler.cs
  78. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InjectionPlanJobEventHandler.cs
  79. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/AssembleIssueJobEventHandler.cs
  80. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/CoatingIssueJobEventHandler.cs
  81. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/InjectionIssueJobEventHandler.cs
  82. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/KittingIssueJobEventHandler.cs
  83. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/SparePartIssueJobEventHandler.cs

2
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs

@ -114,7 +114,7 @@ public class ArriveConverter : IOutgoingConverter
PlanBillNo = detail.PoNumber, PlanBillNo = detail.PoNumber,
ShipBillNo = detail.AsnNumber, ShipBillNo = detail.AsnNumber,
DocNo = exchangeReceipt.Number, DocNo = exchangeReceipt.Number,
DetailMatNo = detail.ToPackingCode, DetailMatNo =string.IsNullOrEmpty(detail.Remark) ? detail.ToPackingCode: detail.Remark,
ERP = detail.ItemCode, ERP = detail.ItemCode,
Qty = detail.Qty, Qty = detail.Qty,
HgQty = detail.Qty, HgQty = detail.Qty,

2
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ReturnConverter.cs

@ -80,7 +80,7 @@ public class ReturnConverter : IOutgoingConverter
PlanBillNo = exchangeReturn.PoNumber, PlanBillNo = exchangeReturn.PoNumber,
ShipBillNo = exchangeReturn.AsnNumber, ShipBillNo = exchangeReturn.AsnNumber,
DocNo = exchangeReturn.Number, DocNo = exchangeReturn.Number,
DetailMatNo = detail.PackingCode, DetailMatNo = string.IsNullOrEmpty(detail.Remark)? detail.PackingCode: detail.Remark,
ERP = detail.ItemCode, ERP = detail.ItemCode,
RtQty = detail.Qty, RtQty = detail.Qty,
RtSon = detail.Reason, RtSon = detail.Reason,

1
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/FawtygAutoMapperProfile.cs

@ -250,7 +250,6 @@ public class FawtygAutoMapperProfile : Profile
.Ignore(x => x.StdPackQty); .Ignore(x => x.StdPackQty);
CreateMap<DeliverRequestExchangeDto, DeliverRequestEditInput>() CreateMap<DeliverRequestExchangeDto, DeliverRequestEditInput>()
.Ignore(x => x.DeliverPlanNumber)
.Ignore(x => x.ExtraProperties) .Ignore(x => x.ExtraProperties)
.Ignore(x => x.Details) .Ignore(x => x.Details)
.Ignore(x => x.CustomerAddressCode) .Ignore(x => x.CustomerAddressCode)

4
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/DeliveryReader.cs

@ -98,11 +98,13 @@ public class DeliveryReader : IReader
var mesRequest = new DeliverRequestExchangeDto() var mesRequest = new DeliverRequestExchangeDto()
{ {
DeliverRequestType = Delivery.mesout_delivery_type == "0" ? EnumDeliverRequestType.FIS : EnumDeliverRequestType.Normal, DeliverRequestType = Delivery.mesout_delivery_type == "0" ? EnumDeliverRequestType.FIS : EnumDeliverRequestType.Normal,
DeliverPlanNumber= Delivery.mesout_delivery_type == "0" ? Delivery.mesout_delivery_no : Delivery.mesout_delivery_plan,
CustomerCode = Delivery.mesout_delivery_customer, CustomerCode = Delivery.mesout_delivery_customer,
Number = Delivery.mesout_delivery_no, Number = Delivery.mesout_delivery_no,
Worker = "MESFY", Worker = "MESFY",
ActiveDate = DateTime.TryParse(Delivery.mesout_delivery_wt, out DateTime dateTime) ? dateTime : DateTime.Now, ActiveDate = DateTime.TryParse(Delivery.mesout_delivery_wt, out DateTime dateTime) ? dateTime : DateTime.Now,
DeliverTime = DateTime.TryParse(Delivery.mesout_delivery_wt, out DateTime dateTime1) ? dateTime1 : DateTime.Now DeliverTime = DateTime.TryParse(Delivery.mesout_delivery_wt, out DateTime dateTime1) ? dateTime1 : DateTime.Now,
MesTruckNumber=Delivery.mesout_delivery_carno,
}; };
var mesRequestDetail = new DeliverRequestDetailExchangeDto() var mesRequestDetail = new DeliverRequestDetailExchangeDto()
{ {

10
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/TyrpIncomingBackgroundWorker.cs

@ -119,6 +119,16 @@ public class TyrpIncomingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
//转换Dictpj //转换Dictpj
await dictConverter.ConvertAsync(dictpjOutsFromExternalList).ConfigureAwait(false); await dictConverter.ConvertAsync(dictpjOutsFromExternalList).ConfigureAwait(false);
Logger.LogInformation($"Read ErpLocation");//ERP库位
var ErpLocationReader = workerContext.ServiceProvider.GetRequiredService<ErpLocationReader>();
var ErpLocationConverter = workerContext.ServiceProvider.GetRequiredService<ErpLocationConverter>();
//读取并保存ErpLocationItem
var erpLocationFromExternalList = await ErpLocationReader.ReadAsync().ConfigureAwait(false);
//转换ErpLocationItem
await ErpLocationConverter.ConvertAsync(erpLocationFromExternalList).ConfigureAwait(false);
Logger.LogInformation($"Read Customer");//客户资料 Logger.LogInformation($"Read Customer");//客户资料
var CustomerReader = workerContext.ServiceProvider.GetRequiredService<CustomerReader>(); var CustomerReader = workerContext.ServiceProvider.GetRequiredService<CustomerReader>();
var CustomerConverter = workerContext.ServiceProvider.GetRequiredService<CustomerConverter>(); var CustomerConverter = workerContext.ServiceProvider.GetRequiredService<CustomerConverter>();

2
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/CustomerReturnNoteConverter.cs

@ -41,7 +41,7 @@ public class CustomerReturnNoteConverter : IOutgoingConverter
{ {
var outgoingToExternalList = new List<OutgoingToExternal>(); var outgoingToExternalList = new List<OutgoingToExternal>();
//获取要同步得数据 //获取要同步得数据
var outgoingFromWmsList = await _outgoingFromWmsManager.GetToBeProcessedListAsync(EnumOutgoingDataType.UnplannedReceipt, EnumSystemType.ERP).ConfigureAwait(false); var outgoingFromWmsList = await _outgoingFromWmsManager.GetToBeProcessedListAsync(EnumOutgoingDataType.CustomerReturn, EnumSystemType.ERP).ConfigureAwait(false);
foreach (var outgoingFromWms in outgoingFromWmsList) foreach (var outgoingFromWms in outgoingFromWmsList)
{ {
#region 主表 #region 主表

17
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs

@ -156,12 +156,19 @@ public class TyrpOutgoingBackgroundWorker : AsyncPeriodicBackgroundWorkerBase
} }
#endregion #endregion
#region --接口以关闭-- 退货单 UnplannedReceipt wmsoutm #region --接口以关闭-- 退货单 CustomerReturn wmsoutm
//暂无此接口 //暂无此接口
//Logger.LogInformation($"Write CustomerReturnNote");//退货单 Logger.LogInformation($"Write CustomerReturnNote");//退货单
//var customerReturnNoteConvert = workerContext.ServiceProvider.GetRequiredService<CustomerReturnNoteConverter>(); var customerReturnNoteConvert = workerContext.ServiceProvider.GetRequiredService<CustomerReturnNoteConverter>();
//var customerReturnNoteList = await customerReturnNoteConvert.ConvertAsync().ConfigureAwait(false); var customerReturnNoteList = await customerReturnNoteConvert.ConvertAsync().ConfigureAwait(false);
//await wmsoutmWriter.WriteAsync(customerReturnNoteList).ConfigureAwait(false); await wmsoutmWriter.WriteAsync(customerReturnNoteList).ConfigureAwait(false);
#endregion
#region 客户退货单 CustomerReturn wmsoutm
Logger.LogInformation($"Write CustomerReturnNote");//退货单
var customerReturnNoteConvert = workerContext.ServiceProvider.GetRequiredService<CustomerReturnNoteConverter>();
var customerReturnNoteList = await customerReturnNoteConvert.ConvertAsync().ConfigureAwait(false);
await wmsoutmWriter.WriteAsync(customerReturnNoteList).ConfigureAwait(false);
#endregion #endregion
#region 非生产领料单 UnplannedIssue wmsoutm #region 非生产领料单 UnplannedIssue wmsoutm

4
be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/appsettings.json

@ -26,10 +26,10 @@
"RemoteServices": { "RemoteServices": {
"BaseData": { "BaseData": {
"BaseUrl": "http://localhost:59094/" "BaseUrl": "http://dev.ccwin-in.com:60084/"
}, },
"Store": { "Store": {
"BaseUrl": "http://localhost:59095/" "BaseUrl": "http://dev.ccwin-in.com:60085/"
}, },
"Label": { "Label": {
"BaseUrl": "http://dev.ccwin-in.com:60082/" "BaseUrl": "http://dev.ccwin-in.com:60082/"

9
be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/DeliverRequest/DeliverRequestExchangeDto.cs

@ -27,7 +27,14 @@ public class DeliverRequestExchangeDto
/// 发货类型 /// 发货类型
/// </summary> /// </summary>
public EnumDeliverRequestType DeliverRequestType { get; set; } public EnumDeliverRequestType DeliverRequestType { get; set; }
/// <summary>
/// 看板件发货计划单号/JIS发货单号
/// </summary>
public string DeliverPlanNumber { get; set; }
/// <summary>
/// Mes车牌号
/// </summary>
public string MesTruckNumber { get; set; }
/// <summary> /// <summary>
/// 客户 /// 客户
/// </summary> /// </summary>

10
be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/Win_in.Sfs.Wms.DataExchange.Application.Contracts.xml

@ -626,6 +626,16 @@
发货类型 发货类型
</summary> </summary>
</member> </member>
<member name="P:Win_in.Sfs.Wms.DataExchange.WMS.DeliverRequest.DeliverRequestExchangeDto.DeliverPlanNumber">
<summary>
看板件发货计划单号/JIS发货单号
</summary>
</member>
<member name="P:Win_in.Sfs.Wms.DataExchange.WMS.DeliverRequest.DeliverRequestExchangeDto.MesTruckNumber">
<summary>
Mes车牌号
</summary>
</member>
<member name="P:Win_in.Sfs.Wms.DataExchange.WMS.DeliverRequest.DeliverRequestExchangeDto.CustomerCode"> <member name="P:Win_in.Sfs.Wms.DataExchange.WMS.DeliverRequest.DeliverRequestExchangeDto.CustomerCode">
<summary> <summary>
客户 客户

4
be/Hosts/Core.Host/Win_in.Sfs.Core.Host/Properties/PublishProfiles/FolderProfile.pubxml

@ -4,13 +4,13 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
--> -->
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<DeleteExistingFiles>true</DeleteExistingFiles> <DeleteExistingFiles>false</DeleteExistingFiles>
<ExcludeApp_Data>false</ExcludeApp_Data> <ExcludeApp_Data>false</ExcludeApp_Data>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish> <LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform> <LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider> <PublishProvider>FileSystem</PublishProvider>
<PublishUrl>.\..\..\..\OutPut\Core\</PublishUrl> <PublishUrl>D:\发布\WMS\core</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod> <WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish /> <SiteUrlToLaunchAfterPublish />
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>

45
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/InjectionPlanRequestController.cs

@ -1,4 +1,5 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
@ -16,14 +17,16 @@ namespace Win_in.Sfs.Wms.Pda.Controllers.Stores;
public class InjectionPlanRequestController : AbpController public class InjectionPlanRequestController : AbpController
{ {
private readonly IInjectionPlanRequestAppService _injectionRequestAppService; private readonly IInjectionPlanRequestAppService _injectionRequestAppService;
private readonly IItemContainerAppService _itemContainerAppService;
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
/// <param name="InjectionPlanRequestAppService"></param> /// <param name="InjectionPlanRequestAppService"></param>
public InjectionPlanRequestController(IInjectionPlanRequestAppService InjectionPlanRequestAppService) public InjectionPlanRequestController(IInjectionPlanRequestAppService InjectionPlanRequestAppService, IItemContainerAppService itemContainerAppService)
{ {
_injectionRequestAppService = InjectionPlanRequestAppService; _injectionRequestAppService = InjectionPlanRequestAppService;
_itemContainerAppService = itemContainerAppService;
} }
/// <summary> /// <summary>
@ -34,7 +37,7 @@ public class InjectionPlanRequestController : AbpController
[HttpPost("")] [HttpPost("")]
public virtual async Task<ActionResult<InjectionPlanRequestDTO>> CreateAsync(InjectionPlanRequestEditInput input) public virtual async Task<ActionResult<InjectionPlanRequestDTO>> CreateAsync(InjectionPlanRequestEditInput input)
{ {
var result = await _injectionRequestAppService.CreateAsync(input).ConfigureAwait(false); var result = await _injectionRequestAppService.CreateAndHandleAsync(input).ConfigureAwait(false);
return Ok(result); return Ok(result);
} }
@ -52,16 +55,46 @@ public class InjectionPlanRequestController : AbpController
} }
/// <summary> /// <summary>
/// 获取物品类别列表 /// 获取物品类别名称
/// </summary> /// </summary>
/// <param name="type"></param> /// <returns></returns>
[HttpGet("item-category-name")]
public virtual async Task<List<string>> GetItemCategoryNameAsync()
{
var entities = await _injectionRequestAppService.GetItemCategoryListAsync().ConfigureAwait(false);
var categoryNames = entities.Select(p => p.Category).Distinct().ToList();
return categoryNames;
}
/// <summary>
/// 根据类别名称获取物品类别列表
/// </summary>
/// <param name="categoryName"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet("list/item-category")] [HttpGet("list/item-category")]
public virtual async Task<List<ItemBasicDTO>> GetItemCategoryListAsync() public virtual async Task<List<ItemBasicDTO>> GetItemCategoryListAsync(string categoryName)
{ {
var entities = await _injectionRequestAppService.GetItemCategoryListAsync().ConfigureAwait(false); var entities = await _injectionRequestAppService.GetItemCategoryListAsync().ConfigureAwait(false);
return entities; var itemEntities = entities.Where(p => p.Category == categoryName).ToList();
foreach (var item in itemEntities)
{
var itemContainerDto = await _itemContainerAppService.GetByItemCodeAsync(item.Code).ConfigureAwait(false);
if(itemContainerDto != null)
{
item.StdPackQty = itemContainerDto.Qty;
item.BasicUom = itemContainerDto.BasicUom;
}
else
{
item.StdPackQty = 1;
}
}
return itemEntities;
} }
} }

2
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/IssueRequest/InjectionRequestController.cs

@ -35,7 +35,7 @@ public class InjectionRequestController : AbpController
} }
/// <summary> /// <summary>
/// Kitting叫料申请 /// 注塑叫料申请
/// </summary> /// </summary>
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>

15
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReceiptRequestController.cs

@ -48,4 +48,19 @@ public class PurchaseReceiptRequestController : AbpController
{ {
return await _purchaseReceiptRequestAppService.GetDetailByItemAndPackingAsync(itemCode, packingCode).ConfigureAwait(false); return await _purchaseReceiptRequestAppService.GetDetailByItemAndPackingAsync(itemCode, packingCode).ConfigureAwait(false);
} }
/// <summary>
/// 【获取】【收货记录详情】根据 物品 传入箱码的根箱码
/// </summary>
/// <param name="itemCode"></param>
/// <param name="packingCode"></param>
/// <returns></returns>
[HttpGet("detail-by-item-and-rootpacking")]
public virtual async Task<PurchaseReceiptRequestDetailDTO> GetDetailByItemAndRootPackingAsync(string itemCode,
string packingCode)
{
return await _purchaseReceiptRequestAppService.GetDetailByItemAndRootPackingAsync(itemCode, packingCode).ConfigureAwait(false);
}
} }

2
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnNoteController.cs

@ -148,7 +148,7 @@ public class PurchaseReturnNoteController : AbpController
{ {
var po = await _purchaseOrderAppService.GetListByNumberAndItemCodeAsync(poNumber, createInputDetail.ItemCode).ConfigureAwait(false); var po = await _purchaseOrderAppService.GetListByNumberAndItemCodeAsync(poNumber, createInputDetail.ItemCode).ConfigureAwait(false);
Check.NotNull(po, nameof(PurchaseOrderDTO)); Check.NotNull(po, nameof(PurchaseOrderDTO));
var detail = po.Details.FirstOrDefault(r => r.ItemCode == createInputDetail.ItemCode); var detail = po.Details.FirstOrDefault(r => r.ItemCode == createInputDetail.ItemCode && r.Lot== createInputDetail.Lot);
Check.NotNull(detail, nameof(PurchaseOrderDetailDTO)); Check.NotNull(detail, nameof(PurchaseOrderDetailDTO));
createInputDetail.PoLine = detail.PoLine; createInputDetail.PoLine = detail.PoLine;
} }

5
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnRequestController.cs

@ -35,7 +35,7 @@ public class PurchaseReturnRequestController : AbpController
/// 创建退货申请 /// 创建退货申请
/// </summary> /// </summary>
[HttpPost("create-many")] [HttpPost("create-many")]
public virtual async Task<ActionResult> CreateManyAsync(List<PurchaseReturnRequestPdaInput> input) public virtual async Task<List<PurchaseReturnRequestDTO>> CreateManyAsync(List<PurchaseReturnRequestPdaInput> input)
{ {
List<PurchaseReturnRequestEditInput> entitys = new List<PurchaseReturnRequestEditInput>(); List<PurchaseReturnRequestEditInput> entitys = new List<PurchaseReturnRequestEditInput>();
var groups = input.GroupBy(r => r.AsnNumber).ToList(); var groups = input.GroupBy(r => r.AsnNumber).ToList();
@ -57,8 +57,7 @@ public class PurchaseReturnRequestController : AbpController
} }
entitys.Add(entity); entitys.Add(entity);
} }
await _purchaseReturnRequestAppService.CreateManyAsync(entitys).ConfigureAwait(false); return await _purchaseReturnRequestAppService.CreateManyAsync(entitys).ConfigureAwait(false);
return Ok();
} }
/// <summary> /// <summary>

13
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAppService.cs

@ -17,6 +17,7 @@ using System.Text;
using DocumentFormat.OpenXml.Office2010.ExcelAc; using DocumentFormat.OpenXml.Office2010.ExcelAc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Volo.Abp;
using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Repositories; using Volo.Abp.Domain.Repositories;
using Win_in.Sfs.Shared; using Win_in.Sfs.Shared;
@ -60,9 +61,17 @@ public class DictAppService : SfsBaseDataWithCodeAppServiceBase<Dict, DictDTO, S
[HttpPut] [HttpPut]
[Route("{id}")] [Route("{id}")]
public override Task<DictDTO> UpdateAsync(Guid id, DictEditInput input) public override async Task<DictDTO> UpdateAsync(Guid id, DictEditInput input)
{ {
return base.UpdateAsync(id, input); //return await base.UpdateAsync(id, input).ConfigureAwait(false); //lyf at 0621, 更新报错所以注释
var entity = await _repository.GetAsync(id).ConfigureAwait(false);
if (entity == null)
{
throw new UserFriendlyException($"根据Id取字典表为空:{id}");
}
ObjectMapper.Map<DictEditInput, Dict>(input, entity);
await _repository.UpdateAsync(entity, true).ConfigureAwait(false);
return ObjectMapper.Map<Dict, DictDTO>(entity);
} }
[HttpPost("update")] [HttpPost("update")]

12
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCodes/PositionCodeAppService.cs

@ -56,14 +56,14 @@ public class PositionCodeAppService
var existEntity = await GetByCodeAsync(input.Code).ConfigureAwait(false); var existEntity = await GetByCodeAsync(input.Code).ConfigureAwait(false);
if (existEntity != null) if (existEntity != null)
{ {
throw new UserFriendlyException($"{input.Code} 已存在"); throw new UserFriendlyException($"位置码{input.Code} 已存在");
} }
var itemEntity = await _repository.FirstOrDefaultAsync(p => p.PartCode == input.PartCode).ConfigureAwait(false); //var itemEntity = await _repository.FirstOrDefaultAsync(p => p.LocationCode == input.LocationCode && p.PartCode == input.PartCode && p.Type == input.Type).ConfigureAwait(false);
if(itemEntity != null) //if (itemEntity != null)
{ //{
throw new UserFriendlyException($"{input.PartCode} 物品已存在"); // throw new UserFriendlyException($"类型{input.Type.ToString()}物品{input.PartCode}目标库位{input.LocationCode}已存在!");
} //}
var itemBasic = await ItemBasicAppService.GetByCodeAsync(input.PartCode).ConfigureAwait(false); var itemBasic = await ItemBasicAppService.GetByCodeAsync(input.PartCode).ConfigureAwait(false);
Check.NotNull(itemBasic, "ERP料号", $"物品 {input.PartCode} 不存在"); Check.NotNull(itemBasic, "ERP料号", $"物品 {input.PartCode} 不存在");

62
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRecManager.cs

@ -42,22 +42,14 @@ public class SplitPackingRecManager : DomainService, ISplitPackingRecManager
{ {
throw new UserFriendlyException("操作类型不是拆箱或合箱状态,源箱码和目标箱码必须相同!"); throw new UserFriendlyException("操作类型不是拆箱或合箱状态,源箱码和目标箱码必须相同!");
} }
if (item.FromTopPackingCode.IsNullOrEmpty())
{
item.FromTopPackingCode = item.FromPackingCode;
}
if (item.ToTopPackingCode.IsNullOrEmpty())
{
item.ToTopPackingCode = item.FromPackingCode;// ToPackingCode;
}
} }
#endregion #endregion
if (item.OprType == OprTypeEnum.SplitBox || item.OprType == OprTypeEnum.MergeBox) if (item.OprType == OprTypeEnum.SplitBox || item.OprType == OprTypeEnum.MergeBox)
{ {
//设置顶级箱码 //设置顶级箱码
item.FromTopPackingCode = GetTopPackingCode(query, item.FromPackingCode); item.FromTopPackingCode = CalcuTopPackingCode(query, item.FromPackingCode);
item.ToTopPackingCode = GetTopPackingCode(query, item.FromPackingCode); //ToPackingCode item.ToTopPackingCode = CalcuTopPackingCode(query, item.FromPackingCode); //ToPackingCode
if (item.FromTopPackingCode.IsNullOrEmpty()) if (item.FromTopPackingCode.IsNullOrEmpty())
{ {
item.FromTopPackingCode = item.FromPackingCode; item.FromTopPackingCode = item.FromPackingCode;
@ -91,6 +83,14 @@ public class SplitPackingRecManager : DomainService, ISplitPackingRecManager
} }
else else
{ {
if (item.FromTopPackingCode.IsNullOrEmpty())
{
item.FromTopPackingCode = item.FromPackingCode;
}
if (item.ToTopPackingCode.IsNullOrEmpty())
{
item.ToTopPackingCode = item.FromPackingCode;// ToPackingCode;
}
SplitPackingRec newEntity = CommonHelper.CloneObj(item); SplitPackingRec newEntity = CommonHelper.CloneObj(item);
newEntity.SetId(GuidGenerator.Create()); newEntity.SetId(GuidGenerator.Create());
var ret = await _repository.InsertAsync(newEntity, true).ConfigureAwait(false); var ret = await _repository.InsertAsync(newEntity, true).ConfigureAwait(false);
@ -202,24 +202,42 @@ public class SplitPackingRecManager : DomainService, ISplitPackingRecManager
/// 取顶级箱码 /// 取顶级箱码
/// </summary> /// </summary>
/// <param name="historyQuery">箱码历史</param> /// <param name="historyQuery">箱码历史</param>
/// <param name="item">当前箱码</param> /// <param name="packingCode">箱码,from to时都传入from</param>
/// <returns></returns> /// <returns></returns>
private static string GetTopPackingCode(IQueryable<SplitPackingRec> historyQuery, string packingCode) private static string CalcuTopPackingCode(IQueryable<SplitPackingRec> historyQuery, string packingCode)
{ {
var historyRec = historyQuery.Where(itm => itm.FromPackingCode == packingCode).OrderBy(itm => itm.CreationTime).FirstOrDefault(); var qry = historyQuery.Where(itm => itm.OprType == OprTypeEnum.SplitBox || itm.OprType == OprTypeEnum.MergeBox);
if (historyRec != null) string ret = null;
{ SplitPackingRec? firstObj = null;
return historyRec.FromTopPackingCode; string toCode = packingCode;
} while (1 == 1)
else
{ {
historyRec = historyQuery.Where(itm => itm.ToPackingCode == packingCode).OrderBy(itm => itm.CreationTime).FirstOrDefault(); firstObj = qry.FirstOrDefault(itm => itm.ToPackingCode == toCode);
if (historyRec != null) if (firstObj == null)
{
ret = toCode;
break;
}
else
{ {
return historyRec.ToTopPackingCode; toCode = firstObj.FromPackingCode;
} }
} }
return null; return ret;
//var historyRec = historyQuery.Where(itm => itm.FromPackingCode == packingCode).OrderBy(itm => itm.CreationTime).FirstOrDefault();
//if (historyRec != null)
//{
// return historyRec.FromTopPackingCode;
//}
//else
//{
// historyRec = historyQuery.Where(itm => itm.ToPackingCode == packingCode).OrderBy(itm => itm.CreationTime).FirstOrDefault();
// if (historyRec != null)
// {
// return historyRec.ToTopPackingCode;
// }
//}
//return null;
} }
private static void SetBillNumber(IQueryable<SplitPackingRec> historyQuery, SplitPackingRec obj) private static void SetBillNumber(IQueryable<SplitPackingRec> historyQuery, SplitPackingRec obj)

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/PositionCodes/PositionCodeDbContextModelCreatingExtensions.cs

@ -34,7 +34,6 @@ public static class PositionCodeDbContextModelCreatingExtensions
//Indexes //Indexes
b.HasIndex(q => new { q.Code,q.PartCode,q.LocationCode }).IsUnique(); b.HasIndex(q => new { q.Code,q.PartCode,q.LocationCode }).IsUnique();
b.HasIndex(q => new { q.Code }).IsUnique(); b.HasIndex(q => new { q.Code }).IsUnique();
b.HasIndex(q => new { q.PartCode }).IsUnique();
}); });
} }
} }

2
be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Transactions/Transaction.cs

@ -233,12 +233,12 @@ public class Transaction : SfsInventoryAggregateRootBase
public void TrySetItemAndLocation(ItemBasicDTO item, LocationDTO location) public void TrySetItemAndLocation(ItemBasicDTO item, LocationDTO location)
{ {
ManageType = item.ManageType; ManageType = item.ManageType;
StdPackQty = item.StdPackQty;
if (string.IsNullOrEmpty(ItemName)) if (string.IsNullOrEmpty(ItemName))
{ {
ItemName = item.Name; ItemName = item.Name;
ItemDesc1 = item.Desc1; ItemDesc1 = item.Desc1;
ItemDesc2 = item.Desc2; ItemDesc2 = item.Desc2;
StdPackQty = item.StdPackQty;
} }
if (string.IsNullOrEmpty(WarehouseCode)) if (string.IsNullOrEmpty(WarehouseCode))
{ {

2
be/Modules/Shared/src/Win_in.Sfs.Shared.Application/ExportAndImport/ClosedXmlExportImportService.cs

@ -333,7 +333,7 @@ public class ClosedXmlExportImportService : IExportImportService
else else
{ {
SetCellStyle(row.Cell(1).SetValue("失败"), rowIndex, 1, fontColor: XLColor.Red); SetCellStyle(row.Cell(1).SetValue("失败"), rowIndex, 1, fontColor: XLColor.Red);
var desc = string.Join("\n", errors.Select(o => $"{o.MemberNames?.First()} {o.ErrorMessage}")); string desc = string.Join("\n", errors.Select(o => $"{(o.MemberNames.Any() ? o.MemberNames.First() : String.Empty)} {o.ErrorMessage}"));
SetCellStyle(row.Cell(2).SetValue(desc), rowIndex, 2, fontColor: XLColor.Red); SetCellStyle(row.Cell(2).SetValue(desc), rowIndex, 2, fontColor: XLColor.Red);
} }
} }

4
be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransType.cs

@ -174,8 +174,4 @@ public enum EnumTransType
MesUnFreezed = 41, MesUnFreezed = 41,
} }

4
be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Job/EnumJobStatus.cs

@ -48,8 +48,8 @@ public enum EnumJobStatus
Cancelled = 9, Cancelled = 9,
/// <summary> /// <summary>
/// /// 待库移
/// </summary> /// </summary>
[Display(Name = "待")] [Display(Name = "待库移")]
Wait=30, Wait=30,
} }

6
be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumIssueRequestType.cs

@ -39,4 +39,10 @@ public enum EnumIssueRequestType
/// </summary> /// </summary>
[Display(Name = "EXCEL导入")] [Display(Name = "EXCEL导入")]
ExcelImport=5, ExcelImport=5,
/// <summary>
/// 注塑计划
/// </summary>
[Display(Name = "EXCEL导入")]
InjectionPlan = 6,
} }

5
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/DeliverJobs/DTOs/DeliverJobDTO.cs

@ -38,5 +38,10 @@ public class DeliverJobDTO : SfsJobDTOBase<DeliverJobDetailDTO>
/// </summary> /// </summary>
[Display(Name = "发货请求单号")] [Display(Name = "发货请求单号")]
public string DeliverRequestNumber { get; set; } public string DeliverRequestNumber { get; set; }
/// <summary>
/// Mes车牌号
/// </summary>
[Display(Name = "Mes车牌号")]
public string MesTruckNumber { get; set; }
} }

5
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/DeliverJobs/Inputs/DeliverJobEditInput.cs

@ -73,5 +73,10 @@ public class DeliverJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCreateInp
/// </summary> /// </summary>
[Display(Name = "发货计划单号")] [Display(Name = "发货计划单号")]
public string DeliverPlanNumber { get; set; } public string DeliverPlanNumber { get; set; }
/// <summary>
/// Mes车牌号
/// </summary>
[Display(Name = "Mes车牌号")]
public string MesTruckNumber { get; set; }
#endregion #endregion
} }

5
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDTO.cs

@ -54,6 +54,11 @@ public class DeliverNoteDTO : SfsStoreDTOBase<DeliverNoteDetailDTO>
/// <returns></returns> /// <returns></returns>
[Display(Name = "打印次数")] [Display(Name = "打印次数")]
public int CountPrint { get; set; } public int CountPrint { get; set; }
/// <summary>
/// Mes车牌号
/// </summary>
[Display(Name = "Mes车牌号")]
public string MesTruckNumber { get; set; }
/// <summary> /// <summary>
/// 发货类型 /// 发货类型

6
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteEditInput.cs

@ -57,7 +57,11 @@ public class DeliverNoteEditInput : SfsStoreCreateOrUpdateInputBase
/// </summary> /// </summary>
[Display(Name = "发货类型")] [Display(Name = "发货类型")]
public EnumDeliverRequestType DeliverRequestType { get; set; } public EnumDeliverRequestType DeliverRequestType { get; set; }
/// <summary>
/// Mes车牌号
/// </summary>
[Display(Name = "Mes车牌号")]
public string MesTruckNumber { get; set; }
/// <summary> /// <summary>
/// 明细列表 /// 明细列表
/// </summary> /// </summary>

8
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/InventoryInitialNotes/Inputs/InventoryInitialNoteImportInput.cs

@ -10,6 +10,7 @@ public class InventoryInitialNoteImportInput : SfsStoreImportInputBase, IHasQty,
/// 仓库代码 /// 仓库代码
/// </summary> /// </summary>
[Display(Name = "仓库代码")] [Display(Name = "仓库代码")]
[Required(ErrorMessage = "{0}是必填项")]
public string WarehouseCode { get; set; } public string WarehouseCode { get; set; }
/// <summary> /// <summary>
@ -22,6 +23,7 @@ public class InventoryInitialNoteImportInput : SfsStoreImportInputBase, IHasQty,
/// ERP料号 /// ERP料号
/// </summary> /// </summary>
[Display(Name = "ERP料号")] [Display(Name = "ERP料号")]
[Required(ErrorMessage = "{0}是必填项")]
public string ItemCode { get; set; } public string ItemCode { get; set; }
/// <summary> /// <summary>
@ -35,24 +37,28 @@ public class InventoryInitialNoteImportInput : SfsStoreImportInputBase, IHasQty,
/// 单位 /// 单位
/// </summary> /// </summary>
[Display(Name = "单位")] [Display(Name = "单位")]
[Required(ErrorMessage = "{0}是必填项")]
public string Uom { get; set; } public string Uom { get; set; }
/// <summary> /// <summary>
/// 批次 /// 批次
/// </summary> /// </summary>
[Display(Name = "批次")] [Display(Name = "批次")]
[Required(ErrorMessage = "{0}是必填项")]
public string Lot { get; set; } public string Lot { get; set; }
/// <summary> /// <summary>
/// 库位代码 /// 库位代码
/// </summary> /// </summary>
[Display(Name = "库位代码")] [Display(Name = "库位代码")]
[Required(ErrorMessage = "{0}是必填项")]
public string LocationCode { get; set; } public string LocationCode { get; set; }
/// <summary> /// <summary>
/// ERP库位 /// ERP库位
/// </summary> /// </summary>
[Display(Name = "ERP库位")] [Display(Name = "ERP库位")]
[Required(ErrorMessage = "{0}是必填项")]
public string LocationErpCode { get; set; } public string LocationErpCode { get; set; }
/// <summary> /// <summary>
@ -72,11 +78,13 @@ public class InventoryInitialNoteImportInput : SfsStoreImportInputBase, IHasQty,
/// 库区 /// 库区
/// </summary> /// </summary>
[Display(Name = "库区")] [Display(Name = "库区")]
[Required(ErrorMessage = "{0}是必填项")]
public string LocationArea { get; set; } public string LocationArea { get; set; }
/// <summary> /// <summary>
/// 库位组 /// 库位组
/// </summary> /// </summary>
[Display(Name = "库位组")] [Display(Name = "库位组")]
[Required(ErrorMessage = "{0}是必填项")]
public string LocationGroup { get; set; } public string LocationGroup { get; set; }
} }

4
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/DTOs/DeliverRequestDTO.cs

@ -31,4 +31,8 @@ public class DeliverRequestDTO : SfsStoreRequestDTOBase<DeliverRequestDetailDTO>
/// </summary> /// </summary>
[Display(Name = "客户地址")] [Display(Name = "客户地址")]
public string CustomerAddressCode { get; set; } public string CustomerAddressCode { get; set; }
/// <summary>
/// Mes车牌号
/// </summary>
public string MesTruckNumber { get; set; }
} }

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestEditInput.cs

@ -33,6 +33,8 @@ public class DeliverRequestEditInput : SfsStoreRequestCreateOrUpdateInputBase
[Display(Name = "发货类型")] [Display(Name = "发货类型")]
public EnumDeliverRequestType DeliverRequestType { get; set; } public EnumDeliverRequestType DeliverRequestType { get; set; }
[Display(Name = "Mes车牌号")]
public string MesTruckNumber { get; set; }
[Display(Name = "明细列表")] [Display(Name = "明细列表")]
public List<DeliverRequestDetailInput> Details { get; set; } public List<DeliverRequestDetailInput> Details { get; set; }

5
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/DeliverRequests/Inputs/DeliverRequestImportInput.cs

@ -69,6 +69,11 @@ public class DeliverRequestImportInput : SfsStoreImportInputBase
[Display(Name = "Mes发货计划号")] [Display(Name = "Mes发货计划号")]
public string MesDeliveryPlan { get; set; } public string MesDeliveryPlan { get; set; }
/// <summary> /// <summary>
/// Mes车牌号
/// </summary>
[Display(Name = "Mes车牌号")]
public string MesTruckNumber { get; set; }
/// <summary>
/// 底盘号 /// 底盘号
/// </summary> /// </summary>
[Display(Name = "底盘号")] [Display(Name = "底盘号")]

1
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/InjectionPlanRequests/IInjectionPlanRequestAppService.cs

@ -16,6 +16,7 @@ public interface IInjectionPlanRequestAppService
/// <returns></returns> /// <returns></returns>
Task<List<ItemBasicDTO>> GetItemCategoryListAsync(); Task<List<ItemBasicDTO>> GetItemCategoryListAsync();
Task<CoatingIssueRequestDTO> CreateAndHandleAsync(InjectionPlanRequestEditInput input);
Task<List<UnCompletedRequestDto>> GetUnCompletedRequestAsync(List<UnCompletedRequestDto> p_list); Task<List<UnCompletedRequestDto>> GetUnCompletedRequestAsync(List<UnCompletedRequestDto> p_list);
} }

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/KittingIssueRequests/IKittingIssueRequestAppService.cs

@ -11,7 +11,7 @@ public interface IKittingIssueRequestAppService
{ {
Task<KittingIssueRequestDTO> CreateAndHandleAsync(KittingIssueRequestEditInput input); Task<KittingIssueRequestDTO> CreateAndHandleAsync(KittingIssueRequestEditInput input);
Task UpdateStatusCompletedAsync(string number); Task UpdateStatusCompletedAsync(string number, string jobNumber);
Task<string> IsHasNewJobAsync(string requestNumber,List<string> jobNumber); Task<string> IsHasNewJobAsync(string requestNumber,List<string> jobNumber);
Task CreateImportExcelAsync(List<KittingIssueRequestEditInput> inputs); Task CreateImportExcelAsync(List<KittingIssueRequestEditInput> inputs);
} }

3
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/IssueRequest/SparePartIssueRequests/Inputs/SparePartIssueRequestImportInput.cs

@ -13,18 +13,21 @@ public class SparePartIssueRequestImportInput : SfsStoreImportInputBase
/// ERP料号 /// ERP料号
/// </summary> /// </summary>
[Display(Name = "ERP料号")] [Display(Name = "ERP料号")]
[Required(ErrorMessage = "{0}是必填项")]
public string ItemCode { get; set; } public string ItemCode { get; set; }
/// <summary> /// <summary>
/// 需求数量 /// 需求数量
/// </summary> /// </summary>
[Display(Name = "需求数量")] [Display(Name = "需求数量")]
[Required(ErrorMessage = "{0}是必填项")]
public decimal Qty { get; set; } public decimal Qty { get; set; }
/// <summary> /// <summary>
/// 目标库位 /// 目标库位
/// </summary> /// </summary>
[Display(Name = "目标库位")] [Display(Name = "目标库位")]
[Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string ToLocationCode { get; set; } public string ToLocationCode { get; set; }
} }

17
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/PurchaseReceiptRequests/IPurchaseReceiptRequestAppService.cs

@ -32,12 +32,21 @@ public interface IPurchaseReceiptRequestAppService
string packingCode); string packingCode);
/// <summary> /// <summary>
/// 修改请求状态 /// 【获取】【收货记录详情】根据 物品 传入箱码的根箱码
/// </summary> /// </summary>
/// <param name="number"></param> /// <param name="itemCode"></param>
/// <param name="enumRequestStatus"></param> /// <param name="packingCode"></param>
/// <returns></returns> /// <returns></returns>
Task<PurchaseReceiptRequestDTO> UpdatePurchaseReceiptRequestAsync(string number, Task<PurchaseReceiptRequestDetailDTO> GetDetailByItemAndRootPackingAsync(string itemCode,
string packingCode);
/// <summary>
/// 修改请求状态
/// </summary>
/// <param name="number"></param>
/// <param name="enumRequestStatus"></param>
/// <returns></returns>
Task<PurchaseReceiptRequestDTO> UpdatePurchaseReceiptRequestAsync(string number,
EnumRequestStatus enumRequestStatus); EnumRequestStatus enumRequestStatus);
/// <summary> /// <summary>

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ScrapRequests/Inputs/ScrapRequestImportInput.cs

@ -16,7 +16,7 @@ public class ScrapRequestImportInput : SfsStoreImportInputBase
[ImporterHeader(Name = "报废类型")] [ImporterHeader(Name = "报废类型")]
[ExporterHeader(DisplayName = "报废类型")] [ExporterHeader(DisplayName = "报废类型")]
[ValueMapping("线边报废", EnumTransSubType.Scrap_WIP)] [ValueMapping("线边报废", EnumTransSubType.Scrap_WIP)]
[ValueMapping("原料报废", EnumTransSubType.Scrap_Manual)] //[ValueMapping("原料报废", EnumTransSubType.Scrap_Manual)]
[ValueMapping("完工报废", EnumTransSubType.Scrap_Product)] [ValueMapping("完工报废", EnumTransSubType.Scrap_Product)]
public string Type { get; set; } public string Type { get; set; }

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/ITransferLibRequestAppService.cs

@ -18,6 +18,6 @@ public interface ITransferLibRequestAppService
CancellationToken cancellationToken = default); CancellationToken cancellationToken = default);
Task CompleteByJobAsync(string requestNumber); Task CompleteByJobAsync(string requestNumber);
Task CancelByCallRequestNumberAsync(string callRequestNumber); Task CancelByCallRequestNumberAsync(string callJobNumber);
Task CompleteByCallRequestNumberAsync(string callRequestNumber); Task CompleteByCallRequestNumberAsync(string callRequestNumber);
} }

4
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferRequests/Inputs/TransferRequestImportInput.cs

@ -1,3 +1,4 @@
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Application.Contracts; using Win_in.Sfs.Shared.Application.Contracts;
using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Domain.Shared;
@ -73,7 +74,8 @@ public class TransferRequestImportInput : SfsStoreImportInputBase
/// </summary> /// </summary>
[Display(Name = "状态")] [Display(Name = "状态")]
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]
public EnumInventoryStatus Status { get; set; } [ValueMapping("合格", EnumInventoryStatus.OK)]
public string Status { get; set; }
#region 回调服务相关 #region 回调服务相关
/// <summary> /// <summary>

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InjectionPlanJobs/InjectionPlanJobAppService.cs

@ -64,7 +64,7 @@ public class InjectionPlanJobAppService
} }
/// <summary> /// <summary>
/// 判断是不是在最底层 如果不是则把状态变更为待 并把库移推荐的From和To赋值 /// 判断是不是在最底层 如果不是则把状态变更为待库移 并把库移推荐的From和To赋值
/// </summary> /// </summary>
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>

3
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InspectJobs/InspectJobAppService.cs

@ -217,7 +217,6 @@ public class InspectJobAppService
{ {
throw new UserFriendlyException($"根据PackingCode={input.FromPackingCode}取InspectDetail表为空!"); throw new UserFriendlyException($"根据PackingCode={input.FromPackingCode}取InspectDetail表为空!");
} }
//插入目标箱 //插入目标箱
var newDetail = CommonHelper.CloneObj(detail); var newDetail = CommonHelper.CloneObj(detail);
newDetail.SetId(GuidGenerator.Create()); newDetail.SetId(GuidGenerator.Create());
@ -226,6 +225,8 @@ public class InspectJobAppService
newDetail.InspectQty = input.ToQty; newDetail.InspectQty = input.ToQty;
newDetail.GoodQty = input.ToQty; newDetail.GoodQty = input.ToQty;
//newDetail.CreationTime = CommonHelper.CurTime; //newDetail.CreationTime = CommonHelper.CurTime;
decimal maxPoLine = job.Details.Max(itm => itm.PoLine.TryToDecimalZero());
newDetail.PoLine = (maxPoLine + 1).ToString(); //行号自增
job.Details.Add(newDetail); job.Details.Add(newDetail);
//修改源箱 //修改源箱
detail.ReceiveQty = input.FromQty - input.ToQty; detail.ReceiveQty = input.FromQty - input.ToQty;

6
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs

@ -235,7 +235,9 @@ public class AssembleIssueJobAppService
issueJobDetail.HandledToQty += issueJobDetailDto.HandledToQty; issueJobDetail.HandledToQty += issueJobDetailDto.HandledToQty;
issueJobDetail.HandledFromQty += issueJobDetailDto.HandledFromQty; issueJobDetail.HandledFromQty += issueJobDetailDto.HandledFromQty;
assembleIssueJob.Details = new EditableList<AssembleIssueJobDetail> { issueJobDetail }; assembleIssueJob.Details = new EditableList<AssembleIssueJobDetail> { issueJobDetail };
assembleIssueJob.CompleteUserId = _currentUser.Id;
assembleIssueJob.CompleteUserName = _currentUser.Name;
assembleIssueJob.CompleteTime = DateTime.Now;
if (assembleIssueJob.EnumIssueSendType == EnumIssueSendType.BoxQtyType) //按箱叫料 因为任务只有1箱 所以可以直接完成 if (assembleIssueJob.EnumIssueSendType == EnumIssueSendType.BoxQtyType) //按箱叫料 因为任务只有1箱 所以可以直接完成
{ {
if (issueJobDetailDto.RecommendToPackingCode != issueJobDetailDto.HandledToPackingCode) if (issueJobDetailDto.RecommendToPackingCode != issueJobDetailDto.HandledToPackingCode)
@ -562,7 +564,7 @@ public class AssembleIssueJobAppService
} }
/// <summary> /// <summary>
/// 判断是不是在最底层 如果不是则把状态变更为待 并把库移推荐的From和To赋值 /// 判断是不是在最底层 如果不是则把状态变更为待库移 并把库移推荐的From和To赋值
/// </summary> /// </summary>
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>

6
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs

@ -249,7 +249,9 @@ public class CoatingIssueJobAppService
issueJobDetail.HandledToQty += issueJobDetailDto.HandledToQty; issueJobDetail.HandledToQty += issueJobDetailDto.HandledToQty;
issueJobDetail.HandledFromQty += issueJobDetailDto.HandledFromQty; issueJobDetail.HandledFromQty += issueJobDetailDto.HandledFromQty;
coatingIssueJob.Details = new EditableList<CoatingIssueJobDetail> { issueJobDetail }; coatingIssueJob.Details = new EditableList<CoatingIssueJobDetail> { issueJobDetail };
coatingIssueJob.CompleteUserId = _currentUser.Id;
coatingIssueJob.CompleteUserName = _currentUser.Name;
coatingIssueJob.CompleteTime = DateTime.Now;
if (coatingIssueJob.EnumIssueSendType == EnumIssueSendType.BoxQtyType) //按箱叫料 因为任务只有1箱 所以可以直接完成 if (coatingIssueJob.EnumIssueSendType == EnumIssueSendType.BoxQtyType) //按箱叫料 因为任务只有1箱 所以可以直接完成
{ {
if (issueJobDetailDto.RecommendToPackingCode != issueJobDetailDto.HandledToPackingCode) if (issueJobDetailDto.RecommendToPackingCode != issueJobDetailDto.HandledToPackingCode)
@ -557,7 +559,7 @@ public class CoatingIssueJobAppService
} }
/// <summary> /// <summary>
/// 判断是不是在最底层 如果不是则把状态变更为待 并把库移推荐的From和To赋值 /// 判断是不是在最底层 如果不是则把状态变更为待库移 并把库移推荐的From和To赋值
/// </summary> /// </summary>
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>

6
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs

@ -227,7 +227,9 @@ public class InjectionIssueJobAppService
issueJobDetail.HandledToQty += issueJobDetailDto.HandledToQty; issueJobDetail.HandledToQty += issueJobDetailDto.HandledToQty;
issueJobDetail.HandledFromQty += issueJobDetailDto.HandledFromQty; issueJobDetail.HandledFromQty += issueJobDetailDto.HandledFromQty;
injectionIssueJob.Details = new EditableList<InjectionIssueJobDetail> { issueJobDetail }; injectionIssueJob.Details = new EditableList<InjectionIssueJobDetail> { issueJobDetail };
injectionIssueJob.CompleteUserId = _currentUser.Id;
injectionIssueJob.CompleteUserName = _currentUser.Name;
injectionIssueJob.CompleteTime = DateTime.Now;
if (injectionIssueJob.EnumIssueSendType == EnumIssueSendType.BoxQtyType) //按箱叫料 因为任务只有1箱 所以可以直接完成 if (injectionIssueJob.EnumIssueSendType == EnumIssueSendType.BoxQtyType) //按箱叫料 因为任务只有1箱 所以可以直接完成
{ {
if (issueJobDetailDto.RecommendToPackingCode != issueJobDetailDto.HandledToPackingCode) if (issueJobDetailDto.RecommendToPackingCode != issueJobDetailDto.HandledToPackingCode)
@ -510,7 +512,7 @@ public class InjectionIssueJobAppService
} }
/// <summary> /// <summary>
/// 判断是不是在最底层 如果不是则把状态变更为待 并把库移推荐的From和To赋值 /// 判断是不是在最底层 如果不是则把状态变更为待库移 并把库移推荐的From和To赋值
/// </summary> /// </summary>
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/IssueJobAppService.cs

@ -182,6 +182,8 @@ public class IssueJobAppService
newDetail.HandledPackingCode = detail.HandledPackingCode.HasValue() ? input.ToPackingCode : null; //源实际实际箱码有值,则新记录实际箱码有值 newDetail.HandledPackingCode = detail.HandledPackingCode.HasValue() ? input.ToPackingCode : null; //源实际实际箱码有值,则新记录实际箱码有值
newDetail.HandledQty = detail.HandledQty > 0 ? input.ToQty : 0; newDetail.HandledQty = detail.HandledQty > 0 ? input.ToQty : 0;
//newDetail.CreationTime = CommonHelper.CurTime; //newDetail.CreationTime = CommonHelper.CurTime;
//decimal maxPoLine = job.Details.Max(itm => itm.PoLine.TryToDecimalZero());
//newDetail.PoLine = (maxPoLine + 1).ToString(); //行号自增
job.Details.Add(newDetail); job.Details.Add(newDetail);
//修改源箱 //修改源箱
detail.RecommendQty = input.FromQty - input.ToQty; detail.RecommendQty = input.FromQty - input.ToQty;

10
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs

@ -226,7 +226,9 @@ public class KittingIssueJobAppService
issueJobDetail.HandledToQty += issueJobDetailDto.HandledToQty; issueJobDetail.HandledToQty += issueJobDetailDto.HandledToQty;
issueJobDetail.HandledFromQty += issueJobDetailDto.HandledFromQty; issueJobDetail.HandledFromQty += issueJobDetailDto.HandledFromQty;
kittingIssueJob.Details = new EditableList<KittingIssueJobDetail> { issueJobDetail }; kittingIssueJob.Details = new EditableList<KittingIssueJobDetail> { issueJobDetail };
kittingIssueJob.CompleteUserId = _currentUser.Id;
kittingIssueJob.CompleteUserName = _currentUser.Name;
kittingIssueJob.CompleteTime = DateTime.Now;
if (kittingIssueJob.EnumIssueSendType == EnumIssueSendType.BoxQtyType) //按箱叫料 因为任务只有1箱 所以可以直接完成 if (kittingIssueJob.EnumIssueSendType == EnumIssueSendType.BoxQtyType) //按箱叫料 因为任务只有1箱 所以可以直接完成
{ {
if (issueJobDetailDto.RecommendToPackingCode != issueJobDetailDto.HandledToPackingCode) if (issueJobDetailDto.RecommendToPackingCode != issueJobDetailDto.HandledToPackingCode)
@ -271,7 +273,7 @@ public class KittingIssueJobAppService
await _expectOutAppService.RemoveByNumberAsync(kittingIssueJob.Number).ConfigureAwait(false); await _expectOutAppService.RemoveByNumberAsync(kittingIssueJob.Number).ConfigureAwait(false);
await KittingIssueRequestAppService.UpdateStatusCompletedAsync(kittingIssueJob.KittingRequestNumber) await KittingIssueRequestAppService.UpdateStatusCompletedAsync(kittingIssueJob.KittingRequestNumber, kittingIssueJob.Number)
.ConfigureAwait(false); .ConfigureAwait(false);
await _transferLibRequestAppService.CancelByCallRequestNumberAsync(kittingIssueJob.KittingRequestNumber) await _transferLibRequestAppService.CancelByCallRequestNumberAsync(kittingIssueJob.KittingRequestNumber)
.ConfigureAwait(false); .ConfigureAwait(false);
@ -507,7 +509,7 @@ public class KittingIssueJobAppService
} }
/// <summary> /// <summary>
/// 判断是不是在最底层 如果不是则把状态变更为待 并把库移推荐的From和To赋值 /// 判断是不是在最底层 如果不是则把状态变更为待库移 并把库移推荐的From和To赋值
/// </summary> /// </summary>
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
@ -620,7 +622,7 @@ public class KittingIssueJobAppService
//await _expectOutAppService.RemoveByNumberAsync(kittingIssueJob.Number).ConfigureAwait(false); //await _expectOutAppService.RemoveByNumberAsync(kittingIssueJob.Number).ConfigureAwait(false);
await KittingIssueRequestAppService.UpdateStatusCompletedAsync(kittingIssueJob.KittingRequestNumber) await KittingIssueRequestAppService.UpdateStatusCompletedAsync(kittingIssueJob.KittingRequestNumber,kittingIssueJob.Number)
.ConfigureAwait(false); .ConfigureAwait(false);
await Task.CompletedTask.ConfigureAwait(false); await Task.CompletedTask.ConfigureAwait(false);

6
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/SparePartIssueJobs/SparePartIssueJobAppService.cs

@ -219,7 +219,9 @@ public class SparePartIssueJobAppService
issueJobDetail.HandledToQty += issueJobDetailDto.HandledToQty; issueJobDetail.HandledToQty += issueJobDetailDto.HandledToQty;
issueJobDetail.HandledFromQty += issueJobDetailDto.HandledFromQty; issueJobDetail.HandledFromQty += issueJobDetailDto.HandledFromQty;
sparePartIssueJob.Details = new EditableList<SparePartIssueJobDetail> { issueJobDetail }; sparePartIssueJob.Details = new EditableList<SparePartIssueJobDetail> { issueJobDetail };
sparePartIssueJob.CompleteUserId = _currentUser.Id;
sparePartIssueJob.CompleteUserName = _currentUser.Name;
sparePartIssueJob.CompleteTime = DateTime.Now;
if (sparePartIssueJob.EnumIssueSendType == EnumIssueSendType.BoxQtyType) //按箱叫料 因为任务只有1箱 所以可以直接完成 if (sparePartIssueJob.EnumIssueSendType == EnumIssueSendType.BoxQtyType) //按箱叫料 因为任务只有1箱 所以可以直接完成
{ {
if (issueJobDetailDto.RecommendToPackingCode != issueJobDetailDto.HandledToPackingCode) if (issueJobDetailDto.RecommendToPackingCode != issueJobDetailDto.HandledToPackingCode)
@ -491,7 +493,7 @@ public class SparePartIssueJobAppService
} }
/// <summary> /// <summary>
/// 判断是不是在最底层 如果不是则把状态变更为待 并把库移推荐的From和To赋值 /// 判断是不是在最底层 如果不是则把状态变更为待库移 并把库移推荐的From和To赋值
/// </summary> /// </summary>
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/PurchaseReceiptJobs/PurchaseReceiptJobAppService.cs

@ -253,6 +253,8 @@ public class PurchaseReceiptJobAppService :
newDetail.HandledQty = detail.HandledQty > 0 ? input.ToQty : 0; newDetail.HandledQty = detail.HandledQty > 0 ? input.ToQty : 0;
//newDetail.CreationTime = CommonHelper.CurTime; //newDetail.CreationTime = CommonHelper.CurTime;
newDetail.PurchaseReceiptInspectStatus = EnumPurchaseReceiptInspect.INSP; //俊城沟通,改成 未扫描 newDetail.PurchaseReceiptInspectStatus = EnumPurchaseReceiptInspect.INSP; //俊城沟通,改成 未扫描
decimal maxPoLine = job.Details.Max(itm => itm.PoLine.TryToDecimalZero());
newDetail.PoLine = (maxPoLine + 1).ToString(); //行号自增
job.Details.Add(newDetail); job.Details.Add(newDetail);
//修改源箱 //修改源箱
detail.RecommendQty = input.FromQty - input.ToQty; detail.RecommendQty = input.FromQty - input.ToQty;

4
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/InventoryInitialNotes/InventoryInitialNoteAppService.cs

@ -61,6 +61,10 @@ public class InventoryInitialNoteAppService :
request.ActiveDate = DateTime.Now; request.ActiveDate = DateTime.Now;
foreach (var detail in request.Details) foreach (var detail in request.Details)
{ {
if (string.IsNullOrEmpty(detail.PackingCode))
{
detail.PackingCode = "";
}
var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false);
CheckItemBasic(itemBasicDto, detail.ItemCode); CheckItemBasic(itemBasicDto, detail.ItemCode);
detail.ItemDesc1 = itemBasicDto.Desc1; detail.ItemDesc1 = itemBasicDto.Desc1;

9
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReceiptNotes/PurchaseReceiptNoteAppService.cs

@ -118,8 +118,15 @@ public class PurchaseReceiptNoteAppService :
public virtual async Task<List<PurchaseReceiptNoteDetailDTO>> GetDetailListByNoReceiptAsync(Guid id) public virtual async Task<List<PurchaseReceiptNoteDetailDTO>> GetDetailListByNoReceiptAsync(Guid id)
{ {
var entity = await _repository.FindAsync(p => p.Id == id).ConfigureAwait(false); var entity = await _repository.FindAsync(p => p.Id == id).ConfigureAwait(false);
return ObjectMapper.Map<List<PurchaseReceiptNoteDetail>, List<PurchaseReceiptNoteDetailDTO>>(entity.Details
var purchaseReceiptNoteDetailDTOS= ObjectMapper.Map<List<PurchaseReceiptNoteDetail>, List<PurchaseReceiptNoteDetailDTO>>(entity.Details
.Where(p => p.PurchaseReceiptInspectStatus == EnumPurchaseReceiptInspect.NORECEIPT).ToList()); .Where(p => p.PurchaseReceiptInspectStatus == EnumPurchaseReceiptInspect.NORECEIPT).ToList());
foreach(var item in purchaseReceiptNoteDetailDTOS)
{
item.Qty = item.RecommendQty - item.HandledQty;
}
return purchaseReceiptNoteDetailDTOS;
} }
/// <summary> /// <summary>

8
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/DeliverRequests/DeliverRequestAppService.cs

@ -72,6 +72,14 @@ IItemBasicAppService itemBasicAppService)
{ {
throw new UserFriendlyException($"同一发货类型、发货时间、客户的存在相同零件号!"); throw new UserFriendlyException($"同一发货类型、发货时间、客户的存在相同零件号!");
} }
if(request.DeliverRequestType== EnumDeliverRequestType.FIS)
{
request.DeliverPlanNumber = request.Details.First().MesDeliveryNo;
}
else if (request.DeliverRequestType == EnumDeliverRequestType.Normal)
{
request.DeliverPlanNumber = request.Details.First().MesDeliveryPlan;
}
foreach (var detail in request.Details) foreach (var detail in request.Details)
{ {
var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false);

85
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/InjectionPlanRequests/InjectionPlanRequestAppService.cs

@ -5,7 +5,10 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Domain.Repositories;
using Win_in.Sfs.Basedata.Application;
using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Basedata.Domain;
using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Application.Contracts;
@ -30,7 +33,8 @@ public class InjectionPlanRequestAppService : SfsStoreRequestAppServiceBase<Inje
private readonly ILocationAppService _locationAppService; private readonly ILocationAppService _locationAppService;
private readonly IItemBasicAppService _itemBasicAppService; private readonly IItemBasicAppService _itemBasicAppService;
private readonly IItemContainerAppService _itemContainerAppService; private readonly IItemContainerAppService _itemContainerAppService;
private readonly IProductionLineAppService _productionLineAppService;
private readonly ICoatingIssueRequestAppService _coatingIssueRequestAppService;
private readonly ITransactionTypeAppService _transactionTypeAppService; private readonly ITransactionTypeAppService _transactionTypeAppService;
public InjectionPlanRequestAppService( public InjectionPlanRequestAppService(
@ -39,6 +43,8 @@ public class InjectionPlanRequestAppService : SfsStoreRequestAppServiceBase<Inje
ILocationAppService locationAppService, ILocationAppService locationAppService,
IItemBasicAppService itemBasicAppService, IItemBasicAppService itemBasicAppService,
IItemContainerAppService itemContainerAppService, IItemContainerAppService itemContainerAppService,
IProductionLineAppService productionLineAppService,
ICoatingIssueRequestAppService coatingIssueRequestAppService,
ITransactionTypeAppService transactionTypeAppService ITransactionTypeAppService transactionTypeAppService
) )
: base(repository, injectionRequestManager) : base(repository, injectionRequestManager)
@ -47,6 +53,8 @@ public class InjectionPlanRequestAppService : SfsStoreRequestAppServiceBase<Inje
_locationAppService = locationAppService; _locationAppService = locationAppService;
_itemBasicAppService = itemBasicAppService; _itemBasicAppService = itemBasicAppService;
_itemContainerAppService = itemContainerAppService; _itemContainerAppService = itemContainerAppService;
_productionLineAppService = productionLineAppService;
_coatingIssueRequestAppService = coatingIssueRequestAppService;
_transactionTypeAppService = transactionTypeAppService; _transactionTypeAppService = transactionTypeAppService;
} }
@ -56,8 +64,8 @@ public class InjectionPlanRequestAppService : SfsStoreRequestAppServiceBase<Inje
return null; return null;
} }
[HttpPost("")] [HttpPost("create-and-handle")]
public override async Task<InjectionPlanRequestDTO> CreateAsync(InjectionPlanRequestEditInput input) public async Task<CoatingIssueRequestDTO> CreateAndHandleAsync(InjectionPlanRequestEditInput input)
{ {
foreach (var item in input.Details) foreach (var item in input.Details)
{ {
@ -67,53 +75,56 @@ public class InjectionPlanRequestAppService : SfsStoreRequestAppServiceBase<Inje
} }
} }
foreach (var detailInput in input.Details) //赋值生产线 input.IssueRequestType = EnumIssueRequestType.InjectionPlan;
foreach (var detailInput in input.Details)
{ {
var toLocationDto = var toLocationDto =
await _locationAppService.GetByCodeAsync(detailInput.ToLocationCode).ConfigureAwait(false); await _locationAppService.GetByCodeAsync(detailInput.ToLocationCode).ConfigureAwait(false);
CheckLocation(toLocationDto, detailInput.ToLocationCode); CheckLocation(toLocationDto, detailInput.ToLocationCode);
var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detailInput.ItemCode).ConfigureAwait(false); var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detailInput.ItemCode).ConfigureAwait(false);
CheckItemBasic(itemBasicDto, detailInput.ItemCode); CheckItemBasic(itemBasicDto, detailInput.ItemCode);
var productionLineDto = await _productionLineAppService.GetByLocationCodeAsync(detailInput.ToLocationCode)
.ConfigureAwait(false);
CheckProductionLine(productionLineDto, detailInput.ProdLine);
//var positionCodeDto = await _positionCodeRepository.FirstOrDefaultAsync(p => p.PartCode == detailInput.ItemCode && p.LocationCode == detailInput.ToLocationCode).ConfigureAwait(false);
detailInput.ProdLine = productionLineDto.Code;
detailInput.ToLocationArea = toLocationDto.AreaCode; detailInput.ToLocationArea = toLocationDto.AreaCode;
detailInput.ToLocationGroup = toLocationDto.LocationGroupCode; detailInput.ToLocationGroup = toLocationDto.LocationGroupCode;
detailInput.ToWarehouseCode = toLocationDto.WarehouseCode; detailInput.ToWarehouseCode = toLocationDto.WarehouseCode;
detailInput.ProdLine = detailInput.ToLocationCode;
detailInput.ToLocationErpCode = toLocationDto.ErpLocationCode; detailInput.ToLocationErpCode = toLocationDto.ErpLocationCode;
detailInput.ItemDesc1 = itemBasicDto.Desc1; detailInput.ItemDesc1 = itemBasicDto.Desc1;
detailInput.ItemDesc2 = itemBasicDto.Desc2; detailInput.ItemDesc2 = itemBasicDto.Desc2;
detailInput.ItemName = itemBasicDto.Name; detailInput.ItemName = itemBasicDto.Name;
detailInput.StdPackQty = itemBasicDto.StdPackQty;
var itemContainerDto = await _itemContainerAppService.GetListByItemCodeAsync(detailInput.ItemCode)
.ConfigureAwait(false); //var itemContainerDto = await _itemContainerAppService.GetByItemCodeAsync(detailInput.ItemCode).ConfigureAwait(false);
if (itemContainerDto.Count > 0)
{ //if (itemContainerDto != null)
detailInput.Uom = itemContainerDto[0].BasicUom; //{
detailInput.Qty = itemContainerDto[0].Qty; // detailInput.Uom = itemContainerDto.BasicUom;
detailInput.StdPackQty = itemBasicDto.StdPackQty; // detailInput.Qty = itemContainerDto.Qty;
} // detailInput.BoxQty = itemContainerDto.Qty;
else // detailInput.StdPackQty = itemBasicDto.StdPackQty;
{ //}
detailInput.Uom = itemBasicDto.BasicUom; //else
detailInput.StdPackQty = itemBasicDto.StdPackQty; //{
detailInput.Qty = itemBasicDto.StdPackQty; // throw new UserFriendlyException($"ERP料号【{detailInput.ItemCode}】未配置收容数");
} //}
detailInput.Status = EnumStatus.Open; detailInput.Status = EnumStatus.Open;
//因为是刚创建的 所以发料数一定是0
detailInput.IssuedQty = 0; detailInput.IssuedQty = 0;
detailInput.RecommendType = EnumRecommendType.None;
} }
await SetRequestAutoPropertiesAsync(input).ConfigureAwait(false); await SetRequestAutoPropertiesAsync(input).ConfigureAwait(false);
var entity = ObjectMapper.Map<InjectionPlanRequestEditInput, InjectionPlanRequest>(input); var entity = ObjectMapper.Map<InjectionPlanRequestEditInput, CoatingIssueRequestEditInput>(input);
var coatingIssueRequestDto = await _coatingIssueRequestAppService.CreateAndHandleAsync(entity).ConfigureAwait(false);
var result = await _injectionRequestManager.CreateByNumberAsync(entity).ConfigureAwait(false);
var dto = ObjectMapper.Map<InjectionPlanRequest, InjectionPlanRequestDTO>(result); return coatingIssueRequestDto;
return dto;
} }
/// <summary> /// <summary>
@ -133,16 +144,6 @@ public class InjectionPlanRequestAppService : SfsStoreRequestAppServiceBase<Inje
entity.DirectCreateNote = tranType.DirectCreateNote; entity.DirectCreateNote = tranType.DirectCreateNote;
} }
[HttpPost("create-and-handle")]
public async Task<InjectionPlanRequestDTO> CreateAndHandleAsync(InjectionPlanRequestEditInput input)
{
var injectionRequestDto = await CreateAsync(input).ConfigureAwait(false);
await HandleAsync(injectionRequestDto.Id).ConfigureAwait(false);
return injectionRequestDto;
}
/// <summary> /// <summary>
/// 获取物品类别列表 /// 获取物品类别列表
/// </summary> /// </summary>
@ -210,5 +211,13 @@ public class InjectionPlanRequestAppService : SfsStoreRequestAppServiceBase<Inje
} }
} }
private void CheckProductionLine(ProductionLineDTO productionLineDto, string productionCode)
{
if (productionLineDto == null)
{
throw new UserFriendlyException($"未找到生产线【{productionCode}】");
}
}
#endregion #endregion
} }

6
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/InjectionPlanRequests/InjectionPlanRequestAutoMapperProfile.cs

@ -10,6 +10,12 @@ public partial class StoreApplicationAutoMapperProfile : Profile
{ {
private void InjectionPlanRequestAutoMapperProfile() private void InjectionPlanRequestAutoMapperProfile()
{ {
CreateMap<InjectionPlanRequestEditInput, CoatingIssueRequestEditInput>()
;
CreateMap<InjectionPlanRequestDetailInput, CoatingIssueRequestDetailInput>()
;
CreateMap<InjectionPlanRequest, InjectionPlanRequestDTO>() CreateMap<InjectionPlanRequest, InjectionPlanRequestDTO>()
.ReverseMap(); .ReverseMap();

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/AssembleIssueRequests/AssembleIssueRequestAppService.cs

@ -188,7 +188,7 @@ public class AssembleIssueRequestAppService : SfsStoreRequestAppServiceBase<Asse
if (assembleIssueJobDtos.Any(p => if (assembleIssueJobDtos.Any(p =>
p.JobStatus == EnumJobStatus.Open || p.JobStatus == EnumJobStatus.Doing || p.JobStatus == EnumJobStatus.Open || p.JobStatus == EnumJobStatus.Doing ||
p.JobStatus == EnumJobStatus.Partial)) p.JobStatus == EnumJobStatus.Partial||p.JobStatus== EnumJobStatus.Wait))
{ {
return; return;
} }

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/CoatingIssueRequests/CoatingIssueRequestAppService.cs

@ -188,7 +188,7 @@ public class CoatingIssueRequestAppService : SfsStoreRequestAppServiceBase<Coati
if (coatingIssueJobDtos.Any(p => if (coatingIssueJobDtos.Any(p =>
p.JobStatus == EnumJobStatus.Open || p.JobStatus == EnumJobStatus.Doing || p.JobStatus == EnumJobStatus.Open || p.JobStatus == EnumJobStatus.Doing ||
p.JobStatus == EnumJobStatus.Partial)) p.JobStatus == EnumJobStatus.Partial|| p.JobStatus== EnumJobStatus.Wait))
{ {
return; return;
} }

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAppService.cs

@ -188,7 +188,7 @@ public class InjectionIssueRequestAppService : SfsStoreRequestAppServiceBase<Inj
if (injectionIssueJobDtos.Any(p => if (injectionIssueJobDtos.Any(p =>
p.JobStatus == EnumJobStatus.Open || p.JobStatus == EnumJobStatus.Doing || p.JobStatus == EnumJobStatus.Open || p.JobStatus == EnumJobStatus.Doing ||
p.JobStatus == EnumJobStatus.Partial)) p.JobStatus == EnumJobStatus.Partial|| p.JobStatus== EnumJobStatus.Wait))
{ {
return; return;
} }

10
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/KittingIssueRequests/KittingIssueRequestAppService.cs

@ -179,11 +179,11 @@ public class KittingIssueRequestAppService : SfsStoreRequestAppServiceBase<Kitti
} }
[HttpPost("UpdateStatusCompleted")] [HttpPost("UpdateStatusCompleted")]
public async Task UpdateStatusCompletedAsync(string number) public async Task UpdateStatusCompletedAsync(string number,string jobNumber)
{ {
var kittingIssueRequest = await _repository.FindAsync(p => p.Number == number).ConfigureAwait(false); var kittingIssueRequest = await _repository.FindAsync(p => p.Number == number).ConfigureAwait(false);
await UpdateKittingIssueRequestDetailQtyAsync(kittingIssueRequest, new EditableList<KittingIssueJobDTO>()) await UpdateKittingIssueRequestDetailQtyAsync(kittingIssueRequest, jobNumber, new EditableList<KittingIssueJobDTO>())
.ConfigureAwait(false); .ConfigureAwait(false);
var kittingIssueJobDtos = await _kittingIssueJobAppService.GetByRequestNumberAsync(kittingIssueRequest.Number) var kittingIssueJobDtos = await _kittingIssueJobAppService.GetByRequestNumberAsync(kittingIssueRequest.Number)
@ -191,7 +191,7 @@ public class KittingIssueRequestAppService : SfsStoreRequestAppServiceBase<Kitti
if (kittingIssueJobDtos.Any(p => if (kittingIssueJobDtos.Any(p =>
p.JobStatus == EnumJobStatus.Open || p.JobStatus == EnumJobStatus.Doing || p.JobStatus == EnumJobStatus.Open || p.JobStatus == EnumJobStatus.Doing ||
p.JobStatus == EnumJobStatus.Partial)) p.JobStatus == EnumJobStatus.Partial||p.JobStatus== EnumJobStatus.Wait))
{ {
return; return;
} }
@ -281,7 +281,7 @@ public class KittingIssueRequestAppService : SfsStoreRequestAppServiceBase<Kitti
/// <param name="kittingIssueRequest"></param> /// <param name="kittingIssueRequest"></param>
/// <param name="addKittingIssueJobDtos"></param> /// <param name="addKittingIssueJobDtos"></param>
/// <returns></returns> /// <returns></returns>
private async Task UpdateKittingIssueRequestDetailQtyAsync(KittingIssueRequest kittingIssueRequest, private async Task UpdateKittingIssueRequestDetailQtyAsync(KittingIssueRequest kittingIssueRequest,string jobNumber,
List<KittingIssueJobDTO> addKittingIssueJobDtos) List<KittingIssueJobDTO> addKittingIssueJobDtos)
{ {
//原有任务 //原有任务
@ -322,7 +322,7 @@ public class KittingIssueRequestAppService : SfsStoreRequestAppServiceBase<Kitti
} }
await _repository.UpdateAsync(kittingIssueRequest).ConfigureAwait(false); await _repository.UpdateAsync(kittingIssueRequest).ConfigureAwait(false);
await _tranferLibRequestAppService.CancelByCallRequestNumberAsync(kittingIssueRequest.Number).ConfigureAwait(false); await _tranferLibRequestAppService.CancelByCallRequestNumberAsync(jobNumber).ConfigureAwait(false);
} }
#endregion #endregion

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/SparePartIssueRequests/SparePartIssueRequestAppService.cs

@ -184,7 +184,7 @@ public class SparePartIssueRequestAppService : SfsStoreRequestAppServiceBase<Spa
if (sparePartIssueJobDtos.Any(p => if (sparePartIssueJobDtos.Any(p =>
p.JobStatus == EnumJobStatus.Open || p.JobStatus == EnumJobStatus.Doing || p.JobStatus == EnumJobStatus.Open || p.JobStatus == EnumJobStatus.Doing ||
p.JobStatus == EnumJobStatus.Partial)) p.JobStatus == EnumJobStatus.Partial|| p.JobStatus== EnumJobStatus.Wait))
{ {
return; return;
} }

43
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestAppService.cs

@ -30,16 +30,20 @@ public class PurchaseReceiptRequestAppService :
{ {
private readonly IPurchaseReceiptRequestManager _purchaseReceiptRequestManager; private readonly IPurchaseReceiptRequestManager _purchaseReceiptRequestManager;
private readonly ISplitPackingRecAppService _splitPackingRecAppService;
public PurchaseReceiptRequestAppService( public PurchaseReceiptRequestAppService(
IPurchaseReceiptRequestRepository repository, IPurchaseReceiptRequestRepository repository,
IPurchaseReceiptRequestManager purchaseReceiptRequestManager IPurchaseReceiptRequestManager purchaseReceiptRequestManager,
) : base(repository, purchaseReceiptRequestManager) ISplitPackingRecAppService splitPackingRecAppService) : base(repository, purchaseReceiptRequestManager)
{ {
_purchaseReceiptRequestManager = purchaseReceiptRequestManager; _purchaseReceiptRequestManager = purchaseReceiptRequestManager;
base.CreatePolicyName = PurchaseReceiptRequestPermissions.Create; base.CreatePolicyName = PurchaseReceiptRequestPermissions.Create;
base.UpdatePolicyName = PurchaseReceiptRequestPermissions.Update; base.UpdatePolicyName = PurchaseReceiptRequestPermissions.Update;
base.DeletePolicyName = PurchaseReceiptRequestPermissions.Delete; base.DeletePolicyName = PurchaseReceiptRequestPermissions.Delete;
_splitPackingRecAppService = splitPackingRecAppService;
} }
#region 东阳使用 #region 东阳使用
@ -88,6 +92,39 @@ public class PurchaseReceiptRequestAppService :
} }
} }
/// <summary>
/// 【获取】【收货记录详情】根据 物品 传入箱码的根箱码
/// </summary>
/// <param name="itemCode"></param>
/// <param name="packingCode"></param>
/// <returns></returns>
[HttpGet("detail-by-item-and-rootpacking")]
public virtual async Task<PurchaseReceiptRequestDetailDTO> GetDetailByItemAndRootPackingAsync(string itemCode,
string packingCode)
{
var topObj = await _splitPackingRecAppService.GetTopPackingCode(packingCode).ConfigureAwait(false);
if (topObj == null || string.IsNullOrEmpty(topObj.ToTopPackingCode))
{
throw new UserFriendlyException($"根据箱码{packingCode}到拆箱记录表中没有取到顶级箱码!");
}
var entitysList = (await _repository.GetListAsync(p => p.Details.Any(y => y.ItemCode == itemCode && y.PackingCode == topObj.ToTopPackingCode), true).ConfigureAwait(false));
if (entitysList != null && entitysList.Any())
{
var entity = entitysList.FirstOrDefault();
var detail = entity.Details.FirstOrDefault(y => y.ItemCode == itemCode && y.PackingCode == topObj.ToTopPackingCode);
var dto = ObjectMapper.Map<PurchaseReceiptRequestDetail, PurchaseReceiptRequestDetailDTO>(detail);
return dto;
}
else
{
throw new UserFriendlyException("未在到货通知中找到该箱码信息");
}
}
#endregion #endregion
@ -190,6 +227,8 @@ public class PurchaseReceiptRequestAppService :
newDetail.PackingCode = input.ToPackingCode; newDetail.PackingCode = input.ToPackingCode;
newDetail.Qty = input.ToQty; newDetail.Qty = input.ToQty;
//newDetail.CreationTime = CommonHelper.CurTime; //newDetail.CreationTime = CommonHelper.CurTime;
decimal maxPoLine = request.Details.Max(itm => itm.PoLine.TryToDecimalZero());
newDetail.PoLine = (maxPoLine + 1).ToString(); //行号自增
request.Details.Add(newDetail); request.Details.Add(newDetail);
//修改源箱 //修改源箱
detail.Qty = input.FromQty - input.ToQty; detail.Qty = input.FromQty - input.ToQty;

6
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestAppService.cs

@ -313,10 +313,10 @@ public class TransferLibRequestAppService : SfsStoreRequestAppServiceBase
#endregion #endregion
[HttpPost("Cancel-By-CallRequestNumber")] [HttpPost("Cancel-By-CallJobNumber")]
public async Task CancelByCallRequestNumberAsync(string callRequestNumber) public async Task CancelByCallRequestNumberAsync(string callJobNumber)
{ {
var list=await _repository.GetListAsync(p=>p.CallRequestNumber==callRequestNumber).ConfigureAwait(false); var list=await _repository.GetListAsync(p=>p.CallJobNumber== callJobNumber).ConfigureAwait(false);
foreach (var request in list) foreach (var request in list)
{ {
await CancelAsync(request.Id).ConfigureAwait(false); await CancelAsync(request.Id).ConfigureAwait(false);

5
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/ExchangeDatas/EnumExchangeDataType.cs

@ -33,5 +33,8 @@ public enum EnumExchangeDataType
Item_Transform = 28, Item_Transform = 28,
//半成品上架 //半成品上架
SemiPutaway = 29, SemiPutaway = 29,
/// <summary>
/// 客户退货
/// </summary>
CustomerReturn = 30,
} }

4
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/DeliverJobs/DeliverJob.cs

@ -41,6 +41,10 @@ public class DeliverJob : SfsJobAggregateRootBase<DeliverJobDetail>
/// </summary> /// </summary>
[IgnoreUpdate] [IgnoreUpdate]
public string DeliverPlanNumber { get; set; } public string DeliverPlanNumber { get; set; }
/// <summary>
/// Mes车牌号
/// </summary>
public string MesTruckNumber { get; set; }
/// <summary> /// <summary>
/// 任务明细 /// 任务明细

5
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNote.cs

@ -60,7 +60,10 @@ public class DeliverNote : SfsStoreAggregateRootBase<DeliverNoteDetail>, IHasJob
/// <returns></returns> /// <returns></returns>
[Display(Name = "打印次数")] [Display(Name = "打印次数")]
public int CountPrint { get; set; } public int CountPrint { get; set; }
/// <summary>
/// Mes车牌号
/// </summary>
public string MesTruckNumber { get; set; }
/// <summary> /// <summary>
/// 明细列表 /// 明细列表
/// </summary> /// </summary>

5
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/DeliverRequests/DeliverRequest.cs

@ -20,7 +20,6 @@ public class DeliverRequest : SfsStoreRequestAggregateRootBase<DeliverRequestDet
/// <summary> /// <summary>
/// 发货计划单号 /// 发货计划单号
/// </summary> /// </summary>
[IgnoreUpdate]
public string DeliverPlanNumber { get; set; } public string DeliverPlanNumber { get; set; }
/// <summary> /// <summary>
@ -39,6 +38,10 @@ public class DeliverRequest : SfsStoreRequestAggregateRootBase<DeliverRequestDet
/// 发货类型 /// 发货类型
/// </summary> /// </summary>
public EnumDeliverRequestType DeliverRequestType { get; set; } public EnumDeliverRequestType DeliverRequestType { get; set; }
/// <summary>
/// Mes车牌号
/// </summary>
public string MesTruckNumber { get; set; }
/// <summary> /// <summary>
/// 任务明细 /// 任务明细

1
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/DeliverJobs/DeliverJobDbContextModelCreatingExtensions.cs

@ -24,6 +24,7 @@ public static class DeliverJobDbContextModelCreatingExtensions
b.Property(q => q.DeliverRequestNumber).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.DeliverRequestNumber).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.CustomerCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.CustomerCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.CustomerAddressCode).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.CustomerAddressCode).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.MesTruckNumber).HasMaxLength(SfsPropertyConst.CodeLength);
//Relations //Relations
b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired();
//Indexes //Indexes

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/DeliverNotes/DeliverNoteDbContextModelCreatingExtensions.cs

@ -22,7 +22,7 @@ public static class DeliverNoteDbContextModelCreatingExtensions
b.Property(q => q.CustomerCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.CustomerCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.CustomerAddressCode).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.CustomerAddressCode).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.DeliverRequestType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>(); b.Property(q => q.DeliverRequestType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>();
b.Property(q => q.MesTruckNumber).HasMaxLength(SfsPropertyConst.CodeLength);
//Relations //Relations
b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired();

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/DeliverRequests/DeliverRequestDbContextModelCreatingExtensions.cs

@ -24,7 +24,7 @@ public static class DeliverRequestDbContextModelCreatingExtensions
b.Property(q => q.DeliverRequestType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>(); b.Property(q => q.DeliverRequestType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>();
b.Property(q => q.DeliverPlanNumber).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.DeliverPlanNumber).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.RequestStatus).IsRequired().HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>(); b.Property(q => q.RequestStatus).IsRequired().HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>();
b.Property(q => q.MesTruckNumber).HasMaxLength(SfsPropertyConst.CodeLength);
//Relations //Relations
b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired();

6
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/CustomerProductionReturnNoteAutoMapperProfile.cs

@ -43,6 +43,12 @@ public partial class StoreEventAutoMapperProfile : Profile
CreateMap<CustomerProductionReturnNote, CustomerProductionReturnNoteDTO>() CreateMap<CustomerProductionReturnNote, CustomerProductionReturnNoteDTO>()
.ReverseMap(); .ReverseMap();
CreateMap<CustomerProductionReturnNoteDetail, CustomerProductionReturnNoteDetailDTO>(); CreateMap<CustomerProductionReturnNoteDetail, CustomerProductionReturnNoteDetailDTO>();
CreateMap<CustomerProductionReturnNote, CustomerReturnNoteDTO>()
.ForMember(x => x.Customer, y => y.MapFrom(d => d.CustomerCode))
;
CreateMap<CustomerProductionReturnNoteDetail, CustomerReturnNoteDetailDTO>();
} }
} }

3
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ThirdLocationRequestAutoMapperProfile.cs

@ -97,6 +97,9 @@ public partial class StoreEventAutoMapperProfile : Profile
.Ignore(x => x.HandledSupplierBatch) .Ignore(x => x.HandledSupplierBatch)
.Ignore(x => x.RecommendFromLocationCode) .Ignore(x => x.RecommendFromLocationCode)
.Ignore(x => x.RecommendLot) .Ignore(x => x.RecommendLot)
.Ignore(x => x.PositionCode)
.Ignore(x => x.RecommendType)
.IgnoreIHasRecommendAndHandledFrom(); .IgnoreIHasRecommendAndHandledFrom();
CreateMap<ThirdLocationRequestDetailDTO, ThirdLocationJobDetailInput>() CreateMap<ThirdLocationRequestDetailDTO, ThirdLocationJobDetailInput>()

40
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/CustomerProductionReturnNoteEventHandler.cs

@ -0,0 +1,40 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.EventBus;
using Volo.Abp.Uow;
using Win_in.Sfs.Shared.Event;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
namespace Win_in.Sfs.Wms.Store.Event.DataExchanges;
public class CustomerProductionReturnNoteEventHandler
: StoreDataExchangeEventHandlerBase<CustomerProductionReturnNote>
, ILocalEventHandler<SfsCreatedEntityEventData<CustomerProductionReturnNote>>
, ILocalEventHandler<SfsCreatedEntityEventData<List<CustomerProductionReturnNote>>>
{
private const EnumExchangeDataType ExchangeDataType = EnumExchangeDataType.CustomerReturn;
[UnitOfWork]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<CustomerProductionReturnNote> eventData)
{
var entity = eventData.Entity;
await AddExchangeDataAsync(entity).ConfigureAwait(false);
}
[UnitOfWork]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<List<CustomerProductionReturnNote>> eventData)
{
var entities = eventData.Entity;
await AddExchangeDataAsync(entities).ConfigureAwait(false);
}
protected override async Task AddExchangeDataAsync(List<CustomerProductionReturnNote> entities)
{
var dtos = ObjectMapper.Map<List<CustomerProductionReturnNote>, List<CustomerReturnNoteDTO>>(entities);
var exchangeData = await BuildExchangeDataAsync(StoreEventConsts.WMS, StoreEventConsts.ERP, ExchangeDataType, dtos).ConfigureAwait(false);
await AddManyAsync(exchangeData).ConfigureAwait(false);
}
}

8
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/AssembleIssueNoteEventHandler.cs

@ -24,15 +24,15 @@ public class AssembleIssueNoteEventHandler
[UnitOfWork] [UnitOfWork]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<AssembleIssueNote> eventData) public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<AssembleIssueNote> eventData)
{ {
var entity = eventData.Entity; //var entity = eventData.Entity;
await AddExchangeDataAsync(entity).ConfigureAwait(false); //await AddExchangeDataAsync(entity).ConfigureAwait(false);
} }
[UnitOfWork] [UnitOfWork]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<List<AssembleIssueNote>> eventData) public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<List<AssembleIssueNote>> eventData)
{ {
var entities = eventData.Entity; //var entities = eventData.Entity;
await AddExchangeDataAsync(entities).ConfigureAwait(false); //await AddExchangeDataAsync(entities).ConfigureAwait(false);
} }
protected override async Task AddExchangeDataAsync(List<AssembleIssueNote> entities) protected override async Task AddExchangeDataAsync(List<AssembleIssueNote> entities)

8
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/CoatingIssueNoteEventHandler.cs

@ -24,15 +24,15 @@ public class CoatingIssueNoteEventHandler
[UnitOfWork] [UnitOfWork]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<CoatingIssueNote> eventData) public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<CoatingIssueNote> eventData)
{ {
var entity = eventData.Entity; //var entity = eventData.Entity;
await AddExchangeDataAsync(entity).ConfigureAwait(false); //await AddExchangeDataAsync(entity).ConfigureAwait(false);
} }
[UnitOfWork] [UnitOfWork]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<List<CoatingIssueNote>> eventData) public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<List<CoatingIssueNote>> eventData)
{ {
var entities = eventData.Entity; //var entities = eventData.Entity;
await AddExchangeDataAsync(entities).ConfigureAwait(false); //await AddExchangeDataAsync(entities).ConfigureAwait(false);
} }
protected override async Task AddExchangeDataAsync(List<CoatingIssueNote> entities) protected override async Task AddExchangeDataAsync(List<CoatingIssueNote> entities)

8
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/InjectionIssueNoteEventHandler.cs

@ -24,15 +24,15 @@ public class InjectionIssueNoteEventHandler
[UnitOfWork] [UnitOfWork]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<InjectionIssueNote> eventData) public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<InjectionIssueNote> eventData)
{ {
var entity = eventData.Entity; //var entity = eventData.Entity;
await AddExchangeDataAsync(entity).ConfigureAwait(false); //await AddExchangeDataAsync(entity).ConfigureAwait(false);
} }
[UnitOfWork] [UnitOfWork]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<List<InjectionIssueNote>> eventData) public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<List<InjectionIssueNote>> eventData)
{ {
var entities = eventData.Entity; //var entities = eventData.Entity;
await AddExchangeDataAsync(entities).ConfigureAwait(false); //await AddExchangeDataAsync(entities).ConfigureAwait(false);
} }
protected override async Task AddExchangeDataAsync(List<InjectionIssueNote> entities) protected override async Task AddExchangeDataAsync(List<InjectionIssueNote> entities)

8
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/SparePartIssueNoteEventHandler.cs

@ -24,15 +24,15 @@ public class SparePartIssueNoteEventHandler
[UnitOfWork] [UnitOfWork]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<SparePartIssueNote> eventData) public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<SparePartIssueNote> eventData)
{ {
var entity = eventData.Entity; //var entity = eventData.Entity;
await AddExchangeDataAsync(entity).ConfigureAwait(false); //await AddExchangeDataAsync(entity).ConfigureAwait(false);
} }
[UnitOfWork] [UnitOfWork]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<List<SparePartIssueNote>> eventData) public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<List<SparePartIssueNote>> eventData)
{ {
var entities = eventData.Entity; //var entities = eventData.Entity;
await AddExchangeDataAsync(entities).ConfigureAwait(false); //await AddExchangeDataAsync(entities).ConfigureAwait(false);
} }
protected override async Task AddExchangeDataAsync(List<SparePartIssueNote> entities) protected override async Task AddExchangeDataAsync(List<SparePartIssueNote> entities)

13
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/PurchaseReturnNoteEventHandler.cs

@ -3,6 +3,7 @@ using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.EventBus; using Volo.Abp.EventBus;
using Volo.Abp.Uow; using Volo.Abp.Uow;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Shared.Event;
using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Application.Contracts;
@ -16,7 +17,11 @@ public class PurchaseReturnNoteEventHandler
, ILocalEventHandler<SfsCreatedEntityEventData<List<PurchaseReturnNote>>> , ILocalEventHandler<SfsCreatedEntityEventData<List<PurchaseReturnNote>>>
{ {
private const EnumExchangeDataType ExchangeDataType = EnumExchangeDataType.PurchaseReturn; private const EnumExchangeDataType ExchangeDataType = EnumExchangeDataType.PurchaseReturn;
private readonly ISplitPackingRecAppService _splitPackingRecAppService;
public PurchaseReturnNoteEventHandler(ISplitPackingRecAppService splitPackingRecAppService)
{
_splitPackingRecAppService = splitPackingRecAppService;
}
[UnitOfWork] [UnitOfWork]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<PurchaseReturnNote> eventData) public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<PurchaseReturnNote> eventData)
{ {
@ -37,6 +42,12 @@ public class PurchaseReturnNoteEventHandler
foreach (var detail in dtos.SelectMany(dto => dto.Details)) foreach (var detail in dtos.SelectMany(dto => dto.Details))
{ {
await detail.TrySetLocationAsync(LocationAclService, detail.LocationCode).ConfigureAwait(false); await detail.TrySetLocationAsync(LocationAclService, detail.LocationCode).ConfigureAwait(false);
var packingCode=await _splitPackingRecAppService.GetTopPackingCode(detail.PackingCode).ConfigureAwait(false);
detail.Remark = string.Empty;
if (!string.IsNullOrEmpty(packingCode?.FromTopPackingCode) &&detail.PackingCode!= packingCode?.FromTopPackingCode)
{
detail.Remark=packingCode.FromTopPackingCode;
}
} }
//2023-12-6上架前退货不传入接口 //2023-12-6上架前退货不传入接口

23
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/PutawayNoteEventHandler.cs

@ -2,8 +2,10 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.VisualBasic; using Microsoft.VisualBasic;
using Org.BouncyCastle.Crypto.Prng.Drbg;
using Volo.Abp.EventBus; using Volo.Abp.EventBus;
using Volo.Abp.Uow; using Volo.Abp.Uow;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Shared.Event;
using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Application.Contracts;
@ -17,7 +19,11 @@ public class PutawayNoteEventHandler
, ILocalEventHandler<SfsCreatedEntityEventData<List<PutawayNote>>> , ILocalEventHandler<SfsCreatedEntityEventData<List<PutawayNote>>>
{ {
private const EnumExchangeDataType ExchangeDataType = EnumExchangeDataType.Putaway; private const EnumExchangeDataType ExchangeDataType = EnumExchangeDataType.Putaway;
private readonly ISplitPackingRecAppService _splitPackingRecAppService;
public PutawayNoteEventHandler(ISplitPackingRecAppService splitPackingRecAppService)
{
_splitPackingRecAppService=splitPackingRecAppService;
}
[UnitOfWork] [UnitOfWork]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<PutawayNote> eventData) public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<PutawayNote> eventData)
{ {
@ -41,7 +47,16 @@ public class PutawayNoteEventHandler
} }
//采购上架 //采购上架
var putaway_Purchase = entities.Where(p => p.Type == EnumPutawayType.PurchasePutaway).ToList(); var putaway_Purchase = dtos.Where(p => p.Type == EnumPutawayType.PurchasePutaway).ToList();
foreach (var item in putaway_Purchase.SelectMany(dto => dto.Details))
{
var packingCode = await _splitPackingRecAppService.GetTopPackingCode(item.ToPackingCode).ConfigureAwait(false);
item.Remark = string.Empty;
if (!string.IsNullOrEmpty(packingCode?.FromTopPackingCode) && item.ToPackingCode != packingCode?.FromTopPackingCode)
{
item.Remark = packingCode.FromTopPackingCode;
}
}
if (putaway_Purchase.Count > 0) if (putaway_Purchase.Count > 0)
{ {
var exchangeData_Purchase = var exchangeData_Purchase =
@ -56,10 +71,10 @@ public class PutawayNoteEventHandler
} }
//半成品上架 //半成品上架
var putaway_Semi_temp = entities.Where(p => p.Type == EnumPutawayType.SemiPutaway).ToList(); var putaway_Semi_temp = dtos.Where(p => p.Type == EnumPutawayType.SemiPutaway).ToList();
foreach (var putawayNoteTemp in putaway_Semi_temp) foreach (var putawayNoteTemp in putaway_Semi_temp)
{ {
var putawayNoteDetails= new List<PutawayNoteDetail>(); var putawayNoteDetails= new List<PutawayNoteDetailDTO>();
foreach (var putawayNoteDetail_temp in putawayNoteTemp.Details) foreach (var putawayNoteDetail_temp in putawayNoteTemp.Details)
{ {

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InjectionPlanJobEventHandler.cs

@ -202,7 +202,7 @@ public class InjectionPlanJobEventHandler :
} }
/// <summary> /// <summary>
/// 判断是不是在最底层 如果不是则把状态变更为 /// 判断是不是在最底层 如果不是则把状态变更为待库移
/// </summary> /// </summary>
/// <param name="injectionJob"></param> /// <param name="injectionJob"></param>
/// <returns></returns> /// <returns></returns>

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/AssembleIssueJobEventHandler.cs

@ -214,7 +214,7 @@ public class AssembleIssueJobEventHandler :
} }
/// <summary> /// <summary>
/// 判断是不是在最底层 如果不是则把状态变更为 /// 判断是不是在最底层 如果不是则把状态变更为待库移
/// </summary> /// </summary>
/// <param name="assembleIssueJob"></param> /// <param name="assembleIssueJob"></param>
/// <returns></returns> /// <returns></returns>

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/CoatingIssueJobEventHandler.cs

@ -214,7 +214,7 @@ public class CoatingIssueJobEventHandler :
} }
/// <summary> /// <summary>
/// 判断是不是在最底层 如果不是则把状态变更为 /// 判断是不是在最底层 如果不是则把状态变更为待库移
/// </summary> /// </summary>
/// <param name="coatingIssueJob"></param> /// <param name="coatingIssueJob"></param>
/// <returns></returns> /// <returns></returns>

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/InjectionIssueJobEventHandler.cs

@ -213,7 +213,7 @@ public class InjectionIssueJobEventHandler :
} }
/// <summary> /// <summary>
/// 判断是不是在最底层 如果不是则把状态变更为 /// 判断是不是在最底层 如果不是则把状态变更为待库移
/// </summary> /// </summary>
/// <param name="injectionIssueJob"></param> /// <param name="injectionIssueJob"></param>
/// <returns></returns> /// <returns></returns>

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/KittingIssueJobEventHandler.cs

@ -213,7 +213,7 @@ public class KittingIssueJobEventHandler :
} }
/// <summary> /// <summary>
/// 判断是不是在最底层 如果不是则把状态变更为 /// 判断是不是在最底层 如果不是则把状态变更为待库移
/// </summary> /// </summary>
/// <param name="kittingIssueJob"></param> /// <param name="kittingIssueJob"></param>
/// <returns></returns> /// <returns></returns>

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/Issue/SparePartIssueJobEventHandler.cs

@ -213,7 +213,7 @@ public class SparePartIssueJobEventHandler :
} }
/// <summary> /// <summary>
/// 判断是不是在最底层 如果不是则把状态变更为 /// 判断是不是在最底层 如果不是则把状态变更为待库移
/// </summary> /// </summary>
/// <param name="sparePartIssueJob"></param> /// <param name="sparePartIssueJob"></param>
/// <returns></returns> /// <returns></returns>

Loading…
Cancel
Save