|
|
@@ -13,22 +13,55 @@ 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;
|
|
|
|
|
|
namespace Business.ResourceExamineManagement
|
|
|
{
|
|
|
+ /// <summary>
|
|
|
+ /// 资源检查
|
|
|
+ /// </summary>
|
|
|
public class ResourceExamineAppService : IResourceExamineAppService
|
|
|
{
|
|
|
+ #region 服务
|
|
|
+ //private IRepository<ic_item, long> _ic_item;
|
|
|
+ //private IRepository<ic_bom, long> _ic_bom;
|
|
|
|
|
|
- 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(
|
|
|
- IRepository<ic_item, long> icitem,
|
|
|
- IRepository<ic_bom, long> icbom
|
|
|
+ IMongoDB<mes_technique> mes_technique
|
|
|
)
|
|
|
{
|
|
|
- _ic_item = icitem;
|
|
|
- _ic_bom = icbom;
|
|
|
+ _mes_technique = mes_technique;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
@@ -37,8 +70,14 @@ namespace Business.ResourceExamineManagement
|
|
|
/// <param name="input"></param>
|
|
|
/// <returns></returns>
|
|
|
/// <exception cref="NotImplementedException"></exception>
|
|
|
- public Task<PschedDto> ReceiveResult(SeorderentryDto input)
|
|
|
+ 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();
|
|
|
|
|
|
}
|
|
|
@@ -51,12 +90,22 @@ namespace Business.ResourceExamineManagement
|
|
|
/// <param name="Quantity">需要数量</param>
|
|
|
public async Task BomPretreatmentAsync(long? BomId, int Quantity)
|
|
|
{
|
|
|
- if (BomId == null)
|
|
|
- {
|
|
|
- //throw new bu
|
|
|
- }
|
|
|
+ //if (BomId == null)
|
|
|
+ //{
|
|
|
+ // //throw new bu
|
|
|
+ //}
|
|
|
|
|
|
- var query = (await _ic_bom.GetQueryableAsync()).WhereIf(true, a => a.bom_id == BomId).ToList();
|
|
|
+ //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)
|
|
|
+ {
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|