|
|
@ -32,6 +32,13 @@ public class JobController : AbpController |
|
|
|
private readonly IPutawayJobAppService _putawayJobAppService; |
|
|
|
private readonly IProductionReturnJobAppService _productionReturnJobAppService; |
|
|
|
private readonly IThirdLocationJobAppService _thirdLocationJobAppService; |
|
|
|
private readonly IContainerJobAppService _containerJobAppService; |
|
|
|
private readonly IInjectionIssueJobAppService _injectionIssueJobAppService; |
|
|
|
private readonly IInjectionPlanJobAppService _injectionPlanJobAppService; |
|
|
|
private readonly ICoatingIssueJobAppService _coatingIssueJobAppService; |
|
|
|
private readonly IAssembleIssueJobAppService _assembleIssueJobAppService; |
|
|
|
private readonly IKittingIssueJobAppService _kittingIssueJobAppService; |
|
|
|
private readonly ISparePartIssueJobAppService _sparePartIssueJobAppService; |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
///
|
|
|
@ -56,7 +63,14 @@ public class JobController : AbpController |
|
|
|
IPurchaseReturnJobAppService purchaseReturnJobAppService, |
|
|
|
IPutawayJobAppService putawayJobAppService, |
|
|
|
IProductionReturnJobAppService productionReturnJobAppService, |
|
|
|
IThirdLocationJobAppService thirdLocationJobAppService) |
|
|
|
IThirdLocationJobAppService thirdLocationJobAppService, |
|
|
|
IContainerJobAppService containerJobAppService, |
|
|
|
IInjectionIssueJobAppService injectionIssueJobAppService, |
|
|
|
IInjectionPlanJobAppService injectionPlanJobAppService, |
|
|
|
ICoatingIssueJobAppService coatingIssueJobAppService, |
|
|
|
IAssembleIssueJobAppService assembleIssueJobAppService, |
|
|
|
IKittingIssueJobAppService kittingIssueJobAppService, |
|
|
|
ISparePartIssueJobAppService sparePartIssueJobAppService) |
|
|
|
{ |
|
|
|
_userWorkGroupAppService = userWorkGroupAppService; |
|
|
|
_countJobAppService = countJobAppService; |
|
|
@ -69,6 +83,13 @@ public class JobController : AbpController |
|
|
|
_putawayJobAppService = putawayJobAppService; |
|
|
|
_productionReturnJobAppService = productionReturnJobAppService; |
|
|
|
_thirdLocationJobAppService = thirdLocationJobAppService; |
|
|
|
_containerJobAppService = containerJobAppService; |
|
|
|
_injectionIssueJobAppService = injectionIssueJobAppService; |
|
|
|
_injectionPlanJobAppService = injectionPlanJobAppService; |
|
|
|
_coatingIssueJobAppService = coatingIssueJobAppService; |
|
|
|
_assembleIssueJobAppService = assembleIssueJobAppService; |
|
|
|
_kittingIssueJobAppService = kittingIssueJobAppService; |
|
|
|
_sparePartIssueJobAppService = sparePartIssueJobAppService; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
@ -81,24 +102,39 @@ public class JobController : AbpController |
|
|
|
var wlgCodes = await _userWorkGroupAppService.GetUserWorkGroupAsync(userId).ConfigureAwait(false); |
|
|
|
var jsonCodes = JsonSerializer.Serialize(wlgCodes.Select(p=>p.WorkGroupCode)); |
|
|
|
|
|
|
|
var status = new List<EnumJobStatus>() { EnumJobStatus.Open,EnumJobStatus.Doing }; |
|
|
|
var status = new List<EnumJobStatus>() { EnumJobStatus.Open,EnumJobStatus.Doing, EnumJobStatus.Partial}; |
|
|
|
var jsonStatus = JsonSerializer.Serialize(status); |
|
|
|
|
|
|
|
var list = new List<JobCountDto>(); |
|
|
|
|
|
|
|
var countJobs = await _countJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase |
|
|
|
//盘点有箱码 (原料盘点)
|
|
|
|
var countJobs_ByPackingCode = await _countJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase |
|
|
|
{ |
|
|
|
Condition = new Condition |
|
|
|
{ |
|
|
|
Filters = new List<Filter> |
|
|
|
{ |
|
|
|
new(nameof(CountJobDTO.WorkGroupCode),jsonCodes,"In"), |
|
|
|
new(nameof(CountJobDTO.JobStatus),jsonStatus,"In") |
|
|
|
new(nameof(CountJobDTO.JobStatus),jsonStatus,"In"), |
|
|
|
new(nameof(CountJobDTO.InventoryMode),EnumInventoryMode.ByPackingCode.ToString()) |
|
|
|
} |
|
|
|
} |
|
|
|
}).ConfigureAwait(false); |
|
|
|
list.Add(new JobCountDto { JobType = EnumJobType.CountJob, Count = countJobs }); |
|
|
|
|
|
|
|
list.Add(new JobCountDto { JobType = EnumJobType.CountJob_ByPackingCode, Count = countJobs_ByPackingCode }); |
|
|
|
//盘点无箱码 (成品盘点)
|
|
|
|
var countJobs_ByErpItemCode = await _countJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase |
|
|
|
{ |
|
|
|
Condition = new Condition |
|
|
|
{ |
|
|
|
Filters = new List<Filter> |
|
|
|
{ |
|
|
|
new(nameof(CountJobDTO.WorkGroupCode),jsonCodes,"In"), |
|
|
|
new(nameof(CountJobDTO.JobStatus),jsonStatus,"In"), |
|
|
|
new(nameof(CountJobDTO.InventoryMode),EnumInventoryMode.ByErpItemCode.ToString()) |
|
|
|
} |
|
|
|
} |
|
|
|
}).ConfigureAwait(false); |
|
|
|
list.Add(new JobCountDto { JobType = EnumJobType.CountJob_ByPackingCode, Count = countJobs_ByErpItemCode }); |
|
|
|
//发货
|
|
|
|
var deliverJobs = await _deliverJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase |
|
|
|
{ |
|
|
|
Condition = new Condition |
|
|
@ -111,7 +147,7 @@ public class JobController : AbpController |
|
|
|
} |
|
|
|
}).ConfigureAwait(false); |
|
|
|
list.Add(new JobCountDto { JobType = EnumJobType.DeliverJob, Count = deliverJobs }); |
|
|
|
|
|
|
|
//检验
|
|
|
|
var inspectJobs = await _inspectJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase |
|
|
|
{ |
|
|
|
Condition = new Condition |
|
|
@ -124,7 +160,7 @@ public class JobController : AbpController |
|
|
|
} |
|
|
|
}).ConfigureAwait(false); |
|
|
|
list.Add(new JobCountDto { JobType = EnumJobType.InspectJob, Count = inspectJobs }); |
|
|
|
|
|
|
|
//发料
|
|
|
|
var issueJobs = await _issueJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase |
|
|
|
{ |
|
|
|
Condition = new Condition |
|
|
@ -137,7 +173,7 @@ public class JobController : AbpController |
|
|
|
} |
|
|
|
}).ConfigureAwait(false); |
|
|
|
list.Add(new JobCountDto { JobType = EnumJobType.IssueJob, Count = issueJobs }); |
|
|
|
|
|
|
|
//完工收货
|
|
|
|
var productReceiveJobs = await _productReceiveJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase |
|
|
|
{ |
|
|
|
Condition = new Condition |
|
|
@ -150,7 +186,7 @@ public class JobController : AbpController |
|
|
|
} |
|
|
|
}).ConfigureAwait(false); |
|
|
|
list.Add(new JobCountDto { JobType = EnumJobType.ProductReceiveJob, Count = productReceiveJobs }); |
|
|
|
|
|
|
|
//采购收货
|
|
|
|
var purchaseReceiptJobRequest = new SfsJobRequestInputBase |
|
|
|
{ |
|
|
|
Condition = new Condition |
|
|
@ -169,7 +205,7 @@ public class JobController : AbpController |
|
|
|
} |
|
|
|
var purchaseReceiptJobs = await _purchaseReceiptJobAppService.GetCountByFilterAsync(purchaseReceiptJobRequest).ConfigureAwait(false); |
|
|
|
list.Add(new JobCountDto { JobType = EnumJobType.PurchaseReceiptJob, Count = purchaseReceiptJobs }); |
|
|
|
|
|
|
|
//采购退货
|
|
|
|
var purchaseReturnJobs = await _purchaseReturnJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase |
|
|
|
{ |
|
|
|
Condition = new Condition |
|
|
@ -182,7 +218,7 @@ public class JobController : AbpController |
|
|
|
} |
|
|
|
}).ConfigureAwait(false); |
|
|
|
list.Add(new JobCountDto { JobType = EnumJobType.PurchaseReturnJob, Count = purchaseReturnJobs }); |
|
|
|
|
|
|
|
//上架
|
|
|
|
var putawayJobs = await _putawayJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase |
|
|
|
{ |
|
|
|
Condition = new Condition |
|
|
@ -195,7 +231,7 @@ public class JobController : AbpController |
|
|
|
} |
|
|
|
}).ConfigureAwait(false); |
|
|
|
list.Add(new JobCountDto { JobType = EnumJobType.PutawayJob, Count = putawayJobs }); |
|
|
|
|
|
|
|
//退料
|
|
|
|
var productionReturnJobs = await _productionReturnJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase |
|
|
|
{ |
|
|
|
Condition = new Condition |
|
|
@ -221,7 +257,97 @@ public class JobController : AbpController |
|
|
|
} |
|
|
|
}).ConfigureAwait(false); |
|
|
|
list.Add(new JobCountDto { JobType = EnumJobType.ThirdLocationJob, Count = thirdLocationJobs }); |
|
|
|
|
|
|
|
//空器具库移
|
|
|
|
var containerTransferJob = await _containerJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase |
|
|
|
{ |
|
|
|
Condition = new Condition |
|
|
|
{ |
|
|
|
Filters = new List<Filter> |
|
|
|
{ |
|
|
|
new(nameof(ProductionReturnJobDTO.WorkGroupCode),jsonCodes,"In"), |
|
|
|
new(nameof(ProductionReturnJobDTO.JobStatus),jsonStatus,"In") |
|
|
|
} |
|
|
|
} |
|
|
|
}).ConfigureAwait(false); |
|
|
|
list.Add(new JobCountDto { JobType = EnumJobType.ContainerTransferJob, Count = containerTransferJob }); |
|
|
|
//注塑发料
|
|
|
|
var injectionIssueJob = await _injectionIssueJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase |
|
|
|
{ |
|
|
|
Condition = new Condition |
|
|
|
{ |
|
|
|
Filters = new List<Filter> |
|
|
|
{ |
|
|
|
new(nameof(ProductionReturnJobDTO.WorkGroupCode),jsonCodes,"In"), |
|
|
|
new(nameof(ProductionReturnJobDTO.JobStatus),jsonStatus,"In") |
|
|
|
} |
|
|
|
} |
|
|
|
}).ConfigureAwait(false); |
|
|
|
list.Add(new JobCountDto { JobType = EnumJobType.InjectionIssueJob, Count = injectionIssueJob }); |
|
|
|
//注塑计划
|
|
|
|
var injectionPlanJob = await _injectionPlanJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase |
|
|
|
{ |
|
|
|
Condition = new Condition |
|
|
|
{ |
|
|
|
Filters = new List<Filter> |
|
|
|
{ |
|
|
|
new(nameof(ProductionReturnJobDTO.WorkGroupCode),jsonCodes,"In"), |
|
|
|
new(nameof(ProductionReturnJobDTO.JobStatus),jsonStatus,"In") |
|
|
|
} |
|
|
|
} |
|
|
|
}).ConfigureAwait(false); |
|
|
|
list.Add(new JobCountDto { JobType = EnumJobType.InjectionPlanJob, Count = injectionPlanJob }); |
|
|
|
//喷涂发料
|
|
|
|
var coatingIssueJob = await _coatingIssueJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase |
|
|
|
{ |
|
|
|
Condition = new Condition |
|
|
|
{ |
|
|
|
Filters = new List<Filter> |
|
|
|
{ |
|
|
|
new(nameof(ProductionReturnJobDTO.WorkGroupCode),jsonCodes,"In"), |
|
|
|
new(nameof(ProductionReturnJobDTO.JobStatus),jsonStatus,"In") |
|
|
|
} |
|
|
|
} |
|
|
|
}).ConfigureAwait(false); |
|
|
|
list.Add(new JobCountDto { JobType = EnumJobType.CoatingIssueJob, Count = coatingIssueJob }); |
|
|
|
//装配发料
|
|
|
|
var assembleIssueJob = await _assembleIssueJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase |
|
|
|
{ |
|
|
|
Condition = new Condition |
|
|
|
{ |
|
|
|
Filters = new List<Filter> |
|
|
|
{ |
|
|
|
new(nameof(ProductionReturnJobDTO.WorkGroupCode),jsonCodes,"In"), |
|
|
|
new(nameof(ProductionReturnJobDTO.JobStatus),jsonStatus,"In") |
|
|
|
} |
|
|
|
} |
|
|
|
}).ConfigureAwait(false); |
|
|
|
list.Add(new JobCountDto { JobType = EnumJobType.AssembleIssueJob, Count = assembleIssueJob }); |
|
|
|
//kitting发料
|
|
|
|
var kittingIssueJob = await _kittingIssueJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase |
|
|
|
{ |
|
|
|
Condition = new Condition |
|
|
|
{ |
|
|
|
Filters = new List<Filter> |
|
|
|
{ |
|
|
|
new(nameof(ProductionReturnJobDTO.WorkGroupCode),jsonCodes,"In"), |
|
|
|
new(nameof(ProductionReturnJobDTO.JobStatus),jsonStatus,"In") |
|
|
|
} |
|
|
|
} |
|
|
|
}).ConfigureAwait(false); |
|
|
|
list.Add(new JobCountDto { JobType = EnumJobType.KittingIssueJob, Count = kittingIssueJob }); |
|
|
|
//备品发料
|
|
|
|
var sparePartIssueJob = await _sparePartIssueJobAppService.GetCountByFilterAsync(new SfsJobRequestInputBase |
|
|
|
{ |
|
|
|
Condition = new Condition |
|
|
|
{ |
|
|
|
Filters = new List<Filter> |
|
|
|
{ |
|
|
|
new(nameof(ProductionReturnJobDTO.WorkGroupCode),jsonCodes,"In"), |
|
|
|
new(nameof(ProductionReturnJobDTO.JobStatus),jsonStatus,"In") |
|
|
|
} |
|
|
|
} |
|
|
|
}).ConfigureAwait(false); |
|
|
|
list.Add(new JobCountDto { JobType = EnumJobType.SparePartIssueJob, Count = sparePartIssueJob }); |
|
|
|
return new ListResultDto<JobCountDto>(list); |
|
|
|
} |
|
|
|
} |
|
|
|