| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- using Microsoft.EntityFrameworkCore;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Linq.Dynamic.Core;
- using System.Threading.Tasks;
- using Volo.Abp.Application.Dtos;
- using Volo.Abp.Domain.Repositories;
- using Business.Models;
- using Microsoft.AspNetCore.Authorization;
- using Business.Permissions;
- using XCZ;
- using Business.ResourceExamineManagement.Dto;
- using Bussiness.Model.MES.IC;
- using AutoMapper.Internal.Mappers;
- using Bussiness.Model.Tech;
- using Bussiness.Model.Production;
- using Business.Core.MongoDBHelper;
- using Business.Core.Utilities;
- using Hangfire.Storage.Monitoring;
- using Business.BookManagement.Dto;
- using Volo.Abp.ObjectMapping;
- namespace Business.ResourceExamineManagement
- {
- /// <summary>
- /// 资源检查
- /// </summary>
- [Authorize(BusinessPermissions.ResourceExamine.Default)]
- public class ResourceExamineAppService : IResourceExamineAppService
- {
- #region 服务
- //private IRepository<ic_item, long> _ic_item;
- //private IRepository<ic_bom, long> _ic_bom;
- ///// <summary>
- ///// 工艺路径
- ///// </summary>
- //private IRepository<mes_technique, long> _mes_technique;
- ///// <summary>
- ///// 工序
- ///// </summary>
- //private IRepository<mes_process, long> _mes_process;
- ///// <summary>
- ///// 工艺关联工序
- ///// </summary>
- //private IRepository<mes_tech_process, long> _mes_tech_process;
- ///// <summary>
- ///// 排程占用记录
- ///// </summary>
- //private IRepository<mes_schedule_occupy, long> _mes_schedule_occupy;
- private readonly IMongoDB<mes_technique> _mes_technique;
- #endregion
- /// <summary>
- /// 构造函数
- /// </summary>
- /// <param name="icitem"></param>
- /// <param name="icbom"></param>
- public ResourceExamineAppService(
- IMongoDB<mes_technique> mes_technique
- )
- {
- _mes_technique = mes_technique;
- }
- /// <summary>
- /// 资源检查
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- /// <exception cref="NotImplementedException"></exception>
- public async Task<PschedDto> ReceiveResult(SeorderentryDto input)
- {
- mes_technique info = new mes_technique();
- SnowFlake snow = new SnowFlake(1,1);
- info.tech_id = snow.NextId();
- info.tech_name = "ceshi";
- info.level = 1;
- await _mes_technique.InsertOne(info);
- throw new NotImplementedException();
- }
- /// <summary>
- /// BOM预处理
- /// </summary>
- /// <param name="orderid">订单行id</param>
- /// <param name="BomId">Bom主键</param>
- /// <param name="Quantity">需要数量</param>
- public async Task BomPretreatmentAsync(long? orderid,long? BomId, int Quantity)
- {
- //if (BomId == null)
- //{
- // //throw new bu
- //}
- //var query = (await _ic_bom.GetQueryableAsync()).WhereIf(true, a => a.bom_id == BomId).ToList();
- }
- /// <summary>
- /// 产能计算
- /// </summary>
- /// <param name="BomId">Bom主键</param>
- /// <param name="Quantity">需要数量</param>
- public async Task ProductiveExamine(long? BomId, int Quantity)
- {
-
- }
- }
- }
|