60 lines
2.1 KiB
C#
60 lines
2.1 KiB
C#
using Infrastructure.Extensions;
|
|
using JinianNet.JNTemplate;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.IdentityModel.Tokens;
|
|
using Newtonsoft.Json;
|
|
using Newtonsoft.Json.Linq;
|
|
using System.Text.Json;
|
|
using ZR.Admin.WebApi.Extensions;
|
|
using ZR.Model.mes.pro;
|
|
using ZR.Model.MES.qc.DTO;
|
|
using ZR.Service.mes.pro;
|
|
using ZR.Service.mes.pro.IService;
|
|
using ZR.Service.mes.qu.IService;
|
|
using static System.Runtime.InteropServices.JavaScript.JSType;
|
|
|
|
namespace ZR.Admin.WebApi.Controllers.mes.qu
|
|
{
|
|
[Route("mes/qc/IQC")]
|
|
public class QcRoughController : BaseController
|
|
{
|
|
private readonly IQcRoughService quRoughService;
|
|
|
|
public QcRoughController(IQcRoughService quRoughService)
|
|
{
|
|
this.quRoughService = quRoughService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取所有排产工单
|
|
/// </summary>
|
|
/// <param name="pageNum"></param>
|
|
/// <param name="pageSize"></param>
|
|
/// <param name="year"></param>
|
|
/// <param name="week"></param>
|
|
/// <param name="date"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("getStatisticslist")]
|
|
public IActionResult GetStatisticslist(int pageNum, int pageSize, int year = -1, int week = -1, int date = -1)
|
|
{
|
|
(List<Mr_QuRoughDTO>, int) data = quRoughService.GetStatisticslist(pageNum, pageSize, year, week, date, 1);
|
|
|
|
return ToResponse(new ApiResult(200, "success", data));
|
|
}
|
|
/// <summary>
|
|
/// 更新统计表
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
|
|
[HttpGet("updateStatisticsTable")]
|
|
public IActionResult UpdateStatisticsTable(string id, int actualNumber, int randomRate, int ngs, int oks, decimal oksRatio,int Isqualified)
|
|
{
|
|
|
|
if (string.IsNullOrEmpty(id))
|
|
return ToResponse(new ApiResult(200, "success", 0));
|
|
int result = quRoughService.UpdateStatisticsTable(id, actualNumber, randomRate, ngs, oks, oksRatio,Isqualified);
|
|
return ToResponse(new ApiResult(200, "success", result));
|
|
}
|
|
}
|
|
}
|