ResourceExamineAppService.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using Microsoft.EntityFrameworkCore;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Linq.Dynamic.Core;
  6. using System.Threading.Tasks;
  7. using Volo.Abp.Application.Dtos;
  8. using Volo.Abp.Domain.Repositories;
  9. using Business.Models;
  10. using Microsoft.AspNetCore.Authorization;
  11. using Business.Permissions;
  12. using XCZ;
  13. using Business.ResourceExamineManagement.Dto;
  14. using Bussiness.Model.MES.IC;
  15. using AutoMapper.Internal.Mappers;
  16. namespace Business.ResourceExamineManagement
  17. {
  18. public class ResourceExamineAppService : IResourceExamineAppService
  19. {
  20. private IRepository<ic_item,long> _ic_item;
  21. private IRepository<ic_bom, long> _ic_bom;
  22. public ResourceExamineAppService(
  23. IRepository<ic_item, long> icitem,
  24. IRepository<ic_bom, long> icbom
  25. )
  26. {
  27. _ic_item = icitem;
  28. _ic_bom = icbom;
  29. }
  30. /// <summary>
  31. /// 资源检查
  32. /// </summary>
  33. /// <param name="input"></param>
  34. /// <returns></returns>
  35. /// <exception cref="NotImplementedException"></exception>
  36. public Task<PschedDto> ReceiveResult(SeorderentryDto input)
  37. {
  38. throw new NotImplementedException();
  39. }
  40. /// <summary>
  41. /// BOM预处理
  42. /// </summary>
  43. /// <param name="BomId">Bom主键</param>
  44. /// <param name="Quantity">需要数量</param>
  45. public async Task BomPretreatmentAsync(long? BomId, int Quantity)
  46. {
  47. if (BomId == null)
  48. {
  49. //throw new bu
  50. }
  51. var query = (await _ic_bom.GetQueryableAsync()).WhereIf(true, a => a.bom_id == BomId).ToList();
  52. }
  53. }
  54. }