2024-07-17 17:30:44 +08:00
|
|
|
|
using DOAN.Service.MES.product;
|
|
|
|
|
|
using DOAN.Model.MES.product.Dto;
|
|
|
|
|
|
using DOAN.Service.MES.product.IService;
|
|
|
|
|
|
using DOAN.Admin.WebApi.Filters;
|
|
|
|
|
|
using Org.BouncyCastle.Crypto;
|
|
|
|
|
|
using DOAN.Model.System;
|
|
|
|
|
|
using MiniExcelLibs;
|
|
|
|
|
|
using DOAN.Model.System.Dto;
|
|
|
|
|
|
using DOAN.Model;
|
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace DOAN.Admin.WebApi.Controllers
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 生产排产
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Verify]
|
|
|
|
|
|
[Route("mes/productManagement/ProWorkorderSchedule")]
|
|
|
|
|
|
public class ProWorkorderScheduleController : BaseController
|
|
|
|
|
|
{
|
2024-07-18 10:17:02 +08:00
|
|
|
|
private readonly IProWorkorderScheduleService _ProWorkorderSchedule;
|
2024-07-17 17:30:44 +08:00
|
|
|
|
|
2024-07-18 10:17:02 +08:00
|
|
|
|
public ProWorkorderScheduleController(IProWorkorderScheduleService ProWorkorderSchedule)
|
2024-07-17 17:30:44 +08:00
|
|
|
|
{
|
|
|
|
|
|
_ProWorkorderSchedule = ProWorkorderSchedule;
|
|
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询生产工单列表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="parm"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost("list")]
|
|
|
|
|
|
[ActionPermissionFilter(Permission = "productManagement:proworkorder:list")]
|
|
|
|
|
|
public IActionResult QueryProWorkorder([FromBody] ProWorkorderQueryDto parm)
|
|
|
|
|
|
{
|
|
|
|
|
|
var response = _ProWorkorderSchedule.GetList(parm);
|
|
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-07-18 09:16:01 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取工序
|
|
|
|
|
|
/// </summary>
|
2024-09-04 16:43:29 +08:00
|
|
|
|
/// <param name="WorkFkRouteCode">工一路线id</param>
|
2024-07-18 09:16:01 +08:00
|
|
|
|
/// <returns>工艺路线绑定的工序列表</returns>
|
|
|
|
|
|
[HttpGet("get_work_process")]
|
2024-09-04 16:43:29 +08:00
|
|
|
|
public IActionResult GetworkProcess(int WorkFkRouteCode)
|
2024-07-18 09:16:01 +08:00
|
|
|
|
{
|
2024-09-04 16:43:29 +08:00
|
|
|
|
var response = _ProWorkorderSchedule.GetworkProcess(WorkFkRouteCode);
|
2024-07-18 09:16:01 +08:00
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-07-18 15:00:34 +08:00
|
|
|
|
|
2024-07-18 09:16:01 +08:00
|
|
|
|
/// <summary>
|
2024-07-18 15:00:34 +08:00
|
|
|
|
/// 获取工位列表 (选中为 1 未选中为0)
|
2024-07-18 09:16:01 +08:00
|
|
|
|
/// </summary>
|
2024-07-18 15:00:34 +08:00
|
|
|
|
/// <param name="WorkorderId">工单号(不是工单id) </param>
|
2024-09-04 16:43:29 +08:00
|
|
|
|
/// <param name="WorkFkRouteCode">工序id</param>
|
2024-07-18 09:16:01 +08:00
|
|
|
|
/// <returns>工序绑定的工位列表</returns>
|
2024-07-18 15:00:34 +08:00
|
|
|
|
///
|
2024-07-18 09:16:01 +08:00
|
|
|
|
[HttpGet("get_work_station")]
|
2024-07-18 15:00:34 +08:00
|
|
|
|
public IActionResult GetworkStation(string WorkorderId,int WorkProcessID)
|
2024-07-18 09:16:01 +08:00
|
|
|
|
{
|
2024-07-18 15:00:34 +08:00
|
|
|
|
var response = _ProWorkorderSchedule.GetworkStation( WorkorderId,WorkProcessID);
|
2024-07-18 09:16:01 +08:00
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-07-18 15:00:34 +08:00
|
|
|
|
|
2024-07-18 09:16:01 +08:00
|
|
|
|
/// <summary>
|
2024-07-18 15:00:34 +08:00
|
|
|
|
/// 修改
|
2024-07-18 09:16:01 +08:00
|
|
|
|
/// </summary>
|
2024-07-18 15:00:34 +08:00
|
|
|
|
/// <param name="lineBodyDto"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost("update_seleced_station")]
|
|
|
|
|
|
public IActionResult UpdateSelectedWorkstation([FromBody] ProRelWorkorderLineBodyDto lineBodyDto)
|
|
|
|
|
|
{
|
|
|
|
|
|
var response = _ProWorkorderSchedule.UpdateSelectedWorkstation(lineBodyDto);
|
|
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 传入工单号(不是工单id ) 默认选中
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="WorkorderId"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
|
|
|
|
|
|
[HttpGet("defalut_selected")]
|
|
|
|
|
|
public IActionResult DefaultSelected(string WorkorderId)
|
2024-07-18 09:16:01 +08:00
|
|
|
|
{
|
2024-07-18 15:00:34 +08:00
|
|
|
|
var response = _ProWorkorderSchedule.DefaultSelected(WorkorderId);
|
2024-07-18 09:16:01 +08:00
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-07-18 15:00:34 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-07-17 17:30:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|