using Microsoft.AspNetCore.Mvc;
|
using System.Linq;
|
using WIDESEA_Core.EFDbContext;
|
using WIDESEA_Core.Extensions;
|
using WIDESEA_WCS.IRepositories;
|
using WIDESEA_WCS.Repositories;
|
using WIDESEA_WMS.IRepositories;
|
using WIDESEA_WMS.Repositories;
|
|
namespace WIDESEA_WebApi.Controllers
|
{
|
[Route("api/[controller]")]
|
[ApiController]
|
public class ReadplcController : Controller
|
{
|
#region 第五板块(新增内容)
|
/// <summary>
|
/// 工单信息VV_Workinfo
|
/// </summary>
|
/// <returns></returns>
|
[HttpPost("Workinfo_information")]
|
public object Workinfo_information()
|
{
|
VOLContext volContext = new VOLContext();
|
Idt_mes_headRepository db = new dt_mes_headRepository(volContext);
|
Idt_mes_detailRepository dbs = new dt_mes_detailRepository(volContext);
|
var data = db.Find(_ => true).Where(x => x.processCode == "28").OrderByDescending(x => x.CreateTime).Take(10).ToList();
|
var dataList = data.Select(x => new {
|
jobID = x.jobID,
|
drawingNo = x.drawingNo,
|
quantity = x.quantity,
|
heatID = string.Join(", ", dbs.Find(d => d.jobID == x.jobID).Select(d => d.heatID).Distinct())
|
}).ToList();
|
return Ok(dataList);
|
}
|
#endregion
|
}
|
}
|