91 lines
2.6 KiB
C#
91 lines
2.6 KiB
C#
using DOAN.Model.MES.recipe;
|
||
using DOAN.Model.MES.recipe.Dto;
|
||
using DOAN.Service.MES.recipe.IService;
|
||
using DOAN.ServiceCore.Middleware;
|
||
using Infrastructure;
|
||
using Infrastructure.Attribute;
|
||
using Infrastructure.Controllers;
|
||
using Infrastructure.Enums;
|
||
using Mapster;
|
||
using MDM.Models.Flow;
|
||
using MDM.Models.Session;
|
||
using MDM.Services.Session.IService;
|
||
using Microsoft.AspNetCore.Authorization;
|
||
using Microsoft.AspNetCore.Mvc;
|
||
|
||
namespace MDM.Controllers.Session
|
||
{
|
||
|
||
/// <summary>
|
||
/// 回会管理
|
||
/// </summary>
|
||
[Route("mes/session_managemer")]
|
||
[AllowAnonymous]
|
||
public class SessionManagerController : BaseController
|
||
{
|
||
|
||
/// <summary>
|
||
/// 会话管理接口
|
||
/// </summary>
|
||
private readonly ISessionManagerService _ISessionManagerService;
|
||
public SessionManagerController(ISessionManagerService ISessionManagerService)
|
||
{
|
||
_ISessionManagerService = ISessionManagerService;
|
||
}
|
||
|
||
|
||
//TODO 开工申请
|
||
/// <summary>
|
||
/// 开工申请
|
||
/// </summary>
|
||
/// <param name="ProcessCode">过程码</param>
|
||
/// <param name="WorkOrder">当前工单号</param>
|
||
/// <param name="LineCode">当前产线码</param>
|
||
/// <param name="GroupCode">当前组码</param>
|
||
/// <returns>1:开工成功 0:异常 -1:重复开工 -2 参数异常</returns>
|
||
[HttpGet("start_work_apply")]
|
||
public IActionResult StartWorkApply(string ProcessCode,string WorkOrder,string LineCode,string GroupCode)
|
||
{
|
||
if(string.IsNullOrEmpty(ProcessCode)||string.IsNullOrEmpty(WorkOrder)||string.IsNullOrEmpty(GroupCode))
|
||
{
|
||
return SUCCESS(-2);
|
||
}
|
||
|
||
int result= _ISessionManagerService.StartWorkApply(ProcessCode, WorkOrder, LineCode, GroupCode);
|
||
|
||
return SUCCESS(result);
|
||
}
|
||
|
||
//TODO 入站申请
|
||
|
||
/// <summary>
|
||
/// 入站申请
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
[HttpGet("in_station_apply")]
|
||
public IActionResult InStationApply(string OperationCode, string ProcessCode)
|
||
{
|
||
|
||
InStationApplyResult result = _ISessionManagerService.InStationApply(OperationCode, ProcessCode);
|
||
return SUCCESS(result);
|
||
}
|
||
|
||
|
||
|
||
//TODO 出站申请
|
||
[HttpGet("out_station_apply")]
|
||
public IActionResult OutStationApply(string OperationCode, string ProcessCode)
|
||
{
|
||
|
||
InStationApplyResult result = _ISessionManagerService.OutStationApply(OperationCode, ProcessCode);
|
||
return SUCCESS(result);
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
}
|
||
|
||
}
|