diff --git a/AMESCoreStudio.Web/Controllers/RPTController.cs b/AMESCoreStudio.Web/Controllers/RPTController.cs
index 9f065d8c..1a2ecf49 100644
--- a/AMESCoreStudio.Web/Controllers/RPTController.cs
+++ b/AMESCoreStudio.Web/Controllers/RPTController.cs
@@ -17,6 +17,11 @@ using Microsoft.AspNetCore.Http;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using AMESCoreStudio.Web.ViewModels.RPT;
+using AMESCoreStudio.WebApi.Models.AMES;
+using AMESCoreStudio.WebApi.Enum;
+using Microsoft.AspNetCore.Mvc.Rendering;
+using System.Linq;
+using DocumentFormat.OpenXml.Office2010.ExcelAc;
// For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
@@ -122,12 +127,12 @@ namespace AMESCoreStudio.Web.Controllers
case "07":
title = data.Substring(0, 4) + "完工入庫數";
break;
- #endregion
+ #endregion
}
ViewBag.Title = title;
string MonthDataList = "
月份 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
數值 | ";
-
+
for (int m = 1; m <= 12; m++)
{
var Data = DateTime.Parse(data.Substring(0, 4) + "/" + m.ToString().PadLeft(2, '0'));
@@ -202,10 +207,10 @@ namespace AMESCoreStudio.Web.Controllers
case "02": //效率
case "03": //出勤率
dAVG_Rate = dSum_Rate / pi.DataTotal;
- break;
+ break;
case "04": //加班工時
- case "05":
+ case "05":
dAVG_Rate = dSum_Rate;
break;
}
@@ -338,7 +343,7 @@ namespace AMESCoreStudio.Web.Controllers
seriesData = seriesData + double.Parse(dtTime.Rows[r][12].ToString()) + "]},";
}
- ViewBag.SeriesData = seriesData.Substring(0, seriesData.Length - 1)+"]";
+ ViewBag.SeriesData = seriesData.Substring(0, seriesData.Length - 1) + "]";
string MonthDataList = "月份 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
數值 | ";
@@ -424,7 +429,7 @@ namespace AMESCoreStudio.Web.Controllers
case "07":
title = data.Substring(0, 4) + "完工入庫數";
break;
- #endregion
+ #endregion
}
ViewBag.Title = title;
@@ -584,7 +589,7 @@ namespace AMESCoreStudio.Web.Controllers
Yield = double.Parse(sum_time.ToString("0.00"))
});
- }
+ }
else
{
query.Datas.Add(new MonthGroup
@@ -594,7 +599,7 @@ namespace AMESCoreStudio.Web.Controllers
});
}
-
+
}
return Json(query.Datas);
@@ -689,7 +694,7 @@ namespace AMESCoreStudio.Web.Controllers
dtTime.AcceptChanges();
- }
+ }
}
}
@@ -698,7 +703,7 @@ namespace AMESCoreStudio.Web.Controllers
query.Datas.Add(new YieldGroup
{
Group = dtTime.Rows[r][0].ToString(),
- Yield = new double[12] { double.Parse(dtTime.Rows[r][1].ToString()), double.Parse(dtTime.Rows[r][2].ToString()) , double.Parse(dtTime.Rows[r][3].ToString()) , double.Parse(dtTime.Rows[r][4].ToString()) , double.Parse(dtTime.Rows[r][5].ToString()) , double.Parse(dtTime.Rows[r][6].ToString()) , double.Parse(dtTime.Rows[r][7].ToString()) , double.Parse(dtTime.Rows[r][8].ToString()) , double.Parse(dtTime.Rows[r][9].ToString()) , double.Parse(dtTime.Rows[r][10].ToString()) , double.Parse(dtTime.Rows[r][11].ToString()) , double.Parse(dtTime.Rows[r][12].ToString()) }
+ Yield = new double[12] { double.Parse(dtTime.Rows[r][1].ToString()), double.Parse(dtTime.Rows[r][2].ToString()), double.Parse(dtTime.Rows[r][3].ToString()), double.Parse(dtTime.Rows[r][4].ToString()), double.Parse(dtTime.Rows[r][5].ToString()), double.Parse(dtTime.Rows[r][6].ToString()), double.Parse(dtTime.Rows[r][7].ToString()), double.Parse(dtTime.Rows[r][8].ToString()), double.Parse(dtTime.Rows[r][9].ToString()), double.Parse(dtTime.Rows[r][10].ToString()), double.Parse(dtTime.Rows[r][11].ToString()), double.Parse(dtTime.Rows[r][12].ToString()) }
});
}
@@ -742,9 +747,9 @@ namespace AMESCoreStudio.Web.Controllers
case "07":
title = data + "完工入庫數";
break;
- #endregion
+ #endregion
}
-
+
ViewBag.Title = title;
ViewBag.Title2 = data;
@@ -914,14 +919,14 @@ namespace AMESCoreStudio.Web.Controllers
dt.Rows.Add(dr);
dt.AcceptChanges();
}
- catch
+ catch
{
DataRow drFind = dt.Rows.Find(date.ToString("yyyyMMdd"));
drFind[1] = double.Parse(drFind[1].ToString()) + double.Parse(jo[fieldName].ToString());
dt.AcceptChanges();
}
-
+
}
for (int i = 0; i < dt.Rows.Count; i++)
@@ -974,7 +979,7 @@ namespace AMESCoreStudio.Web.Controllers
case "07":
title = data + "完工入庫數";
break;
- #endregion
+ #endregion
}
ViewBag.Title = title;
@@ -1113,7 +1118,7 @@ namespace AMESCoreStudio.Web.Controllers
{
DateTime date = item.CreateDate;
-
+
dDay_Rate = 1;
switch (date.Day)
@@ -1122,7 +1127,7 @@ namespace AMESCoreStudio.Web.Controllers
day01 = day01 + dDay_Rate;
break;
case 2:
- day02 = day02 +dDay_Rate;
+ day02 = day02 + dDay_Rate;
break;
case 3:
day03 = day03 + dDay_Rate;
@@ -1347,7 +1352,7 @@ namespace AMESCoreStudio.Web.Controllers
}
break;
}
-
+
string DayDataList = "";
DayDataList = DayDataList + "日期 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 |
";
DayDataList = DayDataList + "數值 | " + day01 + " | " + day02 + " | " + day03 + " | " + day04 + " | " + day05 + " | " + day06 + " | " + day07 + " | " + day08 + " | " + day09 + " | " + day10 + " |
";
@@ -1513,5 +1518,239 @@ namespace AMESCoreStudio.Web.Controllers
return View();
}
+
+ #region RPT003 QC RATE 維護
+
+ ///
+ /// 西元 Select
+ ///
+ ///
+ private void GetYearItemSelect()
+ {
+ var YearItem = new List();
+ for (int i = -1; i <= 1; i++)
+ {
+ YearItem.Add(new SelectListItem
+ {
+ Text = DateTime.Now.AddYears(i).Year.ToString(),
+ Value = DateTime.Now.AddYears(i).Year.ToString()
+ });
+ }
+
+ ViewBag.GetYearItemList = YearItem;
+ }
+
+ ///
+ /// 月份 Select
+ ///
+ ///
+ private void GetMonthItemSelect()
+ {
+ var MonthItem = new List();
+ for (int i = 1; i <= 12; i++)
+ {
+ MonthItem.Add(new SelectListItem
+ {
+ Text = i.ToString(),
+ Value = i.ToString()
+ });
+ }
+
+ ViewBag.GetMonthItemList = MonthItem;
+ }
+
+ ///
+ /// QC_Rate 類別 Select
+ ///
+ ///
+ private void GetQcRateTypeSelect()
+ {
+ var QcRateTypeItem = new List(){
+ new SelectListItem() {
+ Text = "DOA",
+ Value = "DOA",
+ },
+ new SelectListItem
+ {
+ Text = "RMA",
+ Value = "RMA",
+ }
+ };
+
+ ViewBag.GetQcRateTypeList = QcRateTypeItem;
+ }
+
+ ///
+ /// QC_Rate 公司類型 Select
+ ///
+ ///
+ private void GetProductTypeSelect()
+ {
+ var ProductTypeItem = new List(){
+ new SelectListItem() {
+ Text = "SYSTEM",
+ Value = "SYSTEM",
+ },
+ new SelectListItem
+ {
+ Text = "BOARD",
+ Value = "BOARD",
+ },
+ new SelectListItem
+ {
+ Text = "MEDICAL",
+ Value = "MEDICAL",
+ }
+ };
+
+ ViewBag.GetProductTypeList = ProductTypeItem;
+ }
+
+ public IActionResult RPT003()
+ {
+ GetYearItemSelect();
+ GetMonthItemSelect();
+ GetQcRateTypeSelect();
+ GetProductTypeSelect();
+ return View();
+ }
+
+ //新增頁面
+ public IActionResult RPT003C()
+ {
+ GetYearItemSelect();
+ GetMonthItemSelect();
+ GetQcRateTypeSelect();
+ GetProductTypeSelect();
+ return View();
+ }
+
+ [HttpPost]
+ public async Task RPT003Async(QcRate model)
+ {
+ GetYearItemSelect();
+ GetMonthItemSelect();
+ GetQcRateTypeSelect();
+ GetProductTypeSelect();
+ IResultModel query = await _rptApi.GetQcRatesQuery(model.Yrer, model.Month, model.QcRateType, model.ProductType);
+
+ if (query.Data.Count() != 0)
+ {
+ ModelState.AddModelError("error", "已有重複資料,請在確認");
+ return View("RPT003C", model);
+ }
+
+ if (ModelState.IsValid)
+ {
+ IResultModel result;
+ model.CreateUserID = GetLogInUserID();
+ model.UpdateUserID = GetLogInUserID();
+ result = await _rptApi.PostQcRate(JsonConvert.SerializeObject(model));
+ if (result.Success)
+ {
+ var _msg = "新增成功!";
+ return RedirectToAction("Refresh", "Home", new { msg = _msg });
+ }
+ else
+ {
+ ModelState.AddModelError("error", result.Msg);
+ }
+ }
+ return View("RPT003C", model);
+
+ }
+
+ //修改頁面
+ [HttpGet]
+ public async Task RPT003U(string year, string month, string qcRateType, string productType)
+ {
+ GetYearItemSelect();
+ GetMonthItemSelect();
+ GetQcRateTypeSelect();
+ GetProductTypeSelect();
+ IResultModel result = await _rptApi.GetQcRatesQuery(year, month, qcRateType, productType);
+ return View(result.Data.FirstOrDefault());
+ }
+
+ public async Task RPT003UAsync(QcRate model)
+ {
+ GetYearItemSelect();
+ GetMonthItemSelect();
+ GetQcRateTypeSelect();
+ GetProductTypeSelect();
+
+ if (ModelState.IsValid)
+ {
+ IResultModel result;
+ model.UpdateUserID = GetLogInUserID();
+ result = await _rptApi.PutQcRate(JsonConvert.SerializeObject(model));
+ if (result.Success)
+ {
+ var _msg = "修改成功!";
+ return RedirectToAction("Refresh", "Home", new { msg = _msg });
+ }
+ else
+ {
+ ModelState.AddModelError("error", result.Msg);
+ }
+ }
+ return View("RPT003U", model);
+
+ }
+
+ [HttpPost]
+ public async Task RPT003D(string year, string month, string qcRateType, string productType)
+ {
+ var model = new QcRate(){
+ Yrer = year,
+ Month = month,
+ QcRateType = qcRateType,
+ ProductType = productType
+ };
+ var result = await _rptApi.DeleteQcRate(JsonConvert.SerializeObject(model));
+ return Json(new Result() { success = result.Success, msg = result.Msg });
+ }
+
+ ///
+ /// 查詢 QcRate
+ ///
+ /// 西元
+ /// 月份
+ /// 類別
+ /// 公司類型
+ /// 頁數
+ /// 筆數
+ ///
+ [HttpGet]
+ public async Task RPT003Query(string year , string month , string qcRateType,string productType, int page = 0, int limit = 10)
+ {
+ IResultModel result = await _rptApi.GetQcRatesQuery(year,month,qcRateType,productType,page,limit);
+
+ if (result.Data.Count() != 0)
+ {
+ return Json(new Table() { code = 0, msg = "", data = result.Data, count = result.DataTotal });
+ }
+ return Json(new Table() { count = 0, data = null });
+ }
+ #endregion
+
+ ///
+ /// 登入UserID
+ ///
+ ///
+ public int GetLogInUserID()
+ {
+ int user_id = 0;
+ HttpContext.Request.Cookies.TryGetValue("UserID", out string userID);
+
+ if (userID != null)
+ {
+ if (int.Parse(userID.ToString()) >= 0)
+ {
+ user_id = int.Parse(userID.ToString());
+ }
+ }
+ return user_id;
+ }
}
}
diff --git a/AMESCoreStudio.Web/HttpApis/AMES/IRPT.cs b/AMESCoreStudio.Web/HttpApis/AMES/IRPT.cs
index 25e199c2..47400e90 100644
--- a/AMESCoreStudio.Web/HttpApis/AMES/IRPT.cs
+++ b/AMESCoreStudio.Web/HttpApis/AMES/IRPT.cs
@@ -47,5 +47,43 @@ namespace AMESCoreStudio.Web
///
[WebApiClient.Attributes.HttpGet("api/ExceptionWorktimes/GetExceptionWorktime4RPT001D")]
ITask> GetExceptionWorktime4RPT001D(string sdate, string edate);
+
+ #region RPT003 QC RATE維護
+ ///
+ /// 新增 Qc Rate
+ ///
+ ///
+ [WebApiClient.Attributes.HttpPost("api/QcRate")]
+ ITask> PostQcRate([FromBody, RawJsonContent] string model);
+
+ ///
+ /// 更新 Qc Rate
+ ///
+ ///
+ [WebApiClient.Attributes.HttpPut("api/QcRate")]
+ ITask> PutQcRate([FromBody, RawJsonContent] string model);
+
+ ///
+ /// 刪除 QcRate
+ ///
+ ///
+ [WebApiClient.Attributes.HttpDelete("api/QcRate")]
+ ITask> DeleteQcRate([FromBody, RawJsonContent] string model);
+
+
+ ///
+ /// 查詢 QcRate
+ ///
+ /// 西元
+ /// 月份
+ /// 類別
+ /// 公司類型
+ /// 頁數
+ /// 筆數
+ ///
+ [WebApiClient.Attributes.HttpGet("api/QcRate/QcRatesQuery")]
+ ITask> GetQcRatesQuery(string year = null, string month = null, string qcRateType = null, string productType = null, int page = 0, int limit = 10);
+
+ #endregion
}
}
diff --git a/AMESCoreStudio.Web/Startup.cs b/AMESCoreStudio.Web/Startup.cs
index 80de7e49..ec9efe5d 100644
--- a/AMESCoreStudio.Web/Startup.cs
+++ b/AMESCoreStudio.Web/Startup.cs
@@ -137,7 +137,8 @@ namespace AMESCoreStudio.Web
&& type.GetInterfaces().Any(a => a.FullName == typeof(IHttpApi).FullName));
foreach (var type in types)
{
- services.AddHttpApi(type);
+ // ]wIsAPI 10
+ services.AddHttpApi(type).ConfigureHttpClient(o => { o.Timeout = TimeSpan.FromMinutes(10); });
services.ConfigureHttpApi(type, o =>
{
o.HttpHost = new Uri(AppSetting.Setting.ApiUrl);
diff --git a/AMESCoreStudio.Web/Views/RPT/RPT003.cshtml b/AMESCoreStudio.Web/Views/RPT/RPT003.cshtml
new file mode 100644
index 00000000..7d163643
--- /dev/null
+++ b/AMESCoreStudio.Web/Views/RPT/RPT003.cshtml
@@ -0,0 +1,150 @@
+@{
+ ViewData["Title"] = "QC_RATE維護";
+ Layout = "~/Views/Shared/_AMESLayout.cshtml";
+}
+
+
+
+@section Scripts{
+
+}
\ No newline at end of file
diff --git a/AMESCoreStudio.Web/Views/RPT/RPT003C.cshtml b/AMESCoreStudio.Web/Views/RPT/RPT003C.cshtml
new file mode 100644
index 00000000..f2946587
--- /dev/null
+++ b/AMESCoreStudio.Web/Views/RPT/RPT003C.cshtml
@@ -0,0 +1,83 @@
+@model AMESCoreStudio.WebApi.Models.AMES.QcRate
+
+
+@{ ViewData["Title"] = "RPT003C";
+ Layout = "~/Views/Shared/_AMESLayout.cshtml"; }
+
+
+
+
+
+@section Scripts {
+ @{ await Html.RenderPartialAsync("_ValidationScriptsPartial");
+ await Html.RenderPartialAsync("_FileinputScriptsPartial"); }
+
+
+
+
+}
diff --git a/AMESCoreStudio.Web/Views/RPT/RPT003U.cshtml b/AMESCoreStudio.Web/Views/RPT/RPT003U.cshtml
new file mode 100644
index 00000000..5dcb5474
--- /dev/null
+++ b/AMESCoreStudio.Web/Views/RPT/RPT003U.cshtml
@@ -0,0 +1,86 @@
+@model AMESCoreStudio.WebApi.Models.AMES.QcRate
+
+
+@{ ViewData["Title"] = "RPT003U";
+ Layout = "~/Views/Shared/_AMESLayout.cshtml"; }
+
+
+
+
+
+@section Scripts {
+ @{ await Html.RenderPartialAsync("_ValidationScriptsPartial");
+ await Html.RenderPartialAsync("_FileinputScriptsPartial"); }
+
+
+
+
+}
diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/QcRateController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/QcRateController.cs
new file mode 100644
index 00000000..da6723fa
--- /dev/null
+++ b/AMESCoreStudio.WebApi/Controllers/AMES/QcRateController.cs
@@ -0,0 +1,167 @@
+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.DTO.AMES;
+
+namespace AMESCoreStudio.WebApi.Controllers.AMES
+{
+ ///
+ /// Qc Rate
+ ///
+ [Route("api/[controller]")]
+ [ApiController]
+ public class QcRateController : ControllerBase
+ {
+ private readonly AMESContext _context;
+
+ public QcRateController(AMESContext context)
+ {
+ _context = context;
+ }
+
+ // GET: api/QcRate
+ [HttpGet]
+ public async Task>> GetQcRates()
+ {
+ return await _context.QcRates.ToListAsync();
+ }
+
+ ///
+ /// 查詢 QcRate
+ ///
+ /// 西元
+ /// 月份
+ /// 類別
+ /// 公司類型
+ /// 頁數
+ /// 筆數
+ ///
+ [HttpGet("QcRatesQuery")]
+ public async Task> GetQcRatesQuery(string year, string month, string qcRateType, string productType, int page = 0, int limit = 10)
+ {
+ ResultModel result = new ResultModel();
+
+ var resultQuery = await _context.QcRates.ToListAsync();
+
+ if (!string.IsNullOrWhiteSpace(year) && year != "0")
+ resultQuery = resultQuery.Where(w => w.Yrer == year).ToList();
+
+ if (!string.IsNullOrWhiteSpace(month) && month != "0")
+ resultQuery = resultQuery.Where(w => w.Month == month).ToList();
+
+ if (!string.IsNullOrWhiteSpace(qcRateType) && qcRateType != "0")
+ resultQuery = resultQuery.Where(w => w.QcRateType == qcRateType).ToList();
+
+ if (!string.IsNullOrWhiteSpace(productType) && productType != "0")
+ resultQuery = resultQuery.Where(w => w.ProductType == productType).ToList();
+
+ // 紀錄筆數
+ result.DataTotal = resultQuery.Count();
+
+ // Table 頁數
+ if (page > 0)
+ {
+ resultQuery = resultQuery.Skip((page - 1) * limit).Take(limit).ToList();
+ }
+
+ result.Data = resultQuery.OrderBy(o => o.Yrer).ThenBy(o => o.Month).ToList();
+ return result;
+ }
+
+ ///
+ /// 更新 Qc Rate
+ ///
+ ///
+ ///
+ [HttpPut]
+ public async Task> PutQcRate(QcRate qcRate)
+ {
+ ResultModel result = new ResultModel();
+ _context.Entry(qcRate).State = EntityState.Modified;
+ _context.Entry(qcRate).Property("CreateDate").IsModified = false;
+ _context.Entry(qcRate).Property("CreateUserID").IsModified = false;
+ qcRate.UpdateDate = DateTime.Now;
+ try
+ {
+ await _context.SaveChangesAsync();
+ result.Success = true;
+ result.Msg = "OK";
+ }
+ catch (Exception ex)
+ {
+ result.Success = false;
+ result.Msg = ex.InnerException.Message;
+ }
+ return result;
+ }
+
+ ///
+ /// 新增 Qc Rate
+ ///
+ ///
+ ///
+ [HttpPost]
+ public async Task> PostQcRate(QcRate qcRate)
+ {
+ ResultModel result = new ResultModel();
+ _context.QcRates.Add(qcRate);
+ try
+ {
+ await _context.SaveChangesAsync();
+ result.Success = true;
+ result.Msg = "OK";
+ }
+ catch (Exception ex)
+ {
+ result.Success = false;
+ result.Msg = ex.InnerException.Message;
+ }
+ return result;
+ }
+
+ ///
+ /// 刪除 Qc Rate
+ ///
+ ///
+ ///
+ [HttpDelete]
+ public async Task> DeleteQcRate(QcRate qcRate)
+ {
+ ResultModel result = new ResultModel();
+ var qcRateItem = await _context.QcRates.Where(w => w.Yrer == qcRate.Yrer &&
+ w.Month == qcRate.Month &&
+ w.QcRateType == qcRate.QcRateType &&
+ w.ProductType == qcRate.ProductType)
+ .FirstOrDefaultAsync();
+
+ try
+ {
+ if (qcRateItem == null)
+ {
+ result.Success = false;
+ result.Msg = "找不到要刪除資料";
+ }
+ else
+ {
+ _context.QcRates.Remove(qcRateItem);
+ await _context.SaveChangesAsync();
+ result.Success = true;
+ result.Msg = "OK";
+ }
+ }
+ catch (Exception ex)
+ {
+ result.Success = false;
+ result.Msg = ex.InnerException.Message;
+ }
+ return result;
+ }
+ }
+}
diff --git a/AMESCoreStudio.WebApi/Models/AMES/QcRate.cs b/AMESCoreStudio.WebApi/Models/AMES/QcRate.cs
new file mode 100644
index 00000000..a3073101
--- /dev/null
+++ b/AMESCoreStudio.WebApi/Models/AMES/QcRate.cs
@@ -0,0 +1,93 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using Microsoft.EntityFrameworkCore;
+using System.Runtime.Serialization;
+
+#nullable disable
+
+namespace AMESCoreStudio.WebApi.Models.AMES
+{
+ ///
+ /// QC RATE
+ ///
+ [Table("QC_RATE", Schema = "JHAMES")]
+ public partial class QcRate
+ {
+ ///
+ /// 西元年4碼
+ ///
+ [Key]
+ [Column("YRER")]
+ [StringLength(4)]
+ [DataMember]
+ public string Yrer { get; set; }
+
+ ///
+ /// 月份
+ ///
+ [DataMember]
+ [Key]
+ [Column("MONTH")]
+ [StringLength(2)]
+ public string Month { get; set; }
+
+ ///
+ /// 類別
+ ///
+ [Key]
+ [Column("QC_RATE_TYPE")]
+ [StringLength(10)]
+ [DataMember]
+ public string QcRateType { get; set; }
+
+ ///
+ /// 類型
+ ///
+ [Key]
+ [Column("PRODUCT_TYPE")]
+ [StringLength(10)]
+ [DataMember]
+ public string ProductType { get; set; }
+
+ ///
+ /// 數值
+ ///
+ [DataMember]
+ [Display(Name = "數值")]
+ [Column("QC_RATE", TypeName = "NUMBER(5,2)")]
+ [Required(ErrorMessage = "{0},不能空白")]
+ public decimal QcRateVer { get; set; }
+
+ ///
+ /// 建立UserID
+ ///
+ [Column("CREATE_USERID")]
+ [Required]
+ [DataMember]
+ public int CreateUserID { get; set; } = 0;
+
+ ///
+ /// 建立日期
+ ///
+ [Required]
+ [Column("CREATE_DATE")]
+ [DataMember]
+ public DateTime CreateDate { get; set; } = DateTime.Now;
+
+ ///
+ /// 更新UserID
+ ///
+ [Column("UPDATE_USERID")]
+ [DataMember]
+ public int UpdateUserID { get; set; } = 0;
+
+ ///
+ /// 更新日期
+ ///
+ [Column("UPDATE_DATE")]
+ [DataMember]
+ public DateTime? UpdateDate { get; set; } = DateTime.Now;
+ }
+}