唐明亮 2 years ago
parent
commit
485a314304
  1. 1
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/PlanReader.cs
  2. 13
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Outgoing/ArriveConverter.cs
  3. 2
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/ItemBasicConverter.cs
  4. 21
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/ItemBasicReader.cs
  5. 4
      be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/ItemBasic/ItemBasicExchangeDto.cs
  6. 6
      be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/PurchaseOrder/PurchaseOrderDetailExchangeDto.cs
  7. 5
      be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/Win_in.Sfs.Wms.DataExchange.Application.Contracts.xml
  8. 10
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs
  9. 3
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Items/ItemBasicEfCoreRepository.cs
  10. 5
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountJobManager.cs
  11. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Orders/PurchaseOrders/PurchaseOrderManager.cs
  12. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/CountJobEventHandler.cs
  13. 13
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Orders/PurchaseOrderEventHandler.cs

1
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/Incoming/PlanReader.cs

@ -132,6 +132,7 @@ public class PlanReader : IReader
? EnumOrderStatus.Open ? EnumOrderStatus.Open
: EnumOrderStatus.Close, : EnumOrderStatus.Close,
Remark = plan.PlanMemo, Remark = plan.PlanMemo,
Lot="",
// PoLine = "", // PoLine = "",
// SupplierPackUom = plan.Unit, // SupplierPackUom = plan.Unit,
// SupplierPackQty = plan.Qty, // SupplierPackQty = plan.Qty,

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

@ -1,8 +1,10 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text.Json; using System.Text.Json;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.ObjectMapping; using Volo.Abp.ObjectMapping;
using Win_in.Sfs.Label.Application.Contracts;
using Win_in.Sfs.Wms.DataExchange.Domain; using Win_in.Sfs.Wms.DataExchange.Domain;
using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.EOS; using Win_in.Sfs.Wms.DataExchange.Domain.Fawtyg.EOS;
using Win_in.Sfs.Wms.DataExchange.Domain.Shared; using Win_in.Sfs.Wms.DataExchange.Domain.Shared;
@ -17,6 +19,7 @@ public class ArriveConverter : IOutgoingConverter
private readonly IOutgoingToExternalManager _outgoingToExternalManager; private readonly IOutgoingToExternalManager _outgoingToExternalManager;
private readonly ISupplierAsnAppService _supplierAsnAppService; private readonly ISupplierAsnAppService _supplierAsnAppService;
private readonly IObjectMapper _objectMapper; private readonly IObjectMapper _objectMapper;
private readonly IInventoryLabelAppService _inventoryLabelAppService;
public ArriveConverter( public ArriveConverter(
@ -24,8 +27,10 @@ public class ArriveConverter : IOutgoingConverter
, IOutgoingToExternalManager outgoingToExternalManager , IOutgoingToExternalManager outgoingToExternalManager
, ISupplierAsnAppService supplierAsnAppService , ISupplierAsnAppService supplierAsnAppService
, IObjectMapper objectMapper , IObjectMapper objectMapper
, IInventoryLabelAppService inventoryLabelAppService
) )
{ {
_inventoryLabelAppService = inventoryLabelAppService;
_outgoingFromWmsManager = outgoingFromWmsManager; _outgoingFromWmsManager = outgoingFromWmsManager;
_outgoingToExternalManager = outgoingToExternalManager; _outgoingToExternalManager = outgoingToExternalManager;
_supplierAsnAppService = supplierAsnAppService; _supplierAsnAppService = supplierAsnAppService;
@ -60,6 +65,12 @@ public class ArriveConverter : IOutgoingConverter
var exchangeReceipt = await BuildPutawayExchangeDtoAsync(wmsReceipt, detail).ConfigureAwait(false); var exchangeReceipt = await BuildPutawayExchangeDtoAsync(wmsReceipt, detail).ConfigureAwait(false);
outgoingToExternal.SourceDataContent = JsonSerializer.Serialize(exchangeReceipt); outgoingToExternal.SourceDataContent = JsonSerializer.Serialize(exchangeReceipt);
var arrive = BuildArrive(exchangeReceipt); var arrive = BuildArrive(exchangeReceipt);
var label = await _inventoryLabelAppService.GetByCodeAsync(arrive.DetailMatNo).ConfigureAwait(false);
if (label != null)
{
arrive.ShipBillNo = label.AsnNumber;
}
outgoingToExternal.DestinationDataContent = JsonSerializer.Serialize(arrive); outgoingToExternal.DestinationDataContent = JsonSerializer.Serialize(arrive);
outgoingToExternalList.Add(outgoingToExternal); outgoingToExternalList.Add(outgoingToExternal);
@ -87,7 +98,7 @@ public class ArriveConverter : IOutgoingConverter
DocNo = exchangeReceipt.Number, DocNo = exchangeReceipt.Number,
DetailMatNo = detail.ToPackingCode, DetailMatNo = detail.ToPackingCode,
ERP = detail.ItemCode, ERP = detail.ItemCode,
Qty = detail.ShippedQty, Qty = detail.Qty,
HgQty = detail.Qty, HgQty = detail.Qty,
ProductDate = detail.ProduceDate, ProductDate = detail.ProduceDate,
ProductBatch = detail.ToLot, ProductBatch = detail.ToLot,

2
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/ItemBasicConverter.cs

@ -7,6 +7,7 @@ using Microsoft.Extensions.Logging;
using Volo.Abp.Guids; using Volo.Abp.Guids;
using Volo.Abp.ObjectMapping; using Volo.Abp.ObjectMapping;
using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.DataExchange.Domain; using Win_in.Sfs.Wms.DataExchange.Domain;
using Win_in.Sfs.Wms.DataExchange.WMS.ItemBasic; using Win_in.Sfs.Wms.DataExchange.WMS.ItemBasic;
@ -69,6 +70,7 @@ public class ItemBasicConverter : IIncomingConverter
incomingToWms.SetEffectiveDate(item.EffectiveDate); incomingToWms.SetEffectiveDate(item.EffectiveDate);
var exchangeItemBasicRequest = JsonSerializer.Deserialize<ItemBasicExchangeDto>(item.DestinationDataContent); var exchangeItemBasicRequest = JsonSerializer.Deserialize<ItemBasicExchangeDto>(item.DestinationDataContent);
var wmsMaterialRequest = _objectMapper.Map<ItemBasicExchangeDto, ItemBasicEditInput>(exchangeItemBasicRequest); var wmsMaterialRequest = _objectMapper.Map<ItemBasicExchangeDto, ItemBasicEditInput>(exchangeItemBasicRequest);
wmsMaterialRequest.ValidityUnit = EnumValidityUnit.Infinite;
incomingToWms.DataContent = JsonSerializer.Serialize(wmsMaterialRequest); incomingToWms.DataContent = JsonSerializer.Serialize(wmsMaterialRequest);
incomingToWmsList.Add(incomingToWms); incomingToWmsList.Add(incomingToWms);
} }

21
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Incoming/ItemBasicReader.cs

@ -121,25 +121,6 @@ public class ItemBasicReader : IReader
catch (Exception) catch (Exception)
{ {
} }
string type = "";
switch (product.mes_product_code)
{
case "10C01":
type = "成品";
break;
case "10C02":
type = "成品";
break;
case "10C03":
type = "物料";
break;
case "10C04":
type = "半成品";
break;
default:
type = "无";
break;
}
var itemBasicRequest = new ItemBasicExchangeDto() var itemBasicRequest = new ItemBasicExchangeDto()
{ {
@ -157,7 +138,7 @@ public class ItemBasicReader : IReader
IsRecycled = product.mes_product_mfg == "10406" ? true : false, //10406 回收 IsRecycled = product.mes_product_mfg == "10406" ? true : false, //10406 回收
#endregion #endregion
Type = type,//10C01成品、10C02原料、10C03物料、10C04半成品 Type = product.mes_product_code,//10C01成品、10C02原料、10C03物料、10C04半成品
Configuration = product.mes_product_spec, Configuration = product.mes_product_spec,
BasicUom = product.mes_product_unit, BasicUom = product.mes_product_unit,
AbcClass = "", AbcClass = "",

4
be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/ItemBasic/ItemBasicExchangeDto.cs

@ -89,13 +89,13 @@ public class ItemBasicExchangeDto
ItemBasicExchangeDto itembasic = obj as ItemBasicExchangeDto; ItemBasicExchangeDto itembasic = obj as ItemBasicExchangeDto;
return Code == itembasic.Code && Desc1 == itembasic.Desc1 && Desc2 == itembasic.Desc2 && Configuration == itembasic.Configuration && Type == itembasic.Type && return Code == itembasic.Code && Desc1 == itembasic.Desc1 && Desc2 == itembasic.Desc2 && Configuration == itembasic.Configuration && Type == itembasic.Type &&
CanMake == itembasic.CanMake && CanBuy == itembasic.CanBuy && CanOutsourcing == itembasic.CanOutsourcing && IsRecycled == itembasic.IsRecycled && CanMake == itembasic.CanMake && CanBuy == itembasic.CanBuy && CanOutsourcing == itembasic.CanOutsourcing && IsRecycled == itembasic.IsRecycled &&
BasicUom == itembasic.BasicUom; BasicUom == itembasic.BasicUom&& StdPackQty==itembasic.StdPackQty;
} }
return false; return false;
} }
public override int GetHashCode() public override int GetHashCode()
{ {
return Code.GetHashCode() ^ (Desc1 == null ? 0 : Desc1.GetHashCode()) ^ (Desc2 == null ? 0 : Desc2.GetHashCode()) ^ (Configuration == null ? 0 : Configuration.GetHashCode()) ^ (Type == null ? 0 : Type.GetHashCode()) ^ CanMake.GetHashCode() ^ CanBuy.GetHashCode() ^ CanOutsourcing.GetHashCode() ^ IsRecycled.GetHashCode() ^ BasicUom.GetHashCode(); return Code.GetHashCode() ^ (Desc1 == null ? 0 : Desc1.GetHashCode()) ^ (Desc2 == null ? 0 : Desc2.GetHashCode()) ^ (Configuration == null ? 0 : Configuration.GetHashCode()) ^ (Type == null ? 0 : Type.GetHashCode()) ^ CanMake.GetHashCode() ^ CanBuy.GetHashCode() ^ CanOutsourcing.GetHashCode() ^ IsRecycled.GetHashCode() ^ BasicUom.GetHashCode() ^ StdPackQty.GetHashCode();
} }
} }

6
be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/WMS/PurchaseOrder/PurchaseOrderDetailExchangeDto.cs

@ -44,4 +44,10 @@ public class PurchaseOrderDetailExchangeDto
/// </summary> /// </summary>
[Display(Name = "备注")] [Display(Name = "备注")]
public string Remark { get; set; } public string Remark { get; set; }
/// <summary>
/// 生产批次
/// </summary>
[Display(Name = "明细-生产批次")]
public string Lot { get; set; }
} }

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

@ -941,6 +941,11 @@
备注 备注
</summary> </summary>
</member> </member>
<member name="P:Win_in.Sfs.Wms.DataExchange.WMS.PurchaseOrder.PurchaseOrderDetailExchangeDto.Lot">
<summary>
生产批次
</summary>
</member>
<member name="P:Win_in.Sfs.Wms.DataExchange.WMS.PurchaseOrder.PurchaseOrderExchangeDto.Number"> <member name="P:Win_in.Sfs.Wms.DataExchange.WMS.PurchaseOrder.PurchaseOrderExchangeDto.Number">
<summary> <summary>
订单号 订单号

10
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs

@ -286,11 +286,11 @@ public class BalanceController : AbpController
} }
} }
//if (listInput.inventoryStatuses != null && listInput.inventoryStatuses.Any()) if (listInput.inventoryStatuses != null && listInput.inventoryStatuses.Any())
//{ {
// input.Condition.Filters.Add( input.Condition.Filters.Add(
// new Filter("Status", JsonSerializer.Serialize(listInput.inventoryStatuses), "In")); new Filter("Status", JsonSerializer.Serialize(listInput.inventoryStatuses), "In"));
//} }
var balanceDTOs = await _balanceAppService.GetPagedListByFilterAsync(input, false).ConfigureAwait(false); var balanceDTOs = await _balanceAppService.GetPagedListByFilterAsync(input, false).ConfigureAwait(false);

3
be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Items/ItemBasicEfCoreRepository.cs

@ -22,11 +22,12 @@ public class ItemBasicEfCoreRepository : SfsBaseDataEfCoreRepositoryBase<Basedat
} }
else else
{ {
exist.StdPackQty=entity.StdPackQty;
exist.Name = entity.Name; exist.Name = entity.Name;
exist.Desc1 = entity.Desc1; exist.Desc1 = entity.Desc1;
exist.Desc2 = entity.Desc2; exist.Desc2 = entity.Desc2;
exist.Configuration = entity.Configuration; exist.Configuration = entity.Configuration;
entity.Type = entity.Type; exist.Type = entity.Type;
exist.BasicUom = entity.BasicUom; exist.BasicUom = entity.BasicUom;
exist.CanBuy = entity.CanBuy; exist.CanBuy = entity.CanBuy;
exist.CanMake = entity.CanMake; exist.CanMake = entity.CanMake;

5
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/CountJobs/CountJobManager.cs

@ -83,11 +83,12 @@ public class CountJobManager : SfsJobManagerBase<CountJob, CountJobDetail>, ICou
var entityDetail = entity.Details.FirstOrDefault(p => p.Id == detail.Id); var entityDetail = entity.Details.FirstOrDefault(p => p.Id == detail.Id);
//新增盘点明细 //新增盘点明细
if (entityDetail == null) if (entityDetail == null||entityDetail.Id==Guid.Empty)
{ {
var jobDetail = ObjectMapper.Map<CountJobDetail, CountJobDetail>(detail); var jobDetail = ObjectMapper.Map<CountJobDetail, CountJobDetail>(detail);
var number =await GetNumber();
jobDetail.SetIdAndNumber(GuidGenerator,entity.Id, number);
jobDetail.CountLabel = GuidGenerator.Create().ToString(); jobDetail.CountLabel = GuidGenerator.Create().ToString();
//CountJobDetail jobDetail = new CountJobDetail() { }; //CountJobDetail jobDetail = new CountJobDetail() { };

6
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Orders/PurchaseOrders/PurchaseOrderManager.cs

@ -52,9 +52,11 @@ public class PurchaseOrderManager : SfsStoreManagerBase<PurchaseOrder, PurchaseO
//接收到新的采购订单时,更新无PO收货单的PoNumber //接收到新的采购订单时,更新无PO收货单的PoNumber
//await _purchaseReceiptNoteManager.AppendPoNumberAsync(purchaseOrder).ConfigureAwait(false); //await _purchaseReceiptNoteManager.AppendPoNumberAsync(purchaseOrder).ConfigureAwait(false);
purchaseOrder.SetIdAndNumberWithDetails(GuidGenerator, purchaseOrder.Number); purchaseOrder.SetIdAndNumberWithDetails(GuidGenerator, purchaseOrder.Number);
//await PublishCreatedAsync(purchaseOrder).ConfigureAwait(false);
//不要用base.create 要不会把number覆盖 //不要用base.create 要不会把number覆盖
return await Repository.InsertAsync(purchaseOrder).ConfigureAwait(false); purchaseOrder = await Repository.InsertAsync(purchaseOrder).ConfigureAwait(false);
await PublishCreatedAsync(purchaseOrder).ConfigureAwait(false);
return purchaseOrder;
} }
/// <summary> /// <summary>

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

@ -43,7 +43,7 @@ public class CountJobEventHandler :
} }
private async Task<CountPlanEditInput> BuildCountPlanJobUpdateDTO(CountJob entity) private async Task<CountPlanEditInput> BuildCountPlanJobUpdateDTO(CountJob entity)
{ {
var countPlanUpdateInput = ObjectMapper.Map<CountJob, CountPlanEditInput>(entity); var countPlanUpdateInput = ObjectMapper.Map<CountJob, CountPlanEditInput>(entity);
foreach (var detail in countPlanUpdateInput.Details) foreach (var detail in countPlanUpdateInput.Details)

13
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Orders/PurchaseOrderEventHandler.cs

@ -125,10 +125,10 @@ public class PurchaseOrderEventHandler
foreach (var itemCode in itemCodes)//查询 foreach (var itemCode in itemCodes)//查询
{ {
var itemPackDtos = await _itemPackAppService.GetListByItemCodeAsync(itemCode).ConfigureAwait(false); //var itemPackDtos = await _itemPackAppService.GetListByItemCodeAsync(itemCode).ConfigureAwait(false);
var itemPackDto = itemPackDtos.First(); //var itemPackDto = itemPackDtos.First();
//ItemPacks.Add(itemPackDto);
var supplierItem = await _supplierItemAppService.GetBySupplierCodeAndItemCodeAsync(purchaseOrder.SupplierCode, itemCode).ConfigureAwait(false); var supplierItem = await _supplierItemAppService.GetBySupplierCodeAndItemCodeAsync(purchaseOrder.SupplierCode, itemCode).ConfigureAwait(false);
ItemPacks.Add(itemPackDto);
supplierItemDtos.Add(supplierItem); supplierItemDtos.Add(supplierItem);
} }
@ -158,7 +158,12 @@ public class PurchaseOrderEventHandler
//供应商时间窗口 //供应商时间窗口
var dayOfWeek = new List<string>() { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" }; var dayOfWeek = new List<string>() { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" };
var chineseWeek= dayOfWeek[Clock.Now.DayOfWeek.GetHashCode()]; //中文星期 var chineseWeek= dayOfWeek[Clock.Now.DayOfWeek.GetHashCode()]; //中文星期
var dateTimeWindowDto=supplierTimeWindowDtos.First(p => p.Week == chineseWeek); var dateTimeWindowDto=supplierTimeWindowDtos.FirstOrDefault(p => p.Week == chineseWeek);
if (dateTimeWindowDto == null)
{
throw new UserFriendlyException($"供应商时间窗口当前时间【{chineseWeek}】不存在");
}
supplierAsnEditInput.TimeWindow = dateTimeWindowDto.TimeSlot; supplierAsnEditInput.TimeWindow = dateTimeWindowDto.TimeSlot;
//生效日期 //生效日期

Loading…
Cancel
Save