4 changed files with 728 additions and 0 deletions
@ -0,0 +1,237 @@ |
|||||
|
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 WipClearDetailsController : ControllerBase |
||||
|
{ |
||||
|
private readonly AMESContext _context; |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="context"></param>
|
||||
|
public WipClearDetailsController(AMESContext context) |
||||
|
{ |
||||
|
_context = context; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據清線ID查詢全部明細資料
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <param name="page"></param>
|
||||
|
/// <param name="limit"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// GET: api/WipClearDetails/Clear/1
|
||||
|
[HttpGet("Clear/{id}")] |
||||
|
public async Task<ResultModel<dynamic>> GetWipClearDetailByClear(int id, int page = 0, int limit = 10) |
||||
|
{ |
||||
|
ResultModel<dynamic> result = new ResultModel<dynamic>(); |
||||
|
|
||||
|
var q = from a in _context.WipClearDetails |
||||
|
join b in _context.Stationses on a.StationID equals b.StationID |
||||
|
select new |
||||
|
{ |
||||
|
a.ClearID, |
||||
|
a.ClearDetailID, |
||||
|
a.StationID, |
||||
|
b.StationName, |
||||
|
a.SurplusFlag, |
||||
|
a.PartNo, |
||||
|
a.Qty, |
||||
|
a.ReasonDesc, |
||||
|
a.CheckUser |
||||
|
}; |
||||
|
|
||||
|
|
||||
|
q = q.Where(p => p.ClearID.Equals(id)); |
||||
|
|
||||
|
result.DataTotal = q.ToList().Count; |
||||
|
|
||||
|
if (page > 0) |
||||
|
{ |
||||
|
q = q.OrderBy(p => p.ClearDetailID).Skip((page - 1) * limit).Take(limit); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
q = q.OrderBy(p => p.ClearDetailID); |
||||
|
} |
||||
|
|
||||
|
var wipClearDetail = await q.ToListAsync(); |
||||
|
|
||||
|
result.Data = wipClearDetail; |
||||
|
|
||||
|
if (wipClearDetail == null) |
||||
|
{ |
||||
|
result.Success = false; |
||||
|
result.Msg = "查无资料"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
result.Success = true; |
||||
|
result.Msg = "OK"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據清線明細ID查詢指定資料
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// GET: api/WipClearDetails/5
|
||||
|
[HttpGet("{id}")] |
||||
|
public async Task<ActionResult<IEnumerable<WipClearDetail>>> GetWipClearDetail(int id) |
||||
|
{ |
||||
|
IQueryable<WipClearDetail> q = _context.WipClearDetails; |
||||
|
q = q.Where(p => p.ClearDetailID.Equals(id)); |
||||
|
|
||||
|
var wipClearDetail = await q.ToListAsync(); |
||||
|
|
||||
|
if (wipClearDetail == null) |
||||
|
{ |
||||
|
return NotFound(); |
||||
|
} |
||||
|
|
||||
|
return wipClearDetail; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據清線明細ID修改指定資料
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <param name="wipClearDetail"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// PUT: api/WipClearDetails/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<ResultModel<WipClearDetail>> PutWipClearDetail(int id, WipClearDetail wipClearDetail) |
||||
|
{ |
||||
|
ResultModel<WipClearDetail> result = new ResultModel<WipClearDetail>(); |
||||
|
|
||||
|
if (id != wipClearDetail.ClearDetailID) |
||||
|
{ |
||||
|
result.Success = false; |
||||
|
result.Msg = "清線明細編號錯誤"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
_context.Entry(wipClearDetail).State = EntityState.Modified; |
||||
|
|
||||
|
try |
||||
|
{ |
||||
|
await _context.SaveChangesAsync(); |
||||
|
} |
||||
|
catch (DbUpdateConcurrencyException) |
||||
|
{ |
||||
|
if (!WipClearDetailExists(id)) |
||||
|
{ |
||||
|
result.Success = false; |
||||
|
result.Msg = "清線明細編號不存在"; |
||||
|
return result; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
throw; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
result.Success = true; |
||||
|
result.Msg = "OK"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="wipClearDetail"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// POST: api/WipClearDetails
|
||||
|
// 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<ResultModel<WipClearDetail>> PostWipClearDetail(WipClearDetail wipClearDetail) |
||||
|
{ |
||||
|
ResultModel<WipClearDetail> result = new ResultModel<WipClearDetail>(); |
||||
|
|
||||
|
Helper helper = new Helper(_context); |
||||
|
int detailID = helper.GetIDKey("CLEAR_DETAILID").Result; |
||||
|
wipClearDetail.ClearDetailID = detailID; |
||||
|
|
||||
|
_context.WipClearDetails.Add(wipClearDetail); |
||||
|
|
||||
|
//更新wip_clear
|
||||
|
var wipClear = await _context.WipClears.FindAsync(wipClearDetail.ClearID); |
||||
|
if(wipClear!=null) |
||||
|
{ |
||||
|
wipClear.DetailQty = wipClear.DetailQty + 1; |
||||
|
_context.WipClears.Attach(wipClear); |
||||
|
|
||||
|
_context.Entry(wipClear).Property(p => p.DetailQty).IsModified = true; |
||||
|
} |
||||
|
|
||||
|
await _context.SaveChangesAsync(); |
||||
|
|
||||
|
result.Success = true; |
||||
|
result.Msg = "OK"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// DELETE: api/WipClearDetails/5
|
||||
|
[HttpDelete("{id}")] |
||||
|
public async Task<ResultModel<WipClearDetail>> DeleteWipClearDetail(int id) |
||||
|
{ |
||||
|
ResultModel<WipClearDetail> result = new ResultModel<WipClearDetail>(); |
||||
|
|
||||
|
var wipClearDetail = await _context.WipClearDetails.FindAsync(id); |
||||
|
if (wipClearDetail == null) |
||||
|
{ |
||||
|
result.Success = false; |
||||
|
result.Msg = "清線明細編號不存在"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
_context.WipClearDetails.Remove(wipClearDetail); |
||||
|
|
||||
|
//更新wip_clear
|
||||
|
var wipClear = await _context.WipClears.FindAsync(wipClearDetail.ClearID); |
||||
|
if (wipClear != null) |
||||
|
{ |
||||
|
wipClear.DetailQty = wipClear.DetailQty - 1; |
||||
|
_context.WipClears.Attach(wipClear); |
||||
|
|
||||
|
_context.Entry(wipClear).Property(p => p.DetailQty).IsModified = true; |
||||
|
} |
||||
|
|
||||
|
await _context.SaveChangesAsync(); |
||||
|
|
||||
|
result.Success = true; |
||||
|
result.Msg = "OK"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
private bool WipClearDetailExists(int id) |
||||
|
{ |
||||
|
return _context.WipClearDetails.Any(e => e.ClearDetailID == id); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,241 @@ |
|||||
|
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 WipClearsController : ControllerBase |
||||
|
{ |
||||
|
private readonly AMESContext _context; |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="context"></param>
|
||||
|
public WipClearsController(AMESContext context) |
||||
|
{ |
||||
|
_context = context; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取全部清線資料
|
||||
|
/// </summary>
|
||||
|
/// <param name="page"></param>
|
||||
|
/// <param name="limit"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// GET: api/WipClears
|
||||
|
[HttpGet] |
||||
|
public async Task<ResultModel<dynamic>> GetWipClear(int page = 0, int limit = 10) |
||||
|
{ |
||||
|
ResultModel<dynamic> result = new ResultModel<dynamic>(); |
||||
|
|
||||
|
var q = from a in _context.WipClears |
||||
|
join b in _context.WipInfos on a.WipID equals b.WipID |
||||
|
join c in _context.WipAtts on b.WipNO equals c.WipNO |
||||
|
select new |
||||
|
{ |
||||
|
a.ClearID, |
||||
|
a.ClearNo, |
||||
|
a.WipID, |
||||
|
b.WipNO, |
||||
|
b.WerksNO, |
||||
|
b.PlanQTY, |
||||
|
c.ModelNO, |
||||
|
a.DetailQty, |
||||
|
a.HeadmanCheckFlag, |
||||
|
a.DirectorCheckFlag, |
||||
|
a.DirectorCheckDate, |
||||
|
a.ClearDesc |
||||
|
}; |
||||
|
|
||||
|
result.DataTotal = q.ToList().Count; |
||||
|
|
||||
|
if (page > 0) |
||||
|
{ |
||||
|
q = q.OrderBy(p => p.ClearNo).Skip((page - 1) * limit).Take(limit); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
q = q.OrderBy(p => p.ClearNo); |
||||
|
} |
||||
|
|
||||
|
var wipClear = await q.ToListAsync(); |
||||
|
|
||||
|
result.Data = wipClear; |
||||
|
|
||||
|
if (wipClear == null) |
||||
|
{ |
||||
|
result.Success = false; |
||||
|
result.Msg = "查无资料"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
result.Success = true; |
||||
|
result.Msg = "OK"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID查詢單一清線資料
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// GET: api/WipClears/5
|
||||
|
[HttpGet("{id}")] |
||||
|
public async Task<ActionResult<IEnumerable<WipClear>>> GetWipClear(int id) |
||||
|
{ |
||||
|
IQueryable<WipClear> q = _context.WipClears; |
||||
|
q = q.Where(p => p.ClearID.Equals(id)); |
||||
|
|
||||
|
var wipClear = await q.ToListAsync(); |
||||
|
|
||||
|
if (wipClear == null) |
||||
|
{ |
||||
|
return NotFound(); |
||||
|
} |
||||
|
|
||||
|
return wipClear; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <param name="wipClear"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// PUT: api/WipClears/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<ResultModel<WipClear>> PutWipClear(int id, WipClear wipClear) |
||||
|
{ |
||||
|
ResultModel<WipClear> result = new ResultModel<WipClear>(); |
||||
|
|
||||
|
if (id != wipClear.ClearID) |
||||
|
{ |
||||
|
result.Success = false; |
||||
|
result.Msg = "清線編號錯誤"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
_context.Entry(wipClear).State = EntityState.Modified; |
||||
|
if (wipClear.HeadmanCheckFlag != null && wipClear.HeadmanCheckFlag == "Y") |
||||
|
{ |
||||
|
if (wipClear.HeadmanCheckDate.ToString("yyyyMMdd") == "00010101") |
||||
|
{ |
||||
|
wipClear.HeadmanCheckDate = DateTime.Now; |
||||
|
_context.Entry(wipClear).Property(p => p.HeadmanCheckDate).IsModified = true; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
_context.Entry(wipClear).Property(p => p.HeadmanCheckDate).IsModified = false; |
||||
|
} |
||||
|
} |
||||
|
if (wipClear.DirectorCheckFlag != null && wipClear.DirectorCheckFlag == "Y") |
||||
|
{ |
||||
|
if (wipClear.DirectorCheckDate.ToString("yyyyMMdd") == "00010101") |
||||
|
{ |
||||
|
wipClear.DirectorCheckDate = DateTime.Now; |
||||
|
_context.Entry(wipClear).Property(p => p.DirectorCheckDate).IsModified = true; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
_context.Entry(wipClear).Property(p => p.DirectorCheckDate).IsModified = false; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
try |
||||
|
{ |
||||
|
await _context.SaveChangesAsync(); |
||||
|
} |
||||
|
catch (DbUpdateConcurrencyException) |
||||
|
{ |
||||
|
if (!WipClearExists(id)) |
||||
|
{ |
||||
|
result.Success = false; |
||||
|
result.Msg = "清線編號不存在"; |
||||
|
return result; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
throw; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
result.Success = true; |
||||
|
result.Msg = "OK"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="wipClear"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// POST: api/WipClears
|
||||
|
// 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<ResultModel<WipClear>> PostWipClear(WipClear wipClear) |
||||
|
{ |
||||
|
ResultModel<WipClear> result = new ResultModel<WipClear>(); |
||||
|
|
||||
|
Helper helper = new Helper(_context); |
||||
|
int clearID = helper.GetIDKey("CLEAR_ID").Result; |
||||
|
wipClear.ClearID = clearID; |
||||
|
wipClear.ClearNo = DateTime.Now.ToString("yyMM") + clearID.ToString().PadLeft(8, '0'); |
||||
|
|
||||
|
_context.WipClears.Add(wipClear); |
||||
|
await _context.SaveChangesAsync(); |
||||
|
|
||||
|
result.Success = true; |
||||
|
result.Msg = "OK"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// DELETE: api/WipClears/5
|
||||
|
[HttpDelete("{id}")] |
||||
|
public async Task<ResultModel<WipClear>> DeleteWipClear(int id) |
||||
|
{ |
||||
|
ResultModel<WipClear> result = new ResultModel<WipClear>(); |
||||
|
|
||||
|
var wipClear = await _context.WipClears.FindAsync(id); |
||||
|
if (wipClear == null) |
||||
|
{ |
||||
|
result.Success = false; |
||||
|
result.Msg = "清線編號不存在"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
_context.WipClears.Remove(wipClear); |
||||
|
await _context.SaveChangesAsync(); |
||||
|
|
||||
|
result.Success = true; |
||||
|
result.Msg = "OK"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
private bool WipClearExists(int id) |
||||
|
{ |
||||
|
return _context.WipClears.Any(e => e.ClearID == id); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,138 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.ComponentModel.DataAnnotations.Schema; |
||||
|
using System.Runtime.Serialization; |
||||
|
|
||||
|
namespace AMESCoreStudio.WebApi.Models.AMES |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 清線作業紀錄
|
||||
|
/// </summary>
|
||||
|
[Table("WIP_CLEAR", Schema = "JHAMES")] |
||||
|
[DataContract] |
||||
|
public class WipClear |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 清線ID
|
||||
|
/// </summary>
|
||||
|
[Key] |
||||
|
[Column("CLEAR_ID")] |
||||
|
[DataMember] |
||||
|
public int ClearID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 清線編號
|
||||
|
/// </summary>
|
||||
|
[Column("CLEAR_NO")] |
||||
|
[DataMember] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "清線編號")] |
||||
|
public string ClearNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工單編號
|
||||
|
/// </summary>
|
||||
|
[Column("WIP_ID")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "工單編號")] |
||||
|
public int WipID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 清線明細筆數
|
||||
|
/// </summary>
|
||||
|
[Column("DETAIL_QTY")] |
||||
|
[DataMember] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "清線明細筆數")] |
||||
|
public int DetailQty { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 組長確認
|
||||
|
/// </summary>
|
||||
|
[Column("HEADMAN_CHECKFLAG")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "組長確認")] |
||||
|
public string HeadmanCheckFlag { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 組長編號
|
||||
|
/// </summary>
|
||||
|
[Column("HEADMAN_USERID")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "組長")] |
||||
|
public int HeadmanUserID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 組長確認日期
|
||||
|
/// </summary>
|
||||
|
[Column("HEADMAN_CHECKDATE")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "組長確認日期")] |
||||
|
public DateTime HeadmanCheckDate { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 主管確認
|
||||
|
/// </summary>
|
||||
|
[Column("DIRECTOR_CHECKFLAG")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "主管確認")] |
||||
|
public string DirectorCheckFlag { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 主管
|
||||
|
/// </summary>
|
||||
|
[Column("DIRECTOR_USERID")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "主管")] |
||||
|
public int DirectorUserID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 主管確認日期
|
||||
|
/// </summary>
|
||||
|
[Column("DIRECTOR_CHECKDATE")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "主管確認日期")] |
||||
|
public DateTime DirectorCheckDate { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 清線描述
|
||||
|
/// </summary>
|
||||
|
[Column("CLEAR_DESC")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "清線描述")] |
||||
|
public string ClearDesc { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 建立者
|
||||
|
/// </summary>
|
||||
|
[Column("CREATE_USERID")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "建立者")] |
||||
|
public int CreateUserID { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 建立日期
|
||||
|
/// </summary>
|
||||
|
[Column("CREATE_DATE")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "建立日期")] |
||||
|
public DateTime CreateDate { get; set; } = DateTime.Now; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新者
|
||||
|
/// </summary>
|
||||
|
[Column("UPDATE_USERID")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "更新者")] |
||||
|
public int UpdateUserID { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新日期
|
||||
|
/// </summary>
|
||||
|
[Column("UPDATE_DATE")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "更新日期")] |
||||
|
public DateTime UpdateDate { get; set; } = DateTime.Now; |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,112 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.ComponentModel.DataAnnotations.Schema; |
||||
|
using System.Runtime.Serialization; |
||||
|
|
||||
|
namespace AMESCoreStudio.WebApi.Models.AMES |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 清線作業明細紀錄
|
||||
|
/// </summary>
|
||||
|
[Table("WIP_CLEAR_DETAIL", Schema = "JHAMES")] |
||||
|
[DataContract] |
||||
|
public class WipClearDetail |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 清線明細ID
|
||||
|
/// </summary>
|
||||
|
[Key] |
||||
|
[Column("CLEAR_DETAILID")] |
||||
|
[DataMember] |
||||
|
public int ClearDetailID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 清線ID
|
||||
|
/// </summary>
|
||||
|
[Column("CLEAR_ID")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "清線ID")] |
||||
|
public int ClearID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 站別ID
|
||||
|
/// </summary>
|
||||
|
[Column("STATION_ID")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "站別ID")] |
||||
|
public int StationID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 是否剩料
|
||||
|
/// </summary>
|
||||
|
[Column("SURPLUS_FLAG")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "是否剩料")] |
||||
|
public string SurplusFlag { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 料號
|
||||
|
/// </summary>
|
||||
|
[Column("PART_NO")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "料號")] |
||||
|
public string PartNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 數量
|
||||
|
/// </summary>
|
||||
|
[Column("QTY")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "數量")] |
||||
|
public int Qty { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 原因分析
|
||||
|
/// </summary>
|
||||
|
[Column("REASON_DESC")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "原因分析")] |
||||
|
public string ReasonDesc { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 確認人員
|
||||
|
/// </summary>
|
||||
|
[Column("CHECK_USER")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "確認人員")] |
||||
|
public string CheckUser { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 建立者
|
||||
|
/// </summary>
|
||||
|
[Column("CREATE_USERID")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "建立者")] |
||||
|
public int CreateUserID { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 建立日期
|
||||
|
/// </summary>
|
||||
|
[Column("CREATE_DATE")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "建立日期")] |
||||
|
public DateTime CreateDate { get; set; } = DateTime.Now; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新者
|
||||
|
/// </summary>
|
||||
|
[Column("UPDATE_USERID")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "更新者")] |
||||
|
public int UpdateUserID { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新日期
|
||||
|
/// </summary>
|
||||
|
[Column("UPDATE_DATE")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "更新日期")] |
||||
|
public DateTime UpdateDate { get; set; } = DateTime.Now; |
||||
|
|
||||
|
} |
||||
|
} |
Loading…
Reference in new issue