Browse Source

bug修改

dev_DY_CC
lvzb 11 months ago
parent
commit
0c40a5d4cf
  1. 2
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutConverter.cs
  2. 2
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/TyrpAgentModule.cs
  3. 2
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/appsettings.json
  4. 3
      be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/Properties/launchSettings.json
  5. 4
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PurchasePrices/PurchasePriceSheetAutoMapperProfile.cs
  6. 4
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SalePrices/SalePriceSheetAutoMapperProfile.cs
  7. 4
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/StdCostPrices/StdCostPriceSheetAutoMapperProfile.cs
  8. 3
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/RecycledMaterialReceiptNotes/RecycledMaterialReceiptNoteAppService.cs
  9. 32
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/PurchaseOrders/PurchaseOrderAppService.cs
  10. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/RecycledMaterialReceiptNoteEventHandler.cs
  11. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ItemTransformNoteEventHandler.cs
  12. 4
      build/src/docker/publish/conf/settings/appsettings.Development.json

2
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.MesAgent/Incoming/MesOutConverter.cs

@ -108,7 +108,7 @@ public class MesOutConverter : IIncomingConverter
wmsProductReceiptNoteDetail.Lot = ""; //排序批次
wmsProductReceiptNoteDetail.PackingCode = "";//箱标签
wmsProductReceiptNoteDetail.Status = EnumInventoryStatus.OK;
wmsProductReceiptNoteDetail.WarehouseCode = "T8";
wmsProductReceiptNoteDetail.WarehouseCode = "T9";
wmsProductReceiptNoteDetail.LocationArea = "";
wmsProductReceiptNoteDetail.LocationGroup = "";
if (wmsProductReceiptNoteDetail.MesQuality=="1")//质量补

2
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/TyrpAgentModule.cs

@ -172,7 +172,7 @@ public class TyrpAgentModule : AbpModule
ApplicationInitializationContext context)
{
// context.AddBackgroundWorkerAsync<TyrpIncomingBackgroundWorker>();
context.AddBackgroundWorkerAsync<TyrpIncomingBackgroundWorker>();
context.AddBackgroundWorkerAsync<TyrpOutgoingBackgroundWorker>();
}

2
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/appsettings.json

@ -3,7 +3,7 @@
"Default": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True;Encrypt=false",
"DataExchange": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_DataExchange_CC;uid=ccwin-in;pwd=Microsoft@2022;TrustServerCertificate=True;Encrypt=false",
"TYRP": "Server=dev.ccwin-in.com,13319;Database=TYRP_CC;Uid=ccwin-in;Pwd=Microsoft@2022;TrustServerCertificate=True",
"SYBASE_TYRP": "Data Source=10.164.115.137; Port=5000; Database=mesdb; Uid=sa; Pwd=dawning;Charset=cp850;" //iso_1
"SYBASE_TYRP": "Data Source=10.164.233.4; Port=5000; Database=mesdb; Uid=sa; Pwd=dawning;Charset=cp850;" //iso_1
},
"AuthServer": {

3
be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Agent/Properties/launchSettings.json

@ -3,6 +3,9 @@
"WSL": {
"commandName": "WSL2",
"distributionName": ""
},
"Win_in.Sfs.Wms.DataExchange.Agent": {
"commandName": "Project"
}
}
}

4
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PurchasePrices/PurchasePriceSheetAutoMapperProfile.cs

@ -11,5 +11,9 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
{
CreateMap<PurchasePriceSheet, PurchasePriceSheetDTO>()
.ReverseMap();
CreateMap<PurchasePriceSheetEditInput, PurchasePriceSheet>()
.IgnoreAuditedObjectProperties()
.Ignore(x => x.ConcurrencyStamp)
.Ignore(x => x.Id);
}
}

4
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SalePrices/SalePriceSheetAutoMapperProfile.cs

@ -11,5 +11,9 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
{
CreateMap<SalePriceSheet, SalePriceSheetDTO>()
.ReverseMap();
CreateMap<SalePriceSheetEditInput, SalePriceSheet>()
.IgnoreAuditedObjectProperties()
.Ignore(x => x.ConcurrencyStamp)
.Ignore(x => x.Id);
}
}

4
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/StdCostPrices/StdCostPriceSheetAutoMapperProfile.cs

@ -11,5 +11,9 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
{
CreateMap<StdCostPriceSheet, StdCostPriceSheetDTO>()
.ReverseMap();
CreateMap<StdCostPriceSheetEditInput, StdCostPriceSheet>()
.IgnoreAuditedObjectProperties()
.Ignore(x => x.ConcurrencyStamp)
.Ignore(x => x.Id);
}
}

3
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/RecycledMaterialReceiptNotes/RecycledMaterialReceiptNoteAppService.cs

@ -75,7 +75,7 @@ public class RecycledMaterialReceiptNoteAppService :
entity = await _repository.InsertAsync(entity).ConfigureAwait(false);
await LocalEventBus.PublishAsync(new SfsCreatedEntityEventData<RecycledMaterialReceiptNote>(entity), false).ConfigureAwait(false);
await LocalEventBus.PublishAsync(new SfsCompletedEntityEventData<RecycledMaterialReceiptNote>(entity), false).ConfigureAwait(false);
return ObjectMapper.Map<RecycledMaterialReceiptNote, RecycledMaterialReceiptNoteDTO>(entity);
}
@ -110,6 +110,7 @@ public class RecycledMaterialReceiptNoteAppService :
}
entity = await _repository.InsertAsync(entity).ConfigureAwait(false);
await LocalEventBus.PublishAsync(new SfsCompletedEntityEventData<RecycledMaterialReceiptNote>(entity), false).ConfigureAwait(false);
return ObjectMapper.Map<RecycledMaterialReceiptNote, RecycledMaterialReceiptNoteDTO>(entity);
}
}

32
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/PurchaseOrders/PurchaseOrderAppService.cs

@ -9,6 +9,7 @@ using Microsoft.EntityFrameworkCore;
using Volo.Abp;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Repositories;
using Win_in.Sfs.Basedata.Application;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
@ -30,13 +31,15 @@ public class PurchaseOrderAppService :
private readonly ISupplierAppService _supplierAppService;
private readonly IItemBasicAppService _itemBasicAppService;
private readonly ILocationAppService _locationAppService;
public readonly IPurchasePriceSheetAppService _purchasePriceSheetAppService;
public PurchaseOrderAppService(
IPurchaseOrderRepository repository,
IPurchaseOrderManager purchaseOrderManager,
ISupplierAppService supplierAppService,
IItemBasicAppService itemBasicAppService
, ILocationAppService locationAppService) : base(repository)
, ILocationAppService locationAppService,
IPurchasePriceSheetAppService purchasePriceSheetAppService) : base(repository)
{
_repository = repository;
_purchaseOrderManager = purchaseOrderManager;
@ -46,6 +49,7 @@ public class PurchaseOrderAppService :
base.CreatePolicyName = PurchaseOrderPermissions.Create;
base.UpdatePolicyName = PurchaseOrderPermissions.Update;
base.DeletePolicyName = PurchaseOrderPermissions.Delete;
_purchasePriceSheetAppService = purchasePriceSheetAppService;
}
#region 东阳使用
@ -60,7 +64,6 @@ public class PurchaseOrderAppService :
{
var ImportData = dictionary.Select(p => p.Key);
#region 校验ERP库位是否存在
var allTempErpLocationCode = ImportData.Select(p => p.Details.Select(p => p.LocationErpCode).ToList()).ToList();
var allErpLocationCode = new List<string>();
@ -87,6 +90,7 @@ public class PurchaseOrderAppService :
#endregion
foreach (var purchaseOrder in ImportData)
{
purchaseOrder.CreatorId = CurrentUser.Id;
@ -98,10 +102,18 @@ public class PurchaseOrderAppService :
purchaseOrder.SupplierName = supplierDto.Name;
if (purchaseOrder.OrderStatus == EnumOrderStatus.Close)
{
throw new UserFriendlyException($"不允许导入关闭订单状态的订单");
throw new UserFriendlyException($"不允许导入关闭订单状态的订单!");
}
#region 校验行号是否有重复的
var polineCount = purchaseOrder.Details.GroupBy(r => r.PoLine).Count();
if (polineCount != purchaseOrder.Details.Count)
{
throw new UserFriendlyException($"同一订单号内行号不允许重复!");
}
#endregion
foreach (var detail in purchaseOrder.Details)
{
await CheckItemPrice(purchaseOrder.SupplierCode,detail.ItemCode).ConfigureAwait(false);
detail.LineStatus = EnumOrderStatus.Open;
var itemBasicDto = itemBasicDtos.First(p => p.Code == detail.ItemCode);
@ -115,6 +127,8 @@ public class PurchaseOrderAppService :
return dictionary;
}
/// <summary>
/// 【创建】采购订单
/// </summary>
@ -209,6 +223,18 @@ public class PurchaseOrderAppService :
return result;
}
/// <summary>
/// 校验采购价格
/// </summary>
/// <returns></returns>
private async Task CheckItemPrice(string supplierCode, string itemCode )
{
var isprice = await _purchasePriceSheetAppService.CheckPurPriceAsync(supplierCode, itemCode).ConfigureAwait(false);
if (isprice)
{
throw new UserFriendlyException($"供应商【{supplierCode}】零件名称【{itemCode}】无采购价格无法执行采购上架!");
}
}
private async Task<List<LocationDTO>> CheckErpLocationCodeAsync(List<string> erpLocationCodes)
{
erpLocationCodes = erpLocationCodes.Distinct().ToList();

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

@ -11,20 +11,20 @@ namespace Win_in.Sfs.Wms.Store.Event.DataExchanges;
public class RecycledMaterialReceiptNoteEventHandler
: StoreDataExchangeEventHandlerBase<RecycledMaterialReceiptNote>
, ILocalEventHandler<SfsCreatedEntityEventData<RecycledMaterialReceiptNote>>
, ILocalEventHandler<SfsCreatedEntityEventData<List<RecycledMaterialReceiptNote>>>
, ILocalEventHandler<SfsCompletedEntityEventData<RecycledMaterialReceiptNote>>
, ILocalEventHandler<SfsCompletedEntityEventData<List<RecycledMaterialReceiptNote>>>
{
private const EnumExchangeDataType ExchangeDataType = EnumExchangeDataType.RecycledMaterialReceipt;
[UnitOfWork]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<RecycledMaterialReceiptNote> eventData)
public virtual async Task HandleEventAsync(SfsCompletedEntityEventData<RecycledMaterialReceiptNote> eventData)
{
var entity = eventData.Entity;
await AddExchangeDataAsync(entity).ConfigureAwait(false);
}
[UnitOfWork]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<List<RecycledMaterialReceiptNote>> eventData)
public virtual async Task HandleEventAsync(SfsCompletedEntityEventData<List<RecycledMaterialReceiptNote>> eventData)
{
var entities = eventData.Entity;
await AddExchangeDataAsync(entities).ConfigureAwait(false);

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ItemTransformNoteEventHandler.cs

@ -256,7 +256,7 @@ public class ItemTransformNoteEventHandler
JobNumber = note.JobNumber,
DocNumber = note.Number,
TransType = Type,
TransSubType = SubType,
TransSubType = EnumTransSubType.UnplannedReceipt_RecycledMaterialReceipt,
TransInOut = EnumTransInOut.In,
LocationArea = detail.FromLocationArea,
LocationGroup = detail.FromLocationGroup,

4
build/src/docker/publish/conf/settings/appsettings.Development.json

@ -117,8 +117,8 @@
//"BaseUrl": "http://localhost:59093/"
},
"BaseData": {
"BaseUrl": "http://dev.ccwin-in.com:60084/"
//"BaseUrl": "http://localhost:59094/"
// "BaseUrl": "http://dev.ccwin-in.com:60084/"
"BaseUrl": "http://localhost:59094/"
},
"Default": {
"BaseUrl": "http://dev.ccwin-in.com:60083/"

Loading…
Cancel
Save