|
|
@@ -10,14 +10,27 @@ using Business.Models;
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
using Business.Permissions;
|
|
|
using XCZ;
|
|
|
-using Business.ResourceExamineManagement;
|
|
|
using Business.ResourceExamineManagement.Dto;
|
|
|
+using Bussiness.Model.MES.IC;
|
|
|
+using AutoMapper.Internal.Mappers;
|
|
|
|
|
|
-namespace Business.BookManagement
|
|
|
+namespace Business.ResourceExamineManagement
|
|
|
{
|
|
|
- [Authorize(BusinessPermissions.Book.Default)]
|
|
|
public class ResourceExamineAppService : IResourceExamineAppService
|
|
|
{
|
|
|
+
|
|
|
+ private IRepository<ic_item,long> _ic_item;
|
|
|
+ private IRepository<ic_bom, long> _ic_bom;
|
|
|
+
|
|
|
+ public ResourceExamineAppService(
|
|
|
+ IRepository<ic_item, long> icitem,
|
|
|
+ IRepository<ic_bom, long> icbom
|
|
|
+ )
|
|
|
+ {
|
|
|
+ _ic_item = icitem;
|
|
|
+ _ic_bom = icbom;
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 资源检查
|
|
|
/// </summary>
|
|
|
@@ -27,6 +40,23 @@ namespace Business.BookManagement
|
|
|
public Task<PschedDto> ReceiveResult(SeorderentryDto input)
|
|
|
{
|
|
|
throw new NotImplementedException();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// BOM预处理
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="BomId">Bom主键</param>
|
|
|
+ /// <param name="Quantity">需要数量</param>
|
|
|
+ public async Task BomPretreatmentAsync(long? BomId, int Quantity)
|
|
|
+ {
|
|
|
+ if (BomId == null)
|
|
|
+ {
|
|
|
+ //throw new bu
|
|
|
+ }
|
|
|
+
|
|
|
+ var query = (await _ic_bom.GetQueryableAsync()).WhereIf(true, a => a.bom_id == BomId).ToList();
|
|
|
}
|
|
|
}
|
|
|
}
|