Browse Source

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

dev_DY_CC
lvzb 10 months ago
parent
commit
b1694e4812
  1. 3
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.TyrpAgent/Outgoing/TyrpOutgoingBackgroundWorker.cs
  2. 4
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/AssembleIssueJobsController.cs
  3. 4
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/CoatingIssueJobsController.cs
  4. 4
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/InjectionIssueJobsController.cs
  5. 4
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/KittingIssueJobsController.cs
  6. 4
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/SparePartIssueJobsController.cs
  7. 134
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ThirdLocationJobController.cs
  8. 2
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/ThirdLocationRequestController.cs
  9. 162
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Dtos/SplitPackingRecDto.cs
  10. 161
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Inputs/SplitPackingRecEditInput.cs
  11. 13
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAppService.cs
  12. 79
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SplitPackings/SplitPackingRecAutoMapperProfile.cs
  13. 272
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/IHasPurchaseInfo.cs
  14. 5
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Win_in.Sfs.Basedata.Domain.Shared.csproj
  15. 115
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRec.cs
  16. 4443
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240624071015_BaseData.Designer.cs
  17. 424
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240624071015_BaseData.cs
  18. 187
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/BasedataDbContextModelSnapshot.cs
  19. 21
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/SplitPackings/SplitPackingRecDbContextModelCreatingExtensions.cs
  20. 28
      be/Modules/Label/src/Win_in.Sfs.Label.Application/InventoryLabels/InventoryLabelAppService.cs
  21. 112
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/DTOs/ThirdLocationJobDetailDTO.cs
  22. 16
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/IThirdLocationJobAppService.cs
  23. 122
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/Inputs/ThirdLocationJobDetailInput.cs
  24. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/IThirdLocationNoteAppService.cs
  25. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/IThirdLocationRequestAppService.cs
  26. 101
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestDetailInput.cs
  27. 30
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestEditInput.cs
  28. 292
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ThirdLocationJobs/ThirdLocationJobAppService.cs
  29. 91
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PutawayNotes/PutawayNoteAppService.cs
  30. 23
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ThirdLocationNotes/ThirdLocationNoteAppService.cs
  31. 28
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs
  32. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/PurchaseOrders/PurchaseOrderAppService.cs
  33. 203
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAppService.cs
  34. 59
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAutoMapperProfile.cs
  35. 7
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/ExchangeDatas/EnumExchangeDataType.cs
  36. 7
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/IThirdLocationRequestManager.cs
  37. 21
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequestManager.cs
  38. 46
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ThirdLocationJobAutoMapperProfile.cs
  39. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/CustomerProductionReturnNoteAutoMapperProfile.cs
  40. 1
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/ThirdLocationNoteAutoMapperProfile.cs
  41. 82
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ThirdLocationRequestAutoMapperProfile.cs
  42. 40
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/CustomerProductionReturnNoteEventHandler.cs
  43. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/AssembleIssueNoteEventHandler.cs
  44. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/CoatingIssueNoteEventHandler.cs
  45. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/InjectionIssueNoteEventHandler.cs
  46. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/KittingIssueNoteEventHandler.cs
  47. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/Issue/SparePartIssueNoteEventHandler.cs
  48. 1
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/ThirdLocationNoteEventHandler.cs
  49. 12
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/ThirdLocationJobEventHandler.cs
  50. 24
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ThirdLocationRequestEventHandler.cs
  51. 12
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ThirdLocationNoteEventHandler.cs
  52. 4
      build/src/docker/publish/conf/settings/appsettings.Development.json

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

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

4
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/AssembleIssueJobsController.cs

@ -60,10 +60,10 @@ public class AssembleIssueJobsController : AbpController
{
MaxResultCount = pageSize,
SkipCount = (pageIndex - 1) * pageSize,
Sorting = $"{nameof(ContainerJobDTO.CreationTime)} ASC",
Sorting = $"{nameof(AssembleIssueJobDTO.JobStatus)} ASC,{nameof(AssembleIssueJobDTO.CreationTime)} ASC",
Condition = new Condition
{
Filters = new List<Filter> { new(nameof(ContainerJobDTO.JobStatus), jsonStatus, "In") }
Filters = new List<Filter> { new(nameof(AssembleIssueJobDTO.JobStatus), jsonStatus, "In") }
}
};

4
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/CoatingIssueJobsController.cs

@ -60,10 +60,10 @@ public class CoatingIssueJobsController : AbpController
{
MaxResultCount = pageSize,
SkipCount = (pageIndex - 1) * pageSize,
Sorting = $"{nameof(ContainerJobDTO.CreationTime)} ASC",
Sorting = $"{nameof(CoatingIssueJobDTO.JobStatus)} ASC,{nameof(CoatingIssueJobDTO.CreationTime)} ASC",
Condition = new Condition
{
Filters = new List<Filter> { new(nameof(ContainerJobDTO.JobStatus), jsonStatus, "In") }
Filters = new List<Filter> { new(nameof(CoatingIssueJobDTO.JobStatus), jsonStatus, "In") }
}
};

4
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/InjectionIssueJobsController.cs

@ -60,10 +60,10 @@ public class InjectionIssueJobsController : AbpController
{
MaxResultCount = pageSize,
SkipCount = (pageIndex - 1) * pageSize,
Sorting = $"{nameof(ContainerJobDTO.CreationTime)} ASC",
Sorting = $"{nameof(InjectionIssueJobDTO.JobStatus)} ASC,{nameof(InjectionIssueJobDTO.CreationTime)} ASC",
Condition = new Condition
{
Filters = new List<Filter> { new(nameof(ContainerJobDTO.JobStatus), jsonStatus, "In") }
Filters = new List<Filter> { new(nameof(InjectionIssueJobDTO.JobStatus), jsonStatus, "In") }
}
};

4
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/KittingIssueJobsController.cs

@ -60,10 +60,10 @@ public class KittingIssueJobsController : AbpController
{
MaxResultCount = pageSize,
SkipCount = (pageIndex - 1) * pageSize,
Sorting = $"{nameof(ContainerJobDTO.CreationTime)} ASC",
Sorting = $"{nameof(KittingIssueJobDTO.JobStatus)} ASC,{nameof(KittingIssueJobDTO.CreationTime)} ASC",
Condition = new Condition
{
Filters = new List<Filter> { new(nameof(ContainerJobDTO.JobStatus), jsonStatus, "In") }
Filters = new List<Filter> { new(nameof(KittingIssueJobDTO.JobStatus), jsonStatus, "In") }
}
};

4
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/SparePartIssueJobsController.cs

@ -60,10 +60,10 @@ public class SparePartIssueJobsController : AbpController
{
MaxResultCount = pageSize,
SkipCount = (pageIndex - 1) * pageSize,
Sorting = $"{nameof(ContainerJobDTO.CreationTime)} ASC",
Sorting = $"{nameof(SparePartIssueJobDTO.JobStatus)} ASC,{nameof(SparePartIssueJobDTO.CreationTime)} ASC",
Condition = new Condition
{
Filters = new List<Filter> { new(nameof(ContainerJobDTO.JobStatus), jsonStatus, "In") }
Filters = new List<Filter> { new(nameof(SparePartIssueJobDTO.JobStatus), jsonStatus, "In") }
}
};

134
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ThirdLocationJobController.cs

@ -15,6 +15,7 @@ using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Inventory.Application.Contracts;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
namespace Win_in.Sfs.Wms.Pda.Controllers.Jobs;
@ -46,5 +47,136 @@ public class ThirdLocationJobController : AbpController
_dictApp = dictApp;
}
/// <summary>
/// 执行任务明细
/// </summary>
/// <returns></returns>
[HttpPost("ExecuteDetail/{masterId}")]
public async Task ExecuteDetailAsync(Guid masterId, List<ThirdLocationJobDetailDTO> detailDtoList)
{
await _thirdLocationJobAppService.ExecuteDetailAsync(masterId,detailDtoList).ConfigureAwait(false);
}
/// <summary>
/// 获取上架任务详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet("{id}")]
public virtual async Task<ActionResult<ThirdLocationJobDTO>> GetAsync(Guid id)
{
var result = await _thirdLocationJobAppService.GetAsync(id).ConfigureAwait(false);
return Ok(result);
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="pageSize"></param>
/// <param name="pageIndex"></param>
/// <returns></returns>
[HttpGet("list")]
public virtual async Task<PagedResultDto<ThirdLocationJobDTO>> GetListAsync(int pageSize, int pageIndex)
{
var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false);
//var jsonCodes = JsonSerializer.Serialize(wlgCodes);
var status = new List<int>() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing ,(int)EnumJobStatus.Partial};
var jsonStatus = JsonSerializer.Serialize(status);
var request = new SfsJobRequestInputBase
{
MaxResultCount = pageSize,
SkipCount = (pageIndex - 1) * pageSize,
Sorting = $"{nameof(ThirdLocationJobDTO.Priority)} ASC",
Condition = new Condition
{
Filters = new List<Filter>
{
//new(nameof(ThirdLocationJobDTO.WorkGroupCode),jsonCodes,"In"),
new(nameof(ThirdLocationJobDTO.JobStatus),jsonStatus,"In")
}
}
};
var list = await _thirdLocationJobAppService.GetPagedListByFilterAsync(request, true).ConfigureAwait(false);
return list;
}
/// <summary>
/// 获取列表 筛选
/// </summary>
/// <param name="sfsRequestDTO"></param>
/// <returns></returns>
[HttpPost("list")]
public virtual async Task<PagedResultDto<ThirdLocationJobDTO>> GetListAsync(SfsJobRequestInputBase sfsRequestDTO)
{
var list = await _thirdLocationJobAppService.GetPagedListByFilterAsync(sfsRequestDTO, true).ConfigureAwait(false);
return list;
}
/// <summary>
/// 获取任务数量
/// </summary>
/// <returns></returns>
[HttpGet("count")]
public virtual async Task<ActionResult<long>> CountAsync()
{
var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false);
var jsonCodes = JsonSerializer.Serialize(wlgCodes);
var status = new List<int>() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing ,(int)EnumJobStatus.Partial};
var jsonStatus = JsonSerializer.Serialize(status);
var request = new SfsJobRequestInputBase
{
Sorting = $"{nameof(ThirdLocationJobDTO.Priority)} ASC",
Condition = new Condition
{
Filters = new List<Filter>
{
new(nameof(ThirdLocationJobDTO.WorkGroupCode),jsonCodes,"In"),
new(nameof(ThirdLocationJobDTO.JobStatus),jsonStatus,"In")
}
}
};
var count = await _thirdLocationJobAppService.GetCountByFilterAsync(request).ConfigureAwait(false);
return Ok(count);
}
/// <summary>
/// 承接任务
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpPost("take/{id}")]
public virtual async Task TakeAsync(Guid id)
{
await _thirdLocationJobAppService.AcceptAsync(id).ConfigureAwait(false);
}
/// <summary>
/// 取消承接任务
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpPost("cancel-take/{id}")]
public virtual async Task CancelTakeAsync(Guid id)
{
await _thirdLocationJobAppService.CancelAcceptAsync(id).ConfigureAwait(false);
}
/// <summary>
/// 完成任务
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpPost("Complete/{id}")]
public async Task CompleteAsync(Guid id)
{
await _thirdLocationJobAppService.CompleteAsync(id).ConfigureAwait(false);
}
}

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

@ -120,6 +120,4 @@ public class ThirdLocationRequestController : AbpController
var result = await _thirdLocationRequestAppService.CompleteAsync(id).ConfigureAwait(false);
return Ok(result);
}
}

162
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Dtos/SplitPackingRecDto.cs

@ -11,6 +11,10 @@ using Win_in.Sfs.Basedata.Domain.Shared;
namespace Win_in.Sfs.Basedata.Application.Contracts;
public class SplitPackingRecDTO : SfsBaseDataDTOBase
, IHasPurchaseInfoDto
, IHasProductionInfoDto
, IHasQualityInfoDto
{
/// <summary>
/// 操作类型
@ -156,5 +160,163 @@ public class SplitPackingRecDTO : SfsBaseDataDTOBase
[Display(Name = "标签类型")]
public EnumLabelType LabelType { get; set; }
#region InventoryLabel兼容成员
/// <summary>
/// 完整条码文本
/// </summary>
[Display(Name = "完整条码文本")]
public string FullBarcodeString { get; set; }
/// <summary>
/// 供应商批次
/// </summary>
[Display(Name = "供应商批次")]
public string SupplierBatch { get; set; }
/// <summary>
/// 到货时间
/// </summary>
[Display(Name = "summary")]
public DateTime ArriveDate { get; set; }
/// <summary>
/// 生产时间
/// </summary>
[Display(Name = "生产时间")]
public DateTime ProduceDate { get; set; }
/// <summary>
/// 过期时间
/// </summary>
[Display(Name = "过期时间")]
public DateTime ExpireDate { get; set; }
/// <summary>
/// 标签状态
/// </summary>
[Display(Name = "标签状态")]
public LabelStatus LabelStatus { get; set; }
/// <summary>
/// 建议库位
/// </summary>
[Display(Name = "建议库位")]
public string RecommendLocationCode { get; set; }
/// <summary>
/// 目标ERP库位
/// </summary>
[Display(Name = "目标ERP库位")]
public string LocationErpCode { get; set; }
/// <summary>
/// 托标签号
/// </summary>
[Display(Name = "托标签号")]
public string ContainerCode { get; set; }
#region 三个子实体成员
//-----------------------QualityInfo
/// <summary>
/// 质量级别
/// </summary>
[Display(Name = "质量级别")]
public string QLevel { get; set; }
/// <summary>
/// 质检文件
/// </summary>
[Display(Name = "质检文件")]
public string QualityFile { get; set; }
//----------------------PurchaseInfo
/// <summary>
/// 供应商代码
/// </summary>
[Display(Name = "供应商代码")]
public string SupplierCode { get; set; }
/// <summary>
/// 订单号
/// </summary>
[Display(Name = "订单号")]
public string PoNumber { get; set; }
/// <summary>
/// 要货看板号
/// </summary>
[Display(Name = "要货看板号")]
public string RpNumber { get; set; }
/// <summary>
/// 发货单号
/// </summary>
[Display(Name = "发货单号")]
public string AsnNumber { get; set; }
//--------------------------------ProductionInfo
/// <summary>
/// 生产线
/// </summary>
[Display(Name = "生产线")]
public string ProdLine { get; set; }
/// <summary>
/// 班组
/// </summary>
[Display(Name = "班组")]
public string Team { get; set; }
/// <summary>
/// 班次
/// </summary>
[Display(Name = "班次")]
public string Shift { get; set; }
#endregion
/// <summary>
/// 规格
/// </summary>
[Display(Name = "规格")]
public string Specifications { get; set; }
/// <summary>
/// 供应商名称
/// </summary>
[Display(Name = "供应商名称")]
public string SupplierName { get; set; }
/// <summary>
/// 供应商简称
/// </summary>
[Display(Name = "供应商简称")]
public string SupplierSimpleName { get; set; }
/// <summary>
/// 供应商ERP料号
/// </summary>
[Display(Name = "供应商ERP料号")]
public string SupplierItemCode { get; set; }
/// <summary>
/// 供应商物品名
/// </summary>
[Display(Name = "供应商物品名")]
public string SupplierItemName { get; set; }
/// <summary>
/// 要求到货时间
/// </summary>
[Display(Name = "要求到货时间")]
[Required(ErrorMessage = "{0}是必填项")]
public DateTime PlanArriveDate { get; set; }
#endregion
}

161
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Inputs/SplitPackingRecEditInput.cs

@ -13,6 +13,9 @@ namespace Win_in.Sfs.Basedata.Application.Contracts;
public class SplitPackingRecEditInput : SfsBaseDataCreateOrUpdateInputBase
, IHasPurchaseInfoDto
, IHasProductionInfoDto
, IHasQualityInfoDto
{
/// <summary>
/// 操作类型
@ -159,4 +162,162 @@ public class SplitPackingRecEditInput : SfsBaseDataCreateOrUpdateInputBase
/// 标签类型
/// </summary>
public EnumLabelType LabelType { get; set; }
#region InventoryLabel兼容成员
/// <summary>
/// 完整条码文本
/// </summary>
[Display(Name = "完整条码文本")]
public string FullBarcodeString { get; set; }
/// <summary>
/// 供应商批次
/// </summary>
[Display(Name = "供应商批次")]
public string SupplierBatch { get; set; }
/// <summary>
/// 到货时间
/// </summary>
[Display(Name = "summary")]
public DateTime ArriveDate { get; set; }
/// <summary>
/// 生产时间
/// </summary>
[Display(Name = "生产时间")]
public DateTime ProduceDate { get; set; }
/// <summary>
/// 过期时间
/// </summary>
[Display(Name = "过期时间")]
public DateTime ExpireDate { get; set; }
/// <summary>
/// 标签状态
/// </summary>
[Display(Name = "标签状态")]
public LabelStatus LabelStatus { get; set; }
/// <summary>
/// 建议库位
/// </summary>
[Display(Name = "建议库位")]
public string RecommendLocationCode { get; set; }
/// <summary>
/// 目标ERP库位
/// </summary>
[Display(Name = "目标ERP库位")]
public string LocationErpCode { get; set; }
/// <summary>
/// 托标签号
/// </summary>
[Display(Name = "托标签号")]
public string ContainerCode { get; set; }
#region 三个子实体成员
//-----------------------QualityInfo
/// <summary>
/// 质量级别
/// </summary>
[Display(Name = "质量级别")]
public string QLevel { get; set; }
/// <summary>
/// 质检文件
/// </summary>
[Display(Name = "质检文件")]
public string QualityFile { get; set; }
//----------------------PurchaseInfo
/// <summary>
/// 供应商代码
/// </summary>
[Display(Name = "供应商代码")]
public string SupplierCode { get; set; }
/// <summary>
/// 订单号
/// </summary>
[Display(Name = "订单号")]
public string PoNumber { get; set; }
/// <summary>
/// 要货看板号
/// </summary>
[Display(Name = "要货看板号")]
public string RpNumber { get; set; }
/// <summary>
/// 发货单号
/// </summary>
[Display(Name = "发货单号")]
public string AsnNumber { get; set; }
//--------------------------------ProductionInfo
/// <summary>
/// 生产线
/// </summary>
[Display(Name = "生产线")]
public string ProdLine { get; set; }
/// <summary>
/// 班组
/// </summary>
[Display(Name = "班组")]
public string Team { get; set; }
/// <summary>
/// 班次
/// </summary>
[Display(Name = "班次")]
public string Shift { get; set; }
#endregion
/// <summary>
/// 规格
/// </summary>
[Display(Name = "规格")]
public string Specifications { get; set; }
/// <summary>
/// 供应商名称
/// </summary>
[Display(Name = "供应商名称")]
public string SupplierName { get; set; }
/// <summary>
/// 供应商简称
/// </summary>
[Display(Name = "供应商简称")]
public string SupplierSimpleName { get; set; }
/// <summary>
/// 供应商ERP料号
/// </summary>
[Display(Name = "供应商ERP料号")]
public string SupplierItemCode { get; set; }
/// <summary>
/// 供应商物品名
/// </summary>
[Display(Name = "供应商物品名")]
public string SupplierItemName { get; set; }
/// <summary>
/// 要求到货时间
/// </summary>
[Display(Name = "要求到货时间")]
[Required(ErrorMessage = "{0}是必填项")]
public DateTime PlanArriveDate { get; set; }
#endregion
}

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 Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using Volo.Abp;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Repositories;
using Win_in.Sfs.Shared;
@ -60,9 +61,17 @@ public class DictAppService : SfsBaseDataWithCodeAppServiceBase<Dict, DictDTO, S
[HttpPut]
[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")]

79
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SplitPackings/SplitPackingRecAutoMapperProfile.cs

@ -9,8 +9,15 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
{
private void SplitPackingRecAutoMapperProfile()
{
CreateMap<SplitPackingRec, SplitPackingRecDTO>();
CreateMap<SplitPackingRec, SplitPackingRecDTO>()
.MapPurchaseInfo()
.MapProductionInfo()
.MapQualityInfo();
CreateMap<SplitPackingRecEditInput, SplitPackingRec>()
.MapQualityInfoDto()
.MapPurchaseInfoDto()
.MapProductionInfoDto()
.Ignore(t => t.FromTopPackingCode)
.Ignore(t => t.ToTopPackingCode)
.Ignore(t => t.LastModificationTime)
@ -19,5 +26,75 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
.Ignore(t => t.CreatorId)
.Ignore(t => t.ConcurrencyStamp)
.Ignore(t => t.Id);
}
}
public static class LabelCommonMapperExtensions
{
public static IMappingExpression<TSource, TDestination> MapPurchaseInfo<TSource, TDestination>(
this IMappingExpression<TSource, TDestination> m)
where TSource : IHasPurchaseInfo
where TDestination : IHasPurchaseInfoDto
{
return m
.ForMember(dest => dest.SupplierCode, opts => opts.MapFrom(src => src.PurchaseInfo.SupplierCode))
.ForMember(dest => dest.PoNumber, opts => opts.MapFrom(src => src.PurchaseInfo.PoNumber))
.ForMember(dest => dest.RpNumber, opts => opts.MapFrom(src => src.PurchaseInfo.RpNumber))
.ForMember(dest => dest.AsnNumber, opts => opts.MapFrom(src => src.PurchaseInfo.AsnNumber))
;
}
public static IMappingExpression<TSource, TDestination> MapProductionInfo<TSource, TDestination>(
this IMappingExpression<TSource, TDestination> m)
where TSource : IHasProductionInfo
where TDestination : IHasProductionInfoDto
{
return m
.ForMember(dest => dest.ProdLine, opts => opts.MapFrom(src => src.ProductionInfo.ProdLine))
.ForMember(dest => dest.Team, opts => opts.MapFrom(src => src.ProductionInfo.Team))
.ForMember(dest => dest.Shift, opts => opts.MapFrom(src => src.ProductionInfo.Shift))
;
}
public static IMappingExpression<TSource, TDestination> MapPurchaseInfoDto<TSource, TDestination>(
this IMappingExpression<TSource, TDestination> m)
where TSource : IHasPurchaseInfoDto
where TDestination : IHasPurchaseInfo
{
return m
.ForMember(dest => dest.PurchaseInfo, opts => opts.MapFrom(src => new PurchaseInfo(src.SupplierCode, src.PoNumber, src.RpNumber, src.AsnNumber)))
;
}
public static IMappingExpression<TSource, TDestination> MapProductionInfoDto<TSource, TDestination>(
this IMappingExpression<TSource, TDestination> m)
where TSource : IHasProductionInfoDto
where TDestination : IHasProductionInfo
{
return m
.ForMember(dest => dest.ProductionInfo, opts => opts.MapFrom(src => new ProductionInfo(src.ProdLine, src.Team, src.Shift)))
;
}
public static IMappingExpression<TSource, TDestination> MapQualityInfo<TSource, TDestination>(
this IMappingExpression<TSource, TDestination> m)
where TSource : IHasQualityInfo
where TDestination : IHasQualityInfoDto
{
return m
.ForMember(dest => dest.QLevel, opts => opts.MapFrom(src => src.QualityInfo.QLevel))
.ForMember(dest => dest.QualityFile, opts => opts.MapFrom(src => src.QualityInfo.QualityFile))
;
}
public static IMappingExpression<TSource, TDestination> MapQualityInfoDto<TSource, TDestination>(
this IMappingExpression<TSource, TDestination> m)
where TSource : IHasQualityInfoDto
where TDestination : IHasQualityInfo
{
return m
.ForMember(dest => dest.QualityInfo, opts => opts.MapFrom(src => new QualityInfo(src.QLevel, src.QualityFile)))
;
}
}

272
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/IHasPurchaseInfo.cs

@ -0,0 +1,272 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Domain.Values;
using Win_in.Sfs.Shared.Domain;
namespace Win_in.Sfs.Basedata;
#region 枚举及实体
/// <summary>
/// 标签类别
/// </summary>
public enum EnumLabelType
{
/// <summary>
/// 空枚举
/// </summary>
[Display(Name = "未定义")]
None = 0,
/// <summary>
/// 采购标签
/// </summary>
[Display(Name = "采购标签")]
PurchaseLabel = 1,
/// <summary>
/// 生产标签
/// </summary>
[Display(Name = "生产标签")]
ProductionLabel = 2,
/// <summary>
/// 销售标签
/// </summary>
[Display(Name = "销售标签")]
SaleLabel = 3,
/// <summary>
/// 托盘标签
/// </summary>
[Display(Name = "托盘标签")]
PalletLabel = 4,
/// <summary>
/// 盘点标签
/// </summary>
[Display(Name = "盘点标签")]
CountLabel = 5,
}
public enum LabelStatus
{
/// <summary>
/// 未定义
/// </summary>
[Display(Name = "未定义")]
None = 0,
/// <summary>
/// 有效
/// </summary>
[Display(Name = "有效")]
Enable = 1,
/// <summary>
/// 无效
/// </summary>
[Display(Name = "无效")]
Disable = 2
}
/// <summary>
/// 质量信息
/// </summary>
public class QualityInfo : ValueObject
{
/// <summary>
/// 质量等级
/// </summary>
[MaxLength(SfsEfCorePropertyConst.CodeLength)]
public string QLevel { get; set; }
/// <summary>
/// 质检文件
/// </summary>
[MaxLength(SfsEfCorePropertyConst.CodeLength)]
public string QualityFile { get; set; }
protected override IEnumerable<object> GetAtomicValues()
{
yield return QLevel;
yield return QualityFile;
}
public QualityInfo(string qLevel, string qualityFile)
{
QLevel = qLevel;
QualityFile = qualityFile;
}
public QualityInfo()
{
}
}
/// <summary>
/// 采购信息
/// </summary>
[Owned]
public class PurchaseInfo : ValueObject
{
/// <summary>
/// 供应商代码
/// </summary>
[MaxLength(SfsEfCorePropertyConst.CodeLength)]
public string SupplierCode { get; set; }
/// <summary>
/// 订单号
/// </summary>
[MaxLength(SfsEfCorePropertyConst.CodeLength)]
public string PoNumber { get; set; }
/// <summary>
/// 要货计划号
/// </summary>
[MaxLength(SfsEfCorePropertyConst.CodeLength)]
public string RpNumber { get; set; }
/// <summary>
/// 发货单号
/// </summary>
[MaxLength(SfsEfCorePropertyConst.CodeLength)]
public string AsnNumber { get; set; }
protected override IEnumerable<object> GetAtomicValues()
{
yield return SupplierCode;
yield return PoNumber;
yield return RpNumber;
yield return AsnNumber;
}
public PurchaseInfo(string supplierCode, string poNumber, string rpNumber, string asnNumber)
{
SupplierCode = supplierCode;
PoNumber = poNumber;
RpNumber = rpNumber;
AsnNumber = asnNumber;
}
public PurchaseInfo()
{
}
}
/// <summary>
/// 生产信息
/// </summary>
public class ProductionInfo : ValueObject
{
public ProductionInfo()
{
}
public ProductionInfo(string prodLine, string team, string shift)
{
ProdLine = prodLine;
Team = team;
Shift = shift;
}
/// <summary>
/// 生产线
/// </summary>
[MaxLength(SfsEfCorePropertyConst.CodeLength)]
public string ProdLine { get; set; }
/// <summary>
/// 班组
/// </summary>
[MaxLength(SfsEfCorePropertyConst.CodeLength)]
public string Team { get; set; }
/// <summary>
/// 班次
/// </summary>
[MaxLength(SfsEfCorePropertyConst.CodeLength)]
public string Shift { get; set; }
protected override IEnumerable<object> GetAtomicValues()
{
yield return ProdLine;
yield return Team;
yield return Shift;
}
}
#endregion
#region 接口
public interface IHasPurchaseInfo
{
/// <summary>
/// 采购信息
/// </summary>
public PurchaseInfo PurchaseInfo { get; set; }
}
public interface IHasProductionInfo
{
/// <summary>
/// 生产信息
/// </summary>
public ProductionInfo ProductionInfo { get; set; }
}
public interface IHasPurchaseInfoDto
{
/// <summary>
/// 供应商编号
/// </summary>
[Display(Name = "供应商编号")]
public string SupplierCode { get; set; }
public string PoNumber { get; set; }
public string RpNumber { get; set; }
public string AsnNumber { get; set; }
}
public interface IHasProductionInfoDto
{
public string ProdLine { get; set; }
public string Team { get; set; }
public string Shift { get; set; }
}
public interface IHasQualityInfo
{
/// <summary>
/// 质量信息
/// </summary>
public QualityInfo QualityInfo { get; set; }
}
public interface IHasQualityInfoDto
{
public string QLevel { get; set; }
public string QualityFile { get; set; }
}
#endregion

5
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Win_in.Sfs.Basedata.Domain.Shared.csproj

@ -10,6 +10,7 @@
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="5.3.5" />
<PackageReference Include="Volo.Abp.Validation" Version="5.3.5" />
</ItemGroup>
@ -22,6 +23,10 @@
<Content Remove="Localization\Basedata\*.json" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Shared\src\Win_in.Sfs.Shared.Domain\Win_in.Sfs.Shared.Domain.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="Fody" Version="6.6.4">
<PrivateAssets>all</PrivateAssets>

115
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRec.cs

@ -1,6 +1,9 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Domain.Values;
using Win_in.Sfs.Basedata.Domain.Shared;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
@ -12,6 +15,9 @@ namespace Win_in.Sfs.Basedata.Domain;
/// </summary>
public class SplitPackingRec : SfsBaseDataAggregateRootBase
, IHasItem
, IHasPurchaseInfo
, IHasQualityInfo
, IHasProductionInfo
{
/// <summary>
/// 操作类型
@ -141,46 +147,107 @@ public class SplitPackingRec : SfsBaseDataAggregateRootBase
public string PutOnShelfNumber { get; set; }
public EnumLabelType LabelType { get; set; }
}
/// <summary>
/// 标签类别
/// </summary>
public enum EnumLabelType
{
#region InventoryLabel兼容成员
/// <summary>
/// 完整条码文本
/// </summary>
public string FullBarcodeString { get; set; }
/// <summary>
/// 供应商批次
/// </summary>
public string SupplierBatch { get; set; }
/// <summary>
/// 到货时间
/// </summary>
public DateTime ArriveDate { get; set; }
/// <summary>
/// 生产时间
/// </summary>
public DateTime ProduceDate { get; set; }
/// <summary>
/// 过期时间
/// </summary>
public DateTime ExpireDate { get; set; }
/// <summary>
/// 空枚举
/// 标签状态
/// </summary>
[Display(Name = "未定义")]
None = 0,
public LabelStatus LabelStatus { get; set; }
/// <summary>
/// 采购标签
/// 建议库位
/// </summary>
[Display(Name = "采购标签")]
PurchaseLabel = 1,
public string RecommendLocationCode { get; set; }
/// <summary>
/// 生产标签
/// 目标ERP库位
/// </summary>
[Display(Name = "生产标签")]
ProductionLabel = 2,
public string LocationErpCode { get; set; }
/// <summary>
/// 销售标签
/// 托标签号
/// </summary>
[Display(Name = "销售标签")]
SaleLabel = 3,
public string ContainerCode { get; set; }
/// <summary>
/// 托盘标签
/// 质量信息
/// </summary>
[Display(Name = "托盘标签")]
PalletLabel = 4,
public QualityInfo QualityInfo { get; set; } = new();
/// <summary>
/// 盘点标签
/// 采购信息
/// </summary>
[Display(Name = "盘点标签")]
CountLabel = 5,
public PurchaseInfo PurchaseInfo { get; set; } = new();
/// <summary>
/// 生产信息
/// </summary>
public ProductionInfo ProductionInfo { get; set; } = new();
/// <summary>
/// 规格
/// </summary>
[Display(Name = "规格")]
public string Specifications { get; set; }
/// <summary>
/// 供应商名称
/// </summary>
[Display(Name = "供应商名称")]
public string SupplierName { get; set; }
/// <summary>
/// 供应商简称
/// </summary>
[Display(Name = "供应商简称")]
public string SupplierSimpleName { get; set; }
/// <summary>
/// 供应商ERP料号
/// </summary>
[Display(Name = "供应商ERP料号")]
public string SupplierItemCode { get; set; }
/// <summary>
/// 供应商物品名
/// </summary>
[Display(Name = "供应商物品名")]
public string SupplierItemName { get; set; }
/// <summary>
/// 要求到货时间
/// </summary>
[Display(Name = "要求到货时间")]
[Required(ErrorMessage = "{0}是必填项")]
public DateTime PlanArriveDate { get; set; }
#endregion
}

4443
be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240624071015_BaseData.Designer.cs

File diff suppressed because it is too large

424
be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240624071015_BaseData.cs

@ -0,0 +1,424 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Win_in.Sfs.Basedata.Migrations
{
public partial class BaseData : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_Basedata_ProductionLineItem",
table: "Basedata_ProductionLineItem");
migrationBuilder.DropIndex(
name: "IX_Basedata_ProductionLineItem_ProdLineCode_ItemCode",
table: "Basedata_ProductionLineItem");
migrationBuilder.DropIndex(
name: "IX_Basedata_PositionCode_PartCode",
table: "Basedata_PositionCode");
migrationBuilder.RenameColumn(
name: "PartCode",
table: "Basedata_KittingDetail",
newName: "ItemCode");
migrationBuilder.RenameColumn(
name: "Desc2",
table: "Basedata_KittingDetail",
newName: "ItemDesc2");
migrationBuilder.RenameColumn(
name: "Desc1",
table: "Basedata_KittingDetail",
newName: "ItemName");
migrationBuilder.AddColumn<DateTime>(
name: "ArriveDate",
table: "Basedata_SplitPackingRec",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "ContainerCode",
table: "Basedata_SplitPackingRec",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "ExpireDate",
table: "Basedata_SplitPackingRec",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "FullBarcodeString",
table: "Basedata_SplitPackingRec",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<int>(
name: "LabelStatus",
table: "Basedata_SplitPackingRec",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<string>(
name: "LocationErpCode",
table: "Basedata_SplitPackingRec",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "PlanArriveDate",
table: "Basedata_SplitPackingRec",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<DateTime>(
name: "ProduceDate",
table: "Basedata_SplitPackingRec",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "ProductionInfo_ProdLine",
table: "Basedata_SplitPackingRec",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ProductionInfo_Shift",
table: "Basedata_SplitPackingRec",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ProductionInfo_Team",
table: "Basedata_SplitPackingRec",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "PurchaseInfo_AsnNumber1",
table: "Basedata_SplitPackingRec",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "PurchaseInfo_PoNumber1",
table: "Basedata_SplitPackingRec",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "PurchaseInfo_RpNumber",
table: "Basedata_SplitPackingRec",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "PurchaseInfo_SupplierCode",
table: "Basedata_SplitPackingRec",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "QualityInfo_QLevel",
table: "Basedata_SplitPackingRec",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "QualityInfo_QualityFile",
table: "Basedata_SplitPackingRec",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RecommendLocationCode",
table: "Basedata_SplitPackingRec",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Specifications",
table: "Basedata_SplitPackingRec",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "SupplierBatch",
table: "Basedata_SplitPackingRec",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "SupplierItemCode",
table: "Basedata_SplitPackingRec",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "SupplierItemName",
table: "Basedata_SplitPackingRec",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "SupplierName",
table: "Basedata_SplitPackingRec",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "SupplierSimpleName",
table: "Basedata_SplitPackingRec",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AlterColumn<string>(
name: "ItemCode",
table: "Basedata_ProductionLineItem",
type: "nvarchar(max)",
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(450)");
migrationBuilder.AlterColumn<string>(
name: "ProdLineCode",
table: "Basedata_ProductionLineItem",
type: "nvarchar(max)",
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(450)");
migrationBuilder.AddColumn<int>(
name: "ProductionLineType",
table: "Basedata_ProductionLine",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<string>(
name: "Configuration",
table: "Basedata_KittingDetail",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ItemDesc1",
table: "Basedata_KittingDetail",
type: "nvarchar(1024)",
maxLength: 1024,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "LocationCode",
table: "Basedata_CustomerItem",
type: "nvarchar(64)",
maxLength: 64,
nullable: true);
migrationBuilder.AddPrimaryKey(
name: "PK_Basedata_ProductionLineItem",
table: "Basedata_ProductionLineItem",
column: "Id");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_Basedata_ProductionLineItem",
table: "Basedata_ProductionLineItem");
migrationBuilder.DropColumn(
name: "ArriveDate",
table: "Basedata_SplitPackingRec");
migrationBuilder.DropColumn(
name: "ContainerCode",
table: "Basedata_SplitPackingRec");
migrationBuilder.DropColumn(
name: "ExpireDate",
table: "Basedata_SplitPackingRec");
migrationBuilder.DropColumn(
name: "FullBarcodeString",
table: "Basedata_SplitPackingRec");
migrationBuilder.DropColumn(
name: "LabelStatus",
table: "Basedata_SplitPackingRec");
migrationBuilder.DropColumn(
name: "LocationErpCode",
table: "Basedata_SplitPackingRec");
migrationBuilder.DropColumn(
name: "PlanArriveDate",
table: "Basedata_SplitPackingRec");
migrationBuilder.DropColumn(
name: "ProduceDate",
table: "Basedata_SplitPackingRec");
migrationBuilder.DropColumn(
name: "ProductionInfo_ProdLine",
table: "Basedata_SplitPackingRec");
migrationBuilder.DropColumn(
name: "ProductionInfo_Shift",
table: "Basedata_SplitPackingRec");
migrationBuilder.DropColumn(
name: "ProductionInfo_Team",
table: "Basedata_SplitPackingRec");
migrationBuilder.DropColumn(
name: "PurchaseInfo_AsnNumber1",
table: "Basedata_SplitPackingRec");
migrationBuilder.DropColumn(
name: "PurchaseInfo_PoNumber1",
table: "Basedata_SplitPackingRec");
migrationBuilder.DropColumn(
name: "PurchaseInfo_RpNumber",
table: "Basedata_SplitPackingRec");
migrationBuilder.DropColumn(
name: "PurchaseInfo_SupplierCode",
table: "Basedata_SplitPackingRec");
migrationBuilder.DropColumn(
name: "QualityInfo_QLevel",
table: "Basedata_SplitPackingRec");
migrationBuilder.DropColumn(
name: "QualityInfo_QualityFile",
table: "Basedata_SplitPackingRec");
migrationBuilder.DropColumn(
name: "RecommendLocationCode",
table: "Basedata_SplitPackingRec");
migrationBuilder.DropColumn(
name: "Specifications",
table: "Basedata_SplitPackingRec");
migrationBuilder.DropColumn(
name: "SupplierBatch",
table: "Basedata_SplitPackingRec");
migrationBuilder.DropColumn(
name: "SupplierItemCode",
table: "Basedata_SplitPackingRec");
migrationBuilder.DropColumn(
name: "SupplierItemName",
table: "Basedata_SplitPackingRec");
migrationBuilder.DropColumn(
name: "SupplierName",
table: "Basedata_SplitPackingRec");
migrationBuilder.DropColumn(
name: "SupplierSimpleName",
table: "Basedata_SplitPackingRec");
migrationBuilder.DropColumn(
name: "ProductionLineType",
table: "Basedata_ProductionLine");
migrationBuilder.DropColumn(
name: "Configuration",
table: "Basedata_KittingDetail");
migrationBuilder.DropColumn(
name: "ItemDesc1",
table: "Basedata_KittingDetail");
migrationBuilder.DropColumn(
name: "LocationCode",
table: "Basedata_CustomerItem");
migrationBuilder.RenameColumn(
name: "ItemName",
table: "Basedata_KittingDetail",
newName: "Desc1");
migrationBuilder.RenameColumn(
name: "ItemDesc2",
table: "Basedata_KittingDetail",
newName: "Desc2");
migrationBuilder.RenameColumn(
name: "ItemCode",
table: "Basedata_KittingDetail",
newName: "PartCode");
migrationBuilder.AlterColumn<string>(
name: "ProdLineCode",
table: "Basedata_ProductionLineItem",
type: "nvarchar(450)",
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "ItemCode",
table: "Basedata_ProductionLineItem",
type: "nvarchar(450)",
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AddPrimaryKey(
name: "PK_Basedata_ProductionLineItem",
table: "Basedata_ProductionLineItem",
column: "ProdLineCode");
migrationBuilder.CreateIndex(
name: "IX_Basedata_ProductionLineItem_ProdLineCode_ItemCode",
table: "Basedata_ProductionLineItem",
columns: new[] { "ProdLineCode", "ItemCode" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_Basedata_PositionCode_PartCode",
table: "Basedata_PositionCode",
column: "PartCode",
unique: true,
filter: "[PartCode] IS NOT NULL");
}
}
}

187
be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/BasedataDbContextModelSnapshot.cs

@ -774,6 +774,10 @@ namespace Win_in.Sfs.Basedata.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("LocationCode")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Remark")
.HasMaxLength(3072)
.HasColumnType("nvarchar(3072)")
@ -2289,6 +2293,9 @@ namespace Win_in.Sfs.Basedata.Migrations
b.Property<string>("Conf")
.HasColumnType("nvarchar(max)");
b.Property<string>("Configuration")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
@ -2297,14 +2304,21 @@ namespace Win_in.Sfs.Basedata.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<string>("Desc1")
b.Property<string>("ItemCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("ItemDesc1")
.HasMaxLength(1024)
.HasColumnType("nvarchar(1024)");
b.Property<string>("Desc2")
b.Property<string>("ItemDesc2")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ItemName")
.HasMaxLength(1024)
.HasColumnType("nvarchar(1024)");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
@ -2316,9 +2330,6 @@ namespace Win_in.Sfs.Basedata.Migrations
b.Property<Guid>("MasterId")
.HasColumnType("uniqueidentifier");
b.Property<string>("PartCode")
.HasColumnType("nvarchar(max)");
b.Property<decimal>("Qty")
.HasColumnType("decimal(18,2)");
@ -2861,10 +2872,6 @@ namespace Win_in.Sfs.Basedata.Migrations
b.HasIndex("Code")
.IsUnique();
b.HasIndex("PartCode")
.IsUnique()
.HasFilter("[PartCode] IS NOT NULL");
b.HasIndex("Code", "PartCode", "LocationCode")
.IsUnique()
.HasFilter("[PartCode] IS NOT NULL AND [LocationCode] IS NOT NULL");
@ -2919,6 +2926,9 @@ namespace Win_in.Sfs.Basedata.Migrations
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<int>("ProductionLineType")
.HasColumnType("int");
b.Property<string>("Remark")
.HasMaxLength(3072)
.HasColumnType("nvarchar(3072)")
@ -2938,8 +2948,8 @@ namespace Win_in.Sfs.Basedata.Migrations
modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ProductionLineItem", b =>
{
b.Property<string>("ProdLineCode")
.HasColumnType("nvarchar(450)");
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
@ -2959,12 +2969,9 @@ namespace Win_in.Sfs.Basedata.Migrations
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("ItemCode")
.IsRequired()
.HasColumnType("nvarchar(450)");
.HasColumnType("nvarchar(max)");
b.Property<string>("ItemDesc1")
.HasColumnType("nvarchar(max)");
@ -2983,6 +2990,10 @@ namespace Win_in.Sfs.Basedata.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("ProdLineCode")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("ProductLocationCodeListJson")
.HasColumnType("nvarchar(max)");
@ -3001,10 +3012,7 @@ namespace Win_in.Sfs.Basedata.Migrations
b.Property<string>("WipLocationCodeListJson")
.HasColumnType("nvarchar(max)");
b.HasKey("ProdLineCode");
b.HasIndex("ProdLineCode", "ItemCode")
.IsUnique();
b.HasKey("Id");
b.ToTable("Basedata_ProductionLineItem", (string)null);
});
@ -3288,12 +3296,19 @@ namespace Win_in.Sfs.Basedata.Migrations
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<DateTime>("ArriveDate")
.HasColumnType("datetime2");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("ContainerCode")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
@ -3302,6 +3317,9 @@ namespace Win_in.Sfs.Basedata.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<DateTime>("ExpireDate")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
@ -3332,6 +3350,10 @@ namespace Win_in.Sfs.Basedata.Migrations
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("FullBarcodeString")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ItemCode")
.IsRequired()
.HasMaxLength(64)
@ -3349,6 +3371,9 @@ namespace Win_in.Sfs.Basedata.Migrations
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<int>("LabelStatus")
.HasColumnType("int");
b.Property<int>("LabelType")
.HasColumnType("int");
@ -3360,9 +3385,19 @@ namespace Win_in.Sfs.Basedata.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("LocationErpCode")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<int>("OprType")
.HasColumnType("int");
b.Property<DateTime>("PlanArriveDate")
.HasColumnType("datetime2");
b.Property<DateTime>("ProduceDate")
.HasColumnType("datetime2");
b.Property<string>("PurchaseInfo_AsnNumber")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
@ -3379,9 +3414,37 @@ namespace Win_in.Sfs.Basedata.Migrations
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("RecommendLocationCode")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Remark")
.HasColumnType("nvarchar(max)");
b.Property<string>("Specifications")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SupplierBatch")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SupplierItemCode")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SupplierItemName")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SupplierName")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SupplierSimpleName")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("TaskOrderNumber")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
@ -4277,6 +4340,92 @@ namespace Win_in.Sfs.Basedata.Migrations
.IsRequired();
});
modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SplitPackingRec", b =>
{
b.OwnsOne("Win_in.Sfs.Basedata.ProductionInfo", "ProductionInfo", b1 =>
{
b1.Property<Guid>("SplitPackingRecId")
.HasColumnType("uniqueidentifier");
b1.Property<string>("ProdLine")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b1.Property<string>("Shift")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b1.Property<string>("Team")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b1.HasKey("SplitPackingRecId");
b1.ToTable("Basedata_SplitPackingRec");
b1.WithOwner()
.HasForeignKey("SplitPackingRecId");
});
b.OwnsOne("Win_in.Sfs.Basedata.PurchaseInfo", "PurchaseInfo", b1 =>
{
b1.Property<Guid>("SplitPackingRecId")
.HasColumnType("uniqueidentifier");
b1.Property<string>("AsnNumber")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasColumnName("PurchaseInfo_AsnNumber1");
b1.Property<string>("PoNumber")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasColumnName("PurchaseInfo_PoNumber1");
b1.Property<string>("RpNumber")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b1.Property<string>("SupplierCode")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b1.HasKey("SplitPackingRecId");
b1.ToTable("Basedata_SplitPackingRec");
b1.WithOwner()
.HasForeignKey("SplitPackingRecId");
});
b.OwnsOne("Win_in.Sfs.Basedata.QualityInfo", "QualityInfo", b1 =>
{
b1.Property<Guid>("SplitPackingRecId")
.HasColumnType("uniqueidentifier");
b1.Property<string>("QLevel")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b1.Property<string>("QualityFile")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b1.HasKey("SplitPackingRecId");
b1.ToTable("Basedata_SplitPackingRec");
b1.WithOwner()
.HasForeignKey("SplitPackingRecId");
});
b.Navigation("ProductionInfo");
b.Navigation("PurchaseInfo");
b.Navigation("QualityInfo");
});
modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dict", b =>
{
b.Navigation("Items");

21
be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/SplitPackings/SplitPackingRecDbContextModelCreatingExtensions.cs

@ -46,9 +46,30 @@ public static class SplitPackingRecDbContextModelCreatingExtensions
b.Property(q => q.ReceiptRecNumber).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.PutOnShelfNumber).HasMaxLength(SfsPropertyConst.CodeLength);
#region InventoryLabel兼容成员
b.Property(q => q.FullBarcodeString).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.SupplierBatch).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.RecommendLocationCode).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.LocationErpCode).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.ContainerCode).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.Specifications).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.SupplierName).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.SupplierSimpleName).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.SupplierItemCode).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.SupplierItemName).HasMaxLength(SfsPropertyConst.NameLength);
//子实体成员属性中已经定义字段长度
#endregion
//Indexes
b.HasIndex(q => new { FromPackingCode = q.FromPackingCode, ToPackingCode = q.ToPackingCode });
b.HasIndex(q => new { ToPackingCode = q.ToPackingCode });
//Relations
b.OwnsOne(q => q.PurchaseInfo);
b.OwnsOne(q => q.ProductionInfo);
b.OwnsOne(q => q.QualityInfo);
});
}
}

28
be/Modules/Label/src/Win_in.Sfs.Label.Application/InventoryLabels/InventoryLabelAppService.cs

@ -193,6 +193,34 @@ public class InventoryLabelAppService
packRec.TaskOrderNumber = null; //任务单
packRec.ReceiptRecNumber = null; //收货记录单
packRec.PutOnShelfNumber = null; //上架单
#region InventoryLabel兼容成员
packRec.FullBarcodeString = inputObj.FullBarcodeString;
packRec.SupplierBatch = inputObj.SupplierBatch;
packRec.ArriveDate = inputObj.ArriveDate;
packRec.ProduceDate = inputObj.ProduceDate;
packRec.ExpireDate = inputObj.ExpireDate;
packRec.LabelStatus = (Win_in.Sfs.Basedata.LabelStatus)((int)inputObj.LabelStatus);
packRec.RecommendLocationCode = inputObj.RecommendLocationCode;
packRec.LocationErpCode = inputObj.LocationErpCode;
packRec.ContainerCode = inputObj.ContainerCode;
packRec.QLevel = inputObj.QLevel;//
packRec.QualityFile = inputObj.QualityFile;
packRec.SupplierCode = inputObj.SupplierCode;
packRec.PoNumber = inputObj.PoNumber;
packRec.RpNumber = inputObj.RpNumber;
packRec.AsnNumber = inputObj.AsnNumber;
packRec.ProdLine = inputObj.ProdLine;
packRec.Team = inputObj.Team;
packRec.Shift = inputObj.Shift;//
packRec.Specifications = inputObj.Specifications;
packRec.SupplierName = inputObj.SupplierName;
packRec.SupplierSimpleName = inputObj.SupplierSimpleName;
packRec.SupplierItemCode = inputObj.SupplierItemCode;
packRec.SupplierItemName = inputObj.SupplierItemName;
packRec.PlanArriveDate = inputObj.PlanArriveDate;
#endregion
recLst.Add(packRec);
}
bool bo = await _splitPackingRecAppService.BatchInsertAsync(recLst).ConfigureAwait(false);

112
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/DTOs/ThirdLocationJobDetailDTO.cs

@ -1,5 +1,6 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
@ -7,112 +8,121 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class ThirdLocationJobDetailDTO : SfsJobRecommendFromDetailDTOBase, IHasToLocation
{
/// <summary>
/// 来源库位
/// 发出时间
/// </summary>
[Display(Name = "来源库位")]
public string FromLocationCode { get; set; }
public DateTime IssueTime { get; set; }
/// <summary>
/// 来源库区
/// 是否在在途
/// </summary>
[Display(Name = "来源库区")]
public string FromLocationArea { get; set; }
public bool IsOnTheWayLocationCode { get; set; }
#region 目标库位
/// <summary>
/// 到库位
/// 到库位
/// </summary>
[Display(Name = "到库位")]
public string ToLocationCode { get; set; }
/// <summary>
/// 到库区
/// 到库区
/// </summary>
[Display(Name = "到库区")]
public string ToLocationArea { get; set; }
/// <summary>
/// 到库位组
/// 到库位组
/// </summary>
[Display(Name = "到库位组")]
public string ToLocationGroup { get; set; }
/// <summary>
/// 到ERP库位
/// 到ERP库位
/// </summary>
[Display(Name = "到ERP库位")]
public string ToLocationErpCode { get; set; }
/// <summary>
/// 到仓库
/// 到仓库
/// </summary>
[Display(Name = "到仓库")]
public string ToWarehouseCode { get; set; }
#endregion
#region 来源库位
/// <summary>
/// 在途库库位
/// 库位
/// </summary>
[Display(Name = "在途库库位")]
public string OnTheWayLocationCode { get; set; }
public string FromLocationCode { get; set; }
/// <summary>
/// 收货单件码
/// 到库区
/// </summary>
[Display(Name = "收货单件码")]
public string SingleCodeJob { get; set; }
public string FromLocationArea { get; set; }
/// <summary>
/// 申请单件码
/// 到库位组
/// </summary>
[Display(Name = "申请单件码")]
public string SingleCodeRequest { get; set; }
public string FromLocationGroup { get; set; }
/// <summary>
/// 过期时间
/// 到ERP库位
/// </summary>
[Display(Name = "过期时间")]
public DateTime ExpiredTime { get; set; }
public string FromLocationErpCode { get; set; }
/// <summary>
/// 工序
/// 到仓库
/// </summary>
[Display(Name = "工序")]
public string Operation { get; set; }
public string FromWarehouseCode { get; set; }
#endregion
#region 在途库位
/// <summary>
/// 配送方式
/// 在途库库位
/// </summary>
[Display(Name = "配送方式")]
public EnumDistributionType DistributionType { get; set; }
public string OnTheWayLocationCode { get; set; }
#endregion
/// <summary>
/// 取整方式
/// 申请单件码
/// </summary>
[Display(Name = "取整方式")]
public EnumTruncType TruncType { get; set; }
public string SingleCodeRequest { get; set; }
/// <summary>
/// 取整后数量
/// 已发数量
/// </summary>
[Display(Name = "取整后数量")]
public decimal RoundedQty { get; set; }
public decimal IssuedQty { get; set; }
/// <summary>
/// 计划拆分规则
/// 已收数量
/// </summary>
[Display(Name = "计划拆分规则")]
public EnumPlannedSplitRule PlannedSplitRule { get; set; }
public decimal ReceivedQty { get; set; }
/// <summary>
/// 箱码
/// </summary>
public string PackingCode { get; set; }
/// <summary>
/// 批次
/// </summary>
public string Lot { get; set; }
/// <summary>
/// 过期时间
/// </summary>
public DateTime ExpiredTime { get; set; }
/// <summary>
/// 计划开始时间
/// 库位状态
/// </summary>
[Display(Name = "计划开始时间")]
public DateTime PlanBeginTime { get; set; }
public EnumInventoryStatus EnumInventoryStatus { get; set; }
/// <summary>
/// 每次配送数量
/// 请求未收
/// </summary>
[Display(Name = "每次配送数量")]
public decimal DeliveryQty { get; set; }
[NotMapped]
public decimal NotFinishQty => IssuedQty - ReceivedQty;
}

16
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/IThirdLocationJobAppService.cs

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
@ -9,4 +9,18 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public interface IThirdLocationJobAppService
: ISfsJobAppServiceBase<ThirdLocationJobDTO, SfsJobRequestInputBase, ThirdLocationJobCheckInput, ThirdLocationJobEditInput>
{
/// <summary>
/// 执行任务明细
/// </summary>
/// <returns></returns>
Task ExecuteDetailAsync(Guid masterId,List<ThirdLocationJobDetailDTO> detailDto);
Task<List<ThirdLocationJobDTO>> GetByRequestNumberAsync(string requestNumber);
/// <summary>
/// 完成任务
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
Task CompleteAsync(Guid id);
}

122
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/Inputs/ThirdLocationJobDetailInput.cs

@ -1,5 +1,6 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
@ -7,136 +8,121 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class ThirdLocationJobDetailInput : SfsJobRecommendFromDetailInputBase, IHasToLocation
{
/// <summary>
/// 来源库位
/// 发出时间
/// </summary>
[Display(Name = "来源库位")]
[Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string FromLocationCode { get; set; }
public DateTime IssueTime { get; set; }
/// <summary>
/// 来源库区
/// 是否在在途
/// </summary>
[Display(Name = "来源库位")]
[Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string FromLocationArea { get; set; }
public bool IsOnTheWayLocationCode { get; set; }
#region 目标库位
/// <summary>
/// 到库位
/// 到库位
/// </summary>
[Display(Name = "到库位")]
[Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string ToLocationCode { get; set; }
/// <summary>
/// 到库区
/// 到库区
/// </summary>
[Display(Name = "到库区")]
public string ToLocationArea { get; set; }
/// <summary>
/// 到库位组
/// 到库位组
/// </summary>
[Display(Name = "到库位组")]
public string ToLocationGroup { get; set; }
/// <summary>
/// 到ERP库位
/// 到ERP库位
/// </summary>
[Display(Name = "到ERP库位")]
[Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string ToLocationErpCode { get; set; }
/// <summary>
/// 到仓库
/// 到仓库
/// </summary>
[Display(Name = "到仓库")]
[Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string ToWarehouseCode { get; set; }
#endregion
#region 来源库位
/// <summary>
/// 在途库库位
/// 库位
/// </summary>
[Display(Name = "在途库库位")]
public string OnTheWayLocationCode { get; set; }
public string FromLocationCode { get; set; }
/// <summary>
/// 到库区
/// </summary>
public string FromLocationArea { get; set; }
/// <summary>
/// 收货单件码
/// 到库位组
/// </summary>
[Display(Name = "收货单件码")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string SingleCodeJob { get; set; }
public string FromLocationGroup { get; set; }
/// <summary>
/// 申请单件码
/// 到ERP库位
/// </summary>
[Display(Name = "申请单件码")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string SingleCodeRequest { get; set; }
public string FromLocationErpCode { get; set; }
/// <summary>
/// 过期时间
/// 到仓库
/// </summary>
[Display(Name = "过期时间")]
[Required(ErrorMessage = "{0}是必填项")]
public DateTime ExpiredTime { get; set; }
public string FromWarehouseCode { get; set; }
#endregion
#region 在途库位
/// <summary>
/// 工序
/// 在途库库位
/// </summary>
[Display(Name = "工序")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Operation { get; set; }
public string OnTheWayLocationCode { get; set; }
#endregion
/// <summary>
/// 配送方式
/// 申请单件码
/// </summary>
[Display(Name = "配送方式")]
public EnumDistributionType DistributionType { get; set; }
public string SingleCodeRequest { get; set; }
/// <summary>
/// 取整方式
/// 已发数量
/// </summary>
[Display(Name = "取整方式")]
public EnumTruncType TruncType { get; set; }
public decimal IssuedQty { get; set; }
/// <summary>
/// 取整后数量
/// 已收数量
/// </summary>
[Display(Name = "取整后数量")]
public decimal RoundedQty { get; set; }
public decimal ReceivedQty { get; set; }
/// <summary>
/// 计划拆分规则
/// 箱码
/// </summary>
[Display(Name = "计划拆分规则")]
public EnumPlannedSplitRule PlannedSplitRule { get; set; }
public string PackingCode { get; set; }
/// <summary>
/// 计划开始时间
/// 批次
/// </summary>
[Display(Name = "计划开始时间")]
public DateTime PlanBeginTime { get; set; }
public string Lot { get; set; }
/// <summary>
/// 每次配送数量
/// 过期时间
/// </summary>
[Display(Name = "每次配送数量")]
public decimal DeliveryQty { get; set; }
public DateTime ExpiredTime { get; set; }
/// <summary>
/// 位置码
/// 库位状态
/// </summary>
public string PositionCode { get; set; }
public EnumInventoryStatus EnumInventoryStatus { get; set; }
/// <summary>
/// 推荐类型
/// 请求未收
/// </summary>
public EnumRecommendType RecommendType { get; set; }
[NotMapped]
public decimal NotFinishQty => IssuedQty - ReceivedQty;
}

8
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/IThirdLocationNoteAppService.cs

@ -3,10 +3,16 @@ using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Win_in.Sfs.Wms.Store.Domain;
namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public interface IThirdLocationNoteAppService : ISfsStoreMasterReadOnlyAppServiceBase<ThirdLocationNoteDTO, SfsStoreRequestInputBase, ThirdLocationNoteDetailDTO, SfsStoreRequestInputBase>
{
/// <summary>
/// 创建 同时 直接赋值Number 为了返回Number
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
Task<ThirdLocationNote> CreateByNumberAsync(ThirdLocationNoteEditInput input);
}

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/IThirdLocationRequestAppService.cs

@ -9,5 +9,5 @@ public interface IThirdLocationRequestAppService
: ISfsStoreRequestMasterAppServiceBase<ThirdLocationRequestDTO, SfsStoreRequestInputBase, ThirdLocationRequestEditInput, ThirdLocationRequestDetailDTO, SfsStoreRequestInputBase>
{
Task UpdateRequestStatusAsync(string requestNumber);
}

101
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestDetailInput.cs

@ -1,5 +1,6 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
@ -7,81 +8,111 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class ThirdLocationRequestDetailInput : SfsStoreDetailWithQtyInputBase
{
#region 目标库位
/// <summary>
/// 目标库位
/// 库位
/// </summary>
[Display(Name = "目标库位")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string ToLocationCode { get; set; }
/// <summary>
/// 来源库位
/// 到库区
/// </summary>
public string ToLocationArea { get; set; }
/// <summary>
/// 到库位组
/// </summary>
public string ToLocationGroup { get; set; }
/// <summary>
/// 到ERP库位
/// </summary>
public string ToLocationErpCode { get; set; }
/// <summary>
/// 到仓库
/// </summary>
public string ToWarehouseCode { get; set; }
#endregion
#region 来源库位
/// <summary>
/// 到库位
/// </summary>
[Display(Name = "来源库位")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string FromLocationCode { get; set; }
/// <summary>
/// 来源库区
/// 库区
/// </summary>
[Display(Name = "来源库区")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string FromLocationArea { get; set; }
/// <summary>
/// 申请单件码
/// 到库位组
/// </summary>
[Display(Name = "申请单件码")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string SingleCodeRequest { get; set; }
public string FromLocationGroup { get; set; }
/// <summary>
/// 工作中心
/// 到ERP库位
/// </summary>
[Display(Name = "工作中心")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string WorkStation { get; set; }
public string FromLocationErpCode { get; set; }
/// <summary>
/// 过期时间
/// 到仓库
/// </summary>
[Display(Name = "过期时间")]
public DateTime ExpiredTime { get; set; }
public string FromWarehouseCode { get; set; }
#endregion
#region 在途库位
/// <summary>
/// 状态
/// 在途库库位
/// </summary>
[Display(Name = "状态")]
public EnumRequestStatus RequestStatus { get; set; } = EnumRequestStatus.New;
public string OnTheWayLocationCode { get; set; }
#endregion
/// <summary>
/// ERP储位
/// 申请单件码
/// </summary>
[Display(Name = "ERP储位")]
public string ToLocationErpCode { get; set; }
public string SingleCodeRequest { get; set; }
/// <summary>
/// 已发数量
/// 已发数量
/// </summary>
[Display(Name = "已发数量")]
public decimal IssuedQty { get; set; }
/// <summary>
/// 已收数量
/// 已收数量
/// </summary>
[Display(Name = "已收数量")]
public decimal ReceivedQty { get; set; }
/// <summary>
/// 位置
///
/// </summary>
public string PositionCode { get; set; }
public string PackingCode { get; set; }
/// <summary>
/// 推荐类型
/// 批次
/// </summary>
public EnumRecommendType RecommendType { get; set; }
public string Lot { get; set; }
/// <summary>
/// 过期时间
/// </summary>
public DateTime ExpiredTime { get; set; }
/// <summary>
/// 库位状态
/// </summary>
public EnumInventoryStatus EnumInventoryStatus { get; set; }
/// <summary>
/// 请求未收
/// </summary>
[NotMapped]
public decimal NotFinishQty => IssuedQty - ReceivedQty;
}

30
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/ThirdLocationRequests/Inputs/ThirdLocationRequestEditInput.cs

@ -6,41 +6,15 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public class ThirdLocationRequestEditInput : SfsStoreRequestCreateOrUpdateInputBase
{
#region Base
/// <summary>
/// 申请单件码
/// </summary>
[Display(Name = "生产线")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string SingleCodeRequest { get; set; }
/// <summary>
/// 使用在途库
/// </summary>
[Display(Name = "使用在途库")]
public bool UseOnTheWayLocation { get; set; }
#endregion
#region Create
/// <summary>
/// 要货单号
/// </summary>
[Display(Name = "要货单号")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Number { get; set; }
/// <summary>
/// 叫料类型
/// 三方库申请类型
/// </summary>
[Display(Name = "叫料类型")]
[Display(Name = "三方库申请类型")]
public string Type { get; set; }
/// <summary>
/// 明细列表
/// </summary>
[Display(Name = "明细列表")]
public List<ThirdLocationRequestDetailInput> Details { get; set; } = new List<ThirdLocationRequestDetailInput>();
#endregion
}

292
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ThirdLocationJobs/ThirdLocationJobAppService.cs

@ -4,6 +4,8 @@ using System.Linq;
using System.Linq.Expressions;
using System.Threading;
using System.Threading.Tasks;
using Castle.Components.DictionaryAdapter;
using IdentityServer4.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
@ -12,10 +14,14 @@ using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Entities;
using Volo.Abp.ObjectMapping;
using Volo.Abp.Uow;
using Volo.Abp.Users;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Basedata.Domain.Shared;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Shared.Event;
using Win_in.Sfs.Wms.Inventory.Application.Contracts;
using Win_in.Sfs.Wms.Inventory.Domain;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
using Win_in.Sfs.Wms.Store.Domain.Shared;
@ -29,12 +35,294 @@ public class ThirdLocationJobAppService
IThirdLocationJobAppService
{
private readonly IThirdLocationJobManager _thirdLocationJobManager;
private readonly ITransferLogAppService _transferLogAppService;
private readonly ILocationAppService _locationAppService;
private readonly IThirdLocationNoteAppService _thirdLocationNoteAppService;
private readonly ICurrentUser _currentUser;
protected IThirdLocationRequestAppService ThirdLocationRequestAppService =>
LazyServiceProvider.LazyGetRequiredService<IThirdLocationRequestAppService>();
public ThirdLocationJobAppService(
IThirdLocationJobRepository repository, IThirdLocationJobManager thirdLocationJobManager
) : base(repository, thirdLocationJobManager)
IThirdLocationJobRepository repository, IThirdLocationJobManager thirdLocationJobManager,
ITransferLogAppService transferLogAppService, ILocationAppService locationAppService, IThirdLocationNoteAppService thirdLocationNoteAppService, ICurrentUser currentUser) : base(repository, thirdLocationJobManager)
{
_thirdLocationJobManager = thirdLocationJobManager;
_transferLogAppService = transferLogAppService;
_locationAppService = locationAppService;
_thirdLocationNoteAppService = thirdLocationNoteAppService;
_currentUser = currentUser;
}
[HttpPost("")]
public override async Task<ThirdLocationJobDTO> CreateAsync(ThirdLocationJobEditInput input)
{
input.JobStatus = EnumJobStatus.Open;
var result = await base.CreateAsync(input).ConfigureAwait(false);
var buildTransferLogsAsync = await BuildTransferLogsByToTransportAsync(result).ConfigureAwait(false);
await AddTransferLogsAsync(buildTransferLogsAsync).ConfigureAwait(false);
return result;
}
[HttpPost("add-many")]
public override async Task<List<ThirdLocationJobDTO>> CreateManyAsync(List<ThirdLocationJobEditInput> inputs)
{
var thirdLocationJobDtos = new List<ThirdLocationJobDTO>();
foreach (var input in inputs)
{
thirdLocationJobDtos.Add(await CreateAsync(input).ConfigureAwait(false));
}
return thirdLocationJobDtos;
}
/// <summary>
/// 执行任务明细
/// </summary>
/// <returns></returns>
[HttpPost("ExecuteDetail/{masterId}")]
public async Task ExecuteDetailAsync(Guid masterId,List<ThirdLocationJobDetailDTO> detailDtoList)
{
var thirdLocationJob=await _repository.GetAsync(masterId).ConfigureAwait(false);
thirdLocationJob.JobStatus = EnumJobStatus.Partial;
var tempDetailDto= new List<ThirdLocationJobDetailDTO>();
var entityList=ObjectMapper.Map<List<ThirdLocationJobDetail>, List<ThirdLocationJobDetailDTO>>(thirdLocationJob.Details);
foreach (var detailDto in detailDtoList)//为了不用DTO的赋值
{
var jobDetailDto=entityList.First(p => p.Id == detailDto.Id);
jobDetailDto.HandledQty = detailDto.HandledQty;
jobDetailDto.RecommendQty = detailDto.RecommendQty;
tempDetailDto.Add(jobDetailDto);
thirdLocationJob.Details.First(p => p.Id == detailDto.Id).ReceivedQty += detailDto.HandledQty;
}
var transferLogs = await BuildTransferLogsByFromTransportAsync(thirdLocationJob, tempDetailDto).ConfigureAwait(false);
await _transferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false);
var jobDto=await GetAsync(masterId).ConfigureAwait(false);
var tempDetailDtos = new List<ThirdLocationJobDetailDTO>();
foreach (var detailDto in detailDtoList)
{
var temp=jobDto.Details.First(p => p.Id == detailDto.Id);
temp.HandledQty=detailDto.HandledQty;
temp.RecommendQty = detailDto.RecommendQty;
tempDetailDtos.Add(temp);
}
jobDto.Details = tempDetailDtos;
var input =await BuildThirdLocationNoteAsync(jobDto).ConfigureAwait(false);
var noteDto = await _thirdLocationNoteAppService.CreateByNumberAsync(input).ConfigureAwait(false);
await UpdateJobStatusAsync(thirdLocationJob).ConfigureAwait(false);
await _repository.UpdateAsync(thirdLocationJob).ConfigureAwait(false);
}
/// <summary>
/// 完成任务
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpPost("Complete/{id}")]
public async Task CompleteAsync(Guid id)
{
var kittingIssueJob = await _repository.FindAsync(id).ConfigureAwait(false);
kittingIssueJob.JobStatus = EnumJobStatus.Done;
var entity=await _repository.UpdateAsync(kittingIssueJob).ConfigureAwait(false);
var dto=ObjectMapper.Map<ThirdLocationJob, ThirdLocationJobDTO>(entity);
var transferLogEditInputs=await BuildTransferLogsByBackFromAsync(dto).ConfigureAwait(false);
await AddTransferLogsAsync(transferLogEditInputs).ConfigureAwait(false);
await ThirdLocationRequestAppService.UpdateRequestStatusAsync(kittingIssueJob.RequestNumber).ConfigureAwait(false);
}
[HttpPost("Get-By-Request-Number")]
public async Task<List<ThirdLocationJobDTO>> GetByRequestNumberAsync(string requestNumber)
{
var list=await _repository.GetListAsync(p => p.RequestNumber == requestNumber).ConfigureAwait(false);
return ObjectMapper.Map<List<ThirdLocationJob>, List<ThirdLocationJobDTO>>(list);
}
[HttpPost("accept/{id}")]
[UnitOfWork]
public override async Task AcceptAsync(Guid id)
{
var entity = await _repository.FindAsync(id).ConfigureAwait(false);
entity.IsClaims = true;
entity.ClaimsUserName = _currentUser.UserName;
entity.ClaimsUserId = _currentUser.Id.ToString();
entity.AcceptTime = Clock.Now;
await _repository.UpdateAsync(entity).ConfigureAwait(false);
}
/// <summary>
/// 取消承接任务
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpPost("cancel-accept/{id}")]
[UnitOfWork]
public override async Task CancelAcceptAsync(Guid id)
{
var entity = await _repository.FindAsync(id).ConfigureAwait(false);
entity.IsClaims = false;
entity.ClaimsUserName = string.Empty;
entity.ClaimsUserId = string.Empty;
entity.AcceptTime = DateTime.Now;
await _repository.UpdateAsync(entity).ConfigureAwait(false);
}
#region 私有
private async Task UpdateJobStatusAsync(ThirdLocationJob thirdLocationJob)
{
var flag = true;
foreach (var detail in thirdLocationJob.Details)
{
if (detail.IssuedQty > detail.ReceivedQty)
{
flag = false;
break;
}
}
if (flag)
{
thirdLocationJob.JobStatus = EnumJobStatus.Done;
}
await _repository.UpdateAsync(thirdLocationJob).ConfigureAwait(false);
await ThirdLocationRequestAppService.UpdateRequestStatusAsync(thirdLocationJob.RequestNumber).ConfigureAwait(false);
await Task.CompletedTask.ConfigureAwait(false);
}
private async Task AddTransferLogsAsync(List<TransferLogEditInput> inputList)
{
var transferLogs = new List<TransferLogEditInput>();
transferLogs.AddRange(inputList);
await _transferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false);
}
private async Task<ThirdLocationNoteEditInput> BuildThirdLocationNoteAsync(ThirdLocationJobDTO jobDto)
{
await Task.CompletedTask.ConfigureAwait(false);
return ObjectMapper.Map<ThirdLocationJobDTO, ThirdLocationNoteEditInput>(jobDto);
}
/// <summary>
/// 创建库移 从from到在途
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
private async Task<List<TransferLogEditInput>> BuildTransferLogsByToTransportAsync(ThirdLocationJobDTO dto)
{
//获取在途库
var transportLocation =await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT).ConfigureAwait(false);
var transferLog = new List<TransferLogEditInput>();
foreach (var detailDto in dto.Details)
{
var transferLogEditInput = ObjectMapper.Map<ThirdLocationJobDetailDTO, TransferLogEditInput>(detailDto);
transferLogEditInput.TransType = EnumTransType.Transfer;
transferLogEditInput.DocNumber = dto.Number;
transferLogEditInput.JobNumber = dto.Number;
transferLogEditInput.Remark = $"目标库位:{detailDto.ToLocationCode.Clone()}";
transferLogEditInput.ToLocationCode = transportLocation.Code;
transferLogEditInput.ToLocationErpCode = transportLocation.ErpLocationCode;
transferLogEditInput.ToLocationArea = transportLocation.AreaCode;
transferLogEditInput.ToLocationGroup = transportLocation.LocationGroupCode;
transferLogEditInput.ToWarehouseCode = transportLocation.WarehouseCode;
transferLog.Add(transferLogEditInput);
}
await Task.CompletedTask.ConfigureAwait(false);
return transferLog;
}
/// <summary>
/// 创建库移 从在途到To
/// </summary>
/// <param name="entity"></param>
/// <param name="detailDtos"></param>
/// <returns></returns>
private async Task<List<TransferLogEditInput>> BuildTransferLogsByFromTransportAsync(ThirdLocationJob entity, List<ThirdLocationJobDetailDTO> detailDtos)
{
//获取在途库
var transportLocation =await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT).ConfigureAwait(false);
var transferLog = new List<TransferLogEditInput>();
foreach (var detail in entity.Details)
{
var transferLogEditInput = ObjectMapper.Map<ThirdLocationJobDetail, TransferLogEditInput>(detail);
transferLogEditInput.TransType = EnumTransType.Transfer;
transferLogEditInput.DocNumber = entity.Number;
transferLogEditInput.JobNumber = entity.Number;
transferLogEditInput.Remark = $"来源库位:{detail.FromLocationCode.Clone()}";
transferLogEditInput.FromLocationCode = transportLocation.Code;
transferLogEditInput.FromLocationErpCode = transportLocation.ErpLocationCode;
transferLogEditInput.FromLocationArea = transportLocation.AreaCode;
transferLogEditInput.FromLocationGroup = transportLocation.LocationGroupCode;
transferLogEditInput.FromWarehouseCode = transportLocation.WarehouseCode;
transferLogEditInput.Qty = detailDtos.First(p => p.Id == detail.Id).HandledQty;
transferLog.Add(transferLogEditInput);
}
await Task.CompletedTask.ConfigureAwait(false);
return transferLog;
}
private async Task<List<TransferLogEditInput>> BuildTransferLogsByBackFromAsync(ThirdLocationJobDTO dto)
{
//获取在途库
var transportLocation = await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT).ConfigureAwait(false);
var transferLog = new List<TransferLogEditInput>();
foreach (var detailDto in dto.Details)
{
var transferLogEditInput = ObjectMapper.Map<ThirdLocationJobDetailDTO, TransferLogEditInput>(detailDto);
transferLogEditInput.TransType = EnumTransType.Transfer;
transferLogEditInput.DocNumber = dto.Number;
transferLogEditInput.JobNumber = dto.Number;
transferLogEditInput.FromLocationCode = transportLocation.Code;
transferLogEditInput.FromLocationErpCode = transportLocation.ErpLocationCode;
transferLogEditInput.FromLocationArea = transportLocation.AreaCode;
transferLogEditInput.FromLocationGroup = transportLocation.LocationGroupCode;
transferLogEditInput.FromWarehouseCode = transportLocation.WarehouseCode;
transferLogEditInput.ToLocationCode = detailDto.FromLocationCode;
transferLogEditInput.ToLocationErpCode = detailDto.FromLocationErpCode;
transferLogEditInput.ToLocationArea = detailDto.FromLocationArea;
transferLogEditInput.ToLocationGroup = detailDto.FromLocationGroup;
transferLogEditInput.ToWarehouseCode = detailDto.ToWarehouseCode;
transferLogEditInput.Qty = detailDto.IssuedQty - detailDto.ReceivedQty;
transferLog.Add(transferLogEditInput);
}
await Task.CompletedTask.ConfigureAwait(false);
return transferLog;
}
#endregion
}

91
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PutawayNotes/PutawayNoteAppService.cs

@ -17,6 +17,8 @@ using Win_in.Sfs.Wms.Store.Domain.Shared;
namespace Win_in.Sfs.Wms.Store.Application;
using System.Linq;
using Volo.Abp.ObjectMapping;
using Win_in.Sfs.Basedata.Application;
using Win_in.Sfs.Basedata.Application.Contracts;
[Authorize]
@ -33,6 +35,7 @@ public class PutawayNoteAppService :
public readonly IPurchasePriceSheetAppService _purchasePriceSheetAppService;
public readonly IErpLocationItemAppService _erpLocationItemAppService;
public readonly IItemBasicAppService _itemBasicAppService;
public readonly ISplitPackingRecAppService _splitPackingRecAppService;
public PutawayNoteAppService(
IPutawayNoteRepository repository,
@ -42,7 +45,7 @@ public class PutawayNoteAppService :
IPurchaseOrderManager purchaseOrderManager,
IPurchasePriceSheetAppService purchasePriceSheetAppService,
IErpLocationItemAppService erpLocationItemAppService,
IItemBasicAppService itemBasicAppService) : base(repository)
IItemBasicAppService itemBasicAppService, ISplitPackingRecAppService splitPackingRecAppService) : base(repository)
{
_putawayNoteManager = putawayNoteManager;
_purchaseReceiptNoteAppService = purchaseReceiptNoteAppService;
@ -51,6 +54,7 @@ public class PutawayNoteAppService :
_purchasePriceSheetAppService = purchasePriceSheetAppService;
_erpLocationItemAppService = erpLocationItemAppService;
_itemBasicAppService = itemBasicAppService;
_splitPackingRecAppService = splitPackingRecAppService;
}
/// <summary>
@ -62,45 +66,76 @@ public class PutawayNoteAppService :
//[Authorize(PutawayNotePermissions.Create)]
public override async Task<PutawayNoteDTO> CreateAsync(PutawayNoteEditInput input)
{
foreach (var detail in input.Details)
var inputSplits = new List<PutawayNoteEditInput>();
var resultPutawayNote=new List<PutawayNote>();
//先获取所有的箱码
var selectPackingCode=input.Details.Select(p => p.ToPackingCode);
var splitPackingRecList = await _splitPackingRecAppService.GetListByToPackingCode(selectPackingCode.ToList()).ConfigureAwait(false);
//按照不同的条件分组
var group= splitPackingRecList.GroupBy(p => new {
p.SupplierCode,p.AsnNumber,p.PoNumber
});
foreach (var groupWhere in group)
{
var isClosed = await _purchaseOrderManager.CheckIsCloseAsync(input.Number, input.SupplierCode, detail.ItemCode).ConfigureAwait(false);
if (isClosed)
var tempEditInput = new PutawayNoteEditInput();
tempEditInput.Details = new List<PutawayNoteDetailInput>();
tempEditInput.SupplierCode = groupWhere.First().SupplierCode;
tempEditInput.AsnNumber = groupWhere.First().AsnNumber;
tempEditInput.InspectNumber = string.Empty;
tempEditInput.JobNumber = string.Empty;
tempEditInput.ProductReceiptNumber = string.Empty;
tempEditInput.PurchaseReceiptRequestNumber = string.Empty;
tempEditInput.Type = EnumPutawayType.PurchasePutaway;
foreach (var packingCode in groupWhere)
{
throw new UserFriendlyException($"物品名称【{detail.ItemCode}】的订单明细行以关闭无法执行采购上架!");
var detailInput=input.Details.First(p => p.ToPackingCode == packingCode.ToPackingCode);
tempEditInput.Details.Add(detailInput);
}
var item = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false);
if (!item.CanMake)
inputSplits.Add(tempEditInput);
}
foreach (var inputSplit in inputSplits)
{
foreach (var detail in inputSplit.Details)
{
var isprice = await _purchasePriceSheetAppService.CheckPurPriceAsync(input.SupplierCode, detail.ItemCode).ConfigureAwait(false);
if (isprice)
var isClosed = await _purchaseOrderManager.CheckIsCloseAsync(inputSplit.Number, inputSplit.SupplierCode, detail.ItemCode).ConfigureAwait(false);
if (isClosed)
{
throw new UserFriendlyException($"供应商【{input.SupplierCode}】物品名称【{detail.ItemCode}】无采购价格无法执行采购上架!");
throw new UserFriendlyException($"物品名称【{detail.ItemCode}】的订单明细行以关闭无法执行采购上架!");
}
}
var erpLocationItem = await _erpLocationItemAppService.CheckItemErpLocationIsAvailable(detail.ItemCode, detail.ToLocationErpCode).ConfigureAwait(false);
var item = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false);
if (!item.CanMake)
{
var isprice = await _purchasePriceSheetAppService.CheckPurPriceAsync(inputSplit.SupplierCode, detail.ItemCode).ConfigureAwait(false);
if (isprice)
{
throw new UserFriendlyException($"供应商【{inputSplit.SupplierCode}】物品名称【{detail.ItemCode}】无采购价格无法执行采购上架!");
}
}
var erpLocationItem = await _erpLocationItemAppService.CheckItemErpLocationIsAvailable(detail.ItemCode, detail.ToLocationErpCode).ConfigureAwait(false);
if (erpLocationItem == null)
{
throw new UserFriendlyException($"未找到物品【{detail.ItemCode}】与ERP储位【{detail.ToLocationErpCode}】的开账信息");
}
var purchasereDetail = await _purchaseReceiptNoteAppService
.GetDetailByItemAndPackingAsync(detail.ItemCode, detail.ToPackingCode).ConfigureAwait(false);
if (purchasereDetail != null)
{
var inspectJobDto = await _inspectJobAppService
.GetInspectNoteDetailByPackingCodeAsync(detail.ToPackingCode).ConfigureAwait(false);
if (inspectJobDto.JobStatus != EnumJobStatus.Done)
if (erpLocationItem == null)
{
throw new UserFriendlyException($"包含【{detail.ToPackingCode}】箱码的报检单,尚未完成质检");
throw new UserFriendlyException($"未找到物品【{detail.ItemCode}】与ERP储位【{detail.ToLocationErpCode}】的开账信息");
}
var purchasereDetail = await _purchaseReceiptNoteAppService
.GetDetailByItemAndPackingAsync(detail.ItemCode, detail.ToPackingCode).ConfigureAwait(false);
if (purchasereDetail != null)
{
var inspectJobDto = await _inspectJobAppService
.GetInspectNoteDetailByPackingCodeAsync(detail.ToPackingCode).ConfigureAwait(false);
if (inspectJobDto.JobStatus != EnumJobStatus.Done)
{
throw new UserFriendlyException($"包含【{detail.ToPackingCode}】箱码的报检单,尚未完成质检");
}
}
}
var entity = ObjectMapper.Map<PutawayNoteEditInput, PutawayNote>(inputSplit);
resultPutawayNote.Add( await _putawayNoteManager.CreateByPurchaseAsync(entity).ConfigureAwait(false));
}
var entity = ObjectMapper.Map<PutawayNoteEditInput, PutawayNote>(input);
var result = await _putawayNoteManager.CreateByPurchaseAsync(entity).ConfigureAwait(false);
var dto = ObjectMapper.Map<PutawayNote, PutawayNoteDTO>(result);
var dto = ObjectMapper.Map<PutawayNote, PutawayNoteDTO>(resultPutawayNote.First());
return dto;
}

23
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ThirdLocationNotes/ThirdLocationNoteAppService.cs

@ -9,7 +9,9 @@ using Microsoft.AspNetCore.Mvc;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Entities;
using Volo.Abp.ObjectMapping;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Shared.Event;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
@ -33,4 +35,25 @@ public class ThirdLocationNoteAppService :
{
_thirdLocationNoteManager = thirdLocationNoteManager;
}
/// <summary>
/// 创建 同时 直接赋值Number 为了返回Number
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
[HttpPost("Create-By-Number")]
public virtual async Task<ThirdLocationNote> CreateByNumberAsync(ThirdLocationNoteEditInput input)
{
var entity=ObjectMapper.Map<ThirdLocationNoteEditInput, ThirdLocationNote>(input);
var number = string.IsNullOrEmpty(entity.Number)
? await GenerateNumberAsync(nameof(AssembleIssueRequest), entity.ActiveDate).ConfigureAwait(false)
: entity.Number;
entity.SetIdAndNumberWithDetails(GuidGenerator, number);
await _repository.InsertAsync(entity, true).ConfigureAwait(false);
await LocalEventBus.PublishAsync(new SfsCreatedEntityEventData<ThirdLocationNote>(entity), false)
.ConfigureAwait(false);
return entity;
}
}

28
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs

@ -474,6 +474,34 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase
{
packRec.PurchaseInfo_PoNumber = inventoryLabelDto.PoNumber;
packRec.PurchaseInfo_AsnNumber = inventoryLabelDto.AsnNumber;
#region InventoryLabel兼容成员
var inputObj = inventoryLabelDto;
packRec.FullBarcodeString = inputObj.FullBarcodeString;
packRec.SupplierBatch = inputObj.SupplierBatch;
packRec.ArriveDate = inputObj.ArriveDate;
packRec.ProduceDate = inputObj.ProduceDate;
packRec.ExpireDate = inputObj.ExpireDate;
packRec.LabelStatus = (Win_in.Sfs.Basedata.LabelStatus)((int)inputObj.LabelStatus);
packRec.RecommendLocationCode = inputObj.RecommendLocationCode;
packRec.LocationErpCode = inputObj.LocationErpCode;
packRec.ContainerCode = inputObj.ContainerCode;
packRec.QLevel = inputObj.QLevel;//
packRec.QualityFile = inputObj.QualityFile;
packRec.SupplierCode = inputObj.SupplierCode;
packRec.PoNumber = inputObj.PoNumber;
packRec.RpNumber = inputObj.RpNumber;
packRec.AsnNumber = inputObj.AsnNumber;
packRec.ProdLine = inputObj.ProdLine;
packRec.Team = inputObj.Team;
packRec.Shift = inputObj.Shift;//
packRec.Specifications = inputObj.Specifications;
packRec.SupplierName = inputObj.SupplierName;
packRec.SupplierSimpleName = inputObj.SupplierSimpleName;
packRec.SupplierItemCode = inputObj.SupplierItemCode;
packRec.SupplierItemName = inputObj.SupplierItemName;
packRec.PlanArriveDate = inputObj.PlanArriveDate;
#endregion
}
recLst.Add(packRec);
}

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

@ -232,7 +232,7 @@ ISupplierItemAppService supplierItemAppService) : base(repository)
{
if (result.All(p => p.Code != itemCode))
{
throw new UserFriendlyException($"供应商代码【{itemCode}】不存在");
throw new UserFriendlyException($"ERP料号代码【{itemCode}】不存在");
}
}

203
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAppService.cs

@ -5,6 +5,7 @@ using System.Linq;
using System.Linq.Expressions;
using System.Threading;
using System.Threading.Tasks;
using Castle.Components.DictionaryAdapter;
using DocumentFormat.OpenXml.Office.PowerPoint.Y2021.M06.Main;
using DocumentFormat.OpenXml.Vml.Office;
using IdentityModel;
@ -40,49 +41,183 @@ public class ThirdLocationRequestAppService : SfsStoreRequestAppServiceBase<Thir
IThirdLocationRequestAppService
{
private readonly IThirdLocationRequestManager _thirdLocationRequestManager;
private readonly IItemStoreRelationAppService _itemStoreRelationApp;
private readonly IAreaAppService _areaApp;
private readonly ILocationAppService _locationAppService;
private readonly IItemBasicAppService _itemBasicAppService;
private readonly IProductionLineAppService _productionLineAppService;
private readonly IInjectionIssueJobAppService _issueJobAppService;
private readonly ITransactionTypeAppService _transactionTypeAppService;
private readonly IExpectOutAppService _expectOutAppService;
private readonly IBalanceAppService _balanceAppService;
private readonly IItemBasicAppService _itemBasicAppService;
private readonly IThirdLocationJobAppService _thirdLocationJobAppService;
private readonly IThirdLocationJobRepository _thirdLocationJobRepository;
private readonly IBalanceManager _balanceManager;
public ThirdLocationRequestAppService(
IThirdLocationRequestRepository repository,
IThirdLocationJobAppService thirdLocationJobAppService,
IThirdLocationJobRepository thirdLocationJobRepository,
IThirdLocationRequestManager thirdLocationRequestManager,
IPreparationPlanManager preparationPlanManager,
IItemStoreRelationAppService itemStoreRelationApp,
IAreaAppService areaApp,
ILocationAppService locationAppService,
IItemBasicAppService itemBasicAppService,
IProductionLineAppService productionLineAppService,
ITransactionTypeAppService transactionTypeAppService,
IExpectOutAppService expectOutAppService,
IBalanceAppService balanceAppService,
IBalanceManager balanceManager,
IInjectionIssueJobAppService issueJobAppService)
IThirdLocationRequestRepository repository, IThirdLocationRequestManager thirdLocationRequestManager, ILocationAppService locationAppService, IBalanceAppService balanceAppService, IItemBasicAppService itemBasicAppService, IThirdLocationJobAppService thirdLocationJobAppService)
: base(repository, thirdLocationRequestManager)
{
_thirdLocationRequestManager = thirdLocationRequestManager;
_itemStoreRelationApp = itemStoreRelationApp;
_areaApp = areaApp;
_locationAppService = locationAppService;
_balanceAppService = balanceAppService;
_itemBasicAppService = itemBasicAppService;
_productionLineAppService = productionLineAppService;
_issueJobAppService = issueJobAppService;
_transactionTypeAppService = transactionTypeAppService;
_expectOutAppService= expectOutAppService;
_balanceAppService= balanceAppService;
_thirdLocationJobAppService= thirdLocationJobAppService;
_thirdLocationJobRepository= thirdLocationJobRepository;
_balanceManager= balanceManager;
_thirdLocationJobAppService = thirdLocationJobAppService;
}
[HttpPost("")]
public override async Task<ThirdLocationRequestDTO> CreateAsync(ThirdLocationRequestEditInput input)
{
foreach (var detailInput in input.Details)
{
var transportLocationDto = await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT).ConfigureAwait(false);
var fromLocationDto=await _locationAppService.GetByCodeAsync(detailInput.FromLocationCode).ConfigureAwait(false);
var toLocationDto = await _locationAppService.GetByCodeAsync(detailInput.FromLocationCode).ConfigureAwait(false);
var itemBasicDto= await _itemBasicAppService.GetByCodeAsync(detailInput.ItemCode).ConfigureAwait(false);
detailInput.OnTheWayLocationCode = transportLocationDto.Code;
if (fromLocationDto == null)
{
throw new UserFriendlyException($"库位【{detailInput.FromLocationCode}】不存在");
}
if (toLocationDto == null)
{
throw new UserFriendlyException($"库位【{detailInput.ToLocationCode}】不存在");
}
if (itemBasicDto == null)
{
throw new UserFriendlyException($"ERP料号【{detailInput.ItemCode}】不存在");
}
detailInput.FromLocationArea = fromLocationDto.AreaCode;
detailInput.FromLocationErpCode = fromLocationDto.ErpLocationCode;
detailInput.FromWarehouseCode= fromLocationDto.WarehouseCode;
detailInput.FromLocationGroup = fromLocationDto.LocationGroupCode;
detailInput.ToLocationArea = toLocationDto.AreaCode;
detailInput.ToLocationErpCode = toLocationDto.ErpLocationCode;
detailInput.ToWarehouseCode = toLocationDto.WarehouseCode;
detailInput.ToLocationGroup = toLocationDto.LocationGroupCode;
detailInput.ItemName = itemBasicDto.Name;
detailInput.ItemDesc1 = itemBasicDto.Name;
detailInput.ItemDesc2= itemBasicDto.Name;
var balanceDto = await _balanceAppService.GetRealQtyByPackingCodeAndItemCodeAndLocationCodeAndStatusAsync(detailInput.PackingCode, detailInput.ItemCode, detailInput.FromLocationCode, detailInput.EnumInventoryStatus, detailInput.Lot).ConfigureAwait(false);
if (balanceDto == null || balanceDto.Qty <= 0)
{
throw new UserFriendlyException($"ERP料号【{detailInput.ItemCode}】,箱码【{detailInput.PackingCode}】,批次【{detailInput.Lot}】,库位【{detailInput.FromLocationCode}】,状态【{detailInput.EnumInventoryStatus}】的库存,可用余额为【{balanceDto.Qty}】,无法使用。");
}
detailInput.ExpiredTime = balanceDto.ExpireDate;
detailInput.StdPackQty=balanceDto.StdPackQty;
detailInput.Uom=balanceDto.Uom;
detailInput.EnumInventoryStatus = balanceDto.Status;
}
var entity = ObjectMapper.Map<ThirdLocationRequestEditInput, ThirdLocationRequest>(input);
var result =await _thirdLocationRequestManager.CreateByNumberAsync(entity).ConfigureAwait(false);
var requestDto = ObjectMapper.Map<ThirdLocationRequest, ThirdLocationRequestDTO>(result);
var thirdLocationJobAsync=await BuildThirdLocationJobAsync(requestDto).ConfigureAwait(false);
await _thirdLocationJobAppService.CreateManyAsync(thirdLocationJobAsync).ConfigureAwait(false);
return requestDto;
}
[HttpPost("Update-Request-Status")]
public async Task UpdateRequestStatusAsync(string requestNumber)
{
var thirdLocationRequest=await _repository.GetAsync(p=>p.Number==requestNumber).ConfigureAwait(false);
var jobDtos=await _thirdLocationJobAppService.GetByRequestNumberAsync(requestNumber).ConfigureAwait(false);
var noFinsh=jobDtos.Any(p => p.JobStatus == EnumJobStatus.Open ||
p.JobStatus == EnumJobStatus.Doing ||
p.JobStatus == EnumJobStatus.Wait ||
p.JobStatus == EnumJobStatus.Partial);
if (noFinsh==false)
{
thirdLocationRequest.RequestStatus = EnumRequestStatus.Completed;
await _repository.UpdateAsync(thirdLocationRequest).ConfigureAwait(false);
}
}
public override async Task<ThirdLocationRequestDTO> CompleteAsync(Guid id)
{
var thirdLocationRequest = await _repository.GetAsync(id).ConfigureAwait(false);
if (thirdLocationRequest.RequestStatus == EnumRequestStatus.Handling ||
thirdLocationRequest.RequestStatus == EnumRequestStatus.Partial ||
thirdLocationRequest.RequestStatus == EnumRequestStatus.New)
{
}
else
{
throw new UserFriendlyException($"【{thirdLocationRequest.RequestStatus.GetDisplayName()}】状态不允许完成");
}
var jobDtos=await _thirdLocationJobAppService.GetByRequestNumberAsync(thirdLocationRequest.Number).ConfigureAwait(false);
foreach (var job in jobDtos)
{
await _thirdLocationJobAppService.CompleteAsync(job.Id).ConfigureAwait(false);
}
thirdLocationRequest.RequestStatus = EnumRequestStatus.Completed;
var entity=await _repository.UpdateAsync(thirdLocationRequest).ConfigureAwait(false);
return ObjectMapper.Map<ThirdLocationRequest, ThirdLocationRequestDTO>(entity);
}
public override async Task<ThirdLocationRequestDTO> CancelAsync(Guid id)
{
var thirdLocationRequest = await _repository.GetAsync(id).ConfigureAwait(false);
if (thirdLocationRequest.RequestStatus == EnumRequestStatus.Handling ||
thirdLocationRequest.RequestStatus == EnumRequestStatus.Partial ||
thirdLocationRequest.RequestStatus == EnumRequestStatus.New)
{
}
else
{
throw new UserFriendlyException($"【{thirdLocationRequest.RequestStatus.GetDisplayName()}】状态不允许取消");
}
var jobDtos = await _thirdLocationJobAppService.GetByRequestNumberAsync(thirdLocationRequest.Number).ConfigureAwait(false);
foreach (var job in jobDtos)
{
await _thirdLocationJobAppService.CompleteAsync(job.Id).ConfigureAwait(false);
}
thirdLocationRequest.RequestStatus = EnumRequestStatus.Cancelled;
var entity = await _repository.UpdateAsync(thirdLocationRequest).ConfigureAwait(false);
return ObjectMapper.Map<ThirdLocationRequest, ThirdLocationRequestDTO>(entity);
}
#region 私有
private async Task<List<ThirdLocationJobEditInput>> BuildThirdLocationJobAsync(ThirdLocationRequestDTO requestDto)
{
var inputsDict = new Dictionary<string, ThirdLocationJobEditInput>();
var groupBy = requestDto.Details.GroupBy(p => p.ItemCode);
var thirdLocationJobEditInputs = new List<ThirdLocationJobEditInput>();
foreach (var itemCodeGroupBy in groupBy)
{
var list = itemCodeGroupBy.ToList();//当前零件所有的集合
var mastEditInput = ObjectMapper.Map<ThirdLocationRequestDTO, ThirdLocationJobEditInput>(requestDto);
mastEditInput.Details = new List<ThirdLocationJobDetailInput>();
mastEditInput.Worker = requestDto.Worker;
mastEditInput.WarehouseCode = list.First().ToWarehouseCode;
var tempJobDetailInputs = ObjectMapper.Map<List<ThirdLocationRequestDetailDTO>, List<ThirdLocationJobDetailInput>>(list);
tempJobDetailInputs.ForEach(p =>
{
p.IssuedQty = p.RecommendQty;
p.IssueTime = DateTime.Now;
});
mastEditInput.Details = tempJobDetailInputs;
thirdLocationJobEditInputs.Add(mastEditInput);
}
await Task.CompletedTask.ConfigureAwait(false);
return thirdLocationJobEditInputs;
}
#endregion
}

59
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAutoMapperProfile.cs

@ -1,6 +1,7 @@
using AutoMapper;
using Volo.Abp.AutoMapper;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Inventory.Application.Contracts;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
@ -18,10 +19,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile
CreateMap<ThirdLocationRequestDetailInput, ThirdLocationRequestDetail>()
.IgnoreAuditedObjectProperties()
.Ignore(x => x.ToLocationArea)
.Ignore(x => x.IssuedQty)
.Ignore(x => x.ToLocationGroup)
.Ignore(x => x.ToWarehouseCode)
.Ignore(x => x.MasterID)
.Ignore(x => x.TenantId)
.Ignore(x => x.Number)
@ -64,5 +61,59 @@ public partial class StoreApplicationAutoMapperProfile : Profile
.IgnoreAuditedObjectProperties()
.Ignore(x => x.RequestStatus)
.Ignore(x => x.ConcurrencyStamp).Ignore(x => x.Id);
CreateMap<ThirdLocationJobDetailDTO, TransferLogEditInput>()
.Ignore(x => x.DocNumber)
.Ignore(x => x.JobNumber)
.Ignore(x => x.Worker)
.Ignore(x => x.TransType)
.Ignore(x => x.ExtraProperties)
.Ignore(x => x.TransSubType)
.ForMember(x => x.Qty, y => y.MapFrom(t => t.HandledQty))
.ForMember(x => x.SupplierBatch, y => y.MapFrom(t => t.HandledSupplierBatch))
.ForMember(x => x.ArriveDate, y => y.MapFrom(t => t.HandledArriveDate))
.ForMember(x => x.ProduceDate, y => y.MapFrom(t => t.HandledProduceDate))
.ForMember(x => x.ExpireDate, y => y.MapFrom(t => t.ExpiredTime))
.ForMember(x => x.FromPackingCode, y => y.MapFrom(t => t.HandledPackingCode))
.ForMember(x => x.FromContainerCode, y => y.MapFrom(t => t.HandledContainerCode))
.ForMember(x => x.FromLot, y => y.MapFrom(t => t.HandledLot))
.ForMember(x => x.FromStatus, y => y.MapFrom(t => t.Status))
.ForMember(x => x.ToLot, y => y.MapFrom(t => t.HandledLot))
.ForMember(x => x.ToStatus, y => y.MapFrom(t => t.Status))
.ForMember(x => x.ToPackingCode, y => y.MapFrom(t => t.HandledPackingCode))
.ForMember(x => x.ToContainerCode, y => y.MapFrom(t => t.HandledContainerCode))
;
CreateMap<ThirdLocationJobDetail, TransferLogEditInput>()
.Ignore(x => x.DocNumber)
.Ignore(x => x.JobNumber)
.Ignore(x => x.Worker)
.Ignore(x => x.TransType)
.Ignore(x => x.ExtraProperties)
.Ignore(x => x.TransSubType)
.ForMember(x => x.Qty, y => y.MapFrom(t => t.HandledQty))
.ForMember(x => x.SupplierBatch, y => y.MapFrom(t => t.HandledSupplierBatch))
.ForMember(x => x.ArriveDate, y => y.MapFrom(t => t.HandledArriveDate))
.ForMember(x => x.ProduceDate, y => y.MapFrom(t => t.HandledProduceDate))
.ForMember(x => x.ExpireDate, y => y.MapFrom(t => t.ExpiredTime))
.ForMember(x => x.FromPackingCode, y => y.MapFrom(t => t.HandledPackingCode))
.ForMember(x => x.FromContainerCode, y => y.MapFrom(t => t.HandledContainerCode))
.ForMember(x => x.FromLot, y => y.MapFrom(t => t.HandledLot))
.ForMember(x => x.FromStatus, y => y.MapFrom(t => t.Status))
.ForMember(x => x.ToLot, y => y.MapFrom(t => t.HandledLot))
.ForMember(x => x.ToStatus, y => y.MapFrom(t => t.Status))
.ForMember(x => x.ToPackingCode, y => y.MapFrom(t => t.HandledPackingCode))
.ForMember(x => x.ToContainerCode, y => y.MapFrom(t => t.HandledContainerCode))
;
}
}

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

@ -32,6 +32,9 @@ public enum EnumExchangeDataType
//回收料调整
Item_Transform = 28,
//半成品上架
SemiPutaway = 29,
SemiPutaway = 29,
/// <summary>
/// 客户退货
/// </summary>
CustomerReturn = 30,
}

7
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/IThirdLocationRequestManager.cs

@ -7,5 +7,10 @@ using Win_in.Sfs.Shared.Domain;
public interface IThirdLocationRequestManager : ISfsStoreRequestManager<ThirdLocationRequest, ThirdLocationRequestDetail>,
IBulkImportService<ThirdLocationRequest>
{
/// <summary>
/// 创建 同时 直接赋值Number 为了返回Number
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
Task<ThirdLocationRequest> CreateByNumberAsync(ThirdLocationRequest entity);
}

21
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/ThirdLocationRequests/ThirdLocationRequestManager.cs

@ -29,4 +29,25 @@ public class ThirdLocationRequestManager
{
throw new NotImplementedException();
}
/// <summary>
/// 创建 同时 直接赋值Number 为了返回Number
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
public virtual async Task<ThirdLocationRequest> CreateByNumberAsync(ThirdLocationRequest entity)
{
var number = string.IsNullOrEmpty(entity.Number)
? await GenerateNumberAsync(nameof(ThirdLocationRequest), entity.ActiveDate).ConfigureAwait(false)
: entity.Number;
entity.SetIdAndNumberWithDetails(GuidGenerator, number);
entity.Submit();
entity.Agree();
entity.RequestStatus = EnumRequestStatus.Partial;
await _repository.InsertAsync(entity, true).ConfigureAwait(false);
await LocalEventBus.PublishAsync(new SfsHandledEntityEventData<ThirdLocationRequest>(entity), false)
.ConfigureAwait(false);
return entity;
}
}

46
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ThirdLocationJobAutoMapperProfile.cs

@ -17,12 +17,9 @@ public partial class StoreEventAutoMapperProfile : Profile
.ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.RequestNumber))
.ForMember(x => x.ActiveDate, y => y.MapFrom(d => DateTime.Now))
.ForMember(x => x.Worker, y => y.MapFrom(d => d.CompleteUserName))
.Ignore(x => x.Number)
.Ignore(x => x.IssueTime)
.Ignore(x => x.ReceiptTime)
;
.Ignore(x => x.Number);
CreateMap<ThirdLocationJobDetail, ThirdLocationNoteDetail>()
.ForMember(x => x.FromPackingCode, y => y.MapFrom(d => d.HandledPackingCode))
@ -48,8 +45,6 @@ public partial class StoreEventAutoMapperProfile : Profile
.Ignore(x => x.ToLocationArea)
.Ignore(x => x.ToLocationGroup)
.Ignore(x => x.ToLocationErpCode)
;
CreateMap<ThirdLocationJobDetail, ExpectInEditInput>()
@ -67,14 +62,22 @@ public partial class StoreEventAutoMapperProfile : Profile
CreateMap<ThirdLocationJob, ThirdLocationNoteEditInput>()
.ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.RequestNumber))
.ForMember(x => x.JobNumber, y => y.MapFrom(d => d.Number))
.Ignore(x => x.Confirmed)
.Ignore(x => x.JobNumber)
.Ignore(x => x.ActiveDate)
.Ignore(x => x.Workshop)
.Ignore(x => x.RequestType)
.Ignore(x => x.UseOnTheWayLocation)
;
CreateMap<ThirdLocationJobDTO, ThirdLocationNoteEditInput>()
.ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.RequestNumber))
.ForMember(x => x.JobNumber, y => y.MapFrom(d => d.Number))
.Ignore(x => x.Confirmed)
.Ignore(x => x.ActiveDate)
.Ignore(x => x.Workshop)
.Ignore(x => x.RequestType)
.Ignore(x => x.UseOnTheWayLocation)
;
CreateMap<ThirdLocationJobDetail, ThirdLocationNoteDetailInput>()
.ForMember(x => x.Qty, y => y.MapFrom(d => d.HandledQty))
@ -97,10 +100,35 @@ public partial class StoreEventAutoMapperProfile : Profile
.ForMember(x => x.FromStatus, y => y.MapFrom(d => d.Status))
.ForMember(x => x.ToStatus, y => y.MapFrom(d => d.Status))
.ForMember(x => x.SingleCodeRequest, y => y.MapFrom(d => d.SingleCodeRequest))
.Ignore(x => x.SingleCodeJob)
.Ignore(x => x.RecommendType)
.Ignore(x => x.PositionCode)
;
CreateMap<ThirdLocationJobDetailDTO, ThirdLocationNoteDetailInput>()
.ForMember(x => x.Qty, y => y.MapFrom(d => d.HandledQty))
.ForMember(x => x.IssueTime, y => y.MapFrom(d => DateTime.Now))
.ForMember(x => x.FromPackingCode, y => y.MapFrom(d => d.HandledPackingCode))
.ForMember(x => x.ToPackingCode, y => y.MapFrom(d => d.HandledPackingCode))
.ForMember(x => x.FromContainerCode, y => y.MapFrom(d => d.HandledContainerCode))
.ForMember(x => x.ToContainerCode, y => y.MapFrom(d => d.HandledContainerCode))
.ForMember(x => x.FromLot, y => y.MapFrom(d => d.HandledLot))
.ForMember(x => x.ToLot, y => y.MapFrom(d => d.HandledLot))
.ForMember(x => x.SupplierBatch, y => y.MapFrom(d => d.HandledSupplierBatch))
.ForMember(x => x.ArriveDate, y => y.MapFrom(d => d.HandledArriveDate))
.ForMember(x => x.ProduceDate, y => y.MapFrom(d => d.HandledProduceDate))
.ForMember(x => x.ExpireDate, y => y.MapFrom(d => d.ExpiredTime))
.ForMember(x => x.FromLocationCode, y => y.MapFrom(d => d.FromLocationCode))
.ForMember(x => x.FromLocationArea, y => y.MapFrom(d => d.FromLocationArea))
.ForMember(x => x.FromLocationGroup, y => y.MapFrom(d => d.HandledFromLocationGroup))
.ForMember(x => x.FromLocationErpCode, y => y.MapFrom(d => d.HandledFromLocationErpCode))
.ForMember(x => x.FromWarehouseCode, y => y.MapFrom(d => d.HandledFromWarehouseCode))
.ForMember(x => x.FromStatus, y => y.MapFrom(d => d.Status))
.ForMember(x => x.ToStatus, y => y.MapFrom(d => d.Status))
.ForMember(x => x.SingleCodeRequest, y => y.MapFrom(d => d.SingleCodeRequest))
.Ignore(x => x.SingleCodeJob)
.Ignore(x => x.RecommendType)
.Ignore(x => x.PositionCode)
;
}
}

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>()
.ReverseMap();
CreateMap<CustomerProductionReturnNoteDetail, CustomerProductionReturnNoteDetailDTO>();
CreateMap<CustomerProductionReturnNote, CustomerReturnNoteDTO>()
.ForMember(x => x.Customer, y => y.MapFrom(d => d.CustomerCode))
;
CreateMap<CustomerProductionReturnNoteDetail, CustomerReturnNoteDetailDTO>();
}
}

1
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/ThirdLocationNoteAutoMapperProfile.cs

@ -25,7 +25,6 @@ public partial class StoreEventAutoMapperProfile : Profile
.Ignore(x => x.CallBusinessType)
.Ignore(x => x.CallRequestNumber)
.Ignore(x => x.CallJobNumber)
.Ignore(x => x.UseOnTheWayLocation)
.Ignore(x => x.Confirmed)
.Ignore(x => x.ConfirmTime)

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

@ -1,6 +1,8 @@
using System;
using AutoMapper;
using Volo.Abp.AutoMapper;
using Win_in.Sfs.Shared.Application;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Inventory.Application.Contracts;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
@ -35,7 +37,7 @@ public partial class StoreEventAutoMapperProfile : Profile
.Ignore(x => x.ToContainerCode)
;
CreateMap<ThirdLocationRequest, ThirdLocationJobEditInput>()
CreateMap<ThirdLocationRequestDTO, ThirdLocationJobEditInput>()
.ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.Number))
.ForMember(x => x.RequestType, y => y.MapFrom(d => d.Type))
.Ignore(x => x.SingleCodeJob)
@ -57,29 +59,21 @@ public partial class StoreEventAutoMapperProfile : Profile
.Ignore(x => x.CompleteUserName)
.Ignore(x => x.CompleteTime)
.Ignore(x => x.Details)
.Ignore(x => x.UseOnTheWayLocation)
;
CreateMap<ThirdLocationRequestDetail, ThirdLocationJobDetailInput>()
.ForMember(x => x.FromLocationCode, y => y.MapFrom(d => d.FromLocationCode))
.ForMember(x => x.SingleCodeRequest, y => y.MapFrom(d => d.SingleCodeRequest))
.Ignore(x => x.SingleCodeJob)
.ForMember(x => x.IsOnTheWayLocationCode, y => y.MapFrom(d => true))
.ForMember(x => x.IssueTime, y => y.MapFrom(d => DateTime.Now))
.Ignore(x => x.RecommendFromLocationArea)
.Ignore(x => x.RecommendFromLocationGroup)
.Ignore(x => x.HandledFromLocationArea)
.Ignore(x => x.HandledFromLocationGroup)
.Ignore(x => x.RecommendFromWarehouseCode)
.Ignore(x => x.HandledFromWarehouseCode)
.Ignore(x => x.OnTheWayLocationCode)
.Ignore(x => x.DistributionType)
.Ignore(x => x.RoundedQty)
.Ignore(x => x.Operation)
.Ignore(x => x.ExpiredTime)
.Ignore(x => x.TruncType)
.Ignore(x => x.PlanBeginTime)
.Ignore(x => x.PlannedSplitRule)
.Ignore(x => x.DeliveryQty)
.Ignore(x => x.Status)
.Ignore(x => x.RecommendContainerCode)
.Ignore(x => x.RecommendPackingCode)
@ -104,10 +98,51 @@ public partial class StoreEventAutoMapperProfile : Profile
.Ignore(x => x.RecommendFromLocationCode)
.Ignore(x => x.RecommendLot)
.Ignore(x => x.PositionCode)
.Ignore(x => x.RecommendType)
.IgnoreIHasRecommendAndHandledFrom();
CreateMap<ThirdLocationRequestDetailDTO, ThirdLocationJobDetailInput>()
.ForMember(x => x.FromLocationCode, y => y.MapFrom(d => d.FromLocationCode))
.ForMember(x => x.SingleCodeRequest, y => y.MapFrom(d => d.SingleCodeRequest))
.ForMember(x => x.IsOnTheWayLocationCode, y => y.MapFrom(d => true))
.ForMember(x => x.IssueTime, y => y.MapFrom(d => DateTime.Now))
.ForMember(x => x.Uom, y => y.MapFrom(d => d.Uom))
.ForMember(x => x.IssuedQty, y => y.MapFrom(d => 0))
.ForMember(x => x.NotFinishQty, y => y.MapFrom(d => 0))
.ForMember(x => x.ReceivedQty, y => y.MapFrom(d => 0))
.ForMember(x => x.RecommendFromLocationCode, y => y.MapFrom(d => d.FromLocationCode))
.ForMember(x => x.RecommendFromLocationGroup, y => y.MapFrom(d => d.FromLocationGroup))
.ForMember(x => x.RecommendFromLocationArea, y => y.MapFrom(d => d.FromLocationArea))
.ForMember(x => x.RecommendFromLocationErpCode, y => y.MapFrom(d => d.FromLocationErpCode))
.ForMember(x => x.RecommendFromWarehouseCode, y => y.MapFrom(d => d.FromWarehouseCode))
.ForMember(x => x.HandledFromLocationCode, y => y.MapFrom(d => d.FromLocationCode))
.ForMember(x => x.HandledFromLocationGroup, y => y.MapFrom(d => d.FromLocationGroup))
.ForMember(x => x.HandledFromLocationArea, y => y.MapFrom(d => d.FromLocationArea))
.ForMember(x => x.HandledFromLocationErpCode, y => y.MapFrom(d => d.FromLocationErpCode))
.ForMember(x => x.HandledFromWarehouseCode, y => y.MapFrom(d => d.FromWarehouseCode))
.ForMember(x => x.RecommendPackingCode, y => y.MapFrom(d => d.PackingCode))
.ForMember(x => x.RecommendLot, y => y.MapFrom(d => d.Lot))
.ForMember(x => x.RecommendProduceDate, y => y.MapFrom(d => DateTime.MinValue))
.ForMember(x => x.RecommendContainerCode, y => y.MapFrom(d => string.Empty))
.ForMember(x => x.RecommendExpireDate, y => y.MapFrom(d => d.ExpiredTime))
.ForMember(x => x.RecommendSupplierBatch, y => y.MapFrom(d => string.Empty))
.ForMember(x => x.RecommendQty, y => y.MapFrom(d => d.Qty))
.ForMember(x => x.RecommendArriveDate, y => y.MapFrom(d => DateTime.MinValue))
.ForMember(x => x.HandledPackingCode, y => y.MapFrom(d => d.PackingCode))
.ForMember(x => x.HandledLot, y => y.MapFrom(d => d.Lot))
.ForMember(x => x.HandledProduceDate, y => y.MapFrom(d => DateTime.MinValue))
.ForMember(x => x.HandledContainerCode, y => y.MapFrom(d => string.Empty))
.ForMember(x => x.HandledExpireDate, y => y.MapFrom(d => d.ExpiredTime))
.ForMember(x => x.HandledSupplierBatch, y => y.MapFrom(d => string.Empty))
.ForMember(x => x.HandledQty, y => y.MapFrom(d => d.Qty))
.ForMember(x => x.HandledArriveDate, y => y.MapFrom(d => DateTime.MinValue))
.ForMember(x => x.HandledUom, y => y.MapFrom(d => d.Uom))
.ForMember(x => x.Status, y => y.MapFrom(d => d.EnumInventoryStatus))
;
CreateMap<BalanceDTO, ThirdLocationJobDetailInput>()
.ForMember(x => x.RecommendArriveDate, y => y.MapFrom(d => d.ArriveDate))
.ForMember(x => x.RecommendContainerCode, y => y.MapFrom(d => d.ContainerCode))
@ -132,7 +167,6 @@ public partial class StoreEventAutoMapperProfile : Profile
.Ignore(x => x.HandledFromWarehouseCode)
.Ignore(x => x.FromLocationCode)
.Ignore(x => x.ToLocationCode)
.Ignore(x => x.SingleCodeJob)
.Ignore(x => x.SingleCodeRequest)
.Ignore(x => x.HandledContainerCode)
.Ignore(x => x.HandledExpireDate)
@ -146,21 +180,21 @@ public partial class StoreEventAutoMapperProfile : Profile
.Ignore(x => x.HandledUom)
.Ignore(x => x.Remark)
.Ignore(x => x.OnTheWayLocationCode)
.Ignore(x => x.DistributionType)
.Ignore(x => x.RoundedQty)
.Ignore(x => x.Operation)
.Ignore(x => x.ExpiredTime)
.Ignore(x => x.TruncType)
.Ignore(x => x.PlanBeginTime)
.Ignore(x => x.PlannedSplitRule)
.Ignore(x => x.DeliveryQty)
.Ignore(x => x.FromLocationCode)
.Ignore(x => x.ToLocationCode)
.Ignore(x => x.SingleCodeJob)
.Ignore(x => x.SingleCodeRequest)
.Ignore(x => x.PositionCode)
.Ignore(x => x.RecommendType)
.Ignore(x => x.FromLocationArea)
.Ignore(x=>x.IssueTime)
.Ignore(x=>x.IsOnTheWayLocationCode)
.Ignore(x => x.FromLocationGroup)
.Ignore(x => x.FromLocationErpCode)
.Ignore(x => x.FromWarehouseCode)
.Ignore(x => x.IssuedQty)
.Ignore(x => x.ReceivedQty)
.Ignore(x => x.EnumInventoryStatus)
.IgnoreIHasRecommendAndHandledFrom();
}

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]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<AssembleIssueNote> eventData)
{
//var entity = eventData.Entity;
//await AddExchangeDataAsync(entity).ConfigureAwait(false);
var entity = eventData.Entity;
await AddExchangeDataAsync(entity).ConfigureAwait(false);
}
[UnitOfWork]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<List<AssembleIssueNote>> eventData)
{
//var entities = eventData.Entity;
//await AddExchangeDataAsync(entities).ConfigureAwait(false);
var entities = eventData.Entity;
await AddExchangeDataAsync(entities).ConfigureAwait(false);
}
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]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<CoatingIssueNote> eventData)
{
//var entity = eventData.Entity;
//await AddExchangeDataAsync(entity).ConfigureAwait(false);
var entity = eventData.Entity;
await AddExchangeDataAsync(entity).ConfigureAwait(false);
}
[UnitOfWork]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<List<CoatingIssueNote>> eventData)
{
//var entities = eventData.Entity;
//await AddExchangeDataAsync(entities).ConfigureAwait(false);
var entities = eventData.Entity;
await AddExchangeDataAsync(entities).ConfigureAwait(false);
}
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]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<InjectionIssueNote> eventData)
{
//var entity = eventData.Entity;
//await AddExchangeDataAsync(entity).ConfigureAwait(false);
var entity = eventData.Entity;
await AddExchangeDataAsync(entity).ConfigureAwait(false);
}
[UnitOfWork]
public virtual async Task HandleEventAsync(SfsCreatedEntityEventData<List<InjectionIssueNote>> eventData)
{
//var entities = eventData.Entity;
//await AddExchangeDataAsync(entities).ConfigureAwait(false);
var entities = eventData.Entity;
await AddExchangeDataAsync(entities).ConfigureAwait(false);
}
protected override async Task AddExchangeDataAsync(List<InjectionIssueNote> entities)

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

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

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

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

1
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/DataExchanges/ThirdLocationNoteEventHandler.cs

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Quartz.Simpl;
using Volo.Abp.EventBus;
using Volo.Abp.Uow;
using Win_in.Sfs.Basedata.Application.Contracts;

12
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/ThirdLocationJobEventHandler.cs

@ -35,18 +35,18 @@ public class ThirdLocationJobEventHandler :
_thirdLocationJobRepository = thirdLocationJobRepository;
}
public Task HandleEventAsync(SfsCompletedEntityEventData<ThirdLocationJob> eventData)
public async Task HandleEventAsync(SfsCompletedEntityEventData<ThirdLocationJob> eventData)
{
throw new NotImplementedException();
await Task.CompletedTask.ConfigureAwait(false);
}
public Task HandleEventAsync(SfsCancelledEntityEventData<ThirdLocationJob> eventData)
public async Task HandleEventAsync(SfsCancelledEntityEventData<ThirdLocationJob> eventData)
{
throw new NotImplementedException();
await Task.CompletedTask.ConfigureAwait(false);
}
public Task HandleEventAsync(SfsClosedEntityEventData<ThirdLocationJob> eventData)
public async Task HandleEventAsync(SfsClosedEntityEventData<ThirdLocationJob> eventData)
{
throw new NotImplementedException();
await Task.CompletedTask.ConfigureAwait(false);
}
}

24
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ThirdLocationRequestEventHandler.cs

@ -55,33 +55,33 @@ public class ThirdLocationRequestEventHandler
_transferLogAppService = transferLogAppService;
}
public Task HandleEventAsync(SfsHandledEntityEventData<ThirdLocationRequest> eventData)
public async Task HandleEventAsync(SfsHandledEntityEventData<ThirdLocationRequest> eventData)
{
throw new NotImplementedException();
await Task.CompletedTask.ConfigureAwait(false);
}
public Task HandleEventAsync(SfsAbortedEntityEventData<ThirdLocationRequest> eventData)
public async Task HandleEventAsync(SfsAbortedEntityEventData<ThirdLocationRequest> eventData)
{
throw new NotImplementedException();
await Task.CompletedTask.ConfigureAwait(false);
}
public Task HandleEventAsync(SfsCompletedEntityEventData<ThirdLocationRequest> eventData)
public async Task HandleEventAsync(SfsCompletedEntityEventData<ThirdLocationRequest> eventData)
{
throw new NotImplementedException();
await Task.CompletedTask.ConfigureAwait(false);
}
public Task HandleEventAsync(SfsCreatedEntityEventData<ThirdLocationRequest> eventData)
public async Task HandleEventAsync(SfsCreatedEntityEventData<ThirdLocationRequest> eventData)
{
throw new NotImplementedException();
await Task.CompletedTask.ConfigureAwait(false);
}
public Task HandleEventAsync(SfsCancelledEntityEventData<ThirdLocationRequest> eventData)
public async Task HandleEventAsync(SfsCancelledEntityEventData<ThirdLocationRequest> eventData)
{
throw new NotImplementedException();
await Task.CompletedTask.ConfigureAwait(false);
}
public Task HandleEventAsync(SfsCreatedEntityEventData<List<ThirdLocationRequest>> eventData)
public async Task HandleEventAsync(SfsCreatedEntityEventData<List<ThirdLocationRequest>> eventData)
{
throw new NotImplementedException();
await Task.CompletedTask.ConfigureAwait(false);
}
}

12
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ThirdLocationNoteEventHandler.cs

@ -31,18 +31,18 @@ public class ThirdLocationNoteEventHandler
_ThirdLocationRequestRepository = ThirdLocationRequestRepository;
}
public Task HandleEventAsync(SfsCreatedEntityEventData<ThirdLocationNote> eventData)
public async Task HandleEventAsync(SfsCreatedEntityEventData<ThirdLocationNote> eventData)
{
throw new NotImplementedException();
await Task.CompletedTask.ConfigureAwait(false);
}
public Task HandleEventAsync(SfsCreatedEntityEventData<List<ThirdLocationNote>> eventData)
public async Task HandleEventAsync(SfsCreatedEntityEventData<List<ThirdLocationNote>> eventData)
{
throw new NotImplementedException();
await Task.CompletedTask.ConfigureAwait(false);
}
public Task HandleEventAsync(SfsConfirmedEntityEventData<ThirdLocationNote> eventData)
public async Task HandleEventAsync(SfsConfirmedEntityEventData<ThirdLocationNote> eventData)
{
throw new NotImplementedException();
await Task.CompletedTask.ConfigureAwait(false);
}
}

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

@ -133,8 +133,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