9 changed files with 1453 additions and 0 deletions
@ -0,0 +1,254 @@ |
|||||
|
@{ |
||||
|
ViewData["Title"] = "任務性IPQC提示"; |
||||
|
Layout = "~/Views/Shared/_AMESLayout.cshtml"; |
||||
|
} |
||||
|
|
||||
|
<style type="text/css"> |
||||
|
.layui-table-main .layui-table-cell { |
||||
|
/*height: auto !important;*/ |
||||
|
white-space: normal; |
||||
|
} |
||||
|
|
||||
|
.layui-table img { |
||||
|
max-width: 60px; |
||||
|
max-height: 28px; |
||||
|
} |
||||
|
|
||||
|
.layui-tree-main { |
||||
|
cursor: pointer; |
||||
|
padding-right: 10px; |
||||
|
float: left; |
||||
|
border-width: 1px; |
||||
|
border-style: solid; |
||||
|
border-color: #e6e6e6; |
||||
|
margin: 10px 0; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
|
||||
|
<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"> |
||||
|
<div class="layui-form"> |
||||
|
<div class="layui-row"> |
||||
|
<div class="layui-form-item"> |
||||
|
<div class="layui-col-sm4"> |
||||
|
<div class="layui-inline"> |
||||
|
<label class="layui-form-label">工單號碼:</label> |
||||
|
<div class="layui-input-inline" style="width:150px"> |
||||
|
<input id="wipNo" name="wipNo" class="layui-input"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="layui-col-sm4"> |
||||
|
<div class="layui-inline"> |
||||
|
<label class="layui-form-label">料號:</label> |
||||
|
<div class="layui-input-inline" style="width:150px"> |
||||
|
<input id="itemNo" name="itemNo" class="layui-input"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="layui-col-sm1"> |
||||
|
<div class="layui-inline layui-show-xs-block"> |
||||
|
<button class="layui-btn layui-btn-sm layui-btn-normal " id="querysubmit" lay-filter="querysubmit"> |
||||
|
<i class="layui-icon layui-icon-sm"></i> |
||||
|
</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
<table class="layui-hide" id="query" lay-filter="query"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
@section Scripts{ |
||||
|
<script type="text/javascript"> |
||||
|
layui.use(['form', 'layer', 'laydate'], function () { |
||||
|
form = layui.form; |
||||
|
laydate = layui.laydate; |
||||
|
laydate.render({ |
||||
|
elem: '#sdate' |
||||
|
, trigger: 'click' |
||||
|
, format: 'yyyy-MM-dd' |
||||
|
, theme: 'grid' |
||||
|
}); |
||||
|
laydate.render({ |
||||
|
elem: '#edate' |
||||
|
, trigger: 'click' |
||||
|
, format: 'yyyy-MM-dd' |
||||
|
, theme: 'grid' |
||||
|
}); |
||||
|
}); |
||||
|
|
||||
|
////搜索 |
||||
|
$('#querysubmit').click(function () { |
||||
|
console.log('#btnSearch'); |
||||
|
//var factoryNo = $("#factoryNo").val(); |
||||
|
//if (factoryNo) { |
||||
|
hg.msghide("刷新数据!"); |
||||
|
tt(); |
||||
|
//} |
||||
|
//else { |
||||
|
// alert("請選擇廠別!!!!"); |
||||
|
//} |
||||
|
return false; |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
|
||||
|
var tableCols = [[ |
||||
|
{ |
||||
|
field: 'ipqcTaskNoticeID', |
||||
|
width: 80, |
||||
|
title: '#' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'wipNo', |
||||
|
title: '工單號碼', |
||||
|
sort: true |
||||
|
}, |
||||
|
{ |
||||
|
field: 'itemNo', |
||||
|
title: '料號', |
||||
|
sort: true |
||||
|
}, |
||||
|
{ |
||||
|
field: 'stationName', |
||||
|
title: '站別' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'noticeContent', |
||||
|
title: '提醒說明' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'createUserName', |
||||
|
title: '建立人員', |
||||
|
|
||||
|
}, |
||||
|
{ |
||||
|
field: 'createDate', |
||||
|
title: '建立日期', |
||||
|
templet: '<div>{{ layui.util.toDateString(d.openTime, "yyyy/MM/dd HH:mm:ss") }}</div>' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'checkUserName', |
||||
|
title: '確認人員', |
||||
|
|
||||
|
}, |
||||
|
{ |
||||
|
field: 'checkDate', |
||||
|
title: '確認時間', |
||||
|
templet: '<div>{{ layui.util.toDateString(d.closeTime, "yyyy/MM/dd HH:mm:ss") }}</div>' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'checkContent', |
||||
|
title: '確認說明' |
||||
|
}, |
||||
|
{ |
||||
|
align: 'center', |
||||
|
title: '確認', |
||||
|
width: 80, |
||||
|
fixed: 'right', |
||||
|
sort: true, |
||||
|
templet: function (item) { |
||||
|
var btns = ''; |
||||
|
if (item.statusNo == "Y" && item.checkUserID == "-1") |
||||
|
btns = btns + '<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="Check">確認</a>'; |
||||
|
|
||||
|
return btns; |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
align: 'center', |
||||
|
title: '操作', |
||||
|
width: 130, |
||||
|
fixed: 'right', |
||||
|
sort: true, |
||||
|
templet: function (item) { |
||||
|
var btns = ''; |
||||
|
btns = btns + '<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>'; |
||||
|
if (item.statusNo == "Y") |
||||
|
btns += ' <a class="layui-btn layui-btn-danger layui-btn-xs layui-icon layui-icon-delete" lay-event="del">停用</a>'; |
||||
|
else |
||||
|
btns += ' <a class="layui-btn layui-btn-normal layui-btn-xs layui-icon layui-icon-edit" lay-event="del">啟用</a>'; |
||||
|
return btns; |
||||
|
} |
||||
|
} |
||||
|
]]; |
||||
|
//通过行tool编辑,lay-event="edit" |
||||
|
function edit(obj) { |
||||
|
if (obj.data.ipqcTaskNoticeID) { |
||||
|
hg.open('修改生產工時', '/SPC/SPC006U/' + obj.data.ipqcTaskNoticeID, 480,480); |
||||
|
} |
||||
|
} |
||||
|
//通过行tool编辑,lay-event="finish" |
||||
|
function Check(obj) { |
||||
|
if (obj.data.ipqcTaskNoticeID) { |
||||
|
hg.open('確認回覆', '/SPC/SPC006R/' + obj.data.ipqcTaskNoticeID, 480, 480); |
||||
|
} |
||||
|
} |
||||
|
//通过行tool删除,lay-event="del" |
||||
|
function del(obj) { |
||||
|
var status; |
||||
|
if (obj.data.statusNo == "Y") |
||||
|
status = "停用"; |
||||
|
else |
||||
|
status = "啟用"; |
||||
|
|
||||
|
if (obj.data.ipqcTaskNoticeID) { |
||||
|
hg.confirm("确定要" + status + "嗎?", function () { |
||||
|
$.ajax({ |
||||
|
url: '/SPC/SPC006D', |
||||
|
data: { id: obj.data.ipqcTaskNoticeID }, |
||||
|
type: 'POST', |
||||
|
success: function (data) { |
||||
|
if (data.success) { |
||||
|
hg.msghide(status + "成功!"); |
||||
|
table && table.reload(data); |
||||
|
} |
||||
|
else { |
||||
|
hg.msg(data.msg); |
||||
|
} |
||||
|
}, |
||||
|
error: function () { |
||||
|
hg.msg("网络请求失败!"); |
||||
|
} |
||||
|
}); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
var toolbar = [{ |
||||
|
text: '新增', |
||||
|
layuiicon: '', |
||||
|
class: 'layui-btn-normal', |
||||
|
handler: function () { |
||||
|
hg.open('新增任務性IPQC提示', '/SPC/SPC006C', 480, 480); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
]; |
||||
|
//基本数据表格 |
||||
|
|
||||
|
var table; |
||||
|
$(function () { |
||||
|
tt(); |
||||
|
}); |
||||
|
function tt() { |
||||
|
//基本数据表格 |
||||
|
var wipno = "", itemno = ""; |
||||
|
|
||||
|
itemno = $("#itemNo").val(); |
||||
|
wipno = $("#wipNo").val(); |
||||
|
|
||||
|
table = hg.table.datatable('query', '任務性IPQC提示', '/SPC/SPC006Query?wipno=' + wipno + '&itemno=' + itemno, {}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports']); |
||||
|
}; |
||||
|
</script> |
||||
|
} |
@ -0,0 +1,208 @@ |
|||||
|
@model AMESCoreStudio.WebApi.Models.AMES.IPQCTaskNotice |
||||
|
|
||||
|
|
||||
|
@{ ViewData["Title"] = "SPC006C"; |
||||
|
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="SPC006CSave"> |
||||
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div> |
||||
|
<input type="hidden" asp-for="IPQCTaskNoticeID" value="0" /> |
||||
|
<input type="hidden" asp-for="CreateUserID" value="@ViewBag.UserID" /> |
||||
|
<input type="hidden" asp-for="UpdateUserID" value="-1" /> |
||||
|
<input type="hidden" asp-for="CheckUserID" value="-1" /> |
||||
|
<input type="hidden" asp-for="CreateDate" value="@System.DateTime.Now" /> |
||||
|
<input type="hidden" asp-for="UpdateDate" value="@System.DateTime.Now" /> |
||||
|
<input type="hidden" asp-for="CheckDate" value="@System.DateTime.Now" /> |
||||
|
<input type="hidden" asp-for="CheckContent" value="" /> |
||||
|
<input type="hidden" asp-for="StatusNo" value="Y" /> |
||||
|
<input type="hidden" asp-for="UnitNo" /> |
||||
|
|
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="WipNo" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="WipNo" class="form-control col-sm-9" /> |
||||
|
<span asp-validation-for="WipNo" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="ItemNo" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="ItemNo" class="form-control col-sm-9" /> |
||||
|
<span asp-validation-for="ItemNo" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="StationID" class="control-label col-sm-3"></label> |
||||
|
<select id="StationID" asp-for="StationID" asp-items="@ViewBag.StationList" class="custom-select col-sm-9"> |
||||
|
<option value="">請選擇</option> |
||||
|
<option value="-1">N/A</option> |
||||
|
</select> |
||||
|
<span asp-validation-for="StationID" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="NoticeContent" class="control-label col-sm-3"></label> |
||||
|
<textarea asp-for="NoticeContent" class="form-control col-sm-9" rows="4"></textarea> |
||||
|
<span asp-validation-for="NoticeContent" 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); |
||||
|
} |
||||
|
}); |
||||
|
$('#WipNo').focusout(function () { |
||||
|
var data = $("#WipNo").val(); |
||||
|
|
||||
|
if (data) { |
||||
|
$.ajax({ |
||||
|
url: "/SPC/GetWipInfoByWipNO", |
||||
|
dataType: 'json', |
||||
|
data: { id: data }, |
||||
|
contentType: "application/json", |
||||
|
type: 'get', |
||||
|
success: function (result) { |
||||
|
if (result.data) { |
||||
|
$("#ItemNo").val(result.data.getWipAtt.itemNO); |
||||
|
$("#UnitNo").val(result.data.unitNo); |
||||
|
getStations(result.data.flowRuleID); |
||||
|
} |
||||
|
else { |
||||
|
$('#ItemNo').val(""); |
||||
|
$("#UnitNo").val(""); |
||||
|
getStations(0); |
||||
|
$('#ItemNo').focus(); |
||||
|
return false; |
||||
|
} |
||||
|
}, |
||||
|
error: function () { |
||||
|
$('#ItemNo').val(""); |
||||
|
$("#UnitNo").val(""); |
||||
|
getStations(0); |
||||
|
$('#ItemNo').focus(); |
||||
|
return false; |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
$("#ItemNo").change(function () { |
||||
|
|
||||
|
var ItemNo = $("#ItemNo").val(); |
||||
|
var WipNo = $("#WipNo").val(); |
||||
|
if (ItemNo != "" && WipNo != "") { |
||||
|
CheckItemNo( WipNo,ItemNo); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
function CheckItemNo(WipNo, ItemNo) { |
||||
|
$.ajax({ |
||||
|
url: "/SPC/GetWipInfoByWipNO", |
||||
|
dataType: 'json', |
||||
|
data: { id: WipNo }, |
||||
|
contentType: "application/json", |
||||
|
type: 'get', |
||||
|
success: function (result) { |
||||
|
if (result.data) { |
||||
|
|
||||
|
if ($("#ItemNo").val != result.data.getWipAtt.itemNO) { |
||||
|
$('#ItemNo').val(""); |
||||
|
$("#UnitNo").val(""); |
||||
|
$('#ItemNo').focus(); |
||||
|
alert("工單對應料號不正確"); |
||||
|
return false; |
||||
|
} |
||||
|
} |
||||
|
else { |
||||
|
$('#ItemNo').val(""); |
||||
|
$("#UnitNo").val(""); |
||||
|
$('#ItemNo').focus(); |
||||
|
return false; |
||||
|
} |
||||
|
}, |
||||
|
error: function () { |
||||
|
$('#ItemNo').focus(); |
||||
|
return false; |
||||
|
} |
||||
|
}); |
||||
|
}; |
||||
|
|
||||
|
|
||||
|
function getStations(data) { |
||||
|
|
||||
|
$.ajax({ |
||||
|
url: "/SPC/GetStationsesbyFlow", |
||||
|
data: { id: data }, |
||||
|
dataType: 'json', |
||||
|
contentType: "application/json", |
||||
|
type: 'get', |
||||
|
success: function (result) { |
||||
|
if (result.data) { |
||||
|
$("#StationID").empty(); |
||||
|
$('#StationID').append(new Option("請選擇", "")); |
||||
|
var count = 0; |
||||
|
$.each(result.data, function (index, item) { |
||||
|
|
||||
|
$('#StationID').append(new Option(item.stationDesc, item.stationID)); |
||||
|
count = count + 1; |
||||
|
|
||||
|
}); |
||||
|
if (count == 0) { |
||||
|
$("#StationID").empty(); |
||||
|
$('#StationID').append(new Option("N/A", "-1")); |
||||
|
$('#StationID').append(new Option("無選項", "")); |
||||
|
} |
||||
|
} |
||||
|
else { |
||||
|
$("#StationID").empty(); |
||||
|
$('#StationID').append(new Option("N/A", "-1")); |
||||
|
$('#StationID').append(new Option("無選項", "")); |
||||
|
} |
||||
|
layui.form.render("select"); |
||||
|
} |
||||
|
}); |
||||
|
}; |
||||
|
|
||||
|
|
||||
|
layui.use(['laydate'], function () { |
||||
|
//form = layui.form; |
||||
|
laydate = layui.laydate; |
||||
|
laydate.render({ |
||||
|
elem: '#StartTime' |
||||
|
, trigger: 'click' |
||||
|
, type: 'datetime' |
||||
|
, format: 'yyyy-MM-dd HH:mm' |
||||
|
, theme: 'grid' |
||||
|
}); |
||||
|
laydate.render({ |
||||
|
elem: '#EndTime' |
||||
|
, trigger: 'click' |
||||
|
, type: 'datetime' |
||||
|
, format: 'yyyy-MM-dd HH:mm' |
||||
|
, theme: 'grid' |
||||
|
}); |
||||
|
|
||||
|
}); |
||||
|
</script> |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,130 @@ |
|||||
|
@model AMESCoreStudio.WebApi.Models.AMES.IPQCTaskNotice |
||||
|
|
||||
|
|
||||
|
@{ ViewData["Title"] = "SPC006U"; |
||||
|
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="SPC006RSave"> |
||||
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div> |
||||
|
<input type="hidden" asp-for="IPQCTaskNoticeID" /> |
||||
|
<input type="hidden" asp-for="CreateUserID" /> |
||||
|
<input type="hidden" asp-for="UpdateUserID" value="@ViewBag.UserID" /> |
||||
|
<input type="hidden" asp-for="CheckUserID" value="@ViewBag.UserID" /> |
||||
|
<input type="hidden" asp-for="CreateDate" /> |
||||
|
<input type="hidden" asp-for="UpdateDate" value="@System.DateTime.Now" /> |
||||
|
<input type="hidden" asp-for="CheckDate" value="@System.DateTime.Now" /> |
||||
|
<input type="hidden" asp-for="StatusNo" /> |
||||
|
|
||||
|
|
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="WipNo" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="WipNo" class="form-control col-sm-6" readonly="readonly" /> |
||||
|
<span asp-validation-for="WipNo" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="ItemNo" class="control-label col-sm-3"></label> |
||||
|
<input id="searchItemNo" asp-for="ItemNo" class="form-control col-sm-9" readonly="readonly" /> |
||||
|
<span asp-validation-for="ItemNo" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="StationID" class="control-label col-sm-3"></label> |
||||
|
<select id="StationID" asp-for="StationID" asp-items="@ViewBag.StationList" class="custom-select col-sm-9" disabled> |
||||
|
<option value="">請選擇</option> |
||||
|
<option value="-1">N/A</option> |
||||
|
</select> |
||||
|
<span asp-validation-for="StationID" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="NoticeContent" class="control-label col-sm-3"></label> |
||||
|
<textarea asp-for="NoticeContent" class="form-control col-sm-9" rows="4" readonly="readonly"></textarea> |
||||
|
<span asp-validation-for="NoticeContent" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="CheckContent" class="control-label col-sm-3"></label> |
||||
|
<textarea asp-for="CheckContent" class="form-control col-sm-9" rows="4" ></textarea> |
||||
|
<span asp-validation-for="CheckContent" 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); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
function getStations(data) { |
||||
|
$.ajax({ |
||||
|
url: "/BAS/GetStationses", |
||||
|
dataType: 'json', |
||||
|
contentType: "application/json", |
||||
|
type: 'get', |
||||
|
success: function (result) { |
||||
|
if (result.data) { |
||||
|
$("#StationID").empty(); |
||||
|
$('#StationID').append(new Option("請選擇", "")); |
||||
|
$('#StationID').append(new Option("N/A", "-1")); |
||||
|
var count = 0; |
||||
|
$.each(result.data, function (index, item) { |
||||
|
if (item.unitNo == data) { |
||||
|
$('#StationID').append(new Option(item.stationName, item.stationID)); |
||||
|
count = count + 1; |
||||
|
} |
||||
|
}); |
||||
|
if (count == 0) { |
||||
|
$("#StationID").empty(); |
||||
|
$('#StationID').append(new Option("無選項", "")); |
||||
|
} |
||||
|
} |
||||
|
else { |
||||
|
$("#StationID").empty(); |
||||
|
$('#StationID').append(new Option("無選項", "")); |
||||
|
} |
||||
|
layui.form.render("select"); |
||||
|
} |
||||
|
}); |
||||
|
}; |
||||
|
|
||||
|
|
||||
|
layui.use(['laydate'], function () { |
||||
|
//form = layui.form; |
||||
|
laydate = layui.laydate; |
||||
|
laydate.render({ |
||||
|
elem: '#StartTime' |
||||
|
, trigger: 'click' |
||||
|
, type: 'datetime' |
||||
|
, format: 'yyyy-MM-dd HH:mm' |
||||
|
, theme: 'grid' |
||||
|
}); |
||||
|
laydate.render({ |
||||
|
elem: '#EndTime' |
||||
|
, trigger: 'click' |
||||
|
, type: 'datetime' |
||||
|
, format: 'yyyy-MM-dd HH:mm' |
||||
|
, theme: 'grid' |
||||
|
}); |
||||
|
|
||||
|
}); |
||||
|
</script> |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,93 @@ |
|||||
|
@model AMESCoreStudio.WebApi.Models.AMES.IPQCTaskNotice |
||||
|
|
||||
|
|
||||
|
@{ ViewData["Title"] = "SPC006U"; |
||||
|
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="SPC006USave"> |
||||
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div> |
||||
|
<input type="hidden" asp-for="IPQCTaskNoticeID" /> |
||||
|
<input type="hidden" asp-for="CreateUserID" /> |
||||
|
<input type="hidden" asp-for="UpdateUserID" value="@ViewBag.UserID" /> |
||||
|
<input type="hidden" asp-for="CheckUserID" /> |
||||
|
<input type="hidden" asp-for="CreateDate" /> |
||||
|
<input type="hidden" asp-for="UpdateDate" value="@System.DateTime.Now" /> |
||||
|
<input type="hidden" asp-for="CheckDate" /> |
||||
|
<input type="hidden" asp-for="StatusNo" /> |
||||
|
<input type="hidden" asp-for="CheckContent" /> |
||||
|
|
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="WipNo" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="WipNo" class="form-control col-sm-6" readonly="readonly" /> |
||||
|
<span asp-validation-for="WipNo" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="ItemNo" class="control-label col-sm-3"></label> |
||||
|
<input id="searchItemNo" asp-for="ItemNo" class="form-control col-sm-9" readonly="readonly" /> |
||||
|
<span asp-validation-for="ItemNo" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="StationID" class="control-label col-sm-3"></label> |
||||
|
<select id="StationID" asp-for="StationID" asp-items="@ViewBag.StationList" class="custom-select col-sm-9"> |
||||
|
</select> |
||||
|
<span asp-validation-for="StationID" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
|
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="StationID" class="control-label col-sm-3"></label> |
||||
|
<select asp-for="StationID" asp-items="@ViewBag.StationList" class="custom-select col-sm-9"></select> |
||||
|
<span asp-validation-for="StationID" 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); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
layui.use(['laydate'], function () { |
||||
|
//form = layui.form; |
||||
|
laydate = layui.laydate; |
||||
|
laydate.render({ |
||||
|
elem: '#StartTime' |
||||
|
, trigger: 'click' |
||||
|
, type: 'datetime' |
||||
|
, format: 'yyyy-MM-dd HH:mm' |
||||
|
, theme: 'grid' |
||||
|
}); |
||||
|
laydate.render({ |
||||
|
elem: '#EndTime' |
||||
|
, trigger: 'click' |
||||
|
, type: 'datetime' |
||||
|
, format: 'yyyy-MM-dd HH:mm' |
||||
|
, theme: 'grid' |
||||
|
}); |
||||
|
|
||||
|
}); |
||||
|
</script> |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,369 @@ |
|||||
|
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; |
||||
|
using AMESCoreStudio.WebApi.Controllers.BLL; |
||||
|
using Microsoft.Extensions.Configuration; |
||||
|
using System.Net; |
||||
|
using System.Net.Mail; |
||||
|
|
||||
|
namespace AMESCoreStudio.WebApi.Controllers.AMES |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 任務性IPQC表單维护
|
||||
|
/// </summary>
|
||||
|
[Route("api/[controller]")]
|
||||
|
[ApiController] |
||||
|
public class IPQCTaskNoticeController : ControllerBase |
||||
|
{ |
||||
|
private readonly AMESContext _context; |
||||
|
private readonly IConfiguration _config; |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="context"></param>
|
||||
|
public IPQCTaskNoticeController(AMESContext context, IConfiguration config) |
||||
|
{ |
||||
|
_config = _config = new ConfigurationBuilder().SetBasePath(Environment.CurrentDirectory).AddJsonFile("appsettings.json").Build(); |
||||
|
_context = context; |
||||
|
} |
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="context"></param>
|
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取全部任務性IPQC表單
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
// GET: api/IPQCTaskNotices
|
||||
|
[HttpGet] |
||||
|
public async Task<ActionResult<IEnumerable<IPQCTaskNotice>>> GetIPQCTaskNotices() |
||||
|
{ |
||||
|
IQueryable<IPQCTaskNotice> q = _context.IPQCTaskNotices; |
||||
|
q = q.OrderBy(p => p.IPQCTaskNoticeID); |
||||
|
var IPQCTaskNotices = await q.ToListAsync(); |
||||
|
|
||||
|
if (IPQCTaskNotices == null) |
||||
|
{ |
||||
|
return NotFound(); |
||||
|
} |
||||
|
|
||||
|
return IPQCTaskNotices; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用ID获取该任務性IPQC表單
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// GET: api/IPQCTaskNotices/5
|
||||
|
[HttpGet("{id}")] |
||||
|
public async Task<ActionResult<IEnumerable<IPQCTaskNotice>>> GetIPQCTaskNotice(int id) |
||||
|
{ |
||||
|
|
||||
|
IQueryable<IPQCTaskNotice> q = _context.IPQCTaskNotices; |
||||
|
q = q.Where(p => p.IPQCTaskNoticeID.Equals(id)); |
||||
|
var IPQCTaskNotice = await q.ToListAsync(); |
||||
|
|
||||
|
if (IPQCTaskNotice == null) |
||||
|
{ |
||||
|
return NotFound(); |
||||
|
} |
||||
|
|
||||
|
return IPQCTaskNotice; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取该任務性IPQC表單By Query
|
||||
|
/// </summary>
|
||||
|
/// <param name="WipNo">工單號碼</param>
|
||||
|
/// <param name="ItemNO">料號</param>
|
||||
|
/// <returns></returns>
|
||||
|
// GET: api/IPQCTaskNotices/Query/5
|
||||
|
[HttpGet("ByQuery")] |
||||
|
public async Task<ResultModel<IPQCTaskNotice>> GetIPQCTaskNoticesByQuery(string WipNo, string ItemNO ,int page = 0, int limit = 10) |
||||
|
{ |
||||
|
ResultModel<IPQCTaskNotice> result = new ResultModel<IPQCTaskNotice>(); |
||||
|
|
||||
|
|
||||
|
|
||||
|
var q = from q1 in _context.IPQCTaskNotices |
||||
|
join q2 in _context.UserInfoes on q1.CreateUserID equals q2.UserID |
||||
|
join q3 in _context.UserInfoes on q1.CheckUserID equals q3.UserID into checkUsers |
||||
|
from q3 in checkUsers.DefaultIfEmpty() |
||||
|
join q4 in _context.Stationses on q1.StationID equals q4.StationID into Station |
||||
|
from q4 in Station.DefaultIfEmpty() |
||||
|
where q1.CreateUserID == q2.UserID |
||||
|
select new IPQCTaskNotice |
||||
|
{ |
||||
|
IPQCTaskNoticeID= q1.IPQCTaskNoticeID, |
||||
|
WipNo = q1.WipNo, |
||||
|
ItemNo = q1.ItemNo, |
||||
|
StationID = q1.StationID, |
||||
|
NoticeContent = q1.NoticeContent, |
||||
|
CheckContent = q1.CheckContent, |
||||
|
CreateUserID = q1.CreateUserID, |
||||
|
CreateDate = q1.CreateDate, |
||||
|
CheckUserID = q1.CheckUserID, |
||||
|
CheckDate = q1.CheckDate, |
||||
|
UpdateUserID = q1.UpdateUserID, |
||||
|
UpdateDate = q1.UpdateDate, |
||||
|
StatusNo = q1.StatusNo, |
||||
|
UnitNo = q1.UnitNo, |
||||
|
CreateUserName = q2.UserName, |
||||
|
CheckUserName = q3.UserName, |
||||
|
StationName = q4.StationName |
||||
|
}; |
||||
|
|
||||
|
|
||||
|
if (!string.IsNullOrWhiteSpace(WipNo)) |
||||
|
{ |
||||
|
q = q.Where(p => p.WipNo.Equals(WipNo)); |
||||
|
} |
||||
|
|
||||
|
if (!string.IsNullOrWhiteSpace(ItemNO)) |
||||
|
{ |
||||
|
q = q.Where(p => p.ItemNo.Equals(ItemNO)); |
||||
|
} |
||||
|
|
||||
|
var IPQCTaskNotice = await q.ToListAsync(); |
||||
|
|
||||
|
|
||||
|
//紀錄筆數
|
||||
|
result.DataTotal = q.Count(); |
||||
|
|
||||
|
//Table 頁數
|
||||
|
if (page > 0) |
||||
|
{ |
||||
|
q = q.Skip((page - 1) * limit).Take(limit); |
||||
|
} |
||||
|
|
||||
|
result.Data = await q.ToListAsync(); |
||||
|
|
||||
|
if (result == null) |
||||
|
{ |
||||
|
result.Msg = "查無資料"; |
||||
|
result.Success = false; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
result.Success = true; |
||||
|
result.Msg = "OK"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// IPQC任務性Mail通知
|
||||
|
/// </summary>
|
||||
|
/// <param name="WipNo">工單號碼</param>
|
||||
|
/// <param name="ItemNO">料號</param>
|
||||
|
/// <param name="StationID">站別ID</param>
|
||||
|
/// <returns></returns>
|
||||
|
// GET: api/IPQCTaskNotices/Query/5
|
||||
|
[HttpGet("CheckIPQCTaskNotice")] |
||||
|
public async Task<ResultModel<IPQCTaskNotice>> CheckIPQCTaskNotice(string WipNo, string ItemNO, int StationID ) |
||||
|
{ |
||||
|
ResultModel<IPQCTaskNotice> result = new ResultModel<IPQCTaskNotice>(); |
||||
|
|
||||
|
var q = new List<IPQCTaskNotice>(); |
||||
|
if (!string.IsNullOrWhiteSpace(ItemNO)) |
||||
|
{ |
||||
|
result.Msg = "料號不可為空白"; |
||||
|
result.Success = false; |
||||
|
return result; |
||||
|
} |
||||
|
q = _context.IPQCTaskNotices.Where(w=>w.ItemNo == ItemNO && w.StatusNo == "Y").ToList(); |
||||
|
q = q.Where(w => w.CheckContent == null && w.CheckUserID == -1).ToList(); |
||||
|
if (!string.IsNullOrWhiteSpace(WipNo)) |
||||
|
{ |
||||
|
if (StationID > 0) |
||||
|
{ |
||||
|
q = q.Where(w => w.WipNo == WipNo && w.StationID == StationID).ToList(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
result.Msg = "站別不可為空白"; |
||||
|
result.Success = false; |
||||
|
return result; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
foreach (var item in q) |
||||
|
{ |
||||
|
string PlanQty = string.Empty; |
||||
|
if (!string.IsNullOrWhiteSpace(item.WipNo)) |
||||
|
{ |
||||
|
var Wipinfo = _context.WipInfos.Where(w => w.WipNO == item.WipNo).FirstOrDefault(); |
||||
|
PlanQty = Wipinfo.PlanQTY.ToString(); |
||||
|
} |
||||
|
string MailGroup = "IPQC_TASK"; |
||||
|
string Subject = $"[AMES系統通知] ,任務性IPQC預警提前通知"; |
||||
|
string Body = @$"工單號碼 :{WipNo} | 料號 : {ItemNO} | 計畫產量 {PlanQty},目前已投產至監控站 <br />
|
||||
|
提示站別: {item.StationName}<br /> |
||||
|
提示內容:{ item.CheckContent}<br /> |
||||
|
請人員前去確認相關議題";
|
||||
|
|
||||
|
|
||||
|
await new MailController(_context, _config).PostMail(Subject, Body, MailGroup, "", false); |
||||
|
|
||||
|
//MailMessage mesMail = new MailMessage();
|
||||
|
//string mailFrom = _config["MailFrom"].ToString();
|
||||
|
//string mailSmtpServer = _config["MailSmtpServer"].ToString();
|
||||
|
//int mailSmtpPort = int.Parse(_config["MailSmtpPort"].ToString());
|
||||
|
//string mailUser = _config["MailUser"].ToString();
|
||||
|
//string mailPassword = _config["MailUserPassword"].ToString();
|
||||
|
//mesMail.From = new MailAddress(mailFrom);
|
||||
|
//mesMail.Subject = Subject;
|
||||
|
//mesMail.SubjectEncoding = System.Text.Encoding.UTF8;
|
||||
|
//mesMail.Body = Body;
|
||||
|
//mesMail.IsBodyHtml = true;
|
||||
|
//mesMail.BodyEncoding = System.Text.Encoding.UTF8;
|
||||
|
|
||||
|
//SmtpClient mailClient = new SmtpClient(mailSmtpServer, mailSmtpPort);
|
||||
|
|
||||
|
////mailClient.EnableSsl = true;
|
||||
|
//NetworkCredential nc = new NetworkCredential();
|
||||
|
//nc.UserName = mailUser;
|
||||
|
//nc.Password = mailPassword;
|
||||
|
//mailClient.Credentials = nc;
|
||||
|
|
||||
|
//mailClient.Send(mesMail);
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
result.Success = true; |
||||
|
result.Msg = "OK"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新任務性IPQC表單资料
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <param name="IPQCTaskNotice"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPut("{id}")] |
||||
|
public async Task<ResultModel<string>> PutIPQCTaskNotice(int id, [FromBody] IPQCTaskNotice IPQCTaskNotice) |
||||
|
{ |
||||
|
ResultModel<string> result = new ResultModel<string>(); |
||||
|
if (id != IPQCTaskNotice.IPQCTaskNoticeID) |
||||
|
{ |
||||
|
result.Success = false; |
||||
|
result.Msg = "號碼錯誤"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
_context.Entry(IPQCTaskNotice).State = EntityState.Modified; |
||||
|
|
||||
|
try |
||||
|
{ |
||||
|
await _context.SaveChangesAsync(); |
||||
|
} |
||||
|
catch (Exception e) |
||||
|
{ |
||||
|
result.Success = false; |
||||
|
result.Msg = e.Message; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
result.Success = true; |
||||
|
result.Msg = "OK"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增任務性IPQC表單资料
|
||||
|
/// </summary>
|
||||
|
/// <param name="IPQCTaskNotice"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPost] |
||||
|
public async Task<ResultModel<string>> PostIPQCTaskNotice(IPQCTaskNotice IPQCTaskNotice) |
||||
|
{ |
||||
|
ResultModel<string> result = new ResultModel<string>(); |
||||
|
Helper helper = new Helper(_context); |
||||
|
var IPQCTaskNoticeID = helper.GetIDKey("IPQCTaskNoticeID").Result; |
||||
|
|
||||
|
IPQCTaskNotice.IPQCTaskNoticeID = IPQCTaskNoticeID; |
||||
|
_context.IPQCTaskNotices.Add(IPQCTaskNotice); |
||||
|
try |
||||
|
{ |
||||
|
await _context.SaveChangesAsync(); |
||||
|
} |
||||
|
catch (Exception e) |
||||
|
{ |
||||
|
result.Success = false; |
||||
|
result.Msg = e.Message; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
result.Success = true; |
||||
|
result.Msg = "OK"; |
||||
|
return result; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 删除任務性IPQC表單资料
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
// DELETE: api/IPQCTaskNotices/5
|
||||
|
[HttpDelete("{id}")] |
||||
|
public async Task<ResultModel<string>> DeleteIPQCTaskNotice(int id) |
||||
|
{ |
||||
|
ResultModel<string> result = new ResultModel<string>(); |
||||
|
var IPQCTaskNotice = await _context.IPQCTaskNotices.Where(m => m.IPQCTaskNoticeID == id).FirstOrDefaultAsync(); |
||||
|
if (IPQCTaskNotice == null) |
||||
|
{ |
||||
|
result.Success = false; |
||||
|
result.Msg = "ID不存在"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
IPQCTaskNotice newIPQCTaskNotice = new IPQCTaskNotice(); |
||||
|
newIPQCTaskNotice = IPQCTaskNotice; |
||||
|
|
||||
|
if (IPQCTaskNotice.StatusNo == "Y") |
||||
|
{ |
||||
|
newIPQCTaskNotice.StatusNo = "N"; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
newIPQCTaskNotice.StatusNo = "Y"; |
||||
|
} |
||||
|
_context.Entry(newIPQCTaskNotice).State = EntityState.Modified; |
||||
|
try |
||||
|
{ |
||||
|
await _context.SaveChangesAsync(); |
||||
|
} |
||||
|
catch (Exception e) |
||||
|
{ |
||||
|
result.Success = false; |
||||
|
result.Msg = e.Message; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
result.Success = true; |
||||
|
result.Msg = "OK"; |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
private bool IPQCTaskNoticesExists(int id) |
||||
|
{ |
||||
|
return _context.IPQCTaskNotices.Any(e => e.IPQCTaskNoticeID == id); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,164 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.ComponentModel.DataAnnotations.Schema; |
||||
|
using System.Runtime.Serialization; |
||||
|
|
||||
|
namespace AMESCoreStudio.WebApi.Models.AMES |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 條碼變更資料表
|
||||
|
/// </summary>
|
||||
|
[Table("IPQC_TASK_NOTICE", Schema = "JHAMES")] |
||||
|
[DataContract] |
||||
|
public class IPQCTaskNotice |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 任務性IPQC ID
|
||||
|
/// </summary>
|
||||
|
[Column("IPQC_TASK_NOTICE_ID")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "IPQC_TASK_NOTICE_ID")] |
||||
|
[Key] |
||||
|
|
||||
|
public int IPQCTaskNoticeID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工單號碼
|
||||
|
/// </summary>
|
||||
|
[Column("WIP_NO")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "工單號碼")] |
||||
|
|
||||
|
public string WipNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 料號
|
||||
|
/// </summary>
|
||||
|
[Column("ITEM_NO")] |
||||
|
[DataMember] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "料號")] |
||||
|
public string ItemNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 站別ID
|
||||
|
/// </summary>
|
||||
|
[Column("STATION_ID")] |
||||
|
[DataMember] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "站別ID")] |
||||
|
public int StationID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 提醒說明
|
||||
|
/// </summary>
|
||||
|
[Column("NOTICE_CONTENT")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "提醒說明")] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
public string NoticeContent { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 建立者
|
||||
|
/// </summary>
|
||||
|
[Column("CREATE_USERID")] |
||||
|
[DataMember] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "建立者")] |
||||
|
public int CreateUserID { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 建立時間
|
||||
|
/// </summary>
|
||||
|
[Column("CREATE_DATE")] |
||||
|
[DataMember] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "建立時間")] |
||||
|
public DateTime CreateDate { get; set; } = DateTime.Now; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新者
|
||||
|
/// </summary>
|
||||
|
[Column("UPDATE_USERID")] |
||||
|
[DataMember] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "更新者")] |
||||
|
public int UpdateUserID { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新時間
|
||||
|
/// </summary>
|
||||
|
[Column("UPDATE_DATE")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "更新時間")] |
||||
|
public DateTime UpdateDate { get; set; } = DateTime.Now; |
||||
|
|
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 確認者
|
||||
|
/// </summary>
|
||||
|
[Column("CHECK_USERID")] |
||||
|
[DataMember] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "確認者")] |
||||
|
public int CheckUserID { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 確認時間
|
||||
|
/// </summary>
|
||||
|
[Column("CHECK_DATE")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "確認時間")] |
||||
|
public DateTime CheckDate { get; set; } = DateTime.Now; |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 確認說明
|
||||
|
/// </summary>
|
||||
|
[Column("CHECK_CONTENT")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "確認說明")] |
||||
|
public string CheckContent { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 狀態 Y:啟用 N:停用
|
||||
|
/// </summary>
|
||||
|
[Column("STATUS_NO")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "狀態")] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
public string StatusNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 生產單位
|
||||
|
/// </summary>
|
||||
|
[Column("UNIT_NO")] |
||||
|
[DataMember] |
||||
|
[Display(Name = "生產單位")] |
||||
|
public string UnitNo { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 建立者Name
|
||||
|
/// </summary>
|
||||
|
[NotMapped] |
||||
|
[DataMember] |
||||
|
public string CreateUserName { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 確認者Name
|
||||
|
/// </summary>
|
||||
|
[NotMapped] |
||||
|
[DataMember] |
||||
|
public string CheckUserName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 站別
|
||||
|
/// </summary>
|
||||
|
[NotMapped] |
||||
|
[DataMember] |
||||
|
public string StationName { get; set; } |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue