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 12 months ago
parent
commit
20a6f2aac9
  1. 25
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingRequestReader.cs
  2. 10
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingTaskIncomingBackgroundWorker.cs
  3. 3
      be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/appsettings.json
  4. 15
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/AssembleIssueJobsController.cs
  5. 15
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/CoatingIssueJobsController.cs
  6. 15
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/InjectionIssueJobsController.cs
  7. 15
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/KittingIssueJobsController.cs
  8. 2
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobs/SparePartIssueJobsController.cs
  9. 5
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ThirdLocationJobController.cs
  10. 54
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/ThirdLocationRequestController.cs
  11. 17
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRecManager.cs
  12. 1
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ExchangeDatas/IExchangeDataAppService.cs
  13. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleIssueJobs/IAssembleIssueJobAppService.cs
  14. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/ICoatingIssueJobAppService.cs
  15. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/IInjectionIssueJobAppService.cs
  16. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/IKittingIssueJobAppService.cs
  17. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/DTOs/ThirdLocationJobDetailDTO.cs
  18. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/ThirdLocationJobs/Inputs/ThirdLocationJobDetailInput.cs
  19. 12
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/DTOs/ThirdLocationNoteDetailDTO.cs
  20. 12
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/Inputs/ThirdLocationNoteDetailInput.cs
  21. 4
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/Inputs/ThirdLocationNoteImportInput.cs
  22. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/WipWarehouseAdjustRequests/Inputs/WipWarehouseAdjustRequestImportInput.cs
  23. 38
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/ExchangeDatas/ExchangeDataAppService.cs
  24. 9
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleIssueJobs/AssembleIssueJobAppService.cs
  25. 23
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs
  26. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionIssueJobs/InjectionIssueJobAppService.cs
  27. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/KittingIssueJobs/KittingIssueJobAppService.cs
  28. 17
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/ThirdLocationJobs/ThirdLocationJobAppService.cs
  29. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/IssuelRequests/InjectionIssueRequests/InjectionIssueRequestAppService.cs
  30. 5
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAppService.cs
  31. 1
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ThirdLocationRequests/ThirdLocationRequestAutoMapperProfile.cs
  32. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ThirdLocationJobs/ThirdLocationJob.cs
  33. 4
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ThirdLocationJobs/ThirdLocationJobDetail.cs
  34. 28
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ThirdLocationJobs/ThirdLocationJobManager.cs
  35. 8
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNoteDetail.cs
  36. 2
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/ThirdLocationJobs/ThirdLocationJobDbContextModelCreatingExtensions.cs
  37. 34515
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240524003508_Update_SingleCodeJob.Designer.cs
  38. 25
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240524003508_Update_SingleCodeJob.cs
  39. 34515
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240527070921_Update_20240527.Designer.cs
  40. 35
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240527070921_Update_20240527.cs
  41. 24
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs
  42. 4
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/ThirdLocationNotes/ThirdLocationNoteDbContextModelCreatingExtensions.cs
  43. 14
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/ThirdLocationJobAutoMapperProfile.cs
  44. 5
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ThirdLocationRequestAutoMapperProfile.cs
  45. 4
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/PurchaseReturnJobEventHandler.cs
  46. 6
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/ThirdLocationJobEventHandler.cs
  47. 22
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ThirdLocationRequestEventHandler.cs
  48. 1
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ThirdLocationNoteEventHandler.cs
  49. 16
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/WipWarehouseAdjustNoteEventHandler.cs
  50. 4
      build/src/docker/publish/conf/settings/appsettings.Development.json

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

@ -64,12 +64,17 @@ public class InjectionMoldingRequestReader : IReader
{ {
try try
{ {
var sleepTime = (_options.Value.AutoRemote.TimeCycle*60/ _options.Value.AutoRemote.Interval)-10; #if DEBUG
_options.Value.AutoRemote.TimeCycle = 1;
_options.Value.AutoRemote.Interval = 2;
#endif
// var sleepTime = (_options.Value.AutoRemote.TimeCycle*60/ _options.Value.AutoRemote.Interval)-10;
var invterval = _options.Value.AutoRemote.Interval; var invterval = _options.Value.AutoRemote.Interval;
var successTime = 0; var successTime = 0;
var guid = DateTime.Now.ToString("yyyyMMddHHmmssfff");
for (int i = 0; i <invterval; i++) for (int i = 0; i <invterval; i++)
@ -98,9 +103,17 @@ public class InjectionMoldingRequestReader : IReader
camralist.AddRange(idsList); camralist.AddRange(idsList);
} }
successTime++; successTime++;
sw.Stop();
_logger.LogInformation($"读取标识{guid}读取成功次数{successTime},耗时 {sw.ElapsedMilliseconds}毫秒");
Thread.Sleep(1000);
if (successTime == invterval) if (successTime == invterval)
{ {
sw = Stopwatch.StartNew();
_logger.LogInformation($"开始标识{guid}同步WMS开始");
List<UnCompletedRequestDto> inputdetail = new List<UnCompletedRequestDto>(); List<UnCompletedRequestDto> inputdetail = new List<UnCompletedRequestDto>();
foreach (var item in camralist) foreach (var item in camralist)
{ {
@ -166,14 +179,16 @@ public class InjectionMoldingRequestReader : IReader
} }
// 创建新的注塑请求并将数据写入数据库 // 创建新的注塑请求并将数据写入数据库
await _injectionRequest.CreateAsync(input).ConfigureAwait(false); await _injectionRequest.CreateAsync(input).ConfigureAwait(false);
} }
_logger.LogInformation($"标识{guid}同步WMS结束,耗时{sw.ElapsedMilliseconds }毫秒");
} }
else else
{ {
Thread.Sleep(sleepTime * 1000); Thread.Sleep(1000);
} }
sw.Stop();
_logger.LogInformation($"读取成功次数{successTime},耗时 ${sw.ElapsedMilliseconds / 1000 / 60}分钟");
} }

10
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/Incoming/InjectionMoldingTaskIncomingBackgroundWorker.cs

@ -23,7 +23,17 @@ public class InjectionMoldingTaskIncomingBackgroundWorker : AsyncPeriodicBackgro
IServiceScopeFactory serviceScopeFactory IServiceScopeFactory serviceScopeFactory
) : base(timer, serviceScopeFactory) ) : base(timer, serviceScopeFactory)
{ {
_options = options; _options = options;
#if DEBUG
_options.Value.AutoRemote.TimeCycle = 1;
_options.Value.AutoRemote.Interval = 2;
#endif
Timer.Period = options.Value.AutoRemote.TimeCycle * 60 * 1000; //default 10 minutes Timer.Period = options.Value.AutoRemote.TimeCycle * 60 * 1000; //default 10 minutes
} }

3
be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent/appsettings.json

@ -72,10 +72,7 @@
"Password": "", "Password": "",
"Token": "", "Token": "",
"AreaIDs": "1", "AreaIDs": "1",
"Interval" : "3", // interval "Interval" : "3", // interval
"TimeCycle" :"5" "TimeCycle" :"5"
}, },

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

@ -155,17 +155,18 @@ public class AssembleIssueJobsController : AbpController
[HttpGet("by-number/{jobNumber}")] [HttpGet("by-number/{jobNumber}")]
public virtual async Task<ActionResult<AssembleIssueJobDTO>> GetByNumberAsync(string jobNumber) public virtual async Task<ActionResult<AssembleIssueJobDTO>> GetByNumberAsync(string jobNumber)
{ {
var jobDto = await _assembleIssueJobAppService.GetByNumberAsync(jobNumber).ConfigureAwait(false); //var jobDto = await _assembleIssueJobAppService.GetByNumberAsync(jobNumber).ConfigureAwait(false);
var jobDto = await _assembleIssueJobAppService.GetByNumber2Async(jobNumber).ConfigureAwait(false);
if (jobDto == null) if (jobDto == null)
{ {
throw new UserFriendlyException($"未找到编号为 {jobNumber} 的任务"); throw new UserFriendlyException($"未找到编号为 {jobNumber} 的任务");
} }
var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); //var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false);
if (!wlgCodes.Contains(jobDto.WorkGroupCode)) //if (!wlgCodes.Contains(jobDto.WorkGroupCode))
{ //{
return new NotFoundObjectResult($"任务属于工作组 {jobDto.WorkGroupCode}"); // return new NotFoundObjectResult($"任务属于工作组 {jobDto.WorkGroupCode}");
} //}
if (jobDto.JobStatus == EnumJobStatus.Doing && jobDto.AcceptUserId != CurrentUser.Id) if (jobDto.JobStatus == EnumJobStatus.Doing && jobDto.AcceptUserId != CurrentUser.Id)
{ {
@ -176,7 +177,7 @@ public class AssembleIssueJobsController : AbpController
} }
/// <summary> /// <summary>
/// /// 根据Request Number 获取任务列表
/// </summary> /// </summary>
/// <param name="requestNumber"></param> /// <param name="requestNumber"></param>
/// <returns></returns> /// <returns></returns>

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

@ -155,17 +155,18 @@ public class CoatingIssueJobsController : AbpController
[HttpGet("by-number/{jobNumber}")] [HttpGet("by-number/{jobNumber}")]
public virtual async Task<ActionResult<CoatingIssueJobDTO>> GetByNumberAsync(string jobNumber) public virtual async Task<ActionResult<CoatingIssueJobDTO>> GetByNumberAsync(string jobNumber)
{ {
var jobDto = await _coatingIssueJobAppService.GetByNumberAsync(jobNumber).ConfigureAwait(false); //var jobDto = await _coatingIssueJobAppService.GetByNumberAsync(jobNumber).ConfigureAwait(false);
var jobDto = await _coatingIssueJobAppService.GetByNumber2Async(jobNumber).ConfigureAwait(false);
if (jobDto == null) if (jobDto == null)
{ {
throw new UserFriendlyException($"未找到编号为 {jobNumber} 的任务"); throw new UserFriendlyException($"未找到编号为 {jobNumber} 的任务");
} }
var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); //var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false);
if (!wlgCodes.Contains(jobDto.WorkGroupCode)) //if (!wlgCodes.Contains(jobDto.WorkGroupCode))
{ //{
return new NotFoundObjectResult($"任务属于工作组 {jobDto.WorkGroupCode}"); // return new NotFoundObjectResult($"任务属于工作组 {jobDto.WorkGroupCode}");
} //}
if (jobDto.JobStatus == EnumJobStatus.Doing && jobDto.AcceptUserId != CurrentUser.Id) if (jobDto.JobStatus == EnumJobStatus.Doing && jobDto.AcceptUserId != CurrentUser.Id)
{ {
@ -176,7 +177,7 @@ public class CoatingIssueJobsController : AbpController
} }
/// <summary> /// <summary>
/// /// 根据Request Number 获取任务列表
/// </summary> /// </summary>
/// <param name="requestNumber"></param> /// <param name="requestNumber"></param>
/// <returns></returns> /// <returns></returns>

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

@ -155,17 +155,18 @@ public class InjectionIssueJobsController : AbpController
[HttpGet("by-number/{jobNumber}")] [HttpGet("by-number/{jobNumber}")]
public virtual async Task<ActionResult<InjectionIssueJobDTO>> GetByNumberAsync(string jobNumber) public virtual async Task<ActionResult<InjectionIssueJobDTO>> GetByNumberAsync(string jobNumber)
{ {
var jobDto = await _injectionIssueJobAppService.GetByNumberAsync(jobNumber).ConfigureAwait(false); //var jobDto = await _injectionIssueJobAppService.GetByNumberAsync(jobNumber).ConfigureAwait(false);
var jobDto = await _injectionIssueJobAppService.GetByNumber2Async(jobNumber).ConfigureAwait(false);
if (jobDto == null) if (jobDto == null)
{ {
throw new UserFriendlyException($"未找到编号为 {jobNumber} 的任务"); throw new UserFriendlyException($"未找到编号为 {jobNumber} 的任务");
} }
var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); //var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false);
if (!wlgCodes.Contains(jobDto.WorkGroupCode)) //if (!wlgCodes.Contains(jobDto.WorkGroupCode))
{ //{
return new NotFoundObjectResult($"任务属于工作组 {jobDto.WorkGroupCode}"); // return new NotFoundObjectResult($"任务属于工作组 {jobDto.WorkGroupCode}");
} //}
if (jobDto.JobStatus == EnumJobStatus.Doing && jobDto.AcceptUserId != CurrentUser.Id) if (jobDto.JobStatus == EnumJobStatus.Doing && jobDto.AcceptUserId != CurrentUser.Id)
{ {
@ -176,7 +177,7 @@ public class InjectionIssueJobsController : AbpController
} }
/// <summary> /// <summary>
/// /// 根据Request Number 获取任务列表
/// </summary> /// </summary>
/// <param name="requestNumber"></param> /// <param name="requestNumber"></param>
/// <returns></returns> /// <returns></returns>

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

@ -155,17 +155,18 @@ public class KittingIssueJobsController : AbpController
[HttpGet("by-number/{jobNumber}")] [HttpGet("by-number/{jobNumber}")]
public virtual async Task<ActionResult<KittingIssueJobDTO>> GetByNumberAsync(string jobNumber) public virtual async Task<ActionResult<KittingIssueJobDTO>> GetByNumberAsync(string jobNumber)
{ {
var jobDto = await _kittingIssueJobAppService.GetByNumberAsync(jobNumber).ConfigureAwait(false); //var jobDto = await _kittingIssueJobAppService.GetByNumberAsync(jobNumber).ConfigureAwait(false);
var jobDto = await _kittingIssueJobAppService.GetByNumber2Async(jobNumber).ConfigureAwait(false);
if (jobDto == null) if (jobDto == null)
{ {
throw new UserFriendlyException($"未找到编号为 {jobNumber} 的任务"); throw new UserFriendlyException($"未找到编号为 {jobNumber} 的任务");
} }
var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); //var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false);
if (!wlgCodes.Contains(jobDto.WorkGroupCode)) //if (!wlgCodes.Contains(jobDto.WorkGroupCode))
{ //{
return new NotFoundObjectResult($"任务属于工作组 {jobDto.WorkGroupCode}"); // return new NotFoundObjectResult($"任务属于工作组 {jobDto.WorkGroupCode}");
} //}
if (jobDto.JobStatus == EnumJobStatus.Doing && jobDto.AcceptUserId != CurrentUser.Id) if (jobDto.JobStatus == EnumJobStatus.Doing && jobDto.AcceptUserId != CurrentUser.Id)
{ {
@ -176,7 +177,7 @@ public class KittingIssueJobsController : AbpController
} }
/// <summary> /// <summary>
/// /// 根据Request Number 获取任务列表
/// </summary> /// </summary>
/// <param name="requestNumber"></param> /// <param name="requestNumber"></param>
/// <returns></returns> /// <returns></returns>

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

@ -176,7 +176,7 @@ public class SparePartIssueJobsController : AbpController
} }
/// <summary> /// <summary>
/// /// 根据Request Number 获取任务列表
/// </summary> /// </summary>
/// <param name="requestNumber"></param> /// <param name="requestNumber"></param>
/// <returns></returns> /// <returns></returns>

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

@ -52,7 +52,6 @@ public class ThirdLocationJobController : AbpController
/// <param name="id"></param> /// <param name="id"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet("{id}")] [HttpGet("{id}")]
public virtual async Task<ActionResult<ThirdLocationJobDTO>> GetAsync(Guid id) public virtual async Task<ActionResult<ThirdLocationJobDTO>> GetAsync(Guid id)
{ {
var result = await _thirdLocationJobAppService.GetAsync(id).ConfigureAwait(false); var result = await _thirdLocationJobAppService.GetAsync(id).ConfigureAwait(false);
@ -80,7 +79,7 @@ public class ThirdLocationJobController : AbpController
[HttpGet("list")] [HttpGet("list")]
public virtual async Task<PagedResultDto<ThirdLocationJobDTO>> GetListAsync(int pageSize, int pageIndex) public virtual async Task<PagedResultDto<ThirdLocationJobDTO>> GetListAsync(int pageSize, int pageIndex)
{ {
var status = new List<int>() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var status = new List<int>() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing, (int)EnumJobStatus.Partial };
var jsonStatus = JsonSerializer.Serialize(status); var jsonStatus = JsonSerializer.Serialize(status);
var request = new SfsJobRequestInputBase var request = new SfsJobRequestInputBase
@ -139,7 +138,7 @@ public class ThirdLocationJobController : AbpController
var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false);
var jsonCodes = JsonSerializer.Serialize(wlgCodes); var jsonCodes = JsonSerializer.Serialize(wlgCodes);
var status = new List<int>() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var status = new List<int>() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing, (int)EnumJobStatus.Partial };
var jsonStatus = JsonSerializer.Serialize(status); var jsonStatus = JsonSerializer.Serialize(status);
var request = new SfsJobRequestInputBase var request = new SfsJobRequestInputBase

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

@ -1,7 +1,12 @@
using System; using System;
using System.Collections.Generic;
using System.Text.Json;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Application.Contracts;
namespace Win_in.Sfs.Wms.Pda.Controllers.Stores; namespace Win_in.Sfs.Wms.Pda.Controllers.Stores;
@ -25,6 +30,18 @@ public class ThirdLocationRequestController : AbpController
_thirdLocationRequestAppService = ThirdLocationRequestAppService; _thirdLocationRequestAppService = ThirdLocationRequestAppService;
} }
/// <summary>
/// 获取申请详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet("{id}")]
public virtual async Task<ActionResult<ThirdLocationRequestDTO>> GetAsync(Guid id)
{
var result = await _thirdLocationRequestAppService.GetAsync(id).ConfigureAwait(false);
return Ok(result);
}
/// <summary> /// <summary>
/// 三方库库移申请 /// 三方库库移申请
/// </summary> /// </summary>
@ -41,14 +58,45 @@ public class ThirdLocationRequestController : AbpController
/// </summary> /// </summary>
/// <param name="number"></param> /// <param name="number"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet("{number}")] [HttpGet("get/{number}")]
public virtual async Task<ActionResult<ThirdLocationRequestDTO>> GetRequestByNumberAsync(string number)
public virtual async Task<ActionResult<ThirdLocationRequestDTO>> GetAsync(string number)
{ {
var result = await _thirdLocationRequestAppService.GetByNumberAsync(number).ConfigureAwait(false); var result = await _thirdLocationRequestAppService.GetByNumberAsync(number).ConfigureAwait(false);
return Ok(result); return Ok(result);
} }
/// <summary>
/// 获取列表
/// </summary>
/// <param name="pageSize"></param>
/// <param name="pageIndex"></param>
/// <returns></returns>
[HttpGet("list")]
public virtual async Task<PagedResultDto<ThirdLocationRequestDTO>> GetListAsync(int pageSize, int pageIndex)
{
var status = new List<int>() { (int)EnumRequestStatus.Handling, (int)EnumRequestStatus.Partial };
var jsonStatus = JsonSerializer.Serialize(status);
var request = new SfsStoreRequestInputBase
{
MaxResultCount = pageSize,
SkipCount = (pageIndex - 1) * pageSize,
Sorting = $"{nameof(ThirdLocationRequestDTO.CreationTime)} ASC",
Condition = new Condition
{
Filters = new List<Filter>
{
new(nameof(ThirdLocationRequestDTO.RequestStatus),jsonStatus,"In")
}
}
};
var list = await _thirdLocationRequestAppService.GetPagedListByFilterAsync(request, true).ConfigureAwait(false);
return list;
}
/// <summary> /// <summary>
/// 取消三方库请求 /// 取消三方库请求
/// </summary> /// </summary>

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

@ -107,10 +107,11 @@ public class SplitPackingRecManager : DomainService, ISplitPackingRecManager
public async Task<List<SplitPackingRec>> GetListByToPackingCode(List<string> toPackingCodeList) public async Task<List<SplitPackingRec>> GetListByToPackingCode(List<string> toPackingCodeList)
{ {
List<SplitPackingRec> ret = new List<SplitPackingRec>(); List<SplitPackingRec> ret = new List<SplitPackingRec>();
List<SplitPackingRec> lst = await _repository.GetListAsync( List<SplitPackingRec> lst = await _repository.GetListAsync(
itm => toPackingCodeList.Contains(itm.ToPackingCode) itm => toPackingCodeList.Contains(itm.ToPackingCode)
&& itm.OprType == OprTypeEnum.SplitBox).ConfigureAwait(false); ).ConfigureAwait(false); //&& itm.OprType == OprTypeEnum.SplitBox
//按to箱码分组,取最后一条记录
foreach (string toCode in toPackingCodeList) foreach (string toCode in toPackingCodeList)
{ {
var obj = lst.Where(itm => itm.ToPackingCode == toCode) var obj = lst.Where(itm => itm.ToPackingCode == toCode)
@ -152,9 +153,10 @@ public class SplitPackingRecManager : DomainService, ISplitPackingRecManager
public async Task<List<SplitPackingRec>> GetListByFromPackingCode(List<string> fromPackingCodeList) public async Task<List<SplitPackingRec>> GetListByFromPackingCode(List<string> fromPackingCodeList)
{ {
List<SplitPackingRec> ret = new List<SplitPackingRec>(); List<SplitPackingRec> ret = new List<SplitPackingRec>();
List<SplitPackingRec> lst = await _repository.GetListAsync( List<SplitPackingRec> lst = await _repository.GetListAsync(
itm => fromPackingCodeList.Contains(itm.FromPackingCode) itm => fromPackingCodeList.Contains(itm.FromPackingCode)
&& itm.OprType == OprTypeEnum.SplitBox).ConfigureAwait(false); ).ConfigureAwait(false); //&& itm.OprType == OprTypeEnum.SplitBox
foreach (string fromCode in fromPackingCodeList) foreach (string fromCode in fromPackingCodeList)
{ {
@ -174,11 +176,14 @@ public class SplitPackingRecManager : DomainService, ISplitPackingRecManager
/// <returns></returns> /// <returns></returns>
public async Task<SplitPackingRec> GetTopPackingCode(string packingCode) public async Task<SplitPackingRec> GetTopPackingCode(string packingCode)
{ {
SplitPackingRec entity = new SplitPackingRec(); SplitPackingRec entity = await _repository.FirstOrDefaultAsync(itm => itm.ToPackingCode == packingCode && itm.OprType == OprTypeEnum.SplitBox).ConfigureAwait(false);
SplitPackingRec item = await _repository.FirstOrDefaultAsync(itm => itm.ToPackingCode == packingCode && itm.OprType == OprTypeEnum.SplitBox).ConfigureAwait(false); if (entity == null)
if (item != null)
{ {
entity = await _repository.FirstOrDefaultAsync(itm => itm.ToPackingCode == packingCode && itm.OprType == OprTypeEnum.Other).ConfigureAwait(false); entity = await _repository.FirstOrDefaultAsync(itm => itm.ToPackingCode == packingCode && itm.OprType == OprTypeEnum.Other).ConfigureAwait(false);
if (entity == null)
{
entity = new SplitPackingRec();
}
} }
return entity; return entity;
} }

1
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/ExchangeDatas/IExchangeDataAppService.cs

@ -15,4 +15,5 @@ public interface IExchangeDataAppService
Task<List<ExchangeDataDTO>> GetToBeProcessedListOnlyReadAsync(int batchSize); Task<List<ExchangeDataDTO>> GetToBeProcessedListOnlyReadAsync(int batchSize);
Task<List<ExchangeDataDTO>> UpdateStatusByIdListAsync(List<Guid> list); Task<List<ExchangeDataDTO>> UpdateStatusByIdListAsync(List<Guid> list);
Task<List<ExchangeDataDTO>> UpdateManyAsync(List<ExchangeDataDTO> dtos); Task<List<ExchangeDataDTO>> UpdateManyAsync(List<ExchangeDataDTO> dtos);
Task<List<string>> ReSendByListAsync(List<string> list);
} }

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleIssueJobs/IAssembleIssueJobAppService.cs

@ -25,4 +25,6 @@ public interface IAssembleIssueJobAppService
/// <param name="requestNumber"></param> /// <param name="requestNumber"></param>
/// <returns></returns> /// <returns></returns>
Task CompleteByRequestNumberAsync(string requestNumber); Task CompleteByRequestNumberAsync(string requestNumber);
Task<AssembleIssueJobDTO> GetByNumber2Async(string number);
} }

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/ICoatingIssueJobAppService.cs

@ -25,4 +25,6 @@ public interface ICoatingIssueJobAppService
/// <param name="requestNumber"></param> /// <param name="requestNumber"></param>
/// <returns></returns> /// <returns></returns>
Task CompleteByRequestNumberAsync(string requestNumber); Task CompleteByRequestNumberAsync(string requestNumber);
Task<CoatingIssueJobDTO> GetByNumber2Async(string number);
} }

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/IInjectionIssueJobAppService.cs

@ -24,4 +24,6 @@ public interface IInjectionIssueJobAppService
/// <param name="requestNumber"></param> /// <param name="requestNumber"></param>
/// <returns></returns> /// <returns></returns>
Task CompleteByRequestNumberAsync(string requestNumber); Task CompleteByRequestNumberAsync(string requestNumber);
Task<InjectionIssueJobDTO> GetByNumber2Async(string number);
} }

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/KittingIssueJobs/IKittingIssueJobAppService.cs

@ -24,4 +24,6 @@ public interface IKittingIssueJobAppService
/// <param name="requestNumber"></param> /// <param name="requestNumber"></param>
/// <returns></returns> /// <returns></returns>
Task CompleteByRequestNumberAsync(string requestNumber); Task CompleteByRequestNumberAsync(string requestNumber);
Task<KittingIssueJobDTO> GetByNumber2Async(string number);
} }

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

@ -63,10 +63,10 @@ public class ThirdLocationJobDetailDTO : SfsJobRecommendFromDetailDTOBase, IHasT
public string SingleCodeJob { get; set; } public string SingleCodeJob { get; set; }
/// <summary> /// <summary>
/// 工作中心 /// 申请单件码
/// </summary> /// </summary>
[Display(Name = "工作中心")] [Display(Name = "申请单件码")]
public string WorkStation { get; set; } public string SingleCodeRequest { get; set; }
/// <summary> /// <summary>
/// 过期时间 /// 过期时间

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

@ -74,11 +74,11 @@ public class ThirdLocationJobDetailInput : SfsJobRecommendFromDetailInputBase, I
public string SingleCodeJob { get; set; } public string SingleCodeJob { get; set; }
/// <summary> /// <summary>
/// 工作中心 /// 申请单件码
/// </summary> /// </summary>
[Display(Name = "工作中心")] [Display(Name = "申请单件码")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string WorkStation { get; set; } public string SingleCodeRequest { get; set; }
/// <summary> /// <summary>
/// 过期时间 /// 过期时间

12
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/DTOs/ThirdLocationNoteDetailDTO.cs

@ -20,18 +20,18 @@ public class ThirdLocationNoteDetailDTO : SfsStoreRecommendFromDetailWithFromToD
public DateTime ExpiredTime { get; set; } public DateTime ExpiredTime { get; set; }
/// <summary> /// <summary>
/// 生产线 /// 收货单件码
/// </summary> /// </summary>
[Display(Name = "生产线")] [Display(Name = "收货单件码")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string ProdLine { get; set; } public string SingleCodeJob { get; set; }
/// <summary> /// <summary>
/// 工作中心 /// 申请单件码
/// </summary> /// </summary>
[Display(Name = "工作中心")] [Display(Name = "申请单件码")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string WorkStation { get; set; } public string SingleCodeRequest { get; set; }
/// <summary> /// <summary>
/// 在途库库位 /// 在途库库位

12
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/Inputs/ThirdLocationNoteDetailInput.cs

@ -21,18 +21,18 @@ public class ThirdLocationNoteDetailInput : SfsStoreRecommendFromDetailWithFromT
public DateTime ExpiredTime { get; set; } public DateTime ExpiredTime { get; set; }
/// <summary> /// <summary>
/// 生产线 /// 收货单件码
/// </summary> /// </summary>
[Display(Name = "生产线")] [Display(Name = "收货单件码")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string ProdLine { get; set; } public string SingleCodeJob { get; set; }
/// <summary> /// <summary>
/// 工作中心 /// 申请单件码
/// </summary> /// </summary>
[Display(Name = "工作中心")] [Display(Name = "申请单件码")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string WorkStation { get; set; } public string SingleCodeRequest { get; set; }
/// <summary> /// <summary>
/// 在途库库位 /// 在途库库位

4
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ThirdLocationNotes/Inputs/ThirdLocationNoteImportInput.cs

@ -20,9 +20,9 @@ public class ThirdLocationNoteImportInput : SfsStoreImportInputBase, IHasJobNumb
public string RequestNumber { get; set; } public string RequestNumber { get; set; }
/// <summary> /// <summary>
/// 叫料请求类型 /// 请求类型
/// </summary> /// </summary>
[Display(Name = "叫料请求类型")] [Display(Name = "请求类型")]
public string RequestType { get; set; } public string RequestType { get; set; }
/// <summary> /// <summary>

6
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/WipWarehouseAdjustRequests/Inputs/WipWarehouseAdjustRequestImportInput.cs

@ -27,7 +27,7 @@ public class WipWarehouseAdjustRequestImportInput : SfsStoreImportInputBase
/// <summary> /// <summary>
/// 调整数量 /// 调整数量
/// </summary> /// </summary>
[Display(Name = "调数量")] [Display(Name = "调数量")]
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]
public decimal Qty { get; set; } public decimal Qty { get; set; }
@ -39,14 +39,14 @@ public class WipWarehouseAdjustRequestImportInput : SfsStoreImportInputBase
public string FromLocationCode { get; set; } public string FromLocationCode { get; set; }
/// <summary> /// <summary>
/// 原因 /// 调整原因
/// </summary> /// </summary>
[Display(Name = "调整原因")] [Display(Name = "调整原因")]
[StringLength(SfsEfCorePropertyConst.RemarkLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.RemarkLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Reason { get; set; } public string Reason { get; set; }
/// <summary> /// <summary>
/// 调整代码 /// 原因代码
/// </summary> /// </summary>
[Display(Name = "原因代码")] [Display(Name = "原因代码")]
[StringLength(SfsEfCorePropertyConst.RemarkLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.RemarkLength, ErrorMessage = "{0}最多输入{1}个字符")]

38
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/ExchangeDatas/ExchangeDataAppService.cs

@ -78,6 +78,44 @@ public class ExchangeDataAppService
return new ExchangeDataDTO() { Id = entityNew.Id }; return new ExchangeDataDTO() { Id = entityNew.Id };
} }
[HttpPost("re-send-by-list")]
public virtual async Task<List<string>> ReSendByListAsync(List<string> list)
{
var exchangeDataOldList =
await _repository.GetListAsync(p => list.Contains(p.TyrpNumber)).ConfigureAwait(false);
var listnew = new List<string>();
foreach (var exchangeDataOld in exchangeDataOldList)
{
exchangeDataOld.Status = EnumExchangeDataStatus.Error;
var exchangeDataNew = new ExchangeData
{
DataAction = exchangeDataOld.DataAction,
DataContent = exchangeDataOld.DataContent,
DataIdentityCode = exchangeDataOld.DataIdentityCode,
DataType = exchangeDataOld.DataType,
DestinationSystem = exchangeDataOld.DestinationSystem,
EffectiveDate = exchangeDataOld.EffectiveDate,
Remark = exchangeDataOld.Remark,
SourceSystem = exchangeDataOld.SourceSystem,
WriteTime = DateTime.Now,
Writer = null
};
var entityNew = await _repository.InsertAsync(exchangeDataNew).ConfigureAwait(false);
exchangeDataOld.Remark = $"在【{DateTime.Now}】时,重新生成了新的接口数据:ID为【{entityNew.Id}】";
await _repository.UpdateAsync(exchangeDataOld).ConfigureAwait(false);
listnew.Add(entityNew.Id.ToString());
}
return listnew;
}
[HttpPost("by-batchsize-post")] [HttpPost("by-batchsize-post")]
public virtual async Task<List<ExchangeDataDTO>> GetToBeProcessedListPostAsync(int batchSize) public virtual async Task<List<ExchangeDataDTO>> GetToBeProcessedListPostAsync(int batchSize)
{ {

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

@ -12,6 +12,7 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using MyNamespace; using MyNamespace;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.ObjectMapping;
using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
@ -60,6 +61,14 @@ public class AssembleIssueJobAppService
_transferLibRequestAppService = transferLibRequestAppService; _transferLibRequestAppService = transferLibRequestAppService;
} }
[HttpPost("get-by-number-2")]
public async Task<AssembleIssueJobDTO> GetByNumber2Async(string number)
{
var entity = await _repository.FindAsync(p => p.Number == number).ConfigureAwait(false);
return ObjectMapper.Map<AssembleIssueJob, AssembleIssueJobDTO>(entity);
}
[HttpPost("add-many")] [HttpPost("add-many")]
public override async Task<List<AssembleIssueJobDTO>> CreateManyAsync(List<AssembleIssueJobEditInput> inputs) public override async Task<List<AssembleIssueJobDTO>> CreateManyAsync(List<AssembleIssueJobEditInput> inputs)
{ {

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

@ -12,6 +12,7 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using MyNamespace; using MyNamespace;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.ObjectMapping;
using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
@ -60,6 +61,14 @@ public class CoatingIssueJobAppService
_transferLibRequestAppService = transferLibRequestAppService; _transferLibRequestAppService = transferLibRequestAppService;
} }
[HttpPost("get-by-number-2")]
public async Task<CoatingIssueJobDTO> GetByNumber2Async(string number)
{
var entity = await _repository.FindAsync(p => p.Number == number).ConfigureAwait(false);
return ObjectMapper.Map<CoatingIssueJob, CoatingIssueJobDTO>(entity);
}
[HttpPost("add-many")] [HttpPost("add-many")]
public override async Task<List<CoatingIssueJobDTO>> CreateManyAsync(List<CoatingIssueJobEditInput> inputs) public override async Task<List<CoatingIssueJobDTO>> CreateManyAsync(List<CoatingIssueJobEditInput> inputs)
{ {
@ -192,6 +201,20 @@ public class CoatingIssueJobAppService
coatingIssueJob.JobStatus = EnumJobStatus.Doing; coatingIssueJob.JobStatus = EnumJobStatus.Doing;
var coatingIssueJobDto = ObjectMapper.Map<CoatingIssueJob, CoatingIssueJobDTO>(coatingIssueJob); var coatingIssueJobDto = ObjectMapper.Map<CoatingIssueJob, CoatingIssueJobDTO>(coatingIssueJob);
var fromLocationDto=await _locationAppService.GetByCodeAsync(issueJobDetailDto.HandledFromLocationCode).ConfigureAwait(false);
var toLocationDto = await _locationAppService.GetByCodeAsync(issueJobDetailDto.HandledToLocationCode).ConfigureAwait(false);
issueJobDetailDto.HandledFromLocationArea = fromLocationDto.AreaCode;
issueJobDetailDto.HandledFromLocationGroup = fromLocationDto.LocationGroupCode;
issueJobDetailDto.HandledFromLocationErpCode = fromLocationDto.ErpLocationCode;
issueJobDetailDto.HandledFromWarehouseCode = fromLocationDto.WarehouseCode;
issueJobDetailDto.HandledToLocationArea = toLocationDto.AreaCode;
issueJobDetailDto.HandledToLocationGroup = toLocationDto.LocationGroupCode;
issueJobDetailDto.HandledToLocationErpCode = toLocationDto.ErpLocationCode;
issueJobDetailDto.HandledToWarehouseCode = toLocationDto.WarehouseCode;
coatingIssueJobDto.Details = new List<CoatingIssueJobDetailDTO> { issueJobDetailDto }; coatingIssueJobDto.Details = new List<CoatingIssueJobDetailDTO> { issueJobDetailDto };
var coatingIssueNoteEditInput = await BuildCoatingIssueNoteAsync(coatingIssueJobDto).ConfigureAwait(false); var coatingIssueNoteEditInput = await BuildCoatingIssueNoteAsync(coatingIssueJobDto).ConfigureAwait(false);
await _coatingIssueNoteAppService.CreateAsync(coatingIssueNoteEditInput).ConfigureAwait(false); await _coatingIssueNoteAppService.CreateAsync(coatingIssueNoteEditInput).ConfigureAwait(false);

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

@ -12,6 +12,7 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using MyNamespace; using MyNamespace;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.ObjectMapping;
using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; using Win_in.Sfs.Shared.Domain.Shared.Enums.Store;
@ -59,6 +60,13 @@ public class InjectionIssueJobAppService
_options = options; _options = options;
_transferLibRequestAppService = transferLibRequestAppService; _transferLibRequestAppService = transferLibRequestAppService;
} }
[HttpPost("get-by-number-2")]
public async Task<InjectionIssueJobDTO> GetByNumber2Async(string number)
{
var entity = await _repository.FindAsync(p => p.Number == number).ConfigureAwait(false);
return ObjectMapper.Map<InjectionIssueJob, InjectionIssueJobDTO>(entity);
}
[HttpPost("add-many")] [HttpPost("add-many")]
public override async Task<List<InjectionIssueJobDTO>> CreateManyAsync(List<InjectionIssueJobEditInput> inputs) public override async Task<List<InjectionIssueJobDTO>> CreateManyAsync(List<InjectionIssueJobEditInput> inputs)

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

@ -60,6 +60,14 @@ public class KittingIssueJobAppService
_transferLibRequestAppService = transferLibRequestAppService; _transferLibRequestAppService = transferLibRequestAppService;
} }
[HttpPost("get-by-number-2")]
public async Task<KittingIssueJobDTO> GetByNumber2Async(string number)
{
var entity = await _repository.FindAsync(p => p.Number == number).ConfigureAwait(false);
return ObjectMapper.Map<KittingIssueJob, KittingIssueJobDTO>(entity);
}
[HttpPost("add-many")] [HttpPost("add-many")]
public override async Task<List<KittingIssueJobDTO>> CreateManyAsync(List<KittingIssueJobEditInput> inputs) public override async Task<List<KittingIssueJobDTO>> CreateManyAsync(List<KittingIssueJobEditInput> inputs)
{ {

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

@ -58,15 +58,24 @@ public class ThirdLocationJobAppService
{ {
var jobDetail= job.Details.FirstOrDefault(p => p.ItemCode == dto.Details[0].ItemCode); var jobDetail= job.Details.FirstOrDefault(p => p.ItemCode == dto.Details[0].ItemCode);
if (jobDetail.HandledQty + dto.Details[0].HandledQty > jobDetail.RecommendQty) if(jobDetail==null)
{ {
throw new UserFriendlyException($"任务错误:编号为【{job.Number}】的实际数量【{jobDetail.HandledQty + dto.Details[0].HandledQty}】不能大于申请数量【{dto.Details[0].RecommendQty}】"); throw new UserFriendlyException($"任务错误:未找到物品【{dto.Details[0].ItemCode} 的明细信息");
} }
if (jobDetail.ToLocationCode != dto.Details[0].ToLocationCode) else
{ {
throw new UserFriendlyException($"任务错误:编号为【{job.Number}】的实际目标库位【{dto.Details[0].ToLocationCode}】与申请目标库位【{jobDetail.ToLocationCode}】不一致"); if (dto.Details[0].HandledQty > jobDetail.RecommendQty)
{
throw new UserFriendlyException($"任务错误:编号为【{job.Number}】的实际数量【{dto.Details[0].HandledQty}】不能大于推荐数量【{dto.Details[0].RecommendQty}】");
}
if (jobDetail.ToLocationCode != dto.Details[0].ToLocationCode)
{
throw new UserFriendlyException($"任务错误:编号为【{job.Number}】的实际目标库位【{dto.Details[0].ToLocationCode}】与申请目标库位【{jobDetail.ToLocationCode}】不一致");
}
} }
} }

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

@ -398,7 +398,7 @@ public class InjectionIssueRequestAppService : SfsStoreRequestAppServiceBase<Inj
#region 视觉使用 #region 视觉使用
/// <summary> /// <summary>
/// 获取已完成的叫料单数量 /// 获取已完成的叫料单数量
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost("get-uncompleted-request")] [HttpPost("get-uncompleted-request")]

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

@ -163,9 +163,9 @@ public class ThirdLocationRequestAppService : SfsStoreRequestAppServiceBase<Thir
throw new UserFriendlyException($"{detailInput.ItemCode} 物品的库存为 {realityBalance} ,库存不够"); throw new UserFriendlyException($"{detailInput.ItemCode} 物品的库存为 {realityBalance} ,库存不够");
} }
//detailInput.ProdLine = detailInput.ToLocationCode;
detailInput.ToLocationErpCode = toLocationDto.ErpLocationCode; detailInput.ToLocationErpCode = toLocationDto.ErpLocationCode;
detailInput.IssuedQty = detailInput.Qty;
} }
@ -188,6 +188,7 @@ public class ThirdLocationRequestAppService : SfsStoreRequestAppServiceBase<Thir
detail.ItemName = itemBasicDto.Name; detail.ItemName = itemBasicDto.Name;
detail.Uom = itemBasicDto.BasicUom; detail.Uom = itemBasicDto.BasicUom;
detail.StdPackQty = itemBasicDto.StdPackQty; detail.StdPackQty = itemBasicDto.StdPackQty;
detail.IssuedQty = detail.Qty;
} }
var result = await _thirdLocationRequestManager.CreateAsync(entity).ConfigureAwait(false); var result = await _thirdLocationRequestManager.CreateAsync(entity).ConfigureAwait(false);

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

@ -19,6 +19,7 @@ public partial class StoreApplicationAutoMapperProfile : Profile
CreateMap<ThirdLocationRequestDetailInput, ThirdLocationRequestDetail>() CreateMap<ThirdLocationRequestDetailInput, ThirdLocationRequestDetail>()
.IgnoreAuditedObjectProperties() .IgnoreAuditedObjectProperties()
.Ignore(x => x.ToLocationArea) .Ignore(x => x.ToLocationArea)
.Ignore(x => x.IssuedQty)
.Ignore(x => x.ToLocationGroup) .Ignore(x => x.ToLocationGroup)
.Ignore(x => x.ToWarehouseCode) .Ignore(x => x.ToWarehouseCode)
.Ignore(x => x.MasterID) .Ignore(x => x.MasterID)

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ThirdLocationJobs/ThirdLocationJob.cs

@ -70,7 +70,7 @@ public class ThirdLocationJob : SfsJobAggregateRootBase<ThirdLocationJobDetail>
detail.HandledFromLocationCode = handledLocationCode; detail.HandledFromLocationCode = handledLocationCode;
detail.HandledFromLocationErpCode = handledLocationErpCode; detail.HandledFromLocationErpCode = handledLocationErpCode;
detail.HandledFromWarehouseCode = handledWarehouseCode; detail.HandledFromWarehouseCode = handledWarehouseCode;
detail.HandledQty = handledQty; //detail.HandledQty = handledQty;
detail.HandledSupplierBatch = handledSupplierBatch; detail.HandledSupplierBatch = handledSupplierBatch;
detail.HandledArriveDate = handledArriveDate; detail.HandledArriveDate = handledArriveDate;
detail.HandledProduceDate = handledProduceDate; detail.HandledProduceDate = handledProduceDate;

4
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ThirdLocationJobs/ThirdLocationJobDetail.cs

@ -52,9 +52,9 @@ public class ThirdLocationJobDetail : SfsJobRecommendFromDetailEntityBase, IHasT
public string SingleCodeJob { get; set; } public string SingleCodeJob { get; set; }
/// <summary> /// <summary>
/// 工作中心 /// 申请单件码
/// </summary> /// </summary>
public string WorkStation { get; set; } public string SingleCodeRequest { get; set; }
/// <summary> /// <summary>
/// 过期时间 /// 过期时间

28
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/ThirdLocationJobs/ThirdLocationJobManager.cs

@ -50,14 +50,29 @@ public class ThirdLocationJobManager : SfsJobManagerBase<ThirdLocationJob, Third
bool isDone = false; bool isDone = false;
var jobDetail = entity.Details.FirstOrDefault(p => p.ItemCode == entity.Details[0].ItemCode); var jobDetail = entity.Details.FirstOrDefault(p => p.ItemCode == entity.Details[0].ItemCode);
if (jobDetail.RecommendQty == jobDetail.HandledQty + input.Details[0].HandledQty) //if (jobDetail.RecommendQty == jobDetail.HandledQty + input.Details[0].HandledQty)
//{
// jobDetail.HandledQty += input.Details[0].HandledQty;
// isDone = true;
//}
//else
//{
// jobDetail.HandledQty = input.Details[0].HandledQty;
// isDone = false;
//}
if (jobDetail.RecommendQty == input.Details[0].HandledQty)
{ {
jobDetail.HandledQty += input.Details[0].HandledQty; jobDetail.HandledQty += input.Details[0].HandledQty;
jobDetail.RecommendQty= jobDetail.RecommendQty- input.Details[0].HandledQty;
jobDetail.SingleCodeJob = input.Details[0].SingleCodeJob;
isDone = true; isDone = true;
} }
else else
{ {
jobDetail.HandledQty = input.Details[0].HandledQty; jobDetail.HandledQty += input.Details[0].HandledQty;
jobDetail.RecommendQty = jobDetail.RecommendQty - input.Details[0].HandledQty;
jobDetail.SingleCodeJob = input.Details[0].SingleCodeJob;
isDone = false; isDone = false;
} }
@ -75,11 +90,16 @@ public class ThirdLocationJobManager : SfsJobManagerBase<ThirdLocationJob, Third
if (isDone) if (isDone)
{ {
return await base.CompleteAsync(entity, user).ConfigureAwait(false); await entity.CompleteAsync(user.Id, user.Name, Clock.Now).ConfigureAwait(false);
input.Details[0].RecommendQty = jobDetail.RecommendQty;
await PublishCompletedAsync(input).ConfigureAwait(false);
return await Repository.UpdateAsync(entity).ConfigureAwait(false);
//return await base.CompleteAsync(entity, user).ConfigureAwait(false);
} }
else else
{ {
entity.JobStatus = EnumJobStatus.Partial; entity.JobStatus = EnumJobStatus.Partial;
input.Details[0].RecommendQty = jobDetail.RecommendQty;
await PublishCompletedAsync(input).ConfigureAwait(false); await PublishCompletedAsync(input).ConfigureAwait(false);
return await Repository.UpdateAsync(entity).ConfigureAwait(false); return await Repository.UpdateAsync(entity).ConfigureAwait(false);
} }

8
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ThirdLocationNotes/ThirdLocationNoteDetail.cs

@ -17,14 +17,14 @@ public class ThirdLocationNoteDetail : SfsStoreRecommendFromDetailWithFromToEnti
public DateTime ExpiredTime { get; set; } public DateTime ExpiredTime { get; set; }
/// <summary> /// <summary>
/// 生产线 /// 收货单件码
/// </summary> /// </summary>
public string ProdLine { get; set; } public string SingleCodeJob { get; set; }
/// <summary> /// <summary>
/// 工作中心 /// 申请单件码
/// </summary> /// </summary>
public string WorkStation { get; set; } public string SingleCodeRequest { get; set; }
/// <summary> /// <summary>
/// 在途库库位 /// 在途库库位

2
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/ThirdLocationJobs/ThirdLocationJobDbContextModelCreatingExtensions.cs

@ -51,7 +51,7 @@ public static class ThirdLocationJobDbContextModelCreatingExtensions
b.Property(q => q.FromLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.FromLocationCode).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.FromLocationArea).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.FromLocationArea).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.SingleCodeJob).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.SingleCodeJob).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.WorkStation).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.SingleCodeRequest).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.Operation).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.Operation).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.DistributionType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>(); b.Property(q => q.DistributionType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>();
b.Property(q => q.TruncType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>(); b.Property(q => q.TruncType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>();

34515
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240524003508_Update_SingleCodeJob.Designer.cs

File diff suppressed because it is too large

25
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240524003508_Update_SingleCodeJob.cs

@ -0,0 +1,25 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Win_in.Sfs.Wms.Store.Migrations
{
public partial class Update_SingleCodeJob : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "WorkStation",
table: "Job_ThirdLocationJobDetail",
newName: "SingleCodeRequest");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "SingleCodeRequest",
table: "Job_ThirdLocationJobDetail",
newName: "WorkStation");
}
}
}

34515
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240527070921_Update_20240527.Designer.cs

File diff suppressed because it is too large

35
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240527070921_Update_20240527.cs

@ -0,0 +1,35 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Win_in.Sfs.Wms.Store.Migrations
{
public partial class Update_20240527 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "WorkStation",
table: "Store_ThirdLocationNoteDetail",
newName: "SingleCodeRequest");
migrationBuilder.RenameColumn(
name: "ProdLine",
table: "Store_ThirdLocationNoteDetail",
newName: "SingleCodeJob");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "SingleCodeRequest",
table: "Store_ThirdLocationNoteDetail",
newName: "WorkStation");
migrationBuilder.RenameColumn(
name: "SingleCodeJob",
table: "Store_ThirdLocationNoteDetail",
newName: "ProdLine");
}
}
}

24
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs

@ -27312,6 +27312,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations
.HasMaxLength(64) .HasMaxLength(64)
.HasColumnType("nvarchar(64)"); .HasColumnType("nvarchar(64)");
b.Property<string>("SingleCodeRequest")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Status") b.Property<string>("Status")
.IsRequired() .IsRequired()
.HasMaxLength(64) .HasMaxLength(64)
@ -27352,10 +27356,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations
b.Property<string>("Uom") b.Property<string>("Uom")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<string>("WorkStation")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.HasKey("Id"); b.HasKey("Id");
b.HasIndex("MasterID"); b.HasIndex("MasterID");
@ -27619,10 +27619,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations
.HasMaxLength(64) .HasMaxLength(64)
.HasColumnType("nvarchar(64)"); .HasColumnType("nvarchar(64)");
b.Property<string>("ProdLine")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<DateTime>("ProduceDate") b.Property<DateTime>("ProduceDate")
.HasColumnType("datetime2"); .HasColumnType("datetime2");
@ -27698,6 +27694,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations
.HasColumnType("nvarchar(3072)") .HasColumnType("nvarchar(3072)")
.HasColumnName("Remark"); .HasColumnName("Remark");
b.Property<string>("SingleCodeJob")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("SingleCodeRequest")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<decimal>("StdPackQty") b.Property<decimal>("StdPackQty")
.HasColumnType("decimal(18,6)"); .HasColumnType("decimal(18,6)");
@ -27758,10 +27762,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations
.HasColumnType("nvarchar(64)") .HasColumnType("nvarchar(64)")
.HasColumnName("Uom"); .HasColumnName("Uom");
b.Property<string>("WorkStation")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.HasKey("Id"); b.HasKey("Id");
b.HasIndex("FromPackingCode"); b.HasIndex("FromPackingCode");

4
be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/ThirdLocationNotes/ThirdLocationNoteDbContextModelCreatingExtensions.cs

@ -45,8 +45,8 @@ public static class ThirdLocationNoteDbContextModelCreatingExtensions
//Properties //Properties
b.Property(q => q.IssueTime).IsRequired(); b.Property(q => q.IssueTime).IsRequired();
b.Property(q => q.ExpiredTime).IsRequired(); b.Property(q => q.ExpiredTime).IsRequired();
b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.NameLength); b.Property(q => q.SingleCodeJob).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.WorkStation).HasMaxLength(SfsPropertyConst.NameLength); b.Property(q => q.SingleCodeRequest).HasMaxLength(SfsPropertyConst.NameLength);
b.Property(q => q.OnTheWayLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.OnTheWayLocationCode).HasMaxLength(SfsPropertyConst.CodeLength);
b.Property(q => q.FromStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>(); b.Property(q => q.FromStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>();
b.Property(q => q.ToStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>(); b.Property(q => q.ToStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion<string>();

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

@ -37,14 +37,15 @@ public partial class StoreEventAutoMapperProfile : Profile
.ForMember(x => x.ToStatus, y => y.MapFrom(d => d.Status)) .ForMember(x => x.ToStatus, y => y.MapFrom(d => d.Status))
.ForMember(x => x.Qty, y => y.MapFrom(d => d.HandledQty)) .ForMember(x => x.Qty, y => y.MapFrom(d => d.HandledQty))
.ForMember(x => x.IssueTime, y => y.MapFrom(d => DateTime.Now)) .ForMember(x => x.IssueTime, y => y.MapFrom(d => DateTime.Now))
.ForMember(x => x.FromLocationCode, y => y.MapFrom(d => d.HandledFromLocationCode)) .ForMember(x => x.FromLocationCode, y => y.MapFrom(d => d.FromLocationCode))
.ForMember(x => x.FromLocationArea, y => y.MapFrom(d => d.HandledFromLocationArea)) .ForMember(x => x.FromLocationArea, y => y.MapFrom(d => d.FromLocationArea))
.ForMember(x => x.FromLocationGroup, y => y.MapFrom(d => d.HandledFromLocationGroup)) .ForMember(x => x.FromLocationGroup, y => y.MapFrom(d => d.HandledFromLocationGroup))
.ForMember(x => x.FromLocationErpCode, y => y.MapFrom(d => d.HandledFromLocationErpCode)) .ForMember(x => x.FromLocationErpCode, y => y.MapFrom(d => d.HandledFromLocationErpCode))
.ForMember(x => x.FromWarehouseCode, y => y.MapFrom(d => d.HandledFromWarehouseCode)) .ForMember(x => x.FromWarehouseCode, y => y.MapFrom(d => d.HandledFromWarehouseCode))
.ForMember(x => x.ToLocationCode, y => y.MapFrom(d => d.ToLocationCode)) .ForMember(x => x.ToLocationCode, y => y.MapFrom(d => d.ToLocationCode))
.ForMember(x => x.SingleCodeJob, y => y.MapFrom(d => d.SingleCodeJob))
.ForMember(x => x.SingleCodeRequest, y => y.MapFrom(d => d.SingleCodeRequest))
.Ignore(x => x.ToLocationArea) .Ignore(x => x.ToLocationArea)
.Ignore(x => x.ProdLine)
.Ignore(x => x.ToLocationGroup) .Ignore(x => x.ToLocationGroup)
.Ignore(x => x.ToLocationErpCode) .Ignore(x => x.ToLocationErpCode)
; ;
@ -70,7 +71,6 @@ public partial class StoreEventAutoMapperProfile : Profile
; ;
CreateMap<ThirdLocationJobDetail, ThirdLocationNoteDetailInput>() CreateMap<ThirdLocationJobDetail, ThirdLocationNoteDetailInput>()
.ForMember(x => x.Qty, y => y.MapFrom(d => d.HandledQty)) .ForMember(x => x.Qty, y => y.MapFrom(d => d.HandledQty))
.ForMember(x => x.FromLocationCode, y => y.MapFrom(d => d.RecommendFromLocationCode))
.ForMember(x => x.IssueTime, y => y.MapFrom(d => DateTime.Now)) .ForMember(x => x.IssueTime, y => y.MapFrom(d => DateTime.Now))
.ForMember(x => x.FromPackingCode, y => y.MapFrom(d => d.HandledPackingCode)) .ForMember(x => x.FromPackingCode, y => y.MapFrom(d => d.HandledPackingCode))
.ForMember(x => x.ToPackingCode, y => y.MapFrom(d => d.HandledPackingCode)) .ForMember(x => x.ToPackingCode, y => y.MapFrom(d => d.HandledPackingCode))
@ -82,13 +82,15 @@ public partial class StoreEventAutoMapperProfile : Profile
.ForMember(x => x.ArriveDate, y => y.MapFrom(d => d.HandledArriveDate)) .ForMember(x => x.ArriveDate, y => y.MapFrom(d => d.HandledArriveDate))
.ForMember(x => x.ProduceDate, y => y.MapFrom(d => d.HandledProduceDate)) .ForMember(x => x.ProduceDate, y => y.MapFrom(d => d.HandledProduceDate))
.ForMember(x => x.ExpireDate, y => y.MapFrom(d => d.ExpiredTime)) .ForMember(x => x.ExpireDate, y => y.MapFrom(d => d.ExpiredTime))
.ForMember(x => x.FromLocationArea, y => y.MapFrom(d => d.HandledFromLocationArea)) .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.FromLocationGroup, y => y.MapFrom(d => d.HandledFromLocationGroup))
.ForMember(x => x.FromLocationErpCode, y => y.MapFrom(d => d.HandledFromLocationErpCode)) .ForMember(x => x.FromLocationErpCode, y => y.MapFrom(d => d.HandledFromLocationErpCode))
.ForMember(x => x.FromWarehouseCode, y => y.MapFrom(d => d.HandledFromWarehouseCode)) .ForMember(x => x.FromWarehouseCode, y => y.MapFrom(d => d.HandledFromWarehouseCode))
.ForMember(x => x.FromStatus, y => y.MapFrom(d => d.Status)) .ForMember(x => x.FromStatus, y => y.MapFrom(d => d.Status))
.ForMember(x => x.ToStatus, y => y.MapFrom(d => d.Status)) .ForMember(x => x.ToStatus, y => y.MapFrom(d => d.Status))
.Ignore(x => x.ProdLine) .ForMember(x => x.SingleCodeJob, y => y.MapFrom(d => d.SingleCodeJob))
.ForMember(x => x.SingleCodeRequest, y => y.MapFrom(d => d.SingleCodeRequest))
; ;
} }
} }

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

@ -61,6 +61,7 @@ public partial class StoreEventAutoMapperProfile : Profile
CreateMap<ThirdLocationRequestDetail, ThirdLocationJobDetailInput>() CreateMap<ThirdLocationRequestDetail, ThirdLocationJobDetailInput>()
.ForMember(x => x.FromLocationCode, y => y.MapFrom(d => d.FromLocationCode)) .ForMember(x => x.FromLocationCode, y => y.MapFrom(d => d.FromLocationCode))
.ForMember(x => x.SingleCodeRequest, y => y.MapFrom(d => d.SingleCodeRequest))
.Ignore(x => x.SingleCodeJob) .Ignore(x => x.SingleCodeJob)
.Ignore(x => x.RecommendFromLocationArea) .Ignore(x => x.RecommendFromLocationArea)
.Ignore(x => x.RecommendFromLocationGroup) .Ignore(x => x.RecommendFromLocationGroup)
@ -128,7 +129,7 @@ public partial class StoreEventAutoMapperProfile : Profile
.Ignore(x => x.FromLocationCode) .Ignore(x => x.FromLocationCode)
.Ignore(x => x.ToLocationCode) .Ignore(x => x.ToLocationCode)
.Ignore(x => x.SingleCodeJob) .Ignore(x => x.SingleCodeJob)
.Ignore(x => x.WorkStation) .Ignore(x => x.SingleCodeRequest)
.Ignore(x => x.HandledContainerCode) .Ignore(x => x.HandledContainerCode)
.Ignore(x => x.HandledExpireDate) .Ignore(x => x.HandledExpireDate)
.Ignore(x => x.HandledFromLocationCode) .Ignore(x => x.HandledFromLocationCode)
@ -152,7 +153,7 @@ public partial class StoreEventAutoMapperProfile : Profile
.Ignore(x => x.FromLocationCode) .Ignore(x => x.FromLocationCode)
.Ignore(x => x.ToLocationCode) .Ignore(x => x.ToLocationCode)
.Ignore(x => x.SingleCodeJob) .Ignore(x => x.SingleCodeJob)
.Ignore(x => x.WorkStation) .Ignore(x => x.SingleCodeRequest)
.Ignore(x => x.PositionCode) .Ignore(x => x.PositionCode)
.Ignore(x => x.RecommendType) .Ignore(x => x.RecommendType)
.Ignore(x => x.FromLocationArea) .Ignore(x => x.FromLocationArea)

4
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/PurchaseReturnJobEventHandler.cs

@ -55,6 +55,10 @@ public class PurchaseReturnJobEventHandler :
var input = ObjectMapper.Map<PurchaseReturnJob, PurchaseReturnNoteEditInput>(entity); var input = ObjectMapper.Map<PurchaseReturnJob, PurchaseReturnNoteEditInput>(entity);
input.Details.RemoveAll(p => p.Qty == 0); input.Details.RemoveAll(p => p.Qty == 0);
foreach (var detail in input.Details)
{
detail.HandledQty = detail.Qty;
}
return input; return input;
} }

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

@ -44,12 +44,6 @@ public class ThirdLocationJobEventHandler :
var entity = eventData.Entity; var entity = eventData.Entity;
entity.CompleteTime = Clock.Now; entity.CompleteTime = Clock.Now;
entity.JobStatus = EnumJobStatus.Done;
//foreach (var detail in eventData.Entity.Details)
//{
// detail.SetHandledFromRecommend();
//}
var thirdLocationNote = await BuildThirdLocationNoteAsync(entity).ConfigureAwait(false); var thirdLocationNote = await BuildThirdLocationNoteAsync(entity).ConfigureAwait(false);
await _thirdLocationNoteAppService.CreateAsync(thirdLocationNote).ConfigureAwait(false); await _thirdLocationNoteAppService.CreateAsync(thirdLocationNote).ConfigureAwait(false);

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

@ -98,16 +98,16 @@ public class ThirdLocationRequestEventHandler
if (thirdLocationJobs.Any()) if (thirdLocationJobs.Any())
{ {
await _thirdLocationJobAppService.CreateManyAsync(thirdLocationJobs).ConfigureAwait(false); await _thirdLocationJobAppService.CreateManyAsync(thirdLocationJobs).ConfigureAwait(false);
}
//来源库位更新为在途库位 //来源库位更新为在途库位
var transferLogs = new List<TransferLogEditInput>(); var transferLogs = new List<TransferLogEditInput>();
var route = entity.UseOnTheWayLocation var route = entity.UseOnTheWayLocation
? EnumTransferRoute.SourceToOnTheWay ? EnumTransferRoute.SourceToOnTheWay
: EnumTransferRoute.SourceToDestination; : EnumTransferRoute.SourceToDestination;
transferLogs.AddRange(await BuildTransferLogsAsync(entity, route).ConfigureAwait(false)); transferLogs.AddRange(await BuildTransferLogsAsync(entity, route).ConfigureAwait(false));
await _transferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false); await _transferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false);
}
} }
@ -292,8 +292,8 @@ public class ThirdLocationRequestEventHandler
var toLocationCodes = thirdLocationRequest.Details.Select(p => p.ToLocationCode).Distinct().ToList();//所有发送库位的集合 var toLocationCodes = thirdLocationRequest.Details.Select(p => p.ToLocationCode).Distinct().ToList();//所有发送库位的集合
var toLocations = await _locationAppService.GetByCodesAsync(toLocationCodes).ConfigureAwait(false);//所有库位的集合 var toLocations = await _locationAppService.GetByCodesAsync(toLocationCodes).ConfigureAwait(false);//所有库位的集合
var thirdLocationRequestDetails = thirdLocationRequest.Details.Where(p => p.ToBeIssuedQty > 0);//所有还没发送物品的集合 var thirdLocationRequestDetails = thirdLocationRequest.Details;
foreach (var thirdLocationRequestDetail in thirdLocationRequestDetails)//如果有还有剩余未叫料的数量 则创建新的任务 foreach (var thirdLocationRequestDetail in thirdLocationRequestDetails)
{ {
var toLocation = toLocations.FirstOrDefault(p => p.Code == thirdLocationRequestDetail.ToLocationCode);//判断目标库位是否存在 var toLocation = toLocations.FirstOrDefault(p => p.Code == thirdLocationRequestDetail.ToLocationCode);//判断目标库位是否存在
Check.NotNull(toLocation, "库位代码", $"库位 {thirdLocationRequestDetail.ToLocationCode} 不存在"); Check.NotNull(toLocation, "库位代码", $"库位 {thirdLocationRequestDetail.ToLocationCode} 不存在");
@ -384,7 +384,7 @@ public class ThirdLocationRequestEventHandler
var detail = ObjectMapper.Map<BalanceDTO, ThirdLocationJobDetailInput>(balance); var detail = ObjectMapper.Map<BalanceDTO, ThirdLocationJobDetailInput>(balance);
detail.WorkStation = thirdLocationRequestDetail.WorkStation; detail.SingleCodeRequest = thirdLocationRequestDetail.SingleCodeRequest;
detail.ExpiredTime = thirdLocationRequestDetail.ExpiredTime; detail.ExpiredTime = thirdLocationRequestDetail.ExpiredTime;
detail.PositionCode = thirdLocationRequestDetail.PositionCode; detail.PositionCode = thirdLocationRequestDetail.PositionCode;
detail.RecommendType = thirdLocationRequestDetail.RecommendType; detail.RecommendType = thirdLocationRequestDetail.RecommendType;

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

@ -82,6 +82,7 @@ public class ThirdLocationNoteEventHandler
} }
else else
{ {
requestEntities[0].RequestStatus = EnumRequestStatus.Partial;
await _thirdLocationRequestManager.UpdateAsync(requestEntities[0]).ConfigureAwait(false); await _thirdLocationRequestManager.UpdateAsync(requestEntities[0]).ConfigureAwait(false);
} }

16
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/WipWarehouseAdjustNoteEventHandler.cs

@ -23,12 +23,14 @@ public class WipWarehouseAdjustNoteEventHandler
private readonly IWipWarehouseAdjustRequestAppService _wipWarehouseAdjustRequestApp; private readonly IWipWarehouseAdjustRequestAppService _wipWarehouseAdjustRequestApp;
private readonly IItemBasicAppService _itemBasicAppService; private readonly IItemBasicAppService _itemBasicAppService;
private readonly IBalanceAppService _balanceAppService;
public WipWarehouseAdjustNoteEventHandler( public WipWarehouseAdjustNoteEventHandler(
IWipWarehouseAdjustRequestAppService wipWarehouseAdjustRequestApp, IItemBasicAppService itemBasicAppService) IWipWarehouseAdjustRequestAppService wipWarehouseAdjustRequestApp, IItemBasicAppService itemBasicAppService, IBalanceAppService balanceAppService)
{ {
_wipWarehouseAdjustRequestApp = wipWarehouseAdjustRequestApp; _wipWarehouseAdjustRequestApp = wipWarehouseAdjustRequestApp;
_itemBasicAppService = itemBasicAppService; _itemBasicAppService = itemBasicAppService;
_balanceAppService = balanceAppService;
} }
/// <summary> /// <summary>
@ -87,12 +89,20 @@ public class WipWarehouseAdjustNoteEventHandler
{ {
var itemBasicDto= await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); var itemBasicDto= await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false);
var balanceNums = await _balanceAppService.GetListByLocationCodeAndItemCodeAsync(detail.FromLocationCode, detail.ItemCode).ConfigureAwait(false);
decimal balanceSum = 0;
foreach (var item in balanceNums)
{
balanceSum += item.Qty;
}
var transaction = new TransactionEditInput(); var transaction = new TransactionEditInput();
transaction.TransType = TransType; transaction.TransType = TransType;
transaction.TransSubType = TransSubType; transaction.TransSubType = TransSubType;
transaction.Qty = detail.Qty- balanceSum;
transaction.TransInOut = detail.Qty > 0 ? EnumTransInOut.In : EnumTransInOut.Out; transaction.TransInOut = transaction.Qty > 0 ? EnumTransInOut.In : EnumTransInOut.Out;
transaction.Worker = countAdjustNote.Worker; transaction.Worker = countAdjustNote.Worker;
transaction.DocNumber = countAdjustNote.Number; transaction.DocNumber = countAdjustNote.Number;
@ -107,7 +117,7 @@ public class WipWarehouseAdjustNoteEventHandler
transaction.Uom=detail.Uom; transaction.Uom=detail.Uom;
transaction.PackingCode = detail.ToPackingCode; transaction.PackingCode = detail.ToPackingCode;
transaction.Lot = detail.ToLot; transaction.Lot = detail.ToLot;
transaction.Qty=detail.Qty;
transaction.Status = detail.ToStatus; transaction.Status = detail.ToStatus;
transaction.LocationCode = detail.ToLocationCode; transaction.LocationCode = detail.ToLocationCode;
transaction.LocationGroup = detail.ToLocationGroup; transaction.LocationGroup = detail.ToLocationGroup;

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

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

Loading…
Cancel
Save