17 changed files with 1427 additions and 9 deletions
@ -0,0 +1,95 @@ |
|||||
|
@{ |
||||
|
ViewData["Title"] = "維修群組維護"; |
||||
|
Layout = "~/Views/Shared/_AMESLayout.cshtml"; |
||||
|
} |
||||
|
|
||||
|
<div class="layui-card"> |
||||
|
<div class="layui-card-header"> |
||||
|
<div class="layui-form"> |
||||
|
<div class="layui-form-item "> |
||||
|
<div class="layui-inline"><i class="fa fa-file-text-o fa-fw"></i> @ViewBag.Title</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="layui-card-body"> |
||||
|
<table class="layui-hide" id="test" lay-filter="test"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
@section Scripts{ |
||||
|
<script type="text/javascript"> |
||||
|
//监听表单提交事件 |
||||
|
hg.form.onsubmit('querysubmit', function (data) { |
||||
|
table && table.reload(data); |
||||
|
}); |
||||
|
var tableCols = [[ |
||||
|
{ |
||||
|
field: 'rmaGroupNo', |
||||
|
width: 200, |
||||
|
title: '維修群組代碼' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'rmaGroupName', |
||||
|
title: '維修群組名稱' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'rmaStatusNo', |
||||
|
width: 200, |
||||
|
title: '維修群組狀態' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'right', |
||||
|
width: 200, |
||||
|
title: '操作', |
||||
|
fixed: 'right', |
||||
|
templet: function (d) { |
||||
|
return '<a class="layui-btn layui-btn-normal layui-btn-xs layui-icon layui-icon-edit" lay-event="edit">修改</a> <a class="layui-btn layui-btn-danger layui-btn-xs layui-icon layui-icon-delete" lay-event="del">删除</a>' |
||||
|
} |
||||
|
}] |
||||
|
]; |
||||
|
|
||||
|
//通过行tool编辑,lay-event="edit" |
||||
|
function edit(obj) { |
||||
|
if (obj.data.rmaGroupNo) { |
||||
|
hg.open('修改維修群組', '/PPS/PPS011U/' + obj.data.rmaGroupNo, 800,320); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//通过行tool删除,lay-event="del" |
||||
|
function del(obj) { |
||||
|
if (obj.data.rmaGroupNo) { |
||||
|
hg.confirm("維修群組:" + obj.data.rmaGroupName + ",确定要删除吗?", function () { |
||||
|
$.ajax({ |
||||
|
url: '/PPS/PPS011D', |
||||
|
data: { id: obj.data.rmaGroupNo }, |
||||
|
type: 'POST', |
||||
|
success: function (data) { |
||||
|
if (data.success) { |
||||
|
obj.del(); //只删本地数据 |
||||
|
hg.msghide("删除成功!"); |
||||
|
} |
||||
|
else { |
||||
|
hg.msg(data.msg); |
||||
|
} |
||||
|
}, |
||||
|
error: function () { |
||||
|
hg.msg("网络请求失败!"); |
||||
|
} |
||||
|
}); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
var toolbar = [{ |
||||
|
text: '新增', |
||||
|
layuiicon: '', |
||||
|
class: 'layui-btn-normal', |
||||
|
handler: function () { |
||||
|
hg.open('新增維修群組', '/PPS/PPS011C', 800, 320); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
]; |
||||
|
//基本数据表格 |
||||
|
var table = hg.table.datatable('test', '維修群組維護', '/PPS/GetRMAGroups', {}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports']); |
||||
|
</script> |
||||
|
} |
@ -0,0 +1,58 @@ |
|||||
|
@model AMESCoreStudio.WebApi.Models.AMES.RMAGroup |
||||
|
|
||||
|
|
||||
|
@{ ViewData["Title"] = "PPS011C"; |
||||
|
Layout = "~/Views/Shared/_FormLayout.cshtml"; } |
||||
|
|
||||
|
|
||||
|
<style> |
||||
|
.control-label { |
||||
|
justify-content: flex-end !important; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
<div class="row"> |
||||
|
<div class="col-sm-12"> |
||||
|
<form enctype="multipart/form-data" method="post" asp-action="PPS011CSave"> |
||||
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div> |
||||
|
|
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="RMAGroupNo" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="RMAGroupNo" class="form-control col-sm-9" placeholder="請輸入維修群組代碼" /> |
||||
|
<span asp-validation-for="RMAGroupNo" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="RMAGroupName" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="RMAGroupName" class="form-control col-sm-9" placeholder="請輸入維修群組名稱" /> |
||||
|
<span asp-validation-for="RMAGroupName" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="RMAStatusNo" class="control-label col-sm-3"></label> |
||||
|
<select asp-for="RMAStatusNo" asp-items="@ViewBag.StatusList" class="custom-select col-sm-9"></select> |
||||
|
<span asp-validation-for="RMAStatusNo" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<span style="color: firebrick;word-break: break-all;" class="text-danger offset-sm-3">@Html.ValidationMessage("error")</span> |
||||
|
<div class="form-group"> |
||||
|
<input type="submit" value="保存" class="btn btn-primary offset-sm-3" /> |
||||
|
</div> |
||||
|
|
||||
|
</form> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
@section Scripts { |
||||
|
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); |
||||
|
await Html.RenderPartialAsync("_FileinputScriptsPartial"); } |
||||
|
|
||||
|
<script type="text/javascript"> |
||||
|
$(document).ready(function () { |
||||
|
var error = '@Html.ValidationMessage("error")'; |
||||
|
if ($(error).text() != '') { |
||||
|
parent.hg.msg(error); |
||||
|
} |
||||
|
}); |
||||
|
</script> |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,58 @@ |
|||||
|
@model AMESCoreStudio.WebApi.Models.AMES.RMAGroup |
||||
|
|
||||
|
|
||||
|
@{ ViewData["Title"] = "PPS011U"; |
||||
|
Layout = "~/Views/Shared/_FormLayout.cshtml"; } |
||||
|
|
||||
|
|
||||
|
<style> |
||||
|
.control-label { |
||||
|
justify-content: flex-end !important; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
<div class="row"> |
||||
|
<div class="col-sm-12"> |
||||
|
<form enctype="multipart/form-data" method="post" asp-action="PPS011USave"> |
||||
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div> |
||||
|
|
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="RMAGroupNo" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="RMAGroupNo" class="form-control col-sm-9" readonly="readonly" /> |
||||
|
<span asp-validation-for="RMAGroupNo" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="RMAGroupName" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="RMAGroupName" class="form-control col-sm-9" placeholder="請輸入維修群組名稱" /> |
||||
|
<span asp-validation-for="RMAGroupName" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="RMAStatusNo" class="control-label col-sm-3"></label> |
||||
|
<select asp-for="RMAStatusNo" asp-items="@ViewBag.StatusList" class="custom-select col-sm-9"></select> |
||||
|
<span asp-validation-for="RMAStatusNo" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<span style="color: firebrick;word-break: break-all;" class="text-danger offset-sm-3">@Html.ValidationMessage("error")</span> |
||||
|
<div class="form-group"> |
||||
|
<input type="submit" value="保存" class="btn btn-primary offset-sm-3" /> |
||||
|
</div> |
||||
|
|
||||
|
</form> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
@section Scripts { |
||||
|
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); |
||||
|
await Html.RenderPartialAsync("_FileinputScriptsPartial"); } |
||||
|
|
||||
|
<script type="text/javascript"> |
||||
|
$(document).ready(function () { |
||||
|
var error = '@Html.ValidationMessage("error")'; |
||||
|
if ($(error).text() != '') { |
||||
|
parent.hg.msg(error); |
||||
|
} |
||||
|
}); |
||||
|
</script> |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,156 @@ |
|||||
|
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>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
[Route("api/[controller]")]
|
||||
|
[ApiController] |
||||
|
public class CycleTimesController : ControllerBase |
||||
|
{ |
||||
|
private readonly AMESContext _context; |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="context"></param>
|
||||
|
public CycleTimesController(AMESContext context) |
||||
|
{ |
||||
|
_context = context; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
// GET: api/CycleTimes
|
||||
|
[HttpGet] |
||||
|
public async Task<ActionResult<IEnumerable<CycleTime>>> GetCycleTime() |
||||
|
{ |
||||
|
return await _context.CycleTimes.ToListAsync(); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// GET: api/CycleTimes/5
|
||||
|
[HttpGet("{id}")] |
||||
|
public async Task<ActionResult<CycleTime>> GetCycleTime(string id) |
||||
|
{ |
||||
|
var cycleTime = await _context.CycleTimes.FindAsync(id); |
||||
|
|
||||
|
if (cycleTime == null) |
||||
|
{ |
||||
|
return NotFound(); |
||||
|
} |
||||
|
|
||||
|
return cycleTime; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <param name="cycleTime"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// PUT: api/CycleTimes/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> PutCycleTime(string id, CycleTime cycleTime) |
||||
|
{ |
||||
|
if (id != cycleTime.ItemNo) |
||||
|
{ |
||||
|
return BadRequest(); |
||||
|
} |
||||
|
|
||||
|
_context.Entry(cycleTime).State = EntityState.Modified; |
||||
|
|
||||
|
try |
||||
|
{ |
||||
|
await _context.SaveChangesAsync(); |
||||
|
} |
||||
|
catch (DbUpdateConcurrencyException) |
||||
|
{ |
||||
|
if (!CycleTimeExists(id)) |
||||
|
{ |
||||
|
return NotFound(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
throw; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
return NoContent(); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="cycleTime"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// POST: api/CycleTimes
|
||||
|
// 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<CycleTime>> PostCycleTime(CycleTime cycleTime) |
||||
|
{ |
||||
|
_context.CycleTimes.Add(cycleTime); |
||||
|
try |
||||
|
{ |
||||
|
await _context.SaveChangesAsync(); |
||||
|
} |
||||
|
catch (DbUpdateException) |
||||
|
{ |
||||
|
if (CycleTimeExists(cycleTime.ItemNo)) |
||||
|
{ |
||||
|
return Conflict(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
throw; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
return CreatedAtAction("GetCycleTime", new { id = cycleTime.ItemNo }, cycleTime); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// DELETE: api/CycleTimes/5
|
||||
|
[HttpDelete("{id}")] |
||||
|
public async Task<ActionResult<CycleTime>> DeleteCycleTime(string id) |
||||
|
{ |
||||
|
var cycleTime = await _context.CycleTimes.FindAsync(id); |
||||
|
if (cycleTime == null) |
||||
|
{ |
||||
|
return NotFound(); |
||||
|
} |
||||
|
|
||||
|
_context.CycleTimes.Remove(cycleTime); |
||||
|
await _context.SaveChangesAsync(); |
||||
|
|
||||
|
return cycleTime; |
||||
|
} |
||||
|
|
||||
|
private bool CycleTimeExists(string id) |
||||
|
{ |
||||
|
return _context.CycleTimes.Any(e => e.ItemNo == id); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,156 @@ |
|||||
|
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>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
[Route("api/[controller]")]
|
||||
|
[ApiController] |
||||
|
public class RMAClassesController : ControllerBase |
||||
|
{ |
||||
|
private readonly AMESContext _context; |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="context"></param>
|
||||
|
public RMAClassesController(AMESContext context) |
||||
|
{ |
||||
|
_context = context; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
// GET: api/RMAClasses
|
||||
|
[HttpGet] |
||||
|
public async Task<ActionResult<IEnumerable<RMAClass>>> GetRMAClass() |
||||
|
{ |
||||
|
return await _context.RMAClasses.ToListAsync(); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// GET: api/RMAClasses/5
|
||||
|
[HttpGet("{id}")] |
||||
|
public async Task<ActionResult<RMAClass>> GetRMAClass(string id) |
||||
|
{ |
||||
|
var rMAClass = await _context.RMAClasses.FindAsync(id); |
||||
|
|
||||
|
if (rMAClass == null) |
||||
|
{ |
||||
|
return NotFound(); |
||||
|
} |
||||
|
|
||||
|
return rMAClass; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <param name="rMAClass"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// PUT: api/RMAClasses/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> PutRMAClass(string id, RMAClass rMAClass) |
||||
|
{ |
||||
|
if (id != rMAClass.RMAClassNo) |
||||
|
{ |
||||
|
return BadRequest(); |
||||
|
} |
||||
|
|
||||
|
_context.Entry(rMAClass).State = EntityState.Modified; |
||||
|
|
||||
|
try |
||||
|
{ |
||||
|
await _context.SaveChangesAsync(); |
||||
|
} |
||||
|
catch (DbUpdateConcurrencyException) |
||||
|
{ |
||||
|
if (!RMAClassExists(id)) |
||||
|
{ |
||||
|
return NotFound(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
throw; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
return NoContent(); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="rMAClass"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// POST: api/RMAClasses
|
||||
|
// 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<RMAClass>> PostRMAClass(RMAClass rMAClass) |
||||
|
{ |
||||
|
_context.RMAClasses.Add(rMAClass); |
||||
|
try |
||||
|
{ |
||||
|
await _context.SaveChangesAsync(); |
||||
|
} |
||||
|
catch (DbUpdateException) |
||||
|
{ |
||||
|
if (RMAClassExists(rMAClass.RMAClassNo)) |
||||
|
{ |
||||
|
return Conflict(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
throw; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
return CreatedAtAction("GetRMAClass", new { id = rMAClass.RMAClassNo }, rMAClass); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// DELETE: api/RMAClasses/5
|
||||
|
[HttpDelete("{id}")] |
||||
|
public async Task<ActionResult<RMAClass>> DeleteRMAClass(string id) |
||||
|
{ |
||||
|
var rMAClass = await _context.RMAClasses.FindAsync(id); |
||||
|
if (rMAClass == null) |
||||
|
{ |
||||
|
return NotFound(); |
||||
|
} |
||||
|
|
||||
|
_context.RMAClasses.Remove(rMAClass); |
||||
|
await _context.SaveChangesAsync(); |
||||
|
|
||||
|
return rMAClass; |
||||
|
} |
||||
|
|
||||
|
private bool RMAClassExists(string id) |
||||
|
{ |
||||
|
return _context.RMAClasses.Any(e => e.RMAClassNo == id); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,192 @@ |
|||||
|
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 RMAGroupsController : ControllerBase |
||||
|
{ |
||||
|
private readonly AMESContext _context; |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="context"></param>
|
||||
|
public RMAGroupsController(AMESContext context) |
||||
|
{ |
||||
|
_context = context; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
// GET: api/RMAGroups
|
||||
|
[HttpGet] |
||||
|
public async Task<ActionResult<IEnumerable<RMAGroup>>> GetRMAGroup(int page=1,int limit = 10) |
||||
|
{ |
||||
|
IQueryable<RMAGroup> q = _context.RMAGroups; |
||||
|
if (page > 0) |
||||
|
{ |
||||
|
q = q.OrderBy(p => p.RMAGroupNo).Skip((page - 1) * limit).Take(limit); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
q = q.OrderBy(p => p.RMAGroupNo); |
||||
|
} |
||||
|
|
||||
|
var rmaGroup = await q.ToListAsync(); |
||||
|
|
||||
|
return rmaGroup; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// GET: api/RMAGroups/5
|
||||
|
[HttpGet("{id}")] |
||||
|
public async Task<ActionResult<IEnumerable<RMAGroup>>> GetRMAGroup(string id) |
||||
|
{ |
||||
|
IQueryable<RMAGroup> q = _context.RMAGroups; |
||||
|
q = q.Where(p => p.RMAGroupNo.Equals(id)); |
||||
|
|
||||
|
var rmaGroup = await q.ToListAsync(); |
||||
|
|
||||
|
if (rmaGroup == null) |
||||
|
{ |
||||
|
return NotFound(); |
||||
|
} |
||||
|
|
||||
|
return rmaGroup; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <param name="rMAGroup"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// PUT: api/RMAGroups/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<RMAGroup>> PutRMAGroup(string id, [FromBody] RMAGroup rMAGroup) |
||||
|
{ |
||||
|
ResultModel<RMAGroup> result = new ResultModel<RMAGroup>(); |
||||
|
|
||||
|
if (id != rMAGroup.RMAGroupNo) |
||||
|
{ |
||||
|
result.Success = false; |
||||
|
result.Msg = "群組代碼錯誤"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
_context.Entry(rMAGroup).State = EntityState.Modified; |
||||
|
|
||||
|
try |
||||
|
{ |
||||
|
await _context.SaveChangesAsync(); |
||||
|
} |
||||
|
catch (DbUpdateConcurrencyException) |
||||
|
{ |
||||
|
if (!RMAGroupExists(id)) |
||||
|
{ |
||||
|
result.Success = false; |
||||
|
result.Msg = "群組代碼不存在"; |
||||
|
return result; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
throw; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
result.Success = true; |
||||
|
result.Msg = "OK"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="rMAGroup"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// POST: api/RMAGroups
|
||||
|
// 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<RMAGroup>> PostRMAGroup([FromBody] RMAGroup rMAGroup) |
||||
|
{ |
||||
|
ResultModel<RMAGroup> result = new ResultModel<RMAGroup>(); |
||||
|
|
||||
|
_context.RMAGroups.Add(rMAGroup); |
||||
|
try |
||||
|
{ |
||||
|
await _context.SaveChangesAsync(); |
||||
|
} |
||||
|
catch (DbUpdateException) |
||||
|
{ |
||||
|
if (RMAGroupExists(rMAGroup.RMAGroupNo)) |
||||
|
{ |
||||
|
result.Success = false; |
||||
|
result.Msg = "群組代碼重複"; |
||||
|
return result; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
throw; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
result.Success = true; |
||||
|
result.Msg = "OK"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// DELETE: api/RMAGroups/5
|
||||
|
[HttpDelete("{id}")] |
||||
|
public async Task<ResultModel<RMAGroup>> DeleteRMAGroup(string id) |
||||
|
{ |
||||
|
ResultModel<RMAGroup> result = new ResultModel<RMAGroup>(); |
||||
|
|
||||
|
var rMAGroup = await _context.RMAGroups.FindAsync(id); |
||||
|
if (rMAGroup == null) |
||||
|
{ |
||||
|
result.Success = false; |
||||
|
result.Msg = "群組代碼不存在"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
_context.RMAGroups.Remove(rMAGroup); |
||||
|
await _context.SaveChangesAsync(); |
||||
|
|
||||
|
result.Success = true; |
||||
|
result.Msg = "OK"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
private bool RMAGroupExists(string id) |
||||
|
{ |
||||
|
return _context.RMAGroups.Any(e => e.RMAGroupNo == id); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,156 @@ |
|||||
|
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>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
[Route("api/[controller]")]
|
||||
|
[ApiController] |
||||
|
public class RMAReasonsController : ControllerBase |
||||
|
{ |
||||
|
private readonly AMESContext _context; |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="context"></param>
|
||||
|
public RMAReasonsController(AMESContext context) |
||||
|
{ |
||||
|
_context = context; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
// GET: api/RMAReasons
|
||||
|
[HttpGet] |
||||
|
public async Task<ActionResult<IEnumerable<RMAReason>>> GetRMAReason() |
||||
|
{ |
||||
|
return await _context.RMAReasons.ToListAsync(); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// GET: api/RMAReasons/5
|
||||
|
[HttpGet("{id}")] |
||||
|
public async Task<ActionResult<RMAReason>> GetRMAReason(string id) |
||||
|
{ |
||||
|
var rMAReason = await _context.RMAReasons.FindAsync(id); |
||||
|
|
||||
|
if (rMAReason == null) |
||||
|
{ |
||||
|
return NotFound(); |
||||
|
} |
||||
|
|
||||
|
return rMAReason; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <param name="rMAReason"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// PUT: api/RMAReasons/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> PutRMAReason(string id, RMAReason rMAReason) |
||||
|
{ |
||||
|
if (id != rMAReason.NGReasonNo) |
||||
|
{ |
||||
|
return BadRequest(); |
||||
|
} |
||||
|
|
||||
|
_context.Entry(rMAReason).State = EntityState.Modified; |
||||
|
|
||||
|
try |
||||
|
{ |
||||
|
await _context.SaveChangesAsync(); |
||||
|
} |
||||
|
catch (DbUpdateConcurrencyException) |
||||
|
{ |
||||
|
if (!RMAReasonExists(id)) |
||||
|
{ |
||||
|
return NotFound(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
throw; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
return NoContent(); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="rMAReason"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// POST: api/RMAReasons
|
||||
|
// 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<RMAReason>> PostRMAReason(RMAReason rMAReason) |
||||
|
{ |
||||
|
_context.RMAReasons.Add(rMAReason); |
||||
|
try |
||||
|
{ |
||||
|
await _context.SaveChangesAsync(); |
||||
|
} |
||||
|
catch (DbUpdateException) |
||||
|
{ |
||||
|
if (RMAReasonExists(rMAReason.NGReasonNo)) |
||||
|
{ |
||||
|
return Conflict(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
throw; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
return CreatedAtAction("GetRMAReason", new { id = rMAReason.NGReasonNo }, rMAReason); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// DELETE: api/RMAReasons/5
|
||||
|
[HttpDelete("{id}")] |
||||
|
public async Task<ActionResult<RMAReason>> DeleteRMAReason(string id) |
||||
|
{ |
||||
|
var rMAReason = await _context.RMAReasons.FindAsync(id); |
||||
|
if (rMAReason == null) |
||||
|
{ |
||||
|
return NotFound(); |
||||
|
} |
||||
|
|
||||
|
_context.RMAReasons.Remove(rMAReason); |
||||
|
await _context.SaveChangesAsync(); |
||||
|
|
||||
|
return rMAReason; |
||||
|
} |
||||
|
|
||||
|
private bool RMAReasonExists(string id) |
||||
|
{ |
||||
|
return _context.RMAReasons.Any(e => e.NGReasonNo == id); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,149 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.ComponentModel.DataAnnotations.Schema; |
||||
|
using System.Runtime.Serialization; |
||||
|
|
||||
|
namespace AMESCoreStudio.WebApi.Models.AMES |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 标准工时资料表
|
||||
|
/// </summary>
|
||||
|
[Table("CYCLE_TIME", Schema = "JHAMES")] |
||||
|
[DataContract] |
||||
|
public class CycleTime |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 料號
|
||||
|
/// </summary>
|
||||
|
[Column("ITEM_NO")] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "料號")] |
||||
|
[StringLength(30, ErrorMessage = "{0},不能大于{1}")] |
||||
|
[DataMember] |
||||
|
public string ItemNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 每個產出時間
|
||||
|
/// </summary>
|
||||
|
[Column("CT1")] |
||||
|
[DataMember] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "每個產出時間")] |
||||
|
public decimal CT1 { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 每分鐘產出個數
|
||||
|
/// </summary>
|
||||
|
[Column("CT2")] |
||||
|
[DataMember] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "每分鐘產出個數")] |
||||
|
public decimal CT2 { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 線別ID
|
||||
|
/// </summary>
|
||||
|
[Column("LINE_ID")] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "線別ID")] |
||||
|
[DataMember] |
||||
|
public int LineID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 生產單位
|
||||
|
/// </summary>
|
||||
|
[Column("SECTION_NO")] |
||||
|
[DataMember] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "生產單位")] |
||||
|
public string SectionNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 首件產出時間
|
||||
|
/// </summary>
|
||||
|
[Column("FIRST_TIME")] |
||||
|
[DataMember] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "首件產出時間")] |
||||
|
public decimal FirstTime { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 良品產出時間
|
||||
|
/// </summary>
|
||||
|
[Column("PASS_TIME")] |
||||
|
[DataMember] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "良品產出時間")] |
||||
|
public decimal PassTime { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 作業人數
|
||||
|
/// </summary>
|
||||
|
[Column("OP_CNT")] |
||||
|
[DataMember] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "作業人數")] |
||||
|
public decimal OPCnt { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 日產能
|
||||
|
/// </summary>
|
||||
|
[Column("PRO_CNT")] |
||||
|
[DataMember] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "日產能")] |
||||
|
public decimal PROCnt { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 月產出
|
||||
|
/// </summary>
|
||||
|
[Column("MOH_UNIT")] |
||||
|
[DataMember] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "月產出")] |
||||
|
public decimal MOHUnit { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 週產出
|
||||
|
/// </summary>
|
||||
|
[Column("WI_CNT")] |
||||
|
[DataMember] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "週產出")] |
||||
|
public decimal WICnt { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 料號
|
||||
|
/// </summary>
|
||||
|
[Column("ITEM_NO")] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "料號")] |
||||
|
[StringLength(30, ErrorMessage = "{0},不能大于{1}")] |
||||
|
[DataMember] |
||||
|
public string Memo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 建立者
|
||||
|
/// </summary>
|
||||
|
[Column("CREATE_USERID")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "建立者")] |
||||
|
public decimal CreateUserId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 建立日期
|
||||
|
/// </summary>
|
||||
|
[Column("CREATE_DATE")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "建立日期")] |
||||
|
public DateTime CreateDate { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 修改日期
|
||||
|
/// </summary>
|
||||
|
[Column("UPDATE_DATE")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "修改日期")] |
||||
|
public DateTime UpdateDate { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,58 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.ComponentModel.DataAnnotations.Schema; |
||||
|
using System.Runtime.Serialization; |
||||
|
|
||||
|
namespace AMESCoreStudio.WebApi.Models.AMES |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 維修類別资料表
|
||||
|
/// </summary>
|
||||
|
[Table("RMA_CLASS", Schema = "JHAMES")] |
||||
|
[DataContract] |
||||
|
public class RMAClass |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 維修類別代碼
|
||||
|
/// </summary>
|
||||
|
[Key] |
||||
|
[Column("RMA_CLASS_NO")] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "維修類別代碼")] |
||||
|
[StringLength(6, ErrorMessage = "{0},不能大于{1}")] |
||||
|
[DataMember] |
||||
|
public string RMAClassNo { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 維修群組代碼
|
||||
|
/// </summary>
|
||||
|
[Column("RMA_GROUP_NO")] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "維修群組代碼")] |
||||
|
[StringLength(6, ErrorMessage = "{0},不能大于{1}")] |
||||
|
[DataMember] |
||||
|
public string RMAGroupNo { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 維修類別名稱
|
||||
|
/// </summary>
|
||||
|
[Column("RMA_CLASS_NAME")] |
||||
|
[DataMember] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "維修類別名稱")] |
||||
|
[StringLength(50, ErrorMessage = "{0},不能大于{1}")] |
||||
|
public string RMAClassName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 維修群組狀態
|
||||
|
/// </summary>
|
||||
|
[Column("STATUS_NO")] |
||||
|
[DataMember] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "維修類別狀態")] |
||||
|
[StringLength(1, ErrorMessage = "{0},不能大于{1}")] |
||||
|
public string statusNo { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,47 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.ComponentModel.DataAnnotations.Schema; |
||||
|
using System.Runtime.Serialization; |
||||
|
|
||||
|
namespace AMESCoreStudio.WebApi.Models.AMES |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 維修群组资料表
|
||||
|
/// </summary>
|
||||
|
[Table("RMA_GROUP", Schema = "JHAMES")] |
||||
|
[DataContract] |
||||
|
public class RMAGroup |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 維修群組代碼
|
||||
|
/// </summary>
|
||||
|
[Key] |
||||
|
[Column("RMA_GROUP_NO")] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "維修群組代碼")] |
||||
|
[StringLength(6, ErrorMessage = "{0},不能大于{1}")] |
||||
|
[DataMember] |
||||
|
public string RMAGroupNo { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 維修群組名稱
|
||||
|
/// </summary>
|
||||
|
[Column("RMA_GROUP_NAME")] |
||||
|
[DataMember] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "維修群組名稱")] |
||||
|
[StringLength(50, ErrorMessage = "{0},不能大于{1}")] |
||||
|
public string RMAGroupName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 維修群組狀態
|
||||
|
/// </summary>
|
||||
|
[Column("RMA_STATUS_NO")] |
||||
|
[DataMember] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "維修群組狀態")] |
||||
|
[StringLength(1, ErrorMessage = "{0},不能大于{1}")] |
||||
|
public string RMAStatusNo { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,94 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.ComponentModel.DataAnnotations.Schema; |
||||
|
using System.Runtime.Serialization; |
||||
|
|
||||
|
namespace AMESCoreStudio.WebApi.Models.AMES |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 維修原因资料表
|
||||
|
/// </summary>
|
||||
|
[Table("RMA_REASON", Schema = "JHAMES")] |
||||
|
[DataContract] |
||||
|
public class RMAReason |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 維修原因代碼
|
||||
|
/// </summary>
|
||||
|
[Key] |
||||
|
[Column("RMA_REASON_NO")] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "維修原因代碼")] |
||||
|
[StringLength(6, ErrorMessage = "{0},不能大于{1}")] |
||||
|
[DataMember] |
||||
|
public string NGReasonNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 維修類別代碼
|
||||
|
/// </summary>
|
||||
|
[Column("RMA_CLASS_NO")] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "維修類別代碼")] |
||||
|
[StringLength(6, ErrorMessage = "{0},不能大于{1}")] |
||||
|
[DataMember] |
||||
|
public string NGClassNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 維修原因描述
|
||||
|
/// </summary>
|
||||
|
[Column("RMA_REASON_DESC")] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "維修原因描述")] |
||||
|
[StringLength(200, ErrorMessage = "{0},不能大于{1}")] |
||||
|
[DataMember] |
||||
|
public string NGReasonDesc { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 維修原因英文描述
|
||||
|
/// </summary>
|
||||
|
[Column("RMA_REASON_DESC_EN")] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "維修原因英文描述")] |
||||
|
[StringLength(200, ErrorMessage = "{0},不能大于{1}")] |
||||
|
[DataMember] |
||||
|
public string NGReasonDescEn { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 責任單位
|
||||
|
/// </summary>
|
||||
|
[Column("RESPONSE_DEPT")] |
||||
|
[DataMember] |
||||
|
[Required] |
||||
|
[Display(Name = "責任單位")] |
||||
|
public int ResponseDept { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 問題歸屬/類別
|
||||
|
/// </summary>
|
||||
|
[Column("TYPE_ID")] |
||||
|
[DataMember] |
||||
|
[Required] |
||||
|
[Display(Name = "問題歸屬/類別")] |
||||
|
public int QATypeId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 目標
|
||||
|
/// </summary>
|
||||
|
[Column("YIELD_GOAL")] |
||||
|
[DataMember] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "目標")] |
||||
|
public decimal YieldGoal { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 維修原因狀態
|
||||
|
/// </summary>
|
||||
|
[Column("STATUS_NO")] |
||||
|
[DataMember] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "維修原因狀態")] |
||||
|
[StringLength(1, ErrorMessage = "{0},不能大于{1}")] |
||||
|
public string statusNo { get; set; } |
||||
|
|
||||
|
} |
||||
|
} |
Loading…
Reference in new issue