You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
86 lines
2.4 KiB
86 lines
2.4 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using AMESCoreStudio.WebApi;
|
|
using AMESCoreStudio.WebApi.Models.AMES;
|
|
|
|
namespace AMESCoreStudio.WebApi.Controllers.AMES
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
[Route("api/[controller]")]
|
|
[ApiController]
|
|
public class WipBarcodeOthersController : Controller
|
|
{
|
|
private readonly AMESContext _context;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="context"></param>
|
|
public WipBarcodeOthersController(AMESContext context)
|
|
{
|
|
_context = context;
|
|
}
|
|
|
|
// /// <summary>
|
|
// /// 獲取產品別資料
|
|
// /// </summary>
|
|
// /// <returns></returns>
|
|
// // GET: api/SystemInfoes
|
|
// [HttpGet]
|
|
// public async Task<ActionResult<IEnumerable<WipBarcodeOther>>> GetWipBarcodeOther()
|
|
// {
|
|
// IQueryable<WipBarcodeOther> q = _context.WipBarcodeOther;
|
|
|
|
// q = q.OrderBy(p => p.WipNO);
|
|
|
|
// //q = q.OrderByDescending(p => p.SystemID);
|
|
|
|
// var WipBarcodeOther = await q.ToListAsync();
|
|
|
|
// //return await _context.SystemInfoes.ToListAsync();
|
|
|
|
// return WipBarcodeOther;
|
|
// }
|
|
|
|
///// <summary>
|
|
/////
|
|
///// </summary>
|
|
///// <param name="UnitNO">生產單位</param>
|
|
///// <param name="WipNO">工單號碼</param>
|
|
///// <returns></returns>
|
|
// // GET: api/FlowRules/Unit/S
|
|
// [HttpGet("Unit/{UnitNO}/{WipNO}")]
|
|
// public async Task<ActionResult<IEnumerable<WipBarcodeOther>>> GetWipBarcodeOtherByUnit(string UnitNO , string WipNO)
|
|
// {
|
|
// IQueryable<WipInfo> q1 = _context.WipInfos.Where(w => w.UnitNO.Contains(UnitNO) && w.WipNO.Contains(WipNO));
|
|
// IQueryable<WipBarcodeOther> q2 = _context.WipBarcodeOther;
|
|
|
|
// //if (no != null)
|
|
// //{
|
|
// // if (no != "")
|
|
// // {
|
|
// // q = q.Where(p => p.UnitNo.Equals(no));
|
|
// // }
|
|
// //}
|
|
// //q.OrderBy(p => p.FlowRuleName);
|
|
|
|
// var flowRule = await q2.ToListAsync();
|
|
|
|
// //if (flowRule == null)
|
|
// //{
|
|
// // return NotFound();
|
|
// //}
|
|
|
|
// return flowRule;
|
|
// }
|
|
|
|
|
|
}
|
|
}
|
|
|