17 changed files with 1132 additions and 53 deletions
@ -0,0 +1,121 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Http; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using AMESCoreStudio.WebApi; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.CommonTools.Result; |
||||
|
|
||||
|
namespace AMESCoreStudio.WebApi.Controllers.AMES |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 各班別數量資料檔
|
||||
|
/// </summary>
|
||||
|
[Route("api/[controller]")]
|
||||
|
[ApiController] |
||||
|
public class WipClassController : ControllerBase |
||||
|
{ |
||||
|
private readonly AMESContext _context; |
||||
|
|
||||
|
public WipClassController(AMESContext context) |
||||
|
{ |
||||
|
_context = context; |
||||
|
} |
||||
|
|
||||
|
// GET: api/WipClass
|
||||
|
[HttpGet] |
||||
|
public async Task<ActionResult<IEnumerable<WipClass>>> GetWipClass() |
||||
|
{ |
||||
|
return await _context.WipClass.ToListAsync(); |
||||
|
} |
||||
|
|
||||
|
// GET: api/WipClass/5
|
||||
|
[HttpGet("{id}")] |
||||
|
public async Task<ActionResult<WipClass>> GetWipClass(int id) |
||||
|
{ |
||||
|
var wipClass = await _context.WipClass.FindAsync(id); |
||||
|
|
||||
|
if (wipClass == null) |
||||
|
{ |
||||
|
return NotFound(); |
||||
|
} |
||||
|
|
||||
|
return wipClass; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新各班別數量資料檔
|
||||
|
/// </summary>
|
||||
|
/// <param name="wipClass"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPut] |
||||
|
public async Task<ResultModel<WipClass>> PutWipClass(WipClass wipClass) |
||||
|
{ |
||||
|
ResultModel<WipClass> result = new ResultModel<WipClass>(); |
||||
|
_context.Entry(wipClass).State = EntityState.Modified; |
||||
|
wipClass.UpdateDate = DateTime.Now; |
||||
|
|
||||
|
try |
||||
|
{ |
||||
|
await _context.SaveChangesAsync(); |
||||
|
result.Success = true; |
||||
|
result.Msg = "OK"; |
||||
|
} |
||||
|
catch (Exception ex) |
||||
|
{ |
||||
|
result.Success = false; |
||||
|
result.Msg = ex.InnerException.Message; |
||||
|
|
||||
|
} |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增各班別數量資料檔
|
||||
|
/// </summary>
|
||||
|
/// <param name="wipClass"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPost] |
||||
|
public async Task<ResultModel<WipClass>> PostWipClass(WipClass wipClass) |
||||
|
{ |
||||
|
ResultModel<WipClass> result = new ResultModel<WipClass>(); |
||||
|
_context.WipClass.Add(wipClass); |
||||
|
try |
||||
|
{ |
||||
|
await _context.SaveChangesAsync(); |
||||
|
result.Success = true; |
||||
|
result.Msg = "OK"; |
||||
|
} |
||||
|
catch (Exception ex) |
||||
|
{ |
||||
|
result.Success = false; |
||||
|
result.Msg = ex.InnerException.Message; |
||||
|
} |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
// DELETE: api/WipClass/5
|
||||
|
[HttpDelete("{id}")] |
||||
|
public async Task<ActionResult<WipClass>> DeleteWipClass(int id) |
||||
|
{ |
||||
|
var wipClass = await _context.WipClass.FindAsync(id); |
||||
|
if (wipClass == null) |
||||
|
{ |
||||
|
return NotFound(); |
||||
|
} |
||||
|
|
||||
|
_context.WipClass.Remove(wipClass); |
||||
|
await _context.SaveChangesAsync(); |
||||
|
|
||||
|
return wipClass; |
||||
|
} |
||||
|
|
||||
|
private bool WipClassExists(int id) |
||||
|
{ |
||||
|
return _context.WipClass.Any(e => e.WipID == id); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,113 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Http; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using AMESCoreStudio.WebApi; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
|
||||
|
namespace AMESCoreStudio.WebApi.Controllers.AMES |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 工單KP資訊資料檔
|
||||
|
/// </summary>
|
||||
|
[Route("api/[controller]")]
|
||||
|
[ApiController] |
||||
|
public class WipKpsController : ControllerBase |
||||
|
{ |
||||
|
private readonly AMESContext _context; |
||||
|
|
||||
|
public WipKpsController(AMESContext context) |
||||
|
{ |
||||
|
_context = context; |
||||
|
} |
||||
|
|
||||
|
// GET: api/WipKps
|
||||
|
[HttpGet] |
||||
|
public async Task<ActionResult<IEnumerable<WipKp>>> GetWipKps() |
||||
|
{ |
||||
|
return await _context.WipKps.ToListAsync(); |
||||
|
} |
||||
|
|
||||
|
// GET: api/WipKps/5
|
||||
|
[HttpGet("{id}")] |
||||
|
public async Task<ActionResult<WipKp>> GetWipKp(int id) |
||||
|
{ |
||||
|
var wipKp = await _context.WipKps.FindAsync(id); |
||||
|
|
||||
|
if (wipKp == null) |
||||
|
{ |
||||
|
return NotFound(); |
||||
|
} |
||||
|
|
||||
|
return wipKp; |
||||
|
} |
||||
|
|
||||
|
// PUT: api/WipKps/5
|
||||
|
// To protect from overposting attacks, enable the specific properties you want to bind to, for
|
||||
|
// more details, see https://go.microsoft.com/fwlink/?linkid=2123754.
|
||||
|
[HttpPut("{id}")] |
||||
|
public async Task<IActionResult> PutWipKp(int id, WipKp wipKp) |
||||
|
{ |
||||
|
if (id != wipKp.WipKpID) |
||||
|
{ |
||||
|
return BadRequest(); |
||||
|
} |
||||
|
|
||||
|
_context.Entry(wipKp).State = EntityState.Modified; |
||||
|
|
||||
|
try |
||||
|
{ |
||||
|
await _context.SaveChangesAsync(); |
||||
|
} |
||||
|
catch (DbUpdateConcurrencyException) |
||||
|
{ |
||||
|
if (!WipKpExists(id)) |
||||
|
{ |
||||
|
return NotFound(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
throw; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
return NoContent(); |
||||
|
} |
||||
|
|
||||
|
// POST: api/WipKps
|
||||
|
// To protect from overposting attacks, enable the specific properties you want to bind to, for
|
||||
|
// more details, see https://go.microsoft.com/fwlink/?linkid=2123754.
|
||||
|
[HttpPost] |
||||
|
public async Task<ActionResult<WipKp>> PostWipKp(WipKp wipKp) |
||||
|
{ |
||||
|
_context.WipKps.Add(wipKp); |
||||
|
await _context.SaveChangesAsync(); |
||||
|
|
||||
|
return CreatedAtAction("GetWipKp", new { id = wipKp.WipKpID }, wipKp); |
||||
|
} |
||||
|
|
||||
|
// DELETE: api/WipKps/5
|
||||
|
[HttpDelete("{id}")] |
||||
|
public async Task<ActionResult<WipKp>> DeleteWipKp(int id) |
||||
|
{ |
||||
|
var wipKp = await _context.WipKps.FindAsync(id); |
||||
|
if (wipKp == null) |
||||
|
{ |
||||
|
return NotFound(); |
||||
|
} |
||||
|
|
||||
|
_context.WipKps.Remove(wipKp); |
||||
|
await _context.SaveChangesAsync(); |
||||
|
|
||||
|
return wipKp; |
||||
|
} |
||||
|
|
||||
|
private bool WipKpExists(int id) |
||||
|
{ |
||||
|
return _context.WipKps.Any(e => e.WipKpID == id); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,123 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Http; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using AMESCoreStudio.WebApi; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.CommonTools.Result; |
||||
|
|
||||
|
namespace AMESCoreStudio.WebApi.Controllers.AMES |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 工單各站數量資料檔 – By TIME
|
||||
|
/// </summary>
|
||||
|
[Route("api/[controller]")]
|
||||
|
[ApiController] |
||||
|
public class WipTimeController : ControllerBase |
||||
|
{ |
||||
|
private readonly AMESContext _context; |
||||
|
|
||||
|
public WipTimeController(AMESContext context) |
||||
|
{ |
||||
|
_context = context; |
||||
|
} |
||||
|
|
||||
|
// GET: api/WipTime
|
||||
|
[HttpGet] |
||||
|
public async Task<ActionResult<IEnumerable<WipTime>>> GetWipTimes() |
||||
|
{ |
||||
|
return await _context.WipTimes.ToListAsync(); |
||||
|
} |
||||
|
|
||||
|
// GET: api/WipTime/5
|
||||
|
[HttpGet("{id}")] |
||||
|
public async Task<ActionResult<WipTime>> GetWipTime(int id) |
||||
|
{ |
||||
|
var wipTime = await _context.WipTimes.FindAsync(id); |
||||
|
|
||||
|
if (wipTime == null) |
||||
|
{ |
||||
|
return NotFound(); |
||||
|
} |
||||
|
|
||||
|
return wipTime; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新工單各站數量資料檔 – By TIME
|
||||
|
/// </summary>
|
||||
|
/// <param name="wipTime"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPut] |
||||
|
public async Task<ResultModel<WipTime>> PutWipTime(WipTime wipTime) |
||||
|
{ |
||||
|
ResultModel<WipTime> result = new ResultModel<WipTime>(); |
||||
|
_context.Entry(wipTime).State = EntityState.Modified; |
||||
|
wipTime.UpdateDate = DateTime.Now; |
||||
|
|
||||
|
try |
||||
|
{ |
||||
|
await _context.SaveChangesAsync(); |
||||
|
result.Success = true; |
||||
|
result.Msg = "OK"; |
||||
|
} |
||||
|
catch (Exception ex) |
||||
|
{ |
||||
|
result.Success = false; |
||||
|
result.Msg = ex.InnerException.Message; |
||||
|
|
||||
|
} |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增工單各站數量資料檔 – By TIME
|
||||
|
/// </summary>
|
||||
|
/// <param name="wipTime"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPost] |
||||
|
public async Task<ResultModel<WipTime>> PostWipTime(WipTime wipTime) |
||||
|
{ |
||||
|
ResultModel<WipTime> result = new ResultModel<WipTime>(); |
||||
|
_context.WipTimes.Add(wipTime); |
||||
|
try |
||||
|
{ |
||||
|
await _context.SaveChangesAsync(); |
||||
|
result.Success = true; |
||||
|
result.Msg = "OK"; |
||||
|
} |
||||
|
catch (Exception ex) |
||||
|
{ |
||||
|
result.Success = false; |
||||
|
result.Msg = ex.InnerException.Message; |
||||
|
} |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
// DELETE: api/WipTime/5
|
||||
|
[HttpDelete("{id}")] |
||||
|
public async Task<ActionResult<WipTime>> DeleteWipTime(int id) |
||||
|
{ |
||||
|
var wipTime = await _context.WipTimes.FindAsync(id); |
||||
|
if (wipTime == null) |
||||
|
{ |
||||
|
return NotFound(); |
||||
|
} |
||||
|
|
||||
|
_context.WipTimes.Remove(wipTime); |
||||
|
await _context.SaveChangesAsync(); |
||||
|
|
||||
|
return wipTime; |
||||
|
} |
||||
|
|
||||
|
private bool WipTimeExists(int id) |
||||
|
{ |
||||
|
return _context.WipTimes.Any(e => e.WipID == id); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,92 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.ComponentModel.DataAnnotations.Schema; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using System.Runtime.Serialization; |
||||
|
|
||||
|
#nullable disable |
||||
|
|
||||
|
namespace AMESCoreStudio.WebApi.Models.AMES |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 各班別數量資料檔
|
||||
|
/// </summary>
|
||||
|
[Table("WIP_CLASS", Schema = "JHAMES")] |
||||
|
public partial class WipClass |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 工單ID
|
||||
|
/// </summary>
|
||||
|
[Key] |
||||
|
[Required] |
||||
|
[DataMember] |
||||
|
[Column("WIP_ID")] |
||||
|
public int WipID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 流程站別ID
|
||||
|
/// </summary>
|
||||
|
[Key] |
||||
|
[Required] |
||||
|
[DataMember] |
||||
|
[Column("RULE_STATION_ID")] |
||||
|
public int RuleStationID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 過站狀態
|
||||
|
/// </summary>
|
||||
|
[Key] |
||||
|
[Column("RULE_STATUS")] |
||||
|
[DataMember] |
||||
|
[StringLength(1)] |
||||
|
public string RuleStatus { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 班別ID
|
||||
|
/// </summary>
|
||||
|
[Key] |
||||
|
[DataMember] |
||||
|
[Column("CLASS_ID")] |
||||
|
public int ClassID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 第一次過站數量
|
||||
|
/// </summary>
|
||||
|
[DataMember] |
||||
|
[Column("FIRST_CNT")] |
||||
|
public int FirstCnt { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 生產數量
|
||||
|
/// </summary>
|
||||
|
[DataMember] |
||||
|
[Column("PASS_CNT")] |
||||
|
public int PassCnt { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 建立UserID
|
||||
|
/// </summary>
|
||||
|
[Column("CREATE_USERID")] |
||||
|
[Required] |
||||
|
[DataMember] |
||||
|
public int CreateUserID { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 建立日期
|
||||
|
/// </summary>
|
||||
|
[Key] |
||||
|
[Required] |
||||
|
[Column("CREATE_DATE")] |
||||
|
[DataMember] |
||||
|
public DateTime CreateDate { get; set; } = DateTime.Now; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新日期
|
||||
|
/// </summary>
|
||||
|
[Column("UPDATE_DATE")] |
||||
|
[DataMember] |
||||
|
public DateTime? UpdateDate { get; set; } = DateTime.Now; |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,116 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.ComponentModel.DataAnnotations.Schema; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using System.Runtime.Serialization; |
||||
|
|
||||
|
#nullable disable |
||||
|
|
||||
|
namespace AMESCoreStudio.WebApi.Models.AMES |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 工單KP資訊資料檔
|
||||
|
/// </summary>
|
||||
|
[Table("WIP_KP", Schema = "JHAMES")] |
||||
|
[Index(nameof(ItemNo), nameof(KpNo), Name = "WIP_KP_AK1", IsUnique = true)] |
||||
|
public partial class WipKp |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 工單KP_ID
|
||||
|
/// </summary>
|
||||
|
[Key] |
||||
|
[Column("WIP_KP_ID")] |
||||
|
[Required] |
||||
|
[DataMember] |
||||
|
public int WipKpID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 料號
|
||||
|
/// </summary>
|
||||
|
[DataMember] |
||||
|
[Required] |
||||
|
[Column("ITEM_NO")] |
||||
|
[StringLength(20)] |
||||
|
public string ItemNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// KP料號名稱
|
||||
|
/// </summary>
|
||||
|
[DataMember] |
||||
|
[Required] |
||||
|
[Column("KP_NAME")] |
||||
|
[StringLength(25)] |
||||
|
public string KpName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// KP料號NO
|
||||
|
/// </summary>
|
||||
|
[DataMember] |
||||
|
[Required] |
||||
|
[Column("KP_NO")] |
||||
|
[StringLength(25)] |
||||
|
public string KpNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 順序
|
||||
|
/// </summary>
|
||||
|
[DataMember] |
||||
|
[Column("KP_SEQ")] |
||||
|
public int? KpSeq { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 前置碼
|
||||
|
/// </summary>
|
||||
|
[DataMember] |
||||
|
[Column("TITLE")] |
||||
|
[StringLength(10)] |
||||
|
public string Title { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 長度
|
||||
|
/// </summary>
|
||||
|
[DataMember] |
||||
|
[Column("LENGTH")] |
||||
|
public int? Length { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 生產單位代號
|
||||
|
/// </summary>
|
||||
|
[Required] |
||||
|
[DataMember] |
||||
|
[Column("UNIT_NO")] |
||||
|
[StringLength(4)] |
||||
|
public string UnitNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 建立UserID
|
||||
|
/// </summary>
|
||||
|
[Column("CREATE_USERID")] |
||||
|
[Required] |
||||
|
[DataMember] |
||||
|
public int CreateUserID { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 建立日期
|
||||
|
/// </summary>
|
||||
|
[Required] |
||||
|
[Column("CREATE_DATE")] |
||||
|
[DataMember] |
||||
|
public DateTime CreateDate { get; set; } = DateTime.Now; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新UserID
|
||||
|
/// </summary>
|
||||
|
[Column("UPDATE_USERID")] |
||||
|
[DataMember] |
||||
|
public int UpdateUserID { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新日期
|
||||
|
/// </summary>
|
||||
|
[Column("UPDATE_DATE")] |
||||
|
[DataMember] |
||||
|
public DateTime? UpdateDate { get; set; } = DateTime.Now; |
||||
|
} |
||||
|
} |
@ -0,0 +1,96 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.ComponentModel.DataAnnotations.Schema; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using System.Runtime.Serialization; |
||||
|
|
||||
|
#nullable disable |
||||
|
|
||||
|
namespace AMESCoreStudio.WebApi.Models.AMES |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 工單各站數量資料檔 – By TIME
|
||||
|
/// </summary>
|
||||
|
[Table("WIP_TIME", Schema = "JHAMES")] |
||||
|
public partial class WipTime |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 工單ID
|
||||
|
/// </summary>
|
||||
|
[Key] |
||||
|
[Required] |
||||
|
[DataMember] |
||||
|
[Column("WIP_ID")] |
||||
|
public int WipID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 流程站別ID
|
||||
|
/// </summary>
|
||||
|
[Key] |
||||
|
[Required] |
||||
|
[DataMember] |
||||
|
[Column("RULE_STATION_ID")] |
||||
|
public int RuleStationID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 過站狀態
|
||||
|
/// </summary>
|
||||
|
[Key] |
||||
|
[Required] |
||||
|
[DataMember] |
||||
|
[Column("RULE_STATUS")] |
||||
|
[StringLength(1)] |
||||
|
public string RuleStatus { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 時段
|
||||
|
/// </summary>
|
||||
|
[Key] |
||||
|
[Required] |
||||
|
[DataMember] |
||||
|
[Column("SEGMENT_ID")] |
||||
|
public int SegmentID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 第一次過站數量
|
||||
|
/// </summary>
|
||||
|
[Required] |
||||
|
[DataMember] |
||||
|
[Column("FIRST_CNT")] |
||||
|
public int FirstCnt { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 生產過站數量
|
||||
|
/// </summary>
|
||||
|
[Required] |
||||
|
[DataMember] |
||||
|
[Column("PASS_CNT")] |
||||
|
public int PassCnt { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 建立UserID
|
||||
|
/// </summary>
|
||||
|
[Column("CREATE_USERID")] |
||||
|
[Required] |
||||
|
[DataMember] |
||||
|
public int CreateUserID { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 建立日期
|
||||
|
/// </summary>
|
||||
|
[Key] |
||||
|
[Required] |
||||
|
[Column("CREATE_DATE")] |
||||
|
[DataMember] |
||||
|
public DateTime CreateDate { get; set; } = DateTime.Now; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新日期
|
||||
|
/// </summary>
|
||||
|
[Column("UPDATE_DATE")] |
||||
|
[DataMember] |
||||
|
public DateTime? UpdateDate { get; set; } = DateTime.Now; |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,29 @@ |
|||||
|
AMES專案系統測試報告 |
||||
|
|
||||
|
測試日期:2022-2-14 |
||||
|
測試版本:AMES 1.0.0 |
||||
|
測試人員:B.B. Wang |
||||
|
|
||||
|
測試記錄: |
||||
|
過站時,Table要寫入以下幾個 |
||||
|
|
||||
|
生產序號在測試戰被判Fail,但是下一站卻可以刷Pass過站 |
||||
|
|
||||
|
|
||||
|
包裝過站,包裝過站的資料,沒有寫入barcode_station |
||||
|
入庫單作業,選擇那些生產序號時,選中的資料移轉時會出錯 |
||||
|
|
||||
|
|
||||
|
|
||||
|
包裝裝箱時,出貨序號有綁起訖值? |
||||
|
|
||||
|
入庫作業時,入庫過的,做過FQC的生產序號,也會跟著跑出來 |
||||
|
WO0002A10001、WO0002A10003已於上一次產生過一張入庫單 |
||||
|
|
||||
|
一張入庫單,有二箱在該入庫單內,但資料只會顯示一筆箱號,資料庫內茶數量是2箱(MASTER),但DETAIL內只有一箱紀錄 |
||||
|
|
||||
|
|
||||
|
TTT |
||||
|
|
||||
|
------------------------------------------------紀錄截止線------------------------------------------------ |
||||
|
|
@ -0,0 +1,135 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
|
||||
|
|
||||
|
namespace AMES_AP.Models |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// (過站資料)BarCodeCheck Dto
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public class BarCodeCheckDto |
||||
|
{ |
||||
|
public BarCodeCheckDto() |
||||
|
{ |
||||
|
inputItems = new List<inputItem>(); |
||||
|
outfits = new List<Outfit>(); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工單號碼
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public string wipNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工單ID
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public int wipID { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 內部條碼
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public string barcode { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 內部條碼ID
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public int barcodeID { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 條碼狀態 M:一般 S:維修
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public string barcodeType { get; set; } = "M"; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 條碼過站狀態 P:Pass F:Fail
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public string ruleStatus { get; set; } = "P"; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 生產單位
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public string unitNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 流程ID
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public int flowRule { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 作業站
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public int station { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// RuleStationID
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public int ruleStationID { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 線別站
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public int line { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 紀錄組件或不良代碼
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public List<inputItem> inputItems { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 治具條碼
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public List<Outfit> outfits { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 紀錄組件或不良代碼
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public class inputItem |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 刷入類型 NG or KP(Item_No)
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public string inputType { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刷入組件資料或不良代碼
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public string inputData { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 組件:舊組件序號
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public string oldInputData { get; set; } |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 治具條碼
|
||||
|
/// </summary>
|
||||
|
public class Outfit |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 刷入治具條碼
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public string inputData { get; set; } |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
|
||||
|
namespace AMES_AP.Models |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 返回成功模型
|
||||
|
/// </summary>
|
||||
|
public class ResultModel |
||||
|
{ |
||||
|
public bool Success { get; set; } |
||||
|
|
||||
|
public string Msg { get; set; } |
||||
|
|
||||
|
public int Status { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 資料筆數
|
||||
|
/// </summary>
|
||||
|
public int DataTotal { get; set; } = 0; |
||||
|
|
||||
|
public IEnumerable<string> Data { get; set; } |
||||
|
|
||||
|
} |
||||
|
} |
Binary file not shown.
Loading…
Reference in new issue