using DOAN.Admin.WebApi.Filters;
using DOAN.Service.Mobile;
using Microsoft.AspNetCore.Mvc;
using DOAN.Service.Mobile.IService;
using DOAN.Model.Mobile.Dto;
using DOAN.Service.MES.product.IService;
namespace DOAN.Admin.Mobile.Controllers
{
///
/// 移动端 报工
///
[Route("mes/Mobile/ReportWork")]
public class PADReportWorkController : BaseController
{
///
/// 报工表接口
///
private readonly IPADReportWorkService padReportWorkService;
public PADReportWorkController(IPADReportWorkService padReportWorkService)
{
this.padReportWorkService = padReportWorkService;
}
//TODO 无需防错就报工
///
/// 无需防错就报工
///
/// 工单
/// 报工数
///
[HttpGet("no_errorProofingAndReportingReport")]
public IActionResult NoErrorProofingAndReportingReport(string workorder,int reportNum)
{
if (string.IsNullOrEmpty(workorder) || reportNum<=0)
throw new CustomException("workorder或者报工数为0");
var response = padReportWorkService.NoErrorProofingAndReportingReport(workorder, reportNum);
return SUCCESS(response);
}
}
}